claude-symphony 0.5.2 → 0.5.4

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/README.md CHANGED
@@ -138,7 +138,7 @@ claude-symphony provides context management tools to help track and manage Claud
138
138
  | **Pipeline** | `/status`, `/next`, `/handoff`, `/checkpoint`, `/context`, `/validate`, `/restore`, `/run-stage`, `/stages` |
139
139
  | **Multi-AI** | `/collaborate`, `/synthesize`, `/benchmark`, `/fork`, `/gemini`, `/codex` |
140
140
  | **Stage Shortcuts** | `/brainstorm`, `/research`, `/planning`, `/ui-ux`, `/tasks`, `/implement`, `/refactor`, `/qa`, `/test`, `/deploy` |
141
- | **Requirements & Design** | `/epic`, `/refine`, `/moodboard`, `/stitch` |
141
+ | **Requirements & Design** | `/epic`, `/refine`, `/moodboard`, `/moodboard generate`, `/pencil`, `/stitch` |
142
142
  | **Agent** | `/arch-review`, `/qa-analyze` |
143
143
  | **Configuration** | `/config`, `/goto`, `/init-project` |
144
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-symphony",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Multi-AI Orchestration Framework - Create new projects with 10-stage development workflow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -76,6 +76,13 @@ Automatically runs at Stage 03 completion.
76
76
 
77
77
  Prevents 50-100% of Stage 06 rework by catching issues early.
78
78
 
79
+ ## Agent Model Selection
80
+
81
+ When spawning **architecture-review-agent**:
82
+ 1. Read `.claude/agents/architecture-review-agent/agent.json`
83
+ 2. Pass the `model` field value to the Task tool's `model` parameter
84
+ 3. If `"inherit"` or absent, omit the `model` parameter
85
+
79
86
  ## Fallback
80
87
 
81
88
  If agent fails, performs basic file existence check only.
@@ -105,6 +105,13 @@ scripts/ai-benchmark.sh --history weekly
105
105
 
106
106
  See `config/ai_benchmarking.yaml`
107
107
 
108
+ ## Agent Model Selection
109
+
110
+ When spawning **benchmark-analyzer-agent**:
111
+ 1. Read `.claude/agents/benchmark-analyzer-agent/agent.json`
112
+ 2. Pass the `model` field value to the Task tool's `model` parameter
113
+ 3. If `"inherit"` or absent, omit the `model` parameter
114
+
108
115
  ## Related Commands
109
116
 
110
117
  - `/collaborate` - AI collaboration
@@ -88,6 +88,15 @@ Continue? [y/N] y
88
88
  - `06-implementation`: At major milestones during implementation
89
89
  - `07-refactoring`: Before/after refactoring
90
90
 
91
+ ## Agent Model Selection
92
+
93
+ When spawning **checkpoint-manager-agent**:
94
+ 1. Read `.claude/agents/checkpoint-manager-agent/agent.json`
95
+ 2. Pass the `model` field value to the Task tool's `model` parameter (expected: `haiku`)
96
+ 3. If `"inherit"` or absent, omit the `model` parameter
97
+
98
+ > **Cost note**: checkpoint-manager-agent uses `haiku` for lightweight background execution.
99
+
91
100
  ## Options
92
101
  - `--list`: Display checkpoint list
93
102
  - `--delete [CP-ID]`: Delete checkpoint
@@ -33,6 +33,13 @@ By default, this command uses the **handoff-generator-agent** which:
33
33
  - Applies conditional sections based on stage context
34
34
  - Uses extended thinking for complex analysis
35
35
 
36
+ ## Agent Model Selection
37
+
38
+ When spawning **handoff-generator-agent**:
39
+ 1. Read `.claude/agents/handoff-generator-agent/agent.json`
40
+ 2. Pass the `model` field value to the Task tool's `model` parameter
41
+ 3. If `"inherit"` or absent, omit the `model` parameter
42
+
36
43
  ## Fallback
37
44
 
38
45
  If agent fails, automatically falls back to legacy bash script.
