ai-workflow-init 6.4.2 → 6.6.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.
Files changed (29) hide show
  1. package/.claude/agents/requirement-ba.md +203 -0
  2. package/.claude/agents/requirement-researcher.md +270 -0
  3. package/.claude/agents/requirement-sa.md +259 -0
  4. package/.claude/agents/requirement-uiux.md +349 -0
  5. package/.claude/commands/beads-breakdown.md +278 -0
  6. package/.claude/commands/beads-create-epic-plan.md +205 -0
  7. package/.claude/commands/beads-done.md +248 -0
  8. package/.claude/commands/beads-next.md +260 -0
  9. package/.claude/commands/beads-status.md +247 -0
  10. package/.claude/commands/clarify-requirements.md +445 -192
  11. package/.claude/commands/create-plan.md +79 -2
  12. package/.claude/commands/execute-plan.md +48 -2
  13. package/.claude/settings.json +3 -3
  14. package/.claude/skills/skill-creator/SKILL.md +355 -0
  15. package/.claude/skills/skill-creator/references/output-patterns.md +82 -0
  16. package/.claude/skills/skill-creator/references/workflows.md +28 -0
  17. package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  18. package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  19. package/.claude/skills/skill-creator/scripts/quick_validate.py +95 -0
  20. package/README.md +97 -3
  21. package/cli.js +21 -1
  22. package/docs/ai/planning/epic-template.md +155 -0
  23. package/docs/ai/planning/feature-template.md +19 -0
  24. package/docs/ai/requirements/req-template.md +164 -58
  25. package/docs/ai/requirements/templates/ba-template.md +151 -0
  26. package/docs/ai/requirements/templates/research-template.md +190 -0
  27. package/docs/ai/requirements/templates/sa-template.md +184 -0
  28. package/docs/ai/requirements/templates/uiux-template.md +325 -0
  29. package/package.json +1 -1
