一键导入
change
Handle mid-track requirement changes. Analyzes impact on completed and pending tasks, proposes amendments to spec.md and plan.md before applying.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Handle mid-track requirement changes. Analyzes impact on completed and pending tasks, proposes amendments to spec.md and plan.md before applying.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and manage Architecture Decision Records. Documents significant technical decisions with context, alternatives, and consequences. Also supports evaluate (assess proposals) and design (system design) modes.
Performs an exhaustive 14-dimension bug hunt across the codebase using Draft context (architecture, tech-stack, product) for false-positive elimination. Generates a severity-ranked report with code evidence, data flow traces, and suggested fixes. Optionally writes regression tests. Use when the user asks to find bugs, audit code for defects, scan for vulnerabilities, or says 'hunt bugs', 'find bugs', or 'code audit'.
Compute code coverage for active track or module. Targets 95%+ coverage with report and justification for uncovered lines. Complements TDD workflow.
Structured debugging session. Reproduce, isolate, diagnose, and fix bugs using systematic investigation. Invoked by /draft:new-track for bug tracks or directly for ad-hoc debugging.
Decompose project or track into modules with dependency mapping. Project scope updates architecture.md and derives .ai-context.md. Track scope generates hld.md (always) and lld.md (when --lld or High-complexity module triggers it) — design-mandated artifacts that drive implement, deploy-checklist, and upload sign-off.
Single-module production readiness audit (ACID, resilience, observability). Use to audit one service/module end-to-end — NOT for diff/PR review (use review / quick-review) or bug-finding sweeps (use bughunt).
| name | change |
| description | Handle mid-track requirement changes. Analyzes impact on completed and pending tasks, proposes amendments to spec.md and plan.md before applying. |
You are handling a mid-track requirement change using Draft's Context-Driven Development methodology.
[x] completed tasks without flagging them explicitlyShow impact before applying. Always confirm.
ls draft/tracks.md 2>/dev/null
If draft/ does not exist: STOP — "No Draft context found. Run /draft:init first."
Extract from $ARGUMENTS:
track <id> prefix to target a specific trackIf no track <id> specified:
[~] In Progress track from draft/tracks.md[~] track, find the first [ ] Pending trackAuto-detected track: <id> - <name> before proceedingIf no change description provided:
/draft:change <description> or /draft:change track <id> <description>"draft/tracks/<id>/spec.md — extract requirements and acceptance criteriadraft/tracks/<id>/plan.md — extract all tasks with their current status ([ ], [~], [x], [!])draft/tracks/<id>/metadata.json — for track type and statusdraft/tracks/<id>/hld.md if present — extract Architecture, Detailed Design components, Dependencies, Checklist sections, and Approvals table (signed/unsigned)draft/tracks/<id>/lld.md if present — extract Classes/Interfaces, Data Model, Algorithms, Error Handling sectionsAnalyze the change description against the loaded spec, HLD, and LLD.
Code-grounded impact (Ground-Truth Discipline G1, G2, G4): Classification ("Modified", "Unaffected", etc.) must be informed by the current code, not just the prior spec text. For each requirement / AC you're about to mark Unaffected, confirm the code path it depends on still behaves as the spec claims — Read the cited file or a representative file in the affected module before stamping Unaffected. Specs and implementations drift; "spec text unchanged" ≠ "behavior unchanged."
For each requirement and acceptance criterion, classify the effect:
| Classification | Meaning |
|---|---|
| Added | New requirement or AC introduced by this change |
| Modified | Existing requirement or AC needs updating |
| Removed | Existing requirement or AC is no longer needed |
| Unaffected | No change needed |
Produce a concise impact list. Example:
Spec impact:
- AC #2 "User can export to CSV" → Modified (now also requires JSON format)
- AC #5 "Export limited to 1000 rows" → Removed (no row limit)
- NEW: AC #6 "Export progress indicator for large datasets"
HLD impact (only when hld.md exists):
LLD impact (only when lld.md exists):
Re-approval flag: If the HLD Approvals table has any signed rows (Date column populated) AND the change touches HLD structural sections (Architecture, Detailed Design, Dependencies, Checklist, IP, Deployment), surface this warning prominently:
⚠️ HLD modified after sign-off — Approvals table requires re-circulation.
Signed rows: [list which roles signed and when]
Changed sections: [list of HLD sections impacted]
Same logic applies to LLD Approvals when LLD §Classes/Interfaces, §Data Model, or §Key Algorithms change.
For each task in plan.md, determine if the spec change affects it:
[x] completed tasks that are now invalidated by the change → flag as:
⚠️ [task description] — may need rework
[ ] pending tasks that need updating → show the proposed new task text
[~] in-progress tasks that are affected → flag as:
⚠️ IN PROGRESS: [task description] — review before continuing
[!] blocked tasks that are affected → flag as:
⚠️ BLOCKED: [task description] — re-evaluate; requirement change may alter blocking condition or resolution path
Unaffected tasks — skip, do not mention
Display a clear summary before proposing any file changes:
Change: [change description]
Track: <track_id> — <track_name>
Spec impact:
- [classification] [requirement/AC]
- [classification] [requirement/AC]
Plan impact:
- ⚠️ [N] completed task(s) may need rework
- [M] pending task(s) need updating
- [K] in-progress task(s) need review
- [B] blocked task(s) need re-evaluation
Completed tasks that may need rework:
- [x] [task description] (commit: abc1234)
Pending tasks with proposed changes:
Before: - [ ] [original task text]
After: - [ ] [proposed new task text]
Display only the changed sections of each file (not full rewrites):
Show the diff as before/after for each modified section. Do not rewrite unchanged sections.
Show each task that would be modified as before/after. Do not rewrite the full plan.
Show before/after for each impacted HLD section. Preserve §Approvals table verbatim — do not modify Approvals as part of the spec amendment; re-circulation is the author's manual step. Surface a "Sections changed" list at the top of the diff so reviewers can see scope at a glance.
Show before/after for each impacted LLD section. Preserve §Approvals verbatim. Flag schema changes (Data Model) for migration consideration.
Apply these changes to spec.md and plan.md? [yes / no / edit]
yes — proceed to Step 8no — discard all proposed changes, announce "No changes applied." and stopedit — let the user describe adjustments to the proposed amendments, then revise and re-present the CHECKPOINT again. The loop continues until the user selects yes or no.Apply the agreed amendments to spec.md, plan.md, and (when impacted) hld.md / lld.md. Preserve §Approvals tables in HLD/LLD verbatim — re-approval is a manual author step, not an automated edit.
Update draft/tracks/<id>/metadata.json:
updated to current ISO timestamptasks.total by counting all - [ ], - [~], - [x], and - [!] lines in the updated plan.md. Update tasks.completed by counting only - [x] lines.Append a Change Log entry (with current git SHA (obtain via git rev-parse --short HEAD) and timestamp) to plan.md. If a ## Change Log section does not exist, add it at the bottom:
## Change Log
| Date | Description | Impact |
|------|-------------|--------|
| [ISO date] | [change description] | [N completed may need rework, M pending updated] |
Changes applied: <track_id>
Updated:
- draft/tracks/<id>/spec.md
- draft/tracks/<id>/plan.md
[when HLD impacted:]
- draft/tracks/<id>/hld.md
[when LLD impacted:]
- draft/tracks/<id>/lld.md
[If completed tasks flagged:]
⚠️ Review N completed task(s) — they may not align with the updated spec.
Re-run /draft:implement to address rework, or /draft:review to assess.
[If HLD/LLD modified after sign-off:]
⚠️ HLD/LLD modified after sign-off — re-circulate to approvers listed in §Approvals.
/draft:upload will block git upload for high-criticality tracks until re-signed.
Next: /draft:implement to continue, or /draft:review to assess current state.
Error: Track '<id>' not found.
Run /draft:status to see available tracks.
Error: No active track found.
Use: /draft:change track <id> <description>
Error: Missing spec.md or plan.md for track <id>.
Cannot perform change analysis without both files.
/draft:change the export format should support JSON in addition to CSV
/draft:change track add-export-feature also require a progress indicator for exports over 500 rows