mustard-claude 3.1.29 → 3.1.30
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/package.json
CHANGED
|
@@ -266,7 +266,7 @@ After each agent returns, check the return value for an escalation status before
|
|
|
266
266
|
|
|
267
267
|
If two or more agents in the same wave return `CONCERN`, surface all concerns together before starting the next wave. See `.claude/pipeline-config.md` Escalation Statuses and Diagnostic Failure Routing for the full status table.
|
|
268
268
|
|
|
269
|
-
9. **REVIEW** — dispatch review agent for each affected subproject (reads guards + relevant skills, runs 7-category checklist: SOLID, Design System, Patterns, i18n, Integration, Build, Elegance). REJECTED →
|
|
269
|
+
9. **REVIEW** — dispatch review agent for each affected subproject (reads guards + relevant skills, runs 7-category checklist: SOLID, Design System, Patterns, i18n, Integration, Build, Elegance). REJECTED → see `resume/SKILL.md § Fix Loop Dispatch Protocol` (max 2 loops).
|
|
270
270
|
|
|
271
271
|
Re-reviews always dispatch with `model: "sonnet"` (see `review/SKILL.md § Model Selection`).
|
|
272
272
|
10. All passed + APPROVED → CLOSE flow inline (sync registry, move spec, cleanup state)
|
|
@@ -110,7 +110,7 @@ Run `node .claude/scripts/diff-context.js --subproject {subproject_path}` per su
|
|
|
110
110
|
- `{entity_info}` → `_patterns` type, refs, subs from registry
|
|
111
111
|
- `{role}`, `{boundary}`, `{return_sections}` → from Role Rules table in config
|
|
112
112
|
- `{validate_command}`, `{build_command}` → from Agents table in config
|
|
113
|
-
- `{retry_context}` → empty on first dispatch
|
|
113
|
+
- `{retry_context}` → empty on first dispatch. On retry, fill per `agent-prompt/SKILL.md § Retry Modes`. Granular retries use Step 4 § Granular Retry Protocol. Fix-loops (after REJECTED review) use Step 19b § Fix Loop Dispatch Protocol.
|
|
114
114
|
- `{task_steps}` → checkboxed steps from spec
|
|
115
115
|
- `{recommended_skills}` → from Skill Recommendations in `.claude/pipeline-config.md`:
|
|
116
116
|
1. Glob `{subproject}/.claude/skills/` for generated pattern skills
|
|
@@ -152,8 +152,36 @@ If two or more agents in the same wave return `CONCERN`, surface all concerns to
|
|
|
152
152
|
- Checklist categories: **SOLID, Design System, Patterns, i18n, Integration, Build, Elegance**
|
|
153
153
|
- Each issue classified: CRITICAL (blocks), WARNING (recommended), NOTE (suggestion)
|
|
154
154
|
- APPROVED (zero CRITICAL) → CLOSE
|
|
155
|
-
- REJECTED (any CRITICAL) →
|
|
155
|
+
- REJECTED (any CRITICAL) → see Step 19b § Fix Loop Dispatch Protocol (max 2 loops)
|
|
156
156
|
- **NEVER skip review** — not even for Light scope. Light scope gets same checklist, just fewer files to review
|
|
157
|
+
|
|
158
|
+
### Step 19b: Fix Loop Dispatch Protocol
|
|
159
|
+
|
|
160
|
+
When REVIEW returns REJECTED (any CRITICAL):
|
|
161
|
+
|
|
162
|
+
1. Read `.claude/.agent-memory/_index.json`, find last entry where `agent_type == {review_target_agent_type}` and `pipeline == {spec-name}`. If absent (shouldn't happen but be defensive): fall back to first-dispatch template.
|
|
163
|
+
2. Extract:
|
|
164
|
+
- `prior_summary` ← `entry.summary`
|
|
165
|
+
- `files_modified` ← `entry.details.files_modified` (list)
|
|
166
|
+
3. Extract review findings VERBATIM:
|
|
167
|
+
- All CRITICAL findings (required)
|
|
168
|
+
- All WARNING findings (optional — include if fix is cheap)
|
|
169
|
+
- Copy the exact text returned by the review agent; do NOT paraphrase
|
|
170
|
+
4. Compose `{retry_context}` using Mode=fix-loop format (see `agent-prompt/SKILL.md § Retry Modes`). Set K = current loop number (1 or 2; max 2 fix-loops):
|
|
171
|
+
```
|
|
172
|
+
## RETRY CONTEXT
|
|
173
|
+
**Mode:** fix-loop ({K}/2)
|
|
174
|
+
**Prior dispatch:** {prior_summary}
|
|
175
|
+
**Files modified previously:**
|
|
176
|
+
{files_modified}
|
|
177
|
+
**Review findings (verbatim):**
|
|
178
|
+
{findings_verbatim}
|
|
179
|
+
```
|
|
180
|
+
5. Render the **Minimal Retry Template** from `agent-prompt/SKILL.md § Retry Modes` (skips CONTEXT/REFERENCE/ENTITY/SKILLS/WEB VALIDATION/ROLE/RECIPE).
|
|
181
|
+
6. Dispatch the same `subagent_type` + `model` as the original impl agent (do NOT change the role or model).
|
|
182
|
+
7. On return, re-dispatch REVIEW agent (normal dispatch, not retry — review is read-only).
|
|
183
|
+
8. If review still REJECTED after 2 fix-loops: STOP + report exhausted retries.
|
|
184
|
+
|
|
157
185
|
20. **CLOSE:**
|
|
158
186
|
- `node .claude/scripts/sync-registry.js`
|
|
159
187
|
- Spec: `Status: completed`, `Phase: CLOSE`, all `[ ]` → `[x]`
|
|
@@ -170,13 +198,21 @@ When an agent fails:
|
|
|
170
198
|
- Build error → retry from build step (don't redo edits)
|
|
171
199
|
- Edit error → retry from that edit step
|
|
172
200
|
- Unknown → retry all remaining unchecked steps
|
|
173
|
-
3. **Re-dispatch with retry context** — fill `{retry_context}`
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
201
|
+
3. **Re-dispatch with retry context** — fill `{retry_context}` using Mode=granular format:
|
|
202
|
+
- Read `.claude/.agent-memory/_index.json`, find last entry where `agent_type == {failed_agent_type}` and `pipeline == {spec-name}`
|
|
203
|
+
- Extract `entry.summary` → `prior_summary`; `entry.details.files_modified` → `files_modified` (list)
|
|
204
|
+
- Fill:
|
|
205
|
+
```
|
|
206
|
+
## RETRY CONTEXT
|
|
207
|
+
**Mode:** granular
|
|
208
|
+
**Prior dispatch:** {prior_summary}
|
|
209
|
+
**Files modified previously:**
|
|
210
|
+
{files_modified}
|
|
211
|
+
**Previous error:** {error_message}
|
|
212
|
+
**Resume from step:** {N+1}
|
|
213
|
+
```
|
|
214
|
+
- Set `{task_steps}` to only the remaining steps ({N+1} onwards)
|
|
215
|
+
- Use the **Minimal Retry Template** from `agent-prompt/SKILL.md § Retry Modes` (skips CONTEXT/REFERENCE/ENTITY/SKILLS/WEB VALIDATION/ROLE/RECIPE blocks)
|
|
180
216
|
4. **Spec checkboxes:** steps 1-{N} already `[x]`, remaining continue `[ ]`
|
|
181
217
|
5. **Max 2 retries per agent** — exhausted → STOP + report
|
|
182
218
|
|
|
@@ -12,6 +12,8 @@ Single unified template for all dispatches:
|
|
|
12
12
|
|
|
13
13
|
## Dispatch Template
|
|
14
14
|
|
|
15
|
+
> **First-dispatch only.** When `{retry_context}` is non-empty (granular or fix-loop retry), use the **Minimal Retry Template** from `§ Retry Modes` instead — omit CONTEXT, REFERENCE, ENTITY, SKILLS, WEB VALIDATION, ROLE, and RECIPE blocks.
|
|
16
|
+
|
|
15
17
|
```
|
|
16
18
|
## CONTEXT
|
|
17
19
|
1. Read `{subproject}/CLAUDE.md` — guards, stack, paths
|
|
@@ -53,6 +55,63 @@ Guards carregados via CLAUDE.md acima — respeite sem exceção.
|
|
|
53
55
|
|
|
54
56
|
---
|
|
55
57
|
|
|
58
|
+
## Retry Modes
|
|
59
|
+
|
|
60
|
+
`{retry_context}` has 3 states:
|
|
61
|
+
|
|
62
|
+
| Mode | When | `{retry_context}` content |
|
|
63
|
+
|------|------|---------------------------|
|
|
64
|
+
| `empty` | First dispatch | Empty string — full Dispatch Template above is used |
|
|
65
|
+
| `granular` | A step failed (PARTIAL escalation) | Enriched retry header (see below) |
|
|
66
|
+
| `fix-loop` | Review returned REJECTED | Enriched retry header with verbatim findings (see below) |
|
|
67
|
+
|
|
68
|
+
`prior_summary` and `files_modified` come from the latest `.agent-memory/_index.json` entry matching `{agent_type, pipeline}`.
|
|
69
|
+
|
|
70
|
+
### `granular` format
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
## RETRY CONTEXT
|
|
74
|
+
**Mode:** granular
|
|
75
|
+
**Prior dispatch:** {prior_summary}
|
|
76
|
+
**Files modified previously:**
|
|
77
|
+
{files_modified}
|
|
78
|
+
**Previous error:** {error_message}
|
|
79
|
+
**Resume from step:** {N+1}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `fix-loop` format
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
## RETRY CONTEXT
|
|
86
|
+
**Mode:** fix-loop ({K}/2)
|
|
87
|
+
**Prior dispatch:** {prior_summary}
|
|
88
|
+
**Files modified previously:**
|
|
89
|
+
{files_modified}
|
|
90
|
+
**Review findings (verbatim):**
|
|
91
|
+
{findings_verbatim}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Minimal Retry Template
|
|
95
|
+
|
|
96
|
+
When `{retry_context}` is non-empty, the orchestrator renders this template instead of the full Dispatch Template. Omits CONTEXT/REFERENCE/ENTITY/SKILLS/WEB VALIDATION/ROLE/RECIPE — prior context is still cached; DON'T re-Read CLAUDE.md/guards/registry unless a modified file changed on disk since last dispatch.
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
{retry_context}
|
|
100
|
+
|
|
101
|
+
## EFFICIENCY
|
|
102
|
+
- Absolute paths, no cd
|
|
103
|
+
- Read each file once (prior context cached — skip CLAUDE.md/guards/registry re-reads unless file changed on disk)
|
|
104
|
+
- Max 3 build attempts, then STOP + report
|
|
105
|
+
- Return cap: follow pipeline-config.md Max Return limits. Focus on: files changed + non-obvious decisions + blockers only.
|
|
106
|
+
|
|
107
|
+
## TASK
|
|
108
|
+
{task_steps}
|
|
109
|
+
|
|
110
|
+
Guards carregados via CLAUDE.md acima — respeite sem exceção.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
56
115
|
## Skill-Based Context Loading
|
|
57
116
|
|
|
58
117
|
Skills provide progressive disclosure — agents load only what they need:
|