@fernado03/zoo-flow 0.5.3 → 0.7.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/README.md +102 -79
- package/bin/zoo-flow.js +398 -50
- package/docs/architecture.md +380 -0
- package/docs/bloat-control.md +49 -0
- package/docs/command-design.md +38 -0
- package/docs/command-flow.md +133 -0
- package/docs/comparison.md +86 -0
- package/docs/context-packs.md +35 -0
- package/docs/dogfood/01-small-library.md +28 -0
- package/docs/dogfood/02-web-app.md +29 -0
- package/docs/dogfood/03-mixed-monorepo.md +29 -0
- package/docs/mode-rules.md +86 -0
- package/docs/npm-publishing.md +79 -0
- package/docs/out-of-scope/mainstream-issue-trackers-only.md +25 -0
- package/docs/out-of-scope/question-limits.md +18 -0
- package/docs/out-of-scope/setup-skill-verify-mode.md +15 -0
- package/docs/overview.md +61 -0
- package/docs/philosophy.md +73 -0
- package/docs/quality-scorecard.md +23 -0
- package/docs/skill-maintenance.md +32 -0
- package/docs/skills-index.md +61 -0
- package/docs/team-mode.md +46 -0
- package/docs/token-budget.md +22 -0
- package/docs/troubleshooting.md +288 -0
- package/examples/demo-transcripts/01-small-tweak.md +37 -0
- package/examples/demo-transcripts/02-unknown-bug-fix.md +37 -0
- package/examples/demo-transcripts/03-new-feature.md +37 -0
- package/examples/demo-transcripts/04-refactor.md +37 -0
- package/examples/demo-transcripts/05-review-and-verify.md +37 -0
- package/examples/feature-flow.md +117 -0
- package/examples/fix-flow.md +139 -0
- package/package.json +16 -5
- package/quality/scorecard.json +88 -0
- package/quality/token-budget.exceptions.json +13 -0
- package/scripts/bundle.ps1 +135 -0
- package/scripts/check-golden-transcripts.js +69 -0
- package/scripts/check-package-links.js +72 -0
- package/scripts/check-package-manifest.js +70 -0
- package/scripts/eval-routing.js +149 -0
- package/scripts/score-quality.js +292 -0
- package/scripts/test-doctor.js +107 -0
- package/scripts/test-project-shapes.js +99 -0
- package/scripts/token-budget.js +105 -0
- package/templates/full/.roo/commands/caveman.md +1 -1
- package/templates/full/.roo/commands/diagnose.md +2 -1
- package/templates/full/.roo/commands/feature.md +1 -1
- package/templates/full/.roo/commands/fix.md +1 -1
- package/templates/full/.roo/commands/grill-me.md +2 -1
- package/templates/full/.roo/commands/grill-with-docs.md +2 -1
- package/templates/full/.roo/commands/handoff.md +2 -1
- package/templates/full/.roo/commands/improve-codebase-architecture.md +2 -1
- package/templates/full/.roo/commands/prototype.md +1 -1
- package/templates/full/.roo/commands/refactor.md +1 -1
- package/templates/full/.roo/commands/review.md +11 -0
- package/templates/full/.roo/commands/setup-matt-pocock-skills.md +1 -1
- package/templates/full/.roo/commands/tdd.md +1 -1
- package/templates/full/.roo/commands/to-issues.md +2 -1
- package/templates/full/.roo/commands/to-prd.md +2 -1
- package/templates/full/.roo/commands/triage.md +1 -1
- package/templates/full/.roo/commands/tweak.md +1 -1
- package/templates/full/.roo/commands/verify.md +11 -0
- package/templates/full/.roo/commands/write-a-skill.md +2 -1
- package/templates/full/.roo/commands/zoom-out.md +2 -1
- package/templates/full/.roo/rules/01-command-protocol.md +1 -1
- package/templates/full/.roo/rules/04-context-economy.md +3 -5
- package/templates/full/.roo/rules-code-tweaker/01-completion.md +12 -8
- package/templates/full/.roo/rules-custom-orchestrator/00-routing.md +23 -9
- package/templates/full/.roo/rules-custom-orchestrator/01-delegation-message.md +11 -7
- package/templates/full/.roo/rules-system-architect/02-completion.md +6 -2
- package/templates/full/.roo/skills/engineering/README.md +2 -0
- package/templates/full/.roo/skills/engineering/commit-and-document/SKILL.md +1 -2
- package/templates/full/.roo/skills/engineering/grill-with-docs/ADR-FORMAT.md +1 -1
- package/templates/full/.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +7 -32
- package/templates/full/.roo/skills/engineering/grill-with-docs/SKILL.md +1 -1
- package/templates/full/.roo/skills/engineering/improve-codebase-architecture/SKILL.md +3 -3
- package/templates/full/.roo/skills/engineering/review/SKILL.md +111 -0
- package/templates/full/.roo/skills/engineering/scaffold-context/SKILL.md +66 -0
- package/templates/full/.roo/skills/engineering/scaffold-context/templates/writing-patterns.md +17 -0
- package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md +3 -3
- package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/domain.md +2 -3
- package/templates/full/.roo/skills/engineering/tdd/SKILL.md +2 -0
- package/templates/full/.roo/skills/engineering/tweak/SKILL.md +2 -1
- package/templates/full/.roo/skills/engineering/verify/SKILL.md +80 -0
- package/templates/full/.roo/skills/in-progress/README.md +0 -1
- package/templates/full/.roomodes +3 -3
- package/templates/full/.zoo-flow/evals/no-regression-checklist.md +4 -2
- package/templates/full/.zoo-flow/evals/routing-cases.jsonl +20 -0
- package/templates/full/.zoo-flow/evals/routing-cases.md +27 -3
- package/templates/full/.zoo-flow/project-profile.json +24 -0
- package/tests/fixtures/bad-routing-cases/bad-json.jsonl +1 -0
- package/tests/fixtures/bad-routing-cases/bad-mode.jsonl +1 -0
- package/tests/fixtures/bad-routing-cases/missing-command.jsonl +1 -0
- package/tests/fixtures/doctor/bad-built-in-delegation/fixture.json +1 -0
- package/tests/fixtures/doctor/bad-mode-slug/fixture.json +1 -0
- package/tests/fixtures/doctor/bad-skill-wrapper/fixture.json +1 -0
- package/tests/fixtures/doctor/bad-zoo-path/fixture.json +1 -0
- package/tests/fixtures/doctor/helper-missing-mode/fixture.json +1 -0
- package/tests/fixtures/doctor/helper-not-permitted/fixture.json +1 -0
- package/tests/fixtures/doctor/manual-good-template/fixture.json +1 -0
- package/tests/fixtures/doctor/missing-command/fixture.json +1 -0
- package/tests/fixtures/doctor/missing-roomodes/fixture.json +1 -0
- package/tests/fixtures/doctor/missing-skill/fixture.json +1 -0
- package/tests/fixtures/project-shapes/cli-tool/cmd/root.go +1 -0
- package/tests/fixtures/project-shapes/cli-tool/fixture.json +1 -0
- package/tests/fixtures/project-shapes/cli-tool/package.json +1 -0
- package/tests/fixtures/project-shapes/data-pipeline/fixture.json +1 -0
- package/tests/fixtures/project-shapes/data-pipeline/pipelines/invoices.py +1 -0
- package/tests/fixtures/project-shapes/data-pipeline/pyproject.toml +2 -0
- package/tests/fixtures/project-shapes/library/fixture.json +1 -0
- package/tests/fixtures/project-shapes/library/package.json +1 -0
- package/tests/fixtures/project-shapes/library/src/index.ts +1 -0
- package/tests/fixtures/project-shapes/monorepo/fixture.json +1 -0
- package/tests/fixtures/project-shapes/monorepo/package.json +1 -0
- package/tests/fixtures/project-shapes/monorepo/packages/core/index.ts +1 -0
- package/tests/fixtures/project-shapes/monorepo/packages/web/index.ts +1 -0
- package/tests/fixtures/project-shapes/serverless/fixture.json +1 -0
- package/tests/fixtures/project-shapes/serverless/functions/webhook.ts +1 -0
- package/tests/fixtures/project-shapes/serverless/package.json +1 -0
- package/tests/fixtures/project-shapes/web-app/app/routes/index.tsx +1 -0
- package/tests/fixtures/project-shapes/web-app/fixture.json +1 -0
- package/tests/fixtures/project-shapes/web-app/package.json +1 -0
- package/tests/golden-transcripts/01-small-tweak-golden.md +21 -0
- package/tests/golden-transcripts/02-diagnosis-golden.md +26 -0
- package/tests/golden-transcripts/03-verification-golden.md +24 -0
- package/tests/golden-transcripts/04-review-golden.md +26 -0
- package/tests/golden-transcripts/05-feature-planning-golden.md +23 -0
- package/templates/full/.roo/skills/in-progress/review/SKILL.md +0 -39
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Token Budget
|
|
2
|
+
|
|
3
|
+
Zoo Flow enforces tiered token budgets to prevent bloat. Each tier has a
|
|
4
|
+
maximum byte size. Files exceeding their tier must have an explicit
|
|
5
|
+
exception in `quality/token-budget.exceptions.json`.
|
|
6
|
+
|
|
7
|
+
## Tiers
|
|
8
|
+
|
|
9
|
+
| Tier | Paths | Budget |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Tier 1 — Rules | `.roo/rules/`, `.roo/rules-{mode}/` | 16 KB |
|
|
12
|
+
| Tier 2 — Commands | `.roo/commands/` | 8 KB |
|
|
13
|
+
| Tier 3 — Skills | `.roo/skills/` | 32 KB |
|
|
14
|
+
| Tier 4 — Config | `.roomodes` | 4 KB |
|
|
15
|
+
| Tier 5 — Docs | `docs/` | 64 KB |
|
|
16
|
+
| Tier 6 — Evidence | `.zoo-flow/evals/` | 8 KB |
|
|
17
|
+
|
|
18
|
+
## Exceptions
|
|
19
|
+
|
|
20
|
+
Add to `quality/token-budget.exceptions.json` with a reason and max byte
|
|
21
|
+
override. Exceptions must be justified (e.g., single-file bundle docs
|
|
22
|
+
are inherently large).
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Common failure modes and their fixes. Each section starts with the
|
|
4
|
+
symptom you will actually see in chat or in tool output.
|
|
5
|
+
|
|
6
|
+
> **Where rules live, in one paragraph.** Global rules that apply to
|
|
7
|
+
> every mode are in `.roo/rules/`. Mode-specific behavior is in
|
|
8
|
+
> `.roo/rules-{modeSlug}/` — `rules-custom-orchestrator/`,
|
|
9
|
+
> `rules-system-architect/`, `rules-code-tweaker/`. `.roomodes` is
|
|
10
|
+
> minimal and points at those folders. Zoo Flow uses the preferred
|
|
11
|
+
> `.roo/rules-{modeSlug}/` directory form only; legacy single-file
|
|
12
|
+
> fallbacks such as `.roorules-{modeSlug}` and `.clinerules-{modeSlug}`
|
|
13
|
+
> are not used by this template. See [`mode-rules.md`](mode-rules.md)
|
|
14
|
+
> for the full layout.
|
|
15
|
+
|
|
16
|
+
## `.roo/rules/skills/...` ENOENT
|
|
17
|
+
|
|
18
|
+
**Symptom**
|
|
19
|
+
|
|
20
|
+
A mode tries to read a path like
|
|
21
|
+
`.roo/rules/skills/engineering/tweak/SKILL.md` and you get
|
|
22
|
+
`ENOENT: no such file or directory`.
|
|
23
|
+
|
|
24
|
+
**Cause**
|
|
25
|
+
|
|
26
|
+
A skill path drifted under `.roo/rules/`. Skills always live at
|
|
27
|
+
workspace-root `.roo/skills/...`. The most common triggers:
|
|
28
|
+
|
|
29
|
+
- A command file referenced a skill via a path that started with
|
|
30
|
+
`.roo/rules/`.
|
|
31
|
+
- The mode resolved the skill path relative to the location of the
|
|
32
|
+
rules file instead of the workspace root.
|
|
33
|
+
- A model "helpfully" rewrote the path because it thought rules and
|
|
34
|
+
skills should sit together.
|
|
35
|
+
|
|
36
|
+
**Fix**
|
|
37
|
+
|
|
38
|
+
1. Confirm `templates/full/.roo/rules/00-paths.md` is present and that
|
|
39
|
+
the rules loader picks up `.roo/rules/*.md`. If you copied only some
|
|
40
|
+
of the rules into your workspace, copy the rest.
|
|
41
|
+
2. Open the offending command file under
|
|
42
|
+
`templates/full/.roo/commands/` and check the `Run skill:` line. The
|
|
43
|
+
path must look like:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
.roo/skills/{bucket}/{skill}/SKILL.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Not:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
.roo/rules/skills/{bucket}/{skill}/SKILL.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If you cannot find a stale reference and the model still produces this
|
|
56
|
+
path, paste the rules in `00-paths.md` directly into the chat as a
|
|
57
|
+
reminder, then file an issue with the chat transcript.
|
|
58
|
+
|
|
59
|
+
## `new_task` missing in orchestrator
|
|
60
|
+
|
|
61
|
+
**Symptom**
|
|
62
|
+
|
|
63
|
+
The orchestrator says it cannot delegate, or it tries to do
|
|
64
|
+
implementation work itself, or it switches mode (which it should never
|
|
65
|
+
do).
|
|
66
|
+
|
|
67
|
+
**Cause**
|
|
68
|
+
|
|
69
|
+
The orchestrator's tool groups in `.roomodes` are `[]` — that is correct
|
|
70
|
+
— but the host UI has not exposed `new_task` to it. Some UIs only enable
|
|
71
|
+
`new_task` when at least one tool group is present.
|
|
72
|
+
|
|
73
|
+
**Fix**
|
|
74
|
+
|
|
75
|
+
1. Confirm `templates/full/.roomodes` has not been edited to add
|
|
76
|
+
read/edit/command/mcp groups for `custom-orchestrator`. The empty
|
|
77
|
+
groups list is intentional.
|
|
78
|
+
2. In Zoo Code settings, confirm subtasks (sometimes called
|
|
79
|
+
"delegated tasks" or "Boomerang tasks") are enabled.
|
|
80
|
+
3. If subtasks are disabled in the host, the orchestrator's correct
|
|
81
|
+
behavior is to stop and report. That is what rule 4 of its
|
|
82
|
+
`customInstructions` says. Do not work around this by giving it more
|
|
83
|
+
tool groups.
|
|
84
|
+
|
|
85
|
+
## `run_slash_command` disabled
|
|
86
|
+
|
|
87
|
+
**Symptom**
|
|
88
|
+
|
|
89
|
+
The mode reports that it cannot run the slash command, or it falls back
|
|
90
|
+
to running the command file but seems unsure.
|
|
91
|
+
|
|
92
|
+
**Cause**
|
|
93
|
+
|
|
94
|
+
`run_slash_command` is an experimental tool in Zoo Code and must be
|
|
95
|
+
enabled in settings before it is available. When it is not enabled,
|
|
96
|
+
or when the host UI does not expose it, the command protocol expects the
|
|
97
|
+
mode to fall back gracefully.
|
|
98
|
+
|
|
99
|
+
**Fix**
|
|
100
|
+
|
|
101
|
+
1. Confirm `templates/full/.roo/rules/01-command-protocol.md` is loaded.
|
|
102
|
+
It is the rule that tells the mode what to do.
|
|
103
|
+
2. Step 3 of the protocol is the fallback: read
|
|
104
|
+
`templates/full/.roo/commands/{command}.md` directly and execute it.
|
|
105
|
+
If the mode does not do this, the rule is not in context.
|
|
106
|
+
3. `run_slash_command` is experimental and must be enabled in Zoo Code
|
|
107
|
+
settings. Zoo Flow still works without it because its command
|
|
108
|
+
protocol falls back to reading `.roo/commands/{command}.md` directly.
|
|
109
|
+
That fallback is a first-class path, not a workaround.
|
|
110
|
+
|
|
111
|
+
## Architect trying to edit source
|
|
112
|
+
|
|
113
|
+
**Symptom**
|
|
114
|
+
|
|
115
|
+
The architect tries to write to a `.ts`, `.py`, or other source file
|
|
116
|
+
and either gets refused by the host or silently writes a Markdown file
|
|
117
|
+
"about" the change instead of the change itself.
|
|
118
|
+
|
|
119
|
+
**Cause**
|
|
120
|
+
|
|
121
|
+
Either:
|
|
122
|
+
|
|
123
|
+
- The architect's `edit` `fileRegex` in `.roomodes` was loosened beyond
|
|
124
|
+
Markdown, `.scratch/`, and `docs/`, or
|
|
125
|
+
- The architect ignored its rule 2 ("NO IMPLEMENTATION CODING") and
|
|
126
|
+
tried to edit anyway.
|
|
127
|
+
|
|
128
|
+
**Fix**
|
|
129
|
+
|
|
130
|
+
1. Restore the regex in `.roomodes`. The shipped form is:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{ "fileRegex": "(.*\\.md$|^\\.scratch/.*|^docs/.*)" }
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
2. The correct architect behavior is to summarize the implementation
|
|
137
|
+
work and `switch_mode` to `code-tweaker` in the same task window.
|
|
138
|
+
If the work is part of a delegated subtask, the architect uses
|
|
139
|
+
`attempt_completion` instead — but only when the delegation contract
|
|
140
|
+
actually expected a planning result, not implementation.
|
|
141
|
+
3. If the architect keeps trying to edit source, paste the relevant
|
|
142
|
+
line from the architect's `customInstructions` directly into chat.
|
|
143
|
+
|
|
144
|
+
## Prototype running in the wrong mode
|
|
145
|
+
|
|
146
|
+
**Symptom**
|
|
147
|
+
|
|
148
|
+
During `/feature`, the architect runs a prototype directly: edits source
|
|
149
|
+
files, starts a dev server, or builds UI scaffolding. Or, the tweaker
|
|
150
|
+
ends up doing PRD or sharpening work instead of the prototype.
|
|
151
|
+
|
|
152
|
+
**Cause**
|
|
153
|
+
|
|
154
|
+
Phase 2 of `/feature` is "the architect summarizes the prototype
|
|
155
|
+
question and switches to `code-tweaker` to run `/prototype`". If the
|
|
156
|
+
architect skips the switch, it ends up doing implementation work it
|
|
157
|
+
cannot do safely. If the orchestrator routes `/prototype` directly to
|
|
158
|
+
`system-architect`, the chain is broken.
|
|
159
|
+
|
|
160
|
+
**Fix**
|
|
161
|
+
|
|
162
|
+
1. Open `templates/full/.roo/commands/feature.md` and confirm phase 2
|
|
163
|
+
reads:
|
|
164
|
+
|
|
165
|
+
- Architect summarizes the prototype question.
|
|
166
|
+
- Architect MUST `switch_mode` -> `code-tweaker`.
|
|
167
|
+
- Tweaker executes `/prototype`.
|
|
168
|
+
- Tweaker MUST `switch_mode` -> `system-architect` with result.
|
|
169
|
+
|
|
170
|
+
2. Confirm the routing matrix in `.roomodes` lists `/prototype` under
|
|
171
|
+
`code-tweaker`, not `system-architect`.
|
|
172
|
+
3. If the architect refuses to switch, paste rule 3 from its
|
|
173
|
+
`customInstructions` ("FEATURE PROTOTYPES") into chat. It is the
|
|
174
|
+
single most-violated rule in practice.
|
|
175
|
+
|
|
176
|
+
## Slash command leakage from subtask summaries
|
|
177
|
+
|
|
178
|
+
**Symptom**
|
|
179
|
+
|
|
180
|
+
A subtask's `attempt_completion` summary contains a line like
|
|
181
|
+
"Recommended next command: `/refactor`". The orchestrator then
|
|
182
|
+
launches `/refactor` immediately, without you typing it.
|
|
183
|
+
|
|
184
|
+
**Cause**
|
|
185
|
+
|
|
186
|
+
The orchestrator's rule 2 ("EXPLICIT COMMANDS") is being ignored.
|
|
187
|
+
Slash commands inside a subtask summary are guidance for *you*, not
|
|
188
|
+
authorization for the orchestrator to launch a new subtask.
|
|
189
|
+
|
|
190
|
+
**Fix**
|
|
191
|
+
|
|
192
|
+
1. Open `.roomodes`. Confirm rule 2 of `custom-orchestrator` reads:
|
|
193
|
+
"If the HUMAN USER explicitly types a supported slash command,
|
|
194
|
+
delegate it directly using the Routing Matrix. **Ignore slash
|
|
195
|
+
commands mentioned only inside subtask summaries.**"
|
|
196
|
+
2. Confirm rule 6 ("POST-SUBTASK HARD STOP"): "When a subtask returns,
|
|
197
|
+
summarize results for the user and HALT. Never auto-launch
|
|
198
|
+
consecutive subtasks."
|
|
199
|
+
3. If those rules are present and the orchestrator still chains, the
|
|
200
|
+
most likely explanation is that the model is confusing a subtask
|
|
201
|
+
summary with a user message. Tell it explicitly: "Halt. The
|
|
202
|
+
`/refactor` in the previous summary was a recommendation, not a
|
|
203
|
+
user command."
|
|
204
|
+
|
|
205
|
+
If the chain happened despite the rules being in place, file an issue
|
|
206
|
+
with the full transcript so the language can be tightened.
|
|
207
|
+
|
|
208
|
+
## Clickable suggestions can route incorrectly
|
|
209
|
+
|
|
210
|
+
Zoo Code may render model suggestions as clickable options. These are
|
|
211
|
+
safe only when they are plain numbered choices.
|
|
212
|
+
|
|
213
|
+
Good:
|
|
214
|
+
|
|
215
|
+
```text
|
|
216
|
+
Which workflow should I use?
|
|
217
|
+
|
|
218
|
+
1. Tweak small implementation
|
|
219
|
+
2. Diagnose bug
|
|
220
|
+
3. Hold
|
|
221
|
+
|
|
222
|
+
Reply with the number, e.g. 1.
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Avoid suggestions like:
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
Use /fix
|
|
229
|
+
Run /tweak
|
|
230
|
+
Switch to code-tweaker
|
|
231
|
+
Route to system-architect
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Slash commands should only be treated as commands when the user
|
|
235
|
+
manually types them into the chat.
|
|
236
|
+
|
|
237
|
+
The short rule that enforces this lives in
|
|
238
|
+
[`templates/full/.roo/rules/03-manual-reply-protocol.md`](../templates/full/.roo/rules/03-manual-reply-protocol.md).
|
|
239
|
+
|
|
240
|
+
## Proceed policy
|
|
241
|
+
|
|
242
|
+
Zoo Flow delegated tasks include a proceed policy so workers know when
|
|
243
|
+
to continue and when to ask the user.
|
|
244
|
+
|
|
245
|
+
Policies:
|
|
246
|
+
|
|
247
|
+
- `Proceed automatically after audit if clean`
|
|
248
|
+
- `Ask user before implementation`
|
|
249
|
+
- `Stop and report only`
|
|
250
|
+
|
|
251
|
+
This prevents unnecessary questions during well-specified subtasks,
|
|
252
|
+
while preserving approval gates for hypotheses, architecture decisions,
|
|
253
|
+
commits, issue changes, and irreversible actions.
|
|
254
|
+
|
|
255
|
+
## Agent loads a skill after every command
|
|
256
|
+
|
|
257
|
+
Some commands are direct workflows, while others are thin wrappers
|
|
258
|
+
around skills. The protocol should only load a skill when the command
|
|
259
|
+
file explicitly says so.
|
|
260
|
+
|
|
261
|
+
Correct behavior:
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
/tdd
|
|
265
|
+
→ command contains `Skill: .roo/skills/engineering/tdd/SKILL.md`
|
|
266
|
+
→ load the skill
|
|
267
|
+
|
|
268
|
+
/fix
|
|
269
|
+
→ command contains direct workflow steps
|
|
270
|
+
→ execute the command directly
|
|
271
|
+
→ do not invent `.roo/skills/.../fix/SKILL.md`
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Fix:** check
|
|
275
|
+
[`templates/full/.roo/rules/01-command-protocol.md`](../templates/full/.roo/rules/01-command-protocol.md).
|
|
276
|
+
It should say to load a skill only when the command explicitly
|
|
277
|
+
contains a `Skill: .roo/skills/...` reference.
|
|
278
|
+
|
|
279
|
+
## Agent reads too many files
|
|
280
|
+
|
|
281
|
+
Check `.roo/rules/04-context-economy.md`.
|
|
282
|
+
|
|
283
|
+
Expected behavior:
|
|
284
|
+
|
|
285
|
+
1. map/search first
|
|
286
|
+
2. read targeted ranges
|
|
287
|
+
3. full-read only when necessary
|
|
288
|
+
4. avoid re-reading unchanged files
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Small Tweak
|
|
2
|
+
|
|
3
|
+
## User request
|
|
4
|
+
|
|
5
|
+
"Fix the typo in the README install heading."
|
|
6
|
+
|
|
7
|
+
## Orchestrator recommendation
|
|
8
|
+
|
|
9
|
+
This is low-risk and localized.
|
|
10
|
+
|
|
11
|
+
1. Make the small implementation change
|
|
12
|
+
2. Explore the docs first
|
|
13
|
+
|
|
14
|
+
## User approval
|
|
15
|
+
|
|
16
|
+
"1"
|
|
17
|
+
|
|
18
|
+
## Delegation message
|
|
19
|
+
|
|
20
|
+
Task: Fix the README heading typo.
|
|
21
|
+
Command: `/tweak`
|
|
22
|
+
Proceed policy: Proceed automatically after audit if clean.
|
|
23
|
+
Context hints: `README.md` heading.
|
|
24
|
+
Allowed scope: `README.md`.
|
|
25
|
+
Must follow: command protocol, command file, referenced skill only.
|
|
26
|
+
|
|
27
|
+
## Worker behavior
|
|
28
|
+
|
|
29
|
+
Code Tweaker loads `.roo/commands/tweak.md`, sees `Skill: .roo/skills/engineering/tweak/SKILL.md`, reads only that skill, audits the heading, patches the typo, and avoids unrelated edits.
|
|
30
|
+
|
|
31
|
+
## Verification / review
|
|
32
|
+
|
|
33
|
+
Worker reports no test command was needed for a heading typo. Because risk is R1, it suggests commit only after user satisfaction.
|
|
34
|
+
|
|
35
|
+
## Completion summary
|
|
36
|
+
|
|
37
|
+
Custom Orchestrator summarizes the changed file and halts. It does not auto-run commit.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Unknown Bug Fix
|
|
2
|
+
|
|
3
|
+
## User request
|
|
4
|
+
|
|
5
|
+
"Checkout randomly crashes after payment. It used to work."
|
|
6
|
+
|
|
7
|
+
## Orchestrator recommendation
|
|
8
|
+
|
|
9
|
+
Unknown cause, broken behavior, regression risk.
|
|
10
|
+
|
|
11
|
+
1. Diagnose the bug first
|
|
12
|
+
2. Explore the checkout area first
|
|
13
|
+
|
|
14
|
+
## User approval
|
|
15
|
+
|
|
16
|
+
"Diagnose the bug first."
|
|
17
|
+
|
|
18
|
+
## Delegation message
|
|
19
|
+
|
|
20
|
+
Task: Diagnose checkout crash after payment.
|
|
21
|
+
Command: `/fix`
|
|
22
|
+
Proceed policy: Ask user before implementation.
|
|
23
|
+
Context hints: checkout, payment completion.
|
|
24
|
+
Allowed scope: checkout/payment area after audit.
|
|
25
|
+
Must follow: command protocol and `/fix` phase checklist.
|
|
26
|
+
|
|
27
|
+
## Worker behavior
|
|
28
|
+
|
|
29
|
+
System Architect loads `.roo/commands/fix.md`, writes `.scratch/fix-checkout-crash.md`, runs diagnosis phases, then stops at hypotheses. After user selects one, it confirms root cause, switches to Code Tweaker for implementation, then switches back for post-mortem.
|
|
30
|
+
|
|
31
|
+
## Verification / review
|
|
32
|
+
|
|
33
|
+
Code Tweaker suggests `/verify`, then `/review`, then `/commit-and-document`. No follow-up command is launched automatically.
|
|
34
|
+
|
|
35
|
+
## Completion summary
|
|
36
|
+
|
|
37
|
+
Custom Orchestrator reports root cause, files touched, commands run, remaining risk, and recommended next command. Commit still requires explicit approval.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# New Feature
|
|
2
|
+
|
|
3
|
+
## User request
|
|
4
|
+
|
|
5
|
+
"Add team invitations with email invites and pending invite states."
|
|
6
|
+
|
|
7
|
+
## Orchestrator recommendation
|
|
8
|
+
|
|
9
|
+
This is a new capability with product and data-model decisions.
|
|
10
|
+
|
|
11
|
+
1. Plan the feature first
|
|
12
|
+
2. Explore the team/account area first
|
|
13
|
+
|
|
14
|
+
## User approval
|
|
15
|
+
|
|
16
|
+
"1"
|
|
17
|
+
|
|
18
|
+
## Delegation message
|
|
19
|
+
|
|
20
|
+
Task: Plan team invitations.
|
|
21
|
+
Command: `/feature`
|
|
22
|
+
Proceed policy: Ask at phase gates.
|
|
23
|
+
Context hints: teams, invites, email, pending states.
|
|
24
|
+
Allowed scope: planning docs and targeted code reads.
|
|
25
|
+
Must follow: command protocol and `/feature` phase checklist.
|
|
26
|
+
|
|
27
|
+
## Worker behavior
|
|
28
|
+
|
|
29
|
+
System Architect sharpens with docs, asks whether to prototype or skip to PRD, writes PRD, asks before slicing issues, then switches to Code Tweaker for approved implementation slices. Code Tweaker runs `/tdd` per slice.
|
|
30
|
+
|
|
31
|
+
## Verification / review
|
|
32
|
+
|
|
33
|
+
After each slice ships, Code Tweaker suggests `/verify`, then `/review`, then `/commit-and-document`. It does not auto-run them.
|
|
34
|
+
|
|
35
|
+
## Completion summary
|
|
36
|
+
|
|
37
|
+
Custom Orchestrator summarizes phase status, approved decisions, files changed, checks run, and remaining recommended next command.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Refactor
|
|
2
|
+
|
|
3
|
+
## User request
|
|
4
|
+
|
|
5
|
+
"The auth module is getting hard to change. Decouple provider-specific logic."
|
|
6
|
+
|
|
7
|
+
## Orchestrator recommendation
|
|
8
|
+
|
|
9
|
+
Working behavior, structural problem, cross-module risk.
|
|
10
|
+
|
|
11
|
+
1. Plan the refactor first
|
|
12
|
+
2. Explore the auth module first
|
|
13
|
+
|
|
14
|
+
## User approval
|
|
15
|
+
|
|
16
|
+
"Plan the refactor first."
|
|
17
|
+
|
|
18
|
+
## Delegation message
|
|
19
|
+
|
|
20
|
+
Task: Plan auth provider decoupling.
|
|
21
|
+
Command: `/refactor`
|
|
22
|
+
Proceed policy: Ask before selecting a candidate and before implementation.
|
|
23
|
+
Context hints: auth module, provider-specific logic.
|
|
24
|
+
Allowed scope: targeted reads plus Markdown planning output.
|
|
25
|
+
Must follow: command protocol and `/refactor` phase checklist.
|
|
26
|
+
|
|
27
|
+
## Worker behavior
|
|
28
|
+
|
|
29
|
+
System Architect runs the architecture skill, lists candidates, asks which to explore, grills the chosen plan, records the approved plan, then switches to Code Tweaker. Code Tweaker executes the test-first implementation path.
|
|
30
|
+
|
|
31
|
+
## Verification / review
|
|
32
|
+
|
|
33
|
+
Code Tweaker suggests `/verify`, then `/review`, then `/commit-and-document`. The user must explicitly approve each follow-up.
|
|
34
|
+
|
|
35
|
+
## Completion summary
|
|
36
|
+
|
|
37
|
+
Custom Orchestrator summarizes architecture decision, behavior-preservation checks, files changed, and next suggested command.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Review And Verify
|
|
2
|
+
|
|
3
|
+
## User request
|
|
4
|
+
|
|
5
|
+
"Review and verify this branch before I commit."
|
|
6
|
+
|
|
7
|
+
## Orchestrator recommendation
|
|
8
|
+
|
|
9
|
+
This asks for evidence plus inspection. Run verification first, then review.
|
|
10
|
+
|
|
11
|
+
1. Run verification checks
|
|
12
|
+
2. Review the diff first
|
|
13
|
+
|
|
14
|
+
## User approval
|
|
15
|
+
|
|
16
|
+
"Run verification checks."
|
|
17
|
+
|
|
18
|
+
## Delegation message
|
|
19
|
+
|
|
20
|
+
Task: Verify current branch changes.
|
|
21
|
+
Command: `/verify`
|
|
22
|
+
Proceed policy: Proceed automatically after changed scope and project checks are identified.
|
|
23
|
+
Context hints: current branch diff.
|
|
24
|
+
Allowed scope: repository checks only.
|
|
25
|
+
Must follow: command protocol, command file, referenced skill only.
|
|
26
|
+
|
|
27
|
+
## Worker behavior
|
|
28
|
+
|
|
29
|
+
Code Tweaker loads `.roo/commands/verify.md`, sees `Skill: .roo/skills/engineering/verify/SKILL.md`, inspects project config and changed files, runs the smallest useful checks, and reports exact commands and results.
|
|
30
|
+
|
|
31
|
+
## Verification / review
|
|
32
|
+
|
|
33
|
+
After verification completes, Custom Orchestrator summarizes and asks whether to continue with the plain-language review workflow. It does not auto-launch review. If approved, System Architect loads `.roo/commands/review.md`, follows the review skill, reads targeted diffs and needed standards/specs, then reports findings by severity.
|
|
34
|
+
|
|
35
|
+
## Completion summary
|
|
36
|
+
|
|
37
|
+
The final summary includes verification status, review result, remaining risk, and whether commit is recommended. Commit requires explicit approval.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Example: `/feature` flow
|
|
2
|
+
|
|
3
|
+
The `/feature` chain is the longest one Zoo Flow ships. It exists
|
|
4
|
+
specifically because the most expensive mistakes happen when an agent
|
|
5
|
+
implements a feature it has not properly sharpened. The chain forces
|
|
6
|
+
the slow steps before any code is written.
|
|
7
|
+
|
|
8
|
+
## Setup
|
|
9
|
+
|
|
10
|
+
- Active mode: `🪃 Custom Orchestrator`.
|
|
11
|
+
- Example feature:
|
|
12
|
+
|
|
13
|
+
> "Add a dark mode toggle to the settings page."
|
|
14
|
+
|
|
15
|
+
## Phase 1 — orchestrator routes
|
|
16
|
+
|
|
17
|
+
Type:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/feature Add a dark mode toggle to the settings page.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The orchestrator delegates with `new_task` to `system-architect`.
|
|
24
|
+
|
|
25
|
+
## Phase 2 — architect sharpens
|
|
26
|
+
|
|
27
|
+
The architect runs `grill-with-docs` to sharpen the request. Expect:
|
|
28
|
+
|
|
29
|
+
- Questions about target users and platforms.
|
|
30
|
+
- Questions about existing theming infrastructure.
|
|
31
|
+
- Questions about persistence (per-user, per-device, system-default).
|
|
32
|
+
- Updates to relevant docs.
|
|
33
|
+
|
|
34
|
+
**Hard stop**: the architect halts and asks:
|
|
35
|
+
|
|
36
|
+
> Prototype, or skip to PRD?
|
|
37
|
+
|
|
38
|
+
Answer one or the other. For this example:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Prototype.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Phase 3 — prototype handoff (optional)
|
|
45
|
+
|
|
46
|
+
Because you chose Prototype:
|
|
47
|
+
|
|
48
|
+
1. Architect summarizes the prototype question, constraints, relevant
|
|
49
|
+
context, and the decision the prototype is meant to settle.
|
|
50
|
+
2. Architect calls `switch_mode` to `code-tweaker` **in the same task
|
|
51
|
+
window**.
|
|
52
|
+
3. Tweaker executes `/prototype` per the command protocol.
|
|
53
|
+
4. Tweaker calls `switch_mode` back to `system-architect` with the
|
|
54
|
+
prototype result, run command or URL if any, and the decision needed.
|
|
55
|
+
|
|
56
|
+
**Hard stop**: architect halts and asks for your verdict on the
|
|
57
|
+
prototype.
|
|
58
|
+
|
|
59
|
+
This is the phase that breaks most often if the architect skips the
|
|
60
|
+
`switch_mode`. See
|
|
61
|
+
[`docs/troubleshooting.md`](../docs/troubleshooting.md#prototype-running-in-the-wrong-mode).
|
|
62
|
+
|
|
63
|
+
## Phase 4 — PRD
|
|
64
|
+
|
|
65
|
+
The architect runs `to-prd`, summarizing the prior phases in three
|
|
66
|
+
bullets and producing a PRD draft.
|
|
67
|
+
|
|
68
|
+
**Hard stop**: "Ready to slice into issues?"
|
|
69
|
+
|
|
70
|
+
Answer:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Yes.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Phase 5 — slice into issues
|
|
77
|
+
|
|
78
|
+
The architect runs `to-issues`, producing a list of well-scoped issues.
|
|
79
|
+
|
|
80
|
+
**Hard stop**: wait for your approval of the issue list. Edit, drop,
|
|
81
|
+
or merge issues here. Once approved, the chain continues.
|
|
82
|
+
|
|
83
|
+
## Phase 6 — implement
|
|
84
|
+
|
|
85
|
+
The architect summarizes the approved issues and `switch_mode`s to
|
|
86
|
+
`code-tweaker`. The tweaker, for each issue:
|
|
87
|
+
|
|
88
|
+
1. Runs `/tdd` per the command protocol.
|
|
89
|
+
2. Implements the issue.
|
|
90
|
+
3. After each issue ships, suggests `/commit-and-document`.
|
|
91
|
+
|
|
92
|
+
The orchestrator does not auto-launch `/commit-and-document`. You run
|
|
93
|
+
it explicitly when you want the commit.
|
|
94
|
+
|
|
95
|
+
## Phase 7 — return
|
|
96
|
+
|
|
97
|
+
When the chain completes (or hits a blocker), the active mode calls
|
|
98
|
+
`attempt_completion`. The orchestrator summarizes and halts.
|
|
99
|
+
|
|
100
|
+
## Pass criteria
|
|
101
|
+
|
|
102
|
+
- [ ] Orchestrator delegated to `system-architect`.
|
|
103
|
+
- [ ] Architect halted after sharpening, asked for Prototype or PRD.
|
|
104
|
+
- [ ] If you picked Prototype, the architect used `switch_mode` to
|
|
105
|
+
hand off; the architect did not run the prototype itself.
|
|
106
|
+
- [ ] Architect did not edit application source code at any point.
|
|
107
|
+
- [ ] Architect halted before producing the PRD, after the PRD, and
|
|
108
|
+
after the issue list.
|
|
109
|
+
- [ ] Tweaker ran `/tdd` per issue, not freeform implementation.
|
|
110
|
+
- [ ] Tweaker did not commit without explicit approval.
|
|
111
|
+
|
|
112
|
+
## Why this chain has so many stops
|
|
113
|
+
|
|
114
|
+
Each hard stop is a place where the cheapest fix is "your input,
|
|
115
|
+
right now". A wrong sharpening assumption is cheap to correct in
|
|
116
|
+
phase 2, expensive after a PRD, and very expensive after an issue
|
|
117
|
+
slice. The hard stops are not friction — they are the design.
|