analyze
Use when constitution, spec, plan and tasks all exist and you want them cross-read against each other before any code is written — the rsc-sdd pre-implementation gate. Reports coverage gaps, contradictions, duplication, ambiguity and scope drift; edits nothing. NOT the task breakdown (that is `tasks`), NOT the coding (that is `implement`), NOT the post-code test gate (that is `verify`), NOT resolving ambiguity (that is `clarify`).
ericrisco · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add ericrisco/rsc-harness --skill analyze技能说明
name: analyze
description: "Use when constitution, spec, plan and tasks all exist and you want them cross-read against each other before any code is written — the rsc-sdd pre-implementation gate. Reports coverage gaps, contradictions, duplication, ambiguity and scope drift; edits nothing. NOT the task breakdown (that is tasks), NOT the coding (that is implement), NOT the post-code test gate (that is verify), NOT resolving ambiguity (that is clarify)."
tags: [sdd, analyze, consistency]
recommends: [implement]
profiles: [core, full]
origin: risco
Analyze — the pre-implementation consistency gate
You have a constitution, a spec, a plan and a task list. Four artifacts written at four different moments, by a mind that drifted a little each time. analyze reads all four against each other and surfaces where they disagree. It is the cheapest place in the whole chain to catch a problem — a contradiction found here costs a sentence; the same contradiction found mid-implement costs a rewrite.
Sixth phase of the rsc-sdd chain (constitution → specify → clarify → plan → tasks → analyze → implement); the method itself lives in ../sdd/SKILL.md. It is a gate, not a worker: it produces a report and stops. The user reads the findings and decides what to fix, and which phase to send each fix back to.
Report only. Resolve nothing. Never edit the constitution, spec, plan or tasks; never open a code file to "just fix it"; never silently reconcile a contradiction by picking a side. This one is absolute because a gate that quietly fixes things stops being a gate: the user never learns the spec was wrong, the plan built on the old assumption stays stale, and the "consistency check" has manufactured a new inconsistency. Name the conflict, show both sides with locations, propose where it should be resolved, hand the decision back.
Model tier: heavy (adversarial cross-reading). Resolve and apply it per ../sdd/references/model-routing.md; routing is off unless models.enabled: true in 02-DOCS/wiki/sdd/config.yaml.
Accompaniment dial. Read 02-DOCS/wiki/harness/user-profile.md before reporting — default to L2 and say the harness has not gauged the user yet if there is no profile. The dial flexes how the report reads, never what gets checked; the six analyses always run in full.
| Dial | The report renders as |
|---|---|
| L0 | Finding table only: severity, the two artifacts, the conflict in one line. No prose. |
| L1 | + a one-line why it matters per CRITICAL/HIGH finding. |
| L2 | + per finding, the recommended resolution phase and the trade-off of leaving it. |
| L3 | + full walk-through: quote both sides, explain the consequence at implement time in plain language, lay out the options so a non-technical user can choose. |
Inputs — locate the four artifacts
Read all four before analyzing. The rsc-sdd artifacts live under 02-DOCS/wiki/sdd/, indexed from 02-DOCS/wiki/index.md (the Knowledge map; root CLAUDE.md keeps only a short pointer to it):
| Artifact | Canonical location | Role in the check |
|---|---|---|
| Constitution | 02-DOCS/wiki/sdd/constitution.md | The non-negotiables. Everything below must obey it. |
| Spec | 02-DOCS/wiki/sdd/specs/<slug>.md | WHAT & WHY. The source of truth for requirements. |
| Plan | 02-DOCS/wiki/sdd/plans/<slug>.md | HOW. Must cover every spec requirement, add nothing the spec didn't ask for. |
| Tasks | task list inside the plan artifact | The ordered, verifiable steps. Must implement the plan, no more. |
If any artifact is missing, stop and say so — analyze cannot gate what isn't there. Name the missing one and the phase that produces it. If a <slug> is ambiguous (several specs), ask which feature is being gated; do not analyze all of them blindly.
The six analyses
Run every one. Each compares a specific pair (or the whole set against the constitution) and emits findings.
- Constitution compliance — does any spec requirement, plan decision or task violate a non-negotiable (stack canon, quality bar, convention)? A constitution breach is the highest-severity finding there is; the constitution wins by definition.
- Requirement coverage (spec → plan → tasks) — map every spec requirement forward. Each must trace to at least one plan section and at least one task. A requirement with no task is a gap (it will silently not ship). Build the coverage map below.
- Scope drift (tasks/plan → spec) — map backward. Any plan section or task that satisfies no spec requirement is drift — work the spec never asked for. Flag it; the fix is either cut the work or amend the spec, and that is the user's call.
- Contradiction — direct disagreements between two artifacts: the spec says Postgres, the plan says SQLite; the spec says "no auth in v1", a task adds login. Quote both sides.
- Duplication — the same requirement stated twice in conflicting words, or two tasks doing the same job. Duplication is where contradictions breed later.
- Ambiguity / underspecification — requirements or tasks too vague to implement or to verify ("handle errors gracefully", "make it fast" with no number, a task with no done-check). These do not block by themselves but feed back to
clarify(spec) ortasks(missing done-check).- Carrier completeness (isolated-implementer check). Because
implement/paralleldispatch tasks to context-isolateddevelopersubagents that see only their own task, also confirm the plan carries a §0 Global Constraints block (verbatim project-wide values) and that every task whose correctness depends on a contract it doesn't own has an Interfaces block (Consumes/Produces, exact signatures). A constraint or neighbor-signature that lives only in prose is invisible to the blind worker — flag a missing carrier asAMBIGUOUS(it will surface as drift or breakage at implement time). See `../plan/references/plan-templat
- Carrier completeness (isolated-implementer check). Because