@fernado03/zoo-flow 0.5.3 → 0.7.1
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 +81 -78
- 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/explore.md +2 -2
- 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/update-docs.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 +14 -8
- package/templates/full/.roo/rules-custom-orchestrator/00-routing.md +43 -11
- 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/START_HERE.md +8 -61
- 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,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
const packageRoot = path.resolve(__dirname, "..");
|
|
10
|
+
|
|
11
|
+
const EXCEPTIONS_PATH = path.join(packageRoot, "quality", "token-budget.exceptions.json");
|
|
12
|
+
const TIERS = [
|
|
13
|
+
{ label: "tier-1-rules", dirs: [".roo/rules/", ".roo/rules-code-tweaker/", ".roo/rules-system-architect/", ".roo/rules-custom-orchestrator/"], max_bytes: 16000 },
|
|
14
|
+
{ label: "tier-2-commands", dirs: [".roo/commands/"], max_bytes: 8000 },
|
|
15
|
+
{ label: "tier-3-skills", dirs: [".roo/skills/"], max_bytes: 32000 },
|
|
16
|
+
{ label: "tier-4-config", dirs: [".roomodes", ".roo/"], max_bytes: 4000, allow_files: true },
|
|
17
|
+
{ label: "tier-5-docs", dirs: ["docs/"], max_bytes: 64000 },
|
|
18
|
+
{ label: "tier-6-evidence", dirs: [".zoo-flow/evals/"], max_bytes: 8000 }
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const failures = [];
|
|
22
|
+
let exceptions = { overrides: {} };
|
|
23
|
+
|
|
24
|
+
if (fs.existsSync(EXCEPTIONS_PATH)) {
|
|
25
|
+
try {
|
|
26
|
+
exceptions = JSON.parse(fs.readFileSync(EXCEPTIONS_PATH, "utf8"));
|
|
27
|
+
} catch (error) {
|
|
28
|
+
failures.push(`Invalid exceptions file: ${error.message}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function getExceptionKey(relativePath) {
|
|
33
|
+
return relativePath.replace(/\\/g, "/");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getMaxOverride(relativePath) {
|
|
37
|
+
const key = getExceptionKey(relativePath);
|
|
38
|
+
const override = exceptions.overrides && exceptions.overrides[key];
|
|
39
|
+
return override ? override.max_bytes : null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for (const tier of TIERS) {
|
|
43
|
+
for (const dirPattern of tier.dirs) {
|
|
44
|
+
const absPath = path.join(packageRoot, dirPattern);
|
|
45
|
+
if (!fs.existsSync(absPath)) continue;
|
|
46
|
+
|
|
47
|
+
let tierSize = 0;
|
|
48
|
+
|
|
49
|
+
if (tier.allow_files && fs.statSync(absPath).isFile()) {
|
|
50
|
+
const override = getMaxOverride(dirPattern);
|
|
51
|
+
if (override !== null) continue; // override allows it
|
|
52
|
+
const size = fs.statSync(absPath).size;
|
|
53
|
+
if (size > tier.max_bytes) {
|
|
54
|
+
failures.push(`${dirPattern} (${size} bytes) exceeds tier ${tier.label} limit (${tier.max_bytes})`);
|
|
55
|
+
}
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const walkDir = (dir) => {
|
|
60
|
+
for (const entry of fs.readdirSync(dir)) {
|
|
61
|
+
const full = path.join(dir, entry);
|
|
62
|
+
const stat = fs.statSync(full);
|
|
63
|
+
if (stat.isDirectory()) {
|
|
64
|
+
walkDir(full);
|
|
65
|
+
} else {
|
|
66
|
+
const ext = path.extname(full);
|
|
67
|
+
if (![".md", ".json", ".txt", ".yaml", ".yml", ".jsonl"].includes(ext)) continue;
|
|
68
|
+
|
|
69
|
+
const relative = path.relative(packageRoot, full).replace(/\\/g, "/");
|
|
70
|
+
const override = getMaxOverride(relative);
|
|
71
|
+
if (override !== null) continue; // allowed by exception
|
|
72
|
+
|
|
73
|
+
tierSize += stat.size;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
walkDir(absPath);
|
|
79
|
+
|
|
80
|
+
if (tierSize > tier.max_bytes) {
|
|
81
|
+
failures.push(`${dirPattern} tree (${tierSize} bytes) exceeds tier ${tier.label} limit (${tier.max_bytes})`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Also check README and CONTEXT.md sizes
|
|
87
|
+
const readmePath = path.join(packageRoot, "README.md");
|
|
88
|
+
if (fs.existsSync(readmePath)) {
|
|
89
|
+
const size = fs.statSync(readmePath).size;
|
|
90
|
+
const override = getMaxOverride("README.md");
|
|
91
|
+
if (override === null && size > 24000) {
|
|
92
|
+
failures.push(`README.md (${size} bytes) exceeds default limit (24000)`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (failures.length > 0) {
|
|
97
|
+
console.error("\nToken budget check failed:\n");
|
|
98
|
+
for (const failure of failures) {
|
|
99
|
+
console.error(`- ${failure}`);
|
|
100
|
+
}
|
|
101
|
+
console.error("\nAdd exceptions in quality/token-budget.exceptions.json if this is intentional.\n");
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
console.log("Token budget check passed");
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
description: "Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says \"caveman mode\", \"talk like caveman\", \"use caveman\", \"less tokens\", \"be brief\", or invokes /caveman."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Skill: `.roo/skills/productivity/caveman/SKILL.md`
|
|
6
6
|
|
|
7
7
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says \"diagnose this\" / \"debug this\", reports a bug, says something is broken/throwing/failing, or describes a performance regression."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/diagnose/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -4,10 +4,10 @@ argument-hint: <feature or folder to map>
|
|
|
4
4
|
mode: system-architect
|
|
5
5
|
---
|
|
6
6
|
EXECUTION RULES:
|
|
7
|
-
1.
|
|
7
|
+
1. READ `.zoo-flow/CONTEXT.md`. If it does not exist, output one line before step 2: "No CONTEXT.md found. Run /scaffold-context to fill, or continue without." Do not invent content.
|
|
8
8
|
2. RUN skill: `.roo/skills/engineering/zoom-out/SKILL.md`.
|
|
9
9
|
3. OUTPUT MAP: Create markdown with sections: Domain language, Modules, Data flow, Seams/callers, ADRs, Open questions.
|
|
10
|
-
4. NEXT STEPS: Suggest `/
|
|
10
|
+
4. NEXT STEPS: Suggest `/scaffold-context`, `/feature`, `/refactor`, or `/fix`. DO NOT auto-launch.
|
|
11
11
|
5. SAVE (Optional): Ask to save map to .scratch/explorations/<date>/explore-<slug>.md.
|
|
12
12
|
|
|
13
13
|
$ARGUMENTS
|
|
@@ -16,6 +16,6 @@ EXECUTION RULES (Run sequentially. Wait for user between phases):
|
|
|
16
16
|
5. IMPLEMENT (Tweaker):
|
|
17
17
|
- Architect summarizes issues.
|
|
18
18
|
- Architect MUST `switch_mode` -> `code-tweaker`.
|
|
19
|
-
- Tweaker: For each issue, execute the `/tdd` command workflow (per `.roo/rules/01-command-protocol.md`). After each ships, suggest `/commit-and-document`.
|
|
19
|
+
- Tweaker: For each issue, execute the `/tdd` command workflow (per `.roo/rules/01-command-protocol.md`). After each ships, suggest `/verify`, then `/review`, then `/commit-and-document`. Do not auto-launch.
|
|
20
20
|
|
|
21
21
|
$ARGUMENTS
|
|
@@ -15,6 +15,6 @@ EXECUTION RULES:
|
|
|
15
15
|
- Tweaker MUST `switch_mode` -> `system-architect`.
|
|
16
16
|
4. POST-MORTEM (Architect): Execute Phase 6. If architectural rot, suggest `/refactor`.
|
|
17
17
|
- Architect MUST `switch_mode` -> `code-tweaker`.
|
|
18
|
-
5.
|
|
18
|
+
5. FOLLOW-UP (Tweaker): Suggest `/verify`, then `/review`, then `/commit-and-document`. Do not auto-launch.
|
|
19
19
|
|
|
20
20
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions \"grill me\"."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/productivity/grill-me/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/grill-with-docs/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Compact the current conversation into a handoff document for another agent to pick up."
|
|
3
3
|
argument-hint: "What will the next session be used for?"
|
|
4
|
+
mode: system-architect
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Skill: `.roo/skills/productivity/handoff/SKILL.md`
|
|
7
8
|
|
|
8
9
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/improve-codebase-architecture/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -13,6 +13,6 @@ EXECUTION RULES:
|
|
|
13
13
|
- Architect summarizes approved plan.
|
|
14
14
|
- Architect MUST `switch_mode` -> `code-tweaker`.
|
|
15
15
|
- Tweaker executes the `/tdd` command workflow (per `.roo/rules/01-command-protocol.md`) — new tests at interface, delete old.
|
|
16
|
-
- Tweaker suggests `/commit-and-document`.
|
|
16
|
+
- Tweaker suggests `/verify`, then `/review`, then `/commit-and-document`. Do not auto-launch.
|
|
17
17
|
|
|
18
18
|
$ARGUMENTS
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Review a diff or branch against the requested spec, project standards, architecture, and likely regressions. Use before committing non-trivial work."
|
|
3
|
+
argument-hint: <optional base ref, files, issue, PRD, or review focus>
|
|
4
|
+
mode: system-architect
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Review the current diff or requested target. Follow the skill exactly.
|
|
8
|
+
|
|
9
|
+
Skill: `.roo/skills/engineering/review/SKILL.md`
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/to-issues/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/to-prd/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -8,7 +8,7 @@ Update repo documentation so it matches the current code. Surgical edits only
|
|
|
8
8
|
|
|
9
9
|
Skill: `.roo/skills/engineering/update-docs/SKILL.md`
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Find the target doc in `.zoo-flow/` or `docs/`. If it does not exist, ask once: "No <slot> found. Create a stub at .zoo-flow/<slot>? (yes / pick-existing / skip)".
|
|
12
12
|
|
|
13
13
|
Do NOT use this for:
|
|
14
14
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Run the smallest useful verification checks for the current change: tests, typecheck, lint, build, or targeted project checks. Never claim verified unless checks actually ran."
|
|
3
|
+
argument-hint: <optional focus area, file, test, or command>
|
|
4
|
+
mode: code-tweaker
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Verify the current change with the smallest useful checks. Follow the skill exactly.
|
|
8
|
+
|
|
9
|
+
Skill: `.roo/skills/engineering/verify/SKILL.md`
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill."
|
|
3
|
+
mode: code-tweaker
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/productivity/write-a-skill/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture."
|
|
3
|
+
mode: system-architect
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Skill: `.roo/skills/engineering/zoom-out/SKILL.md`
|
|
6
7
|
|
|
7
8
|
$ARGUMENTS
|
|
@@ -11,7 +11,7 @@ When assigned a slash command, execute its command workflow before task-specific
|
|
|
11
11
|
3. Fallback: if `run_slash_command` is unavailable, disabled, rejected, or fails, read `.roo/commands/{command}.md`.
|
|
12
12
|
|
|
13
13
|
4. After command content is loaded:
|
|
14
|
-
- If it explicitly contains `Skill
|
|
14
|
+
- If it explicitly contains the canonical `Skill:` marker with `.roo/skills/.../SKILL.md`, read that exact skill and follow it.
|
|
15
15
|
- If it contains direct workflow steps, execute those steps directly.
|
|
16
16
|
- Do not assume every command has a skill.
|
|
17
17
|
- Do not read any skill unless the command explicitly references it.
|
|
@@ -14,16 +14,14 @@ For long command output, summarize or search the output instead of dumping every
|
|
|
14
14
|
|
|
15
15
|
## Domain-doc read gate
|
|
16
16
|
|
|
17
|
-
Do not read CONTEXT.md
|
|
17
|
+
Do not read `.zoo-flow/CONTEXT.md` or `.zoo-flow/docs/adr/` files by default.
|
|
18
18
|
|
|
19
19
|
Read domain docs only when at least one is true:
|
|
20
20
|
|
|
21
21
|
- The task touches domain language or terminology.
|
|
22
22
|
- The task changes public behavior.
|
|
23
23
|
- The task changes architecture, module seams, persistence, API shape, auth, payments, security, migrations, or cross-module design.
|
|
24
|
-
- The command explicitly requires those docs
|
|
24
|
+
- The command explicitly requires those docs (e.g. `/feature`, `/refactor`, `/grill-with-docs`, `/scaffold-context`, `/update-docs`).
|
|
25
25
|
- The user asks for documentation, architecture, product, or domain-context work.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Missing CONTEXT.md or ADRs is not an error. Use the slot discovery rule in `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to detect what is present, and proceed silently when nothing is.
|
|
27
|
+
Missing CONTEXT.md or ADRs is not an error. Proceed silently when nothing is present.
|
|
@@ -13,11 +13,17 @@ Before any `attempt_completion`, re-read the command body and confirm no later p
|
|
|
13
13
|
|
|
14
14
|
`attempt_completion` must include:
|
|
15
15
|
|
|
16
|
-
- what was done
|
|
17
|
-
- files changed or inspected
|
|
18
|
-
- commands/tests run
|
|
19
|
-
- status
|
|
20
|
-
-
|
|
21
|
-
- recommended next command
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
- what was done (exact scope)
|
|
17
|
+
- files changed or inspected (paths)
|
|
18
|
+
- commands/tests run (exact commands, pass/fail per command)
|
|
19
|
+
- status (complete / partial / blocked with reason)
|
|
20
|
+
- remaining risk (what was not checked or is uncertain)
|
|
21
|
+
- recommended next command (one only, no auto-launch)
|
|
22
|
+
|
|
23
|
+
The orchestrator forwards your output to the user. Include enough detail that the user can act on it without re-running commands.
|
|
24
|
+
|
|
25
|
+
Before running `git commit` or `git push`, halt and wait for explicit user approval. Never push unless explicitly asked.
|
|
26
|
+
|
|
27
|
+
For non-trivial `/tdd`, `/fix`, `/feature`, `/refactor`, or R3+ `/tweak` work, recommend `/verify` before `/review` before `/commit-and-document`. Do not auto-launch those commands.
|
|
28
|
+
|
|
29
|
+
If the user explicitly says to remember a project rule, or the same mistake has repeated, ask before appending a short lesson to `.zoo-flow/LESSONS.md`. Do not read or write lessons by default.
|
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
# Orchestrator Routing
|
|
2
2
|
|
|
3
|
-
Router only. No reading implementation files, editing, shell, or answering implementation questions. Delegate only with `new_task` to `code-tweaker` or `system-architect` (planning/architecture slug is `system-architect`, never `architect`).
|
|
3
|
+
Router only. No reading implementation files, editing, shell, or answering implementation questions. Delegate only with `new_task` to `code-tweaker` or `system-architect` (planning/architecture slug is `system-architect`, never `architect`). When a subtask returns, present its full result to the user first, then add one-line recommendation. Do not summarize away detail. Do not auto-launch another command.
|
|
4
|
+
|
|
5
|
+
## Subtask result handling
|
|
6
|
+
|
|
7
|
+
After `attempt_completion` from a worker, the orchestrator must:
|
|
8
|
+
|
|
9
|
+
1. Show the worker's full output to the user without truncating or summarizing.
|
|
10
|
+
2. Add one line: recommended next command (if any).
|
|
11
|
+
3. Stop and wait for user input.
|
|
12
|
+
|
|
13
|
+
Do not route a new user message until the previous subtask result is fully presented. If the user sends a new message before the result was shown, finish presenting the result first, then route the new message.
|
|
4
14
|
|
|
5
15
|
## Hard delegation boundary
|
|
6
16
|
|
|
7
|
-
|
|
17
|
+
For free-form requests, the only valid `new_task` target slugs are:
|
|
8
18
|
|
|
9
19
|
- `code-tweaker`
|
|
10
20
|
- `system-architect`
|
|
11
21
|
|
|
12
22
|
Never delegate to built-in/default modes, including Ask, Code, Debug, Architect, or Orchestrator.
|
|
13
23
|
|
|
14
|
-
|
|
24
|
+
Slash commands bypass this — the extension reads `mode:` from the command frontmatter and switches directly.
|
|
15
25
|
|
|
16
|
-
If a task
|
|
26
|
+
If a task sounds like "ask", "inspect", "review", "branch review", "pre-commit review", "analyze", "deep inspection", "investigate", or "reason about safety", route it to `system-architect`.
|
|
27
|
+
|
|
28
|
+
If a task requires source edits, tests, verification, docs updates, prototypes, or commits, route it to `code-tweaker`.
|
|
17
29
|
|
|
18
30
|
If neither custom mode is suitable, stop and report that no valid Zoo Flow mode exists. Do not fall back to Ask mode.
|
|
19
31
|
|
|
32
|
+
## Slash command handling
|
|
33
|
+
|
|
34
|
+
When the user types a slash command (e.g. `/tweak`, `/explore`), the extension reads the `mode:` frontmatter from the command file and auto-switches to that mode. The orchestrator does not route slash commands — the extension handles it.
|
|
35
|
+
|
|
36
|
+
The orchestrator only routes **free-form requests** (natural language without a leading `/`).
|
|
37
|
+
|
|
20
38
|
## Natural language first
|
|
21
39
|
|
|
22
40
|
Users are not expected to know slash commands. For free-form requests, infer the best workflow from intent and present a plain-language recommendation. Slash commands are optional power-user overrides. Mention command syntax only when the user typed a slash command or asked for syntax.
|
|
23
41
|
|
|
24
42
|
## User-facing workflow names
|
|
25
43
|
|
|
26
|
-
Slash commands are internal routing labels unless the user explicitly typed one or asked for syntax. For free-form requests, use plain-language workflow names only: small implementation, test-first, diagnosis, feature planning, refactor planning, exploration, documentation update, commit and journal, prototype, issue triage. Never show slash commands as selectable options for free-form requests. Internal delegation may still use the slash command after approval.
|
|
44
|
+
Slash commands are internal routing labels unless the user explicitly typed one or asked for syntax. For free-form requests, use plain-language workflow names only: small implementation, test-first, diagnosis, feature planning, refactor planning, exploration, documentation update, commit and journal, prototype, issue triage, review, verification. Never show slash commands as selectable options for free-form requests. Internal delegation may still use the slash command after approval.
|
|
27
45
|
|
|
28
46
|
## Routed commands
|
|
29
47
|
|
|
@@ -37,12 +55,14 @@ Slash commands are internal routing labels unless the user explicitly typed one
|
|
|
37
55
|
| diagnosis | `/fix` | system-architect |
|
|
38
56
|
| feature planning | `/feature` | system-architect |
|
|
39
57
|
| refactor planning | `/refactor` | system-architect |
|
|
40
|
-
| exploration | `/explore` | system-architect |
|
|
41
|
-
| issue triage | `/triage` | system-architect |
|
|
58
|
+
| exploration | `/explore` | system-architect |
|
|
59
|
+
| issue triage | `/triage` | system-architect |
|
|
60
|
+
| review | `/review` | system-architect |
|
|
61
|
+
| verification | `/verify` | code-tweaker |
|
|
42
62
|
|
|
43
63
|
## Routing decision guide
|
|
44
64
|
|
|
45
|
-
Read intent, not keywords. Top-down: 1. unknown code area or unclear next move → exploration; 2. broken behavior with unknown cause → diagnosis; 3. new capability needing design, PRD, issue slicing, or phase gates → feature planning; 4. working behavior but structure is the problem → refactor planning; 5. small known low-risk change → small implementation; 6. clear behavior and interface, user wants tests first → test-first; 7. throwaway design/state/UI uncertainty → prototype; 8. docs drift from code → documentation update; 9. finished work needs commit/journal → commit and journal; 10. issue creation, sorting, labels, or tracker workflow → issue triage.
|
|
65
|
+
Read intent, not keywords. Top-down: 1. unknown code area or unclear next move → exploration; 2. broken behavior with unknown cause → diagnosis; 3. new capability needing design, PRD, issue slicing, or phase gates → feature planning; 4. working behavior but structure is the problem → refactor planning; 5. small known low-risk change → small implementation; 6. clear behavior and interface, user wants tests first → test-first; 7. throwaway design/state/UI uncertainty → prototype; 8. docs drift from code → documentation update; 9. finished work needs commit/journal → commit and journal; 10. issue creation, sorting, labels, or tracker workflow → issue triage; 11. diff, branch, PR, standards, architecture, or pre-commit inspection → review; 12. check if this passes, run tests for this change, verify the branch, or make sure nothing broke → verification.
|
|
46
66
|
|
|
47
67
|
## Routing weight
|
|
48
68
|
|
|
@@ -50,7 +70,7 @@ Prefer the lightest workflow that preserves correctness. Use small implementatio
|
|
|
50
70
|
|
|
51
71
|
## Risk levels
|
|
52
72
|
|
|
53
|
-
Use risk to choose the lightest safe workflow. Risk does not override command intent; explicit slash commands still route as-is. R1 copy/style/doc typo/one-line obvious edit → small implementation. R2 localized code change with known target → small implementation or test-first. R3 behavior change with clear interface → test-first. R4 cross-module change or design tradeoff → feature planning or refactor planning. R5 auth/payments/security/migrations/data loss/external API contracts → strict planning/diagnosis with explicit approval gates.
|
|
73
|
+
Use risk to choose the lightest safe workflow. Risk does not override command intent; explicit slash commands still route as-is. R1 copy/style/doc typo/one-line obvious edit → small implementation. R2 localized code change with known target → small implementation or test-first. R3 behavior change with clear interface → test-first, then suggest verification or review. R4 cross-module change or design tradeoff → feature planning or refactor planning, then suggest verification and review. R5 auth/payments/security/migrations/data loss/external API contracts → strict planning/diagnosis with explicit approval gates, then suggest verification and review.
|
|
54
74
|
|
|
55
75
|
## Disambiguation
|
|
56
76
|
|
|
@@ -62,8 +82,20 @@ Explicit slash command from user = approval; route as-is. Clear free-form reques
|
|
|
62
82
|
|
|
63
83
|
## Approval gate
|
|
64
84
|
|
|
65
|
-
The orchestrator proposes; the user approves; then the orchestrator delegates.
|
|
85
|
+
The orchestrator proposes; the user approves; then the orchestrator delegates. Slash commands are auto-approved — the extension switches mode and executes immediately. A free-form request is never self-approving; propose a workflow and wait for approval. Present the recommendation, then stop and wait. Treat replies as approval only when they select the proposed workflow by number, option text, or clear restatement. A fresh free-form request restarts routing. If unsure whether the user approved, ask.
|
|
66
86
|
|
|
67
87
|
## Delegation
|
|
68
88
|
|
|
69
|
-
Delegate only after the approval gate is satisfied. Choose the safest proceed policy from `01-delegation-message.md`.
|
|
89
|
+
Delegate only after the approval gate is satisfied. Choose the safest proceed policy from `01-delegation-message.md`.
|
|
90
|
+
|
|
91
|
+
## Follow-up recommendations
|
|
92
|
+
|
|
93
|
+
For non-trivial work, suggest the next command chain only after the current command completes. Do not auto-launch follow-up commands merely because they are mentioned.
|
|
94
|
+
|
|
95
|
+
Recommended chains:
|
|
96
|
+
|
|
97
|
+
- test-first → verification → review → commit and journal
|
|
98
|
+
- diagnosis → verification → review → commit and journal
|
|
99
|
+
- refactor planning → verification → review → commit and journal
|
|
100
|
+
- feature planning → verification → review → commit and journal
|
|
101
|
+
- small implementation → verification or review when risk is R3+
|
|
@@ -53,10 +53,14 @@ Defaults:
|
|
|
53
53
|
- `/tweak`: proceed automatically after audit if clean
|
|
54
54
|
- `/tdd`: proceed automatically after audit if clean, unless the public interface, expected behavior, or test target is unclear
|
|
55
55
|
- `/explore`: proceed automatically; ask only if the target area is ambiguous
|
|
56
|
-
- `/update-docs`: proceed automatically after audit if the target doc/area is clear; ask if unclear
|
|
57
|
-
- `/prototype`: proceed automatically if prototype branch is clear; ask if logic vs UI is ambiguous
|
|
58
|
-
- `/
|
|
59
|
-
- `/
|
|
60
|
-
- `/
|
|
61
|
-
- `/
|
|
62
|
-
- `/
|
|
56
|
+
- `/update-docs`: proceed automatically after audit if the target doc/area is clear; ask if unclear
|
|
57
|
+
- `/prototype`: proceed automatically if prototype branch is clear; ask if logic vs UI is ambiguous
|
|
58
|
+
- `/verify`: proceed automatically after changed scope and project checks are identified; report exact commands run
|
|
59
|
+
- `/review`: stop and report only; do not patch application source
|
|
60
|
+
- `/fix`: ask after reproduced hypotheses before instrumentation/fix
|
|
61
|
+
- `/feature`: ask at phase gates: Prototype/PRD, prototype verdict, slice approval, issue approval
|
|
62
|
+
- `/refactor`: ask before selecting a candidate and before implementation
|
|
63
|
+
- `/triage`: ask before publishing, closing, labeling, or making irreversible tracker changes unless the user explicitly requested it
|
|
64
|
+
- `/commit-and-document`: always ask before `git commit`, `git push`, or issue close actions
|
|
65
|
+
|
|
66
|
+
Do not auto-launch `/verify`, `/review`, or `/commit-and-document` merely because a worker recommended it. Suggest only; wait for explicit approval.
|
|
@@ -11,6 +11,10 @@ If you entered this window via `switch_mode` (you are mid-chain, not the entry p
|
|
|
11
11
|
|
|
12
12
|
Before any `attempt_completion`, re-read the command body and confirm no later phase is assigned to another mode. If one is, `switch_mode` instead.
|
|
13
13
|
|
|
14
|
-
Do not use `attempt_completion` to avoid required implementation work.
|
|
14
|
+
Do not use `attempt_completion` to avoid required implementation work. Every `attempt_completion` must include the full output the user needs to see (review findings, exploration map, diagnosis, plan), not just summaries. The orchestrator will forward your output to the user; if you summarize, the user loses detail.
|
|
15
15
|
|
|
16
|
-
Halt for explicit user approval before testing a bug hypothesis, finalizing an architecture plan, publishing issues, or making irreversible decisions.
|
|
16
|
+
Halt for explicit user approval before testing a bug hypothesis, finalizing an architecture plan, publishing issues, or making irreversible decisions.
|
|
17
|
+
|
|
18
|
+
For non-trivial completed plans or reviews, recommend the next command only. Typical chain: implementation command -> `/verify` -> `/review` -> `/commit-and-document`. Do not auto-launch those commands.
|
|
19
|
+
|
|
20
|
+
If the user explicitly says to remember a project rule, or the same mistake has repeated, ask before appending a short lesson to `.zoo-flow/LESSONS.md`. Do not read or write lessons by default.
|
|
@@ -10,3 +10,5 @@
|
|
|
10
10
|
- **[to-prd](./to-prd/SKILL.md)** — Context → PRD issue.
|
|
11
11
|
- **[zoom-out](./zoom-out/SKILL.md)** — Map modules/callers.
|
|
12
12
|
- **[prototype](./prototype/SKILL.md)** — Throwaway logic/UI prototype.
|
|
13
|
+
- **[review](./review/SKILL.md)** — Diff/branch review against spec and standards.
|
|
14
|
+
- **[verify](./verify/SKILL.md)** — Targeted tests/typecheck/lint/build evidence.
|
|
@@ -123,8 +123,7 @@ Date via `date +%Y-%m-%d`. Create `docs/journal/<YYYY-MM-DD>/` if missing. Write
|
|
|
123
123
|
## 7. Surface stale docs (if any)
|
|
124
124
|
|
|
125
125
|
Read `git diff --cached --stat`. If any staged path overlaps with a path
|
|
126
|
-
referenced in `.zoo-flow/CONTEXT.md`,
|
|
127
|
-
`.zoo-flow/APP_MAP.md`, or any nearby `FLOW.md`, output exactly one line
|
|
126
|
+
referenced in `.zoo-flow/CONTEXT.md`, output exactly one line
|
|
128
127
|
before "Confirm":
|
|
129
128
|
|
|
130
129
|
"Public surface may have drifted. Run /update-docs? (yes / skip)"
|
|
@@ -24,38 +24,13 @@ _Avoid_: Purchase, transaction
|
|
|
24
24
|
- Define term in 1–2 sentences: what it is, not behavior.
|
|
25
25
|
- Include domain terms only; exclude generic programming terms.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Directory layout
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| Domain language | `CONTEXT.md` | User via /grill-with-docs | `.zoo-flow/CONTEXT.md` |
|
|
32
|
-
| Decisions | `docs/adr/<NNNN-slug>.md` | User via /grill-with-docs | `.zoo-flow/docs/adr/` |
|
|
33
|
-
| Subsystem flow | `FLOW.md` | Subsystem owner | Next to the code |
|
|
34
|
-
| App map | `APP_MAP.md` | User via /update-docs | `.zoo-flow/APP_MAP.md` |
|
|
35
|
-
| Architecture | `ARCHITECTURE.md` | User via /update-docs | `.zoo-flow/ARCHITECTURE.md` |
|
|
36
|
-
| Setup | `README.md` | Project owner | Project root |
|
|
29
|
+
- `.zoo-flow/CONTEXT.md` — domain language glossary
|
|
30
|
+
- `.zoo-flow/docs/adr/<NNNN-slug>.md` — architecture decisions
|
|
37
31
|
|
|
38
|
-
## Discovery rule
|
|
32
|
+
## Discovery rule
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
2. If the slot is empty/missing, that is **not an error**. The user has
|
|
44
|
-
not authored it yet. Do not invent content. Do not lazy-create unless
|
|
45
|
-
the calling command explicitly says so (e.g. /grill-with-docs on a
|
|
46
|
-
first resolved term).
|
|
47
|
-
3. If the calling command depends on a populated slot and none exist,
|
|
48
|
-
surface once: "Slot `<name>` not yet authored. Run /grill-with-docs
|
|
49
|
-
to fill, or continue without."
|
|
50
|
-
|
|
51
|
-
## Multi-context (rare)
|
|
52
|
-
|
|
53
|
-
A single project can hold multiple domain contexts when subsystems do
|
|
54
|
-
not share language. Use:
|
|
55
|
-
|
|
56
|
-
- `.zoo-flow/CONTEXT-MAP.md` — index of contexts.
|
|
57
|
-
- `.zoo-flow/contexts/<slug>/CONTEXT.md` — per-context.
|
|
58
|
-
- `.zoo-flow/contexts/<slug>/docs/adr/` — per-context ADRs.
|
|
59
|
-
|
|
60
|
-
`/grill-with-docs` and `/explore` consult the map first, then the
|
|
61
|
-
relevant per-context file.
|
|
34
|
+
1. If the file exists, read it.
|
|
35
|
+
2. If the file is missing, that is **not an error**. Do not invent content.
|
|
36
|
+
3. For commands that depend on populated context, surface once: "No CONTEXT.md or ADRs found yet. Run /grill-with-docs or /scaffold-context to fill, or continue without."
|