project-iris 0.6.4 → 0.6.6

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.
@@ -71,9 +71,7 @@ naming:
71
71
  figma_frames:
72
72
  description: "Optional array of Figma frame URLs for UI stories"
73
73
  type: "array of URLs"
74
- formats:
75
- - "https://www.figma.com/design/{file-id}/{file-name}?node-id={node-id}&t={token}"
76
- - "https://www.figma.com/make/{file-id}/{file-name}?p=f&t={token}"
74
+ format: "https://www.figma.com/design/{file-id}/{file-name}?node-id={node-id}&t={token}"
77
75
  note: "Construction Agent uses Figma MCP to fetch design specs. Prototype connections extracted if available."
78
76
  collected_by: "Inception Agent during story creation (Step 4a in story-create skill)"
79
77
  interaction_flows:
@@ -190,10 +190,9 @@ This is not a hard requirement - use judgment on which principles apply to the c
190
190
 
191
191
  If a story has `figma_frames` (array of Figma URLs), use Figma MCP to fetch design specs and interaction flows before implementing.
192
192
 
193
- **Supported Figma URL formats:**
193
+ **Supported Figma URL format:**
194
194
 
195
195
  - Design file: `https://www.figma.com/design/{file-id}/{file-name}?node-id={node-id}&t={token}`
196
- - Make file: `https://www.figma.com/make/{file-id}/{file-name}?p=f&t={token}`
197
196
 
198
197
  **When `figma_frames` is present:**
199
198
 
@@ -383,23 +382,166 @@ After determining flows (from any source), build the interaction map:
383
382
 
384
383
  ### 4c-4. Design-First Implementation Rule
385
384
 
385
+ **⛔ HARD GATE - UI FIDELITY ENFORCEMENT**
386
+
387
+ ```text
388
+ ┌─────────────────────────────────────────────────────────────┐
389
+ │ UI FIDELITY - NON-NEGOTIABLE │
390
+ │ │
391
+ │ ⛔ FORBIDDEN: Approximating colors (use exact hex values) │
392
+ │ ⛔ FORBIDDEN: Guessing spacing (use exact px/rem values) │
393
+ │ ⛔ FORBIDDEN: Substituting fonts (use exact font family) │
394
+ │ ⛔ FORBIDDEN: Changing layout structure from Figma │
395
+ │ ⛔ FORBIDDEN: Adding/removing elements not in design │
396
+ │ │
397
+ │ The implementation MUST be pixel-perfect to the Figma. │
398
+ │ If deviation is required, STOP and ask the user first. │
399
+ └─────────────────────────────────────────────────────────────┘
400
+ ```
401
+
386
402
  When a story has `figma_frames`:
387
403
 
388
- 1. **Fetch ALL frames FIRST** before writing any UI code
404
+ 1. **Fetch ALL frames for THIS story FIRST** before writing any UI code
389
405
  2. **Build the interaction map** to understand the complete flow
390
- 3. **Extract exact values** - don't approximate colors, spacing, or typography
391
- 4. **Match the design** - Figma specs override ui-patterns.md defaults
406
+ 3. **Extract EXACT values** from Figma MCP response:
407
+ - Colors: Use exact hex values (e.g., `#1A1A1A`, not "dark gray")
408
+ - Spacing: Use exact pixel/rem values (e.g., `16px`, not "some padding")
409
+ - Typography: Use exact font-family, font-size, font-weight, line-height
410
+ - Border radius: Use exact values (e.g., `8px`, not "rounded")
411
+ - Shadows: Use exact shadow values from design
412
+ 4. **Match the design exactly** - Figma specs override ui-patterns.md defaults
392
413
  5. **Implement navigation** - wire up all interactions as defined in Figma
393
- 6. **Note deviations** - if you must deviate from design, document why in code comments
414
+ 6. **If you MUST deviate** from design:
415
+ - STOP and ask the user first
416
+ - Document the deviation and reason in code comments
417
+ - Get explicit approval before proceeding
394
418
 
395
- **When NO `figma_frames` exists:**
419
+ **Post-Implementation Fidelity Check:**
396
420
 
