@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
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Zoo Flow
|
|
2
2
|
|
|
3
|
-
> **Workflow control plane for [Zoo Code](https://docs.zoocode.dev/).**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
> **Workflow control plane for [Zoo Code](https://docs.zoocode.dev/).**
|
|
4
|
+
|
|
5
|
+
Zoo Flow is a Zoo Code workflow-control template.
|
|
6
|
+
|
|
7
|
+
It does not try to be a giant skills pack. It makes Zoo Code predictable:
|
|
8
|
+
free-form requests are routed through Custom Orchestrator, risky work gets
|
|
9
|
+
planning gates, implementation stays in Code Tweaker, architecture stays in
|
|
10
|
+
System Architect, and every command follows a small command/skill contract.
|
|
9
11
|
|
|
10
12
|
For the deeper rationale, see [`docs/overview.md`](docs/overview.md)
|
|
11
13
|
and [`docs/philosophy.md`](docs/philosophy.md).
|
|
@@ -34,54 +36,53 @@ npx @fernado03/zoo-flow@latest init --force
|
|
|
34
36
|
A timestamped backup is always written to `.zoo-flow-backup/` before
|
|
35
37
|
overwrite.
|
|
36
38
|
|
|
37
|
-
After install, reload VS Code (Command Palette → **Developer: Reload
|
|
38
|
-
Window**) and open Zoo Code.
|
|
39
|
+
After install, reload VS Code (Command Palette → **Developer: Reload
|
|
40
|
+
Window**) and open Zoo Code.
|
|
41
|
+
|
|
42
|
+
## Validate Install
|
|
43
|
+
|
|
44
|
+
Use this inside a project after install or update:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx @fernado03/zoo-flow@latest doctor
|
|
48
|
+
```
|
|
39
49
|
|
|
40
50
|
> **Note**: `.roomodes`, `.roo/commands/`, and `.roo/rules-{mode-slug}/`
|
|
41
51
|
> are kept as-is because they are the official Zoo Code configuration
|
|
42
52
|
> paths. Zoo Flow does not introduce a `.zoo/` directory.
|
|
43
53
|
|
|
44
|
-
## Using Zoo Flow
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
[`.zoo-flow/START_HERE.md`](templates/full/.zoo-flow/START_HERE.md)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
> /tweak fix the typo in `README`
|
|
77
|
-
|
|
78
|
-
When Zoo Flow asks a workflow question, reply by typing the number,
|
|
79
|
-
for example `1`.
|
|
80
|
-
|
|
81
|
-
Zoo Flow may show numbered options, but those options should be
|
|
82
|
-
plain-language choices only. They should not contain slash commands,
|
|
83
|
-
mode names, or executable routing text. See
|
|
84
|
-
[`docs/troubleshooting.md`](docs/troubleshooting.md#clickable-suggestions-can-route-incorrectly).
|
|
54
|
+
## Using Zoo Flow
|
|
55
|
+
|
|
56
|
+
First run:
|
|
57
|
+
|
|
58
|
+
- Read [`.zoo-flow/START_HERE.md`](templates/full/.zoo-flow/START_HERE.md).
|
|
59
|
+
- Run `/scaffold-context` when the project needs local context docs.
|
|
60
|
+
- Run `/setup-matt-pocock-skills` when tracker or triage config is needed.
|
|
61
|
+
|
|
62
|
+
Daily use:
|
|
63
|
+
|
|
64
|
+
- Start in `custom-orchestrator`.
|
|
65
|
+
- Describe the task normally.
|
|
66
|
+
- The orchestrator proposes a plain-language workflow.
|
|
67
|
+
- Approve by number or option text.
|
|
68
|
+
|
|
69
|
+
Power-user path:
|
|
70
|
+
|
|
71
|
+
- Type a slash command directly when you already know the workflow.
|
|
72
|
+
- Zoo Code switches mode from the command file's `mode:` field.
|
|
73
|
+
|
|
74
|
+
Safety:
|
|
75
|
+
|
|
76
|
+
- Workflow choices must be plain language.
|
|
77
|
+
- Clickable choices must not include slash commands or mode names.
|
|
78
|
+
- Explicit slash commands count as approval.
|
|
79
|
+
- Free-form requests do not self-approve.
|
|
80
|
+
|
|
81
|
+
When Zoo Flow asks a workflow question, reply by typing the number, for
|
|
82
|
+
example `1`. See
|
|
83
|
+
[`docs/troubleshooting.md`](docs/troubleshooting.md#clickable-suggestions-can-route-incorrectly).
|
|
84
|
+
|
|
85
|
+
For team usage and deciding what to commit, see `docs/team-mode.md`.
|
|
85
86
|
|
|
86
87
|
## Update
|
|
87
88
|
|
|
@@ -97,13 +98,17 @@ template. Preview with `--dry-run`.
|
|
|
97
98
|
|
|
98
99
|
Zoo Flow avoids unnecessary token use by asking agents to search or list before broad reads, use targeted line ranges when possible, and avoid re-reading unchanged files. Full-file reads are still allowed when correctness requires complete context.
|
|
99
100
|
|
|
101
|
+
## Token discipline
|
|
102
|
+
|
|
103
|
+
Domain docs (`.zoo-flow/CONTEXT.md`, `.zoo-flow/docs/adr/`) are never read by default. They are loaded only when the task touches domain language, changes public behavior, or crosses architecture/auth/persistence seams. All runtime files (rules, commands, skills) have tiered token budgets enforced by `scripts/token-budget.js`.
|
|
104
|
+
|
|
100
105
|
## Modes
|
|
101
106
|
|
|
102
|
-
| Slug | Name | Role | Edits allowed | Delegation |
|
|
103
|
-
| --------------------- | --------------------- | ---------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------- |
|
|
104
|
-
| `custom-orchestrator` | 🪃 Custom Orchestrator | Router. Picks workflow, delegates, waits for the user. | None | `new_task` to
|
|
105
|
-
| `system-architect` | 🏗️ System Architect | Planning, diagnosis, refactor design, exploration,
|
|
106
|
-
| `code-tweaker` | ⚡ Code Tweaker | Implementation, TDD, docs
|
|
107
|
+
| Slug | Name | Role | Edits allowed | Delegation |
|
|
108
|
+
| --------------------- | --------------------- | ---------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------- |
|
|
109
|
+
| `custom-orchestrator` | 🪃 Custom Orchestrator | Router. Picks workflow, delegates, waits for the user. | None | `new_task` to Zoo Flow modes only |
|
|
110
|
+
| `system-architect` | 🏗️ System Architect | Planning, diagnosis, refactor design, exploration, review. | Markdown, `.scratch/`, `docs/` | `switch_mode` to `code-tweaker` |
|
|
111
|
+
| `code-tweaker` | ⚡ Code Tweaker | Implementation, TDD, verify, docs, prototypes, commits. | Full repo edits within the assigned command | `switch_mode` to `system-architect` |
|
|
107
112
|
|
|
108
113
|
Modes are defined in
|
|
109
114
|
[`templates/full/.roomodes`](templates/full/.roomodes). The detailed
|
|
@@ -123,12 +128,14 @@ run directly inside `system-architect` or `code-tweaker` when needed.
|
|
|
123
128
|
| `/tdd` | `code-tweaker` | Test-first implementation loop. |
|
|
124
129
|
| `/prototype` | `code-tweaker` | Throwaway prototype to settle a design uncertainty. |
|
|
125
130
|
| `/update-docs` | `code-tweaker` | Reconcile docs with code reality. |
|
|
126
|
-
| `/commit-and-document` | `code-tweaker` | Stage, message, commit, journal — pauses for approval. |
|
|
127
|
-
| `/
|
|
128
|
-
| `/
|
|
129
|
-
| `/
|
|
130
|
-
| `/
|
|
131
|
-
| `/
|
|
131
|
+
| `/commit-and-document` | `code-tweaker` | Stage, message, commit, journal — pauses for approval. |
|
|
132
|
+
| `/verify` | `code-tweaker` | Run targeted tests, typecheck, lint, or build checks. |
|
|
133
|
+
| `/fix` | `system-architect` | Diagnose → implement → post-mortem chain. |
|
|
134
|
+
| `/feature` | `system-architect` | Sharpen → optional prototype → PRD → issues → TDD chain. |
|
|
135
|
+
| `/refactor` | `system-architect` | Plan and stage architecture changes. |
|
|
136
|
+
| `/explore` | `system-architect` | Map unfamiliar code before touching it. |
|
|
137
|
+
| `/triage` | `system-architect` | Clean and prioritize an issue queue. |
|
|
138
|
+
| `/review` | `system-architect` | Review a diff or branch before commit. |
|
|
132
139
|
|
|
133
140
|
### Helper (run directly when needed)
|
|
134
141
|
|
|
@@ -140,27 +147,31 @@ run directly inside `system-architect` or `code-tweaker` when needed.
|
|
|
140
147
|
| `/to-prd` | `system-architect` | Turn sharpened context into a PRD. |
|
|
141
148
|
| `/to-issues` | `system-architect` | Slice a PRD into issues. |
|
|
142
149
|
| `/zoom-out` | `system-architect` | Pull back to architectural altitude. |
|
|
143
|
-
| `/handoff` |
|
|
144
|
-
| `/grill-me` |
|
|
145
|
-
| `/caveman` |
|
|
150
|
+
| `/handoff` | `system-architect` | Produce a clean handoff package for another agent or human. |
|
|
151
|
+
| `/grill-me` | `system-architect` | Adversarial Q&A to sharpen an idea. |
|
|
152
|
+
| `/caveman` | modeless | Ultra-compressed communication style utility. |
|
|
146
153
|
| `/write-a-skill` | `code-tweaker` | Author a new skill following the bucket layout. |
|
|
147
154
|
| `/setup-matt-pocock-skills` | `code-tweaker` | One-shot setup helper for the bundled skill set. |
|
|
148
155
|
|
|
149
|
-
Command files live in
|
|
150
|
-
[`templates/full/.roo/commands/`](templates/full/.roo/commands).
|
|
156
|
+
Command files live in
|
|
157
|
+
[`templates/full/.roo/commands/`](templates/full/.roo/commands).
|
|
158
|
+
`/caveman` intentionally has no `mode:` because it changes communication style, not workflow authority.
|
|
151
159
|
|
|
152
160
|
## Worked examples
|
|
153
161
|
|
|
154
|
-
- [`examples/fix-flow.md`](examples/fix-flow.md)
|
|
155
|
-
- [`examples/feature-flow.md`](examples/feature-flow.md)
|
|
162
|
+
- [`examples/fix-flow.md`](examples/fix-flow.md)
|
|
163
|
+
- [`examples/feature-flow.md`](examples/feature-flow.md)
|
|
164
|
+
- [`examples/demo-transcripts/`](examples/demo-transcripts/)
|
|
156
165
|
|
|
157
166
|
## How this is different
|
|
158
167
|
|
|
159
|
-
Zoo Flow is not a methodology and not a giant skills pack. It is a
|
|
160
|
-
thin Zoo-native control plane: three modes, a routing matrix, and a
|
|
161
|
-
path-safety contract that turn into a predictable workflow. For a
|
|
162
|
-
longer comparison with adjacent projects, see
|
|
163
|
-
[`docs/comparison.md`](docs/comparison.md).
|
|
168
|
+
Zoo Flow is not a methodology and not a giant skills pack. It is a
|
|
169
|
+
thin Zoo-native control plane: three modes, a routing matrix, and a
|
|
170
|
+
path-safety contract that turn into a predictable workflow. For a
|
|
171
|
+
longer comparison with adjacent projects, see
|
|
172
|
+
[`docs/comparison.md`](docs/comparison.md).
|
|
173
|
+
|
|
174
|
+
For command-addition rules, see [`docs/command-design.md`](docs/command-design.md).
|
|
164
175
|
|
|
165
176
|
## Manual install
|
|
166
177
|
|
|
@@ -168,13 +179,25 @@ If you would rather copy the template by hand:
|
|
|
168
179
|
|
|
169
180
|
```sh
|
|
170
181
|
git clone https://github.com/Fernado03/zoo-flow.git /tmp/zoo-flow
|
|
171
|
-
cp /tmp/zoo-flow/templates/full/.roomodes .
|
|
172
|
-
cp -R /tmp/zoo-flow/templates/full/.roo .
|
|
173
|
-
cp -R /tmp/zoo-flow/templates/full/.zoo-flow .
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
cp /tmp/zoo-flow/templates/full/.roomodes .
|
|
183
|
+
cp -R /tmp/zoo-flow/templates/full/.roo .
|
|
184
|
+
cp -R /tmp/zoo-flow/templates/full/.zoo-flow .
|
|
185
|
+
touch .gitignore
|
|
186
|
+
grep -qxF "# Zoo Flow — generated config (never committed)" .gitignore 2>/dev/null || {
|
|
187
|
+
printf "\n# Zoo Flow — generated config (never committed)\n" >> .gitignore
|
|
188
|
+
printf ".roomodes\n.roo/\n.zoo-flow/\n" >> .gitignore
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Windows uses `git clone ... C:\Temp\zoo-flow` and `Copy-Item` (including `Copy-Item -Recurse` for `.roo\` and `.zoo-flow\`) instead. Add `.roomodes`, `.roo/`, and `.zoo-flow/` to `.gitignore`.
|
|
193
|
+
|
|
194
|
+
## Development
|
|
195
|
+
|
|
196
|
+
Before publishing, run:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npm run release:check
|
|
200
|
+
```
|
|
178
201
|
|
|
179
202
|
## Migration
|
|
180
203
|
|