ai-workflow-init 6.6.1 → 7.0.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.
@@ -15,47 +15,6 @@ 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:**
@@ -339,38 +298,19 @@ Create the file automatically:
339
298
 
340
299
  - `docs/ai/planning/feature-{name}.md` - Use complete structure from `feature-template.md`
341
300
 
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
301
  **Notify user:** "Created plan with X phases: [Phase 1], [Phase 2], ..."
357
302
 
358
303
  ## Step 8: Next Actions
359
304
 
360
- **If BEADS_MODE = true:**
305
+ **Suggest next command:**
306
+
361
307
  ```
362
308
  ✓ Created plan: docs/ai/planning/feature-{name}.md
363
- ✓ Linked to Beads task: {task_id}
364
309
 
365
310
  Next steps:
366
- /execute-plan → Implement this task
367
- /beads-status → View epic progress
311
+ /execute-plan → Implement this feature
368
312
  ```
369
313
 
370
- **If normal mode:**
371
-
372
- Suggest: `/execute-plan` to begin implementation.
373
-
374
314
  Implementation will be driven from `docs/ai/planning/feature-{name}.md`.
375
315
 
376
316
  Note: Test documentation will be created separately using the `writing-test` command.
@@ -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 BEADS_MODE = true AND all phases complete:**
227
+ **If all phases complete:**
258
228
 
259
229
  ```
260
- ✓ All phases complete for Beads task: {beads_task_id} "{beads_task_title}"
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 BEADS_MODE = false AND all phases complete:**
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
 
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
- - **14 Pre-built Commands**: Create plans, execute tasks, run tests, code reviews, and more
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 A: With Beads (Multi-session, Dependencies)
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
- ### When to Use Which Workflow?
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 (Without Beads)
344
+ ### Example: Bug Fix with Tests
429
345
 
430
346
  ```bash
431
347
  # 1. Quick plan for the fix
@@ -3,7 +3,6 @@
3
3
  Note: All content in this document must be written in English.
4
4
 
5
5
  ---
6
- beads_epic: {bd-xxx or null}
7
6
  requirement: {docs/ai/requirements/req-xxx.md or null}
8
7
  ---
9
8
 
@@ -46,15 +45,11 @@ requirement: {docs/ai/requirements/req-xxx.md or null}
46
45
 
47
46
  ## 3. Task Breakdown
48
47
 
49
- > **Note**: If using Beads, this table syncs with Beads via `bd` commands. If not using Beads, manage tasks manually.
50
-
51
48
  | # | Task | Priority | Status | Blocked By | Plan Doc |
52
49
  |---|------|----------|--------|------------|----------|
53
50
  | 1 | {Task title} | P{0-4} | {open/in_progress/closed} | {dependencies or -} | {feature-xxx.md or -} |
54
51
  | 2 | {Task title} | P{0-4} | {status} | Task 1 | {-} |
55
52
 
56
- <!-- If using Beads, replace # with Task ID (e.g., bd-xxx.1) -->
57
-
58
53
  ### Dependency Graph
59
54
  ```
60
55
  Task 1 ──────────────────────┐
@@ -62,8 +57,6 @@ Task 1 ──────────────────────┐
62
57
  Task 3 ───▶ Task 2 ───▶ Task 4
63
58
  ```
64
59
 
65
- <!-- If using Beads, replace Task # with bd-xxx.# -->
66
-
67
60
  ---
68
61
 
69
62
  ## 4. Data Flow
@@ -3,24 +3,9 @@
3
3
  Note: All content in this document must be written in English.
4
4
 
5
5
  ---
6
- beads_task: {bd-xxx.n or null}
7
- beads_epic: {bd-xxx or null}
8
6
  epic_plan: {docs/ai/planning/epic-xxx.md or null}
9
7
  ---
10
8
 
11
- ## 0. Beads Context (Optional)
12
-
13
- > **Note**: This section is auto-generated when plan is created via `/beads-next` → `/create-plan` workflow. Delete if not using Beads.
14
-
15
- - **Epic**: {epic-id} "{Epic Title}"
16
- - **Task**: {task-id} "{Task Title}"
17
- - **Epic Plan**: [epic-{name}.md](epic-{name}.md)
18
- - **Status**: in_progress
19
- - **Blocked by**: {list or "none"}
20
- - **Blocks**: {list of dependent tasks or "none"}
21
-
22
- ---
23
-
24
9
  ## 0. Requirements Reference (Optional)
25
10
 
