[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XDPVDKBR376C06CEK9BC5S":3,"skill-same:01M6XDPVDKBR376C06CEK9BC5S":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":14,"repositoryHtmlUrl":67,"repositoryHomepageUrl":6,"ownerHtmlUrl":68,"ownerBlogUrl":6,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M6XDPVDKBR376C06CEK9BC5S","validate-spec",null,"Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs\u002Faudits\u002F. Use whenever the user asks to \"validate a spec\", \"audit a spec\", \"check if spec is implemented\", \"verify the spec is done\", \"is this spec really done\", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.","kaiohenricunha\u002Fdotbabel","kaiohenricunha","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69804490?v=4","01M6XCZD37W0KPCDGEA40Y610V","Kaio Cunha","01M6XCZD7SX714D114H3ZPNW09",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fvalidate-spec\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"validate spec","spec","validate","never","closure","spec-driven","2025","line","arch","done","max","only","testing","read","work","Bash","audit","acceptance","run","review","2026-11-10 10:12:30",false,"---\nid: validate-spec\nname: validate-spec\ntype: skill\nversion: 1.0.0\ndomain:\n  - devex\nplatform:\n  - none\ntask:\n  - review\n  - testing\nmaturity: validated\nowner: \"@kaiohenricunha\"\ncreated: 2025-01-01T00:00:00.000Z\nupdated: 2026-04-17T00:00:00.000Z\ndescription: |\n  Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs\u002Faudits\u002F. Use whenever the user asks to \"validate a spec\", \"audit a spec\", \"check if spec is implemented\", \"verify the spec is done\", \"is this spec really done\", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.\nargument-hint: \"[spec-id] [--no-run]\"\neffort: max\nmodel: opus\nallowed-tools: Read Grep Glob Bash\ndotbabel:\n  compute:\n    mode: floor\n    requirement: frontier\n    binding: consumer\n---\n\n# Validate Spec — Implementation Audit\n\nAudit an implemented `\u002Fspec`-format spec against the codebase. Walk every tagged\nconstraint, ground each one in file:line evidence, execute the acceptance\ncommands, and emit a single audit document. The spec itself is never modified —\nthe audit doc is the only artifact this skill writes.\n\nThis skill is the closing-the-loop partner for `\u002Fspec`. `\u002Fspec` builds the\nspecification; `validate-spec` proves whether it actually got built.\n\n## Arguments\n\n- `$0` — spec id (the directory name under `docs\u002Fspecs\u002F`). If not provided, list candidate spec ids found under `docs\u002Fspecs\u002F` and ask the user.\n- `--no-run` — skip Phase 4 (acceptance command execution). Useful for fast structural+evidence audits when tests are slow or require external services.\n\n## Workflow Overview\n\nFive phases, each gated. Do not skip ahead. If a phase fails fatally (e.g. spec\nnot found, wrong format), stop with a clear message — partial audits mislead.\n\nThe reasoning behind the structure: a spec is a set of _claims_ (constraints,\nacceptance criteria, key decisions). An audit checks each claim against\n_evidence_ (code, tests, runtime behavior). If you skip phases, you're guessing,\nnot auditing.\n\n---\n\n### Phase 1 — Locate & Validate Format\n\n1. **Resolve spec id.** Use `$0` if given. Otherwise list directories under `docs\u002Fspecs\u002F` (search the project root walking up from cwd) and ask the user which one to validate.\n\n2. **Locate the spec directory.** Look for `docs\u002Fspecs\u002F\u003Cspec-id>\u002F` starting from cwd, walking up to find the project root (the directory containing `docs\u002Fspecs\u002F`).\n\n3. **Report whether the spec declares `acceptance_criteria`.** If `spec.json`\n   has no `acceptance_criteria` array, record an **INFO** finding: the field is\n   optional in the schema, so a spec written before it existed is not\n   malformed — but its claims are prose only, and nothing machine-checkable\n   backs them. Say so in the audit rather than letting the absence pass\n   unremarked. Never escalate this to a failure.\n\n4. **Confirm the multi-file `\u002Fspec` layout.** Required files:\n   - `spec.json`\n   - `README.md`\n   - `spec\u002F1-problem-motivation.md`\n   - `spec\u002F2-scope.md`\n   - `spec\u002F3-high-level-architecture.md`\n   - `spec\u002F4-data-flow-components.md`\n   - `spec\u002F5-interfaces-apis.md`\n   - `spec\u002F6-implementation-plan.md`\n   - `spec\u002F7-non-functional-requirements.md`\n   - `spec\u002F8-risks-alternatives.md`\n   - `research\u002Fsources.md`\n\n   If any are missing, **abort** with:\n\n   > This skill validates only the structured `\u002Fspec` format (8 sections + spec.json). The directory `\u003Cpath>` is missing: `\u003Clist>`. For ad-hoc or single-file specs, run `\u002Fcreate-audit` with the spec file as input instead.\n\n5. **Read everything into context.** `spec.json`, `README.md`, all 8 section files, `research\u002Fsources.md`, and `current-state\u002Fanalysis.md` if present (brownfield).\n\n---\n\n### Phase 2 — Structural & Metadata Audit\n\nVerify the spec itself is well-formed before going code-hunting. Findings here\nare **INFO** unless they break downstream phases.\n\n1. **`spec.json` schema:**\n   - Required fields present and non-empty: `id`, `title`, `status`, `owners`, `linked_paths`, `acceptance_commands`, `depends_on_specs`, `active_prs`.\n   - `id` matches the directory name.\n   - `status` is one of: `drafting`, `review`, `approved`, `implementing`, `done`, `superseded`.\n   - `linked_paths`, `acceptance_commands`, `depends_on_specs`, `active_prs` are arrays (may be empty for the latter two).\n\n2. **`linked_paths` resolution.** Each entry is a glob. For each, expand via `git ls-files` (or filesystem walk if not a git repo) and confirm at least one match exists. List unresolved globs as **WARNING**.\n\n3. **`depends_on_specs` resolution.** Each entry must point to another `docs\u002Fspecs\u002F\u003Cdep>\u002Fspec.json` that exists. Missing dependencies are **WARNING**.\n\n4. **README consistency.** Parse the status table in `README.md`. For each row, compare the marker (`[ ] empty`, `[~] in-progress`, `[x] done`) against the matching `spec\u002F\u003Cn>-*.md` file. A `[x] done` row whose section file is empty or scaffold-only is **INFO** (doc drift, not blocking).\n\n5. **DOC-N round-trip.** Grep `research\u002Fsources.md` for `\\bDOC-\\d+\\b` to build the catalog. Then grep all section files for `\\bDOC-\\d+\\b` references. Flag both directions:\n   - `DOC-N` referenced in a section but not defined in `sources.md` → **WARNING**.\n   - `DOC-N` defined in `sources.md` but never cited → **INFO**.\n\n---\n\n### Phase 3 — Constraint Evidence Audit\n\nThis is the audit's substance. The spec makes claims via tagged constraints; this\nphase checks whether the codebase actually delivers each one. The discipline is\nthe same as `\u002Fground-first`: every verdict cites `file:line`, never \"probably\"\nor \"should be\".\n\n1. **Build the constraint inventory.** Grep all section files for the pattern `\\b(ARCH|IMPL|TEST|PERF|REL|OPS|SEC|KD|R|A)-\\d+\\b`. For each match, record:\n   - the constraint id\n   - the section it's defined in (where the row introduces it, not just mentions it)\n   - the constraint text (the row content for table-defined constraints, or the surrounding paragraph for prose-defined constraints)\n\n2. **Search for evidence per constraint.** For each constraint, search the `linked_paths` files first (highest signal), then the broader repo if nothing found. Look for:\n   - **Direct traceability:** the literal constraint id (`PERF-2`, `KD-7`) in a code comment, test name, or commit message. This is the strongest evidence.\n   - **Behavioral evidence:** function names, log fields, metric names, error codes, env vars, config keys, or test descriptions that the constraint text mentions explicitly.\n   - **Test evidence:** test files that name the constraint or its behavior.\n\n3. **Classify each constraint:**\n   - **Implemented** — at least one direct or behavioral citation, with `file:line`.\n   - **Partial** — some evidence but the constraint has multiple parts and only some are covered (cite what was found, name what's missing).\n   - **Unverified** — no evidence found in `linked_paths` or the wider repo. Do not guess. Unverified is a legitimate verdict — that's what the audit is for.\n   - **N\u002FA** — the spec explicitly defers it (e.g. \"Out of scope for v1\" in the constraint row, or `R-N` risks classified as \"accepted, no mitigation\").\n\n4. **§6 Implementation Plan extra checks.** Per the `\u002Fspec` convention (see `references\u002Fcc-prompt-templates.md` in the spec skill), prompt blocks under §6.3 should each contain:\n   - A `\u003Cread-first>` block listing source files,\n   - Test names (TDD-first),\n   - A `\u003Cverify>` block.\n\n   Flag prompt blocks missing any of the three as **INFO** (process drift, not implementation failure).\n\n5. **§8 Risks audit.** For each `R-N` row, check whether the `Mitigation` column points to anything in the codebase (a guard, a test, a runbook). Risks with empty mitigations are **INFO** unless `Likelihood`+`Impact` are both High → **WARNING**.\n\n---\n\n### Phase 4 — Acceptance Command Execution\n\nThe `acceptance_commands` array in `spec.json` is the spec's executable\nground truth. Run them.\n\n**Skip this phase entirely if `--no-run` was passed.** Record the commands as \"not executed in this run\" in the audit and proceed to Phase 5.\n\n1. **For each command in `spec.json.acceptance_commands`:**\n   - Run it from the project root.\n   - Capture exit code, last 30 lines of stdout, last 30 lines of stderr.\n   - Record duration.\n\n2. **Verify the acceptance criteria**, when the spec declares any:\n\n   ```bash\n   dotbabel criteria verify --spec \u003Cspec-id> --json\n   ```\n\n   `\u003Cspec-id>` is the directory name resolved in Phase 1 — it must match an\n   existing entry under `docs\u002Fspecs\u002F`. If it does not, stop rather than pass an\n   unverified string to a command line.\n\n   `--json` is not optional here. When every criterion is still `planned` the\n   command short-circuits, prints no per-criterion lines on stdout, and exits\n   0 — which is exactly the shape of a freshly scaffolded spec, so without\n   `--json` there is nothing to record.\n\n   This belongs here, beside the acceptance commands, because both are the\n   spec's executable ground truth. An audit that ran only the commands could\n   report a spec as implemented while the criteria naming its tests fail.\n\n   Record each criterion's verdict in the audit by id. The tool emits one of\n   five, and **`planned` is not among them** — a criterion declared `planned`\n   in `spec.json` is reported as **`pending`**:\n\n   | Verdict       | Meaning                                                   | Audit                                                          |\n   | ------------- | --------------------------------------------------------- | -------------------------------------------------------------- |\n   | `pass`        | ran, and every named test was confirmed                   | OK                                                             |\n   | `pending`     | declared `planned`; its tests have not landed yet         | INFO, not a failure                                            |\n   | `fail`        | ran and a named test failed                               | **CRITICAL** — the spec asserts what its own tests contradict  |\n   | `unconfirmed` | ran, but a declared test name was not found in the report | **CRITICAL** — usually a paraphrased name; the lookup is exact |\n   | `error`       | could not run: spawn failure, timeout, unreadable report  | INFO, blocked — an environment problem, not a spec problem     |\n\n   **Exit 2 is the environment, not the spec.** Criteria plans require trust,\n   and trust is granted per realpath, so a spec audited from a fresh worktree\n   exits 2 with no verdicts at all. Record that as blocked, label no criterion\n   failed, and re-run after trusting the path.\n\n   **Never resolve a failing criterion by editing the criterion.** This skill\n   audits a spec against the code; rewriting the claim to match broken code\n   inverts that, and the audit would then certify exactly the drift it exists\n   to catch.\n\n3. **On any failure, prove pre-existing vs. introduced.** This is non-negotiable per the user's CLAUDE.md test discipline — never assert \"pre-existing\" without proof. The required check:\n\n   ```bash\n   git stash --include-untracked\n   \u003Cfailing-command>\n   STASHED_EXIT=$?\n   git stash pop\n   ```\n\n   - If `STASHED_EXIT` is also non-zero → label the failure **pre-existing** (recorded as **WARNING**, not **CRITICAL**, since not the spec's fault but worth flagging).\n   - If `STASHED_EXIT` is zero → label the failure **introduced** (recorded as **CRITICAL** — the spec implementation broke this command).\n   - If there is nothing to stash (clean working tree), the failure is in committed code — label **pre-existing**.\n\n4. **Always restore working state.** `git stash pop` after every stash. If `git stash pop` errors (e.g. conflicts), stop the entire skill, surface the situation to the user, and do not write the audit. Losing user work is worse than missing the audit.\n\n---\n\n### Phase 5 — Write the Audit Doc\n\n1. **Compose the audit** using the exact template at [references\u002Faudit-template.md](references\u002Faudit-template.md). Fill every section. If a section has no findings, write \"No issues found.\" rather than omitting it — readers need to know it was checked.\n\n2. **Severity convention** (matches `\u002Fcreate-audit`):\n   - **CRITICAL** — Constraint marked \"Implemented\" or status `done`\u002F`implementing` in `spec.json` but acceptance command fails as **introduced**. Or: a CRITICAL\u002FHIGH risk has no mitigation evidence and the corresponding behavior fails.\n   - **WARNING** — `Partial` or `Unverified` constraints; pre-existing acceptance failures; unresolved `linked_paths`; missing dependency specs; missing risk mitigations on high-impact risks.\n   - **INFO** — README\u002Fsection status drift; orphan or undefined `DOC-N`; §6 prompt blocks missing `\u003Cread-first>`\u002F`\u003Cverify>`\u002Ftest names; documentation nits.\n\n3. **Filename:** `spec-\u003Cspec-id>-validation-\u003CYYYY-MM-DD>.md`, lowercase kebab-case, written to `\u003Cproject-root>\u002Fdocs\u002Faudits\u002F`. Create `docs\u002Faudits\u002F` if it doesn't exist. If a file with that name already exists from earlier today, append `-2`, `-3`, etc. — never overwrite a prior audit.\n\n4. **Do not modify the spec.** No edits to `spec.json`, `README.md`, or any section file. No staging, no committing of any file. Leave the audit as untracked. The user decides whether to commit it.\n\n5. **Report to the user**, in this exact tight form (no document dump in chat):\n\n   ```\n   Wrote: docs\u002Faudits\u002Fspec-\u003Cid>-validation-\u003Cdate>.md\n   Constraints: \u003Cimplemented>\u002F\u003Cpartial>\u002F\u003Cunverified>\u002F\u003Cn\u002Fa> (total \u003CN>)\n   Acceptance: \u003Cpass>\u002F\u003Cfail-introduced>\u002F\u003Cfail-pre-existing>\u002F\u003Cnot-run>\n   Issues: \u003Ccritical> CRITICAL · \u003Cwarning> WARNING · \u003Cinfo> INFO\n   ```\n\n   That's it. The audit doc speaks for itself.\n\n---\n\n## Key Principles\n\n1. **Evidence before claims.** Every \"Implemented\" verdict cites `file:line`. \"Unverified\" is honest; guessing is forbidden. The audit's value is in being trustworthy — a single hallucinated citation poisons the whole document.\n\n2. **Audit, don't fix.** Findings only. The user decides what to act on. If you spot a bug while auditing, log it as an issue with severity and location — do not patch it.\n\n3. **Read-only against the spec.** Never edit section files, `README.md`, or `spec.json`. Status drift between README and section files is a finding, not something to silently correct. The spec is an artifact of human + AI collaboration; \"fixing\" it without the user changes the historical record.\n\n4. **Honor the test discipline.** Pre-existing failures must be proven via `git stash`, never asserted. The user's CLAUDE.md is explicit on this and past sessions have been wrong about it. Always restore working state before moving on.\n\n5. **Tight output.** Tables over prose. No filler, no narrative throat-clearing. The audit is a working document the user opens to decide what to do next, not a report to read end-to-end. Match `\u002Fcreate-audit`'s discipline.\n\n6. **One spec at a time.** Don't try to validate multiple specs in one invocation. Each spec gets its own focused audit. Multi-spec runs encourage shallow checks and cross-contamination of evidence.\n","# Validate Spec — Implementation Audit\n\nAudit an implemented `\u002Fspec`-format spec against the codebase. Walk every tagged\nconstraint, ground each one in file:line evidence, execute the acceptance\ncommands, and emit a single audit document. The spec itself is never modified —\nthe audit doc is the only artifact this skill writes.\n\nThis skill is the closing-the-loop partner for `\u002Fspec`. `\u002Fspec` builds the\nspecification; `validate-spec` proves whether it actually got built.\n\n## Arguments\n\n- `$0` — spec id (the directory name under `docs\u002Fspecs\u002F`). If not provided, list candidate spec ids found under `docs\u002Fspecs\u002F` and ask the user.\n- `--no-run` — skip Phase 4 (acceptance command execution). Useful for fast structural+evidence audits when tests are slow or require external services.\n\n## Workflow Overview\n\nFive phases, each gated. Do not skip ahead. If a phase fails fatally (e.g. spec\nnot found, wrong format), stop with a clear message — partial audits mislead.\n\nThe reasoning behind the structure: a spec is a set of _claims_ (constraints,\nacceptance criteria, key decisions). An audit checks each claim against\n_evidence_ (code, tests, runtime behavior). If you skip phases, you're guessing,\nnot auditing.\n\n---\n\n### Phase 1 — Locate & Validate Format\n\n1. **Resolve spec id.** Use `$0` if given. Otherwise list directories under `docs\u002Fspecs\u002F` (search the project root walking up from cwd) and ask the user which one to validate.\n\n2. **Locate the spec directory.** Look for `docs\u002Fspecs\u002F\u003Cspec-id>\u002F` starting from cwd, walking up to find the project root (the directory containing `docs\u002Fspecs\u002F`).\n\n3. **Report whether the spec declares `acceptance_criteria`.** If `spec.json`\n   has no `acceptance_criteria` array, record an **INFO** finding: the field is\n   optional in the schema, so a spec written before it existed is not\n   malformed — but its claims are prose only, and nothing machine-checkable\n   backs them. Say so in the audit rather than letting the absence pass\n   unremarked. Never escalate this to a failure.\n\n4. **Confirm the multi-file `\u002Fspec` layout.** Required files:\n   - `spec.json`\n   - `README.md`\n   - `spec\u002F1-problem-motivation.md`\n   - `spec\u002F2-scope.md`\n   - `spec\u002F3-high-level-architecture.md`\n   - `spec\u002F4-data-flow-components.md`\n   - `spec\u002F5-interfaces-apis.md`\n   - `spec\u002F6-implementation-plan.md`\n   - `spec\u002F7-non-functional-requirements.md`\n   - `spec\u002F8-risks-alternatives.md`\n   - `research\u002Fsources.md`\n\n   If any are missing, **abort** with:\n\n   > This skill validates only the structured `\u002Fspec` format (8 sections + spec.json). The directory `\u003Cpath>` is missing: `\u003Clist>`. For ad-hoc or single-file specs, run `\u002Fcreate-audit` with the spec file as input instead.\n\n5. **Read everything into context.** `spec.json`, `README.md`, all 8 section files, `research\u002Fsources.md`, and `current-state\u002Fanalysis.md` if present (brownfield).\n\n---\n\n### Phase 2 — Structural & Metadata Audit\n\nVerify the spec itself is well-formed before going code-hunting. Findings here\nare **INFO** unless they break downstream phases.\n\n1. **`spec.json` schema:**\n   - Required fields present and non-empty: `id`, `title`, `status`, `owners`, `linked_paths`, `acceptance_commands`, `depends_on_specs`, `active_prs`.\n   - `id` matches the directory name.\n   - `status` is one of: `drafting`, `review`, `approved`, `implementing`, `done`, `superseded`.\n   - `linked_paths`, `acceptance_commands`, `depends_on_specs`, `active_prs` are arrays (may be empty for the latter two).\n\n2. **`linked_paths` resolution.** Each entry is a glob. For each, expand via `git ls-files` (or filesystem walk if not a git repo) and confirm at least one match exists. List unresolved globs as **WARNING**.\n\n3. **`depends_on_specs` resolution.** Each entry must point to another `docs\u002Fspecs\u002F\u003Cdep>\u002Fspec.json` that exists. Missing dependencies are **WARNING**.\n\n4. **README consistency.** Parse the status table in `README.md`. For each row, compare the marker (`[ ] empty`, `[~] in-progress`, `[x] done`) against the matching `spec\u002F\u003Cn>-*.md` file. A `[x] done` row whose section file is empty or scaffold-only is **INFO** (doc drift, not blocking).\n\n5. **DOC-N round-trip.** Grep `research\u002Fsources.md` for `\\bDOC-\\d+\\b` to build the catalog. Then grep all section files for `\\bDOC-\\d+\\b` references. Flag both directions:\n   - `DOC-N` referenced in a section but not defined in `sources.md` → **WARNING**.\n   - `DOC-N` defined in `sources.md` but never cited → **INFO**.\n\n---\n\n### Phase 3 — Constraint Evidence Audit\n\nThis is the audit's substance. The spec makes claims via tagged constraints; this\nphase checks whether the codebase actually delivers each one. The discipline is\nthe same as `\u002Fground-first`: every verdict cites `file:line`, never \"probably\"\nor \"should be\".\n\n1. **Build the constraint inventory.** Grep all section files for the pattern `\\b(ARCH|IMPL|TEST|PERF|REL|OPS|SEC|KD|R|A)-\\d+\\b`. For each match, record:\n   - the constraint id\n   - the section it's defined in (where the row introduces it, not just mentions it)\n   - the constraint text (the row content for table-defined constraints, or the surrounding paragraph for prose-defined constraints)\n\n2. **Search for evidence per constraint.** For each constraint, search the `linked_paths` files first (highest signal), then the broader repo if nothing found. Look for:\n   - **Direct traceability:** the literal constraint id (`PERF-2`, `KD-7`) in a code comment, test name, or commit message. This is the strongest evidence.\n   - **Behavioral evidence:** function names, log fields, metric names, error codes, env vars, config keys, or test descriptions that the constraint text mentions explicitly.\n   - **Test evidence:** test files that name the constraint or its behavior.\n\n3. **Classify each constraint:**\n   - **Implemented** — at least one direct or behavioral citation, with `file:line`.\n   - **Partial** — some evidence but the constraint has multiple parts and only some are covered (cite what was found, name what's missing).\n   - **Unverified** — no evidence found in `linked_paths` or the wider repo. Do not guess. Unverified is a legitimate verdict — that's what the audit is for.\n   - **N\u002FA** — the spec explicitly defers it (e.g. \"Out of scope for v1\" in the constraint row, or `R-N` risks classified as \"accepted, no mitigation\").\n\n4. **§6 Implementation Plan extra checks.** Per the `\u002Fspec` convention (see `references\u002Fcc-prompt-templates.md` in the spec skill), prompt blocks under §6.3 should each contain:\n   - A `\u003Cread-first>` block listing source files,\n   - Test names (TDD-first),\n   - A `\u003Cverify>` block.\n\n   Flag prompt blocks missing any of the three as **INFO** (process drift, not implementation failure).\n\n5. **§8 Risks audit.** For each `R-N` row, check whether the `Mitigation` column points to anything in the codebase (a guard, a test, a runbook). Risks with empty mitigations are **INFO** unless `Likelihood`+`Impact` are both High → **WARNING**.\n\n---\n\n### Phase 4 — Acceptance Command Execution\n\nThe `acceptance_commands` array in `spec.json` is the spec's executable\nground truth. Run them.\n\n**Skip this phase entirely if `--no-run` was passed.** Record the commands as \"not executed in this run\" in the audit and proceed to Phase 5.\n\n1. **For each command in `spec.json.acceptance_commands`:**\n   - Run it from the project root.\n   - Capture exit code, last 30 lines of stdout, last 30 lines of stderr.\n   - Record duration.\n\n2. **Verify the acceptance criteria**, when the spec declares any:\n\n   ```bash\n   dotbabel criteria verify --spec \u003Cspec-id> --json\n   ```\n\n   `\u003Cspec-id>` is the directory name resolved in Phase 1 — it must match an\n   existing entry under `docs\u002Fspecs\u002F`. If it does not, stop rather than pass an\n   unverified string to a command line.\n\n   `--json` is not optional here. When every criterion is still `planned` the\n   command short-circuits, prints no per-criterion lines on stdout, and exits\n   0 — which is exactly the shape of a freshly scaffolded spec, so without\n   `--json` there is nothing to record.\n\n   This belongs here, beside the acceptance commands, because both are the\n   spec's executable ground truth. An audit that ran only the commands could\n   report a spec as implemented while the criteria naming its tests fail.\n\n   Record each criterion's verdict in the audit by id. The tool emits one of\n   five, and **`planned` is not among them** — a criterion declared `planned`\n   in `spec.json` is reported as **`pending`**:\n\n   | Verdict       | Meaning                                                   | Audit                                                          |\n   | ------------- | --------------------------------------------------------- | -------------------------------------------------------------- |\n   | `pass`        | ran, and every named test was confirmed                   | OK                                                             |\n   | `pending`     | declared `planned`; its tests have not landed yet         | INFO, not a failure                                            |\n   | `fail`        | ran and a named test failed                               | **CRITICAL** — the spec asserts what its own tests contradict  |\n   | `unconfirmed` | ran, but a declared test name was not found in the report | **CRITICAL** — usually a paraphrased name; the lookup is exact |\n   | `error`       | could not run: spawn failure, timeout, unreadable report  | INFO, blocked — an environment problem, not a spec problem     |\n\n   **Exit 2 is the environment, not the spec.** Criteria plans require trust,\n   and trust is granted per realpath, so a spec audited from a fresh worktree\n   exits 2 with no verdicts at all. Record that as blocked, label no criterion\n   failed, and re-run after trusting the path.\n\n   **Never resolve a failing criterion by editing the criterion.** This skill\n   audits a spec against the code; rewriting the claim to match broken code\n   inverts that, and the audit would then certify exactly the drift it exists\n   to catch.\n\n3. **On any failure, prove pre-existing vs. introduced.** This is non-negotiable per the user's CLAUDE.md test discipline — never assert \"pre-existing\" without proof. The required check:\n\n   ```bash\n   git stash --include-untracked\n   \u003Cfailing-command>\n   STASHED_EXIT=$?\n   git stash pop\n   ```\n\n   - If `STASHED_EXIT` is also non-zero → label the failure **pre-existing** (recorded as **WARNING**, not **CRITICAL**, since not the spec's fault but worth flagging).\n   - If `STASHED_EXIT` is zero → label the failure **introduced** (recorded as **CRITICAL** — the spec implementation broke this command).\n   - If there is nothing to stash (clean working tree), the failure is in committed code — label **pre-existing**.\n\n4. **Always restore working state.** `git stash pop` after every stash. If `git stash pop` errors (e.g. conflicts), stop the entire skill, surface the situation to the user, and do not write the audit. Losing user work is worse than missing the audit.\n\n---\n\n### Phase 5 — Write the Audit Doc\n\n1. **Compose the audit** using the exact template at [references\u002Faudit-template.md](references\u002Faudit-template.md). Fill every section. If a section has no findings, write \"No issues found.\" rather than omitting it — readers need to know it was checked.\n\n2. **Severity convention** (matches `\u002Fcreate-audit`):\n   - **CRITICAL** — Constraint marked \"Implemented\" or status `done`\u002F`implementing` in `spec.json` but acceptance command fails as **introduced**. Or: a CRITICAL\u002FHIGH risk has no mitigation evidence and the corresponding behavior fails.\n   - **WARNING** — `Partial` or `Unverified` constraints; pre-existing acceptance failures; unresolved `linked_paths`; missing dependency specs; missing risk mitigations on high-impact risks.\n   - **INFO** — README\u002Fsection status drift; orphan or undefined `DOC-N`; §6 prompt blocks missing `\u003Cread-first>`\u002F`\u003Cverify>`\u002Ftest names; documentation nits.\n\n3. **Filename:** `spec-\u003Cspec-id>-validation-\u003CYYYY-MM-DD>.md`, lowercase kebab-case, written to `\u003Cproject-root>\u002Fdocs\u002Faudits\u002F`. Create `docs\u002Faudits\u002F` if it doesn't exist. If a file with that name already exists from earlier today, append `-2`, `-3`, etc. — never overwrite a prior audit.\n\n4. **Do not modify the spec.** No edits to `spec.json`, `README.md`, or any section file. No staging, no committing of any file. Leave the audit as untracked. The user decides whether to commit it.\n\n5. **Report to the user**, in this exact tight form (no document dump in chat):\n\n   ```\n   Wrote: docs\u002Faudits\u002Fspec-\u003Cid>-validation-\u003Cdate>.md\n   Constraints: \u003Cimplemented>\u002F\u003Cpartial>\u002F\u003Cunverified>\u002F\u003Cn\u002Fa> (total \u003CN>)\n   Acceptance: \u003Cpass>\u002F\u003Cfail-introduced>\u002F\u003Cfail-pre-existing>\u002F\u003Cnot-run>\n   Issues: \u003Ccritical> CRITICAL · \u003Cwarning> WARNING · \u003Cinfo> INFO\n   ```\n\n   That's it. The audit doc speaks for itself.\n\n---\n\n## Key Principles\n\n1. **Evidence before claims.** Every \"Implemented\" verdict cites `file:line`. \"Unverified\" is honest; guessing is forbidden. The audit's value is in being trustworthy — a single hallucinated citation poisons the whole document.\n\n2. **Audit, don't fix.** Findings only. The user decides what to act on. If you spot a bug while auditing, log it as an issue with severity and location — do not patch it.\n\n3. **Read-only against the spec.** Never edit section files, `README.md`, or `spec.json`. Status drift between README and section files is a finding, not something to silently correct. The spec is an artifact of human + AI collaboration; \"fixing\" it without the user changes the historical record.\n\n4. **Honor the test discipline.** Pre-existing failures must be proven via `git stash`, never asserted. The user's CLAUDE.md is explicit on this and past sessions have been wrong about it. Always restore working state before moving on.\n\n5. **Tight output.** Tables over prose. No filler, no narrative throat-clearing. The audit is a working document the user opens to decide what to do next, not a report to read end-to-end. Match `\u002Fcreate-audit`'s discipline.\n\n6. **One spec at a time.** Don't try to validate multiple specs in one invocation. Each spec gets its own focused audit. Multi-spec runs encourage shallow checks and cross-contamination of evidence.\n",{"id":5,"name":5,"task":44,"type":45,"model":46,"owner":47,"domain":48,"effort":29,"created":50,"updated":51,"version":52,"dotbabel":53,"maturity":58,"platform":59,"description":61,"allowed-tools":62,"argument-hint":63},[38,31],"skill","opus","@kaiohenricunha",[49],"devex",1735689600000,1776384000000,"1.0.0",{"compute":54},{"mode":55,"binding":56,"requirement":57},"floor","consumer","frontier","validated",[60],"none","Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs\u002Faudits\u002F. Use whenever the user asks to \"validate a spec\", \"audit a spec\", \"check if spec is implemented\", \"verify the spec is done\", \"is this spec really done\", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.\n","Read Grep Glob Bash","[spec-id] [--no-run]","main","91c337164997b99943fbcc64e8e362577b67bc81","skills\u002Fvalidate-spec","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha","I'm a Platform\u002FInfra engineer who happens to work in cybersec and write Go code.","2026-10-26 14:12:51",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add kaiohenricunha\u002Fdotbabel --skill validate-spec",{"tool":77,"command":78},"bunx","bunx skills add kaiohenricunha\u002Fdotbabel --skill validate-spec",{"tool":80,"command":81},"pnpm","pnpm dlx skills add kaiohenricunha\u002Fdotbabel --skill validate-spec","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fvalidate-spec\u002FSKILL.md",true,[85],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Faudit-template.md","REFERENCE","参考文档",6706,"https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fvalidate-spec\u002Freferences\u002Faudit-template.md",[92,121,151,173,196,220],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":103,"publishedAt":39},"01M6XDQ7QMASPFZ355MYKCD06T","yolo","Start temporary autonomy for the current task or an explicit scope with a required --for expiry. Codex permits scoped pushes, merges, deploys, and releases after strict testing and validation; Full access is a separate runtime setting. Claude Code uses a session permission hook with a protected-action denylist.","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fyolo\u002FSKILL.md",[98],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[94,31,104,105,106,107,108,109,110,111,112,113,114,115,49,116,117,118,119,120],"merge","code","start","access","session","ops","autonomy","releases","permission","full","runtime","scope","hook","true","action","for","scoped",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":135,"publishedAt":39},"01M6XDQ1N21VE4KH98JWGZ7GN9","veracity-audit","Audit a data pipeline for Veracity and Value. Dispatches data-scientist, compliance-auditor, and data-engineer agents with project context injected at dispatch time. All source paths are supplied via flags — no defaults, no project assumptions. Subcommands: audit (full pipeline walk), score-check (scoring math only), gate-check (gate coverage only), source-trace \u003Clabel> (single source end-to-end). Invoke when: \"audit pipeline\", \"veracity check\", \"scoring math correct?\", \"check gates\", \"trace source\", \"verify quality gates\", \"formula correct?\".","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fveracity-audit\u002FSKILL.md",[127,132],{"categoryNo":128,"categoryName":129,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":133,"categoryName":134,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000037","律师与法务",[35,136,31,38,137,138,34,139,140,30,141,142,143,144,145,146,147,148,149,150],"veracity audit","data pipeline","pipeline","math","coverage","engineer","formula","scoring","time","project","worker","end","at","invoke","when",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":160,"publishedAt":39},"01M6XDPMMECH82RAW553Y94HDS","terragrunt-specialist","Deep-dive Terragrunt hierarchy review, DRY pattern audits, and run-all orchestration analysis. Use for structured investigations of multi-environment Terragrunt layouts, dependency graphs, remote state config, and hook correctness. Triggers on: \"Terragrunt audit\", \"run-all review\", \"dependency block\", \"DRY pattern review\", \"env hierarchy audit\", \"mock_outputs\", \"terragrunt hooks\".","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fterragrunt-specialist\u002FSKILL.md",[157],{"categoryNo":158,"categoryName":159,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000011","运维与部署",[161,162,163,38,164,165,37,35,166,34,32,167,168,29,169,170,25,171,148,172],"terragrunt","specialist","terragrunt specialist","orchestration","debugging","analysis","dependency","hooks","deep","dry","remote","hierarchy",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":186,"publishedAt":39},"01M6XDPFJS2HGSE13RXF1HV8S7","terraform-specialist","Deep-dive Terraform architecture review, module design, state management, and migration. Use for structured investigations of Terraform workspaces, provider configuration, module coupling, import workflows, and test coverage. Triggers on: \"Terraform audit\", \"module review\", \"state management\", \"Terraform import\", \"workspace design\", \"provider config review\", \"Terraform testing\".","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fterraform-specialist\u002FSKILL.md",[179,182,183],{"categoryNo":180,"categoryName":181,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":158,"categoryName":159,"taxonomyType":130,"taxonomyTypeDesc":131},{"categoryNo":184,"categoryName":185,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000015","视觉设计",[187,188,162,31,189,38,190,191,192,165,35,34,32,140,193,194,169,195,25,148],"terraform","terraform specialist","design","workflows","architecture","architecture review","test coverage","workspaces","problem",{"skillNo":197,"name":20,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":205,"publishedAt":39},"01M6XDP7V6H8WYPSXVEKYE6HJ6","Create structured engineering specs through interactive pairing. Use when the user wants to create a spec, design doc, technical specification, architecture document, RFC, or engineering plan. Triggers on \"let's spec this out\", \"create a spec\", \"design doc\", \"write a technical plan\", \"plan the architecture\". Works for greenfield and brownfield projects. Outputs to docs\u002Fspecs\u002F.","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fspec\u002FSKILL.md",[201,202],{"categoryNo":184,"categoryName":185,"taxonomyType":130,"taxonomyTypeDesc":131},{"categoryNo":203,"categoryName":204,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000032","设计师",[20,189,206,191,207,208,209,210,211,212,213,214,215,46,216,119,217,218,219,57],"component","create","plan","projects","write","interactive","use","document","specification","triggers","technical specification","trade-offs","technical plan","outputs",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":227,"publishedAt":39},"01M6XDP2DCRZ004WMTWGECQC2F","smoke-test","Run the smoke checks a repository declares for its deploy targets and report whether production actually answers after a release. Use after a deploy, during release verification, and when confirming a rollback landed. Triggers on: \"smoke test\", \"run smoke checks\", \"is production healthy\", \"did the deploy work\", \"verify the release is live\".","https:\u002F\u002Fgithub.com\u002Fkaiohenricunha\u002Fdotbabel\u002Fblob\u002Fmain\u002Fskills\u002Fsmoke-test\u002FSKILL.md",[226],{"categoryNo":180,"categoryName":181,"taxonomyType":130,"taxonomyTypeDesc":131},[228,229,230,231,37,232,233,234,34,33,32,235,236,170,237,49,238,119,239,150],"test","smoke","smoke test","diagnostics","release","verification","repository","infra","live","sep","sonnet","routine"]