@kienha/anti-chaotic 1.0.2 → 1.0.5
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/.agent/rules/documentation.md +1 -1
- package/.agent/skills/backend-developer/SKILL.md +4 -14
- package/.agent/skills/business-analysis/SKILL.md +2 -4
- package/.agent/skills/designer/SKILL.md +36 -58
- package/.agent/skills/devops-engineer/SKILL.md +0 -9
- package/.agent/skills/frontend-developer/SKILL.md +17 -3
- package/.agent/skills/frontend-developer/react/SKILL.md +16 -12
- package/.agent/skills/lead-architect/SKILL.md +2 -2
- package/.agent/skills/rules-workflows/SKILL.md +62 -19
- package/.agent/skills/rules-workflows/assets/workflow-basic.md +112 -0
- package/.agent/skills/rules-workflows/references/orchestration-patterns.md +15 -3
- package/.agent/skills/rules-workflows/references/rules-guide.md +6 -47
- package/.agent/skills/rules-workflows/references/workflows-guide.md +12 -20
- package/.agent/skills/skill-creator/SKILL.md +18 -20
- package/.agent/skills/skill-creator/assets/skill-questionnaire.md +8 -0
- package/.agent/workflows/docs-from-codebase.md +104 -0
- package/.agent/workflows/implement-feature.md +148 -0
- package/.agent/workflows/requirement-analysis.md +113 -249
- package/.agent/workflows/setup-codebase.md +51 -58
- package/.agent/workflows/ui-ux-design.md +72 -51
- package/README.md +23 -343
- package/bin/{ag.js → anti-chaotic.js} +17 -0
- package/package.json +5 -4
- package/.agent/skills/frontend-developer/references/react-next.md +0 -67
- package/.agent/skills/frontend-developer/references/react.md +0 -91
- package/.agent/skills/rules-workflows/assets/example-workflow.md +0 -37
- package/.agent/skills/rules-workflows/assets/templates/rule-project-context.md +0 -26
- package/.agent/skills/rules-workflows/assets/templates/workflow-agile-feature.md +0 -62
- package/.agent/workflows/generate-docs-from-codebase.md +0 -335
- package/.agent/workflows/workflow-rule-from-codebase.md +0 -43
- package/.agent/workflows/workflow-rule-from-feedback.md +0 -38
- /package/.agent/skills/rules-workflows/assets/{example-rule-always-on.md → rule-always-on.md} +0 -0
- /package/.agent/skills/rules-workflows/assets/{example-rule-glob.md → rule-glob.md} +0 -0
- /package/.agent/skills/rules-workflows/assets/{example-rule-manual.md → rule-manual.md} +0 -0
- /package/.agent/skills/rules-workflows/assets/{example-rule-model-decision.md → rule-model-decision.md} +0 -0
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Requirement Analysis Workflow (PM
|
|
2
|
+
description: Requirement Analysis Workflow (PM → BA → Architect)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Requirement Analysis Workflow
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Transforms a raw user request into comprehensive, validated implementation plan.
|
|
8
8
|
|
|
9
9
|
> [!IMPORTANT]
|
|
10
|
-
> **MANDATORY**:
|
|
10
|
+
> **MANDATORY**: Read `.agent/rules/documentation.md` before creating any document.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## MCP Usage Guidelines
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
> - **Tables and checklists** → Use artifacts for easy inline commenting
|
|
22
|
-
> - **Tooling** → You MUST use the `write_to_file` tool to create these artifacts.
|
|
16
|
+
| MCP Tool | When to Use | Example |
|
|
17
|
+
| -------------------------------------------- | ------------------------------------------------------ | --------------------------------- |
|
|
18
|
+
| `mcp_sequential-thinking_sequentialthinking` | Analyze requirements, feature dependencies, trade-offs | Break down ambiguous requests |
|
|
19
|
+
| `mcp_context7_resolve-library-id` | Find library ID before querying | "mermaid js" |
|
|
20
|
+
| `mcp_context7_query-docs` | Research tech stack options, diagram syntax | "Mermaid sequence diagram syntax" |
|
|
23
21
|
|
|
24
22
|
---
|
|
25
23
|
|
|
26
24
|
## Document Priority Order
|
|
27
25
|
|
|
28
|
-
Documents are created from **high-level overview** to **detailed specifics**:
|
|
29
|
-
|
|
30
26
|
```
|
|
31
|
-
Priority 0: Roadmap
|
|
32
|
-
Priority 1: PRD
|
|
33
|
-
Priority 2: SDD
|
|
34
|
-
Priority 3: Epics
|
|
35
|
-
Priority 4: Use Cases
|
|
36
|
-
Priority 5: User Stories
|
|
37
|
-
Priority 6: ADRs (if needed)
|
|
27
|
+
Priority 0: Roadmap ← Project Planning & Timeline
|
|
28
|
+
Priority 1: PRD ← Strategic Overview
|
|
29
|
+
Priority 2: SDD ← Technical Overview
|
|
30
|
+
Priority 3: Epics ← Feature Breakdown
|
|
31
|
+
Priority 4: Use Cases ← Functional Details
|
|
32
|
+
Priority 5: User Stories ← Implementation Units
|
|
33
|
+
Priority 6: ADRs ← Technical Decisions (if needed)
|
|
38
34
|
```
|
|
39
35
|
|
|
40
36
|
---
|
|
@@ -46,291 +42,159 @@ Priority 6: ADRs (if needed) ← Technical Decisions
|
|
|
46
42
|
> [!NOTE]
|
|
47
43
|
> This step is **MANDATORY**. Do NOT proceed without user confirmation.
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
2. **Create Clarification Artifact**: Present questions in an artifact for easy review:
|
|
51
|
-
|
|
52
|
-
**→ Execute `write_to_file` to create artifact: `clarification-questions.md`**
|
|
53
|
-
|
|
54
|
-
```markdown
|
|
55
|
-
# Project Clarification Questions
|
|
56
|
-
|
|
57
|
-
## Understanding Summary
|
|
58
|
-
|
|
59
|
-
- **Project**: {ProjectName}
|
|
60
|
-
- **Goal**: {one-line summary}
|
|
61
|
-
- **Target Users**: {who}
|
|
62
|
-
|
|
63
|
-
## Key Features Identified
|
|
64
|
-
|
|
65
|
-
- [ ] {feature1}
|
|
66
|
-
- [ ] {feature2}
|
|
67
|
-
- [ ] {feature3}
|
|
68
|
-
|
|
69
|
-
## Questions for Clarification
|
|
70
|
-
|
|
71
|
-
| # | Question | Your Answer |
|
|
72
|
-
| --- | --------------------------------------------------- | ----------- |
|
|
73
|
-
| 1 | What is the primary problem you're trying to solve? | |
|
|
74
|
-
| 2 | Who is the target user/audience? | |
|
|
75
|
-
| 3 | What does success look like? | |
|
|
76
|
-
| 4 | Any constraints (time, budget, tech stack)? | |
|
|
77
|
-
| 5 | Any existing systems to integrate with? | |
|
|
78
|
-
|
|
79
|
-
## Confirmation
|
|
45
|
+
> 💡 **MCP**: Use `sequential-thinking` to analyze ambiguous or complex requests
|
|
80
46
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
3.
|
|
47
|
+
1. **Invoke `[product-manager]` skill** to:
|
|
48
|
+
- Summarize understanding
|
|
49
|
+
- Create clarification questions
|
|
50
|
+
2. Create `clarification-questions.md` artifact
|
|
51
|
+
3. **WAIT** for user to review and confirm
|
|
86
52
|
|
|
87
53
|
---
|
|
88
54
|
|
|
89
|
-
## Step 1: Create Roadmap
|
|
55
|
+
## Step 1: Create Roadmap
|
|
90
56
|
|
|
91
|
-
**Role: Product Manager**
|
|
92
57
|
// turbo
|
|
93
58
|
|
|
94
|
-
>
|
|
95
|
-
|
|
96
|
-
1. **Draft Roadmap**: Define "When" and project phases
|
|
97
|
-
- Project timeline and milestones
|
|
98
|
-
- Phase breakdown (MVP, v1.0, v2.0, etc.)
|
|
99
|
-
- Key deliverables per phase
|
|
100
|
-
- Dependencies and risks
|
|
101
|
-
2. **Create Draft Artifact**:
|
|
102
|
-
- **→ Execute `write_to_file` to create artifact: `draft-roadmap.md`** for user review
|
|
103
|
-
3. **After User Approval**:
|
|
104
|
-
- **Save to**: `docs/010-Planning/Roadmap-{ProjectName}.md`
|
|
105
|
-
4. **Present to User**:
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
✅ ROADMAP CREATED
|
|
109
|
-
──────────────────
|
|
110
|
-
📝 Draft: artifact `draft-roadmap.md` (review & comment)
|
|
111
|
-
📄 Final: docs/010-Planning/Roadmap-{ProjectName}.md
|
|
112
|
-
|
|
113
|
-
👉 Review the draft. When ready:
|
|
114
|
-
[Approve & Continue / Request Changes / Stop Here]
|
|
115
|
-
```
|
|
59
|
+
> 💡 **MCP**: Use `sequential-thinking` for phased planning and risk assessment
|
|
116
60
|
|
|
117
|
-
|
|
61
|
+
1. **Invoke `[product-manager]` skill** to draft:
|
|
62
|
+
- Project timeline and milestones
|
|
63
|
+
- Phase breakdown (MVP, v1.0, v2.0)
|
|
64
|
+
- Key deliverables per phase
|
|
65
|
+
2. Create `draft-roadmap.md` artifact
|
|
66
|
+
3. After approval → Save to `docs/010-Planning/Roadmap-{ProjectName}.md`
|
|
67
|
+
4. **WAIT** for user response
|
|
118
68
|
|
|
119
69
|
---
|
|
120
70
|
|
|
121
|
-
## Step 2: Create PRD
|
|
71
|
+
## Step 2: Create PRD
|
|
122
72
|
|
|
123
|
-
**Role: Product Manager**
|
|
124
73
|
// turbo
|
|
125
74
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
- **→ Execute `write_to_file` to create artifact: `draft-prd.md`** for user review
|
|
134
|
-
3. **After User Approval**:
|
|
135
|
-
- **Save to**: `docs/020-Requirements/PRD-{ProjectName}.md`
|
|
136
|
-
4. **Present to User**:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
✅ PRD DRAFTED
|
|
140
|
-
──────────────
|
|
141
|
-
📝 Draft: artifact `draft-prd.md` (review & comment)
|
|
142
|
-
📄 Final: docs/020-Requirements/PRD-{ProjectName}.md
|
|
143
|
-
|
|
144
|
-
👉 Review the draft. When ready:
|
|
145
|
-
[Approve & Continue / Request Changes / Stop Here]
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
5. **WAIT** for user response.
|
|
75
|
+
1. **Invoke `[product-manager]` skill** to draft:
|
|
76
|
+
- Business objectives and success metrics
|
|
77
|
+
- Target audience/user personas
|
|
78
|
+
- Feature prioritization (MoSCoW)
|
|
79
|
+
2. Create `draft-prd.md` artifact
|
|
80
|
+
3. After approval → Save to `docs/020-Requirements/PRD-{ProjectName}.md`
|
|
81
|
+
4. **WAIT** for user response
|
|
149
82
|
|
|
150
83
|
---
|
|
151
84
|
|
|
152
|
-
## Step 3: Create SDD
|
|
85
|
+
## Step 3: Create SDD
|
|
153
86
|
|
|
154
|
-
**Role: Lead Architect**
|
|
155
87
|
// turbo
|
|
156
88
|
|
|
157
|
-
>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
✅ SDD DRAFTED
|
|
172
|
-
──────────────
|
|
173
|
-
📝 Draft: artifact `draft-sdd.md` (review & comment)
|
|
174
|
-
📄 Final: docs/030-Specs/Architecture/SDD-{ProjectName}.md
|
|
175
|
-
|
|
176
|
-
👉 Review the draft. When ready:
|
|
177
|
-
[Approve & Continue / Request Changes / Stop Here]
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
5. **WAIT** for user response.
|
|
89
|
+
> 💡 **MCP**:
|
|
90
|
+
>
|
|
91
|
+
> - **MUST** use `sequential-thinking` for architectural decisions
|
|
92
|
+
> - Use `context7` with `/vercel/next.js`, `/supabase/supabase` for tech stack research
|
|
93
|
+
|
|
94
|
+
1. **Invoke `[lead-architect]` skill** to draft:
|
|
95
|
+
- High-level system architecture
|
|
96
|
+
- Technology stack decisions
|
|
97
|
+
- Component diagram
|
|
98
|
+
- Data flow overview
|
|
99
|
+
2. Create `draft-sdd.md` artifact
|
|
100
|
+
3. After approval → Save to `docs/030-Specs/Architecture/SDD-{ProjectName}.md`
|
|
101
|
+
4. **WAIT** for user response
|
|
181
102
|
|
|
182
103
|
---
|
|
183
104
|
|
|
184
|
-
## Step 4: Create Epics
|
|
105
|
+
## Step 4: Create Epics
|
|
185
106
|
|
|
186
|
-
**Role: Business Analyst**
|
|
187
107
|
// turbo
|
|
188
108
|
|
|
189
|
-
>
|
|
109
|
+
> 💡 **MCP**: Use `sequential-thinking` to analyze feature dependencies
|
|
190
110
|
|
|
191
|
-
1.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
2.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
- **Save to**: `docs/022-User-Stories/Epics/Epic-{FeatureName}.md` (one file per Epic)
|
|
198
|
-
4. **Present to User**:
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
✅ EPICS DRAFTED
|
|
202
|
-
────────────────
|
|
203
|
-
📝 Draft: artifact `draft-epics.md` (review & comment)
|
|
204
|
-
📄 Final: {N} files in docs/022-User-Stories/Epics/
|
|
205
|
-
|
|
206
|
-
👉 Review the draft. When ready:
|
|
207
|
-
[Approve & Continue / Request Changes / Stop Here]
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
5. **WAIT** for user response.
|
|
111
|
+
1. **Invoke `[business-analysis]` skill** to:
|
|
112
|
+
- Break PRD features into Epics
|
|
113
|
+
- Define high-level acceptance criteria
|
|
114
|
+
2. Create `draft-epics.md` artifact
|
|
115
|
+
3. After approval → Save to `docs/022-User-Stories/Epics/Epic-{FeatureName}.md`
|
|
116
|
+
4. **WAIT** for user response
|
|
211
117
|
|
|
212
118
|
---
|
|
213
119
|
|
|
214
|
-
## Step 5: Create Use Cases
|
|
120
|
+
## Step 5: Create Use Cases
|
|
215
121
|
|
|
216
|
-
**Role: Business Analyst**
|
|
217
122
|
// turbo
|
|
218
123
|
|
|
219
|
-
>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
✅ USE CASES DRAFTED
|
|
234
|
-
────────────────────
|
|
235
|
-
📝 Draft: artifact `draft-use-cases.md` (review & comment)
|
|
236
|
-
📄 Final: {N} files in docs/020-Requirements/Use-Cases/
|
|
237
|
-
|
|
238
|
-
👉 Review the draft. When ready:
|
|
239
|
-
[Approve & Continue / Request Changes / Stop Here]
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
5. **WAIT** for user response.
|
|
124
|
+
> 💡 **MCP**:
|
|
125
|
+
>
|
|
126
|
+
> - Use `sequential-thinking` for complex flow analysis
|
|
127
|
+
> - Use `context7` with `/mermaid-js/mermaid` for diagram syntax
|
|
128
|
+
|
|
129
|
+
1. **Invoke `[business-analysis]` skill** to detail:
|
|
130
|
+
- Happy path flow
|
|
131
|
+
- Alternative flows
|
|
132
|
+
- Edge cases and error handling
|
|
133
|
+
- Mermaid diagrams where helpful
|
|
134
|
+
2. Create `draft-use-cases.md` artifact
|
|
135
|
+
3. After approval → Save to `docs/020-Requirements/Use-Cases/UC-{NN}-{Name}.md`
|
|
136
|
+
4. **WAIT** for user response
|
|
243
137
|
|
|
244
138
|
---
|
|
245
139
|
|
|
246
|
-
## Step 6: Create User Stories
|
|
140
|
+
## Step 6: Create User Stories
|
|
247
141
|
|
|
248
|
-
**Role: Business Analyst**
|
|
249
142
|
// turbo
|
|
250
143
|
|
|
251
|
-
>
|
|
252
|
-
|
|
253
|
-
1. **Draft User Stories**: Break Use Cases into dev-ready stories
|
|
254
|
-
- Follow format: "As a [role], I want [action], so that [value]"
|
|
255
|
-
- Include clear Acceptance Criteria
|
|
256
|
-
- Estimate complexity (S/M/L)
|
|
257
|
-
2. **Create Draft Artifacts**:
|
|
258
|
-
- **→ Execute `write_to_file` to create artifact: `draft-user-stories.md`** for user review
|
|
259
|
-
3. **After User Approval**:
|
|
260
|
-
- **Save to**: `docs/022-User-Stories/Backlog/Story-{Name}.md`
|
|
261
|
-
4. **Present to User**:
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
✅ USER STORIES DRAFTED
|
|
265
|
-
───────────────────────
|
|
266
|
-
📝 Draft: artifact `draft-user-stories.md` (review & comment)
|
|
267
|
-
📄 Final: {N} files in docs/022-User-Stories/Backlog/
|
|
144
|
+
> 💡 **MCP**: Use `sequential-thinking` to derive acceptance criteria
|
|
268
145
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
5. **WAIT** for user response.
|
|
146
|
+
1. **Invoke `[business-analysis]` skill** to create:
|
|
147
|
+
- Stories in format: "As a [role], I want [action], so that [value]"
|
|
148
|
+
- Clear Acceptance Criteria
|
|
149
|
+
- Complexity estimates (S/M/L)
|
|
150
|
+
2. Create `draft-user-stories.md` artifact
|
|
151
|
+
3. After approval → Save to `docs/022-User-Stories/Backlog/Story-{Name}.md`
|
|
152
|
+
4. **WAIT** for user response - Ask if ADRs needed
|
|
277
153
|
|
|
278
154
|
---
|
|
279
155
|
|
|
280
|
-
## Step 7: Create ADRs (
|
|
156
|
+
## Step 7: Create ADRs (Optional)
|
|
281
157
|
|
|
282
|
-
**Role: Lead Architect**
|
|
283
158
|
// turbo
|
|
284
159
|
|
|
285
|
-
|
|
160
|
+
**Skip if**: User did not request ADRs in Step 6.
|
|
286
161
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
162
|
+
> 💡 **MCP**:
|
|
163
|
+
>
|
|
164
|
+
> - Use `sequential-thinking` to evaluate trade-offs
|
|
165
|
+
> - Use `context7` to research technology options
|
|
166
|
+
|
|
167
|
+
1. **Invoke `[lead-architect]` skill** to document:
|
|
168
|
+
- Context
|
|
169
|
+
- Options considered
|
|
170
|
+
- Decision made
|
|
171
|
+
- Consequences
|
|
172
|
+
2. Save to `docs/030-Specs/Architecture/ADR-{NNN}-{Decision}.md`
|
|
295
173
|
|
|
296
174
|
---
|
|
297
175
|
|
|
298
176
|
## Step 8: Finalize & Summary
|
|
299
177
|
|
|
300
|
-
**Role: Product Manager**
|
|
301
178
|
// turbo
|
|
302
179
|
|
|
303
|
-
1.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
✅ REQUIREMENT ANALYSIS COMPLETE
|
|
309
|
-
════════════════════════════════
|
|
310
|
-
|
|
311
|
-
📁 Documents Created:
|
|
312
|
-
├── Roadmap: docs/010-Planning/Roadmap-{ProjectName}.md
|
|
313
|
-
├── PRD: docs/020-Requirements/PRD-{ProjectName}.md
|
|
314
|
-
├── SDD: docs/030-Specs/Architecture/SDD-{ProjectName}.md
|
|
315
|
-
├── Epics: {N} files in docs/022-User-Stories/Epics/
|
|
316
|
-
├── Use Cases: {N} files in docs/020-Requirements/Use-Cases/
|
|
317
|
-
├── Stories: {N} files in docs/022-User-Stories/Backlog/
|
|
318
|
-
└── ADRs: {N} files in docs/030-Specs/Architecture/ (if any)
|
|
319
|
-
|
|
320
|
-
📋 Updated MOCs:
|
|
321
|
-
├── docs/010-Planning/Planning-MOC.md
|
|
322
|
-
├── docs/020-Requirements/Requirements-MOC.md
|
|
323
|
-
├── docs/022-User-Stories/Stories-MOC.md
|
|
324
|
-
└── docs/030-Specs/Specs-MOC.md
|
|
325
|
-
|
|
326
|
-
🚀 Next Steps:
|
|
327
|
-
1. Review documents for accuracy
|
|
328
|
-
2. Run /ui-ux-design-from-doc for design phase
|
|
329
|
-
3. Move Stories to Active-Sprint when ready
|
|
330
|
-
```
|
|
180
|
+
1. **Invoke `[product-manager]` skill** to:
|
|
181
|
+
- Update MOC files
|
|
182
|
+
- Add project section to `docs/000-Index.md`
|
|
183
|
+
2. Present final summary with all created documents
|
|
184
|
+
3. Suggest next steps: `/ui-ux-design` or `/implement-feature`
|
|
331
185
|
|
|
332
186
|
---
|
|
333
187
|
|
|
334
188
|
## Quick Reference
|
|
335
189
|
|
|
336
|
-
|
|
190
|
+
| Step | Skill | Output |
|
|
191
|
+
| ---- | ----------------- | -------------------------- |
|
|
192
|
+
| 0 | product-manager | clarification-questions.md |
|
|
193
|
+
| 1 | product-manager | Roadmap-{Project}.md |
|
|
194
|
+
| 2 | product-manager | PRD-{Project}.md |
|
|
195
|
+
| 3 | lead-architect | SDD-{Project}.md |
|
|
196
|
+
| 4 | business-analysis | Epic-{Feature}.md |
|
|
197
|
+
| 5 | business-analysis | UC-{NN}-{Name}.md |
|
|
198
|
+
| 6 | business-analysis | Story-{Name}.md |
|
|
199
|
+
| 7 | lead-architect | ADR-{NNN}-{Decision}.md |
|
|
200
|
+
| 8 | product-manager | Updated MOCs |
|
|
@@ -4,94 +4,87 @@ description: Initialize codebase and dependencies based on SDD/ADR
|
|
|
4
4
|
|
|
5
5
|
# Setup Codebase Workflow
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sets up project structure, installs dependencies, and configures environment based on architectural specs.
|
|
8
8
|
|
|
9
|
-
> [!
|
|
10
|
-
>
|
|
9
|
+
> [!IMPORTANT]
|
|
10
|
+
> **Prerequisite**: Ensure SDD exists in `docs/030-Specs/Architecture/`.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## MCP Usage Guidelines
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
| MCP Tool | When to Use |
|
|
17
|
+
| --------------------------------- | ---------------------------------- |
|
|
18
|
+
| `mcp_context7_resolve-library-id` | Find correct package names |
|
|
19
|
+
| `mcp_context7_query-docs` | Research installation/config steps |
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
- We will use `npx create-next-app` to set up the foundation.
|
|
20
|
-
- **Command**: `npx create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --yes`
|
|
21
|
-
- _Note_: If the directory is not empty, this command might prompt for confirmation or fail. Ensure you are ready to merge/overwrite.
|
|
21
|
+
---
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
- **→ Execute `run_command`**: `npx create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --yes`
|
|
23
|
+
## Step 1: Initialize Framework
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
// turbo
|
|
26
|
+
|
|
27
|
+
**Verification**: Check if directory is empty or safe to overwrite.
|
|
28
|
+
|
|
29
|
+
1. **Invoke `[devops-engineer]` skill** to:
|
|
30
|
+
- Initialize framework (e.g., Next.js, Vite) using `npx`
|
|
31
|
+
- Configure TypeScript, ESLint, TailwindCSS
|
|
32
|
+
2. **WAIT** for initialization to complete
|
|
27
33
|
|
|
28
34
|
---
|
|
29
35
|
|
|
30
|
-
## Step 2: Install
|
|
36
|
+
## Step 2: Install Core Dependencies
|
|
31
37
|
|
|
32
|
-
**Role: DevOps**
|
|
33
38
|
// turbo
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
- **→ Execute `run_command`**: `npm install zustand next-intl lucide-react clsx tailwind-merge`
|
|
40
|
+
> 💡 **MCP**: Use `context7` to finding verified package names
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
1. **Invoke `[devops-engineer]` skill** to install:
|
|
43
|
+
- State management (e.g., zustand, redux)
|
|
44
|
+
- Styling/UI (e.g., clsx, tailwind-merge, framer-motion)
|
|
45
|
+
- Data fetching/Backend (e.g., @supabase/supabase-js, react-query)
|
|
46
|
+
- Utilities (e.g., date-fns, zod)
|
|
47
|
+
2. **WAIT** for installation
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
- **→ Execute `run_command`**: `npm install @supabase/supabase-js @supabase/ssr`
|
|
49
|
+
---
|
|
43
50
|
|
|
44
|
-
|
|
45
|
-
- **→ Execute `run_command`**: `npm install phaser three @types/three @react-three/fiber @react-three/drei @monaco-editor/react`
|
|
51
|
+
## Step 3: Scaffold Architecture
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
// turbo
|
|
54
|
+
|
|
55
|
+
1. **Invoke `[lead-architect]` skill** to:
|
|
56
|
+
- Read SDD for module structure
|
|
57
|
+
- Create core directories (`src/components`, `src/lib`, `src/hooks`)
|
|
58
|
+
- Create feature modules (`src/features/`, `src/modules/`)
|
|
59
|
+
2. **WAIT** for structure creation
|
|
49
60
|
|
|
50
61
|
---
|
|
51
62
|
|
|
52
|
-
## Step
|
|
63
|
+
## Step 4: Configuration
|
|
53
64
|
|
|
54
|
-
**Role: Lead Architect**
|
|
55
65
|
// turbo
|
|
56
66
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
mkdir -p src/modules/visual-novel/components src/modules/visual-novel/engine src/modules/visual-novel/data
|
|
63
|
-
mkdir -p src/modules/simulation/components src/modules/simulation/scenes src/modules/simulation/entities
|
|
64
|
-
mkdir -p src/modules/code-editor/components src/modules/code-editor/sandbox src/modules/code-editor/challenges
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
2. **Create Core Directories**:
|
|
68
|
-
- **→ Execute `run_command`**:
|
|
69
|
-
```bash
|
|
70
|
-
mkdir -p src/components/ui src/components/layout
|
|
71
|
-
mkdir -p src/lib/supabase
|
|
72
|
-
mkdir -p src/store
|
|
73
|
-
mkdir -p src/types
|
|
74
|
-
mkdir -p src/hooks
|
|
75
|
-
```
|
|
67
|
+
1. **Invoke `[backend-developer]` skill** to:
|
|
68
|
+
- Setup `.env.example`
|
|
69
|
+
- Configure core utilities (`cn`, `API client`)
|
|
70
|
+
- Setup path aliases (`tsconfig.json`)
|
|
76
71
|
|
|
77
72
|
---
|
|
78
73
|
|
|
79
|
-
## Step
|
|
74
|
+
## Step 5: Verification
|
|
80
75
|
|
|
81
|
-
|
|
76
|
+
// turbo
|
|
82
77
|
|
|
83
|
-
1.
|
|
84
|
-
|
|
85
|
-
2. **Setup Utility Helper**:
|
|
86
|
-
- **→ Execute `write_to_file`**: Create `src/lib/utils.ts` with `clsx` and `tailwind-merge` utility.
|
|
78
|
+
1. Run `npm run build` to verify configuration
|
|
79
|
+
2. Verify directory structure matches SDD
|
|
87
80
|
|
|
88
81
|
---
|
|
89
82
|
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
**Role: QA**
|
|
83
|
+
## Quick Reference
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
85
|
+
| Step | Skill | Action |
|
|
86
|
+
| ---- | ----------------- | ---------------- |
|
|
87
|
+
| 1 | devops-engineer | Init framework |
|
|
88
|
+
| 2 | devops-engineer | Install deps |
|
|
89
|
+
| 3 | lead-architect | Create folders |
|
|
90
|
+
| 4 | backend-developer | Config env/utils |
|