26
11
  - **Requirement Doc**: [req-{feature-name}.md](../requirements/req-{feature-name}.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-workflow-init",
3
- "version": "6.6.1",
3
+ "version": "7.0.0",
4
4
  "description": "Initialize AI workflow docs & commands into any repo with one command",
5
5
  "bin": {
6
6
  "ai-workflow-init": "./cli.js"
@@ -1,278 +0,0 @@
1
- ---
2
- name: beads-breakdown
3
- description: Analyzes feature/requirement and breaks down into Beads epic with tasks and dependencies.
4
- ---
5
-
6
- ## Goal
7
-
8
- Analyze a feature description (user prompt, requirement file, or planning file) and break it down into a Beads epic with tasks and dependencies. Confirm with user before executing any `bd` commands.
9
-
10
- ## Workflow Alignment
11
-
12
- - Provide brief status updates (1–3 sentences) before/after important actions.
13
- - ALWAYS confirm breakdown with user before executing `bd` commands.
14
- - Show exact commands that will be executed for transparency.
15
-
16
- ---
17
-
18
- ## Step 1: Detect Input Source
19
-
20
- **Parse user input to identify source type:**
21
-
22
- 1. **File reference detected** (starts with `@` or file path):
23
- - Requirement file: `@docs/ai/requirements/req-{name}.md`
24
- - Planning file: `@docs/ai/planning/feature-{name}.md`
25
- - Read file and extract content
26
-
27
- 2. **User prompt only**:
28
- - Use prompt directly for analysis
29
-
30
- 3. **Both file + prompt**:
31
- - File provides base requirements
32
- - Prompt provides additional context/focus
33
-
34
- **Tool:** Read(file_path=...) if file reference detected
35
-
36
- **Extract from file (if requirement doc):**
37
- - Problem Statement → Epic description
38
- - Functional Requirements (FR-xx) → Tasks
39
- - Non-Functional Requirements → Constraints/notes
40
- - Dependencies/Constraints → Task dependencies
41
- - Acceptance Criteria → Task acceptance criteria
42
-
43
- **Extract from file (if planning doc):**
44
- - Goal → Epic description
45
- - Implementation phases → Tasks
46
- - Phase dependencies → Task dependencies
47
-
48
- ---
49
-
50
- ## Step 2: Analyze and Generate Breakdown
51
-
52
- **Generate epic structure:**
53
-
54
- 1. **Epic title**: Concise name for the feature (e.g., "User Authentication System")
55
-
56
- 2. **Tasks**: Break down into 3-10 tasks
57
- - Each task should be independently plannable (1-3 phases when detailed)
58
- - Task title: Action-oriented (e.g., "Setup JWT infrastructure")
59
- - Priority: P0 (critical) to P4 (backlog)
60
-
61
- 3. **Dependencies**: Identify blocking relationships
62
- - Which tasks must complete before others can start?
63
- - Which tasks can run in parallel?
64
-
65
- **Analysis guidelines:**
66
- - **Too granular**: If task takes < 1 hour → merge with related task
67
- - **Too large**: If task needs > 5 implementation phases → split further
68
- - **Parallel-friendly**: Maximize tasks that can run simultaneously
69
-
70
- ---
71
-
72
- ## Step 3: Present Breakdown for Confirmation
73
-
74
- **Display proposed breakdown:**
75
-
76
- ```
77
- ## Proposed Epic Breakdown
78
-
79
- **Epic**: {Epic Title}
80
- **Source**: {file path or "user prompt"}
81
- **Description**: {1-2 sentence summary}
82
-
83
- ### Tasks
84
-
85
- | # | Title | Priority | Blocked By | Notes |
86
- |---|-------|----------|------------|-------|
87
- | 1 | {Task title} | P{0-4} | - | {brief note} |
88
- | 2 | {Task title} | P{0-4} | Task 1 | {brief note} |
89
- | 3 | {Task title} | P{0-4} | - | {can parallel with 1} |
90
- | 4 | {Task title} | P{0-4} | Task 2 | {brief note} |
91
-
92
- ### Dependency Graph
93
-
94
- ```
95
- Task 1 ──────────────────────┐
96
-
97
- Task 3 ───▶ Task 2 ───▶ Task 4
98
- ```
99
-
100
- ### Ready to Start (can run in parallel)
101
- - Task 1: {title}
102
- - Task 3: {title}
103
-
104
- ---
105
-
106
- ### Commands to Execute
107
-
108
- ```bash
109
- # Create Epic
110
- bd create "{Epic Title}" -p 0 --type epic
111
-
112
- # Create Tasks (after epic created, will use actual epic ID)
113
- bd create "{Task 1 title}" -p {priority} --parent {epic-id}
114
- bd create "{Task 2 title}" -p {priority} --parent {epic-id}
115
- bd create "{Task 3 title}" -p {priority} --parent {epic-id}
116
- bd create "{Task 4 title}" -p {priority} --parent {epic-id}
117
-
118
- # Set Dependencies
119
- bd dep add {task-2-id} {task-1-id} # Task 2 blocked by Task 1
120
- bd dep add {task-4-id} {task-2-id} # Task 4 blocked by Task 2
121
-
122
- # Sync to git
123
- bd sync
124
- ```
125
- ```
126
-
127
- **Ask for confirmation:**
128
-
129
- ```
130
- AskUserQuestion(questions=[{
131
- question: "Review the breakdown above. How would you like to proceed?",
132
- header: "Confirm",
133
- options: [
134
- { label: "Execute breakdown", description: "Create epic and tasks in Beads with the structure shown above" },
135
- { label: "Modify tasks", description: "I want to add, remove, or change tasks before creating" },
136
- { label: "Cancel", description: "Don't create anything, I'll provide more context" }
137
- ],
138
- multiSelect: false
139
- }])
140
- ```
141
-
142
- ---
143
-
144
- ## Step 4: Handle User Response
145
-
146
- ### If "Execute breakdown":
147
-
148
- Execute `bd` commands sequentially:
149
-
150
- ```bash
151
- # 1. Create Epic
152
- bd create "{Epic Title}" -p 0 --type epic
153
- # Capture epic ID from output (e.g., bd-auth)
154
-
155
- # 2. Create Tasks (use actual epic ID)
156
- bd create "{Task 1}" -p {priority} --parent {epic-id}
157
- # Capture task ID (e.g., bd-auth.1)
158
-
159
- bd create "{Task 2}" -p {priority} --parent {epic-id}
160
- # Capture task ID (e.g., bd-auth.2)
161
-
162
- # ... repeat for all tasks
163
-
164
- # 3. Set Dependencies (use actual task IDs)
165
- bd dep add {task-2-id} {task-1-id}
166
- # ... repeat for all dependencies
167
-
168
- # 4. Sync
169
- bd sync
170
- ```
171
-
172
- **Output summary:**
173
-
174
- ```
175
- ✓ Created Epic: {epic-id} "{Epic Title}"
176
-
177
- Tasks created:
178
- ├── {task-1-id} "{Task 1}" [ready]
179
- ├── {task-2-id} "{Task 2}" [blocked by {task-1-id}]
180
- ├── {task-3-id} "{Task 3}" [ready]
181
- └── {task-4-id} "{Task 4}" [blocked by {task-2-id}]
182
-
183
- Ready to start (parallel): {task-1-id}, {task-3-id}
184
-
185
- Next steps:
186
- 1. Run `/beads-create-epic-plan` to create high-level epic plan
187
- 2. Run `/beads-next` to claim a task and start working
188
- ```
189
-
190
- ### If "Modify tasks":
191
-
192
- Ask follow-up:
193
-
194
- ```
195
- AskUserQuestion(questions=[{
196
- question: "What would you like to modify?",
197
- header: "Modify",
198
- options: [
199
- { label: "Add tasks", description: "Add more tasks to the breakdown" },
200
- { label: "Remove tasks", description: "Remove some tasks" },
201
- { label: "Change dependencies", description: "Modify blocking relationships" },
202
- { label: "Change priorities", description: "Adjust task priorities" }
203
- ],
204
- multiSelect: true
205
- }])
206
- ```
207
-
208
- Collect modifications and return to Step 3 with updated breakdown.
209
-
210
- ### If "Cancel":
211
-
212
- ```
213
- Breakdown cancelled.
214
-
215
- To try again with more context:
216
- /beads-breakdown "more detailed description"
217
- /beads-breakdown @docs/ai/requirements/req-{name}.md
218
- ```
219
-
220
- ---
221
-
222
- ## Step 5: Store Context for Next Commands
223
-
224
- After successful creation, store context for `/beads-create-epic-plan`:
225
-
226
- **File:** `.beads/current-epic.json`
227
-
228
- ```json
229
- {
230
- "epic_id": "{epic-id}",
231
- "epic_title": "{Epic Title}",
232
- "source_file": "{file path or null}",
233
- "tasks": [
234
- {
235
- "id": "{task-1-id}",
236
- "title": "{Task 1}",
237
- "priority": 1,
238
- "blocked_by": [],
239
- "status": "open"
240
- },
241
- {
242
- "id": "{task-2-id}",
243
- "title": "{Task 2}",
244
- "priority": 1,
245
- "blocked_by": ["{task-1-id}"],
246
- "status": "open"
247
- }
248
- ],
249
- "created_at": "{ISO timestamp}"
250
- }
251
- ```
252
-
253
- ---
254
-
255
- ## Notes
256
-
257
- - **Confirmation required**: Never execute `bd` commands without user confirmation
258
- - **Idempotent**: Safe to re-run; will show current state if epic exists
259
- - **Source tracking**: Links back to requirement/planning doc if provided
260
- - **Parallel-friendly**: Breakdown should maximize parallel execution opportunities
261
-
262
- ### Task Sizing Guidelines
263
-
264
- | Size | Description | When to use |
265
- |------|-------------|-------------|
266
- | Too small | < 1 hour, single function | Merge with related task |
267
- | Good | 2-8 hours, 1-3 phases | Ideal task size |
268
- | Too large | > 2 days, > 5 phases | Split into subtasks |
269
-
270
- ### Priority Guidelines
271
-
272
- | Priority | Meaning | Use for |
273
- |----------|---------|---------|
274
- | P0 | Critical | Blockers, urgent fixes |
275
- | P1 | High | Core functionality |
276
- | P2 | Medium | Important but not blocking |
277
- | P3 | Low | Nice to have |
278
- | P4 | Backlog | Future consideration |