@@ -6,6 +6,7 @@ Collect visual references and analyze them to generate design tokens and design
6
6
 
7
7
  ```
8
8
  /moodboard # Start interactive moodboard flow
9
+ /moodboard generate # Generate moodboard from text description (Path B)
9
10
  /moodboard add [category] # Add images to a category
10
11
  /moodboard analyze # Run analysis on collected images
11
12
  /moodboard feedback "..." # Provide feedback on analysis
@@ -59,8 +60,58 @@ Review collected images and run initial analysis.
59
60
 
60
61
  ---
61
62
 
63
+ ## Dual-Path Workflow
64
+
65
+ The moodboard supports two paths based on your pre-start intake answers:
66
+
67
+ ### Path A: Analyze Existing References
68
+ If you already have design references, use the standard interactive flow:
69
+ ```
70
+ /moodboard # Collect and analyze existing images
71
+ ```
72
+
73
+ ### Path B: AI-Generated Moodboard
74
+ If you have no references, generate a moodboard from text descriptions:
75
+ ```
76
+ /moodboard generate # Generate moodboard via AI
77
+ ```
78
+
79
+ ---
80
+
62
81
  ## Subcommands
63
82
 
83
+ ### `/moodboard generate` (Path B: AI-Generated Moodboard)
84
+
85
+ Generate a moodboard from text descriptions when no existing references are available.
86
+
87
+ **Flow:**
88
+ 1. **Description Collection** - Describe your desired visual style
89
+ 2. **AI Generation** - Generate visual references using provider chain
90
+ 3. **User Review** - Review and approve/reject generated references
91
+ 4. **Token Extraction** - Extract design tokens from approved selections
92
+
93
+ **Generation Provider Priority:**
94
+ 1. **Pencil.dev** (via Playwright/BrowserMCP) - Text-to-UI generation
95
+ 2. **Stitch MCP** - Google Stitch text-to-UI fallback
96
+ 3. **Claude Vision** - AI-described design concepts
97
+
98
+ **Example:**
99
+ ```
100
+ /moodboard generate
101
+ > Describe your desired visual style:
102
+ > "Modern SaaS dashboard with dark theme, glassmorphism cards, and gradient accents"
103
+
104
+ Generating via Pencil.dev...
105
+ [Generated 3 style references]
106
+
107
+ Review:
108
+ 1. [Dark glassmorphism variant] - love_it / tweak / different / discard
109
+ 2. [Gradient accent variant] - love_it / tweak / different / discard
110
+ 3. [Minimal dark variant] - love_it / tweak / different / discard
111
+
112
+ Extracting design tokens from approved selections...
113
+ ```
114
+
64
115
  ### `/moodboard add [category]`
65
116
  Add images to a specific category without going through full flow.
66
117
 
@@ -89,10 +140,11 @@ Run analysis on all collected images using configured provider.
89
140
  - Component recommendations
90
141
  - Spacing/rhythm analysis
91
142
 
92
- **Analysis Providers:**
93
- - `claude_vision` (default) - Claude's native vision capabilities
94
- - `figma_mcp` - Figma MCP for design token export
95
- - `both` - Use both providers
143
+ **Analysis Providers (priority order):**
144
+ 1. `pencil_dev` - Pencil.dev browser-automated analysis (via Playwright/BrowserMCP)
145
+ 2. `stitch` - Google Stitch MCP analysis
146
+ 3. `figma_mcp` - Figma MCP for design token export
147
+ 4. `claude_vision` - Claude's native vision capabilities
96
148
 
97
149
  **Action:**
98
150
  ```bash
@@ -160,7 +212,21 @@ stages/04-ui-ux/inputs/moodboard/
160
212
 
161
213
  ## Analysis Flow
162
214
 
