Spec Refinement
Turn rough ideas into approved specs with testable acceptance criteria before coding.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/brainstorming-arbiterforge/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
The Socratic spec-refinement front of /feature, and the planning front of /sprint. Routed to BEFORE any code β it takes a one-line idea and drives it to an approved, concrete spec with testable acceptance criteria. Four gated phases β frame, refine, write, approve. No implementation and no handoff to tdd until the spec is on disk and approved; each acceptance criterion becomes one tdd Phase 1 obligation.
What this skill does
brainstorming
Refine the idea before it touches code. Routed to by /feature (before tdd) and by /sprint (the planning front).
Pre-flight
Read these, or STOP and surface the gap β never guess scope or stack:
{{PROJECT_DIR}}/.codearbiter/CONTEXT.mdβ thestage:frontmatter (the maturity value), domain vocabulary, and what the project is NOT building.{{PROJECT_DIR}}/.codearbiter/tech-stack.mdβ the stack the feature must fit; rule out incompatible designs early.{{PROJECT_DIR}}/.codearbiter/open-questions.mdβ existing[CONFIRM-NN]items; new ones number sequentially from here.
Per-feature and light. NOT decompose's whole-project six-layer interview β one feature, four phases.
Phase 1 β Frame the problem Β· gate: BLOCK
Take the one-line idea and pin its boundaries before asking anything else:
- State the problem in one sentence β the concrete pain, not the proposed solution.
- Name the user or caller who feels it, and what "done" looks like to them.
- Name what this feature explicitly does NOT do β the boundary that keeps scope honest.
- Check the framing against
CONTEXT.md: it never contradicts the NOT-building list or redefines domain vocabulary. A contradiction is a conflict β surface it, do not reconcile it silently.
Gate: problem, caller, and out-of-scope boundary stated and consistent with CONTEXT.md.
Phase 2 β Socratic refinement loop Β· gate: BLOCK
One focused question at a time. Never advance on a hand-wavy answer. Run every answer through three lenses:
- Vague language β Force concrete nouns, numbers, and verbs. "Manage", "handle", "support" are not verbs. "Fast", "secure", "scalable" are not specifications. "We'll figure it out later" is not an answer β every "later" becomes a
[CONFIRM-NN]. - Hidden complexity β Name what the user assumes is easy but is hard: state, concurrency, edge cases, failure modes, validation, idempotency, migration of existing data. Surface it now or it surfaces in
tdd. - Trade-off forcing β When a real decision exists, frame it: "X gives you A but costs B; Y gives you C but costs D β choose." Do not pick for the user.
Record every genuinely-unresolved unknown as [CONFIRM-NN] in {{PROJECT_DIR}}/.codearbiter/open-questions.md, numbered sequentially. A finding that belongs to a different feature or a future scope gets an inline [NEEDS-TRIAGE] marker in the notes β never route it to a ticket.
Gate: every vague term made concrete; every forced trade-off resolved or recorded as [CONFIRM-NN]; no unresolved "later" outside a [CONFIRM-NN]. A blocking [CONFIRM-NN] that gates the spec's core stops the loop β surface it and STOP.
Phase 3 β Write the spec Β· gate: BLOCK
Write the agreed spec to {{PROJECT_DIR}}/.codearbiter/specs/<slug>.md. The slug is derived from the feature. The spec holds:
- Problem β the Phase 1 framing in final form.
- Scope β what is in, and the explicit out-of-scope boundary.
- Acceptance criteria β a numbered list, each criterion concrete and testable: a specific input, the observable output, the boundary or failure behavior. Each criterion is verifiable by a single test. "It works well" is not a criterion. These become
tddPhase 1 obligations β one obligation per criterion, so an untestable criterion is a defect to fix here, not intdd. - Open questions β every
[CONFIRM-NN]raised, cross-referenced toopen-questions.md. - Governs (optional) β a spec-header line
**Governs:** <comma-separated globs>that enrolls the approved spec in file-scoped just-in-time context injection: on a Read of any file matching one of the listed globs, a pointer to this spec is surfaced to the agent (tier 3 of the fileβknowledge map). Adding the line is sufficient to enroll; no other change required.
Gate: the spec file exists on disk under specs/, with at least one acceptance criterion and every criterion individually testable.
Phase 4 β Approval & handoff Β· gate: STOP
The spec is approved before any code is written or any handoff to tdd occurs β no exceptions:
- Under
/featureβ present the spec and request explicit user approval. Iterate on the file in place until the user approves. A blocking[CONFIRM-NN]must be resolved by the user before approval β never auto-resolve it. - Under
/sprintβ approval may be granted automatically by SMARTS scoring, logged to the.codearbiter/audit trail. A blocking[CONFIRM-NN]is never auto-approvable; it escalates to the user and STOPs the sprint flow.
On approval, hand off to the tdd skill, which enters Phase 1 against the approved spec β one obligation per acceptance criterion.
Gate: the spec is approved (by the user under /feature, or by logged SMARTS auto-approval under /sprint) with no unresolved blocking [CONFIRM-NN]. Only then does control pass to tdd.
Hard rules
- MUST NOT write implementation code or route to
tddbefore the spec is on disk underspecs/AND approved. - MUST NOT write an acceptance criterion that cannot be verified by a single test.
- MUST NOT resolve a
[CONFIRM-NN]by guessing β surface it and record it inopen-questions.md. - MUST NOT auto-approve a spec carrying a blocking
[CONFIRM-NN], even under/sprintβ it escalates to the user. - MUST NOT contradict the NOT-building list or redefine domain vocabulary in
CONTEXT.mdβ a contradiction is a conflict to surface, not reconcile. - MUST NOT run decompose's six-layer whole-project interview β this is one feature, four phases.
- MUST log a
/sprintauto-approval to the.codearbiter/audit trail. - MUST, at exit, run the follow-up harvest (
{{PLUGIN_ROOT}}/includes/harvest.md) over any[NEEDS-TRIAGE]notes raised this run β batch-confirm promoting them toopen-tasks.md(work) oropen-questions.md(decisions) so out-of-scope ideas don't vanish.
Related skills
Documentation Co-Authoring
anthropics
Guide structured workflows for writing docs, proposals, and technical specs collaboratively.
MCP Server Builder
anthropics
Build protocol servers that connect language models to external APIs and services.
Ask Questions If Underspecified
trailofbits
Ask clarifying questions before starting work on ambiguous requests.
Claude Plugin Marketplace Builder
daymade
Convert a Claude skills repository into an installable marketplace with auto-updates.