/harness-claude:harness:docs-craft runs instead · from harness-claude
Critiques documentation quality using LLM judgment across three axes (tier, impact, confidence). Use during PR review, post-ship audits, or per-release to catch stale prose, poor examples, and dead ordering.
This skill never runs in Claude Code
It ships in harness-claude at agents/, but /harness-claude:harness:docs-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 documentation quality — the ceiling counterpart to the rule-based documentation floor (harness-detect-doc-drift / harness-check-docs / harness-docs-pipeline, which enforce existence, link freshness, and coverage). The direct structural twin of harness-design-craft: the floor keeps docs from being broken; docs-craft asks whether they are any good. Emits 3-axis findings (tier × impact × confidence per ADR 0019).
docs/knowledge/ fact entries) and spec-craft (which owns proposals + ADRs)docs/knowledge/ fact entries (use knowledge-craft)docs/changes/ and docs/decisions/ (use spec-craft)align-docs sibling may add safe rewrites)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/docs-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 shapedocs-craft is the ceiling; it runs regardless of setup, but its critique sharpens when a project declares its documentation intent. Before critiquing, note the state:
| Precondition | Source | If missing |
|---|---|---|
docStyleDeclared | a project doc style guide (e.g. docs/**/DOCS.md) | Run with the generic seed rubrics; note in the summary that a style guide would sharpen critique and offer to seed one (progressive upgrade — the same posture as design-craft's B'). |
When no style guide exists, docs-craft still runs with the seed rubrics (degraded, not blocked). It never refuses to critique just because a project has not written its style down.
Read project configuration. Shared craft config under craft.llm.* selects the judgment backend. maxFiles (default 60) caps the doc count.
Walk the docs tree + root README. Discover *.md under docs/ plus the root README.md. Classify each doc by a cheap path heuristic into one of: reference, guide, readme, prose — used to filter rubrics and shape the prompt.
Exclude sibling-owned and non-teaching surfaces. docs/knowledge/ (knowledge-craft), docs/changes/ + docs/decisions/ + docs/adr/ (spec-craft), and generated / non-teaching dirs (roadmap.d, plans, solutions, blueprint, agent-setup). Caller-supplied --files overrides discovery; --exclude-dirs adds skips.
7 seed rubrics, each declaring which doc kinds it applies to:
| Rubric | Title | Applies to |
|---|---|---|
DOCS-R001 | Teaches a mental model (not a feature enumeration) | all |
DOCS-R002 | Order matches the reader's mental model | all |
DOCS-R003 | Examples earn their place (concrete, runnable, non-redundant) | reference, guide, readme |
DOCS-R004 | Prose is alive, not bureaucratic | all |
DOCS-R005 | API/reference docs let the reader predict the response shape | reference |
DOCS-R006 | A stranger walks away with the same understanding | all |
DOCS-R007 | Scannable and navigable (a reader finds the answer fast) | all |
For each (doc, rubric) where the rubric applies to the doc's kind:
null (rubric doesn't apply / the doc already clears the bar) OR { tier, impact, confidence, message }.DocsFinding with cite.rubricId populated for ADR 0020 traceability, and a derived priority for sorting.A small curated exemplar set anchors the catalog — Stripe Docs, Vercel, MDN, Linear, Tailwind — each a public reference point for one craft dimension (Stripe for runnable examples + response prediction, MDN for no-shared-context, Linear/Tailwind for scannability, Vercel for voice). The exemplars ground the rubric sources today and seed a future BENCHMARK phase, the direct analogue of design-craft's exemplar corpus.
Emit DocsCraftOutput:
{
findings: DocsFinding[];
summary: {
phaseRun: ['critique'];
mode: 'fast';
durationMs: number;
llmCalls: { provider, model, count, costUsd };
catalog: { rubricsApplied: string[]; exemplarsAvailable: number };
counts: { filesScanned, filesSkipped };
runId: string;
}
}
harness docs-craft — CLI entry. --files <glob> / --exclude-dirs <dirs...> / --max-files <n> / --json / --verbose. Exits non-zero when any foundational-tier finding is present.mcp__harness__docs_craft — MCP tool. Same input/output. Consumed by agents and by harness-docs-pipeline.critiqueDocFile(file, opts) exported from packages/cli/src/docs-craft/index.ts. harness-docs-pipeline (or another craft skill) can critique a single doc without re-walking the project.LlmProvider, MockLlmProvider, derivePriority, and the 3-axis types all live in packages/cli/src/shared/craft/.docs/knowledge/; spec-craft owns docs/changes/ + ADRs; copy-craft owns prose-in-code. docs-craft owns authored teaching prose (guides, tutorials, references, READMEs).docs-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["docs-craft"], which holds repo-relative POSIX paths, and resolves each
entry against the project root before calling mcp__harness__docs_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/docs-craft/proposal.md for the full success criteria. Highlights:
catalog/rubrics/<id>.ts (file-per-rubric, matching the craft family)cite.rubricId populated on every finding (ADR 0020)critiqueDocFile works on a single doc without a 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 |
|---|---|
| "The doc exists and its links resolve, so the documentation is in good shape." | Existence, link freshness, and coverage are the floor (harness-check-docs). docs-craft asks whether the doc TEACHES — does a stranger walk away with the same mental model (DOCS-R006), or does it just enumerate features it happens to have. |
| "This reference page lists every field, so the reader knows the response." | DOCS-R005 wants the reader to PREDICT the response shape — a concrete example response plus the errors the endpoint can raise, not a bare field table. A field list without a worked example still leaves the reader guessing. |
| "It is a knowledge fact entry / an ADR, but it is still markdown, so I will critique it." | docs/knowledge/ (knowledge-craft) and docs/changes/ + ADRs (spec-craft) are hard-excluded from discovery so the same file is never double-critiqued. Reaching into a sibling's tree is a boundary violation, not thoroughness. |
| "The prose is grammatically correct, so DOCS-R004 passes." | DOCS-R004 asks whether the prose is ALIVE, not merely correct. Grammatically clean, bureaucratic boilerplate fails it — voice and momentum are the bar, not the absence of typos. |
| "The intro paragraph is muddy, so I will rewrite it to fix the finding." | docs-craft is judgment-only. It emits a finding; a future align-docs sibling owns safe rewrites. Rewriting the prose here is out of scope and hides the finding from the author who owns the doc. |
Input: docs/guides/webhooks.md:
# Webhooks
The system supports webhooks. Webhooks can be created, updated, and deleted.
Each webhook has a URL, a set of events, and a status.
Output (mock LLM):
docs/guides/webhooks.md (guide)
DOCS-R001 [foundational/large/high] docs/guides/webhooks.md
Enumerates what a webhook HAS but never teaches what it is FOR or when to
reach for one. A reader can't predict behavior the doc didn't spell out.
Open by naming the problem ("get notified when an event happens without
polling") and the shape of the solution, then drill into fields.
DOCS-R003 [polish/medium/high] docs/guides/webhooks.md
No example. Show a real registration request and the exact payload the
endpoint will POST to the reader's URL.
Input: docs/reference/create-order.md documenting a POST /orders endpoint with only the request body listed.
Output:
docs/reference/create-order.md (reference)
DOCS-R005 [foundational/large/high] docs/reference/create-order.md
The reader can't predict what comes back: no example response, no field
list, no error/status enumeration. Pair the request with a concrete
example response and the errors POST /orders can raise (the bar Stripe's
API reference sets).
Input: A README that opens with the problem it solves, shows one runnable example paired with its output, and uses descriptive headings.
Output:
No documentation-craft findings.
Summary: 0 findings across 1 docs (0 skipped, 6 rubrics, 5 exemplars, 6 LLM calls, $0.0000, 3ms)
align-docs sibling may add safe-to-apply rewrites once signal warrants it. docs-craft is judgment-only.docs/knowledge/ (knowledge-craft) and docs/changes/ + ADRs (spec-craft) are hard-excluded from discovery..mdx support. Different parsing concerns; a later minor version.--max-files (default 60), or scope to specific docs with --files. Per-doc cost = applicable rubrics × per-call; content is truncated at 6000 input chars.--files, or filter findings by cite.rubricId in your consumer. Per-rubric disable is a later minor version.--exclude-dirs, or scope with --files.craft.llm.*; do not expect rule-based output.v1 — CRITIQUE phase. See:
docs/changes/docs-craft/proposal.mdcraft-pipeline initiativeharness-design-craft (the structural twin), knowledge-craft, spec-craft, copy-craft, test-craft, naming-craft, security-craftharness-detect-doc-drift, harness-check-docs, harness-docs-pipelinepackages/cli/src/shared/craft/align-docs (FIX side), a BENCHMARK phase scoring against the exemplar corpus, .mdx support, and composition with harness-docs-pipeline at authoring timeWhat SKILL.md sets; muted values are Claude Code's defaults
793 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 communicationnpx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeOther plugins' skills for the same job