163
- ### Using Claude Vision (Default)
215
+ ### Using Pencil.dev (Primary)
216
+
217
+ 1. **Browser Launch**: Open Pencil.dev via Playwright (or BrowserMCP fallback)
218
+ 2. **Image Upload**: Upload moodboard images for analysis
219
+ 3. **AI Analysis**: Pencil.dev extracts design patterns
220
+ 4. **Token Generation**: Color, typography, spacing, component tokens
221
+
222
+ ### Using Stitch MCP (Fallback 1)
223
+
224
+ When Pencil.dev is unavailable:
225
+ 1. **Design DNA Extraction**: Extract style tokens from images
226
+ 2. **Pattern Analysis**: Identify layout and component patterns
227
+ 3. **Export**: Generate design tokens
228
+
229
+ ### Using Claude Vision (Fallback 3)
164
230
 
165
231
  1. **Image Reading**: Claude reads all images in moodboard directories
166
232
  2. **Color Extraction**: Identifies dominant and accent colors
@@ -168,7 +234,7 @@ stages/04-ui-ux/inputs/moodboard/
168
234
  4. **Layout Patterns**: Identifies grid systems and spacing patterns
169
235
  5. **Component Identification**: Suggests UI component patterns
170
236
 
171
- ### Using Figma MCP
237
+ ### Using Figma MCP (Fallback 2)
172
238
 
173
239
  When Figma links are provided:
174
240
  1. **Variable Extraction**: Get design variables from Figma
@@ -242,7 +308,7 @@ Moodboard state is tracked in `state/progress.json`:
242
308
 
243
309
  ## Configuration
244
310
 
245
- See `config/ui-ux.yaml` for detailed settings:
311
+ See `config/ui-ux.jsonc` for detailed settings:
246
312
  - Collection flow steps
247
313
  - Analysis providers
248
314
  - Feedback loop settings
