@fernado03/zoo-flow 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,9 +20,9 @@ npx @fernado03/zoo-flow@latest init
20
20
 
21
21
  This copies the runtime template (`.roomodes` and `.roo/`) plus the
22
22
  `.zoo-flow/` starter docs into your project. It does not copy this
23
- repository's `docs/` folder. Zoo Flow also ensures `.zoo-flow/` is
24
- listed in `.gitignore` so local context docs stay out of normal
25
- commits.
23
+ repository's `docs/` folder. Zoo Flow also ensures `.roo/`, `.roomodes`, and `.zoo-flow/` are
24
+ listed in `.gitignore` so generated config and local context docs stay
25
+ out of normal commits.
26
26
 
27
27
  If `.roomodes` or `.roo/` already exist, Zoo Flow stops without
28
28
  overwriting. To back up and overwrite:
@@ -41,14 +41,6 @@ Window**) and open Zoo Code.
41
41
  > are kept as-is because they are the official Zoo Code configuration
42
42
  > paths. Zoo Flow does not introduce a `.zoo/` directory.
43
43
 
44
- ### Before using `/triage`, `/to-issues`, or `/to-prd`
45
-
46
- Run `/setup-matt-pocock-skills` once per repo. It seeds an `## Agent skills` block in `AGENTS.md` or
47
- `CLAUDE.md` and a few files under `docs/agents/` so the issue and PRD
48
- skills know your tracker, labels, and domain layout. Skip it if you
49
- only plan to use `/tweak`, `/fix`, `/explore`, `/refactor`,
50
- `/diagnose`, `/prototype`, `/update-docs`, or `/commit-and-document`.
51
-
52
44
  ## Using Zoo Flow
53
45
 
54
46
  After installing this template, read:
package/bin/zoo-flow.js CHANGED
@@ -80,20 +80,21 @@ function backupIfExists(projectRoot, backupDir, relativePath) {
80
80
  return true;
81
81
  }
82
82
 
83
- const ZOO_FLOW_GITIGNORE_MARKER = "# Zoo Flow — local context scaffolding";
83
+ const ZOO_FLOW_GITIGNORE_MARKER = "# Zoo Flow — generated config (never committed)";
84
84
 
85
85
  function appendZooFlowToGitignore(projectRoot) {
86
86
  const gi = path.join(projectRoot, ".gitignore");
87
+ const entries = [".roomodes", ".roo/", ".zoo-flow/"];
87
88
 
88
89
  if (pathExists(gi)) {
89
90
  const content = fs.readFileSync(gi, "utf8");
90
91
  if (content.includes(ZOO_FLOW_GITIGNORE_MARKER)) return false;
91
- const addition = `\n${ZOO_FLOW_GITIGNORE_MARKER} (never committed)\n.zoo-flow/\n`;
92
+ const addition = `\n${ZOO_FLOW_GITIGNORE_MARKER}\n${entries.join("\n")}\n`;
92
93
  fs.appendFileSync(gi, addition);
93
94
  return true;
94
95
  }
95
96
 
96
- const fresh = `${ZOO_FLOW_GITIGNORE_MARKER} (never committed)\n.zoo-flow/\n`;
97
+ const fresh = `${ZOO_FLOW_GITIGNORE_MARKER}\n${entries.join("\n")}\n`;
97
98
  fs.writeFileSync(gi, fresh);
98
99
  return true;
99
100
  }
@@ -325,7 +326,7 @@ Run again with --force to back up and overwrite:
325
326
  copiedLines.push(" - .zoo-flow/docs/adr/0001-record-architecture-decisions.md");
326
327
  }
327
328
  if (didAddGitignore) {
328
- copiedLines.push(" - appended .zoo-flow/ to .gitignore");
329
+ copiedLines.push(" - appended .roo/, .roomodes, .zoo-flow/ to .gitignore");
329
330
  }
330
331
 
