/harness-claude:harness:spec-craft runs instead · from harness-claude
Critiques spec quality (proposals and ADRs) using LLM judgment against a curated rubric catalog. Provides per-section analysis with rubric-to-section mapping and 3-axis findings (tier, impact, confidence).
This skill never runs in Claude Code
It ships in harness-claude at agents/, but /harness-claude:harness:spec-craft (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
LLM-judgment critique of spec quality (proposals + ADRs) against a curated rubric catalog from the spec-quality canon. Per-section critique with rubric-to-section mapping. Second member of the craft-pipeline initiative; highest-leverage craft skill because spec quality compounds across the entire planning → implementation → review lifecycle below it. Emits 3-axis findings (tier × impact × confidence per ADR 0019).
harness-soundness-review — that's the rule-based floor)docs-craft)align-spec sibling)code-craft or docs-craft)packages/cli/src/shared/craft/) — LlmProvider + finding/axes schema + run store — shared across all *-craft skills. This skill implements, and does not own, that contract.packages/cli/src/spec-craft/).craft-fleet (the craft-pipeline elevation sweep) and the harness natural-language router, which invoke every *-craft provider uniformly through the shared critique/finding shapeRead project configuration. Check harness.config.json for:
craft.spec.enabled — gate (default true)craft.spec.maxFiles — doc count cap (default 50)craft.spec.maxSectionsPerFile — per-doc section cap (default 10)Discover spec files:
docs/changes/*/proposal.md and docs/changes/*/<sub>/proposal.md (one level of nesting, for initiatives with sub-projects)docs/knowledge/decisions/*.md (excluding README)--kinds proposal or --kinds adr for single-kind runs.For each spec file:
--- ... --- block at top, if present).## ...) into named sections. Each section captures:
heading — original H2 text (e.g., "Decisions", "Out-of-scope (v1)")canonical — normalized form for rubric matching ("decisions", "out-of-scope-v1")body — content between this H2 and the nextline / endLine — line range7 seed rubrics:
| Rubric | Title | Applies to |
|---|---|---|
SPEC-R001 | Sharpness vs vagueness | * (all sections) |
SPEC-R002 | Cuts at the joints | decisions, scope, technical-design |
SPEC-R003 | Two readers, same understanding | decisions, success-criteria |
SPEC-R004 | Load-bearing decision vs ambient context | decisions, overview |
SPEC-R005 | Honest rationalizations | rationalizations* (regex) |
SPEC-R006 | Non-goals are non-goals | out-of-scope*, non-goals* (regex) |
SPEC-R007 | Stranger in 6 months | * (all sections) |
For each eligible (section, rubric) pair:
null (rubric doesn't apply / section is fine) OR { tier, impact, confidence, message }.SpecFinding with cite.rubricId populated for ADR 0020 traceability.Emit SpecCraftOutput:
{
findings: SpecFinding[];
summary: {
phaseRun: ['critique'];
durationMs: number;
llmCalls: { provider, model, count, costUsd };
catalog: { rubricsApplied: string[] };
docsScanned: number;
sectionsScanned: number;
runId: string;
}
}
harness spec-craft — CLI entry. --files <glob> / --kinds proposal,adr / --sections decisions,scope / --max-files <n> / --max-sections-per-file <n> / --json / --verbose.mcp__harness__spec_craft — MCP tool. Same input/output. Consumed by agents.critiqueSpecFile(file, opts) exported from packages/cli/src/spec-craft/index.ts. Future craft skills (or harness-brainstorming) can call this when they have a doc in hand without re-walking the project.LlmProvider, MockLlmProvider, derivePriority, 3-axis types all live in packages/cli/src/shared/craft/. design-craft + naming-craft + spec-craft import from there; design-craft + naming-craft keep their old import paths via re-export shims.spec-craft auto-activates as an advisory review hook whenever a diff touches the surface it
owns — harness-autopilot at after:REVIEW / after:FINAL_REVIEW, and harness-code-review at
after:mechanical. The domain table is CRAFT_REVIEW_DOMAINS and the per-host events are
CRAFT_REVIEW_EVENTS_BY_HOST, both in packages/core/src/hooks/craft-review-hooks.ts. The host
forwards the subset of the diff this domain owns:
files — this domain's owned subset of the changed files, as ABSOLUTE paths. The host
reads it from plan.files["spec-craft"], which holds repo-relative POSIX paths, and resolves each
entry against the project root before calling mcp__harness__spec_craft. Absolute is the
recommended form, not a correctness requirement for this domain: its collector resolves a
relative entry against the tool's path (never the process CWD), so a repo-relative entry
forwarded unresolved still reads the in-diff file (pinned by
packages/cli/tests/shared/craft/relative-files-scope.test.ts). Only
mcp__harness__design_craft still requires absolute paths.promptBudget — accepted; raises the prompt ceiling for the forwarded scope when the diff subset is large.Findings from a hook-triggered run are advisory: reported, never blocking, never counted toward review severity, and never entered into a host's mechanical exclusion set. A hook-triggered run that fails is a missing opinion, not a broken gate.
See docs/changes/craft-pipeline/spec-craft/proposal.md for the full 34 success criteria. Highlights:
catalog/rubrics/<id>.ts (file-per-rubric, matches naming-craft)cite.rubricId populated on every finding (ADR 0020)critiqueSpecFile cross-cutting API works on a single file without project walkThese are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.
| Rationalization | Why It Is Wrong |
|---|---|
| "This spec has all the required section headings, so it passes." | Structural completeness is harness-soundness-review's floor. Spec-craft critiques the ceiling: a fully-structured Decisions section stuffed with vague qualifiers still fails SPEC-R001 and SPEC-R004. |
| "SPEC-R005 only applies to a section literally titled 'Rationalizations to Reject'." | The mapping is a regex (rationalizations*). A section headed "Objections considered" matches the intent, and a strawmanned rejection fails SPEC-R005 regardless of the exact heading text. |
| "The Overview reads well, so I'll run every rubric against it to be thorough." | Rubric-to-section mapping means most rubrics do not apply to most sections. SPEC-R002 (cuts-at-joints) targets decisions/scope/technical-design, not Overview. Running an inapplicable rubric manufactures noise. |
| "'A modern, scalable stack' is a fine summary, so SPEC-R001 passes." | Sharpness-vs-vagueness flags exactly this: no framework named, no scale metric, no operational definition of "modern". A plausible-sounding summary is the vagueness the rubric targets. |
| "This out-of-scope item is really a deferred feature, so SPEC-R006 passes." | Non-goals-are-non-goals asks whether the item is a true boundary or a disguised requirement. A deferred feature smuggled into Out-of-scope is precisely the failure SPEC-R006 exists to catch. |
Input: A proposal's ## Decisions section reads:
| Decision | Why |
|----------|-----|
| Use modern stack | scalable and clean |
| Defer auth | not in scope |
Output (mock LLM):
SPEC-R001 [polish/medium/medium] ## Decisions:34
"Modern stack" and "scalable and clean" are vague — no concrete framework
named, no metric for "scalable", no operational definition of "clean".
Sharpen: name the framework, state the scale target (req/sec, team size),
define what "clean" means in observable terms.
SPEC-R004 [polish/medium/medium] ## Decisions:34
The Decisions section pads load-bearing choices with vague qualifiers
rather than naming the trade-off chosen and the rejected alternative.
Input: A ## Rationalizations to reject section reads:
| "Use a different framework" | Other frameworks are worse |
Output:
SPEC-R005 [foundational/large/high] ## Rationalizations to reject:88
"Other frameworks are worse" is a strawman — not stated charitably, not
paired with a specific reason. Steelman the rejected position: name the
competing framework, name its strongest feature, then explain the specific
trade-off that made it unsuitable here.
Input: Project has no docs/changes/ or docs/knowledge/decisions/ directory.
Output:
No spec findings.
Summary: 0 findings across 0 docs (0 sections, 7 rubrics, 0 LLM calls, $0.0000, 3ms)
align-spec deferred until signal warrants safe-to-apply rewrites.maxSectionsPerFile to 5 or maxFiles to 25. Per-doc cost = sections × rubrics × per-call. Rubric-to-section mapping already prunes most calls; further: use --sections decisions to target the highest-value section.craft.spec.disabledRubrics: ['SPEC-R007']. Until then: filter findings by cite.rubricId in your consumer.<!-- spec-craft:skip --> HTML comment.--mode doc opt-in for whole-doc critique.--files <rfc.md> at a single file — the section parser works on any markdown.v1 — in implementation. See:
docs/changes/craft-pipeline/spec-craft/proposal.mdcraft-pipeline initiative (the highest-leverage craft skill)harness-design-craft (design-pipeline), naming-craft (craft-pipeline)packages/cli/src/shared/craft/ (extracted on this PR)align-spec (FIX side), docs-craft, test-craft, code-craft — each can call critiqueSpecFile if they want spec-level critique for a doc they're already processing.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claude793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job