project-iris 0.2.3 → 0.3.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/flows/aidlc/commands/construction-agent.md +1 -1
- package/flows/aidlc/commands/operations-agent.md +1 -0
- package/flows/aidlc/skills/construction/bolt-start.md +70 -5
- package/flows/aidlc/skills/inception/story-create.md +60 -0
- package/flows/aidlc/skills/inception/units.md +52 -1
- package/flows/aidlc/skills/master/project-init.md +36 -6
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +76 -17
- package/flows/aidlc/templates/standards/api-conventions.guide.md +305 -0
- package/flows/aidlc/templates/standards/system-architecture.guide.md +268 -0
- package/flows/aidlc/templates/standards/ux-guide.guide.md +231 -0
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ You are now the **Construction Agent** for iris AI-DLC.
|
|
|
35
35
|
- **List Bolts**: `.iris/aidlc/skills/construction/bolt-list.md` → View all bolts
|
|
36
36
|
- **Bolt Status**: `.iris/aidlc/skills/construction/bolt-status.md` → Detailed bolt status
|
|
37
37
|
- **Start/Continue Bolt**: `.iris/aidlc/skills/construction/bolt-start.md` → Execute bolt stages
|
|
38
|
-
- **
|
|
38
|
+
- **Replan Bolts**: `.iris/aidlc/skills/construction/bolt-replan.md` → Modify bolt plan during construction
|
|
39
39
|
- **Menu**: `.iris/aidlc/skills/construction/navigator.md` → Show skills
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -36,6 +36,7 @@ You are now the **Operations Agent** for iris AI-DLC.
|
|
|
36
36
|
- **Deploy**: `.iris/aidlc/skills/operations/deploy.md` → Deploy to environment
|
|
37
37
|
- **Verify**: `.iris/aidlc/skills/operations/verify.md` → Validate deployment
|
|
38
38
|
- **Monitor**: `.iris/aidlc/skills/operations/monitor.md` → Setup observability
|
|
39
|
+
- **Rollback**: `.iris/aidlc/skills/operations/rollback.md` → Rollback deployment
|
|
39
40
|
- **Menu**: `.iris/aidlc/skills/operations/navigator.md` → Show skills
|
|
40
41
|
|
|
41
42
|
---
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
- ✅ Checkpoint prompts clear and actionable
|
|
22
22
|
- ✅ Code references stories (comments: `// Story: S-XXX`)
|
|
23
23
|
- ✅ Tests reference acceptance criteria they verify
|
|
24
|
+
- ✅ **Stories processed sequentially in code generation stages**
|
|
25
|
+
- ✅ **Story progress list shown during execution**
|
|
26
|
+
- ✅ **stories_progress updated in bolt file after each story**
|
|
24
27
|
|
|
25
28
|
## Failure Modes
|
|
26
29
|
|
|
@@ -30,6 +33,9 @@
|
|
|
30
33
|
- ❌ Not reading bolt type definition first
|
|
31
34
|
- ❌ Code without story traceability comments
|
|
32
35
|
- ❌ Tests without acceptance criteria references
|
|
36
|
+
- ❌ **Implementing all stories at once without tracking progress**
|
|
37
|
+
- ❌ **Not showing story progress during code generation**
|
|
38
|
+
- ❌ **Stories implemented out of order without justification**
|
|
33
39
|
|
|
34
40
|
---
|
|
35
41
|
|
|
@@ -194,19 +200,75 @@ For the current stage, follow the bolt type definition:
|
|
|
194
200
|
{From bolt type definition}
|
|
195
201
|
|
|
196
202
|
### Stories in Scope
|
|
197
|
-
{From bolt instance}
|
|
203
|
+
{From bolt instance - show with status}
|
|
204
|
+
- [ ] 001-story-one (pending)
|
|
205
|
+
- [ ] 002-story-two (pending)
|
|
198
206
|
```
|
|
199
207
|
|
|
200
208
|
2. **Perform Activities**:
|
|
201
209
|
- Follow bolt type's activity instructions exactly
|
|
202
210
|
- Create artifacts as specified
|
|
203
211
|
- Respect constraints (e.g., "no code in this stage")
|
|
212
|
+
- **For code generation stages**: Follow story-by-story execution (see 7b)
|
|
204
213
|
|
|
205
214
|
3. **Generate Outputs**:
|
|
206
215
|
- Create specified output artifacts
|
|
207
216
|
- Use templates if specified by bolt type
|
|
208
217
|
- Place in correct paths per schema
|
|
209
218
|
|
|
219
|
+
### 7b. Story-by-Story Execution (Code Generation Stages)
|
|
220
|
+
|
|
221
|
+
**⛔ CRITICAL**: When executing stages that involve code generation (e.g., Stage 4 in DDD bolts), process stories SEQUENTIALLY:
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
225
|
+
│ STORY-BY-STORY EXECUTION │
|
|
226
|
+
│ │
|
|
227
|
+
│ For EACH story in bolt's stories array: │
|
|
228
|
+
│ 1. Announce: "⏳ Story {n}/{total}: {story-id}" │
|
|
229
|
+
│ 2. Read story file for acceptance criteria │
|
|
230
|
+
│ 3. Implement code for that story │
|
|
231
|
+
│ 4. Update stories_progress in bolt file │
|
|
232
|
+
│ 5. Announce: "✅ Story {story-id}: Implemented" │
|
|
233
|
+
│ │
|
|
234
|
+
│ DO NOT batch implement - track each story individually! │
|
|
235
|
+
└─────────────────────────────────────────────────────────────┘
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Story Progress Display (show after each story)**:
|
|
239
|
+
|
|
240
|
+
```markdown
|
|
241
|
+
### Story Progress ({completed}/{total})
|
|
242
|
+
|
|
243
|
+
1. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
244
|
+
2. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
245
|
+
3. ⏳ **{SSS}-{story-slug}**: In Progress
|
|
246
|
+
4. [ ] **{SSS}-{story-slug}**: Pending
|
|
247
|
+
5. [ ] **{SSS}-{story-slug}**: Pending
|
|
248
|
+
6. [ ] **{SSS}-{story-slug}**: Pending
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Update bolt file after each story:**
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
stories_progress:
|
|
255
|
+
- id: 001-database-init
|
|
256
|
+
status: completed
|
|
257
|
+
implemented_at: {timestamp}
|
|
258
|
+
- id: 002-schema-tables
|
|
259
|
+
status: completed
|
|
260
|
+
implemented_at: {timestamp}
|
|
261
|
+
- id: 003-crud-operations
|
|
262
|
+
status: in-progress
|
|
263
|
+
- id: 004-query-helpers
|
|
264
|
+
status: pending
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
This ensures:
|
|
268
|
+
- Clear visibility into which story is being worked on
|
|
269
|
+
- Ability to resume if interrupted
|
|
270
|
+
- Validation that all stories are addressed
|
|
271
|
+
|
|
210
272
|
### 8. Handle Checkpoints (As Defined by Bolt Type)
|
|
211
273
|
|
|
212
274
|
The bolt type definition specifies:
|
|
@@ -400,6 +462,13 @@ If construction log doesn't exist, create it using template:
|
|
|
400
462
|
**Type**: {bolt-type}
|
|
401
463
|
**Progress**: Stage {n} of {total}
|
|
402
464
|
|
|
465
|
+
### Story Progress ({completed}/{total})
|
|
466
|
+
|
|
467
|
+
1. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
468
|
+
2. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
469
|
+
3. ⏳ **{SSS}-{story-slug}**: In Progress
|
|
470
|
+
4. [ ] **{SSS}-{story-slug}**: Pending
|
|
471
|
+
|
|
403
472
|
### Activities Performed
|
|
404
473
|
1. ✅ {activity 1}
|
|
405
474
|
2. ✅ {activity 2}
|
|
@@ -408,10 +477,6 @@ If construction log doesn't exist, create it using template:
|
|
|
408
477
|
### Artifacts Created
|
|
409
478
|
- `{path/to/artifact}` - {description}
|
|
410
479
|
|
|
411
|
-
### Stories Addressed
|
|
412
|
-
- ✅ **{SSS}-{story-slug}**: {criteria} - Complete
|
|
413
|
-
- ⏳ **{SSS}-{story-slug}**: {criteria} - In Progress
|
|
414
|
-
|
|
415
480
|
---
|
|
416
481
|
|
|
417
482
|
### Checkpoint (if defined by bolt type)
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
- ✅ Each story has: User Story format, Acceptance Criteria, Priority
|
|
18
18
|
- ✅ story-index.md updated with ✅ GENERATED markers
|
|
19
19
|
- ✅ Unit-brief.md updated with story summary
|
|
20
|
+
- ✅ **All assigned FRs have corresponding stories (validation passed)**
|
|
21
|
+
- ✅ **FR-to-story mapping shown in output**
|
|
20
22
|
|
|
21
23
|
## Failure Modes
|
|
22
24
|
|
|
@@ -24,6 +26,8 @@
|
|
|
24
26
|
- ❌ Missing acceptance criteria in stories
|
|
25
27
|
- ❌ Not updating story-index.md
|
|
26
28
|
- ❌ Stories without INVEST criteria validation
|
|
29
|
+
- ❌ **Assigned FRs without corresponding stories**
|
|
30
|
+
- ❌ **Proceeding without FR-to-story validation**
|
|
27
31
|
|
|
28
32
|
---
|
|
29
33
|
|
|
@@ -144,6 +148,54 @@ Organize stories for bolt planning:
|
|
|
144
148
|
- **Should**: Important but not blocking (Error handling, validation)
|
|
145
149
|
- **Could**: Nice to have (Advanced features, optimizations)
|
|
146
150
|
|
|
151
|
+
### 4b. Validate FR-to-Story Coverage (CRITICAL - HARD GATE)
|
|
152
|
+
|
|
153
|
+
**⛔ HARD GATE**: Before creating story files, validate that ALL assigned FRs have stories.
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
157
|
+
│ FR-TO-STORY COVERAGE VALIDATION │
|
|
158
|
+
│ → Read "Assigned Requirements" from unit-brief.md │
|
|
159
|
+
│ → Check each FR has at least one story │
|
|
160
|
+
│ → If any FR is uncovered: STOP and create stories for it │
|
|
161
|
+
└─────────────────────────────────────────────────────────────┘
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Validation output:**
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
## FR-to-Story Coverage
|
|
168
|
+
|
|
169
|
+
### Assigned FRs from Unit Brief
|
|
170
|
+
- **FR-1**: {description}
|
|
171
|
+
- **FR-2**: {description}
|
|
172
|
+
- **FR-N**: {description}
|
|
173
|
+
|
|
174
|
+
### Coverage Check
|
|
175
|
+
|
|
176
|
+
- ✅ **FR-1**: {description} → `{SSS}-{story-slug}`, `{SSS}-{story-slug}`
|
|
177
|
+
- ✅ **FR-2**: {description} → `{SSS}-{story-slug}`
|
|
178
|
+
- ❌ **FR-3**: {description} → UNCOVERED
|
|
179
|
+
|
|
180
|
+
### Validation Result
|
|
181
|
+
- ✅ All FRs covered by stories (proceed)
|
|
182
|
+
- ❌ {n} FRs uncovered - MUST create stories before proceeding:
|
|
183
|
+
- FR-X: {description} - NEEDS STORY
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**If any FRs are uncovered:**
|
|
187
|
+
|
|
188
|
+
1. **DO NOT PROCEED** to creating story files
|
|
189
|
+
2. Create stories for uncovered FRs
|
|
190
|
+
3. Re-run validation until all FRs are covered
|
|
191
|
+
|
|
192
|
+
**Important Notes:**
|
|
193
|
+
|
|
194
|
+
- One FR can map to multiple stories (complex features)
|
|
195
|
+
- Multiple FRs can map to one story (closely related features)
|
|
196
|
+
- Every FR MUST have at least one story
|
|
197
|
+
- This validation catches FRs that were "lost" during decomposition
|
|
198
|
+
|
|
147
199
|
### 5. Document Stories
|
|
148
200
|
|
|
149
201
|
1. **Read Path**: Check `schema.stories` from `.iris/aidlc/memory-bank.yaml`
|
|
@@ -294,6 +346,14 @@ This ensures each unit-brief shows its story count at a glance.
|
|
|
294
346
|
```markdown
|
|
295
347
|
## Stories Created: {unit-name}
|
|
296
348
|
|
|
349
|
+
### FR-to-Story Coverage ✅
|
|
350
|
+
|
|
351
|
+
- ✅ **FR-1**: {description} → `{SSS}-{story-slug}`, `{SSS}-{story-slug}`
|
|
352
|
+
- ✅ **FR-2**: {description} → `{SSS}-{story-slug}`
|
|
353
|
+
- ✅ **FR-3**: {description} → `{SSS}-{story-slug}`
|
|
354
|
+
|
|
355
|
+
**All {n} assigned FRs have corresponding stories.**
|
|
356
|
+
|
|
297
357
|
### Story Summary
|
|
298
358
|
|
|
299
359
|
- [ ] **S1**: User can register - Must - No dependencies
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
- ✅ Unit directories created with unit-brief.md files
|
|
17
17
|
- ✅ Dependency graph shown visually
|
|
18
|
-
- ✅ All FRs mapped to exactly one unit
|
|
18
|
+
- ✅ **All FRs mapped to exactly one unit (validation passed)**
|
|
19
|
+
- ✅ FR coverage validation output shown
|
|
19
20
|
- ✅ Frontend unit included if enabled in project type
|
|
20
21
|
|
|
21
22
|
## Failure Modes
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
- ❌ Using ASCII table for unit listing
|
|
24
25
|
- ❌ Not reading project type configuration
|
|
25
26
|
- ❌ FRs not mapped to units
|
|
27
|
+
- ❌ **Proceeding without FR coverage validation**
|
|
28
|
+
- ❌ **Unmapped FRs not flagged**
|
|
26
29
|
- ❌ Missing unit-brief.md files
|
|
27
30
|
|
|
28
31
|
---
|
|
@@ -149,6 +152,54 @@ This mapping ensures:
|
|
|
149
152
|
- Units have clear scope based on assigned FRs
|
|
150
153
|
- Stories will be created from unit's assigned FRs (not directly from intent)
|
|
151
154
|
|
|
155
|
+
### 4b. Validate FR Coverage (CRITICAL - HARD GATE)
|
|
156
|
+
|
|
157
|
+
**⛔ HARD GATE**: Before proceeding, validate that ALL FRs are mapped.
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
161
|
+
│ FR COVERAGE VALIDATION │
|
|
162
|
+
│ → Count FRs in requirements.md │
|
|
163
|
+
│ → Count FRs in mapping │
|
|
164
|
+
│ → If mismatch: STOP and fix before proceeding │
|
|
165
|
+
└─────────────────────────────────────────────────────────────┘
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Validation output:**
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## FR Coverage Validation
|
|
172
|
+
|
|
173
|
+
### Requirements Count
|
|
174
|
+
- **Total FRs in requirements.md**: {n}
|
|
175
|
+
- **Must Have**: {n}
|
|
176
|
+
- **Should Have**: {n}
|
|
177
|
+
- **Could Have**: {n}
|
|
178
|
+
|
|
179
|
+
### Mapping Count
|
|
180
|
+
- **FRs mapped to units**: {n}
|
|
181
|
+
- **FRs unmapped**: {list or "None"}
|
|
182
|
+
|
|
183
|
+
### Validation Result
|
|
184
|
+
- ✅ All FRs mapped (proceed to next step)
|
|
185
|
+
- ❌ {n} FRs unmapped - MUST fix before proceeding:
|
|
186
|
+
- FR-X: {description} - NOT MAPPED
|
|
187
|
+
- FR-Y: {description} - NOT MAPPED
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**If any FRs are unmapped:**
|
|
191
|
+
|
|
192
|
+
1. **DO NOT PROCEED** to creating unit directories
|
|
193
|
+
2. Review unmapped FRs and assign them to appropriate units
|
|
194
|
+
3. Re-run validation until all FRs are mapped
|
|
195
|
+
|
|
196
|
+
**Common reasons for unmapped FRs:**
|
|
197
|
+
|
|
198
|
+
- FR was overlooked during domain analysis
|
|
199
|
+
- FR spans multiple bounded contexts (split or create integration unit)
|
|
200
|
+
- FR is an NFR incorrectly labeled as FR (move to NFRs)
|
|
201
|
+
- FR is duplicate (merge with existing)
|
|
202
|
+
|
|
152
203
|
### 5. Create Frontend Unit (if enabled)
|
|
153
204
|
|
|
154
205
|
**Skip this step if `frontend.enabled: false`.**
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
- ✅ project.yaml created with project type AND scenario (greenfield/brownfield/hybrid)
|
|
17
17
|
- ✅ Scenario detected automatically with user confirmation
|
|
18
|
+
- ✅ .gitignore updated with AI-DLC tooling entries
|
|
18
19
|
- ✅ Standards created in correct order (dependencies respected)
|
|
19
20
|
- ✅ Each question is single-focus (not combined)
|
|
20
21
|
- ✅ Final summary shows all created/skipped standards
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
- ❌ Creating standard before its dependencies
|
|
27
28
|
- ❌ Not creating project.yaml
|
|
28
29
|
- ❌ Not detecting/asking about greenfield vs brownfield scenario
|
|
30
|
+
- ❌ Not updating .gitignore with AI-DLC tooling entries
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
@@ -125,9 +127,9 @@ This appears to be a **brownfield** project (enhancing existing code).
|
|
|
125
127
|
2. **Greenfield** - No, ignore existing code, starting fresh
|
|
126
128
|
3. **Hybrid** - Some features will modify existing, some are new
|
|
127
129
|
|
|
128
|
-
This affects
|
|
129
|
-
- **Brownfield**:
|
|
130
|
-
- **Greenfield**:
|
|
130
|
+
This affects the development flow:
|
|
131
|
+
- **Brownfield**: Master Agent runs code elevation first to understand existing structure
|
|
132
|
+
- **Greenfield**: Construction Agent starts fresh with domain modeling
|
|
131
133
|
- **Hybrid**: Asks per-intent which flow to use
|
|
132
134
|
```
|
|
133
135
|
|
|
@@ -185,6 +187,33 @@ existing_codebase:
|
|
|
185
187
|
|
|
186
188
|
This file MUST be created before proceeding to standards facilitation, as other agents (e.g., Inception, Construction) read it to provide context-aware behavior.
|
|
187
189
|
|
|
190
|
+
### 4b. Update .gitignore
|
|
191
|
+
|
|
192
|
+
**Add AI-DLC tooling entries to `.gitignore`** to keep the product repository clean.
|
|
193
|
+
|
|
194
|
+
#### If `.gitignore` exists:
|
|
195
|
+
|
|
196
|
+
Check if entries already exist. If not, append:
|
|
197
|
+
|
|
198
|
+
```gitignore
|
|
199
|
+
|
|
200
|
+
# AI-DLC tooling (iris, claude)
|
|
201
|
+
.iris/
|
|
202
|
+
.claude/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### If `.gitignore` doesn't exist:
|
|
206
|
+
|
|
207
|
+
Create it with:
|
|
208
|
+
|
|
209
|
+
```gitignore
|
|
210
|
+
# AI-DLC tooling (iris, claude)
|
|
211
|
+
.iris/
|
|
212
|
+
.claude/
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Note**: `memory-bank/` is NOT gitignored - it contains valuable project specifications (PRFAQ, intents, stories, standards) that should be version controlled.
|
|
216
|
+
|
|
188
217
|
### 5. Check Existing Standards
|
|
189
218
|
|
|
190
219
|
Before creating new standards, check if any exist:
|
|
@@ -314,6 +343,7 @@ After completing all standards:
|
|
|
314
343
|
- **Type**: {project type} (e.g., full-stack-web)
|
|
315
344
|
- **Scenario**: {scenario} (greenfield/brownfield/hybrid)
|
|
316
345
|
- **Config**: `memory-bank/project.yaml`
|
|
346
|
+
- **Gitignore**: `.gitignore` updated with AI-DLC tooling entries
|
|
317
347
|
|
|
318
348
|
### Standards Created
|
|
319
349
|
|
|
@@ -337,9 +367,9 @@ Your project is configured as a **{project type}** ({scenario}) using:
|
|
|
337
367
|
- Use your chosen libraries and patterns
|
|
338
368
|
- Follow your testing strategy
|
|
339
369
|
|
|
340
|
-
**Scenario** -
|
|
341
|
-
- {If greenfield}:
|
|
342
|
-
- {If brownfield}:
|
|
370
|
+
**Scenario** - Development flow:
|
|
371
|
+
- {If greenfield}: Construction Agent starts with domain modeling (fresh design)
|
|
372
|
+
- {If brownfield}: Master Agent runs code elevation first (analyze existing code)
|
|
343
373
|
- {If hybrid}: Ask per-intent which flow to use
|
|
344
374
|
|
|
345
375
|
### Actions
|
|
@@ -349,18 +349,45 @@ Implement CQRS pattern with separate read models for task queries.
|
|
|
349
349
|
- **REQUIRED**: Load all bolt folder artifacts (see Bolt Context Loading section)
|
|
350
350
|
- **OUTPUT**: Source code based on design docs
|
|
351
351
|
|
|
352
|
-
**
|
|
352
|
+
**⛔ CRITICAL: Story-by-Story Execution**
|
|
353
|
+
|
|
354
|
+
```text
|
|
355
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
356
|
+
│ STORY-BY-STORY EXECUTION MODE │
|
|
357
|
+
│ │
|
|
358
|
+
│ Stories MUST be implemented SEQUENTIALLY: │
|
|
359
|
+
│ 1. Read bolt's stories array │
|
|
360
|
+
│ 2. For each story in order: │
|
|
361
|
+
│ a. Announce: "Implementing Story: {story-id}" │
|
|
362
|
+
│ b. Read story file for acceptance criteria │
|
|
363
|
+
│ c. Implement code for that story │
|
|
364
|
+
│ d. Update story status in bolt tracking │
|
|
365
|
+
│ e. Show: "Story {story-id}: ✅ Implemented" │
|
|
366
|
+
│ 3. After ALL stories: proceed to checkpoint │
|
|
367
|
+
│ │
|
|
368
|
+
│ DO NOT implement all stories at once without tracking! │
|
|
369
|
+
└─────────────────────────────────────────────────────────────┘
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Story Execution Order:**
|
|
373
|
+
|
|
374
|
+
1. Read `stories` array from bolt.md frontmatter
|
|
375
|
+
2. Process stories in the order listed (this order respects dependencies)
|
|
376
|
+
3. For each story, implement the code needed to satisfy its acceptance criteria
|
|
377
|
+
4. Track progress visibly to user
|
|
378
|
+
|
|
379
|
+
**Activities** (performed FOR EACH STORY):
|
|
353
380
|
|
|
354
|
-
1 - **
|
|
355
|
-
2 - **
|
|
356
|
-
3 - **Implement
|
|
357
|
-
4 - **
|
|
358
|
-
5 - **
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
381
|
+
1 - **Announce story**: Display "⏳ Implementing Story: {story-id}: {title}"
|
|
382
|
+
2 - **Read story file**: Load `stories/{story-id}.md` for acceptance criteria
|
|
383
|
+
3 - **Implement code**: Create/modify code to satisfy acceptance criteria
|
|
384
|
+
4 - **Add traceability**: Add `// Story: {story-id}` comments to code
|
|
385
|
+
5 - **Mark progress**: Display "✅ Story {story-id}: Implemented"
|
|
386
|
+
|
|
387
|
+
**After ALL stories are implemented:**
|
|
388
|
+
|
|
389
|
+
6 - **Setup project structure**: Verify scaffolding exists
|
|
390
|
+
7 - **Run code quality validation**: Execute linting, type checking, build
|
|
364
391
|
|
|
365
392
|
**Artifact**: Source code in unit directory
|
|
366
393
|
**Location**: `src/{unit}/` or as defined in project structure
|
|
@@ -405,6 +432,7 @@ src/{unit}/
|
|
|
405
432
|
|
|
406
433
|
**Completion Criteria**:
|
|
407
434
|
|
|
435
|
+
- [ ] **All stories implemented in order** (see Story Progress below)
|
|
408
436
|
- [ ] All domain models implemented
|
|
409
437
|
- [ ] All use cases implemented
|
|
410
438
|
- [ ] All API endpoints implemented
|
|
@@ -422,6 +450,15 @@ src/{unit}/
|
|
|
422
450
|
```text
|
|
423
451
|
## Stage 4 Complete: Code Generation
|
|
424
452
|
|
|
453
|
+
### Story Progress ({n}/{n})
|
|
454
|
+
|
|
455
|
+
1. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
456
|
+
2. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
457
|
+
3. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
458
|
+
4. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
459
|
+
5. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
460
|
+
6. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
|
|
461
|
+
|
|
425
462
|
### Code Generated
|
|
426
463
|
- {n} domain entities
|
|
427
464
|
- {n} use cases
|
|
@@ -433,9 +470,8 @@ src/{unit}/
|
|
|
433
470
|
- ✅ Build: Passed
|
|
434
471
|
- ✅ Traceability: All files linked to stories
|
|
435
472
|
|
|
436
|
-
###
|
|
437
|
-
|
|
438
|
-
- S-002: {files implementing}
|
|
473
|
+
### Acceptance Criteria Preview
|
|
474
|
+
Each story's ACs will be validated in Stage 5 (Testing).
|
|
439
475
|
|
|
440
476
|
Ready to proceed to testing?
|
|
441
477
|
1 - Yes, continue to Stage 5
|
|
@@ -560,19 +596,42 @@ Story S-002: Password Reset
|
|
|
560
596
|
|
|
561
597
|
## State Tracking
|
|
562
598
|
|
|
563
|
-
Bolt instance tracks progress:
|
|
599
|
+
Bolt instance tracks progress at both stage and story level:
|
|
564
600
|
|
|
565
601
|
```yaml
|
|
566
602
|
---
|
|
567
|
-
current_stage:
|
|
603
|
+
current_stage: code
|
|
568
604
|
stages_completed:
|
|
569
|
-
- name:
|
|
605
|
+
- name: domain-design
|
|
570
606
|
completed: 2024-12-05T10:00:00Z
|
|
571
607
|
artifact: ddd-01-domain-design.md
|
|
608
|
+
- name: logical-design
|
|
609
|
+
completed: 2024-12-05T12:00:00Z
|
|
610
|
+
artifact: ddd-02-logical-design.md
|
|
572
611
|
status: in-progress
|
|
612
|
+
|
|
613
|
+
# Story-level tracking (updated during Stage 4)
|
|
614
|
+
stories_progress:
|
|
615
|
+
- id: 001-database-init
|
|
616
|
+
status: completed
|
|
617
|
+
implemented_at: 2024-12-05T14:00:00Z
|
|
618
|
+
- id: 002-schema-tables
|
|
619
|
+
status: completed
|
|
620
|
+
implemented_at: 2024-12-05T14:30:00Z
|
|
621
|
+
- id: 003-crud-operations
|
|
622
|
+
status: in-progress
|
|
623
|
+
- id: 004-query-helpers
|
|
624
|
+
status: pending
|
|
573
625
|
---
|
|
574
626
|
```
|
|
575
627
|
|
|
628
|
+
**Story status values:**
|
|
629
|
+
|
|
630
|
+
- `pending` - Not yet started
|
|
631
|
+
- `in-progress` - Currently being implemented
|
|
632
|
+
- `completed` - Implementation done (not yet tested)
|
|
633
|
+
- `verified` - Tests passing (after Stage 5)
|
|
634
|
+
|
|
576
635
|
---
|
|
577
636
|
|
|
578
637
|
## Bolt Context Loading
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# API Conventions Facilitation Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define the API design conventions, response formats, and standards that will guide how APIs are built, ensuring consistency and predictability for API consumers.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Facilitation Approach
|
|
10
|
+
|
|
11
|
+
You are collaborating with a peer to discover their API design preferences. This is relevant for projects with backend APIs.
|
|
12
|
+
|
|
13
|
+
**Adapt your style:**
|
|
14
|
+
|
|
15
|
+
- If they have existing APIs → focus on consistency with what exists
|
|
16
|
+
- If they're building public APIs → emphasize documentation and stability
|
|
17
|
+
- If they're building internal APIs → focus on developer experience
|
|
18
|
+
|
|
19
|
+
**Your role:**
|
|
20
|
+
|
|
21
|
+
- Guide discovery, don't dictate choices
|
|
22
|
+
- Surface tradeoffs between simplicity and flexibility
|
|
23
|
+
- Ensure choices work with their tech stack
|
|
24
|
+
- Capture rationale, not just the choice
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Discovery Areas
|
|
29
|
+
|
|
30
|
+
### 1. API Style
|
|
31
|
+
|
|
32
|
+
**Goal**: Understand the fundamental API approach.
|
|
33
|
+
|
|
34
|
+
**Open with context:**
|
|
35
|
+
> "Let's talk about how your API will be structured. This affects how clients interact with it, how it's documented, and how it evolves over time."
|
|
36
|
+
|
|
37
|
+
**Explore:**
|
|
38
|
+
|
|
39
|
+
- Who will consume this API? (Internal frontend, mobile apps, third parties)
|
|
40
|
+
- What kind of operations? (CRUD, complex queries, real-time)
|
|
41
|
+
- Is this public or internal?
|
|
42
|
+
- Do they have existing API patterns to follow?
|
|
43
|
+
|
|
44
|
+
**Guide by use case:**
|
|
45
|
+
|
|
46
|
+
| Use Case | Recommendation | Why |
|
|
47
|
+
|----------|----------------|-----|
|
|
48
|
+
| Simple CRUD | REST | Well understood, great tooling |
|
|
49
|
+
| Complex queries | GraphQL | Flexible queries, single endpoint |
|
|
50
|
+
| Internal services | REST or tRPC | tRPC for TypeScript full-stack |
|
|
51
|
+
| Public API | REST with OpenAPI | Documentation, client generation |
|
|
52
|
+
| Mobile + Web | REST or GraphQL | GraphQL avoids over-fetching |
|
|
53
|
+
| Microservices (internal) | gRPC | Performance, type safety |
|
|
54
|
+
|
|
55
|
+
**REST vs GraphQL vs tRPC:**
|
|
56
|
+
|
|
57
|
+
| Aspect | REST | GraphQL | tRPC |
|
|
58
|
+
|--------|------|---------|------|
|
|
59
|
+
| Learning curve | Low | Medium | Low (TypeScript) |
|
|
60
|
+
| Flexibility | Endpoints per resource | Single endpoint, flexible queries | Full type safety |
|
|
61
|
+
| Caching | HTTP caching | Requires custom | N/A (internal) |
|
|
62
|
+
| Best for | Public APIs, simple apps | Complex UIs, mobile | TypeScript monorepos |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### 2. API Versioning
|
|
67
|
+
|
|
68
|
+
**Goal**: Understand how they'll handle API evolution.
|
|
69
|
+
|
|
70
|
+
**Explore:**
|
|
71
|
+
|
|
72
|
+
- Is this a public API that needs stability?
|
|
73
|
+
- How often do they expect breaking changes?
|
|
74
|
+
- Who are the consumers? (Internal team vs. external developers)
|
|
75
|
+
|
|
76
|
+
**Options:**
|
|
77
|
+
|
|
78
|
+
| Strategy | Example | Best For |
|
|
79
|
+
|----------|---------|----------|
|
|
80
|
+
| URL versioning | `/api/v1/users` | Public APIs, clear separation |
|
|
81
|
+
| Header versioning | `Accept: application/vnd.api.v1+json` | Cleaner URLs |
|
|
82
|
+
| No versioning | Just `/api/users` | Internal APIs, rapid iteration |
|
|
83
|
+
| Query param | `/api/users?version=1` | Less common, avoid |
|
|
84
|
+
|
|
85
|
+
**Recommendations:**
|
|
86
|
+
|
|
87
|
+
- **Public API**: URL versioning (`/api/v1/`) - clear and obvious
|
|
88
|
+
- **Internal API**: No versioning initially, add when needed
|
|
89
|
+
- **Evolving API**: Use backward-compatible changes when possible
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### 3. Response Format
|
|
94
|
+
|
|
95
|
+
**Goal**: Understand the structure of API responses.
|
|
96
|
+
|
|
97
|
+
**Explore:**
|
|
98
|
+
|
|
99
|
+
- Do they need pagination? (Lists of items)
|
|
100
|
+
- How should errors be returned?
|
|
101
|
+
- Is there metadata needed? (Request IDs, timing)
|
|
102
|
+
|
|
103
|
+
**Standard patterns:**
|
|
104
|
+
|
|
105
|
+
**Single resource:**
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"data": {
|
|
109
|
+
"id": "123",
|
|
110
|
+
"name": "Example"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Collection with pagination:**
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"data": [...],
|
|
119
|
+
"pagination": {
|
|
120
|
+
"page": 1,
|
|
121
|
+
"per_page": 20,
|
|
122
|
+
"total": 100,
|
|
123
|
+
"total_pages": 5
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Or cursor-based:**
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"data": [...],
|
|
132
|
+
"pagination": {
|
|
133
|
+
"cursor": "abc123",
|
|
134
|
+
"has_more": true
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Recommendations:**
|
|
140
|
+
|
|
141
|
+
- Wrap responses in `data` for consistency
|
|
142
|
+
- Use cursor pagination for large/real-time datasets
|
|
143
|
+
- Use page pagination for smaller, static datasets
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### 4. Error Response Format
|
|
148
|
+
|
|
149
|
+
**Goal**: Understand how errors will be communicated.
|
|
150
|
+
|
|
151
|
+
**Explore:**
|
|
152
|
+
|
|
153
|
+
- Do they need error codes for client handling?
|
|
154
|
+
- How detailed should errors be? (Security vs. debugging)
|
|
155
|
+
- Is this for developers or end users?
|
|
156
|
+
|
|
157
|
+
**Standard pattern:**
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"error": {
|
|
161
|
+
"code": "VALIDATION_ERROR",
|
|
162
|
+
"message": "Validation failed",
|
|
163
|
+
"details": [
|
|
164
|
+
{
|
|
165
|
+
"field": "email",
|
|
166
|
+
"message": "Invalid email format"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**HTTP status codes to use:**
|
|
174
|
+
|
|
175
|
+
| Status | Use For |
|
|
176
|
+
|--------|---------|
|
|
177
|
+
| 200 | Success |
|
|
178
|
+
| 201 | Created |
|
|
179
|
+
| 204 | No content (delete) |
|
|
180
|
+
| 400 | Bad request (validation) |
|
|
181
|
+
| 401 | Unauthorized |
|
|
182
|
+
| 403 | Forbidden |
|
|
183
|
+
| 404 | Not found |
|
|
184
|
+
| 409 | Conflict |
|
|
185
|
+
| 422 | Unprocessable entity |
|
|
186
|
+
| 500 | Server error |
|
|
187
|
+
|
|
188
|
+
**Recommendations:**
|
|
189
|
+
|
|
190
|
+
- Always include an error `code` for programmatic handling
|
|
191
|
+
- Include `message` for human-readable description
|
|
192
|
+
- Include `details` for validation errors
|
|
193
|
+
- Don't expose stack traces in production
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 5. Pagination Strategy
|
|
198
|
+
|
|
199
|
+
**Goal**: Understand how lists will be paginated.
|
|
200
|
+
|
|
201
|
+
**Explore:**
|
|
202
|
+
|
|
203
|
+
- How large are the datasets?
|
|
204
|
+
- Do items change frequently? (Insertions/deletions)
|
|
205
|
+
- Do they need to jump to specific pages?
|
|
206
|
+
|
|
207
|
+
**Options:**
|
|
208
|
+
|
|
209
|
+
| Strategy | Best For | Tradeoffs |
|
|
210
|
+
|----------|----------|-----------|
|
|
211
|
+
| Offset/Page | Small datasets, jumping to pages | Inconsistent with changes |
|
|
212
|
+
| Cursor | Large datasets, real-time | Can't jump to pages |
|
|
213
|
+
| Keyset | Sorted data, performance | Complex implementation |
|
|
214
|
+
|
|
215
|
+
**Recommendations:**
|
|
216
|
+
|
|
217
|
+
- **Default**: Cursor pagination (more robust)
|
|
218
|
+
- **Admin UIs**: Page pagination (users expect page numbers)
|
|
219
|
+
- **Real-time feeds**: Cursor pagination (handles insertions)
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Completing the Discovery
|
|
224
|
+
|
|
225
|
+
Once you've explored relevant areas, summarize:
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## API Conventions Summary
|
|
229
|
+
|
|
230
|
+
Based on our conversation, here's what I understand:
|
|
231
|
+
|
|
232
|
+
**API Style**: {choice}
|
|
233
|
+
{brief rationale}
|
|
234
|
+
|
|
235
|
+
**Versioning**: {choice}
|
|
236
|
+
{brief rationale}
|
|
237
|
+
|
|
238
|
+
**Response Format**: {choice}
|
|
239
|
+
{brief rationale}
|
|
240
|
+
|
|
241
|
+
**Error Format**: {choice}
|
|
242
|
+
{brief rationale}
|
|
243
|
+
|
|
244
|
+
**Pagination**: {choice}
|
|
245
|
+
{brief rationale}
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
Does this capture your API conventions accurately? Any adjustments needed?
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Output Generation
|
|
255
|
+
|
|
256
|
+
After confirmation, create `standards/api-conventions.md`:
|
|
257
|
+
|
|
258
|
+
```markdown
|
|
259
|
+
# API Conventions
|
|
260
|
+
|
|
261
|
+
## Overview
|
|
262
|
+
{1-2 sentence summary of the API approach}
|
|
263
|
+
|
|
264
|
+
## API Style
|
|
265
|
+
{style}
|
|
266
|
+
|
|
267
|
+
{Rationale - why this choice}
|
|
268
|
+
|
|
269
|
+
## Versioning
|
|
270
|
+
{strategy}
|
|
271
|
+
|
|
272
|
+
{How versions will be handled}
|
|
273
|
+
|
|
274
|
+
## Response Format
|
|
275
|
+
|
|
276
|
+
### Success Response
|
|
277
|
+
{standard structure}
|
|
278
|
+
|
|
279
|
+
### Collection Response
|
|
280
|
+
{standard structure with pagination}
|
|
281
|
+
|
|
282
|
+
## Error Format
|
|
283
|
+
{standard structure}
|
|
284
|
+
|
|
285
|
+
### Error Codes
|
|
286
|
+
{list of error codes used}
|
|
287
|
+
|
|
288
|
+
## Pagination
|
|
289
|
+
{strategy}
|
|
290
|
+
|
|
291
|
+
{Implementation details}
|
|
292
|
+
|
|
293
|
+
## Decision Relationships
|
|
294
|
+
{Note connections to tech-stack and system-architecture decisions}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Notes for Agent
|
|
300
|
+
|
|
301
|
+
- **Skip for frontend-only projects** - this guide is for projects with APIs
|
|
302
|
+
- **Consistency is key** - pick a convention and stick to it
|
|
303
|
+
- **Document everything** - API consumers rely on predictability
|
|
304
|
+
- **Start simple** - don't over-engineer pagination for 100 items
|
|
305
|
+
- **Capture rationale** - "why" is as important as "what"
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# System Architecture Facilitation Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define the high-level architectural patterns and system design choices that will guide how components are structured, how they communicate, and how the system scales.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Facilitation Approach
|
|
10
|
+
|
|
11
|
+
You are collaborating with a peer to discover their architectural preferences. This builds on tech-stack decisions and shapes how the application is structured.
|
|
12
|
+
|
|
13
|
+
**Adapt your style:**
|
|
14
|
+
|
|
15
|
+
- If they mention specific patterns confidently → treat them as experienced, be concise
|
|
16
|
+
- If they seem uncertain → provide more context, examples, and recommendations
|
|
17
|
+
- If they have strong preferences → respect them, ask about tradeoffs they've considered
|
|
18
|
+
|
|
19
|
+
**Your role:**
|
|
20
|
+
|
|
21
|
+
- Guide discovery, don't dictate choices
|
|
22
|
+
- Surface tradeoffs they may not have considered
|
|
23
|
+
- Ensure choices are coherent with tech-stack decisions
|
|
24
|
+
- Capture rationale, not just the choice
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Discovery Areas
|
|
29
|
+
|
|
30
|
+
### 1. Architecture Style
|
|
31
|
+
|
|
32
|
+
**Goal**: Understand the overall application structure.
|
|
33
|
+
|
|
34
|
+
**Open with context:**
|
|
35
|
+
> "Let's talk about how you want to structure the application. This affects how code is organized, how components communicate, and how the system evolves over time."
|
|
36
|
+
|
|
37
|
+
**Explore:**
|
|
38
|
+
|
|
39
|
+
- Is this a monolith or do they need services?
|
|
40
|
+
- What's the expected scale and team size?
|
|
41
|
+
- How often do different parts of the system change?
|
|
42
|
+
- Are there distinct bounded contexts?
|
|
43
|
+
|
|
44
|
+
**Guide by context:**
|
|
45
|
+
|
|
46
|
+
| Context | Recommendation | Why |
|
|
47
|
+
|---------|----------------|-----|
|
|
48
|
+
| Small team, MVP | Modular monolith | Simple deployment, easy refactoring |
|
|
49
|
+
| Multiple teams | Microservices or modular monolith | Team autonomy, independent deployment |
|
|
50
|
+
| Complex domains | Domain-Driven Design | Clear boundaries, ubiquitous language |
|
|
51
|
+
| High performance | Event-driven | Async processing, decoupling |
|
|
52
|
+
| Real-time features | Event-driven + WebSockets | Push updates, reactive |
|
|
53
|
+
|
|
54
|
+
**Common patterns:**
|
|
55
|
+
|
|
56
|
+
| Pattern | Best For | Tradeoffs |
|
|
57
|
+
|---------|----------|-----------|
|
|
58
|
+
| Layered (N-tier) | Traditional apps, CRUD | Can become rigid |
|
|
59
|
+
| Clean/Hexagonal | Domain-heavy apps | More abstraction |
|
|
60
|
+
| Microservices | Large teams, scale | Operational complexity |
|
|
61
|
+
| Modular monolith | Growing apps | Discipline required |
|
|
62
|
+
| Event-driven | Async, decoupling | Eventually consistent |
|
|
63
|
+
| CQRS | Read/write asymmetry | Complexity |
|
|
64
|
+
|
|
65
|
+
**Questions to surface tradeoffs:**
|
|
66
|
+
|
|
67
|
+
- "Microservices add operational complexity. Is your team ready for that?"
|
|
68
|
+
- "Event-driven means eventual consistency. Is that acceptable for your domain?"
|
|
69
|
+
- "Clean architecture adds layers. Is the domain complex enough to warrant it?"
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### 2. API Design
|
|
74
|
+
|
|
75
|
+
**Goal**: Understand how components will communicate.
|
|
76
|
+
|
|
77
|
+
**Optional - skip for CLI tools or libraries.**
|
|
78
|
+
|
|
79
|
+
**Explore:**
|
|
80
|
+
|
|
81
|
+
- What clients will consume the API? (Web, mobile, third-party)
|
|
82
|
+
- Do they need real-time updates?
|
|
83
|
+
- Is the API public or internal only?
|
|
84
|
+
- What data shapes are typical? (CRUD, complex queries, mutations)
|
|
85
|
+
|
|
86
|
+
**Guide by use case:**
|
|
87
|
+
|
|
88
|
+
| Use Case | Recommendation | Why |
|
|
89
|
+
|----------|----------------|-----|
|
|
90
|
+
| Simple CRUD | REST | Well understood, tooling |
|
|
91
|
+
| Complex queries | GraphQL | Flexible queries, single endpoint |
|
|
92
|
+
| Real-time | WebSockets or SSE | Push updates |
|
|
93
|
+
| Microservices | REST or gRPC | gRPC for internal, REST for external |
|
|
94
|
+
| Public API | REST with OpenAPI | Documentation, client generation |
|
|
95
|
+
|
|
96
|
+
**REST vs GraphQL:**
|
|
97
|
+
|
|
98
|
+
- **REST**: Simpler, cacheable, well understood, better for public APIs
|
|
99
|
+
- **GraphQL**: Flexible queries, avoids over-fetching, better for complex UIs
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 3. State Management
|
|
104
|
+
|
|
105
|
+
**Goal**: Understand how application state is managed.
|
|
106
|
+
|
|
107
|
+
**Explore:**
|
|
108
|
+
|
|
109
|
+
- Where does state live? (Client, server, both)
|
|
110
|
+
- How complex is the client state?
|
|
111
|
+
- Do multiple components need the same data?
|
|
112
|
+
- Is there optimistic UI or offline support?
|
|
113
|
+
|
|
114
|
+
**For client-side (frontend):**
|
|
115
|
+
|
|
116
|
+
| Solution | Best For | Tradeoffs |
|
|
117
|
+
|----------|----------|-----------|
|
|
118
|
+
| React Query/TanStack Query | Server state | Learning curve |
|
|
119
|
+
| Zustand | Simple client state | Manual optimization |
|
|
120
|
+
| Redux | Complex client state | Boilerplate |
|
|
121
|
+
| Jotai/Recoil | Atomic state | Mental model shift |
|
|
122
|
+
| URL state | Shareable UI state | Limited to serializable |
|
|
123
|
+
|
|
124
|
+
**For server-side:**
|
|
125
|
+
|
|
126
|
+
| Pattern | Best For |
|
|
127
|
+
|---------|----------|
|
|
128
|
+
| Session-based | Traditional web apps |
|
|
129
|
+
| Stateless (JWT) | APIs, microservices |
|
|
130
|
+
| Server state (tRPC, RSC) | Full-stack frameworks |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 4. Caching Strategy
|
|
135
|
+
|
|
136
|
+
**Goal**: Understand caching needs for performance.
|
|
137
|
+
|
|
138
|
+
**Optional - some apps don't need explicit caching.**
|
|
139
|
+
|
|
140
|
+
**Explore:**
|
|
141
|
+
|
|
142
|
+
- What data is read frequently?
|
|
143
|
+
- How fresh does data need to be?
|
|
144
|
+
- What's the cache invalidation strategy?
|
|
145
|
+
- Is there a CDN for static assets?
|
|
146
|
+
|
|
147
|
+
**Caching layers:**
|
|
148
|
+
|
|
149
|
+
| Layer | Tool | Use Case |
|
|
150
|
+
|-------|------|----------|
|
|
151
|
+
| Browser | HTTP headers | Static assets, API responses |
|
|
152
|
+
| CDN | Cloudflare, Vercel Edge | Static assets, edge caching |
|
|
153
|
+
| Application | Redis, in-memory | Session, computed data |
|
|
154
|
+
| Database | Query cache | Repeated queries |
|
|
155
|
+
|
|
156
|
+
**Questions:**
|
|
157
|
+
|
|
158
|
+
- "How stale can data be before it's a problem?"
|
|
159
|
+
- "What happens when cached data is wrong?"
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### 5. Security Patterns
|
|
164
|
+
|
|
165
|
+
**Goal**: Understand security architecture.
|
|
166
|
+
|
|
167
|
+
**Explore:**
|
|
168
|
+
|
|
169
|
+
- What needs to be protected? (Data, APIs, user sessions)
|
|
170
|
+
- What's the threat model? (Public app, internal tool, regulated industry)
|
|
171
|
+
- Any compliance requirements? (GDPR, HIPAA, SOC2)
|
|
172
|
+
|
|
173
|
+
**Common patterns:**
|
|
174
|
+
|
|
175
|
+
| Concern | Pattern | Implementation |
|
|
176
|
+
|---------|---------|----------------|
|
|
177
|
+
| API auth | Bearer tokens | JWT, API keys |
|
|
178
|
+
| Session | HttpOnly cookies | Secure, SameSite |
|
|
179
|
+
| Authorization | RBAC, ABAC | Role-based, attribute-based |
|
|
180
|
+
| Data protection | Encryption at rest | Database encryption |
|
|
181
|
+
| Input validation | Schema validation | Zod, Joi, class-validator |
|
|
182
|
+
| CSRF | Tokens, SameSite | Framework-provided |
|
|
183
|
+
|
|
184
|
+
**For Supabase users:**
|
|
185
|
+
> "Supabase provides Row Level Security (RLS) which enforces authorization at the database level. This is powerful for multi-tenant apps."
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Completing the Discovery
|
|
190
|
+
|
|
191
|
+
Once you've explored relevant areas, summarize:
|
|
192
|
+
|
|
193
|
+
```markdown
|
|
194
|
+
## System Architecture Summary
|
|
195
|
+
|
|
196
|
+
Based on our conversation, here's what I understand:
|
|
197
|
+
|
|
198
|
+
**Architecture Style**: {choice}
|
|
199
|
+
{brief rationale}
|
|
200
|
+
|
|
201
|
+
**API Design**: {choice or "REST by default"}
|
|
202
|
+
{brief rationale}
|
|
203
|
+
|
|
204
|
+
**State Management**: {choice or "TBD"}
|
|
205
|
+
{brief rationale if applicable}
|
|
206
|
+
|
|
207
|
+
**Caching Strategy**: {choice or "Standard HTTP caching"}
|
|
208
|
+
{brief rationale if applicable}
|
|
209
|
+
|
|
210
|
+
**Security Patterns**: {choice}
|
|
211
|
+
{brief rationale}
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
Does this capture your architectural decisions accurately? Any adjustments needed?
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Output Generation
|
|
221
|
+
|
|
222
|
+
After confirmation, create `standards/system-architecture.md`:
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
# System Architecture
|
|
226
|
+
|
|
227
|
+
## Overview
|
|
228
|
+
{1-2 sentence summary of the architectural approach}
|
|
229
|
+
|
|
230
|
+
## Architecture Style
|
|
231
|
+
{pattern}
|
|
232
|
+
|
|
233
|
+
{Rationale - why this choice, what it enables}
|
|
234
|
+
|
|
235
|
+
## API Design
|
|
236
|
+
{approach}
|
|
237
|
+
|
|
238
|
+
{Rationale - client needs, communication patterns}
|
|
239
|
+
|
|
240
|
+
## State Management
|
|
241
|
+
{approach or "TBD"}
|
|
242
|
+
|
|
243
|
+
{Rationale if selected}
|
|
244
|
+
|
|
245
|
+
## Caching Strategy
|
|
246
|
+
{approach or "Standard HTTP caching"}
|
|
247
|
+
|
|
248
|
+
{Rationale if selected}
|
|
249
|
+
|
|
250
|
+
## Security Patterns
|
|
251
|
+
{patterns in use}
|
|
252
|
+
|
|
253
|
+
{Rationale - threat model, compliance}
|
|
254
|
+
|
|
255
|
+
## Decision Relationships
|
|
256
|
+
{Note connections to tech-stack decisions}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Notes for Agent
|
|
262
|
+
|
|
263
|
+
- **Build on tech-stack** - reference decisions already made
|
|
264
|
+
- **Don't over-architect** - simple apps don't need complex patterns
|
|
265
|
+
- **Skip irrelevant decisions** - CLI tools don't need caching discussion
|
|
266
|
+
- **Capture rationale** - "why" is as important as "what"
|
|
267
|
+
- **It's okay to leave things TBD** - not every decision needs to be made upfront
|
|
268
|
+
- **Watch for conflicts** - e.g., microservices with a solo dev team
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# UX Guide Facilitation Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define the UI/UX patterns, design system choices, and styling approach that will guide frontend development and ensure visual consistency across the application.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Facilitation Approach
|
|
10
|
+
|
|
11
|
+
You are collaborating with a peer to discover their UI/UX preferences. This is relevant for projects with a frontend component.
|
|
12
|
+
|
|
13
|
+
**Adapt your style:**
|
|
14
|
+
|
|
15
|
+
- If they have a design team → focus on technical implementation, not design decisions
|
|
16
|
+
- If they're a solo dev → help them choose sensible defaults
|
|
17
|
+
- If they have brand guidelines → ensure choices align with brand
|
|
18
|
+
|
|
19
|
+
**Your role:**
|
|
20
|
+
|
|
21
|
+
- Guide discovery, don't dictate choices
|
|
22
|
+
- Surface tradeoffs between flexibility and consistency
|
|
23
|
+
- Ensure choices work with their tech stack
|
|
24
|
+
- Capture rationale, not just the choice
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Discovery Areas
|
|
29
|
+
|
|
30
|
+
### 1. Design System / Component Library
|
|
31
|
+
|
|
32
|
+
**Goal**: Understand how UI components will be built.
|
|
33
|
+
|
|
34
|
+
**Open with context:**
|
|
35
|
+
> "Let's talk about your component strategy. This affects development speed, visual consistency, and how much custom design work is needed."
|
|
36
|
+
|
|
37
|
+
**Explore:**
|
|
38
|
+
|
|
39
|
+
- Do they have existing brand guidelines or a design system?
|
|
40
|
+
- Is there a designer on the team?
|
|
41
|
+
- How custom does the UI need to be?
|
|
42
|
+
- What's the priority: speed or uniqueness?
|
|
43
|
+
|
|
44
|
+
**Guide by context:**
|
|
45
|
+
|
|
46
|
+
| Context | Recommendation | Why |
|
|
47
|
+
|---------|----------------|-----|
|
|
48
|
+
| MVP, speed priority | shadcn/ui + Tailwind | Fast, customizable |
|
|
49
|
+
| Design team, custom brand | Headless (Radix, Headless UI) | Full control |
|
|
50
|
+
| Enterprise app | MUI or Ant Design | Comprehensive, consistent |
|
|
51
|
+
| Marketing site | Tailwind + custom | Brand flexibility |
|
|
52
|
+
| Internal tool | shadcn/ui or Chakra | Good defaults, fast |
|
|
53
|
+
|
|
54
|
+
**Component library options:**
|
|
55
|
+
|
|
56
|
+
| Library | Best For | Tradeoffs |
|
|
57
|
+
|---------|----------|-----------|
|
|
58
|
+
| shadcn/ui | Customization, ownership | Copy-paste, maintain yourself |
|
|
59
|
+
| Radix UI | Headless, accessible | Need to style everything |
|
|
60
|
+
| Headless UI | Tailwind users | Limited components |
|
|
61
|
+
| MUI | Enterprise, comprehensive | Opinionated styling |
|
|
62
|
+
| Chakra UI | Quick prototyping | Bundle size |
|
|
63
|
+
| Ant Design | Data-heavy apps | Opinionated, large |
|
|
64
|
+
|
|
65
|
+
**Questions to surface tradeoffs:**
|
|
66
|
+
|
|
67
|
+
- "shadcn/ui gives you ownership but means maintaining components. Is that okay?"
|
|
68
|
+
- "MUI is comprehensive but has a specific look. Can you customize enough?"
|
|
69
|
+
- "Headless means more styling work. Do you have the time for that?"
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### 2. Styling Approach
|
|
74
|
+
|
|
75
|
+
**Goal**: Understand how styles will be written.
|
|
76
|
+
|
|
77
|
+
**Explore:**
|
|
78
|
+
|
|
79
|
+
- What's the team's CSS experience?
|
|
80
|
+
- Do they need design tokens / theming?
|
|
81
|
+
- Is dark mode needed?
|
|
82
|
+
- How important is bundle size?
|
|
83
|
+
|
|
84
|
+
**Options:**
|
|
85
|
+
|
|
86
|
+
| Approach | Best For | Tradeoffs |
|
|
87
|
+
|----------|----------|-----------|
|
|
88
|
+
| Tailwind CSS | Utility-first, rapid development | Learning curve, verbose markup |
|
|
89
|
+
| CSS Modules | Scoped styles, traditional CSS | More files |
|
|
90
|
+
| Styled Components | CSS-in-JS, dynamic styles | Runtime cost |
|
|
91
|
+
| Vanilla Extract | Type-safe CSS, zero runtime | Build complexity |
|
|
92
|
+
| Plain CSS/SCSS | Simple projects | Global scope issues |
|
|
93
|
+
|
|
94
|
+
**Tailwind + shadcn/ui is the modern default:**
|
|
95
|
+
> "Most projects today use Tailwind CSS with a component library like shadcn/ui. It's fast, customizable, and has great tooling. Unless you have a specific reason to choose something else, this is a solid default."
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### 3. Accessibility Standards
|
|
100
|
+
|
|
101
|
+
**Goal**: Understand accessibility requirements.
|
|
102
|
+
|
|
103
|
+
**Explore:**
|
|
104
|
+
|
|
105
|
+
- Is there a compliance requirement? (WCAG 2.1, Section 508)
|
|
106
|
+
- Who are the users? (General public, enterprise, specific needs)
|
|
107
|
+
- Is this a public-facing or internal app?
|
|
108
|
+
|
|
109
|
+
**Levels:**
|
|
110
|
+
|
|
111
|
+
| Level | Requirement | Typical For |
|
|
112
|
+
|-------|-------------|-------------|
|
|
113
|
+
| Minimum | Semantic HTML, keyboard nav | All apps |
|
|
114
|
+
| WCAG 2.1 AA | Color contrast, focus indicators | Public apps |
|
|
115
|
+
| WCAG 2.1 AAA | Enhanced contrast, alternatives | Government, healthcare |
|
|
116
|
+
|
|
117
|
+
**Recommendations:**
|
|
118
|
+
|
|
119
|
+
- Use semantic HTML elements (`button`, `nav`, `main`)
|
|
120
|
+
- Ensure keyboard navigation works
|
|
121
|
+
- Use ARIA labels where needed
|
|
122
|
+
- Test with screen readers
|
|
123
|
+
- Use accessible component libraries (Radix, shadcn/ui)
|
|
124
|
+
|
|
125
|
+
> "Most component libraries like shadcn/ui and Radix are built with accessibility in mind. Using them gets you 80% of the way there."
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### 4. Responsive Design Strategy
|
|
130
|
+
|
|
131
|
+
**Goal**: Understand how the app should adapt to different screen sizes.
|
|
132
|
+
|
|
133
|
+
**Explore:**
|
|
134
|
+
|
|
135
|
+
- What devices will users be on? (Desktop, tablet, mobile)
|
|
136
|
+
- Is this mobile-first or desktop-first?
|
|
137
|
+
- Are there specific breakpoints needed?
|
|
138
|
+
- Is a native mobile app planned? (Affects responsive priority)
|
|
139
|
+
|
|
140
|
+
**Strategies:**
|
|
141
|
+
|
|
142
|
+
| Strategy | Best For |
|
|
143
|
+
|----------|----------|
|
|
144
|
+
| Mobile-first | Consumer apps, wide audience |
|
|
145
|
+
| Desktop-first | Admin tools, data-heavy apps |
|
|
146
|
+
| Responsive | All screen sizes matter equally |
|
|
147
|
+
| Adaptive | Different layouts per device |
|
|
148
|
+
|
|
149
|
+
**Tailwind breakpoints (default):**
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
sm: 640px - Small devices
|
|
153
|
+
md: 768px - Tablets
|
|
154
|
+
lg: 1024px - Laptops
|
|
155
|
+
xl: 1280px - Desktops
|
|
156
|
+
2xl: 1536px - Large screens
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Completing the Discovery
|
|
162
|
+
|
|
163
|
+
Once you've explored relevant areas, summarize:
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
## UX Guide Summary
|
|
167
|
+
|
|
168
|
+
Based on our conversation, here's what I understand:
|
|
169
|
+
|
|
170
|
+
**Design System**: {choice}
|
|
171
|
+
{brief rationale}
|
|
172
|
+
|
|
173
|
+
**Styling Approach**: {choice}
|
|
174
|
+
{brief rationale}
|
|
175
|
+
|
|
176
|
+
**Accessibility**: {level}
|
|
177
|
+
{brief rationale}
|
|
178
|
+
|
|
179
|
+
**Responsive Strategy**: {choice}
|
|
180
|
+
{brief rationale}
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
Does this capture your UI/UX decisions accurately? Any adjustments needed?
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Output Generation
|
|
190
|
+
|
|
191
|
+
After confirmation, create `standards/ux-guide.md`:
|
|
192
|
+
|
|
193
|
+
```markdown
|
|
194
|
+
# UX Guide
|
|
195
|
+
|
|
196
|
+
## Overview
|
|
197
|
+
{1-2 sentence summary of the UI/UX approach}
|
|
198
|
+
|
|
199
|
+
## Design System / Component Library
|
|
200
|
+
{library}
|
|
201
|
+
|
|
202
|
+
{Rationale - why this choice, what it enables}
|
|
203
|
+
|
|
204
|
+
## Styling Approach
|
|
205
|
+
{approach}
|
|
206
|
+
|
|
207
|
+
{Rationale - team experience, requirements}
|
|
208
|
+
|
|
209
|
+
## Accessibility Standards
|
|
210
|
+
{level}
|
|
211
|
+
|
|
212
|
+
{Requirements to follow}
|
|
213
|
+
|
|
214
|
+
## Responsive Design Strategy
|
|
215
|
+
{strategy}
|
|
216
|
+
|
|
217
|
+
{Breakpoints and approach}
|
|
218
|
+
|
|
219
|
+
## Decision Relationships
|
|
220
|
+
{Note connections to tech-stack decisions}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Notes for Agent
|
|
226
|
+
|
|
227
|
+
- **Skip for backend-only projects** - this guide is for projects with frontends
|
|
228
|
+
- **Respect designer decisions** - if there's a design team, defer to them
|
|
229
|
+
- **Default to modern stack** - Tailwind + shadcn/ui is a good default
|
|
230
|
+
- **Accessibility isn't optional** - even MVPs should have basic accessibility
|
|
231
|
+
- **Capture rationale** - "why" is as important as "what"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-iris",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|