@@ -0,0 +1,181 @@
1
+ # /pencil - Pencil.dev Browser-Automated UI Generation & Analysis
2
+
3
+ Generate UI designs and analyze visual references using Pencil.dev via browser automation.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /pencil # Show status and connection check
9
+ /pencil generate "description" # Generate UI from text description
10
+ /pencil analyze path/to/image # Analyze image for design tokens
11
+ /pencil moodboard "description" # Generate moodboard from text description
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Commands
17
+
18
+ ### `/pencil` (Status)
19
+
20
+ Check Pencil.dev accessibility and browser MCP status.
21
+
22
+ **Output:**
23
+ - Pencil.dev connection status
24
+ - Browser MCP availability (Playwright / BrowserMCP)
25
+ - Current fallback chain status
26
+
27
+ ### `/pencil generate "description"`
28
+
29
+ Generate UI from a text description using Pencil.dev.
30
+
31
+ **Example:**
32
+ ```
33
+ /pencil generate "A modern dashboard with sidebar navigation, user avatar, and analytics cards"
34
+ ```
35
+
36
+ **Process:**
37
+ 1. Launch browser via Playwright (or BrowserMCP fallback)
38
+ 2. Navigate to Pencil.dev
39
+ 3. Input design description
40
+ 4. Capture generated UI output
41
+ 5. Save to `outputs/pencil_generated/`
42
+
43
+ **Output:**
44
+ - `outputs/pencil_generated/ui_[timestamp]/` - Generated UI screenshots and assets
45
+
46
+ ### `/pencil analyze path/to/image`
47
+
48
+ Analyze an image or screenshot to extract design tokens and patterns.
49
+
50
+ **Example:**
51
+ ```
52
+ /pencil analyze inputs/moodboard/ui-references/hero-section.png
53
+ ```
54
+
55
+ **Extracts:**
56
+ - Color palette
57
+ - Typography patterns
58
+ - Layout structure
59
+ - Component identification
60
+ - Spacing rhythm
61
+
62
+ ### `/pencil moodboard "description"`
63
+
64
+ Generate a moodboard from a text description (Path B workflow).
65
+
66
+ **Example:**
67
+ ```
68
+ /pencil moodboard "Modern SaaS app with dark theme, glassmorphism, and gradient accents"
69
+ ```
70
+
71
+ **Process:**
72
+ 1. Generate multiple style references via Pencil.dev
73
+ 2. Present to user for review
74
+ 3. Extract design tokens from approved selections
75
+
76
+ ---
77
+
78
+ ## Browser MCP Priority
79
+
80
+ Pencil.dev is accessed via browser automation. The priority order:
81
+
82
+ ```
83
+ 1. Playwright MCP (primary)
84
+ - Full browser control
85
+ - Screenshot capture
86
+ - Element interaction
87
+
88
+ 2. BrowserMCP (fallback)
89
+ - Alternative browser automation
90
+ - Used when Playwright is unavailable
91
+ ```
92
+
93
+ ### Browser Configuration
94
+
95
+ ```jsonc
96
+ {
97
+ "browser_config": {
98
+ "primary": "playwright",
99
+ "fallback": "browsermcp",
100
+ "timeout_ms": 30000,
101
+ "retry_count": 2
102
+ }
103
+ }
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Fallback Chain
109
+
110
+ When Pencil.dev is unavailable or browser automation fails:
111
+
112
+ ```
113
+ Pencil.dev (via Playwright)
114
+ |
115
+ +-- Playwright failed? --------> Pencil.dev (via BrowserMCP)
116
+ |
117
+ +-- BrowserMCP failed? --------> Stitch MCP (text-to-UI)
118
+ |
119
+ +-- Stitch unavailable? -------> Figma MCP (design tokens only)
120
+ |
121
+ +-- Figma unavailable? --------> Claude Vision (analysis only)
122
+ |
123
+ +-- All failed? ---------------> Manual wireframes (ASCII/Mermaid)
124
+ ```
125
+
126
+ Fallback configuration: `config/mcp_fallbacks.jsonc`
127
+
128
+ ---
129
+
130
+ ## Integration with Moodboard Workflow
131
+
132
+ ### Path A (Existing References)
133
+ ```
134
+ /moodboard # Collect existing images
135
+ /pencil analyze ... # Analyze with Pencil.dev
136
+ /moodboard export # Export design tokens
137
+ ```
138
+
139
+ ### Path B (AI-Generated)
140
+ ```
141
+ /pencil moodboard "..." # Generate moodboard via Pencil.dev
142
+ [User reviews and approves]
143
+ /moodboard export # Export design tokens
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Output Files
149
+
150
+ | File | Description |
151
+ |------|-------------|
152
+ | `outputs/pencil_generated/` | Generated UI files |
153
+ | `outputs/pencil_analysis/` | Analysis results |
154
+ | `outputs/design_dna.json` | Extracted Design DNA |
155
+
156
+ ---
157
+
158
+ ## Configuration
159
+
160
+ See `config/ui-ux.jsonc` for settings:
161
+ - `moodboard.analysis_provider.providers.pencil_dev` - Provider configuration
162
+ - `moodboard.moodboard_workflow` - Dual-path workflow settings
163
+
164
+ ---
165
+
166
+ ## Troubleshooting
167
+
168
+ ### "Pencil.dev not accessible"
169
+ - Check internet connection
170
+ - Verify https://pencil.dev is available
171
+ - Fallback will auto-activate (Stitch MCP)
172
+
173
+ ### "Browser MCP not available"
174
+ - Ensure Playwright or BrowserMCP is configured
175
+ - Run: `claude mcp list` to check available browser MCPs
176
+ - Install Playwright: see MCP server setup docs
177
+
178
+ ### "Browser automation timeout"
179
+ - Default timeout: 30 seconds
180
+ - Retries: 2 attempts before fallback
181
+ - If persistent, use `/stitch` as alternative
@@ -66,6 +66,13 @@ Report: state/qa_analysis/qa_report_20260128_143000.json
66
66
 
67
67
  Automatically runs as part of Stage 08 (QA) workflow.
68
68
 
69
+ ## Agent Model Selection
70
+
71
+ When spawning **qa-analysis-agent**:
72
+ 1. Read `.claude/agents/qa-analysis-agent/agent.json`
73
+ 2. Pass the `model` field value to the Task tool's `model` parameter
74
+ 3. If `"inherit"` or absent, omit the `model` parameter
75
+
69
76
  ## Fallback
