/harness-claude:harness:knowledge-craft runs instead · from harness-claude
Critiques knowledge entries in docs/knowledge/ against a rubric catalog, scoring each on tier, impact, and confidence. Use during PR review, after authoring, or as a quality gate before graph ingestion.
This skill never runs in Claude Code
It ships in harness-claude at agents/, but /harness-claude:harness:knowledge-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 knowledge-entry quality. Critiques
docs/knowledge/entries (EXCLUDINGdecisions/— that's spec-craft's territory) against a curated rubric catalog: does this state a load-bearing FACT or paraphrase the code? Would deleting it lose specific signal? Does it earn its place in the knowledge graph asbusiness_fact/business_rule/business_concept/business_decision? Fifth non-design member of the craft-pipeline initiative. Emits 3-axis findings (tier × impact × confidence per ADR 0019).
harness-knowledge-pipeline ingests an entry into the graphspec-craft — decisions/ is its territory)align-knowledge 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/knowledge-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.knowledge.enabled — gate (default true)craft.knowledge.maxFiles — entry count cap (default 50)craft.knowledge.excludeDirs — extra subdirs to skipWalk docs/knowledge/ recursively:
*.md files (case-insensitive README.md excluded)decisions/ subdir entirely (spec-craft's territory)--exclude-dirs--files overrides discovery for explicit scoping7 seed rubrics:
| Rubric | Title |
|---|---|
KNOW-R001 | States a load-bearing fact (not paraphrase) |
KNOW-R002 | Truth a code reader could not derive |
KNOW-R003 | Earns a place in the knowledge graph taxonomy |
KNOW-R004 | Carries forward a decision that would erode |
KNOW-R005 | Deleting would lose specific knowledge |
KNOW-R006 | Concrete and operationally defined |
KNOW-R007 | A stranger could pick it up six months from now |
For each (file, rubric) pair:
null (rubric doesn't apply / entry is fine) OR { tier, impact, confidence, message }.KnowledgeFinding with cite.rubricId populated for ADR 0020 traceability.KNOW-R003 is the rubric that references the graph taxonomy (business_fact, business_rule, business_concept, business_decision) inside its description — the LLM critiques against the taxonomy without knowledge-craft ever reading the graph.
Emit KnowledgeCraftOutput:
{
findings: KnowledgeFinding[];
summary: {
phaseRun: ['critique'];
mode: 'fast';
durationMs: number;
llmCalls: { provider, model, count, costUsd };
catalog: { rubricsApplied: string[] };
counts: { filesScanned, filesSkipped };
runId: string;
}
}
harness knowledge-craft — CLI entry. --files <glob> / --exclude-dirs <dirs...> / --max-files <n> / --json / --verbose.mcp__harness__knowledge_craft — MCP tool. Same input/output. Consumed by agents.critiqueKnowledgeFile(file, opts) exported from packages/cli/src/knowledge-craft/index.ts. Future craft skills (or harness-knowledge-pipeline) can call this on a single entry without re-walking the project.LlmProvider, MockLlmProvider, derivePriority, 3-axis types all live in packages/cli/src/shared/craft/.knowledge-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["knowledge-craft"], which holds repo-relative POSIX paths, and resolves each
entry against the project root before calling mcp__harness__knowledge_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/knowledge-craft/proposal.md for the full 25 success criteria. Highlights:
catalog/rubrics/<id>.ts (file-per-rubric)cite.rubricId populated on every finding (ADR 0020)decisions/ subdir is hard-excluded from discovery (spec-craft territory)KNOW-R003 references graph node types in rubric prompt without graph imports at runtimecritiqueKnowledgeFile 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 entry is well-written and accurate, so KNOW-R001 passes." | Accuracy is not the bar. KNOW-R001 asks whether it states a load-bearing FACT a code reader could not derive. A polished, correct paraphrase of the implementation still fails. |
"It lives under docs/knowledge/, so it earns a graph node — KNOW-R003 passes." | Location does not confer membership. KNOW-R003 asks whether it maps to business_fact / business_rule / business_concept / business_decision. A how-the-code-works note fits none. |
| "I personally would keep this entry, so KNOW-R005 (deleting loses something) passes." | The test is whether deletion loses knowledge a reader could not reconstruct from the source. If the code already conveys it, deletion loses nothing — your preference to keep it is irrelevant. |
"This entry sits in decisions/ and bears a decision, so I'll critique it here." | decisions/ is hard-excluded — it is spec-craft's territory. Critiquing it here produces double-critique noise on the same file. Refuse to walk it. |
| "The entry explains the WHY, so KNOW-R004 (carries forward a decision) passes." | Carrying forward a decision that would erode requires the rejected alternative AND the reason. The WHY alone, without the option that was turned down, leaves the choice reconstructible as arbitrary. |
Input: docs/knowledge/auth/email-validator.md:
# Email Validator
The user service validates emails via the EmailValidator class, which
applies the standard regex pattern and rejects malformed addresses.
Output (mock LLM):
KNOW-R001 [foundational/large/medium] auth/email-validator.md
This entry restates what a reader would learn from opening
EmailValidator.ts. It states no load-bearing fact about the domain:
no upstream constraint, no historical reason for the choice, no business
rule that necessitated validation. Either rewrite to capture the WHY
(e.g., "emails must round-trip through Postmark within 30s for
deliverability tracking") or delete — the code already speaks.
KNOW-R005 [polish/medium/medium] auth/email-validator.md
Deleting this entry would lose nothing the code doesn't already convey.
Input: docs/knowledge/storage/postgres-over-dynamo.md:
# Why Postgres over DynamoDB
We chose Postgres over DynamoDB because our access patterns are
relational (frequent multi-table joins on tenant + user) and our team's
ops muscle is in SQL. DynamoDB's single-table design was rejected
because the modeling overhead of GSIs outweighs the latency win for
our request profile.
Output:
(no findings)
This entry carries forward a decision with the alternative AND the reason — KNOW-R004 passes, KNOW-R001 passes (load-bearing fact: the rejected option + the WHY), KNOW-R005 passes (deleting loses knowledge a reader couldn't reconstruct from the schema alone).
Input: Project has no docs/knowledge/ directory.
Output:
No knowledge-entry findings.
Summary: 0 findings across 0 entries (0 skipped, 7 rubrics, 0 LLM calls, $0.0000, 2ms)
align-knowledge deferred until signal warrants safe-to-apply rewrites.decisions/ is spec-craft's territory; double-critique on the same files produces noise..mdx support. Different parsing concerns; v1.x.maxFiles to 25, or scope explicitly with --files. Per-entry cost = rubrics × per-call; truncation already caps per-call cost at 4000 input chars.craft.knowledge.disabledRubrics: ['KNOW-R007']. Until then: filter findings by cite.rubricId in your consumer.<!-- knowledge-craft:skip --> HTML comment.harness spec-craft — ADRs are its territory. Knowledge-craft will refuse to walk decisions/.v1 — in implementation. See:
docs/changes/craft-pipeline/knowledge-craft/proposal.mdcraft-pipeline initiativenaming-craft, spec-craft, copy-craft, test-craft, harness-design-craft (design-pipeline)packages/cli/src/shared/craft/align-knowledge (FIX side), AGENTS.md / .mdx support, graph-aware mode, composition with harness-knowledge-pipeline at ingest time.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