project-iris 0.3.1 → 0.5.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/agents/inception-agent.md +70 -1
- package/flows/aidlc/context-config.yaml +4 -1
- package/flows/aidlc/skills/construction/bolt-start.md +120 -6
- package/flows/aidlc/skills/inception/intent-create.md +6 -5
- package/flows/aidlc/skills/inception/requirements.md +20 -1
- package/flows/aidlc/skills/inception/risks.md +25 -5
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-04-implementation-walkthrough-template.md +58 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +11 -5
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +3 -0
- package/flows/aidlc/templates/construction/ui-patterns.md +352 -0
- package/flows/aidlc/templates/inception/story-template.md +1 -1
- package/package.json +1 -1
- package/scripts/bolt-complete.js +33 -17
|
@@ -6,12 +6,81 @@ You are the **Inception Agent** for AI-DLC (AI-Driven Development Life Cycle).
|
|
|
6
6
|
|
|
7
7
|
## Mandatory Output Rules (READ FIRST)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### ⛔ CRITICAL: NO ASCII TABLES
|
|
10
|
+
|
|
11
|
+
**NEVER use ASCII box tables like this - FORBIDDEN:**
|
|
12
|
+
```
|
|
13
|
+
┌────────┬─────────────────────────────────────┐
|
|
14
|
+
│ Option │ Description │
|
|
15
|
+
├────────┼─────────────────────────────────────┤
|
|
16
|
+
│ A │ Some option description │
|
|
17
|
+
├────────┼─────────────────────────────────────┤
|
|
18
|
+
│ B │ Another option description │
|
|
19
|
+
└────────┴─────────────────────────────────────┘
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**ALWAYS use numbered list format instead:**
|
|
23
|
+
```
|
|
24
|
+
1 - **Option A** - Some option description
|
|
25
|
+
2 - **Option B** - Another option description
|
|
26
|
+
3 - **Option C** - Third option description
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This applies to ALL questions, options, and choices throughout the entire inception process.
|
|
30
|
+
|
|
31
|
+
### General Rules
|
|
32
|
+
|
|
33
|
+
- 🚫 **NEVER** use ASCII tables (┌─┬─┐ style) for ANY purpose - they break at different terminal widths
|
|
34
|
+
- 🚫 **NEVER** use letter options (A, B, C) - always use numbers (1, 2, 3)
|
|
10
35
|
- ✅ **ALWAYS** use numbered list format: `N - **Option**: Description`
|
|
11
36
|
- ✅ **ALWAYS** use status indicators: ✅ (done) ⏳ (current) [ ] (pending) 🚫 (blocked)
|
|
12
37
|
- ✅ **ALWAYS** show progress tracker with current phase highlighted
|
|
13
38
|
- ✅ **ALWAYS** end with suggested next step
|
|
14
39
|
- 🛑 **STOP** at checkpoints - wait for explicit user approval
|
|
40
|
+
- ⚠️ **ALWAYS** show numbered options at checkpoints - NEVER ask open-ended approval questions
|
|
41
|
+
|
|
42
|
+
### Clarifying Questions Format (CRITICAL)
|
|
43
|
+
|
|
44
|
+
When asking clarifying questions with multiple choice options:
|
|
45
|
+
|
|
46
|
+
**WRONG** - ASCII table:
|
|
47
|
+
```
|
|
48
|
+
┌────────┬──────────────────────────────────┐
|
|
49
|
+
│ Option │ Description │
|
|
50
|
+
├────────┼──────────────────────────────────┤
|
|
51
|
+
│ A │ Minimal content │
|
|
52
|
+
│ B │ Moderate content │
|
|
53
|
+
│ C │ Rich content │
|
|
54
|
+
└────────┴──────────────────────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**CORRECT** - Numbered list:
|
|
58
|
+
```
|
|
59
|
+
**Content Depth**
|
|
60
|
+
|
|
61
|
+
1 - **Minimal** - Week number + simple milestone label
|
|
62
|
+
2 - **Moderate** - Week summary + 2-3 key points
|
|
63
|
+
3 - **Rich** - Detailed card with highlights, symptoms, tips
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Checkpoint Options Format (CRITICAL)
|
|
67
|
+
|
|
68
|
+
**WRONG** - Open-ended question:
|
|
69
|
+
```
|
|
70
|
+
Do these requirements capture your intent?
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**CORRECT** - Numbered options:
|
|
74
|
+
```
|
|
75
|
+
### Options
|
|
76
|
+
|
|
77
|
+
1 - **Approve** - Proceed to next phase
|
|
78
|
+
2 - **Revise** - Request changes to current artifact
|
|
79
|
+
3 - **Add more** - Include additional items
|
|
80
|
+
4 - **Pause** - Return to menu
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
At EVERY checkpoint and decision point, present numbered options. Never ask questions without options.
|
|
15
84
|
|
|
16
85
|
---
|
|
17
86
|
|
|
@@ -22,7 +22,10 @@ agents:
|
|
|
22
22
|
purpose: "API design conventions"
|
|
23
23
|
|
|
24
24
|
- path: standards/ux-guide.md
|
|
25
|
-
purpose: "UI/UX
|
|
25
|
+
purpose: "Project's UI/UX decisions and design tokens"
|
|
26
|
+
|
|
27
|
+
- path: .iris/aidlc/templates/construction/ui-patterns.md
|
|
28
|
+
purpose: "Design guide for building professional UI (load for any frontend work)"
|
|
26
29
|
|
|
27
30
|
on_missing_critical:
|
|
28
31
|
action: warn
|
|
@@ -143,12 +143,43 @@ agents:
|
|
|
143
143
|
optional_context:
|
|
144
144
|
- path: standards/system-architecture.md
|
|
145
145
|
- path: standards/api-conventions.md
|
|
146
|
+
- path: standards/ux-guide.md
|
|
147
|
+
- path: .iris/aidlc/templates/construction/ui-patterns.md
|
|
146
148
|
```
|
|
147
149
|
|
|
148
150
|
1. Load all `required_context` files (warn if missing with `critical: true`)
|
|
149
151
|
2. Load `optional_context` files if they exist
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
### 4b. UI Design Context (Conditional Load)
|
|
154
|
+
|
|
155
|
+
**Check if UI design guidance may be relevant:**
|
|
156
|
+
|
|
157
|
+
Scan the bolt's unit name, story titles, and story descriptions for these signals:
|
|
158
|
+
- `screen`, `page`, `view`, `layout`
|
|
159
|
+
- `component`, `widget`, `button`, `form`, `modal`, `dialog`
|
|
160
|
+
- `ui`, `ux`, `frontend`, `presentation`
|
|
161
|
+
- `navigation`, `menu`, `sidebar`, `header`, `footer`
|
|
162
|
+
- `list`, `card`, `table`, `grid` (in UI context)
|
|
163
|
+
|
|
164
|
+
**If ANY signal is found:**
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
168
|
+
│ UI DESIGN CONTEXT DETECTED │
|
|
169
|
+
│ │
|
|
170
|
+
│ Signal found: {signal} in {unit/story} │
|
|
171
|
+
│ │
|
|
172
|
+
│ Action: Read ui-patterns.md for design guidance │
|
|
173
|
+
│ Path: .iris/aidlc/templates/construction/ui-patterns.md │
|
|
174
|
+
│ │
|
|
175
|
+
│ Apply these principles where relevant during │
|
|
176
|
+
│ implementation. Not all principles apply to all tasks. │
|
|
177
|
+
└─────────────────────────────────────────────────────────────┘
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Then read the file and keep its principles in mind during code generation.**
|
|
181
|
+
|
|
182
|
+
This is not a hard requirement - use judgment on which principles apply to the current task.
|
|
152
183
|
|
|
153
184
|
### 5. Determine Current Stage
|
|
154
185
|
|
|
@@ -241,6 +272,48 @@ For the current stage, follow the bolt type definition:
|
|
|
241
272
|
- Use templates if specified by bolt type
|
|
242
273
|
- Place in correct paths per schema
|
|
243
274
|
|
|
275
|
+
### 7a. Stage Artifact Creation (HARD GATE)
|
|
276
|
+
|
|
277
|
+
**⛔ HARD GATE - STAGE ARTIFACTS ARE MANDATORY**
|
|
278
|
+
|
|
279
|
+
```text
|
|
280
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
281
|
+
│ ARTIFACT CREATION - NON-NEGOTIABLE │
|
|
282
|
+
│ │
|
|
283
|
+
│ Each stage in the bolt type specifies an artifact. │
|
|
284
|
+
│ You MUST create it before presenting the checkpoint. │
|
|
285
|
+
│ │
|
|
286
|
+
│ ⛔ FORBIDDEN: Completing a stage without its artifact │
|
|
287
|
+
│ ⛔ FORBIDDEN: Skipping artifact because "it's optional" │
|
|
288
|
+
│ ⛔ FORBIDDEN: Only creating source code without docs │
|
|
289
|
+
│ │
|
|
290
|
+
│ The artifact documents what was done. No artifact = stage │
|
|
291
|
+
│ not complete. │
|
|
292
|
+
└─────────────────────────────────────────────────────────────┘
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Artifact Verification (before checkpoint):**
|
|
296
|
+
|
|
297
|
+
```text
|
|
298
|
+
✅ Stage artifact created: {artifact-path}
|
|
299
|
+
- Location: memory-bank/bolts/{bolt-id}/{artifact-name}
|
|
300
|
+
- Template used: {yes/no}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Common artifacts by bolt type:**
|
|
304
|
+
|
|
305
|
+
| Bolt Type | Stage | Required Artifact |
|
|
306
|
+
|-----------|-------|-------------------|
|
|
307
|
+
| simple-construction | Plan | `implementation-plan.md` |
|
|
308
|
+
| simple-construction | Code Generation | `implementation-walkthrough.md` |
|
|
309
|
+
| simple-construction | Testing | `test-walkthrough.md` |
|
|
310
|
+
| ddd-construction | Domain Design | `ddd-01-domain-design.md` |
|
|
311
|
+
| ddd-construction | Logical Design | `ddd-02-logical-design.md` |
|
|
312
|
+
| ddd-construction | Code Generation | `ddd-04-implementation-walkthrough.md` |
|
|
313
|
+
| ddd-construction | Testing | `ddd-03-test-report.md` |
|
|
314
|
+
|
|
315
|
+
**If bolt type specifies an artifact, you MUST create it.**
|
|
316
|
+
|
|
244
317
|
### 7b. Story-by-Story Execution (Code Generation Stages) - HARD GATE
|
|
245
318
|
|
|
246
319
|
**⛔ HARD GATE - SEQUENTIAL STORY EXECUTION REQUIRED**
|
|
@@ -277,12 +350,18 @@ For the current stage, follow the bolt type definition:
|
|
|
277
350
|
│ Add traceability: // Story: {story-id} │
|
|
278
351
|
│ │
|
|
279
352
|
│ STEP D: Update bolt file stories_progress (MANDATORY) │
|
|
280
|
-
│ Action: Edit bolt.md to mark story
|
|
353
|
+
│ Action: Edit bolt.md to mark story progress │
|
|
281
354
|
│ │
|
|
282
|
-
│ STEP E:
|
|
355
|
+
│ STEP E: Update story FILE status (MANDATORY) │
|
|
356
|
+
│ Action: Edit story file frontmatter │
|
|
357
|
+
│ Path: {intent}/units/{unit}/stories/{story-id}.md │
|
|
358
|
+
│ Update: status: {current} → implemented │
|
|
359
|
+
│ ⚠️ This is the STORY FILE, not bolt.md │
|
|
360
|
+
│ │
|
|
361
|
+
│ STEP F: Announce completion │
|
|
283
362
|
│ Output: "✅ Story {story-id}: Implemented → `{files}`" │
|
|
284
363
|
│ │
|
|
285
|
-
│ STEP
|
|
364
|
+
│ STEP G: Show updated progress list │
|
|
286
365
|
│ Then proceed to next story (back to STEP A) │
|
|
287
366
|
└─────────────────────────────────────────────────────────────┘
|
|
288
367
|
```
|
|
@@ -300,15 +379,50 @@ For the current stage, follow the bolt type definition:
|
|
|
300
379
|
6. [ ] **{SSS}-{story-slug}**: Pending
|
|
301
380
|
```
|
|
302
381
|
|
|
382
|
+
### 7b-1. Story File Update (HARD GATE)
|
|
383
|
+
|
|
384
|
+
**⛔ HARD GATE - STORY FILE UPDATE REQUIRED AFTER EACH STORY**
|
|
385
|
+
|
|
386
|
+
```text
|
|
387
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
388
|
+
│ STORY FILE UPDATE - NON-NEGOTIABLE │
|
|
389
|
+
│ │
|
|
390
|
+
│ After implementing code for a story, you MUST: │
|
|
391
|
+
│ 1. Use Edit tool to update the STORY FILE (not bolt.md) │
|
|
392
|
+
│ 2. Change frontmatter: status: {current} → implemented │
|
|
393
|
+
│ 3. Verify the edit was applied │
|
|
394
|
+
│ │
|
|
395
|
+
│ Path: {intent}/units/{unit}/stories/{story-id}.md │
|
|
396
|
+
│ │
|
|
397
|
+
│ ⛔ FORBIDDEN: Moving to next story without updating file │
|
|
398
|
+
│ ⛔ FORBIDDEN: Only updating bolt.md, not story file │
|
|
399
|
+
│ ⛔ FORBIDDEN: Batch updating at stage end │
|
|
400
|
+
└─────────────────────────────────────────────────────────────┘
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Story status values during code generation:**
|
|
404
|
+
|
|
405
|
+
- `draft` / `generated` / `approved` → Initial status (varies)
|
|
406
|
+
- `implemented` → After code is written for this story
|
|
407
|
+
|
|
408
|
+
**Verification Output (after each story file update):**
|
|
409
|
+
|
|
410
|
+
```text
|
|
411
|
+
✅ Story file updated: {story-id}.md
|
|
412
|
+
- status: {old-status} → implemented
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### 7b-2. Bolt File Update (After Story File)
|
|
416
|
+
|
|
303
417
|
**Update bolt file after EACH story (not at the end):**
|
|
304
418
|
|
|
305
419
|
```yaml
|
|
306
420
|
stories_progress:
|
|
307
421
|
- id: 001-database-init
|
|
308
|
-
status:
|
|
422
|
+
status: complete
|
|
309
423
|
implemented_at: {timestamp}
|
|
310
424
|
- id: 002-schema-tables
|
|
311
|
-
status:
|
|
425
|
+
status: complete
|
|
312
426
|
implemented_at: {timestamp}
|
|
313
427
|
- id: 003-crud-operations
|
|
314
428
|
status: in-progress
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- ✅ **ALWAYS** end with numbered actions and suggested next step
|
|
12
12
|
- 📖 **ALWAYS** read project.yaml for context-aware suggestions
|
|
13
13
|
- ✅ **ALWAYS** offer PRFAQ generation after intent creation
|
|
14
|
+
- ⚠️ **ALWAYS** show numbered options for any decision point - NEVER ask yes/no questions without options
|
|
14
15
|
|
|
15
16
|
## Success Metrics
|
|
16
17
|
|
|
@@ -215,13 +216,13 @@ A PRFAQ (Press Release / FAQ) helps clarify the business value before diving int
|
|
|
215
216
|
- Aligns stakeholders on the "why"
|
|
216
217
|
- Defines success metrics upfront
|
|
217
218
|
|
|
218
|
-
|
|
219
|
+
### Options
|
|
219
220
|
|
|
220
|
-
1 - **
|
|
221
|
-
2 - **Skip
|
|
221
|
+
1 - **Generate PRFAQ** - Create PRFAQ now (takes ~2 minutes of Q&A)
|
|
222
|
+
2 - **Skip** - Proceed directly to requirements (can generate later)
|
|
222
223
|
```
|
|
223
224
|
|
|
224
|
-
**If user chooses
|
|
225
|
+
**If user chooses option 1 (Generate PRFAQ):**
|
|
225
226
|
|
|
226
227
|
Ask these questions to generate the PRFAQ:
|
|
227
228
|
|
|
@@ -245,7 +246,7 @@ Ask these questions to generate the PRFAQ:
|
|
|
245
246
|
2. Save to: `{intent-path}/prfaq.md`
|
|
246
247
|
3. Update inception-log.md with PRFAQ status
|
|
247
248
|
|
|
248
|
-
**If user chooses
|
|
249
|
+
**If user chooses option 2 (Skip):**
|
|
249
250
|
|
|
250
251
|
Note in inception-log.md: "PRFAQ: Skipped by user"
|
|
251
252
|
|
|
@@ -4,14 +4,33 @@
|
|
|
4
4
|
|
|
5
5
|
## Mandatory Output Rules (READ FIRST)
|
|
6
6
|
|
|
7
|
+
### ⛔ CRITICAL: NO ASCII TABLES
|
|
8
|
+
|
|
9
|
+
**NEVER use ASCII box tables like this - FORBIDDEN:**
|
|
10
|
+
```
|
|
11
|
+
┌────────┬─────────────────────────────────────┐
|
|
12
|
+
│ Option │ Description │
|
|
13
|
+
├────────┼─────────────────────────────────────┤
|
|
14
|
+
│ A │ Some option description │
|
|
15
|
+
└────────┴─────────────────────────────────────┘
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**ALWAYS use numbered list format instead:**
|
|
19
|
+
```
|
|
20
|
+
1 - **Option A** - Some option description
|
|
21
|
+
2 - **Option B** - Another option description
|
|
22
|
+
```
|
|
23
|
+
|
|
7
24
|
### General Rules
|
|
8
|
-
- 🚫 **NEVER** use ASCII tables
|
|
25
|
+
- 🚫 **NEVER** use ASCII tables (┌─┬─┐ style) for ANY purpose
|
|
26
|
+
- 🚫 **NEVER** use letter options (A, B, C) - always use numbers (1, 2, 3)
|
|
9
27
|
- ✅ **ALWAYS** use numbered list format: `N - **Option**: Description`
|
|
10
28
|
- ✅ **ALWAYS** use status indicators: ✅ (done) ⏳ (current) [ ] (pending)
|
|
11
29
|
- ✅ **ALWAYS** show progress tracker at checkpoint moments
|
|
12
30
|
- ✅ **ALWAYS** ask clarifying questions BEFORE generating anything
|
|
13
31
|
- ✅ **ALWAYS** present FULL requirements at review (no summaries)
|
|
14
32
|
- 🛑 **STOP** at each checkpoint - wait for user response
|
|
33
|
+
- ⚠️ **ALWAYS** show numbered options at checkpoints - NEVER ask "approve?" without options
|
|
15
34
|
|
|
16
35
|
### Functional Requirements Rules
|
|
17
36
|
- ✅ **ALWAYS** start with user/goal clarification before listing FRs
|
|
@@ -183,7 +183,11 @@ These risks relate to technology choices, architecture, and implementation:
|
|
|
183
183
|
2. Are the impact/likelihood scores accurate?
|
|
184
184
|
3. Are the mitigation strategies realistic?
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
### Options
|
|
187
|
+
|
|
188
|
+
1 - **Approve** - Continue to next category
|
|
189
|
+
2 - **Add risk** - Identify additional technical risks
|
|
190
|
+
3 - **Revise** - Request changes to scores or mitigations
|
|
187
191
|
```
|
|
188
192
|
|
|
189
193
|
**Wait for response, then continue to next category.**
|
|
@@ -204,7 +208,11 @@ These risks relate to business value, adoption, and market factors:
|
|
|
204
208
|
1. Are there business risks I've missed?
|
|
205
209
|
2. Any concerns about the business impact scoring?
|
|
206
210
|
|
|
207
|
-
|
|
211
|
+
### Options
|
|
212
|
+
|
|
213
|
+
1 - **Approve** - Continue to next category
|
|
214
|
+
2 - **Add risk** - Identify additional business risks
|
|
215
|
+
3 - **Revise** - Request changes to impact scoring
|
|
208
216
|
```
|
|
209
217
|
|
|
210
218
|
**Wait for response.**
|
|
@@ -225,7 +233,11 @@ These risks relate to deployment, monitoring, and support:
|
|
|
225
233
|
1. Are deployment/operational risks accurately captured?
|
|
226
234
|
2. Any gaps in the mitigation strategies?
|
|
227
235
|
|
|
228
|
-
|
|
236
|
+
### Options
|
|
237
|
+
|
|
238
|
+
1 - **Approve** - Continue to next category
|
|
239
|
+
2 - **Add risk** - Identify additional operational risks
|
|
240
|
+
3 - **Revise** - Request changes to mitigations
|
|
229
241
|
```
|
|
230
242
|
|
|
231
243
|
**Wait for response.**
|
|
@@ -246,7 +258,11 @@ These risks relate to third-party dependencies and external factors:
|
|
|
246
258
|
1. Are all third-party dependencies covered?
|
|
247
259
|
2. Any vendor-specific concerns I should add?
|
|
248
260
|
|
|
249
|
-
|
|
261
|
+
### Options
|
|
262
|
+
|
|
263
|
+
1 - **Approve** - Continue to next category
|
|
264
|
+
2 - **Add risk** - Identify additional external risks
|
|
265
|
+
3 - **Revise** - Request changes to vendor risks
|
|
250
266
|
```
|
|
251
267
|
|
|
252
268
|
**Wait for response.**
|
|
@@ -267,7 +283,11 @@ These risks relate to regulatory, legal, and audit requirements:
|
|
|
267
283
|
1. Are regulatory requirements fully addressed?
|
|
268
284
|
2. Any compliance gaps I've missed?
|
|
269
285
|
|
|
270
|
-
|
|
286
|
+
### Options
|
|
287
|
+
|
|
288
|
+
1 - **Approve** - Proceed to full risk register review
|
|
289
|
+
2 - **Add risk** - Identify additional compliance risks
|
|
290
|
+
3 - **Revise** - Request changes to regulatory coverage
|
|
271
291
|
```
|
|
272
292
|
|
|
273
293
|
**Wait for response.**
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
stage: code-generation
|
|
3
|
+
bolt: {bolt-id}
|
|
4
|
+
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Implementation Walkthrough: {unit-name}
|
|
8
|
+
|
|
9
|
+
### Summary
|
|
10
|
+
|
|
11
|
+
{2-3 sentence overview of what was built - NO CODE}
|
|
12
|
+
|
|
13
|
+
### Design Alignment
|
|
14
|
+
|
|
15
|
+
How the implementation aligns with design documents:
|
|
16
|
+
|
|
17
|
+
- **Domain Design**: {alignment notes or deviations}
|
|
18
|
+
- **Logical Design**: {alignment notes or deviations}
|
|
19
|
+
|
|
20
|
+
### Structure Overview
|
|
21
|
+
|
|
22
|
+
{High-level description of the DDD layers implemented - NO CODE}
|
|
23
|
+
|
|
24
|
+
### Completed Work
|
|
25
|
+
|
|
26
|
+
#### Domain Layer
|
|
27
|
+
- [x] `{path/to/file}` - {what this file does}
|
|
28
|
+
|
|
29
|
+
#### Application Layer
|
|
30
|
+
- [x] `{path/to/file}` - {what this file does}
|
|
31
|
+
|
|
32
|
+
#### Infrastructure Layer
|
|
33
|
+
- [x] `{path/to/file}` - {what this file does}
|
|
34
|
+
|
|
35
|
+
#### Presentation Layer
|
|
36
|
+
- [x] `{path/to/file}` - {what this file does}
|
|
37
|
+
|
|
38
|
+
### Story Traceability
|
|
39
|
+
|
|
40
|
+
| Story | Files |
|
|
41
|
+
|-------|-------|
|
|
42
|
+
| {story-id} | `{files}` |
|
|
43
|
+
|
|
44
|
+
### Key Decisions
|
|
45
|
+
|
|
46
|
+
- **{Decision}**: {Why this approach was chosen}
|
|
47
|
+
|
|
48
|
+
### Deviations from Design
|
|
49
|
+
|
|
50
|
+
{Any changes from domain-design or logical-design and why, or "None"}
|
|
51
|
+
|
|
52
|
+
### Dependencies Added
|
|
53
|
+
|
|
54
|
+
- [x] `{package}` - {why needed}
|
|
55
|
+
|
|
56
|
+
### Developer Notes
|
|
57
|
+
|
|
58
|
+
{Gotchas, tips, or context for future work - keep brief}
|
|
@@ -33,7 +33,7 @@ Stage 1: Domain Design → Stage 2: Logical Design → Stage 3: ADR Analysis (op
|
|
|
33
33
|
- ✅/[ ] **1. Domain Design** (Required) → `ddd-01-domain-design.md`
|
|
34
34
|
- ✅/[ ] **2. Logical Design** (Required) → `ddd-02-logical-design.md`
|
|
35
35
|
- ✅/[ ] **3. ADR Analysis** (Optional) → `adr-{n}-{slug}.md` (zero or more)
|
|
36
|
-
- ✅/[ ] **4. Code Generation** (Required) → Source code
|
|
36
|
+
- ✅/[ ] **4. Code Generation** (Required) → Source code + `ddd-04-implementation-walkthrough.md`
|
|
37
37
|
- ✅/[ ] **5. Testing** (Required) → Tests + `ddd-03-test-report.md`
|
|
38
38
|
|
|
39
39
|
**Rules**:
|
|
@@ -390,8 +390,14 @@ Implement CQRS pattern with separate read models for task queries.
|
|
|
390
390
|
7 - **Setup project structure**: Verify scaffolding exists
|
|
391
391
|
8 - **Run code quality validation**: Execute linting, type checking, build
|
|
392
392
|
|
|
393
|
-
**
|
|
394
|
-
|
|
393
|
+
**Artifacts**:
|
|
394
|
+
|
|
395
|
+
- Source code in unit directory: `src/{unit}/` or as defined in project structure
|
|
396
|
+
- `ddd-04-implementation-walkthrough.md`: `memory-bank/bolts/{bolt-id}/ddd-04-implementation-walkthrough.md`
|
|
397
|
+
|
|
398
|
+
**Template**: `.iris/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-04-implementation-walkthrough-template.md`
|
|
399
|
+
|
|
400
|
+
**Implementation Walkthrough** documents what was built, any deviations from design, and key decisions made during coding. This is required - do not skip it.
|
|
395
401
|
|
|
396
402
|
**Project Structure**:
|
|
397
403
|
|
|
@@ -623,10 +629,10 @@ status: in-progress
|
|
|
623
629
|
# Story-level tracking (updated during Stage 4)
|
|
624
630
|
stories_progress:
|
|
625
631
|
- id: 001-database-init
|
|
626
|
-
status:
|
|
632
|
+
status: complete
|
|
627
633
|
implemented_at: 2024-12-05T14:00:00Z
|
|
628
634
|
- id: 002-schema-tables
|
|
629
|
-
status:
|
|
635
|
+
status: complete
|
|
630
636
|
implemented_at: 2024-12-05T14:30:00Z
|
|
631
637
|
- id: 003-crud-operations
|
|
632
638
|
status: in-progress
|
|
@@ -147,6 +147,9 @@ created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
|
147
147
|
|
|
148
148
|
**Duration**: Hours (varies by complexity)
|
|
149
149
|
|
|
150
|
+
**For UI Work** (screens, components, layouts):
|
|
151
|
+
Load `.iris/aidlc/templates/construction/ui-patterns.md` before implementing. This guide helps you build professional UI without a designer.
|
|
152
|
+
|
|
150
153
|
**Activities**:
|
|
151
154
|
|
|
152
155
|
1 - **Setup structure**: Create files and folders
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# UI Design Guide
|
|
2
|
+
|
|
3
|
+
You are building UI for a project without a designer. Your goal is to create polished, professional interfaces that users love. Think like a designer, not a developer.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Design Mindset
|
|
8
|
+
|
|
9
|
+
**Before writing any UI code, ask yourself:**
|
|
10
|
+
|
|
11
|
+
1. What is the user trying to accomplish here?
|
|
12
|
+
2. What's the most important thing on this screen?
|
|
13
|
+
3. What can I remove to make it simpler?
|
|
14
|
+
4. Would a non-technical person understand this instantly?
|
|
15
|
+
|
|
16
|
+
**Your north star**: If it looks like a template, you've failed. If it feels intentional and crafted, you've succeeded.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Design Tokens (Non-Negotiable)
|
|
21
|
+
|
|
22
|
+
**Before building screens, define and lock these values:**
|
|
23
|
+
|
|
24
|
+
- Font family
|
|
25
|
+
- Type scale (use the one in this guide)
|
|
26
|
+
- Primary color
|
|
27
|
+
- Neutral gray scale
|
|
28
|
+
- Border radius
|
|
29
|
+
- Shadow levels
|
|
30
|
+
- Spacing scale
|
|
31
|
+
|
|
32
|
+
**Once defined:**
|
|
33
|
+
|
|
34
|
+
- Do not invent new sizes
|
|
35
|
+
- Do not invent new colors
|
|
36
|
+
- Do not invent new radiuses
|
|
37
|
+
- Do not invent new spacing values
|
|
38
|
+
|
|
39
|
+
**Consistency feels like quality. Inconsistency feels like bugs.**
|
|
40
|
+
|
|
41
|
+
This prevents "just one more size/color" syndrome. Every deviation from your tokens is a crack in the system.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## One Primary Action Rule
|
|
46
|
+
|
|
47
|
+
**Every screen should answer: "What is the ONE thing the user should do next?"**
|
|
48
|
+
|
|
49
|
+
- One primary button per screen (ideally)
|
|
50
|
+
- Everything else is secondary, tertiary, or hidden
|
|
51
|
+
- If you need two primary actions, the screen is doing too much
|
|
52
|
+
|
|
53
|
+
This is product thinking, not just UI. A confused user does nothing.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Decision Hierarchy
|
|
58
|
+
|
|
59
|
+
**When making UI decisions, prioritize in this order:**
|
|
60
|
+
|
|
61
|
+
1. **Clarity** - Is it instantly understandable?
|
|
62
|
+
2. **Hierarchy** - Is the important thing obvious?
|
|
63
|
+
3. **Consistency** - Does it match the system?
|
|
64
|
+
4. **Speed** - Is it fast to scan and act on?
|
|
65
|
+
5. **Aesthetics** - Does it look good?
|
|
66
|
+
|
|
67
|
+
Pretty but confusing is failure. Clear and boring beats clever and unclear.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Visual Hierarchy
|
|
72
|
+
|
|
73
|
+
**The most important design skill.** Guide the user's eye to what matters.
|
|
74
|
+
|
|
75
|
+
### Size Creates Importance
|
|
76
|
+
The bigger something is, the more important it appears. Your page title should be the largest text. Secondary info should be smaller and lighter.
|
|
77
|
+
|
|
78
|
+
### Contrast Draws Attention
|
|
79
|
+
High contrast = look here. Low contrast = secondary. Use bold weight, darker colors, or accent colors for emphasis.
|
|
80
|
+
|
|
81
|
+
### Whitespace Is Not Empty
|
|
82
|
+
Space around elements gives them importance and breathing room. Cramped UIs feel cheap. Generous spacing feels premium.
|
|
83
|
+
|
|
84
|
+
**When building a screen:**
|
|
85
|
+
1. Identify the ONE most important element
|
|
86
|
+
2. Make it visually dominant (size, position, contrast)
|
|
87
|
+
3. De-emphasize everything else
|
|
88
|
+
4. Add generous whitespace around important elements
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Typography
|
|
93
|
+
|
|
94
|
+
**Typography alone can make or break your UI.**
|
|
95
|
+
|
|
96
|
+
### Headlines
|
|
97
|
+
- Bold, confident, short
|
|
98
|
+
- Use sentence case (not ALL CAPS unless it's a label)
|
|
99
|
+
- Leave room to breathe
|
|
100
|
+
|
|
101
|
+
### Body Text
|
|
102
|
+
- 16px minimum for readability
|
|
103
|
+
- Line height of 1.5-1.7 for paragraphs
|
|
104
|
+
- Keep line length under 70 characters
|
|
105
|
+
|
|
106
|
+
### The Type Scale
|
|
107
|
+
Don't use random sizes. Pick a scale and stick to it:
|
|
108
|
+
```
|
|
109
|
+
12px - Labels, captions, metadata
|
|
110
|
+
14px - Secondary text, table content
|
|
111
|
+
16px - Body text, form inputs
|
|
112
|
+
18px - Emphasized body, subheadings
|
|
113
|
+
20px - Section headers
|
|
114
|
+
24px - Page titles on mobile
|
|
115
|
+
30px - Page titles on desktop
|
|
116
|
+
36px+ - Hero headlines only
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Font Weight
|
|
120
|
+
- Regular (400) - Body text
|
|
121
|
+
- Medium (500) - Subtle emphasis, navigation
|
|
122
|
+
- Semibold (600) - Headings, buttons
|
|
123
|
+
- Bold (700) - Strong emphasis, hero text
|
|
124
|
+
|
|
125
|
+
**Never use light (300) weights for UI text.** It's hard to read.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Color
|
|
130
|
+
|
|
131
|
+
### Less Is More
|
|
132
|
+
Use 2-3 colors maximum:
|
|
133
|
+
- **Primary**: Your brand color. Use sparingly for CTAs and key actions.
|
|
134
|
+
- **Neutral**: Grays for text, borders, backgrounds. This is 80% of your UI.
|
|
135
|
+
- **Semantic**: Red for errors, green for success, yellow for warnings.
|
|
136
|
+
|
|
137
|
+
### The Gray Trick
|
|
138
|
+
Most "white" backgrounds shouldn't be pure white (#FFFFFF). Use a very light gray (#FAFAFA or #F9FAFB) for large areas. It's easier on the eyes and makes white cards pop.
|
|
139
|
+
|
|
140
|
+
### Text Colors
|
|
141
|
+
- Primary text: Not pure black. Use #111827 or #1F2937
|
|
142
|
+
- Secondary text: #6B7280 (gray-500)
|
|
143
|
+
- Muted/disabled: #9CA3AF (gray-400)
|
|
144
|
+
|
|
145
|
+
### Don't Over-Color
|
|
146
|
+
If everything is colorful, nothing stands out. Keep most of your UI neutral and use color only for:
|
|
147
|
+
- Primary actions (buttons, links)
|
|
148
|
+
- Status indicators
|
|
149
|
+
- Errors and alerts
|
|
150
|
+
- Brand moments
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Spacing
|
|
155
|
+
|
|
156
|
+
### The 4px/8px System
|
|
157
|
+
All spacing should be multiples of 4px or 8px:
|
|
158
|
+
- 4px - Minimum gap (icon to label)
|
|
159
|
+
- 8px - Tight spacing (within a component)
|
|
160
|
+
- 16px - Standard spacing (between elements)
|
|
161
|
+
- 24px - Section spacing
|
|
162
|
+
- 32px - Large section gaps
|
|
163
|
+
- 48px+ - Major divisions
|
|
164
|
+
|
|
165
|
+
### Padding Consistency
|
|
166
|
+
- Buttons: 12px vertical, 16-24px horizontal
|
|
167
|
+
- Cards: 16-24px padding
|
|
168
|
+
- Page content: 24px on mobile, 32-48px on desktop
|
|
169
|
+
- Modals: 24px padding
|
|
170
|
+
|
|
171
|
+
### Group Related Items
|
|
172
|
+
Elements that belong together should be closer to each other than elements that don't. This creates visual groupings without needing borders.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Layout Principles
|
|
177
|
+
|
|
178
|
+
### Alignment Creates Order
|
|
179
|
+
Pick an alignment and stick to it. Left-aligned is almost always correct for Western UIs. Don't center long text.
|
|
180
|
+
|
|
181
|
+
### Limit Line Length
|
|
182
|
+
Long lines of text are hard to read. Keep content areas between 600-800px max width.
|
|
183
|
+
|
|
184
|
+
### Use a Grid
|
|
185
|
+
12-column grids work for most layouts. On mobile, use full width or simple 2-column splits.
|
|
186
|
+
|
|
187
|
+
### Z-Pattern for Landing Pages
|
|
188
|
+
Users scan in a Z pattern: top-left → top-right → bottom-left → bottom-right. Place key elements along this path.
|
|
189
|
+
|
|
190
|
+
### F-Pattern for Content Pages
|
|
191
|
+
Users scan in an F pattern for text-heavy pages. Put important info on the left and in headings.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Components That Feel Right
|
|
196
|
+
|
|
197
|
+
### Buttons
|
|
198
|
+
- Primary button: Solid background, used for main action (one per screen ideally)
|
|
199
|
+
- Secondary button: Outline or ghost, for secondary actions
|
|
200
|
+
- Destructive button: Red, used only for irreversible actions
|
|
201
|
+
- Make buttons look clickable: slight shadow, hover state, cursor pointer
|
|
202
|
+
|
|
203
|
+
### Forms
|
|
204
|
+
- One column is usually better than two
|
|
205
|
+
- Label above the input, not beside it
|
|
206
|
+
- Group related fields with a section heading
|
|
207
|
+
- Show validation errors below the field in red
|
|
208
|
+
- Use placeholder text for examples, not labels
|
|
209
|
+
|
|
210
|
+
### Cards
|
|
211
|
+
- Use subtle shadow, not heavy borders
|
|
212
|
+
- Keep padding consistent
|
|
213
|
+
- Don't put too much in one card
|
|
214
|
+
- Cards should be scannable - bold title, muted description
|
|
215
|
+
|
|
216
|
+
### Tables
|
|
217
|
+
- Align text left, numbers right
|
|
218
|
+
- Use subtle row borders or alternating backgrounds, not both
|
|
219
|
+
- Make rows hoverable
|
|
220
|
+
- Put actions at the end of the row
|
|
221
|
+
|
|
222
|
+
### Empty States
|
|
223
|
+
- Never show a blank screen
|
|
224
|
+
- Explain what will be here
|
|
225
|
+
- Provide a clear action to fix the emptiness
|
|
226
|
+
- Add an illustration if appropriate
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Mobile First
|
|
231
|
+
|
|
232
|
+
### Design for the smallest screen first
|
|
233
|
+
If it works on mobile, it will work everywhere. The reverse is not true.
|
|
234
|
+
|
|
235
|
+
### Touch Targets
|
|
236
|
+
Minimum 44x44px for anything tappable. Fingers are imprecise.
|
|
237
|
+
|
|
238
|
+
### Thumb Zone
|
|
239
|
+
On mobile, important actions should be reachable by thumb (bottom half of screen).
|
|
240
|
+
|
|
241
|
+
### Simplify, Don't Shrink
|
|
242
|
+
Don't just make the desktop version smaller. Remove and reorganize for mobile.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## The Details That Matter
|
|
247
|
+
|
|
248
|
+
### Micro-interactions
|
|
249
|
+
- Buttons should have hover and active states
|
|
250
|
+
- Loading states should be smooth, not jarring
|
|
251
|
+
- Transitions should be 150-200ms (fast but noticeable)
|
|
252
|
+
|
|
253
|
+
### Border Radius
|
|
254
|
+
- Pick one and be consistent: 4px (sharp), 8px (friendly), 12px+ (playful)
|
|
255
|
+
- Don't mix different radiuses randomly
|
|
256
|
+
|
|
257
|
+
### Shadows
|
|
258
|
+
- Use subtle shadows (shadow-sm) for cards and dropdowns
|
|
259
|
+
- Shadows should be soft and diffused, not harsh
|
|
260
|
+
- Don't put shadows on everything
|
|
261
|
+
|
|
262
|
+
### Icons
|
|
263
|
+
- Use a consistent icon set (Lucide, Heroicons)
|
|
264
|
+
- Icons should be the same visual weight as text
|
|
265
|
+
- Don't use icons without meaning
|
|
266
|
+
- Always pair icon-only buttons with tooltips
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Accessibility (Baseline Rules)
|
|
271
|
+
|
|
272
|
+
**These are not optional. They are usability under stress.**
|
|
273
|
+
|
|
274
|
+
- Text contrast must be readable in sunlight
|
|
275
|
+
- Color is never the only indicator (errors, success, status need icons or text too)
|
|
276
|
+
- All interactive elements must be keyboard-focusable
|
|
277
|
+
- Focus states are required (visible ring on focus)
|
|
278
|
+
- Minimum text size: 16px
|
|
279
|
+
- Tap targets: 44x44px minimum
|
|
280
|
+
|
|
281
|
+
Accessibility is not decoration. It's your product working for everyone.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Common UI Mistakes to Avoid
|
|
286
|
+
|
|
287
|
+
**Anti-patterns that make UIs feel amateurish:**
|
|
288
|
+
|
|
289
|
+
- Centered paragraphs of text (hard to read)
|
|
290
|
+
- Too many button styles on one screen
|
|
291
|
+
- Equal visual weight for all elements (nothing stands out)
|
|
292
|
+
- Icons without labels for critical actions
|
|
293
|
+
- Forms split into unnecessary columns
|
|
294
|
+
- Using placeholders instead of labels
|
|
295
|
+
- Overusing borders instead of spacing
|
|
296
|
+
- Multiple font families without reason
|
|
297
|
+
- Inconsistent spacing (16px here, 18px there)
|
|
298
|
+
- Pure black text on pure white backgrounds
|
|
299
|
+
- Tiny click targets on desktop (mobile isn't the only concern)
|
|
300
|
+
- Loading spinners without context ("Loading..." what?)
|
|
301
|
+
|
|
302
|
+
**If you catch yourself doing any of these, stop and reconsider.**
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Before You Ship
|
|
307
|
+
|
|
308
|
+
### The Squint Test
|
|
309
|
+
Squint at your screen. Can you still tell what's most important? If everything blurs into sameness, your hierarchy is weak.
|
|
310
|
+
|
|
311
|
+
### The Screenshot Test
|
|
312
|
+
Take a screenshot and look at it on your phone. Does it look like a real product or a developer's side project?
|
|
313
|
+
|
|
314
|
+
### The Mom Test
|
|
315
|
+
Would your non-technical mom understand what to do on this screen without help?
|
|
316
|
+
|
|
317
|
+
### Checklist
|
|
318
|
+
- [ ] One clear focal point per screen
|
|
319
|
+
- [ ] Consistent spacing throughout
|
|
320
|
+
- [ ] Type hierarchy is clear (3 sizes max per screen)
|
|
321
|
+
- [ ] Color is used intentionally, not decoratively
|
|
322
|
+
- [ ] Empty states are designed
|
|
323
|
+
- [ ] Loading states are smooth
|
|
324
|
+
- [ ] Works on mobile without horizontal scrolling
|
|
325
|
+
- [ ] All interactive elements have hover/focus states
|
|
326
|
+
- [ ] Adequate color contrast for accessibility
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Quick Reference
|
|
331
|
+
|
|
332
|
+
**When something feels off:**
|
|
333
|
+
- Add more whitespace
|
|
334
|
+
- Reduce the number of font sizes
|
|
335
|
+
- Increase contrast between heading and body
|
|
336
|
+
- Remove a color
|
|
337
|
+
- Align things properly
|
|
338
|
+
|
|
339
|
+
**When it looks boring:**
|
|
340
|
+
- Don't add more color - add more contrast
|
|
341
|
+
- Don't add decoration - add better typography
|
|
342
|
+
- Don't add borders - use whitespace and shadows
|
|
343
|
+
|
|
344
|
+
**When it's overwhelming:**
|
|
345
|
+
- Remove elements until it hurts, then add one back
|
|
346
|
+
- Break into smaller screens/steps
|
|
347
|
+
- Hide secondary actions in menus
|
|
348
|
+
- Use progressive disclosure
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
*Great UI is invisible. The user should focus on their task, not your interface. When in doubt, simplify.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-iris",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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": {
|
package/scripts/bolt-complete.js
CHANGED
|
@@ -388,34 +388,50 @@ async function updateStories(bolt) {
|
|
|
388
388
|
continue;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
const alreadyComplete = frontmatter.status === 'complete' && frontmatter.implemented === true;
|
|
392
|
+
|
|
393
|
+
// Always check acceptance criteria, even if story is already complete
|
|
394
|
+
const acResult = checkAcceptanceCriteria(content);
|
|
395
|
+
const acNeedsUpdate = acResult.modified;
|
|
396
|
+
|
|
397
|
+
// Skip only if fully complete AND no AC updates needed
|
|
398
|
+
if (alreadyComplete && !acNeedsUpdate) {
|
|
393
399
|
console.log(` ${colors.dim}−${colors.reset} ${storyId} - ${colors.dim}Already complete${colors.reset}`);
|
|
394
400
|
results.skipped++;
|
|
395
401
|
results.details.push({ storyId, status: 'skipped', reason: 'Already complete' });
|
|
396
402
|
continue;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
|
-
// Update frontmatter
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
implemented: true
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
let newContent = updateFrontmatter(content, newFrontmatter);
|
|
407
|
-
if (newContent) {
|
|
408
|
-
// Also check off acceptance criteria checkboxes
|
|
409
|
-
const acResult = checkAcceptanceCriteria(newContent);
|
|
405
|
+
// Update frontmatter (if not already complete)
|
|
406
|
+
let newContent;
|
|
407
|
+
if (alreadyComplete) {
|
|
408
|
+
// Only update ACs, keep existing frontmatter
|
|
410
409
|
newContent = acResult.content;
|
|
411
|
-
|
|
410
|
+
} else {
|
|
411
|
+
// Update both frontmatter and ACs
|
|
412
|
+
const newFrontmatter = {
|
|
413
|
+
...frontmatter,
|
|
414
|
+
status: 'complete',
|
|
415
|
+
implemented: true
|
|
416
|
+
};
|
|
417
|
+
newContent = updateFrontmatter(content, newFrontmatter);
|
|
418
|
+
if (newContent) {
|
|
419
|
+
const acResultUpdated = checkAcceptanceCriteria(newContent);
|
|
420
|
+
newContent = acResultUpdated.content;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
412
423
|
|
|
424
|
+
if (newContent) {
|
|
413
425
|
await fs.writeFile(storyPath, newContent, 'utf8');
|
|
414
426
|
const oldStatus = frontmatter.status || 'draft';
|
|
415
|
-
const acNote =
|
|
416
|
-
|
|
427
|
+
const acNote = acNeedsUpdate ? ` ${colors.dim}(ACs checked)${colors.reset}` : '';
|
|
428
|
+
if (alreadyComplete) {
|
|
429
|
+
console.log(` ${colors.green}✓${colors.reset} ${storyId} - ${colors.dim}ACs checked${colors.reset}`);
|
|
430
|
+
} else {
|
|
431
|
+
console.log(` ${colors.green}✓${colors.reset} ${storyId} - ${colors.dim}${oldStatus} → complete${colors.reset}${acNote}`);
|
|
432
|
+
}
|
|
417
433
|
results.updated++;
|
|
418
|
-
results.details.push({ storyId, status: 'updated', from: oldStatus, to: 'complete', acChecked });
|
|
434
|
+
results.details.push({ storyId, status: 'updated', from: oldStatus, to: 'complete', acChecked: acNeedsUpdate });
|
|
419
435
|
} else {
|
|
420
436
|
console.log(` ${colors.red}✗${colors.reset} ${storyId} - ${colors.dim}Failed to update${colors.reset}`);
|
|
421
437
|
results.errors++;
|