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
|
@@ -405,8 +405,9 @@ Create `docs/ai/requirements/req-{name}.md` with:
|
|
|
405
405
|
## Next Steps
|
|
406
406
|
|
|
407
407
|
1. Review this requirement document
|
|
408
|
-
2.
|
|
409
|
-
3.
|
|
408
|
+
2. Address open questions before implementation
|
|
409
|
+
3. Run `/create-plan` to generate implementation plan (small feature)
|
|
410
|
+
4. Run `/manage-epic` to break into feature plans (large feature)
|
|
410
411
|
```
|
|
411
412
|
|
|
412
413
|
### File Naming & Versioning
|
|
@@ -457,8 +458,9 @@ AskUserQuestion(questions=[{
|
|
|
457
458
|
question: "What would you like to do next?",
|
|
458
459
|
header: "Next",
|
|
459
460
|
options: [
|
|
461
|
+
{ label: "Create plan (small feature)", description: "Run /create-plan — single feature plan" },
|
|
462
|
+
{ label: "Create epic (large feature)", description: "Run /manage-epic — break into multiple feature plans" },
|
|
460
463
|
{ label: "View full document", description: "Display the consolidated requirement" },
|
|
461
|
-
{ label: "Create plan", description: "Run /create-plan for this requirement" },
|
|
462
464
|
{ label: "Continue refining", description: "Run more Q&A or agent passes" }
|
|
463
465
|
],
|
|
464
466
|
multiSelect: false
|
|
@@ -15,51 +15,11 @@ Generate a single planning doc at `docs/ai/planning/feature-{name}.md` using the
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## Step 0: Check Beads Context (Optional Integration)
|
|
19
|
-
|
|
20
|
-
> **Purpose**: Detect if this plan is for a Beads task. If so, link to epic and inherit context.
|
|
21
|
-
|
|
22
|
-
**Read:** `.beads/current-task.json`
|
|
23
|
-
|
|
24
|
-
**If file exists (Beads workflow active):**
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{
|
|
28
|
-
"task_id": "bd-auth.1",
|
|
29
|
-
"task_title": "Setup JWT infrastructure",
|
|
30
|
-
"epic_id": "bd-auth",
|
|
31
|
-
"epic_title": "User Authentication System",
|
|
32
|
-
"epic_plan": "docs/ai/planning/epic-auth-system.md"
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Set internal flags:
|
|
37
|
-
- `BEADS_MODE = true`
|
|
38
|
-
- `beads_task = task_id`
|
|
39
|
-
- `beads_epic = epic_id`
|
|
40
|
-
- `suggested_title = task_title`
|
|
41
|
-
- `epic_plan_path = epic_plan`
|
|
42
|
-
|
|
43
|
-
**If epic_plan exists:**
|
|
44
|
-
- Read epic plan for architecture context
|
|
45
|
-
- Extract relevant sections:
|
|
46
|
-
- Architecture overview (for codebase context)
|
|
47
|
-
- Key decisions (for constraints)
|
|
48
|
-
- Data flow (for understanding)
|
|
49
|
-
- Use as additional context in Step 3 (Explore)
|
|
50
|
-
|
|
51
|
-
**If file does not exist:**
|
|
52
|
-
- `BEADS_MODE = false`
|
|
53
|
-
- Proceed with normal workflow (no Beads integration)
|
|
54
|
-
|
|
55
|
-
**Output:** Internal state set. No user-visible output for this step.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
18
|
## Step 1: Analyze User Prompt
|
|
60
19
|
|
|
61
20
|
**Parse user request to identify:**
|
|
62
21
|
- **Requirement doc reference:** Check if user provided path to `docs/ai/requirements/req-{name}.md`
|
|
22
|
+
- **Epic reference:** Check if user provided path to `docs/ai/planning/epic-{name}.md`
|
|
63
23
|
- **Feature type:** UI/Page, API/Service, Data/Database, Full-stack, Other
|
|
64
24
|
- **Explicit requirements:** Framework, libraries, constraints mentioned
|
|
65
25
|
- **Design context:**
|
|
@@ -68,6 +28,13 @@ Set internal flags:
|
|
|
68
28
|
- No design source? → Flag for Step 5 (theme selection)
|
|
69
29
|
- **Scope hints:** MVP mentions, deadlines, specific exclusions
|
|
70
30
|
|
|
31
|
+
**If Epic Reference Provided:**
|
|
32
|
+
- Read the epic doc: `Read(file_path="docs/ai/planning/epic-{name}.md")`
|
|
33
|
+
- Extract: requirement link, feature plan list, which plan to create next
|
|
34
|
+
- Read the linked requirement doc (from epic's `requirement` frontmatter)
|
|
35
|
+
- Set `epic_plan` and `requirement` frontmatter in the generated feature plan
|
|
36
|
+
- After creating the feature plan, update the epic's Feature Plans table (status → `open`)
|
|
37
|
+
|
|
71
38
|
**If Requirement Doc Provided:**
|
|
72
39
|
- Read the requirement doc: `Read(file_path="docs/ai/requirements/req-{name}.md")`
|
|
73
40
|
- Extract and map to planning sections:
|
|
@@ -285,8 +252,11 @@ Produce a Markdown doc following `docs/ai/planning/feature-template.md`.
|
|
|
285
252
|
- Epic ID and title
|
|
286
253
|
- Link to epic plan
|
|
287
254
|
|
|
288
|
-
0. **
|
|
289
|
-
- Link to requirement doc: `[req-{name}.md](../requirements/req-{name}.md)`
|
|
255
|
+
0. **Related Documents** (ONLY if requirement doc or epic was provided — skip entirely if neither exists):
|
|
256
|
+
- Link to requirement doc: `[req-{name}.md](../requirements/req-{name}.md)` (if exists)
|
|
257
|
+
- Link to epic: `[epic-{name}.md](epic-{name}.md)` (if exists)
|
|
258
|
+
- Set `epic_plan` and `requirement` in frontmatter accordingly
|
|
259
|
+
- If standalone (no req, no epic): set both frontmatter to null and **omit this section**
|
|
290
260
|
|
|
291
261
|
1. **Codebase Context** (if exploration was done):
|
|
292
262
|
- Similar features found
|
|
@@ -327,50 +297,65 @@ Produce a Markdown doc following `docs/ai/planning/feature-template.md`.
|
|
|
327
297
|
**For each phase:**
|
|
328
298
|
- Phase name: Descriptive (e.g., "API Endpoints", "UI Components")
|
|
329
299
|
- Tasks list: `[ ] [ACTION] path/to/file — Summary`
|
|
330
|
-
- Pseudo-code:
|
|
300
|
+
- Pseudo-code: Structured format with these sections:
|
|
331
301
|
```
|
|
332
302
|
Example:
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
303
|
+
Function: POST /api/auth/register(email, password, name)
|
|
304
|
+
|
|
305
|
+
Input validation:
|
|
306
|
+
- email: Valid format (regex), max 255 chars, lowercase
|
|
307
|
+
- password: Min 8 chars, 1 uppercase, 1 number, 1 special
|
|
308
|
+
- name: 2-50 chars, alphanumeric + spaces only
|
|
309
|
+
|
|
310
|
+
Logic flow:
|
|
311
|
+
1. Check if email exists in users table → If exists: return 409 Conflict
|
|
312
|
+
2. Hash password using bcrypt (salt rounds: 10)
|
|
313
|
+
3. Generate UUID for user_id
|
|
314
|
+
4. Insert into users table: { id: UUID, email, password_hash, name, created_at: NOW() }
|
|
315
|
+
5. Create JWT token with payload: { user_id, email } → Expiry: 24h, Secret: from env.JWT_SECRET
|
|
316
|
+
|
|
317
|
+
Return:
|
|
318
|
+
- Success (201): { user_id, email, name, token }
|
|
319
|
+
- Error: { status: 409/400/500, message, error_code }
|
|
320
|
+
|
|
321
|
+
Edge cases:
|
|
322
|
+
- Email already exists → 409 "Email already registered"
|
|
323
|
+
- Invalid email format → 400 "Invalid email"
|
|
324
|
+
- Weak password → 400 "Password must meet requirements"
|
|
325
|
+
- DB connection error → 500 "Registration failed, try again"
|
|
326
|
+
- Missing env.JWT_SECRET → 500 (log critical error)
|
|
327
|
+
|
|
328
|
+
Dependencies:
|
|
329
|
+
- bcrypt library (hash password)
|
|
330
|
+
- jsonwebtoken library (generate JWT)
|
|
331
|
+
- Database: users table (insert)
|
|
336
332
|
```
|
|
337
333
|
|
|
334
|
+
**Pseudo-code must include:**
|
|
335
|
+
- Function signature or endpoint route
|
|
336
|
+
- Input validation rules (types, constraints, formats)
|
|
337
|
+
- Logic flow with specific values/thresholds
|
|
338
|
+
- Return types for success + error cases
|
|
339
|
+
- Edge cases with handlers (HTTP status codes, error messages)
|
|
340
|
+
- Dependencies (external modules, APIs, DB tables)
|
|
341
|
+
|
|
338
342
|
Create the file automatically:
|
|
339
343
|
|
|
340
344
|
- `docs/ai/planning/feature-{name}.md` - Use complete structure from `feature-template.md`
|
|
341
345
|
|
|
342
|
-
**If BEADS_MODE = true:**
|
|
343
|
-
- Add frontmatter with Beads metadata:
|
|
344
|
-
```yaml
|
|
345
|
-
---
|
|
346
|
-
beads_task: {task_id}
|
|
347
|
-
beads_epic: {epic_id}
|
|
348
|
-
epic_plan: {epic_plan_path}
|
|
349
|
-
---
|
|
350
|
-
```
|
|
351
|
-
- Update Beads task with plan doc reference:
|
|
352
|
-
```bash
|
|
353
|
-
bd update {task_id} --notes "plan: docs/ai/planning/feature-{name}.md"
|
|
354
|
-
```
|
|
355
|
-
|
|
356
346
|
**Notify user:** "Created plan with X phases: [Phase 1], [Phase 2], ..."
|
|
357
347
|
|
|
358
348
|
## Step 8: Next Actions
|
|
359
349
|
|
|
360
|
-
**
|
|
350
|
+
**Suggest next command:**
|
|
351
|
+
|
|
361
352
|
```
|
|
362
353
|
✓ Created plan: docs/ai/planning/feature-{name}.md
|
|
363
|
-
✓ Linked to Beads task: {task_id}
|
|
364
354
|
|
|
365
355
|
Next steps:
|
|
366
|
-
/execute-plan → Implement this
|
|
367
|
-
/beads-status → View epic progress
|
|
356
|
+
/execute-plan → Implement this feature
|
|
368
357
|
```
|
|
369
358
|
|
|
370
|
-
**If normal mode:**
|
|
371
|
-
|
|
372
|
-
Suggest: `/execute-plan` to begin implementation.
|
|
373
|
-
|
|
374
359
|
Implementation will be driven from `docs/ai/planning/feature-{name}.md`.
|
|
375
360
|
|
|
376
361
|
Note: Test documentation will be created separately using the `writing-test` command.
|
|
@@ -385,10 +370,35 @@ Note: Test documentation will be created separately using the `writing-test` com
|
|
|
385
370
|
**Requirement Doc** (`req-template.md`) focuses on **WHAT**:
|
|
386
371
|
- Problem, Users, Business Rules, Functional Requirements
|
|
387
372
|
|
|
373
|
+
**Epic Doc** (`epic-template.md`) focuses on **TRACKING**:
|
|
374
|
+
- Links requirement to multiple feature plans
|
|
375
|
+
- Tracks status and dependencies between plans
|
|
376
|
+
|
|
388
377
|
**Planning Doc** (`feature-template.md`) focuses on **HOW**:
|
|
389
378
|
- Codebase Context, Design, Implementation Phases, Pseudo-code
|
|
390
379
|
|
|
380
|
+
### Cross-Linking Flow
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
req-{name}.md ←→ epic-{name}.md ←→ feature-{name}.md
|
|
384
|
+
(WHAT) (TRACKING) (HOW)
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**Standalone (no epic, no req):**
|
|
388
|
+
- feature-template: `requirement` → null, `epic_plan` → null
|
|
389
|
+
- **Remove** Section 0 "Related Documents" entirely
|
|
390
|
+
|
|
391
|
+
**With requirement only (no epic):**
|
|
392
|
+
- feature-template: `requirement` → req doc, `epic_plan` → null
|
|
393
|
+
- Include Section 0 with requirement link only
|
|
394
|
+
|
|
395
|
+
**With epic (and req from epic):**
|
|
396
|
+
- feature-template: `requirement` → req doc, `epic_plan` → epic doc
|
|
397
|
+
- Include Section 0 with both links
|
|
398
|
+
- After creation, update epic's Feature Plans table
|
|
399
|
+
|
|
391
400
|
When requirement doc exists, planning doc should:
|
|
392
|
-
1. Link to requirement doc (Section 0)
|
|
401
|
+
1. Link to requirement doc and epic (Section 0: Related Documents)
|
|
393
402
|
2. Not duplicate requirement content - reference it instead
|
|
394
403
|
3. Focus on technical implementation details
|
|
404
|
+
4. After creation, update epic's Feature Plans table (if epic exists)
|
|
@@ -40,36 +40,6 @@ Expected speedup: 30-40% for context loading phase.
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
## Step 0: Check Beads Context (Optional Integration)
|
|
44
|
-
|
|
45
|
-
> **Purpose**: Detect if this plan is for a Beads task. If so, track for final suggestions.
|
|
46
|
-
|
|
47
|
-
**Read:** `.beads/current-task.json`
|
|
48
|
-
|
|
49
|
-
**If file exists (Beads workflow active):**
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"task_id": "bd-auth.1",
|
|
54
|
-
"task_title": "Setup JWT infrastructure",
|
|
55
|
-
"epic_id": "bd-auth",
|
|
56
|
-
"epic_title": "User Authentication System"
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Set internal flags:
|
|
61
|
-
- `BEADS_MODE = true`
|
|
62
|
-
- `beads_task_id = task_id`
|
|
63
|
-
- `beads_task_title = task_title`
|
|
64
|
-
|
|
65
|
-
**If file does not exist:**
|
|
66
|
-
- `BEADS_MODE = false`
|
|
67
|
-
- Proceed with normal workflow (no Beads integration)
|
|
68
|
-
|
|
69
|
-
**Output:** Internal state set. No user-visible output for this step.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
43
|
## Step 1: Gather Context
|
|
74
44
|
|
|
75
45
|
**Tools:**
|
|
@@ -254,31 +224,20 @@ Only run after ALL phases are marked complete. If incomplete phases remain, skip
|
|
|
254
224
|
|
|
255
225
|
## Step 6: Next Actions
|
|
256
226
|
|
|
257
|
-
**If
|
|
227
|
+
**If all phases complete:**
|
|
258
228
|
|
|
259
229
|
```
|
|
260
|
-
✓ All phases complete
|
|
230
|
+
✓ All phases complete!
|
|
261
231
|
|
|
262
232
|
Next steps:
|
|
263
|
-
/beads-done → Close task, sync to git, see next ready tasks
|
|
264
|
-
/beads-status → View epic progress
|
|
265
|
-
|
|
266
|
-
Optional quality checks:
|
|
267
233
|
/code-review → Verify against standards
|
|
268
234
|
/writing-test → Add test coverage
|
|
269
235
|
/check-implementation → Validate alignment with plan
|
|
270
236
|
```
|
|
271
237
|
|
|
272
|
-
**If
|
|
273
|
-
|
|
274
|
-
- Suggest running `code-review` to verify against standards
|
|
275
|
-
- Suggest running `writing-test` if edge cases need coverage
|
|
276
|
-
- Suggest running `check-implementation` to validate alignment with planning entries
|
|
277
|
-
|
|
278
|
-
**If phases remain (both modes):**
|
|
238
|
+
**If phases remain:**
|
|
279
239
|
|
|
280
240
|
- User runs `/execute-plan` again; Phase detection (Step 1d) will resume correctly
|
|
281
|
-
- **If BEADS_MODE = true:** Remind user task is still in_progress in Beads
|
|
282
241
|
|
|
283
242
|
## Notes
|
|
284
243
|
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-epic
|
|
3
|
+
description: Create or update epic - tracks feature plans for a requirement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
Manage epic documents that link requirements to feature plans. An epic is a simple tracking document that lists all feature plans needed to fulfill a requirement.
|
|
9
|
+
|
|
10
|
+
**When to use:**
|
|
11
|
+
- A requirement is too large for a single feature plan
|
|
12
|
+
- You need to break a requirement into multiple feature plans
|
|
13
|
+
- You need to update an epic with new feature plans or status changes
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow Alignment
|
|
18
|
+
|
|
19
|
+
- Provide brief status updates (1–3 sentences) before/after important actions.
|
|
20
|
+
- For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
|
|
21
|
+
- Update todos immediately after progress; mark completed upon finish.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 1: Detect Mode
|
|
26
|
+
|
|
27
|
+
**Parse user input to determine mode:**
|
|
28
|
+
|
|
29
|
+
| Input | Mode | Action |
|
|
30
|
+
|-------|------|--------|
|
|
31
|
+
| Requirement doc path provided | **Create** | Create new epic from requirement |
|
|
32
|
+
| Epic doc path provided | **Update** | Update existing epic |
|
|
33
|
+
| Feature plan path + epic path | **Link** | Add feature plan to epic |
|
|
34
|
+
| No specific path | **Ask** | Ask user what they want to do |
|
|
35
|
+
|
|
36
|
+
**If unclear, ask:**
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
AskUserQuestion(questions=[{
|
|
40
|
+
question: "What would you like to do with the epic?",
|
|
41
|
+
header: "Mode",
|
|
42
|
+
options: [
|
|
43
|
+
{ label: "Create new epic", description: "Break a requirement into feature plans" },
|
|
44
|
+
{ label: "Update epic", description: "Add feature plan or update status" },
|
|
45
|
+
{ label: "Sync status", description: "Update status of all linked documents" }
|
|
46
|
+
],
|
|
47
|
+
multiSelect: false
|
|
48
|
+
}])
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 2: Create Mode
|
|
54
|
+
|
|
55
|
+
### 2a: Read Requirement
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Read(file_path="docs/ai/requirements/req-{name}.md")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Extract:
|
|
62
|
+
- Feature name
|
|
63
|
+
- Functional requirements (FR table)
|
|
64
|
+
- Implementation guidance / suggested phases
|
|
65
|
+
- Complexity level
|
|
66
|
+
|
|
67
|
+
### 2b: Break into Feature Plans
|
|
68
|
+
|
|
69
|
+
Analyze the requirement and propose how to break it into feature plans.
|
|
70
|
+
|
|
71
|
+
**Guidelines:**
|
|
72
|
+
- Each feature plan should be independently implementable
|
|
73
|
+
- Group by: feature area, layer (frontend/backend), or dependency order
|
|
74
|
+
- Aim for 2-6 feature plans per epic
|
|
75
|
+
- Each plan should map to specific FRs from the requirement
|
|
76
|
+
|
|
77
|
+
**Ask user to confirm breakdown:**
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
AskUserQuestion(questions=[{
|
|
81
|
+
question: "Here's the proposed breakdown. Does this look right?",
|
|
82
|
+
header: "Breakdown",
|
|
83
|
+
options: [
|
|
84
|
+
{ label: "Looks good", description: "Create epic with this breakdown" },
|
|
85
|
+
{ label: "Adjust", description: "I want to modify the breakdown" },
|
|
86
|
+
{ label: "Fewer plans", description: "Merge some plans together" }
|
|
87
|
+
],
|
|
88
|
+
multiSelect: false
|
|
89
|
+
}])
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 2c: Load Template & Generate Epic
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Read(file_path="docs/ai/planning/epic-template.md")
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Generate `docs/ai/planning/epic-{name}.md` with:
|
|
99
|
+
- `requirement` frontmatter pointing to the req doc
|
|
100
|
+
- Overview: 1-3 sentences from requirement's executive summary
|
|
101
|
+
- Feature Plans table: proposed feature plans with descriptions
|
|
102
|
+
- Dependency graph: show dependencies between feature plans
|
|
103
|
+
- Related Documents: link back to requirement
|
|
104
|
+
|
|
105
|
+
**Auto-name:** Derive from requirement name (kebab-case).
|
|
106
|
+
- Example: `req-user-authentication.md` → `epic-user-authentication.md`
|
|
107
|
+
|
|
108
|
+
**If file already exists:**
|
|
109
|
+
1. Backup to `docs/ai/planning/archive/epic-{name}_{timestamp}.md`
|
|
110
|
+
2. Overwrite main file
|
|
111
|
+
3. Notify user of backup
|
|
112
|
+
|
|
113
|
+
### 2d: Update Requirement Doc
|
|
114
|
+
|
|
115
|
+
After creating epic, update the requirement doc's frontmatter and Related Plans section:
|
|
116
|
+
- Set `epic_plan` in frontmatter
|
|
117
|
+
- Update Related Plans table with epic link
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Step 3: Update Mode
|
|
122
|
+
|
|
123
|
+
### 3a: Read Current Epic
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Read(file_path="docs/ai/planning/epic-{name}.md")
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 3b: Determine Update Type
|
|
130
|
+
|
|
131
|
+
| Trigger | Action |
|
|
132
|
+
|---------|--------|
|
|
133
|
+
| New feature plan created | Add row to Feature Plans table |
|
|
134
|
+
| Feature plan completed | Update status to `completed` |
|
|
135
|
+
| Feature plan started | Update status to `in_progress` |
|
|
136
|
+
| Dependency changed | Update dependency graph |
|
|
137
|
+
|
|
138
|
+
### 3c: Apply Update
|
|
139
|
+
|
|
140
|
+
Edit the epic document with the change. Keep all other content intact.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Step 4: Link Mode
|
|
145
|
+
|
|
146
|
+
When a new feature plan is created (e.g., via `/create-plan`), link it to the epic:
|
|
147
|
+
|
|
148
|
+
1. Read the epic document
|
|
149
|
+
2. Add the feature plan to the Feature Plans table
|
|
150
|
+
3. Update the feature plan's `epic_plan` frontmatter to point to the epic
|
|
151
|
+
4. Update dependency graph if needed
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 5: Sync Status
|
|
156
|
+
|
|
157
|
+
Scan all linked documents and synchronize status:
|
|
158
|
+
|
|
159
|
+
1. Read the epic document
|
|
160
|
+
2. For each feature plan in the table:
|
|
161
|
+
- Read the feature plan
|
|
162
|
+
- Check if implementation tasks are completed
|
|
163
|
+
- Update status in epic table
|
|
164
|
+
3. Update requirement doc if all feature plans are completed
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Step 6: Summary & Next Steps
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## Epic Updated
|
|
172
|
+
|
|
173
|
+
**File**: docs/ai/planning/epic-{name}.md
|
|
174
|
+
|
|
175
|
+
### Feature Plans
|
|
176
|
+
| # | Plan | Status |
|
|
177
|
+
|---|------|--------|
|
|
178
|
+
| 1 | feature-{name}-part1.md | {status} |
|
|
179
|
+
| 2 | feature-{name}-part2.md | {status} |
|
|
180
|
+
|
|
181
|
+
### Next Steps
|
|
182
|
+
- `/create-plan` → Create a feature plan listed in this epic
|
|
183
|
+
- `/execute-plan` → Implement a feature plan
|
|
184
|
+
- `/manage-epic` → Update status or add feature plans
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Cross-Linking Rules
|
|
190
|
+
|
|
191
|
+
When creating or updating documents, ensure cross-links are maintained.
|
|
192
|
+
**Only add links when they exist — never add placeholder/null links.**
|
|
193
|
+
|
|
194
|
+
### Creating Epic from Requirement (`/manage-epic`)
|
|
195
|
+
1. Epic: set `requirement` frontmatter → req doc path
|
|
196
|
+
2. Req doc: add "Related Plans" section with epic link (this section doesn't exist by default)
|
|
197
|
+
|
|
198
|
+
### Adding Feature Plan to Epic (`/create-plan` with epic context)
|
|
199
|
+
1. Epic: add row to Feature Plans table
|
|
200
|
+
2. Feature plan: set `epic_plan` frontmatter → epic path
|
|
201
|
+
3. Feature plan: set `requirement` frontmatter → req doc path (from epic)
|
|
202
|
+
4. Feature plan: include Section 0 "Related Documents" with both links
|
|
203
|
+
|
|
204
|
+
### Creating Feature Plan standalone (`/create-plan` without epic or req)
|
|
205
|
+
1. Feature plan: frontmatter `epic_plan` = null, `requirement` = null
|
|
206
|
+
2. Feature plan: **remove** Section 0 "Related Documents" entirely
|
|
207
|
+
3. No cross-linking needed
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Error Handling
|
|
212
|
+
|
|
213
|
+
| Error | Action |
|
|
214
|
+
|-------|--------|
|
|
215
|
+
| Requirement doc not found | Ask user for path or create requirement first |
|
|
216
|
+
| Epic already exists | Ask: update existing or create new (backup old) |
|
|
217
|
+
| Feature plan not found | Skip link, warn user |
|
|
218
|
+
| Template not found | Use minimal structure from this command |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Notes
|
|
223
|
+
|
|
224
|
+
- Epic is purely a tracking document — no architecture or implementation details
|
|
225
|
+
- Feature plans contain all implementation details (via `/create-plan`)
|
|
226
|
+
- Requirement doc contains all WHAT details (via `/clarify-requirements`)
|
|
227
|
+
- Epic bridges the gap: tracks WHICH feature plans implement WHICH requirement
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A standardized AI workflow system for modern AI coding assistants. Initialize st
|
|
|
6
6
|
|
|
7
7
|
- **Multi-Platform Support**: Works with Cursor, GitHub Copilot, Claude Code, OpenCode, and Factory Droid
|
|
8
8
|
- **Structured Workflows**: Plan → Implement → Test → Review methodology
|
|
9
|
-
- **
|
|
9
|
+
- **9 Pre-built Commands**: Create plans, execute tasks, run tests, code reviews, and more
|
|
10
10
|
- **7 Reusable Skills**: Design fundamentals, accessibility, theme generation, quality checks
|
|
11
11
|
- **Universal Standards**: `AGENTS.md` works across all AI tools
|
|
12
12
|
- **Smart Installation**: Protected files, selective updates, no data loss
|
|
@@ -297,80 +297,9 @@ User: /sync-workflow
|
|
|
297
297
|
|
|
298
298
|
---
|
|
299
299
|
|
|
300
|
-
## Beads Integration (Optional)
|
|
301
|
-
|
|
302
|
-
[Beads](https://github.com/steveyegge/beads) is a lightweight issue tracker with first-class dependency support. This workflow integrates seamlessly with Beads for multi-session task management.
|
|
303
|
-
|
|
304
|
-
### Setup Beads
|
|
305
|
-
|
|
306
|
-
1. **Install Beads**: Follow the official docs at https://github.com/steveyegge/beads
|
|
307
|
-
|
|
308
|
-
2. **Setup for Claude Code**:
|
|
309
|
-
```bash
|
|
310
|
-
bd setup claude
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
3. **Verify installation**:
|
|
314
|
-
```bash
|
|
315
|
-
bd doctor
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### Beads Commands
|
|
319
|
-
|
|
320
|
-
| Command | Description |
|
|
321
|
-
|---------|-------------|
|
|
322
|
-
| `/beads-breakdown` | Analyze feature → create epic with tasks and dependencies |
|
|
323
|
-
| `/beads-create-epic-plan` | Create high-level epic plan document |
|
|
324
|
-
| `/beads-next` | Show ready tasks, claim a task, set context |
|
|
325
|
-
| `/beads-done` | Close task, sync to git, show next ready tasks |
|
|
326
|
-
| `/beads-status` | Show epic progress, metrics, dependency graph |
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
300
|
## Workflow Examples
|
|
331
301
|
|
|
332
|
-
### Workflow
|
|
333
|
-
|
|
334
|
-
Best for: Large features, team collaboration, work that spans multiple sessions.
|
|
335
|
-
|
|
336
|
-
```
|
|
337
|
-
┌──────────────┐ ┌───────────────────┐ ┌─────────────┐
|
|
338
|
-
│ /beads- │ → │ /beads-create- │ → │ /beads-next │
|
|
339
|
-
│ breakdown │ │ epic-plan │ │ │
|
|
340
|
-
└──────────────┘ └───────────────────┘ └──────┬──────┘
|
|
341
|
-
│
|
|
342
|
-
┌──────────────┐ ┌───────────────────┐ ┌──────▼──────┐
|
|
343
|
-
│ /beads-done │ ← │ /execute-plan │ ← │ /create-plan│
|
|
344
|
-
│ │ │ │ │ │
|
|
345
|
-
└──────────────┘ └───────────────────┘ └─────────────┘
|
|
346
|
-
│
|
|
347
|
-
└──────→ Loop back to /beads-next for next task
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
# 1. Break down feature into epic with tasks
|
|
352
|
-
/beads-breakdown "User authentication with JWT"
|
|
353
|
-
|
|
354
|
-
# 2. Create high-level epic plan (architecture, data flow)
|
|
355
|
-
/beads-create-epic-plan
|
|
356
|
-
|
|
357
|
-
# 3. Claim a ready task
|
|
358
|
-
/beads-next
|
|
359
|
-
|
|
360
|
-
# 4. Create detailed plan for claimed task
|
|
361
|
-
/create-plan
|
|
362
|
-
|
|
363
|
-
# 5. Implement the task
|
|
364
|
-
/execute-plan jwt-infrastructure
|
|
365
|
-
|
|
366
|
-
# 6. Complete task, sync, see next ready tasks
|
|
367
|
-
/beads-done
|
|
368
|
-
|
|
369
|
-
# 7. Repeat from step 3 for remaining tasks
|
|
370
|
-
/beads-next
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
### Workflow B: Without Beads (Single-session)
|
|
302
|
+
### Standard Workflow (Single-session)
|
|
374
303
|
|
|
375
304
|
Best for: Small features, quick fixes, solo work.
|
|
376
305
|
|
|
@@ -396,20 +325,7 @@ Best for: Small features, quick fixes, solo work.
|
|
|
396
325
|
/code-review
|
|
397
326
|
```
|
|
398
327
|
|
|
399
|
-
###
|
|
400
|
-
|
|
401
|
-
| Scenario | Recommended Workflow |
|
|
402
|
-
|----------|---------------------|
|
|
403
|
-
| Feature takes < 1 session | **Without Beads** |
|
|
404
|
-
| Feature spans multiple sessions | **With Beads** |
|
|
405
|
-
| Multiple developers on same feature | **With Beads** |
|
|
406
|
-
| Tasks have dependencies | **With Beads** |
|
|
407
|
-
| Quick bug fix | **Without Beads** |
|
|
408
|
-
| Complex epic with 5+ tasks | **With Beads** |
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
### Example: Complex Requirements (Without Beads)
|
|
328
|
+
### Example: Complex Requirements
|
|
413
329
|
|
|
414
330
|
```bash
|
|
415
331
|
# 1. Clarify requirements first
|
|
@@ -425,7 +341,7 @@ Best for: Small features, quick fixes, solo work.
|
|
|
425
341
|
/check-implementation checkout-flow
|
|
426
342
|
```
|
|
427
343
|
|
|
428
|
-
### Example: Bug Fix with Tests
|
|
344
|
+
### Example: Bug Fix with Tests
|
|
429
345
|
|
|
430
346
|
```bash
|
|
431
347
|
# 1. Quick plan for the fix
|