70
77
 
71
78
  If agent fails, runs basic npm audit only.
@@ -118,12 +118,16 @@ Display detailed quota usage and history.
118
118
 
119
119
  ## Workflow Integration
120
120
 
121
+ > **Note**: Stitch is the **2nd priority** UI generation tool. Pencil.dev is 1st priority.
122
+ > Stitch auto-activates when Pencil.dev is unavailable or fails.
123
+
121
124
  Recommended workflow for Stage 04 (UI/UX):
122
125
 
123
126
  ```
124
- 1. /moodboard # Collect design references
125
- 2. /moodboard analyze # Analyze with Claude Vision
126
- 3. /stitch dna # Extract Design DNA from moodboard
127
+ 1. /moodboard # Collect design references (or /moodboard generate)
128
+ 2. /pencil analyze ... # Analyze with Pencil.dev (primary)
129
+ └─ If Pencil.dev fails:
130
+ 3. /stitch dna # Extract Design DNA from moodboard (fallback)
127
131
  4. /stitch generate "..." # Generate initial UI
128
132
  5. /stitch variants 3 # Generate alternatives
129
133
  6. [Select best variant]
@@ -170,18 +174,22 @@ At 80% usage, a warning is displayed. Consider:
170
174
 
171
175
  ## Fallback Chain
172
176
 
173
- When Stitch is unavailable or quota exceeded:
177
+ Full fallback chain (Stitch is 2nd priority):
174
178
 
175
179
  ```
176
- Stitch MCP
177
-
178
- ├─ Quota exceeded? ──────▶ Figma MCP (design tokens only)
179
-
180
- ├─ API error? ──────────▶ Retry 2x, then Figma MCP
180
+ Pencil.dev (via Playwright) ◀── 1st Priority
181
181
 
182
- ├─ Figma unavailable? ──▶ Claude Vision (analysis only)
182
+ ├─ Browser failed? ────────▶ Pencil.dev (via BrowserMCP)
183
183
 