397
- Fall back to ui-patterns.md guidelines (Step 4b). The agent should generate UI based on:
421
+ After implementing UI code, verify against Figma:
422
+
423
+ ```text
424
+ ┌─────────────────────────────────────────────────────────────┐
425
+ │ FIDELITY CHECKLIST │
426
+ │ │
427
+ │ □ Colors match exactly (compare hex values) │
428
+ │ □ Spacing matches exactly (padding, margin, gap) │
429
+ │ □ Typography matches exactly (font, size, weight) │
430
+ │ □ Layout structure matches (flexbox/grid arrangement) │
431
+ │ □ Component hierarchy matches (nesting, order) │
432
+ │ □ Interactive states implemented (hover, focus, active) │
433
+ │ □ Responsive behavior matches (if defined in Figma) │
434
+ └─────────────────────────────────────────────────────────────┘
435
+ ```
436
+
437
+ ### 4c-5. When NO `figma_frames` Exists (Story-Level Collection)
438
+
439
+ **⛔ HARD GATE - DO NOT SKIP FOR UI STORIES**
440
+
441
+ If a story has UI signals (detected in Step 4b) but NO `figma_frames` in frontmatter:
442
+
443
+ ```text
444
+ ┌─────────────────────────────────────────────────────────────┐
445
+ │ UI STORY WITHOUT FIGMA FRAMES │
446
+ │ │
447
+ │ Story: {story-id} - {title} │
448
+ │ UI Detected: {signal found} │
449
+ │ Figma Frames: Not defined in story frontmatter │
450
+ │ │
451
+ │ Would you like to provide Figma design for THIS story? │
452
+ │ │
453
+ │ 1 - Yes, I'll provide Figma frame URL(s) for this story │
454
+ │ 2 - No, continue without Figma (use ui-patterns.md) │
455
+ └─────────────────────────────────────────────────────────────┘
456
+ ```
457
+
458
+ **If user selects "Yes":**
459
+
460
+ ```text
461
+ Please provide Figma frame URL(s) for story: {story-id}
462
+
463
+ ⚠️ IMPORTANT: Only provide frames relevant to THIS story's scope:
464
+ {list acceptance criteria titles from story}
465
+
466
+ Supported format:
467
+ - Design file: https://www.figma.com/design/{file-id}/{name}?node-id={node-id}&t={token}
468
+
469
+ Enter URL(s) (one per line, empty line to finish):
470
+ ```
471
+
472
+ **After collecting URLs:**
473
+
474
+ 1. Update the story file's `figma_frames` frontmatter with provided URLs
475
+ 2. Proceed with Figma MCP integration (Step 4c-1 onwards)
476
+
477
+ **If user selects "No":**
478
+
479
+ Fall back to ui-patterns.md guidelines (Step 4b). Generate UI based on:
398
480
 
399
481
  1. Acceptance criteria in the story
400
482
  2. Project's ux-guide.md (component library, styling approach)
401
483
  3. ui-patterns.md design principles
402
484
 
485
+ ### 4c-6. Figma Scope Enforcement (CRITICAL)
486
+
487
+ **⛔ HARD GATE - STORY SCOPE BOUNDARY**
488
+
489
+ ```text
490
+ ┌─────────────────────────────────────────────────────────────┐
491
+ │ FIGMA SCOPE ENFORCEMENT - NON-NEGOTIABLE │
492
+ │ │
493
+ │ ⛔ FORBIDDEN: Implementing screens beyond current story │
494
+ │ ⛔ FORBIDDEN: Building "all screens" from a Figma file │
495
+ │ ⛔ FORBIDDEN: Assuming Figma file scope = story scope │
496
+ │ │
497
+ │ Each story has its own scope. Figma frames provided for a │
498
+ │ story ONLY apply to that story's acceptance criteria. │
499
+ └─────────────────────────────────────────────────────────────┘
500
+ ```
501
+
502
+ **When user provides a Figma URL:**
503
+
504
+ **Step 1: Check if URL has multiple distinct screens/frames**
505
+
506
+ **Step 2: If multiple screens detected**, ask user to map them:
507
+
508
+ ```text
509
+ ┌─────────────────────────────────────────────────────────────┐
510
+ │ MULTIPLE SCREENS DETECTED │
511
+ │ │
512
+ │ The Figma URL contains {n} distinct screens/frames. │
513
+ │ Current story: {story-id} - {title} │
514
+ │ │
515
+ │ Which screen(s) apply to THIS story? │
516
+ │ │
517
+ │ Detected frames: │
518
+ │ 1. {frame-name-1} (node-id: {id}) │
519
+ │ 2. {frame-name-2} (node-id: {id}) │
520
+ │ 3. {frame-name-3} (node-id: {id}) │
521
+ │ ... │
522
+ │ │
523
+ │ Enter frame numbers for this story (e.g., "1, 2"): │
524
+ └─────────────────────────────────────────────────────────────┘
525
+ ```
526
+
527
+ **Step 3: Only implement the selected frames** for current story
528
+
529
+ **Step 4: Other frames belong to other stories** - do NOT implement them now
530
+
531
+ **Scope Validation Before Implementation:**
532
+
533
+ Before writing any UI code, verify:
534
+
535
+ ```text
536
+ Story: {story-id}
537
+ Acceptance Criteria: {list from story file}
538
+ Figma Frames Selected: {list selected frames}
539
+
540
+ ✓ All selected frames relate to this story's acceptance criteria
541
+ ✓ No frames selected that belong to other stories
542
+ ✓ Scope is bounded to THIS story only
543
+ ```
544
+
403
545
  ### 5. Determine Current Stage
