ai-workflow-init 6.6.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/clarify-requirements.md +5 -3
- package/.claude/commands/create-plan.md +80 -70
- package/.claude/commands/execute-plan.md +3 -44
- package/.claude/commands/manage-epic.md +227 -0
- package/README.md +4 -88
- package/docs/ai/planning/epic-template.md +16 -125
- package/docs/ai/planning/feature-template.md +62 -26
- package/docs/ai/requirements/req-template.md +2 -1
- package/package.json +1 -1
- package/.claude/commands/beads-breakdown.md +0 -278
- package/.claude/commands/beads-create-epic-plan.md +0 -205
- package/.claude/commands/beads-done.md +0 -248
- package/.claude/commands/beads-next.md +0 -260
- package/.claude/commands/beads-status.md +0 -247
- package/.claude/commands/init-chat.md +0 -38
- package/.claude/commands/modify-plan.md +0 -208
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: beads-status
|
|
3
|
-
description: Shows epic progress overview with task status, dependencies, and metrics.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Display a comprehensive overview of the current epic's progress, including task status, dependency graph, and completion metrics.
|
|
9
|
-
|
|
10
|
-
## Workflow Alignment
|
|
11
|
-
|
|
12
|
-
- Provide clear, visual progress reporting.
|
|
13
|
-
- Show actionable information (what's ready, what's blocked).
|
|
14
|
-
- Quick command for status checks without claiming tasks.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Step 1: Determine Which Epic to Show
|
|
19
|
-
|
|
20
|
-
### Option A: Current Epic Context Exists
|
|
21
|
-
|
|
22
|
-
**Read:** `.beads/current-epic.json`
|
|
23
|
-
|
|
24
|
-
If exists:
|
|
25
|
-
- Use epic_id from context
|
|
26
|
-
- Proceed to Step 2
|
|
27
|
-
|
|
28
|
-
### Option B: No Current Context
|
|
29
|
-
|
|
30
|
-
**Run:** `bd list --type epic --json`
|
|
31
|
-
|
|
32
|
-
If single epic exists:
|
|
33
|
-
- Use that epic automatically
|
|
34
|
-
|
|
35
|
-
If multiple epics exist:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
AskUserQuestion(questions=[{
|
|
39
|
-
question: "Which epic would you like to see status for?",
|
|
40
|
-
header: "Select Epic",
|
|
41
|
-
options: [
|
|
42
|
-
{ label: "{epic-1-id}: {title}", description: "{X}/{Y} tasks complete" },
|
|
43
|
-
{ label: "{epic-2-id}: {title}", description: "{X}/{Y} tasks complete" },
|
|
44
|
-
{ label: "Show all epics", description: "Overview of all epics" }
|
|
45
|
-
],
|
|
46
|
-
multiSelect: false
|
|
47
|
-
}])
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If no epics exist:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
No epics found.
|
|
54
|
-
|
|
55
|
-
To create an epic:
|
|
56
|
-
/beads-breakdown "feature description"
|
|
57
|
-
/beads-breakdown @docs/ai/requirements/req-xxx.md
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Step 2: Load Epic Data
|
|
63
|
-
|
|
64
|
-
### 2a: Get Epic Details
|
|
65
|
-
|
|
66
|
-
**Run:** `bd show {epic-id} --json`
|
|
67
|
-
|
|
68
|
-
Extract:
|
|
69
|
-
- Epic title, description
|
|
70
|
-
- Creation date
|
|
71
|
-
- Total tasks count
|
|
72
|
-
|
|
73
|
-
### 2b: Get All Tasks
|
|
74
|
-
|
|
75
|
-
**Run:** `bd list --parent {epic-id} --json`
|
|
76
|
-
|
|
77
|
-
For each task, extract:
|
|
78
|
-
- Task ID, title, priority
|
|
79
|
-
- Status (open, in_progress, closed)
|
|
80
|
-
- Blocked by (dependencies)
|
|
81
|
-
- Assignee (if any)
|
|
82
|
-
|
|
83
|
-
### 2c: Load Epic Plan (if exists)
|
|
84
|
-
|
|
85
|
-
**Read:** `docs/ai/planning/epic-{name}.md`
|
|
86
|
-
|
|
87
|
-
If exists:
|
|
88
|
-
- Extract task-to-plan-doc mapping from Task Breakdown table
|
|
89
|
-
- Note any architectural updates
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Step 3: Calculate Metrics
|
|
94
|
-
|
|
95
|
-
```javascript
|
|
96
|
-
// Metrics calculation
|
|
97
|
-
const total = tasks.length;
|
|
98
|
-
const closed = tasks.filter(t => t.status === 'closed').length;
|
|
99
|
-
const inProgress = tasks.filter(t => t.status === 'in_progress').length;
|
|
100
|
-
const open = tasks.filter(t => t.status === 'open').length;
|
|
101
|
-
const ready = tasks.filter(t => t.status === 'open' && t.blockedBy.length === 0).length;
|
|
102
|
-
const blocked = tasks.filter(t => t.status === 'open' && t.blockedBy.length > 0).length;
|
|
103
|
-
|
|
104
|
-
const completionPercent = Math.round((closed / total) * 100);
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Step 4: Display Status Report
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
═══════════════════════════════════════════════════════════════════
|
|
113
|
-
EPIC STATUS: {epic-id}
|
|
114
|
-
═══════════════════════════════════════════════════════════════════
|
|
115
|
-
|
|
116
|
-
📋 {Epic Title}
|
|
117
|
-
|
|
118
|
-
{If epic plan exists:}
|
|
119
|
-
📄 Epic Plan: docs/ai/planning/epic-{name}.md
|
|
120
|
-
{If requirement exists:}
|
|
121
|
-
📝 Requirement: docs/ai/requirements/req-{name}.md
|
|
122
|
-
|
|
123
|
-
───────────────────────────────────────────────────────────────────
|
|
124
|
-
PROGRESS
|
|
125
|
-
───────────────────────────────────────────────────────────────────
|
|
126
|
-
|
|
127
|
-
[████████████░░░░░░░░] {completionPercent}% Complete
|
|
128
|
-
|
|
129
|
-
✅ Completed: {closed}/{total} tasks
|
|
130
|
-
🔄 In Progress: {inProgress} tasks
|
|
131
|
-
📋 Open: {open} tasks
|
|
132
|
-
├─ Ready: {ready} tasks
|
|
133
|
-
└─ Blocked: {blocked} tasks
|
|
134
|
-
|
|
135
|
-
───────────────────────────────────────────────────────────────────
|
|
136
|
-
TASK LIST
|
|
137
|
-
───────────────────────────────────────────────────────────────────
|
|
138
|
-
|
|
139
|
-
{Group by status:}
|
|
140
|
-
|
|
141
|
-
✅ COMPLETED ({closed})
|
|
142
|
-
{For each closed task:}
|
|
143
|
-
✓ {task-id} "{title}"
|
|
144
|
-
└─ Plan: {plan-doc or "N/A"}
|
|
145
|
-
|
|
146
|
-
🔄 IN PROGRESS ({inProgress})
|
|
147
|
-
{For each in_progress task:}
|
|
148
|
-
→ {task-id} "{title}" (P{n})
|
|
149
|
-
├─ Plan: {plan-doc or "Not created"}
|
|
150
|
-
└─ Blocks: {list of dependent tasks or "None"}
|
|
151
|
-
|
|
152
|
-
📋 READY ({ready})
|
|
153
|
-
{For each ready task:}
|
|
154
|
-
○ {task-id} "{title}" (P{n})
|
|
155
|
-
|
|
156
|
-
🚫 BLOCKED ({blocked})
|
|
157
|
-
{For each blocked task:}
|
|
158
|
-
✗ {task-id} "{title}" (P{n})
|
|
159
|
-
└─ Waiting for: {blocker-id} "{blocker-title}"
|
|
160
|
-
|
|
161
|
-
───────────────────────────────────────────────────────────────────
|
|
162
|
-
DEPENDENCY GRAPH
|
|
163
|
-
───────────────────────────────────────────────────────────────────
|
|
164
|
-
|
|
165
|
-
{ASCII dependency graph}
|
|
166
|
-
|
|
167
|
-
✅ = completed, → = in_progress, ○ = ready, ✗ = blocked
|
|
168
|
-
|
|
169
|
-
Example:
|
|
170
|
-
✅ bd-auth.1 ──────────────────────┐
|
|
171
|
-
▼
|
|
172
|
-
○ bd-auth.3 ───▶ → bd-auth.2 ───▶ ✗ bd-auth.4
|
|
173
|
-
│
|
|
174
|
-
└──────▶ ✗ bd-auth.5
|
|
175
|
-
|
|
176
|
-
───────────────────────────────────────────────────────────────────
|
|
177
|
-
NEXT ACTIONS
|
|
178
|
-
───────────────────────────────────────────────────────────────────
|
|
179
|
-
|
|
180
|
-
{Based on current state:}
|
|
181
|
-
|
|
182
|
-
{If in_progress exists:}
|
|
183
|
-
Continue current work:
|
|
184
|
-
/execute-plan → Resume {in-progress-task-id}
|
|
185
|
-
/beads-done → Complete {in-progress-task-id}
|
|
186
|
-
|
|
187
|
-
{If ready tasks exist:}
|
|
188
|
-
Start new task:
|
|
189
|
-
/beads-next → Claim from {ready} ready tasks
|
|
190
|
-
|
|
191
|
-
{If all blocked:}
|
|
192
|
-
Unblock tasks:
|
|
193
|
-
Review blocked tasks and their dependencies
|
|
194
|
-
Complete blocking tasks first
|
|
195
|
-
|
|
196
|
-
{If all complete:}
|
|
197
|
-
🎉 Epic complete! Close with:
|
|
198
|
-
bd close {epic-id} --reason "All tasks complete"
|
|
199
|
-
|
|
200
|
-
═══════════════════════════════════════════════════════════════════
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Step 5: Optional Details
|
|
206
|
-
|
|
207
|
-
If user wants more details:
|
|
208
|
-
|
|
209
|
-
```
|
|
210
|
-
AskUserQuestion(questions=[{
|
|
211
|
-
question: "Would you like more details?",
|
|
212
|
-
header: "Details",
|
|
213
|
-
options: [
|
|
214
|
-
{ label: "View specific task", description: "Show full details of a task" },
|
|
215
|
-
{ label: "View epic plan", description: "Open the epic plan document" },
|
|
216
|
-
{ label: "Refresh status", description: "Reload latest status from Beads" },
|
|
217
|
-
{ label: "Done", description: "Exit status view" }
|
|
218
|
-
],
|
|
219
|
-
multiSelect: false
|
|
220
|
-
}])
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Notes
|
|
226
|
-
|
|
227
|
-
- **Quick overview**: Designed for fast status checks
|
|
228
|
-
- **Visual progress**: Progress bar makes completion visible at a glance
|
|
229
|
-
- **Actionable**: Always shows what can be done next
|
|
230
|
-
- **Dependency awareness**: Shows blocking relationships clearly
|
|
231
|
-
|
|
232
|
-
### Progress Bar Legend
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
[████████████░░░░░░░░] 60%
|
|
236
|
-
└── Filled = Completed
|
|
237
|
-
└── Empty = Remaining
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Status Icons
|
|
241
|
-
|
|
242
|
-
| Icon | Meaning |
|
|
243
|
-
|------|---------|
|
|
244
|
-
| ✅ / ✓ | Completed |
|
|
245
|
-
| 🔄 / → | In Progress |
|
|
246
|
-
| 📋 / ○ | Ready (open, not blocked) |
|
|
247
|
-
| 🚫 / ✗ | Blocked |
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init-chat
|
|
3
|
-
description: Initializes chat by loading and aligning to AGENTS.md project rules.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Initialize a new chat by loading and aligning to `CLAUDE.md` so the AI agent consistently follows project rules (workflow, tooling, communication, language mirroring) from the first message.
|
|
9
|
-
|
|
10
|
-
## What this command does
|
|
11
|
-
|
|
12
|
-
1. Read `CLAUDE.md` and extract the actionable rules.
|
|
13
|
-
2. Summarize responsibilities and constraints the agent must follow in this session.
|
|
14
|
-
3. Confirm language-mirroring: respond in the user's chat language; default to English if the user's language is unclear or ambiguous.
|
|
15
|
-
4. Acknowledge the 4-phase workflow and TODO discipline for future commands.
|
|
16
|
-
|
|
17
|
-
## Steps
|
|
18
|
-
|
|
19
|
-
1. Open and read `CLAUDE.md` (project root).
|
|
20
|
-
2. Read `docs/ai/project/CODE_CONVENTIONS.md` and `docs/ai/project/PROJECT_STRUCTURE.md` if they exist in the repository.
|
|
21
|
-
3. Produce a short confirmation in the chat including:
|
|
22
|
-
- Workflow alignment: Plan → Implement → Test → Review
|
|
23
|
-
- Tooling strategy: semantic search first; parallelize independent steps
|
|
24
|
-
- Communication: minimal Markdown; status updates; high-signal summaries; mirror user language (default English if unclear)
|
|
25
|
-
- Code presentation: code references for existing code; fenced blocks for new code
|
|
26
|
-
- TODO policy: create/update todos; keep only one `in_progress`
|
|
27
|
-
4. If any section is missing or unclear, ask a single concise clarification question; otherwise proceed silently in future commands.
|
|
28
|
-
|
|
29
|
-
## Output format (concise)
|
|
30
|
-
|
|
31
|
-
- Use the language of the triggering user message (mirror). If ambiguous, use English.
|
|
32
|
-
- One short paragraph confirming alignment + a 4–6 bullet checklist of the above items.
|
|
33
|
-
- No code unless strictly needed.
|
|
34
|
-
|
|
35
|
-
## Notes
|
|
36
|
-
|
|
37
|
-
- This command is idempotent—safe to re-run at the start of any chat.
|
|
38
|
-
- It does not modify existing files; it only sets expectations for subsequent commands.
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: modify-plan
|
|
3
|
-
description: Modify plan and code after implementation; support revert or apply new approach.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Modify a feature plan after partial/full implementation. Support reverting to a previous git state or applying new requirement changes with both code and documentation sync.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
- Feature name (kebab-case, e.g., `user-authentication`)
|
|
13
|
-
- Planning doc exists: `docs/ai/planning/feature-{name}.md`
|
|
14
|
-
- Git repo initialized (for tracking code state)
|
|
15
|
-
|
|
16
|
-
## Workflow Alignment
|
|
17
|
-
|
|
18
|
-
- Provide brief status updates (1–3 sentences) before/after important actions.
|
|
19
|
-
- Update planning doc when making changes.
|
|
20
|
-
- Do NOT auto-commit; user reviews all changes before pushing.
|
|
21
|
-
|
|
22
|
-
## Step 1: Load Current State
|
|
23
|
-
|
|
24
|
-
Ask for feature name (must be kebab-case).
|
|
25
|
-
|
|
26
|
-
Load and summarize:
|
|
27
|
-
|
|
28
|
-
1. **Planning doc**: Current goal, scope, implementation phases, completion status
|
|
29
|
-
|
|
30
|
-
Display summary:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
Feature: user-authentication
|
|
34
|
-
Plan: Create user login + registration endpoints
|
|
35
|
-
|
|
36
|
-
Implementation Progress:
|
|
37
|
-
- Phase 1 (Database): Complete [x]
|
|
38
|
-
Files: src/db/schema.ts
|
|
39
|
-
- Phase 2 (API Endpoints): In Progress [3/4]
|
|
40
|
-
Files: src/api/users.ts, src/api/auth.ts
|
|
41
|
-
- Phase 3 (Frontend): Not Started [ ]
|
|
42
|
-
Files: src/components/Login.tsx
|
|
43
|
-
|
|
44
|
-
Total files touched: 4
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Step 2: Scope of Change (Q&A)
|
|
48
|
-
|
|
49
|
-
Ask user what's changing:
|
|
50
|
-
|
|
51
|
-
**1. Type of modification:**
|
|
52
|
-
a) Modify goal/scope (entire plan changes)
|
|
53
|
-
b) Modify specific phase(s) (tactical change)
|
|
54
|
-
c) Revert to previous approach (git reset)
|
|
55
|
-
d) Other (describe)
|
|
56
|
-
|
|
57
|
-
**2a. If modifying goal/scope:**
|
|
58
|
-
|
|
59
|
-
- What's the new goal/scope?
|
|
60
|
-
- How does it impact existing tasks?
|
|
61
|
-
|
|
62
|
-
**2b. If modifying specific phase(s):**
|
|
63
|
-
|
|
64
|
-
- Which phase(s)? (list by name)
|
|
65
|
-
- What requirement/approach is changing?
|
|
66
|
-
|
|
67
|
-
**2c. If reverting approach:**
|
|
68
|
-
|
|
69
|
-
- Show last 5 commits; ask which to revert to
|
|
70
|
-
- Or reset to specific phase (revert all code changes after phase X)?
|
|
71
|
-
|
|
72
|
-
## Step 3: Apply Changes
|
|
73
|
-
|
|
74
|
-
### Option A: Revert to Previous Git State
|
|
75
|
-
|
|
76
|
-
If user selects revert:
|
|
77
|
-
|
|
78
|
-
1. **Identify affected files & changes**:
|
|
79
|
-
|
|
80
|
-
- Parse planning doc; list all files modified in affected phase(s)
|
|
81
|
-
- Show file list that needs reverting:
|
|
82
|
-
```
|
|
83
|
-
Files to revert (manual):
|
|
84
|
-
- src/api/users.ts (lines 45–120)
|
|
85
|
-
- src/db/schema.ts (lines 10–30)
|
|
86
|
-
- tests/api.test.ts (delete entire file)
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
2. **Manual revert guidance**:
|
|
90
|
-
|
|
91
|
-
- For MODIFIED files: show current state vs. target state (code snippets/line ranges)
|
|
92
|
-
- For DELETED files: ask user to delete manually
|
|
93
|
-
- Ask: "Ready to manually revert these files?"
|
|
94
|
-
|
|
95
|
-
3. **If user confirms**:
|
|
96
|
-
|
|
97
|
-
- User manually reverts files (copy-paste old code back, undo in IDE, etc.)
|
|
98
|
-
- Update planning doc:
|
|
99
|
-
|
|
100
|
-
- Mark affected phases/tasks `[ ]` (reset to pending)
|
|
101
|
-
- Add "Modification History" entry:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
## Modification History
|
|
105
|
-
|
|
106
|
-
### Revert [Date]: {Reason}
|
|
107
|
-
- **Reverted phases**: Phase X, Y
|
|
108
|
-
- **Reason**: [user provided]
|
|
109
|
-
- **Files manually reverted**: [list]
|
|
110
|
-
- **Affected tasks reset**: [ ] Task 1, [ ] Task 2, ...
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
4. **Result**: Docs updated; tasks reset; ready to re-implement with new approach
|
|
114
|
-
|
|
115
|
-
### Option B: Apply New Changes
|
|
116
|
-
|
|
117
|
-
If user selects new approach:
|
|
118
|
-
|
|
119
|
-
1. **Update planning doc**:
|
|
120
|
-
|
|
121
|
-
- Modify goal/scope section if changed
|
|
122
|
-
- Update affected task(s) with new approach
|
|
123
|
-
- Update pseudo-code to match new approach
|
|
124
|
-
- Add "Modification History" section:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
## Modification History
|
|
128
|
-
|
|
129
|
-
### Change [Date]: {Title}
|
|
130
|
-
- **Previous approach**: [original details]
|
|
131
|
-
- **New approach**: [new details]
|
|
132
|
-
- **Reason**: [user provided]
|
|
133
|
-
- **Affected phases**: Phase X, Y
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
2. **Update implementation phases**:
|
|
137
|
-
|
|
138
|
-
- For affected phases:
|
|
139
|
-
- Modify pseudo-code to match new approach
|
|
140
|
-
- Reset incomplete tasks `[ ]` (if approach changed significantly)
|
|
141
|
-
- Keep completed tasks as-is (do not re-implement)
|
|
142
|
-
- Update "Implementation Plan" section with new structure (files/logic outline)
|
|
143
|
-
|
|
144
|
-
3. **Show git impact**:
|
|
145
|
-
- Highlight files that may need re-editing
|
|
146
|
-
- Ask: "Ready to re-implement with new approach?" (yes/no)
|
|
147
|
-
|
|
148
|
-
## Step 4: Confirmation & Audit Trail
|
|
149
|
-
|
|
150
|
-
Before finalizing, show:
|
|
151
|
-
|
|
152
|
-
1. **Updated planning doc** snippet (modified sections)
|
|
153
|
-
2. **Git state** (files that will be changed)
|
|
154
|
-
|
|
155
|
-
Ask: **"Apply changes and update doc?"** (yes/no)
|
|
156
|
-
|
|
157
|
-
If **yes**:
|
|
158
|
-
|
|
159
|
-
- Save updated planning doc
|
|
160
|
-
- If revert: `git status` shows reverted files (unstaged)
|
|
161
|
-
- If new approach: doc updated; code changes staged for review
|
|
162
|
-
|
|
163
|
-
If **no**:
|
|
164
|
-
|
|
165
|
-
- Rollback changes to doc
|
|
166
|
-
- Discard any temporary changes
|
|
167
|
-
|
|
168
|
-
## Step 5: Next Actions
|
|
169
|
-
|
|
170
|
-
**After manual revert**:
|
|
171
|
-
|
|
172
|
-
- "Docs updated. Affected tasks reset to `[ ]`. Run `/execute-plan` to re-implement Phase X with new approach."
|
|
173
|
-
|
|
174
|
-
**After apply new approach**:
|
|
175
|
-
|
|
176
|
-
- If only pseudo-code/docs changed (no code revert needed): "Continue current phase with `/execute-plan`."
|
|
177
|
-
- If code changes needed (revert old approach + implement new): "Manually update code files first, then run `/execute-plan`."
|
|
178
|
-
- "When done, run `/code-review` to validate standards."
|
|
179
|
-
|
|
180
|
-
## Important Notes
|
|
181
|
-
|
|
182
|
-
- **Manual revert**: User manually reverts code files (no git reset); AI guides the process
|
|
183
|
-
- **Multi-feature safe**: Works when implementing multiple features simultaneously (selective revert possible)
|
|
184
|
-
- **Backward compatible**: Works with both phase-based and non-phase-based planning docs
|
|
185
|
-
- **Audit trail**: "Modification History" section preserves decision rationale and affected files
|
|
186
|
-
- **Idempotent**: Safe to re-run; modification history accumulates
|
|
187
|
-
- **Safe defaults**: Asks confirmation before any changes; user always has final say
|
|
188
|
-
|
|
189
|
-
## Example Flow
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
User: I want to modify plan
|
|
193
|
-
Agent: Load state, show summary
|
|
194
|
-
|
|
195
|
-
User: Revert Phase 2 (API Endpoints) - use different auth approach
|
|
196
|
-
Agent: Identify affected files (src/api/users.ts, src/api/auth.ts)
|
|
197
|
-
Show current state vs. target state (pseudo-code + old implementation)
|
|
198
|
-
Ask: Ready to manually revert these files?
|
|
199
|
-
|
|
200
|
-
User: Yes, I'll manually revert
|
|
201
|
-
Agent: (User manually copies old code back or undoes changes in IDE)
|
|
202
|
-
Update planning doc:
|
|
203
|
-
- Mark Phase 2 tasks [ ] (reset)
|
|
204
|
-
- Add Modification History: Phase 2 reverted, reason: better auth strategy
|
|
205
|
-
|
|
206
|
-
Agent: Phase 2 reset. Ready to re-implement with new auth approach?
|
|
207
|
-
Run: /execute-plan
|
|
208
|
-
```
|