refine-spec
Iteratively assess and fix an unrefined spec's requirements.md with fresh-context reviews until /spec can design from it without guessing, then move it to specs/refined/
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- refine-spec
- description
- Iteratively assess and fix an unrefined spec's requirements.md with fresh-context reviews until /spec can design from it without guessing, then move it to specs/refined/
- argument-hint
- <spec-name>
03 SKILL.md 正文
Refine Spec
Takes rough requirements (written by /create-spec or by a person) through an assess → fix → re-assess loop, at most three rounds. Each assessment is a fresh-context code-reviewer dispatch, so no round is anchored on the previous one's fixes. It edits requirements.md only: design and tasks belong to /spec.
Input
$ARGUMENTS: the spec name.
Invocation contexts
- Slash command: runs the loop; asks the person the human-required questions (step 4) and continues with their answers.
- Model-invoked: the same.
- Non-interactive: runs the loop and applies auto-fixes. Human-required issues are an escalation: the run stops, leaves the spec where it is, and returns the questions. An assessor that did not return also stops the run.
Steps
-
Resolve with
scripts/harness/spec-lifecycle.sh resolve <name>(.claude/skills/spec-resolution/SKILL.md). Continue only forunrefined/(first refinement) orrefined/(re-refinement); for any later state, stop and point to/evaluate-spec <name>. -
Read
requirements.md(anddesign.mdortasks.mdif a person already started them),knowledge/invariants.md,knowledge/domains.md, and the master-spec sections the requirements cite. -
Assess (fresh context). Dispatch one assessor per round, with only the spec path and this prompt, never your own reasoning or earlier rounds:
Agent(subagent_type: "code-reviewer", description: "Assess spec <name>", prompt: <the prompt below>)Assess
specs/<state>/<name>/requirements.mdfor readiness to design from. Readknowledge/spec-authoring.md,.claude/rules/spec-authoring.md,.claude/rules/spec-premise-grounding.md,knowledge/invariants.mdandknowledge/domains.mdfirst. Score each dimension PASS, NEEDS_WORK or FAIL, citing the line of the spec each issue is on: D1 objectives are specific and observable; D2 every FR has numbered acceptance criteria in EARS form with concrete values, NFRs are measurable, and the Definition of Done covers every FR; D3 every claim about the code is cited and true (open two or three citations and check them; an absence claim needs structural grounding); D4 scope is bounded, non-goals say what still binds, and the work fits one spec or is flagged as an epic; D5 the requirements respect the invariants and domain boundaries they reach, and are tagged with them; D6 no requirement contradicts another, a non-goal or the Definition of Done; D7 dependencies on and conflicts with other specs underspecs/are named; D8 a designer could writedesign.mdandtasks.mdfrom it without guessing. Output:## Assessment: <name>,Verdict: Ready | Needs work | Needs human input, a table| Dimension | Score | Issues |, then### Auto-fixable(numbered: issue, location, the fix),### Human-required(numbered: the question and why only a person can answer it),### Missing context. Zero issues is a valid result; never invent findings. No style-only findings.Record the dispatch before reading the result: every round adds one to
dispatched. A round counts asreturnedonly when its report has a verdict and a PASS, NEEDS_WORK or FAIL score for each of D1 to D8. A report that is empty, or missing the verdict or any dimension's score, counts asfailed: it is never read as "no issues" or as "no FAIL". -
Fix.
- Auto-fixable issues: edit
requirements.mdto make criteria testable, correct stale citations, add missing tags, non-goal bindings, dependencies and Definition-of-Done items. Never change the intent or scope; a fix that would is human-required. - Human-required issues (input step): ask, and fold the answers in.
- Auto-fixable issues: edit
-
Re-assess with a new assessor (step 3) after each round of fixes. Only
returnedrounds count toward the exits below; afailedround stops the loop as Blocked. Stop when:- Ready: every dimension PASS;
- Good enough: after three rounds, no FAIL remains (the remaining NEEDS_WORK items go into the log for
/spec); - Blocked: human-required issues remain unanswered;
- Not converging: after three rounds, a FAIL remains or new issues keep appearing; the requirements need rewriting, not refining.
-
Finish.
- Ready or good enough, and every dispatched round returned (
failed=0): when the spec is inunrefined/, runscripts/harness/spec-lifecycle.sh move <name> refined. Writespecs/refined/<name>/refinement-log.mdwith the dispatch line, each round's verdict and fixes, and the remaining notes. - Blocked (including any failed round) or not converging: leave the spec where it is and report.
- Ready or good enough, and every dispatched round returned (
Output
dispatched=<N> returned=<M> failed=<K>
Verdict: <Ready | Good enough | Blocked | Not converging> after <N> rounds
Changes: <one line per change to requirements.md>
Remaining notes for /spec: <items or "none">
Location: specs/<state>/<name>/
Next: /spec <name> (or the questions that block it)
When returned + failed < dispatched, name the round whose assessor is unaccounted for, and report no verdict.
04 同仓库更多 Skills
mythhelm-deliver-backlog
Coordinate a MYTHHELM backlog run with the shared stage checks and maintainer checkpoints.
mythhelm-bootstrap
Orient a Grok Build session in the MYTHHELM repository before task or spec work.
vendor-consult
Run one advisory stage consult (premise-ground, spec-validate, task-review, change-review, stuck-oracle, dossier) with an optional external vendor, then adjudicate the answer at its anchors
update-docs
Bring README, docs/, knowledge/, WORKFLOW.md and CLAUDE.md in line with what a shipped spec or a merged change actually did — find every statement the change made stale, fix it where readers look, and add only the new facts they need
triage
Score an idea or a GitHub issue against the master spec's stages, gates and commitments, check it for duplicates, and recommend whether it becomes a backlog card; read-only
test-driven-development
Red-green-refactor for Go — use when implementing any feature, bug fix or behaviour change, before writing implementation code