404
546
 
405
547
  Based on bolt state:
@@ -863,9 +1005,28 @@ After running the command, verify the changes were applied correctly:
863
1005
 
864
1006
  ---
865
1007
 
866
- ## Update Construction Log
1008
+ ## Update Construction Log (HARD GATE)
1009
+
1010
+ **⛔ HARD GATE - CONSTRUCTION LOG UPDATES REQUIRED**
867
1011
 
868
- **IMPORTANT**: Update the construction log at key execution points.
1012
+ ```text
1013
+ ┌─────────────────────────────────────────────────────────────┐
1014
+ │ CONSTRUCTION LOG - NON-NEGOTIABLE │
1015
+ │ │
1016
+ │ You MUST update the construction log at these points: │
1017
+ │ 1. On first bolt start → Create log using template │
1018
+ │ 2. On bolt start → Add "started" entry │
1019
+ │ 3. On stage completion → Add "stage-complete" entry │
1020
+ │ 4. On bolt completion → Add "completed" entry │
1021
+ │ │
1022
+ │ ⛔ FORBIDDEN: Starting bolt work without log entry │
1023
+ │ ⛔ FORBIDDEN: Completing stage without log entry │
1024
+ │ ⛔ FORBIDDEN: Completing bolt without log entry │
1025
+ │ │
1026
+ │ The construction log provides audit trail for the unit. │
1027
+ │ No log entry = no evidence the work happened. │
1028
+ └─────────────────────────────────────────────────────────────┘
1029
+ ```
869
1030
 
870
1031
  ### Location
871
1032
 
@@ -182,9 +182,8 @@ Organize stories for bolt planning:
182
182
  Please provide Figma frame URLs for this story.
183
183
  You can provide multiple URLs (one per screen/component).
184
184
 
185
- Supported formats:
185
+ Supported format:
186
186
  - Design file: https://www.figma.com/design/{file-id}/{name}?node-id={node-id}&t={token}
187
- - Make file: https://www.figma.com/make/{file-id}/{name}?p=f&t={token}
188
187
 
189
188
  Enter URLs (one per line, empty line to finish):
190
189
  ```
@@ -8,14 +8,29 @@ You are building UI for a project. Your goal is to create polished, professional
8
8
 
9
9
  **If a story has `figma_frames` (array of Figma URLs), use Figma MCP to fetch design specs and interaction flows.**
10
10
 
11
+ ### CRITICAL: Pixel-Perfect Implementation Required
12
+
13
+ When Figma designs exist, your implementation MUST match the design exactly. This is non-negotiable.
14
+
15
+ **FORBIDDEN:**
16
+
17
+ - Approximating colors ("dark gray" instead of `#1A1A1A`)
18
+ - Guessing spacing ("some padding" instead of `16px`)
19
+ - Substituting fonts (using system font instead of specified font)
20
+ - Changing layout structure from what Figma shows
21
+ - Adding or removing elements not in the design
22
+
23
+ **If you must deviate from the design, STOP and ask the user first.**
24
+
11
25
  ### When Figma Frames Exist
12
26
 
