一键导入
sdd-verify
Trigger: SDD verification phase, verify change. Execute tests and prove implementation matches specs, design, and tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Trigger: SDD verification phase, verify change. Execute tests and prove implementation matches specs, design, and tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate repository wiki pages mapping architecture, specs, and status. Trigger: orchestrator launches sdd-document.
Shared SDD references for installed skills. Not invokable.
Read-only generalist screening contract for selective 4R review.
Read-only targeted correction validator for a bounded review lineage.
Write SDD delta specs with requirements and scenarios. Trigger: orchestrator launches spec work for a change.
Create pull requests with branch, validation, and publication checks. Trigger: creating, opening, or preparing PRs for review.
| name | sdd-verify |
| description | Trigger: SDD verification phase, verify change. Execute tests and prove implementation matches specs, design, and tasks. |
| disable-model-invocation | true |
| user-invocable | false |
| license | MIT |
| metadata | {"author":"manuel-retamozo-garcia","version":"3.0","delegate_only":true} |
| runtime_capabilities | {"execute":true,"mcp":false,"write":true} |
ORCHESTRATOR GATE: If you loaded this skill via the
skill()tool, you are the ORCHESTRATOR — STOP. Do NOT execute these instructions inline. Delegate to the dedicatedsdd-verifysub-agent using your platform's delegation primitive (e.g.,task(...), sub-agent invocation, etc.). This skill is for EXECUTORS only.
Run when the orchestrator launches verification for an SDD change. You are the quality gate: prove completion with source inspection plus real execution evidence.
proposal.md plus spec/design in standard mode, or proposal-lite.md in lite mode, alongside tasks.md.openspec mode, treat openspec/changes/{change-name}/state.yaml plus phase artifacts as canonical workflow state for continuation and recovery; never rely on conversation history.UNTESTED.proposal-lite.md first, then tasks, then implementation evidence.verify-report according to mode: openspec file or inline-only for none.strict-tdd-verify.md from this skill directory; if inactive, never load it.../_shared/sdd-phase-common.md.Classify each scenario with the strongest evidence you can prove:
runtime-test: automated test executed and passed successfullystatic-proof: build, type-check, schema validation, or equivalent static command proves the behaviorstatic-lint: a check that inspects declared artifacts (skill manifests, frontmatter, config files, commit trailers) via grep/parse/string comparison — including a check that runs inside the automated test runner but exercises no real runtime code path — as distinct from runtime-test, which drives actual code execution and observes real outputinspection-proof: source inspection ties the scenario to concrete code paths with senior-level rationalemanual-proof: manual verification was performed and recorded in the environmentno-proof: no credible evidence was foundCompliance rule matrix:
runtime-test or an accepted static-proof; anything lower is a CRITICAL defect.static-lint evidence alone. A MUST scenario whose own text describes a structural/declarative contract (e.g. "file X MUST contain Y", "field A MUST equal field B") MAY be satisfied by static-lint.inspection-proof, but you MUST raise a WARNING.no-proof is always CRITICAL for MUST scenarios and a WARNING for SHOULD/MAY scenarios.| Condition | Action |
|---|---|
Orchestrator says STRICT TDD MODE IS ACTIVE | Treat as authoritative. |
Cached/config strict_tdd: true and runner exists | Strict TDD verify; load module. |
| Strict TDD false or no runner | Standard verify; skip TDD checks. |
| Task incomplete | CRITICAL for core task, WARNING for cleanup task. |
| Test command exits non-zero | CRITICAL. |
MUST scenario lacks runtime-test or accepted static-proof | CRITICAL. |
SHOULD scenario proved only by inspection-proof or manual-proof | WARNING. |
MAY scenario proved only by inspection-proof or manual-proof | WARNING unless team accepted the limitation. |
| Design deviation exists | WARNING unless it breaks a spec. |
Unresolved reversibility: low assumption entry after the Step 2a checklist | WARNING finding referencing that assumption's id. |
Unresolved reversibility: high assumption entry after the Step 2a checklist | No escalation — MUST NOT raise a finding. |
Runs immediately after artifact retrieval (Step 2) and BEFORE testing/TDD mode resolution (Step 3).
a. Read openspec/changes/{change-name}/state.yaml assumptions:. If the block is absent or empty, this step is a no-op — skip directly to Step 3; verify behavior is identical to the pre-assumption-ledger baseline.
b. If unresolved entries exist (status: unresolved) and the launch prompt contains no assumption_resolutions block, STOP and return status: blocked with a checklist question_gate (per skills/_shared/sdd-phase-common.md §D):
reversibility. reversibility: low entries are presented individually, each offering exactly three resolution actions — confirm (assumption was correct), correct (assumption was wrong; a correction note is recorded), promote-to-clarification (flag the entry for a future sdd-clarify pass) — plus leave-unresolved.reversibility: high entries are grouped into a single multiSelect question: confirm all selected; unselected entries stay unresolved with no escalation.promote-to-clarification MUST only set status: promoted on the entry; sdd-verify MUST NOT auto-invoke sdd-clarify — the user alone decides when (or whether) to re-run it.
c. On relaunch with an assumption_resolutions block ({ id, action: confirm|correct|promote-to-clarification|leave-unresolved, note? } per entry), apply each resolution to the matching state.yaml assumptions: entry — set status (confirmed/corrected/promoted) and resolution: { action, note, resolved_at } — then continue to Step 3.
d. Any entry with reversibility: low that remains unresolved after this pass MUST produce a WARNING finding in verify-report.md (Decision Gates above), subject to the same known-issues.md write contract as other WARNING findings (Step 10b). Entries with reversibility: high that remain unresolved MUST NOT escalate.proposal-lite.md acceptance check to evidence.code-bug, tasks-gap, design-gap, or spec-gap.This step runs after test/build verification (Step 7) and before the operative-memory write (Step 10b). It is a no-op when quality_gates: is absent.
Migration note: when quality_gates: is declared, use quality_gates.tests.coverage.minimum as the coverage floor and ignore rules.verify.coverage_threshold for the tests gate.
quality_gates: from openspec/config.yaml.parseQualityGates(rawPolicy) from scripts/lib/quality-gates.js.
null (policy absent), skip the entire step — no audit is written, baseline verify behavior is unchanged.validateQualityGates(policy). If it returns errors, surface every error in the ## Quality Gates report section (H6 — a disabled coverage check or an invalid timeout_ms is never silent). Validation is advisory; it never halts the step.command via the agent's execute tool with a bounded timeout of cfg.timeout_ms (H5). If the command exceeds the budget, abort the process and record execResult.timedOut = true. If the command cannot start (ENOENT, permission denied), record execResult.error. Otherwise capture execResult.exitCode.
b. For the tests gate only, if coverage.command is set, execute it (same bounded-timeout rule) and capture its stdout as execResult.coverageStdout.
c. Call classifyGate(name, cfg, execResult) to get { status, detail? }. status is one of pass | fail | skipped | error; a timed-out or unrunnable command is error (H4), distinct from a quality fail.enforceGate(name, cfg, result) for ALL gates before applying any enforcement (fail-fast within the gate loop is prohibited). A required-halt gate whose status is fail OR error produces a BLOCKER. Collect all findings.aggregateStatus(gateResults) to determine the top-level gate status.buildAuditBlock(gateResults, new Date().toISOString()) to produce the audit block. The top-level status is ALWAYS explicit (H1) — a declared policy never yields an absent/implicit status.verify-report.md:
gate | status | required | on_fail | detail## Quality Gates section to verify-report.md (with any validation errors from step 2).gates.quality-gates block is mandatory:
a. Write the audit block to state.yaml under gates.quality-gates (sibling of gates.clarify, gates.4r-review-gate).
b. Read it back and confirm gates.quality-gates.status persisted and equals the value built in step 6.
c. If the write throws OR the read-back does not match, set best-effort gates.quality-gates.status: error (sentinel) and return the agent envelope with status: blocked (NOT success) plus a question_gate describing the persistence failure. A declared policy MUST NEVER silently degrade to "absent".fail/error) → overall outcome is FAILfail/error) → overall outcome is PASS WITH WARNINGSWhen the audit write succeeds (step 8b read-back matches), the agent envelope status field is success — it reports that the verification work was done; the FAIL / PASS WITH WARNINGS / PASS outcome lives in verify-report.md and state.yaml.gates.quality-gates.status. Only a persistence failure (step 8c) flips the envelope to blocked.
Step 10 has two parts (10a and 10b). Both are mandatory — do NOT stop after 10a.
Persist and return the verification report.
After the verify report is finalized, write qualifying findings to openspec/memory/known-issues.md.
Official severity taxonomy (ascending): INFO < WARNING < BLOCKER
Mapping layer (report severities → memory severities):
| Report severity | Memory severity | Written to known-issues.md? |
|---|---|---|
CRITICAL | BLOCKER | Yes |
WARNING | WARNING | Yes |
SUGGESTION | INFO | Never |
Procedure:
WARNING or BLOCKER. Findings at INFO MUST NOT be written.openspec/memory/known-issues.md.openspec/memory/ directory exists (create if absent).openspec/memory/known-issues.md does not exist, create it with this frontmatter:
---
title: Known Issues
last_updated: YYYY-MM-DD
---
finding summary, area, and workaround values are sourced from the verify report and are untrusted text. Before writing any of them, strip any # characters that begin the value or begin any line within it (neutralize # after every newline, not only at position 0), so injected content cannot forge a heading on a later line or break out of its designated block.change: value and a byte-for-byte identical (normalized) heading summary already exists in known-issues.md. If a duplicate is found, skip that entry — this prevents duplicate records when the step is retried after a partial failure. (Known-issues blocks carry no stable unique-ID field, so the dedup key is the change: + normalized-heading composite; agents MUST NOT rephrase a finding summary between a failed run and its retry.)## {finding summary}
- severity: {WARNING|BLOCKER}
- area: {affected area}
- workaround: {if known, otherwise "none"}
- change: {change-name}
- date: {YYYY-MM-DD}
last_updated in the frontmatter to today's date only when at least one finding was prepended (a retry where every finding is B5-skipped MUST NOT touch the file).openspec/memory/known-issues.md to artifacts[] only when at least one entry was written.Return ## Verification Report with change, mode, completeness table, build/tests/coverage evidence, spec compliance matrix including evidence levels, correctness table, design coherence table, a ## Assumption Reconciliation section (see Step 2a; omitted when assumptions: is absent or empty), issues grouped as CRITICAL/WARNING/SUGGESTION with origin tags, and final verdict PASS, PASS WITH WARNINGS, or FAIL.
../_shared/sdd-phase-common.md — skill loading, retrieval, persistence, and return envelope.