specrew-drift-check
Detect drift between the spec, plan, tasks, and implementation; record findings to drift-log.md before review concludes.
- License 许可
- MIT
- 最近更新
- 2026-08-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- specrew-drift-check
- domain
- lifecycle-review
- source
- Specrew governance pillar — review/closeout ceremony helper
- confidence
- high
- description
- Detect drift between the spec, plan, tasks, and implementation; record findings to drift-log.md before review concludes.
02 资源文件 1
- 其他.specrew-managed76 B
03 SKILL.md 正文
specrew-drift-check
Type: Analysis Skill
Schema: v1
Status: Active execution/review method
Purpose
Detect specification drift by comparing delivered output against the cited requirement and return a review-ready drift decision with evidence.
When to Use
- After each task completion
- During Review/Demo as the batch fallback
- Any time a reviewer or implementer suspects the output and the spec disagree
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | Task identifier for the completed work (for example T-012) |
| task_output | string/path | Yes | The deliverable or output from the completed task |
| requirement_ref | string | Yes | Requirement identifier (for example FR-003) |
| requirement_text | string | Yes | Full text of the requirement from the spec |
| spec_path | path | Yes | Path to the authoritative spec file |
| drift_log_path | path | No | Path to iterations/NNN/drift-log.md when the result should be prepared for immediate logging |
| reviewer_notes | string/array | No | Existing reviewer concerns or context that should be tested against the requirement |
Process
- Confirm the authority before judging the output:
- locate
requirement_refinspec_path - use the spec text as authoritative if
requirement_textwas copied inaccurately - extract required behavior, explicit constraints, exclusions, and deferred scope
- locate
- Gather concrete evidence from
task_output:- identify the files, commands, artifacts, or behavior that prove what was delivered
- do not return PASS based on intention or a status note alone
- Compare the delivered output to three drift questions:
- Did we omit something required?
- Did we add something not authorized?
- Did we contradict the requirement or a documented deferral?
- Classify each mismatch for reviewer clarity:
gold-plating= unauthorized added behaviorincomplete= required behavior missing or only partially deliveredviolation= delivered behavior contradicts the requirement or accepted scope boundary
- Choose a resolution path for each drift event:
spec-updatedimplementation-reverteddeferredhuman-decision
- Produce a drift-log-ready result:
- PASS: provide explicit evidence summary and say no drift event is required
- DRIFT: emit contract-aligned event data and a Markdown snippet that can be copied into
drift-log.md, includingClass closure(orNONE — <why>) - if
drift_log_pathpoints at a zero-drift placeholder log, note that the summary text must be updated when the first event is added
Outputs
| Output | Type | Description |
|---|---|---|
| verdict | enum: PASS, DRIFT | Whether drift was detected |
| evidence_summary | string | Concrete evidence used to justify the verdict |
| drift_events[] | array | List of detected drift events (empty if PASS) |
| drift_events[].type | enum: gold-plating, incomplete, violation | Type of drift |
| drift_events[].drift_id | string | Drift event identifier (for example DR-001) |
| drift_events[].detected_at | ISO datetime | When the drift was identified |
| drift_events[].task_ref | string | Task that triggered the check |
| drift_events[].requirement_ref | string | Requirement identifier for the violated or exceeded requirement |
| drift_events[].severity | enum: minor, moderate, critical | Severity level for review routing |
| drift_events[].description | string | What deviated and how |
| drift_events[].requirement_citation | string | Specific requirement text violated |
| drift_events[].resolution | enum: spec-updated, implementation-reverted, deferred, human-decision | Chosen resolution path |
| drift_events[].resolution_detail | string | What should happen next to resolve the drift |
| drift_events[].log_snippet | string | Markdown-ready snippet aligned to the drift-log contract |
| drift_events[].class_closure | string | Mechanism that makes recurrence impossible/loud, or NONE — <why> |
| drift_log_update_note | string | Guidance for updating drift-log.md summary text when needed |
Side Effects
- Intended to append or prepare entries for
iterations/NNN/drift-log.md - When the first drift event is detected, the zero-drift placeholder summary in
drift-log.mdmust be replaced with the real event count and resolution status - No side effects if verdict is PASS
Error Handling
- If
spec_pathis not found: return DRIFT with reasonspec file missing - If
requirement_refis not found in the spec: return DRIFT with reasonrequirement not in spec - If
task_outputis empty: return DRIFT with reasontask output missing evidence - If the copied
requirement_textdisagrees with the spec: continue with the spec text and reportstale requirement text supplied
Review Standard
This skill is only complete when:
- PASS results cite concrete evidence, not optimism
- DRIFT results can be copied into
drift-log.mdwithout reformatting - every drift event is traceable to both a task and an authoritative requirement citation
04 同仓库更多 Skills
windows-compatibility
Cross-platform path handling and command patterns
versioning-policy
Semver versioning rules for Squad SDK and CLI — prevents prerelease version incidents
tiered-memory
Three-tier agent memory model (hot/cold/wiki) for context reduction per spawn
test-discipline
Update tests when changing APIs — no exceptions
squad
Squad's command catalog and interactive menu. Invoke via /squad (slash command) or natural language ("squad commands", "what can squad do", "show me squad options"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.
squad-version-check
Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.