13
- 1. **Fetch ALL frames first** via Figma MCP before writing any code
14
- 2. **Extract design specs** from each frame:
15
- - Colors (exact hex values, opacity)
16
- - Typography (font family, size, weight, line height)
17
- - Spacing (padding, margins, gaps)
18
- - Border radius, shadows, effects
27
+ 1. **Fetch ALL frames for THIS story first** via Figma MCP before writing any code
28
+ 2. **Extract EXACT design specs** from each frame:
29
+ - Colors: Use exact hex values (e.g., `#1A1A1A`, not "dark")
30
+ - Typography: Exact font-family, font-size, font-weight, line-height
31
+ - Spacing: Exact pixel/rem values (e.g., `16px`, not "medium")
32
+ - Border radius: Exact values (e.g., `8px`)
33
+ - Shadows: Exact shadow values from design
19
34
  - Component dimensions and states
20
35
  3. **Extract interaction flows** (prototype connections):
21
36
  - Navigation actions (which button goes where)
@@ -25,7 +40,7 @@ You are building UI for a project. Your goal is to create polished, professional
25
40
  4. **Build an interaction map** showing the complete flow between screens
26
41
  5. **Match the design exactly** - Figma specs override the guidelines below
27
42
  6. **Implement all interactions** as defined in Figma's prototype connections
28
- 7. **Document deviations** - if you must deviate, explain why in code comments
43
+ 7. **Verify fidelity** - After implementation, compare against Figma and fix any differences
29
44
 
30
45
  ### When No Figma Frames Exist
31
46
 
@@ -49,10 +49,9 @@ interaction_flows: [] # Optional: Manual flow definition (only if Figma has no
49
49
  - {figma-frame-url-1}
50
50
  - {figma-frame-url-2}
51
51
 
52
- **Supported URL formats:**
52
+ **Supported URL format:**
53
53
 
54
54
  - Design file: `https://www.figma.com/design/{file-id}/{file-name}?node-id={node-id}&t={token}`
55
- - Make file: `https://www.figma.com/make/{file-id}/{file-name}?p=f&t={token}`
56
55
 
57
56
  **What the Construction Agent extracts via Figma MCP:**
58
57
 
package/lib/installer.js CHANGED
@@ -2,6 +2,7 @@ const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
  const prompts = require('prompts');
4
4
  const yaml = require('js-yaml');
5
+ const { execSync } = require('child_process');
5
6
  const CLIUtils = require('./cli-utils');
6
7
  const InstallerFactory = require('./InstallerFactory');
7
8
  const { FLOWS } = require('./constants');
@@ -350,10 +351,27 @@ async function installFlow(flowKey, toolKeys) {
350
351
  if (await fs.pathExists(sourceScriptsDir)) {
351
352
  await fs.copy(sourceScriptsDir, scriptsDir);
352
353
  CLIUtils.displayStatus('', 'Installed local scripts', 'success');
354
+
355
+ // Install script dependencies (fs-extra, js-yaml)
356
+ // Scripts require these npm packages to function
357
+ const scriptsPackageJson = path.join(scriptsDir, 'package.json');
358
+ if (await fs.pathExists(scriptsPackageJson)) {
359
+ console.log(theme.dim(' Installing script dependencies...'));
360
+ try {
361
+ execSync('npm install --production --silent', {
362
+ cwd: scriptsDir,
363
+ stdio: 'pipe'
364
+ });
365
+ CLIUtils.displayStatus('', 'Installed script dependencies', 'success');
366
+ } catch (npmError) {
367
+ // Non-fatal: warn user but continue installation
368
+ console.log(theme.warning(' Warning: Could not install script dependencies automatically'));
369
+ console.log(theme.dim(` Run: cd ${scriptsDir} && npm install`));
370
+ }
371
+ }
353
372
  }
354
373
 
355
374
  // Note: Scripts are invoked directly via relative path (e.g., node .iris/scripts/bolt-complete.js)
356
- // No npm scripts added to package.json to avoid dependency on package.json for execution
357
375
 
358
376
  // NOTE: memory-bank/ is NOT created during installation
359
377
  // It will be created when user runs project-init
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-iris",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
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": {
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "iris-scripts",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "description": "Helper scripts for iris AI-DLC workflow",
6
+ "scripts": {
7
+ "bolt-complete": "node bolt-complete.js",
8
+ "status-integrity": "node status-integrity.js",
9
+ "artifact-validator": "node artifact-validator.js"
10
+ },
11
+ "dependencies": {
12
+ "fs-extra": "^11.1.1",
13
+ "js-yaml": "^4.1.0"
14
+ }
15
+ }