@@ -0,0 +1,155 @@
1
+ # Epic: {Epic Name}
2
+
3
+ Note: All content in this document must be written in English.
4
+
5
+ ---
6
+ beads_epic: {bd-xxx or null}
7
+ requirement: {docs/ai/requirements/req-xxx.md or null}
8
+ ---
9
+
10
+ ## 1. Overview
11
+
12
+ ### Problem Statement
13
+ [Brief description of the problem this epic solves]
14
+
15
+ ### Goals
16
+ - [Primary goal]
17
+ - [Secondary goal]
18
+
19
+ ### Success Metrics
20
+ - [How we measure success]
21
+
22
+ ---
23
+
24
+ ## 2. Architecture
25
+
26
+ > **Note**: High-level architecture overview. Detailed implementation goes in task-level plans.
27
+
28
+ ### System Diagram
29
+ ```
30
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
31
+ │ Component │────▶│ Component │────▶│ Component │
32
+ └─────────────┘ └─────────────┘ └─────────────┘
33
+ ```
34
+
35
+ ### Key Components
36
+ | Component | Responsibility | Location |
37
+ |-----------|----------------|----------|
38
+ | {Name} | {What it does} | {path/to/} |
39
+
40
+ ### Technology Decisions
41
+ | Decision | Choice | Rationale |
42
+ |----------|--------|-----------|
43
+ | {Area} | {Technology} | {Why this choice} |
44
+
45
+ ---
46
+
47
+ ## 3. Task Breakdown
48
+
49
+ > **Note**: If using Beads, this table syncs with Beads via `bd` commands. If not using Beads, manage tasks manually.
50
+
51
+ | # | Task | Priority | Status | Blocked By | Plan Doc |
52
+ |---|------|----------|--------|------------|----------|
53
+ | 1 | {Task title} | P{0-4} | {open/in_progress/closed} | {dependencies or -} | {feature-xxx.md or -} |
54
+ | 2 | {Task title} | P{0-4} | {status} | Task 1 | {-} |
55
+
56
+ <!-- If using Beads, replace # with Task ID (e.g., bd-xxx.1) -->
57
+
58
+ ### Dependency Graph
59
+ ```
60
+ Task 1 ──────────────────────┐
61
+
62
+ Task 3 ───▶ Task 2 ───▶ Task 4
63
+ ```
64
+
65
+ <!-- If using Beads, replace Task # with bd-xxx.# -->
66
+
67
+ ---
68
+
69
+ ## 4. Data Flow
70
+
71
+ ### Primary Flow: {Flow Name}
72
+ 1. [Step 1]: {description}
73
+ 2. [Step 2]: {description}
74
+ 3. [Step 3]: {description}
75
+
76
+ ### Alternative Flow: {Flow Name} (Optional)
77
+ 1. [Step 1]: {description}
78
+
79
+ ### Error Handling
80
+ - {Error case}: {How it's handled}
81
+
82
+ ---
83
+
84
+ ## 5. API Contracts (Optional)
85
+
86
+ > **Note**: Include if epic involves API changes. Keep high-level; details in task plans.
87
+
88
+ ### Endpoints Overview
89
+ | Method | Endpoint | Description |
90
+ |--------|----------|-------------|
91
+ | POST | /api/v1/{resource} | {What it does} |
92
+ | GET | /api/v1/{resource}/:id | {What it does} |
93
+
94
+ ### Key Data Models
95
+ ```
96
+ {ModelName}:
97
+ - field1: type
98
+ - field2: type
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 6. Key Decisions & Trade-offs
104
+
105
+ | Decision | Options Considered | Choice | Trade-off |
106
+ |----------|-------------------|--------|-----------|
107
+ | {Decision area} | {Option A, Option B} | {Chosen} | {What we gain/lose} |
108
+
109
+ ---
110
+
111
+ ## 7. Risks & Mitigations
112
+
113
+ | Risk | Impact | Probability | Mitigation |
114
+ |------|--------|-------------|------------|
115
+ | {Risk description} | High/Medium/Low | High/Medium/Low | {How to mitigate} |
116
+
117
+ ---
118
+
119
+ ## 8. Dependencies
120
+
121
+ ### External
122
+ - {External service/API}: {What we need from it}
123
+
124
+ ### Internal
125
+ - {Internal service/team}: {What we need from it}
126
+
127
+ ### Blockers
128
+ - [ ] {Blocker that must be resolved before starting}
129
+
130
+ ---
131
+
132
+ ## 9. Milestones (Optional)
133
+
134
+ > **Note**: Focus on task groupings and sequence, not time estimates.
135
+
136
+ | Milestone | Tasks | Description |
137
+ |-----------|-------|-------------|
138
+ | {Milestone 1} | Task 1, Task 2 | {What this milestone delivers} |
139
+ | {Milestone 2} | Task 3, Task 4 | {What this milestone delivers} |
140
+
141
+ ---
142
+
143
+ ## 10. References
144
+
145
+ - **Requirement Doc**: [req-{name}.md](../requirements/req-{name}.md)
146
+ - **Related Epics**: {links to related epic plans}
147
+ - **External Docs**: {links to external resources}
148
+
149
+ ---
150
+
151
+ ## Changelog
152
+
153
+ | Date | Author | Change |
154
+ |------|--------|--------|
155
+ | {YYYY-MM-DD} | {name} | Initial epic plan created |
@@ -2,6 +2,25 @@
2
2
 
3
3
  Note: All content in this document must be written in English.
4
4
 
5
+ ---
6
+ beads_task: {bd-xxx.n or null}
7
+ beads_epic: {bd-xxx or null}
8
+ epic_plan: {docs/ai/planning/epic-xxx.md or null}
9
+ ---
10
+
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
+
5
24
  ## 0. Requirements Reference (Optional)
6
25
 
7
26
  - **Requirement Doc**: [req-{feature-name}.md](../requirements/req-{feature-name}.md)
@@ -1,45 +1,69 @@
1
1
  # Requirement: {Feature Name}
2
2
 
3
+ > Generated: {YYYY-MM-DD}
4
+ > Status: Draft | Review | Approved
5
+ > Complexity: Low | Medium | High
6
+
3
7
  Note: All content in this document must be written in English.
4
8
 
5
9
  ---
6
10
 
7
- ## 1. Problem Statement
11
+ ## Quick Links
12
+
13
+ | Document | Status |
14
+ |----------|--------|
15
+ | [BA Analysis](agents/ba-{name}.md) | ✅ Complete / ⏭️ Skipped |
16
+ | [SA Assessment](agents/sa-{name}.md) | ✅ Complete / ⏭️ Skipped |
17
+ | [Domain Research](agents/research-{name}.md) | ✅ Complete / ⏭️ Skipped |
18
+ | [UI/UX Design](agents/uiux-{name}.md) | ✅ Complete / ⏭️ Skipped |
19
+
20
+ ---
21
+
22
+ ## 1. Executive Summary
23
+
24
+ {3-5 sentences covering: what is being built, why it matters, and how it will be approached}
25
+
26
+ ---
27
+
28
+ ## 2. Problem Statement
8
29
 
9
30
  ### Context
10
- [Business/technical context that led to this requirement]
31
+ {Business/technical context that led to this requirement}
11
32
 
12
33
  ### Problem
13
- [The specific problem to be solved]
34
+ {The specific problem to be solved}
14
35
 
15
36
  ### Impact
16
- [Consequences if not addressed - business value, user pain points]
37
+ {Consequences if not addressed - business value, user pain points}
17
38
 
18
39
  ---
19
40
 
20
- ## 2. User Stories (Optional)
41
+ ## 3. Users & User Stories
21
42
 
22
- - As a [role], I want [action], so that [benefit]
23
- - As a [role], I want [action], so that [benefit]
43
+ ### Target Users
24
44
 
25
- ---
45
+ | User Type | Description | Primary Goals |
46
+ |-----------|-------------|---------------|
47
+ | {User 1} | {Who they are} | {What they want to achieve} |
26
48
 
27
- ## 3. Business Rules (Optional)
49
+ ### User Stories
28
50
 
29
- | ID | Rule | Description |
30
- |----|------|-------------|
31
- | BR-01 | {Rule Name} | {Detailed description} |
32
- | BR-02 | {Rule Name} | {Detailed description} |
51
+ | ID | Priority | As a... | I want to... | So that... |
52
+ |----|----------|---------|--------------|------------|
53
+ | US-01 | Must | {user} | {action} | {benefit} |
54
+ | US-02 | Must | {user} | {action} | {benefit} |
55
+ | US-03 | Should | {user} | {action} | {benefit} |
33
56
 
34
57
  ---
35
58
 
36
59
  ## 4. Functional Requirements
37
60
 
38
- | ID | Requirement | Priority | Notes |
39
- |----|-------------|----------|-------|
40
- | FR-01 | {Description} | Must | |
41
- | FR-02 | {Description} | Should | |
42
- | FR-03 | {Description} | Could | |
61
+ | ID | Requirement | Priority | Acceptance Criteria |
62
+ |----|-------------|----------|---------------------|
63
+ | FR-01 | {Description} | Must | {How to verify} |
64
+ | FR-02 | {Description} | Must | {How to verify} |
65
+ | FR-03 | {Description} | Should | {How to verify} |
66
+ | FR-04 | {Description} | Could | {How to verify} |
43
67
 
44
68
  **Priority Legend:**
45
69
  - **Must**: Critical for release
@@ -48,26 +72,96 @@ Note: All content in this document must be written in English.
48
72
 
49
73
  ---
50
74
 
51
- ## 5. Non-Functional Requirements (Optional)
75
+ ## 5. Business Rules
76
+
77
+ | ID | Rule | Condition | Action |
78
+ |----|------|-----------|--------|
79
+ | BR-01 | {Rule Name} | When {condition} | Then {action} |
80
+ | BR-02 | {Rule Name} | When {condition} | Then {action} |
81
+
82
+ ---
83
+
84
+ ## 6. Technical Assessment
85
+
86
+ ### Feasibility Summary
87
+
88
+ | Aspect | Status | Notes |
89
+ |--------|--------|-------|
90
+ | Overall | ✅ Feasible / ⚠️ Conditional / ❌ Issues | {Summary} |
91
+ | Frontend | 🟢 Low / 🟡 Medium / 🔴 High | {Complexity notes} |
92
+ | Backend | 🟢 Low / 🟡 Medium / 🔴 High | {Complexity notes} |
93
+ | Data | 🟢 Low / 🟡 Medium / 🔴 High | {Complexity notes} |
94
+
95
+ ### Recommended Architecture
96
+
97
+ {Brief description of recommended approach}
98
+
99
+ ### Technology Stack
100
+
101
+ | Layer | Technology | Reason |
102
+ |-------|------------|--------|
103
+ | {Layer} | {Tech} | {Why} |
104
+
105
+ ### Technical Risks
106
+
107
+ | ID | Risk | Impact | Likelihood | Mitigation |
108
+ |----|------|--------|------------|------------|
109
+ | TR-01 | {Risk} | High/Med/Low | High/Med/Low | {Mitigation} |
110
+
111
+ ---
112
+
113
+ ## 7. UI/UX Design (if applicable)
114
+
115
+ ### Screen Inventory
116
+
117
+ | # | Screen | Purpose | Priority |
118
+ |---|--------|---------|----------|
119
+ | 1 | {Screen name} | {Purpose} | Must |
120
+
121
+ ### Key User Flows
122
+
123
+ {Flow diagram or description}
124
+
125
+ ### Wireframe Reference
126
+
127
+ See: [UI/UX Design Document](agents/uiux-{name}.md)
128
+
129
+ ---
130
+
131
+ ## 8. Domain Context (if applicable)
132
+
133
+ ### Glossary
134
+
135
+ | Term | Definition |
136
+ |------|------------|
137
+ | {Term} | {Clear definition in project context} |
138
+
139
+ ### Compliance & Standards
140
+
141
+ | Standard | Applicability |
142
+ |----------|---------------|
143
+ | {Standard name} | {How it applies} |
144
+
145
+ ---
146
+
147
+ ## 9. Non-Functional Requirements (Optional)
52
148
 
53
149
  | Category | Requirement |
54
150
  |----------|-------------|
55
- | **Performance** | {e.g., Response time < 200ms, support 1000 concurrent users} |
56
- | **Security** | {e.g., Authentication required, data encryption} |
57
- | **Compatibility** | {e.g., Chrome 90+, Safari 14+, mobile responsive} |
151
+ | **Performance** | {e.g., Response time < 200ms} |
152
+ | **Security** | {e.g., Authentication required} |
153
+ | **Compatibility** | {e.g., Chrome 90+, mobile responsive} |
58
154
  | **Accessibility** | {e.g., WCAG 2.1 AA compliance} |
59
- | **Scalability** | {e.g., Handle 10x traffic growth} |
60
155
 
61
156
  ---
62
157
 
63
- ## 6. Edge Cases & Constraints (Optional)
158
+ ## 10. Edge Cases & Constraints
64
159
 
65
160
  ### Edge Cases
66
161
 
67
162
  | Case | Expected Behavior |
68
163
  |------|-------------------|
69
164
  | {Edge case description} | {How system should handle it} |
70
- | {Edge case description} | {How system should handle it} |
71
165
 
72
166
  ### Constraints
73
167
 
@@ -77,61 +171,73 @@ Note: All content in this document must be written in English.
77
171
 
78
172
  ---
79
173
 
80
- ## 7. Clarifications Log (Optional)
174
+ ## 11. Out of Scope
81
175
 
82
- > Questions resolved during requirement gathering sessions
176
+ > Explicitly excluded from this requirement
83
177
 
84
- | # | Question | Answer |
85
- |---|----------|--------|
86
- | 1 | {Question asked} | {Answer received} |
87
- | 2 | {Question asked} | {Answer received} |
178
+ - {Feature/functionality not included}
179
+ - {Deferred to future iteration}
88
180
 
89
181
  ---
90
182
 
91
- ## 8. Out of Scope (Optional)
183
+ ## 12. Open Questions
92
184
 
93
- > Explicitly excluded from this requirement
94
-
95
- - {Feature/functionality not included}
96
- - {Deferred to future iteration}
97
- - {Related but separate concern}
185
+ | ID | Question | Owner | Status |
186
+ |----|----------|-------|--------|
187
+ | Q-01 | {Unresolved question} | {Who decides} | Open |
98
188
 
99
189
  ---
100
190
 
101
- ## 9. Acceptance Criteria
191
+ ## 13. Acceptance Criteria
102
192
 
103
193
  ### Scenario 1: {Happy Path - Main Flow}
104
194
 
105
- - **Given** [initial context/state]
106
- - **When** [action performed]
107
- - **Then** [expected outcome]
195
+ - **Given** {initial context/state}
196
+ - **When** {action performed}
197
+ - **Then** {expected outcome}
108
198
 
109
- ### Scenario 2: {Alternative Flow} (Optional)
199
+ ### Scenario 2: {Alternative Flow}
110
200
 
111
- - **Given** [context]
112
- - **When** [action]
113
- - **Then** [outcome]
201
+ - **Given** {context}
202
+ - **When** {action}
203
+ - **Then** {outcome}
114
204
 
115
- ### Scenario 3: {Error Handling} (Optional)
205
+ ### Scenario 3: {Error Handling}
116
206
 
117
- - **Given** [context]
118
- - **When** [invalid action/error condition]
119
- - **Then** [error handling behavior]
207
+ - **Given** {context}
208
+ - **When** {invalid action/error condition}
209
+ - **Then** {error handling behavior}
120
210
 
121
211
  ---
122
212
 
123
- ## 10. References (Optional)
213
+ ## 14. Implementation Guidance
214
+
215
+ ### Suggested Phases
124
216
 
125
- - **Related Docs**: [links to related requirements, designs, etc.]
126
- - **External Links**: [Jira tickets, Figma, API docs, etc.]
217
+ | Phase | Focus | Priority |
218
+ |-------|-------|----------|
219
+ | 1 | {Foundation} | High |
220
+ | 2 | {Core features} | High |
221
+ | 3 | {Enhancement} | Medium |
222
+
223
+ ### Dependencies
224
+
225
+ | Dependency | Type | Status |
226
+ |------------|------|--------|
227
+ | {Dependency} | Internal/External | Available/Pending |
127
228
 
128
229
  ---
129
230
 
130
- ## 11. Glossary (Optional)
231
+ ## 15. References
131
232
 
132
- > Domain-specific terms and definitions. Include only if specialized terminology is used.
233
+ - **Related Docs**: {links to related requirements, designs}
234
+ - **External Links**: {Jira tickets, Figma, API docs}
235
+ - **Agent Outputs**: See Quick Links section
133
236
 
134
- | Term | Definition |
135
- |------|------------|
136
- | {Term 1} | {Clear definition in project context} |
137
- | {Term 2} | {Clear definition in project context} |
237
+ ---
238
+
239
+ ## Next Steps
240
+
241
+ 1. [ ] Review this requirement document
242
+ 2. [ ] Address open questions
243
+ 3. [ ] Run `/create-plan` to generate implementation plan
@@ -0,0 +1,151 @@
1
+ # Business Analysis: {Feature Name}
2
+
3
+ > Generated by BA Agent | Date: {YYYY-MM-DD}
4
+
5
+ ---
6
+
7
+ ## 1. Executive Summary
8
+
9
+ {2-3 sentence summary of what is being built and why}
10
+
11
+ ---
12
+
13
+ ## 2. Problem Statement
14
+
15
+ ### Current Situation
16
+ {Describe the current state or pain points}
17
+
18
+ ### Desired Outcome
19
+ {What success looks like}
20
+
21
+ ---
22
+
23
+ ## 3. Users & Stakeholders
24
+
25
+ ### Primary Users
26
+
27
+ | User Type | Description | Goals |
28
+ |-----------|-------------|-------|
29
+ | {User 1} | {Who they are} | {What they want to achieve} |
30
+ | {User 2} | {Who they are} | {What they want to achieve} |
31
+
32
+ ### Secondary Users
33
+ - {User type and role}
34
+
35
+ ### Stakeholders
36
+ - {Stakeholder and their interest}
37
+
38
+ ---
39
+
40
+ ## 4. User Stories
41
+
42
+ ### Must-Have (P0)
43
+
44
+ | ID | As a... | I want to... | So that... |
45
+ |----|---------|--------------|------------|
46
+ | US-01 | {user} | {action} | {benefit} |
47
+ | US-02 | {user} | {action} | {benefit} |
48
+
49
+ ### Should-Have (P1)
50
+
51
+ | ID | As a... | I want to... | So that... |
52
+ |----|---------|--------------|------------|
53
+ | US-03 | {user} | {action} | {benefit} |
54
+
55
+ ### Nice-to-Have (P2)
56
+
57
+ | ID | As a... | I want to... | So that... |
58
+ |----|---------|--------------|------------|
59
+ | US-04 | {user} | {action} | {benefit} |
60
+
61
+ ---
62
+
63
+ ## 5. Functional Requirements
64
+
65
+ ### Core Requirements
66
+
67
+ | ID | Requirement | Priority | Acceptance Criteria |
68
+ |----|-------------|----------|---------------------|
69
+ | FR-01 | {Clear, testable requirement} | Must | {How to verify} |
70
+ | FR-02 | {Clear, testable requirement} | Must | {How to verify} |
71
+ | FR-03 | {Clear, testable requirement} | Should | {How to verify} |
72
+
73
+ ### Data Requirements
74
+
75
+ | ID | Requirement | Details |
76
+ |----|-------------|---------|
77
+ | DR-01 | {Data requirement} | {Specifics} |
78
+
79
+ ---
80
+
81
+ ## 6. Business Rules
82
+
83
+ | ID | Rule | Condition | Action |
84
+ |----|------|-----------|--------|
85
+ | BR-01 | {Rule name} | When {condition} | Then {action} |
86
+ | BR-02 | {Rule name} | When {condition} | Then {action} |
87
+
88
+ ---
89
+
90
+ ## 7. Assumptions & Dependencies
91
+
92
+ ### Assumptions
93
+
94
+ | ID | Assumption | Impact if Wrong |
95
+ |----|------------|-----------------|
96
+ | A-01 | {What we assume} | {Consequence} |
97
+
98
+ ### Dependencies
99
+
100
+ | ID | Dependency | Type | Status |
101
+ |----|------------|------|--------|
102
+ | D-01 | {External/internal dependency} | External/Internal | Available/Pending |
103
+
104
+ ---
105
+
106
+ ## 8. Out of Scope
107
+
108
+ The following items are explicitly **NOT** included in this requirement:
109
+
110
+ - {Excluded item 1}
111
+ - {Excluded item 2}
112
+ - {Excluded item 3}
113
+
114
+ ---
115
+
116
+ ## 9. Open Questions
117
+
118
+ | ID | Question | Owner | Due Date | Status |
119
+ |----|----------|-------|----------|--------|
120
+ | Q-01 | {Unresolved question} | {Who decides} | {When} | Open |
121
+
122
+ ---
123
+
124
+ ## 10. Q&A Log
125
+
126
+ ### Round 1: {Topic}
127
+
128
+ | # | Question | Answer |
129
+ |---|----------|--------|
130
+ | 1 | {Question asked} | {User's answer} |
131
+ | 2 | {Question asked} | {User's answer} |
132
+
133
+ ### Round 2: {Topic}
134
+
135
+ | # | Question | Answer |
136
+ |---|----------|--------|
137
+ | 3 | {Question asked} | {User's answer} |
138
+
139
+ ---
140
+
141
+ ## Appendix
142
+
143
+ ### Glossary
144
+ {If domain terms were collected}
145
+
146
+ | Term | Definition |
147
+ |------|------------|
148
+ | {Term} | {Definition} |
149
+
150
+ ### References
151
+ - {Link to related documents}