331
332
  console.log(`
@@ -406,7 +407,7 @@ Would replace with latest template:
406
407
  - .roomodes
407
408
  - .roo/
408
409
  ${wouldMigrate.length > 0 ? `\nWould migrate to .zoo-flow/:\n${wouldMigrate.map((p) => ` - ${p}\n`).join("")}` : ""}
409
- Would append .zoo-flow/ to .gitignore (idempotent).
410
+ Would append .roo/, .roomodes, .zoo-flow/ to .gitignore (idempotent).
410
411
 
411
412
  Run this to update:
412
413
  npx @fernado03/zoo-flow@latest update
@@ -442,7 +443,7 @@ ${didBackup ? `Backup:\n ${backupDir}\n\nTo restore the previous config:\n rm
442
443
  2. Open Zoo Code
443
444
  3. Confirm the three custom modes still appear
444
445
  `);
445
- }
446
+ }
446
447
 
447
448
  if (!command || command === "--help" || command === "-h") {
448
449
  console.log(HELP);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fernado03/zoo-flow",
3
3
  "description": "Workflow control plane for Zoo Code.",
4
- "version": "0.5.1",
4
+ "version": "0.5.3",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "zoo-flow": "bin/zoo-flow.js"
@@ -1,13 +1,13 @@
1
- ---
2
- description: "Explore unfamiliar code before /feature, /refactor, or /fix. Produces written map."
3
- argument-hint: <feature or folder to map>
4
- mode: system-architect
5
- ---
6
- EXECUTION RULES:
7
- 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to the target area. Missing slots are not an error. If no slots are populated, output one line before step 2: "No context docs found. Run /grill-with-docs to start CONTEXT.md, or continue without context."
8
- 2. RUN skill: `.roo/skills/engineering/zoom-out/SKILL.md`.
9
- 3. OUTPUT MAP: Create markdown with sections: Domain language, Modules, Data flow, Seams/callers, ADRs, Open questions.
10
- 4. NEXT STEPS: Suggest `/grill-with-docs`, `/feature`, `/refactor`, or `/fix`. DO NOT auto-launch.
11
- 5. SAVE (Optional): Ask to save map to .scratch/explorations/<date>/explore-<slug>.md.
12
-
13
- $ARGUMENTS
1
+ ---
2
+ description: "Explore unfamiliar code before /feature, /refactor, or /fix. Produces written map."
3
+ argument-hint: <feature or folder to map>
4
+ mode: system-architect
5
+ ---
6
+ EXECUTION RULES:
7
+ 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to the target area. Missing slots are not an error. If no slots are populated, output one line before step 2: "No context docs found. Run /grill-with-docs to start CONTEXT.md, or continue without context."
8
+ 2. RUN skill: `.roo/skills/engineering/zoom-out/SKILL.md`.
9
+ 3. OUTPUT MAP: Create markdown with sections: Domain language, Modules, Data flow, Seams/callers, ADRs, Open questions.
10
+ 4. NEXT STEPS: Suggest `/grill-with-docs`, `/feature`, `/refactor`, or `/fix`. DO NOT auto-launch.
11
+ 5. SAVE (Optional): Ask to save map to .scratch/explorations/<date>/explore-<slug>.md.
12
+
13
+ $ARGUMENTS
@@ -1,13 +1,13 @@
1
- ---
2
- description: "Bootstrap .zoo-flow/CONTEXT.md (and 0-2 starter ADRs) for an existing project by scanning code for domain terms and cross-cutting decisions. Shows proposed entries inline and asks for confirm before writing. Use when starting Zoo Flow on a project with no CONTEXT.md, or to expand a thin one."
3
- argument-hint: <optional focus area, e.g. "auth", "billing", or empty for whole project>
4
- mode: code-tweaker
5
- ---
6
-
7
- EXECUTION RULES:
8
- 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to find current CONTEXT.md, ADRs.
9
- 2. IF `.zoo-flow/CONTEXT.md` exists and is non-empty, ASK: skip / merge (default) / replace. Skip = do nothing. Merge = add only new terms, never overwrite. Replace = full rewrite from scan.
10
- 3. RUN skill: `.roo/skills/engineering/scaffold-context/SKILL.md` with the same focus area.
11
- 4. DO NOT auto-launch any follow-up commands.
12
-
13
- $ARGUMENTS
1
+ ---
2
+ description: "Bootstrap .zoo-flow/CONTEXT.md (and 0-2 starter ADRs) for an existing project by scanning code for domain terms and cross-cutting decisions. Shows proposed entries inline and asks for confirm before writing. Use when starting Zoo Flow on a project with no CONTEXT.md, or to expand a thin one."
3
+ argument-hint: <optional focus area, e.g. "auth", "billing", or empty for whole project>
4
+ mode: code-tweaker
5
+ ---
6
+
7
+ EXECUTION RULES:
8
+ 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to find current CONTEXT.md, ADRs.
9
+ 2. IF `.zoo-flow/CONTEXT.md` exists and is non-empty, ASK: skip / merge (default) / replace. Skip = do nothing. Merge = add only new terms, never overwrite. Replace = full rewrite from scan.
10
+ 3. RUN skill: `.roo/skills/engineering/scaffold-context/SKILL.md` with the same focus area.
11
+ 4. DO NOT auto-launch any follow-up commands.
12
+
13
+ $ARGUMENTS
@@ -1,8 +1,8 @@
1
- ---
2
- description: "Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, or `triage` — or if those skills appear to be missing issue tracker, triage label, or domain-doc configuration."
3
- mode: code-tweaker
4
- ---
5
-
6
- Run skill: `.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md`
7
-
8
- $ARGUMENTS
1
+ ---
2
+ description: "Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, or `triage` — or if those skills appear to be missing issue tracker, triage label, or domain-doc configuration."
3
+ mode: code-tweaker
4
+ ---
5
+
6
+ Run skill: `.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md`
7
+
8
+ $ARGUMENTS
@@ -1,22 +1,22 @@
1
- ---
2
- description: "Update repo documentation so it matches the current code."
3
- argument-hint: <doc or area to update>
4
- mode: code-tweaker
5
- ---
6
-
7
- Update repo documentation so it matches the current code. Surgical edits only — read existing docs first, verify claims against code, never rewrite wholesale unless the existing doc is unsalvageable. Follow the skill exactly.
8
-
9
- Skill: `.roo/skills/engineering/update-docs/SKILL.md`
10
-
11
- Apply the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to locate the target doc. If the slot is empty, ask once: "No <slot> found. Create a stub at .zoo-flow/<slot>? (yes / pick-existing / skip)".
12
-
13
- Do NOT use this for:
14
-
15
- - Domain glossary terms — use `/grill-with-docs`
16
- - ADRs — use `/grill-with-docs` or `/refactor`
17
- - Local commit journal entries — use `/commit-and-document`
18
- - Read-only understanding — use `/explore`
19
-
20
- If `$ARGUMENTS` is empty, ask once: "Which documentation file or area should I update?"
21
-
22
- $ARGUMENTS
1
+ ---
2
+ description: "Update repo documentation so it matches the current code."
3
+ argument-hint: <doc or area to update>
4
+ mode: code-tweaker
5
+ ---
6
+
7
+ Update repo documentation so it matches the current code. Surgical edits only — read existing docs first, verify claims against code, never rewrite wholesale unless the existing doc is unsalvageable. Follow the skill exactly.
8
+
9
+ Skill: `.roo/skills/engineering/update-docs/SKILL.md`
10
+
11
+ Apply the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to locate the target doc. If the slot is empty, ask once: "No <slot> found. Create a stub at .zoo-flow/<slot>? (yes / pick-existing / skip)".
12
+
13
+ Do NOT use this for:
14
+
15
+ - Domain glossary terms — use `/grill-with-docs`
16
+ - ADRs — use `/grill-with-docs` or `/refactor`
17
+ - Local commit journal entries — use `/commit-and-document`
18
+ - Read-only understanding — use `/explore`
19
+
20
+ If `$ARGUMENTS` is empty, ask once: "Which documentation file or area should I update?"
21
+
22
+ $ARGUMENTS
@@ -1,29 +1,29 @@
1
- # Context Economy
2
-
3
- Use the smallest read that preserves correctness.
4
-
5
- Prefer `list_files`, `search_files`, or `codebase_search` before full-file reads.
6
-
7
- When reading files, prefer targeted line ranges or indentation/block reads when the relevant area is known.
8
-
9
- Batch related small reads when useful.
10
-
11
- Do not re-read unchanged files unless needed.
12
-
13
- For long command output, summarize or search the output instead of dumping everything.
14
-
15
- ## Domain-doc read gate
16
-
17
- Do not read CONTEXT.md, CONTEXT-MAP.md, FLOW.md, APP_MAP.md, ARCHITECTURE.md, or ADRs by default.
18
-
19
- Read domain docs only when at least one is true:
20
-
21
- - The task touches domain language or terminology.
22
- - The task changes public behavior.
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, such as `/feature`, `/refactor`, `/grill-with-docs`, `/scaffold-context`, or relevant `/update-docs`.
25
- - The user asks for documentation, architecture, product, or domain-context work.
26
-
27
- For low-risk localized edits, prefer code search and targeted file reads first.
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.
1
+ # Context Economy
2
+
3
+ Use the smallest read that preserves correctness.
4
+
5
+ Prefer `list_files`, `search_files`, or `codebase_search` before full-file reads.
6
+
7
+ When reading files, prefer targeted line ranges or indentation/block reads when the relevant area is known.
8
+
9
+ Batch related small reads when useful.
10
+
11
+ Do not re-read unchanged files unless needed.
12
+
13
+ For long command output, summarize or search the output instead of dumping everything.
14
+
15
+ ## Domain-doc read gate
16
+
17
+ Do not read CONTEXT.md, CONTEXT-MAP.md, FLOW.md, APP_MAP.md, ARCHITECTURE.md, or ADRs by default.
18
+
19
+ Read domain docs only when at least one is true:
20
+
21
+ - The task touches domain language or terminology.
22
+ - The task changes public behavior.
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, such as `/feature`, `/refactor`, `/grill-with-docs`, `/scaffold-context`, or relevant `/update-docs`.
25
+ - The user asks for documentation, architecture, product, or domain-context work.
26
+
27
+ For low-risk localized edits, prefer code search and targeted file reads first.
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.
@@ -1,69 +1,69 @@
1
- # Orchestrator Routing
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`). Summarize and stop after a subtask returns; do not auto-launch another.
4
-
5
- ## Hard delegation boundary
6
-
7
- The only valid `new_task` target slugs are:
8
-
9
- - `code-tweaker`
10
- - `system-architect`
11
-
12
- Never delegate to built-in/default modes, including Ask, Code, Debug, Architect, or Orchestrator.
13
-
14
- If a task sounds like "ask", "inspect", "review", "analyze", "deep inspection", "investigate", or "reason about safety", route it to `system-architect`.
15
-
16
- If a task requires source edits, tests, docs updates, prototypes, or commits, route it to `code-tweaker`.
17
-
18
- If neither custom mode is suitable, stop and report that no valid Zoo Flow mode exists. Do not fall back to Ask mode.
19
-
20
- ## Natural language first
21
-
22
- 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
-
24
- ## User-facing workflow names
25
-
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.
27
-
28
- ## Routed commands
29
-
30
- | Workflow | Command | Mode |
31
- | -------------------- | ---------------------- | ---------------- |
32
- | small implementation | `/tweak` | code-tweaker |
33
- | test-first | `/tdd` | code-tweaker |
34
- | documentation update | `/update-docs` | code-tweaker |
35
- | commit and journal | `/commit-and-document` | code-tweaker |
36
- | prototype | `/prototype` | code-tweaker |
37
- | diagnosis | `/fix` | system-architect |
38
- | feature planning | `/feature` | system-architect |
39
- | refactor planning | `/refactor` | system-architect |
40
- | exploration | `/explore` | system-architect |
41
- | issue triage | `/triage` | system-architect |
42
-
43
- ## Routing decision guide
44
-
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.
46
-
47
- ## Routing weight
48
-
49
- Prefer the lightest workflow that preserves correctness. Use small implementation for known, localized, low-risk changes. Do not use feature planning merely because code will be added. Do not use diagnosis when the cause and target change are already known. Do not use refactor planning for one-file cleanup without design tradeoffs. If the target area is unknown, choose exploration first.
50
-
51
- ## Risk levels
52
-
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.
54
-
55
- ## Disambiguation
56
-
57
- Diagnosis vs small implementation: unknown cause → diagnosis; known cause → small implementation. Diagnosis vs refactor planning: wrong behavior → diagnosis; working behavior but bad structure → refactor planning. Feature planning vs test-first: needs sharpening/PRD/issues → feature planning; clear interface/behavior → test-first. Feature planning vs prototype: real implementation → feature planning; throwaway design check → prototype. Refactor planning vs small implementation: cross-module design tradeoff → refactor planning; localized edit → small implementation. Documentation update vs commit and journal: align docs with code → documentation update; record finished work → commit and journal. Unknown target area beats all: choose exploration first.
58
-
59
- ## Confidence and presentation
60
-
61
- Explicit slash command from user = approval; route as-is. Clear free-form request = recommend one plain-language workflow plus one safe alternative if useful. Genuine tie = offer numbered plain-language choices. Prefer lighter workflow when safe, but do not skip needed diagnosis, planning, or approval. Follow `.roo/rules/03-manual-reply-protocol.md`: no slash commands, mode names, or executable routing text in selectable options. Good free-form option: 1. Make the small implementation change; 2. Explore the area first. Bad free-form option: 1. `/tweak`; 2. `/explore`.
62
-
63
- ## Approval gate
64
-
65
- The orchestrator proposes; the user approves; then the orchestrator delegates. Explicit slash command = approval; route immediately. Free-form request = not self-approving; 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
-
67
- ## Delegation
68
-
69
- Delegate only after the approval gate is satisfied. Choose the safest proceed policy from `01-delegation-message.md`.
1
+ # Orchestrator Routing
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`). Summarize and stop after a subtask returns; do not auto-launch another.
4
+
5
+ ## Hard delegation boundary
6
+
7
+ The only valid `new_task` target slugs are:
8
+
9
+ - `code-tweaker`
10
+ - `system-architect`
11
+
12
+ Never delegate to built-in/default modes, including Ask, Code, Debug, Architect, or Orchestrator.
13
+
14
+ If a task sounds like "ask", "inspect", "review", "analyze", "deep inspection", "investigate", or "reason about safety", route it to `system-architect`.
15
+
16
+ If a task requires source edits, tests, docs updates, prototypes, or commits, route it to `code-tweaker`.
17
+
18
+ If neither custom mode is suitable, stop and report that no valid Zoo Flow mode exists. Do not fall back to Ask mode.
19
+
20
+ ## Natural language first
21
+
22
+ 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
+
24
+ ## User-facing workflow names
25
+
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.
27
+
28
+ ## Routed commands
29
+
30
+ | Workflow | Command | Mode |
31
+ | -------------------- | ---------------------- | ---------------- |
32
+ | small implementation | `/tweak` | code-tweaker |
33
+ | test-first | `/tdd` | code-tweaker |
34
+ | documentation update | `/update-docs` | code-tweaker |
35
+ | commit and journal | `/commit-and-document` | code-tweaker |
36
+ | prototype | `/prototype` | code-tweaker |
37
+ | diagnosis | `/fix` | system-architect |
38
+ | feature planning | `/feature` | system-architect |
39
+ | refactor planning | `/refactor` | system-architect |
40
+ | exploration | `/explore` | system-architect |
41
+ | issue triage | `/triage` | system-architect |
42
+
43
+ ## Routing decision guide
44
+
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.
46
+
47
+ ## Routing weight
48
+
49
+ Prefer the lightest workflow that preserves correctness. Use small implementation for known, localized, low-risk changes. Do not use feature planning merely because code will be added. Do not use diagnosis when the cause and target change are already known. Do not use refactor planning for one-file cleanup without design tradeoffs. If the target area is unknown, choose exploration first.
50
+
51
+ ## Risk levels
52
+
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.
54
+
55
+ ## Disambiguation
56
+
57
+ Diagnosis vs small implementation: unknown cause → diagnosis; known cause → small implementation. Diagnosis vs refactor planning: wrong behavior → diagnosis; working behavior but bad structure → refactor planning. Feature planning vs test-first: needs sharpening/PRD/issues → feature planning; clear interface/behavior → test-first. Feature planning vs prototype: real implementation → feature planning; throwaway design check → prototype. Refactor planning vs small implementation: cross-module design tradeoff → refactor planning; localized edit → small implementation. Documentation update vs commit and journal: align docs with code → documentation update; record finished work → commit and journal. Unknown target area beats all: choose exploration first.
58
+
59
+ ## Confidence and presentation
60
+
61
+ Explicit slash command from user = approval; route as-is. Clear free-form request = recommend one plain-language workflow plus one safe alternative if useful. Genuine tie = offer numbered plain-language choices. Prefer lighter workflow when safe, but do not skip needed diagnosis, planning, or approval. Follow `.roo/rules/03-manual-reply-protocol.md`: no slash commands, mode names, or executable routing text in selectable options. Good free-form option: 1. Make the small implementation change; 2. Explore the area first. Bad free-form option: 1. `/tweak`; 2. `/explore`.
62
+
63
+ ## Approval gate
64
+
65
+ The orchestrator proposes; the user approves; then the orchestrator delegates. Explicit slash command = approval; route immediately. Free-form request = not self-approving; 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
+
67
+ ## Delegation
68
+
69
+ Delegate only after the approval gate is satisfied. Choose the safest proceed policy from `01-delegation-message.md`.
@@ -1,62 +1,62 @@
1
- # Delegation Message
2
-
3
- A delegated task is the **entire command chain** — every phase and mode switch the command body defines, run to its final phase. A worker returns via `attempt_completion` only after that final phase. Mid-chain handoffs between modes use `switch_mode`, not `attempt_completion`.
4
-
5
- ## Compact delegation template
6
-
7
- Use this shape unless the task needs more detail:
8
-
9
- ```
10
- Task:
11
- Command:
12
- Proceed policy:
13
- Context hints:
14
- Allowed scope:
15
- Must follow:
16
- - `.roo/rules/01-command-protocol.md`
17
- - relevant command file
18
- - referenced skill only
19
- Completion must include:
20
- - files inspected/changed
21
- - commands/tests run
22
- - status
23
- - blockers
24
- - recommended next command
25
- ```
26
-
27
- Fields expand as:
28
-
29
- - **Task** — what the user asked for, in plain language.
30
- - **Command** — the slash command being delegated, with leading slash.
31
- - **Proceed policy** — one of the three policies below.
32
- - **Context hints** — known files, symbols, line ranges, or search terms when available. Pass paths, not file bodies.
33
- - **Allowed scope** — what the worker may edit or read, when it is not "the whole repo".
34
-
35
- Do not paste long rule bodies, command bodies, or file contents into delegation messages. Pass paths, symbols, search terms, and decisions instead.
36
-
37
- The receiving worker already loads `.roo/rules/01-command-protocol.md` and `.roo/rules/00-paths.md` on every turn. Reminders are not needed for those, but command-file and skill-path pointers still help when the worker has not loaded them yet.
38
-
39
- Ignore slash commands mentioned only inside subtask summaries.
40
-
41
- # Proceed Policy
42
-
43
- Every delegated task must include one proceed policy:
44
-
45
- - `Proceed automatically after audit if clean`
46
- - `Ask user before implementation`
47
- - `Stop and report only`
48
-
49
- Use the least-interruptive policy that is safe.
50
-
51
- Defaults:
52
-
53
- - `/tweak`: proceed automatically after audit if clean
54
- - `/tdd`: proceed automatically after audit if clean, unless the public interface, expected behavior, or test target is unclear
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
- - `/fix`: ask after reproduced hypotheses before instrumentation/fix
59
- - `/feature`: ask at phase gates: Prototype/PRD, prototype verdict, slice approval, issue approval
60
- - `/refactor`: ask before selecting a candidate and before implementation
61
- - `/triage`: ask before publishing, closing, labeling, or making irreversible tracker changes unless the user explicitly requested it
62
- - `/commit-and-document`: always ask before `git commit`, `git push`, or issue close actions
1
+ # Delegation Message
2
+
3
+ A delegated task is the **entire command chain** — every phase and mode switch the command body defines, run to its final phase. A worker returns via `attempt_completion` only after that final phase. Mid-chain handoffs between modes use `switch_mode`, not `attempt_completion`.
4
+
5
+ ## Compact delegation template
6
+
7
+ Use this shape unless the task needs more detail:
8
+
9
+ ```
10
+ Task:
11
+ Command:
12
+ Proceed policy:
13
+ Context hints:
14
+ Allowed scope:
15
+ Must follow:
16
+ - `.roo/rules/01-command-protocol.md`
17
+ - relevant command file
18
+ - referenced skill only
19
+ Completion must include:
20
+ - files inspected/changed
21
+ - commands/tests run
22
+ - status
23
+ - blockers
24
+ - recommended next command
25
+ ```
26
+
27
+ Fields expand as:
28
+
29
+ - **Task** — what the user asked for, in plain language.
30
+ - **Command** — the slash command being delegated, with leading slash.
31
+ - **Proceed policy** — one of the three policies below.
32
+ - **Context hints** — known files, symbols, line ranges, or search terms when available. Pass paths, not file bodies.
33
+ - **Allowed scope** — what the worker may edit or read, when it is not "the whole repo".
34
+
35
+ Do not paste long rule bodies, command bodies, or file contents into delegation messages. Pass paths, symbols, search terms, and decisions instead.
36
+
37
+ The receiving worker already loads `.roo/rules/01-command-protocol.md` and `.roo/rules/00-paths.md` on every turn. Reminders are not needed for those, but command-file and skill-path pointers still help when the worker has not loaded them yet.
38
+
39
+ Ignore slash commands mentioned only inside subtask summaries.
40
+
41
+ # Proceed Policy
42
+
43
+ Every delegated task must include one proceed policy:
44
+
45
+ - `Proceed automatically after audit if clean`
46
+ - `Ask user before implementation`
47
+ - `Stop and report only`
48
+
49
+ Use the least-interruptive policy that is safe.
50
+
51
+ Defaults:
52
+
53
+ - `/tweak`: proceed automatically after audit if clean
54
+ - `/tdd`: proceed automatically after audit if clean, unless the public interface, expected behavior, or test target is unclear
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
+ - `/fix`: ask after reproduced hypotheses before instrumentation/fix
59
+ - `/feature`: ask at phase gates: Prototype/PRD, prototype verdict, slice approval, issue approval
60
+ - `/refactor`: ask before selecting a candidate and before implementation
61
+ - `/triage`: ask before publishing, closing, labeling, or making irreversible tracker changes unless the user explicitly requested it
62
+ - `/commit-and-document`: always ask before `git commit`, `git push`, or issue close actions