184
- └─ All failed? ─────────▶ Manual wireframes (ASCII/Mermaid)
184
+ └─ All browsers failed? ───▶ Stitch MCP ◀── 2nd Priority (this tool)
185
+
186
+ ├─ Quota exceeded? ──────▶ Figma MCP (design tokens only)
187
+
188
+ ├─ API error? ──────────▶ Retry 2x, then Figma MCP
189
+
190
+ ├─ Figma unavailable? ──▶ Claude Vision (analysis only)
191
+
192
+ └─ All failed? ─────────▶ Manual wireframes (ASCII/Mermaid)
185
193
  ```
186
194
 
187
195
  Fallback configuration: `config/mcp_fallbacks.jsonc`
@@ -57,6 +57,13 @@ Final output: stages/01-brainstorm/outputs/ideas.md
57
57
  - Default: 0.8 (80%)
58
58
  - If below threshold: Triggers review prompt
59
59
 
60
+ ## Agent Model Selection
61
+
62
+ When spawning **output-synthesis-agent**:
63
+ 1. Read `.claude/agents/output-synthesis-agent/agent.json`
64
+ 2. Pass the `model` field value to the Task tool's `model` parameter
65
+ 3. If `"inherit"` or absent, omit the `model` parameter
66
+
60
67
  ## Fallback
61
68
 
62
69
  If agent fails, falls back to best_of_n scoring method.
@@ -167,6 +167,13 @@ See `config/output_validation.yaml`
167
167
  Validation runs automatically when executing `/next` command.
168
168
  Stage transition is blocked if validation fails.
169
169
 
170
+ ## Agent Model Selection
171
+
172
+ When spawning **validation-agent**:
173
+ 1. Read `.claude/agents/validation-agent/agent.json`
174
+ 2. Pass the `model` field value to the Task tool's `model` parameter
175
+ 3. If `"inherit"` or absent, omit the `model` parameter
176
+
170
177
  ## Related Commands
171
178
 
172
179
  - `/next` - Next stage transition
@@ -152,6 +152,15 @@ agent:
152
152
 
153
153
  **Note**: All checkpoint errors are non-blocking and logged only.
154
154
 
155
+ ## Agent Model Selection
156
+
157
+ When spawning **checkpoint-manager-agent**:
158
+ 1. Read `.claude/agents/checkpoint-manager-agent/agent.json`
159
+ 2. Pass the `model` field value to the Task tool's `model` parameter (expected: `haiku`)
160
+ 3. If `"inherit"` or absent, omit the `model` parameter
161
+
162
+ > **STRICT**: checkpoint-manager-agent MUST use `haiku` model for cost efficiency. This agent runs frequently in background — using a larger model wastes resources.
163
+
155
164
  ## Related
156
165
 
157
166
  - `/checkpoint` - Manual checkpoint
@@ -0,0 +1,113 @@
1
+ # Model Enforcement Hook
2
+
3
+ Verifies that sub-agent spawns use the correct model as defined in their `agent.json`.
4
+
5
+ ## Trigger Conditions
6
+
7
+ - Task tool invocation that spawns a known sub-agent
8
+ - Agent name detected in Task tool prompt or description
9
+
10
+ ## Verification Flow
11
+
12
+ ```
13
+ Task Tool Call Detected
14
+
15
+
16
+
17
+ Extract Agent Name from prompt/description
18
+
19
+
20
+
21
+ Read .claude/agents/{agent-name}/agent.json
22
+ ├─ Extract "model" field
23
+ └─ If file not found → Skip verification
24
+
25
+
26
+
27
+ Compare Expected vs Actual Model
28
+ ├─ Match → ✅ Log success
29
+ ├─ Mismatch (advisory agent) → ⚠️ Log warning
30
+ └─ Mismatch (strict agent) → ❌ Log error + alert
31
+
32
+
33
+
34
+ Log Result → state/model_enforcement.log
35
+ ```
36
+
37
+ ## Enforcement Modes
38
+
39
+ ### Advisory Mode (Default)
40
+
41
+ For most agents, model mismatches produce a **warning log** but do not block execution:
42
+
43
+ ```
44
+ ⚠️ [MODEL_MISMATCH] validation-agent: expected "sonnet", got "inherit"
45
+ Action: Warning logged (advisory mode)
46
+ ```
47
+
48
+ ### Strict Mode
49
+
50
+ For cost-critical agents, model mismatches produce an **error log** and alert:
51
+
52
+ ```
53
+ ❌ [MODEL_MISMATCH] checkpoint-manager-agent: expected "haiku", got "sonnet"
54
+ Action: Error logged (strict mode) — cost impact detected
55
+ ```
56
+
57
+ ## Strict Agents
58
+
59
+ The following agents are in strict enforcement mode:
60
+
61
+ | Agent | Required Model | Reason |
62
+ |-------|---------------|--------|
63
+ | checkpoint-manager-agent | haiku | Frequent background task, cost-critical |
64
+
65
+ ## Known Agents
66
+
67
+ | Agent | Expected Model | Mode |
68
+ |-------|---------------|------|
69
+ | validation-agent | sonnet | advisory |
70
+ | output-synthesis-agent | sonnet | advisory |
71
+ | handoff-generator-agent | sonnet | advisory |
72
+ | benchmark-analyzer-agent | sonnet | advisory |
73
+ | checkpoint-manager-agent | haiku | **strict** |
74
+ | architecture-review-agent | sonnet | advisory |
75
+ | qa-analysis-agent | sonnet | advisory |
76
+ | requirements-validation-agent | sonnet | advisory |
77
+ | research-analysis-agent | sonnet | advisory |
78
+ | task-decomposition-agent | sonnet | advisory |
79
+ | refactoring-analysis-agent | sonnet | advisory |
80
+ | test-execution-agent | sonnet | advisory |
81
+ | smart-rollback-agent | sonnet | advisory |
82
+ | cicd-validation-agent | sonnet | advisory |
83
+ | moodboard-analysis-agent | sonnet | advisory |
84
+
85
+ ## Log Format
86
+
87
+ ```
88
+ [2026-01-28T14:30:00Z] [MODEL_OK] validation-agent: model=sonnet ✅
89
+ [2026-01-28T14:30:05Z] [MODEL_MISMATCH] checkpoint-manager-agent: expected=haiku, actual=sonnet ❌ (strict)
90
+ [2026-01-28T14:31:00Z] [MODEL_SKIP] unknown-agent: no agent.json found, skipping
91
+ ```
92
+
93
+ ## Log Location
94
+
95
+ - `state/model_enforcement.log`
96
+
97
+ ## Configuration
98
+
99
+ See `config/model_enforcement.yaml` for enforcement settings.
100
+
101
+ ## Error Handling
102
+
103
+ | Error | Behavior |
104
+ |-------|----------|
105
+ | agent.json not found | Skip verification, log info |
106
+ | agent.json parse error | Skip verification, log warning |
107
+ | Log file write error | Continue execution silently |
108
+
109
+ ## Related
110
+
111
+ - Sub-Agent Model Enforcement Policy (CLAUDE.md)
112
+ - `config/model_enforcement.yaml` - Enforcement configuration
113
+ - `.claude/agents/*/agent.json` - Agent definitions
@@ -122,6 +122,18 @@ agents:
122
122
  /config hooks stage-transition disable
123
123
  ```
124
124
 
125
+ ## Agent Model Selection
126
+
127
+ When spawning agents during stage transition, read each agent's `agent.json` and pass the `model` field:
128
+
129
+ | Agent | Config Path | Expected Model |
130
+ |-------|-------------|----------------|
131
+ | handoff-generator-agent | `.claude/agents/handoff-generator-agent/agent.json` | sonnet |
132
+ | output-synthesis-agent | `.claude/agents/output-synthesis-agent/agent.json` | sonnet |
133
+ | validation-agent | `.claude/agents/validation-agent/agent.json` | sonnet |
134
+
135
+ **Protocol**: For each agent spawn, read its `agent.json`, extract the `model` field, and pass it to the Task tool's `model` parameter. If `"inherit"` or absent, omit the `model` parameter.
136
+
125
137
  ## Related
126
138
 
127
139
  - `/handoff` - Manual HANDOFF generation
@@ -158,6 +158,13 @@ If agent fails or is disabled:
158
158
  3. Skip command validation
159
159
  4. Return basic pass/fail
160
160
 
161
+ ## Agent Model Selection
162
+
163
+ When spawning **validation-agent**:
164
+ 1. Read `.claude/agents/validation-agent/agent.json`
165
+ 2. Pass the `model` field value to the Task tool's `model` parameter
166
+ 3. If `"inherit"` or absent, omit the `model` parameter
167
+
161
168
  ## Related
162
169
 
163
170
  - `/validate` - Manual validation
@@ -94,12 +94,22 @@ Proceed with rollback?
94
94
  - Next steps: {recommendations}
95
95
  ```
96
96
 
97
+ ## Agent Model Selection
98
+
99
+ When this skill spawns the **checkpoint-manager-agent**:
100
+ 1. Read `.claude/agents/checkpoint-manager-agent/agent.json`
101
+ 2. Pass the `model` field value to the Task tool's `model` parameter (expected: `haiku`)
102
+ 3. If `"inherit"` or absent, omit the `model` parameter
103
+
104
+ > **STRICT**: checkpoint-manager-agent MUST use `haiku` model. This is a cost-critical background agent.
105
+
97
106
  ## Prohibited Actions
98
107
 
99
108
  - Execute rollback without user confirmation
100
109
  - Skip checkpoint before destructive action
101
110
  - Create incomplete checkpoints
102
111
  - Omit recovery guide after rollback
112
+ - Spawn checkpoint-manager-agent without passing its designated model (haiku)
103
113
 
104
114
  ## Priorities
105
115