project-iris 0.6.7 → 0.6.9

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.
@@ -0,0 +1,106 @@
1
+ # Bolt Output Templates & Completion Checklist
2
+
3
+ > Referenced from `bolt-start.md` — Output formatting, post-bolt actions, and completion verification.
4
+
5
+ ---
6
+
7
+ ## Output (Stage Execution)
8
+
9
+ ```markdown
10
+ ## Executing Bolt: {bolt-id}
11
+
12
+ ### Current Stage: {stage-name}
13
+ **Type**: {bolt-type}
14
+ **Progress**: Stage {n} of {total}
15
+
16
+ ### Story Progress ({completed}/{total})
17
+
18
+ 1. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
19
+ 2. ✅ **{SSS}-{story-slug}**: Implemented → `{files}`
20
+ 3. ⏳ **{SSS}-{story-slug}**: In Progress
21
+ 4. [ ] **{SSS}-{story-slug}**: Pending
22
+
23
+ ### Activities Performed
24
+ 1. ✅ {activity 1}
25
+ 2. ✅ {activity 2}
26
+ 3. ⏳ {activity 3 - in progress}
27
+
28
+ ### Artifacts Created
29
+ - `{path/to/artifact}` - {description}
30
+
31
+ ---
32
+
33
+ ### Checkpoint (if defined by bolt type)
34
+ > "{checkpoint prompt from bolt type definition}"
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Output (Bolt Completed)
40
+
41
+ ```markdown
42
+ ## Bolt Complete: {bolt-id}
43
+
44
+ ### Summary
45
+ - **Type**: {bolt-type}
46
+ - **Duration**: {time elapsed}
47
+ - **Stages Completed**: {all stages from bolt type}
48
+
49
+ ### Artifacts Produced
50
+ {List artifacts as defined by bolt type}
51
+
52
+ ### Stories Delivered
53
+ - ✅ **{SSS}-{story-slug}**: Complete
54
+ - ✅ **{SSS}-{story-slug}**: Complete
55
+
56
+ ### Actions
57
+
58
+ 1 - **next**: Start next bolt
59
+ 2 - **list**: Review all bolts for this unit
60
+ 3 - **operations**: Proceed to Operations (if all complete)
61
+
62
+ **Type a number or press Enter for suggested action.**
63
+ ```
64
+
65
+ ---
66
+
67
+ ## CRITICAL: Post-Bolt Options (NEVER SKIP)
68
+
69
+ **After EVERY bolt completion, you MUST present the Actions menu above.**
70
+
71
+ ```text
72
+ ┌─────────────────────────────────────────────────────────────┐
73
+ │ BOLT COMPLETED │
74
+ │ → You MUST show the Actions menu (1-next, 2-list, 3-ops) │
75
+ │ → Do NOT just ask "approve to continue?" │
76
+ │ → Let the user CHOOSE their next action │
77
+ └─────────────────────────────────────────────────────────────┘
78
+ ```
79
+
80
+ **Failure Mode**: Asking "Ready to proceed to next bolt?" without showing options
81
+ **Correct Behavior**: Always show numbered Actions list and wait for user choice
82
+
83
+ ---
84
+
85
+ ## Bolt Completion Checklist
86
+
87
+ **Use this checklist to verify all completion tasks are done:**
88
+
89
+ ```text
90
+ □ Bolt file updated:
91
+ □ status: complete
92
+ □ completed: {timestamp}
93
+ □ current_stage: null
94
+
95
+ □ Stories updated (Step 10):
96
+ □ Each story in bolt's stories array:
97
+ □ status: complete
98
+ □ implemented: true
99
+
100
+ □ Status cascade checked (Step 11):
101
+ □ Unit status updated if all bolts complete
102
+ □ Intent status updated if all units complete
103
+
104
+ □ Construction log updated:
105
+ □ "{bolt-id} completed" entry added
106
+ ```
@@ -0,0 +1,55 @@
1
+ # Construction Log Updates
2
+
3
+ This sub-skill defines when and how to update the construction log.
4
+
5
+ ---
6
+
7
+ ## Update Construction Log (HARD GATE)
8
+
9
+ **⛔ HARD GATE - CONSTRUCTION LOG UPDATES REQUIRED**
10
+
11
+ ```text
12
+ ┌─────────────────────────────────────────────────────────────┐
13
+ │ CONSTRUCTION LOG - NON-NEGOTIABLE │
14
+ │ │
15
+ │ You MUST update the construction log at these points: │
16
+ │ 1. On first bolt start → Create log using template │
17
+ │ 2. On bolt start → Add "started" entry │
18
+ │ 3. On stage completion → Add "stage-complete" entry │
19
+ │ 4. On bolt completion → Add "completed" entry │
20
+ │ │
21
+ │ ⛔ FORBIDDEN: Starting bolt work without log entry │
22
+ │ ⛔ FORBIDDEN: Completing stage without log entry │
23
+ │ ⛔ FORBIDDEN: Completing bolt without log entry │
24
+ │ │
25
+ │ The construction log provides audit trail for the unit. │
26
+ │ No log entry = no evidence the work happened. │
27
+ └─────────────────────────────────────────────────────────────┘
28
+ ```
29
+
30
+ ### Location
31
+
32
+ `{unit-path}/construction-log.md`
33
+
34
+ ### On First Bolt Start
35
+
36
+ If construction log doesn't exist, create it using template:
37
+ `.iris/aidlc/templates/construction/construction-log-template.md`
38
+
39
+ ### On Bolt Start
40
+
41
+ ```markdown
42
+ - **{ISO-8601-timestamp}**: {bolt-id} started - Stage 1: {stage-name}
43
+ ```
44
+
45
+ ### On Stage Completion
46
+
47
+ ```markdown
48
+ - **{ISO-8601-timestamp}**: {bolt-id} stage-complete - {stage-name} → {next-stage}
49
+ ```
50
+
51
+ ### On Bolt Completion
52
+
53
+ ```markdown
54
+ - **{ISO-8601-timestamp}**: {bolt-id} completed - All {n} stages done
55
+ ```
@@ -0,0 +1,363 @@
1
+ # Figma Design Integration
2
+
3
+ This sub-skill handles Figma frame extraction, design specs, interaction flows, and scope enforcement for UI stories.
4
+
5
+ ---
6
+
7
+ ## 4c. Figma Frames (Conditional - Per Story)
8
+
9
+ **Check each story's `figma_frames` field in frontmatter.**
10
+
11
+ If a story has `figma_frames` (array of Figma URLs), use Figma MCP to fetch design specs and interaction flows before implementing.
12
+
13
+ **Supported Figma URL format:**
14
+
15
+ - Design file: `https://www.figma.com/design/{file-id}/{file-name}?node-id={node-id}&t={token}`
16
+
17
+ **When `figma_frames` is present:**
18
+
19
+ ```text
20
+ ┌─────────────────────────────────────────────────────────────┐
21
+ │ FIGMA FRAMES DETECTED │
22
+ │ │
23
+ │ Story: {story-id} │
24
+ │ Frames: {count} Figma frame(s) │
25
+ │ │
26
+ │ Action: Use Figma MCP to fetch design and flow data │
27
+ └─────────────────────────────────────────────────────────────┘
28
+ ```
29
+
30
+ **Figma MCP Integration:**
31
+
32
+ Use the Figma MCP tool to read design specifications. The MCP server is configured via:
33
+ `claude mcp add --transport http figma https://mcp.figma.com/mcp`
34
+
35
+ ### 4c-1. Extract Design Specs (Per Frame)
36
+
37
+ For EACH Figma frame URL, extract:
38
+
39
+ ```text
40
+ ┌─────────────────────────────────────────────────────────────┐
41
+ │ DESIGN SPECS EXTRACTION │
42
+ │ │
43
+ │ For each frame, extract: │
44
+ │ │
45
+ │ 1. Layout & Structure │
46
+ │ - Component hierarchy (parent/child relationships) │
47
+ │ - Spacing values (padding, margins, gaps) │
48
+ │ - Alignment and positioning │
49
+ │ │
50
+ │ 2. Visual Styling │
51
+ │ - Colors (exact hex values, opacity) │
52
+ │ - Typography (font family, size, weight, line height) │
53
+ │ - Border radius, shadows, effects │
54
+ │ │
55
+ │ 3. Component States │
56
+ │ - Default, hover, active, disabled, focus states │
57
+ │ - Loading states and skeletons │
58
+ │ - Error and success states │
59
+ │ │
60
+ │ 4. Responsive Variants (if defined) │
61
+ │ - Mobile, tablet, desktop variations │
62
+ │ - Breakpoint-specific layouts │
63
+ └─────────────────────────────────────────────────────────────┘
64
+ ```
65
+
66
+ ### 4c-2. Extract Interaction Flows
67
+
68
+ **Figma prototype connections MAY define interaction flows - but many designs don't have them.**
69
+
70
+ **Step 1: Check for prototype connections via Figma MCP**
71
+
72
+ ```text
73
+ ┌─────────────────────────────────────────────────────────────┐
74
+ │ PROTOTYPE CONNECTION CHECK │
75
+ │ │
76
+ │ Query Figma MCP for prototype data on each frame. │
77
+ │ Prototype connections include: │
78
+ │ - Navigation triggers (which element → which frame) │
79
+ │ - Transition types (push, overlay, swap) │
80
+ │ - Overlay settings (dismiss on click outside, etc.) │
81
+ └─────────────────────────────────────────────────────────────┘
82
+ ```
83
+
84
+ **Step 2: Determine flow source (in priority order)**
85
+
86
+ ```text
87
+ ┌─────────────────────────────────────────────────────────────┐
88
+ │ FLOW SOURCE PRIORITY │
89
+ │ │
90
+ │ 1. Figma prototype connections (if they exist) │
91
+ │ → Extract automatically from Figma MCP │
92
+ │ │
93
+ │ 2. Manual flow definition in story (if provided) │
94
+ │ → Read from story's `interaction_flows` field │
95
+ │ │
96
+ │ 3. No flow information available │
97
+ │ → Ask user OR infer from button labels │
98
+ └─────────────────────────────────────────────────────────────┘
99
+ ```
100
+
101
+ ### 4c-2a. If Prototype Connections Exist in Figma
102
+
103
+ Extract interaction data:
104
+
105
+ - Navigation actions (which element → destination frame)
106
+ - Overlay triggers (modals, bottom sheets, tooltips)
107
+ - Transition types and animations
108
+ - Dismiss behaviors
109
+
110
+ ### 4c-2b. If NO Prototype Connections in Figma
111
+
112
+ **Check story for manual `interaction_flows` definition:**
113
+
114
+ ```yaml
115
+ # In story frontmatter or body
116
+ interaction_flows:
117
+ - screen: login-form
118
+ interactions:
119
+ - element: "Sign Up button"
120
+ action: navigate
121
+ target: registration-form
122
+ - element: "Forgot Password link"
123
+ action: overlay
124
+ target: forgot-password-modal
125
+ ```
126
+
127
+ **If manual flows exist:** Use them to build the interaction map.
128
+
129
+ **If NO flows defined anywhere:**
130
+
131
+ ```text
132
+ ┌─────────────────────────────────────────────────────────────┐
133
+ │ NO INTERACTION FLOW DEFINED │
134
+ │ │
135
+ │ Story: {story-id} │
136
+ │ Figma frames: {count} (no prototype connections found) │
137
+ │ Manual flows: Not defined │
138
+ │ │
139
+ │ Options: │
140
+ │ 1 - Define interactions now (I'll ask about each button) │
141
+ │ 2 - Infer from button labels (best guess) │
142
+ │ 3 - Implement as static screens (no navigation wiring) │
143
+ └─────────────────────────────────────────────────────────────┘
144
+ ```
145
+
146
+ **Option 1 - Define interactions:** Ask user about each interactive element:
147
+
148
+ ```text
149
+ I found these interactive elements in the Figma frames:
150
+ - "Sign Up" button
151
+ - "Forgot Password" link
152
+ - "Login" button
153
+
154
+ For each element, what should happen on click?
155
+ ```
156
+
157
+ **Option 2 - Infer from labels:** Make reasonable assumptions:
158
+
159
+ - "Submit", "Save", "Login" → form submission
160
+ - "Cancel", "Close", "X" → close/go back
161
+ - "Sign Up", "Register" → navigate to registration
162
+ - "Learn More", "View Details" → navigate to detail screen
163
+
164
+ **Option 3 - Static screens:** Implement visuals only, user wires navigation later.
165
+
166
+ ### 4c-2c. Output: Interaction Map
167
+
168
+ After determining flows (from any source), build the interaction map:
169
+
170
+ ```markdown
171
+ ### Interaction Map: {story-id}
172
+
173
+ **Flow Source:** {Figma prototype | Manual definition | Inferred | Static}
174
+
175
+ #### Screen: {frame-name-1}
176
+ | Element | Action | Target | Type |
177
+ |---------|--------|--------|------|
178
+ | "Sign Up" button | on-click | registration-form | navigate |
179
+ | "Forgot Password" link | on-click | forgot-password-modal | overlay |
180
+
181
+ #### Navigation Flow
182
+
183
+ login-screen
184
+ ├── "Sign Up" → registration-form
185
+ ├── "Forgot Password" → forgot-password-modal (overlay)
186
+ └── "Login" → dashboard (on success)
187
+ ```
188
+
189
+ ### 4c-3. If Figma MCP is not available
190
+
191
+ ```text
192
+ ⚠️ Figma MCP not configured - cannot fetch design specs
193
+ Story {story-id} has figma_frames but Figma MCP is unavailable.
194
+
195
+ Options:
196
+ 1 - Continue using ui-patterns.md guidelines (design may not match)
197
+ 2 - Stop and configure Figma MCP first
198
+
199
+ To configure: Run `claude mcp add --transport http figma https://mcp.figma.com/mcp`
200
+ Then authenticate via `/mcp` in Claude Code.
201
+ ```
202
+
203
+ ### 4c-4. Design-First Implementation Rule
204
+
205
+ **⛔ HARD GATE - UI FIDELITY ENFORCEMENT**
206
+
207
+ ```text
208
+ ┌─────────────────────────────────────────────────────────────┐
209
+ │ UI FIDELITY - NON-NEGOTIABLE │
210
+ │ │
211
+ │ ⛔ FORBIDDEN: Approximating colors (use exact hex values) │
212
+ │ ⛔ FORBIDDEN: Guessing spacing (use exact px/rem values) │
213
+ │ ⛔ FORBIDDEN: Substituting fonts (use exact font family) │
214
+ │ ⛔ FORBIDDEN: Changing layout structure from Figma │
215
+ │ ⛔ FORBIDDEN: Adding/removing elements not in design │
216
+ │ │
217
+ │ The implementation MUST be pixel-perfect to the Figma. │
218
+ │ If deviation is required, STOP and ask the user first. │
219
+ └─────────────────────────────────────────────────────────────┘
220
+ ```
221
+
222
+ When a story has `figma_frames`:
223
+
224
+ 1. **Fetch ALL frames for THIS story FIRST** before writing any UI code
225
+ 2. **Build the interaction map** to understand the complete flow
226
+ 3. **Extract EXACT values** from Figma MCP response:
227
+ - Colors: Use exact hex values (e.g., `#1A1A1A`, not "dark gray")
228
+ - Spacing: Use exact pixel/rem values (e.g., `16px`, not "some padding")
229
+ - Typography: Use exact font-family, font-size, font-weight, line-height
230
+ - Border radius: Use exact values (e.g., `8px`, not "rounded")
231
+ - Shadows: Use exact shadow values from design
232
+ 4. **Match the design exactly** - Figma specs override ui-patterns.md defaults
233
+ 5. **Implement navigation** - wire up all interactions as defined in Figma
234
+ 6. **If you MUST deviate** from design:
235
+ - STOP and ask the user first
236
+ - Document the deviation and reason in code comments
237
+ - Get explicit approval before proceeding
238
+
239
+ **Post-Implementation Fidelity Check:**
240
+
241
+ After implementing UI code, verify against Figma:
242
+
243
+ ```text
244
+ ┌─────────────────────────────────────────────────────────────┐
245
+ │ FIDELITY CHECKLIST │
246
+ │ │
247
+ │ □ Colors match exactly (compare hex values) │
248
+ │ □ Spacing matches exactly (padding, margin, gap) │
249
+ │ □ Typography matches exactly (font, size, weight) │
250
+ │ □ Layout structure matches (flexbox/grid arrangement) │
251
+ │ □ Component hierarchy matches (nesting, order) │
252
+ │ □ Interactive states implemented (hover, focus, active) │
253
+ │ □ Responsive behavior matches (if defined in Figma) │
254
+ └─────────────────────────────────────────────────────────────┘
255
+ ```
256
+
257
+ ### 4c-5. When NO `figma_frames` Exists (Story-Level Collection)
258
+
259
+ **⛔ HARD GATE - DO NOT SKIP FOR UI STORIES**
260
+
261
+ If a story has UI signals (detected in Step 4b) but NO `figma_frames` in frontmatter:
262
+
263
+ ```text
264
+ ┌─────────────────────────────────────────────────────────────┐
265
+ │ UI STORY WITHOUT FIGMA FRAMES │
266
+ │ │
267
+ │ Story: {story-id} - {title} │
268
+ │ UI Detected: {signal found} │
269
+ │ Figma Frames: Not defined in story frontmatter │
270
+ │ │
271
+ │ Would you like to provide Figma design for THIS story? │
272
+ │ │
273
+ │ 1 - Yes, I'll provide Figma frame URL(s) for this story │
274
+ │ 2 - No, continue without Figma (use ui-patterns.md) │
275
+ └─────────────────────────────────────────────────────────────┘
276
+ ```
277
+
278
+ **If user selects "Yes":**
279
+
280
+ ```text
281
+ Please provide Figma frame URL(s) for story: {story-id}
282
+
283
+ ⚠️ IMPORTANT: Only provide frames relevant to THIS story's scope:
284
+ {list acceptance criteria titles from story}
285
+
286
+ Supported format:
287
+ - Design file: https://www.figma.com/design/{file-id}/{name}?node-id={node-id}&t={token}
288
+
289
+ Enter URL(s) (one per line, empty line to finish):
290
+ ```
291
+
292
+ **After collecting URLs:**
293
+
294
+ 1. Update the story file's `figma_frames` frontmatter with provided URLs
295
+ 2. Proceed with Figma MCP integration (Step 4c-1 onwards)
296
+
297
+ **If user selects "No":**
298
+
299
+ Fall back to ui-patterns.md guidelines (Step 4b). Generate UI based on:
300
+
301
+ 1. Acceptance criteria in the story
302
+ 2. Project's ux-guide.md (component library, styling approach)
303
+ 3. ui-patterns.md design principles
304
+
305
+ ### 4c-6. Figma Scope Enforcement (CRITICAL)
306
+
307
+ **⛔ HARD GATE - STORY SCOPE BOUNDARY**
308
+
309
+ ```text
310
+ ┌─────────────────────────────────────────────────────────────┐
311
+ │ FIGMA SCOPE ENFORCEMENT - NON-NEGOTIABLE │
312
+ │ │
313
+ │ ⛔ FORBIDDEN: Implementing screens beyond current story │
314
+ │ ⛔ FORBIDDEN: Building "all screens" from a Figma file │
315
+ │ ⛔ FORBIDDEN: Assuming Figma file scope = story scope │
316
+ │ │
317
+ │ Each story has its own scope. Figma frames provided for a │
318
+ │ story ONLY apply to that story's acceptance criteria. │
319
+ └─────────────────────────────────────────────────────────────┘
320
+ ```
321
+
322
+ **When user provides a Figma URL:**
323
+
324
+ **Step 1: Check if URL has multiple distinct screens/frames**
325
+
326
+ **Step 2: If multiple screens detected**, ask user to map them:
327
+
328
+ ```text
329
+ ┌─────────────────────────────────────────────────────────────┐
330
+ │ MULTIPLE SCREENS DETECTED │
331
+ │ │
332
+ │ The Figma URL contains {n} distinct screens/frames. │
333
+ │ Current story: {story-id} - {title} │
334
+ │ │
335
+ │ Which screen(s) apply to THIS story? │
336
+ │ │
337
+ │ Detected frames: │
338
+ │ 1. {frame-name-1} (node-id: {id}) │
339
+ │ 2. {frame-name-2} (node-id: {id}) │
340
+ │ 3. {frame-name-3} (node-id: {id}) │
341
+ │ ... │
342
+ │ │
343
+ │ Enter frame numbers for this story (e.g., "1, 2"): │
344
+ └─────────────────────────────────────────────────────────────┘
345
+ ```
346
+
347
+ **Step 3: Only implement the selected frames** for current story
348
+
349
+ **Step 4: Other frames belong to other stories** - do NOT implement them now
350
+
351
+ **Scope Validation Before Implementation:**
352
+
353
+ Before writing any UI code, verify:
354
+
355
+ ```text
356
+ Story: {story-id}
357
+ Acceptance Criteria: {list from story file}
358
+ Figma Frames Selected: {list selected frames}
359
+
360
+ ✓ All selected frames relate to this story's acceptance criteria
361
+ ✓ No frames selected that belong to other stories
362
+ ✓ Scope is bounded to THIS story only
363
+ ```