@toolu/opencode 6.8.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/generated/GENERATED-NOTES.md +16 -0
- package/generated/agents/toolu--architect.md +52 -0
- package/generated/agents/toolu--deep-explore.md +65 -0
- package/generated/agents/toolu--implementer.md +50 -0
- package/generated/agents/toolu--quick-task.md +54 -0
- package/generated/agents/toolu--research-agent.md +101 -0
- package/generated/commands/toolu--commit.md +8 -0
- package/generated/commands/toolu--review-and-commit.md +8 -0
- package/generated/opencode.toolu.json +116 -0
- package/generated/skills/toolu--brainstorm/SKILL.md +57 -0
- package/generated/skills/toolu--brainstorm/references/design-questions.md +36 -0
- package/generated/skills/toolu--commit--skill/SKILL.md +11 -0
- package/generated/skills/toolu--debug/SKILL.md +54 -0
- package/generated/skills/toolu--deep-research/SKILL.md +51 -0
- package/generated/skills/toolu--execution/SKILL.md +77 -0
- package/generated/skills/toolu--orchestrator/SKILL.md +145 -0
- package/generated/skills/toolu--orchestrator/references/delegation-cost.md +104 -0
- package/generated/skills/toolu--orchestrator/references/model-routing.md +112 -0
- package/generated/skills/toolu--plan/SKILL.md +56 -0
- package/generated/skills/toolu--plan/references/ledger.md +18 -0
- package/generated/skills/toolu--plan-review/SKILL.md +48 -0
- package/generated/skills/toolu--review-and-commit--skill/SKILL.md +10 -0
- package/generated/skills/toolu--setup/SKILL.md +24 -0
- package/generated/skills/toolu--setup/scripts/setup.sh +206 -0
- package/generated/skills/toolu--spec/SKILL.md +67 -0
- package/generated/skills/toolu--spec-review/SKILL.md +50 -0
- package/generated/skills/toolu--test/SKILL.md +49 -0
- package/package.json +51 -0
- package/plugins/agent-browser/.claude-plugin/plugin.json +18 -0
- package/plugins/agent-browser/.codex-plugin/plugin.json +7 -0
- package/plugins/agent-browser/README.md +18 -0
- package/plugins/agent-browser/hooks/hooks.json +15 -0
- package/plugins/agent-browser/hooks/session-start.sh +42 -0
- package/plugins/agent-browser/skills/agent-browser/SKILL.md +77 -0
- package/plugins/agent-browser/skills/agent-browser/scripts/agent-browser.sh +80 -0
- package/plugins/ast-grep/.claude-plugin/plugin.json +18 -0
- package/plugins/ast-grep/.codex-plugin/plugin.json +7 -0
- package/plugins/ast-grep/README.md +21 -0
- package/plugins/ast-grep/hooks/hooks.json +15 -0
- package/plugins/ast-grep/hooks/post-tools.d/byte-savings.sh +67 -0
- package/plugins/ast-grep/hooks/pre-tools.d/search-nudge.sh +170 -0
- package/plugins/ast-grep/hooks/register.sh +68 -0
- package/plugins/ast-grep/scripts/byte-savings-report.sh +28 -0
- package/plugins/ast-grep/skills/ast-grep/SKILL.md +127 -0
- package/plugins/ast-grep/skills/ast-grep/references/ast-grep-advanced.md +44 -0
- package/plugins/ast-grep/skills/ast-grep/scripts/ast-grep.sh +103 -0
- package/plugins/context7/.claude-plugin/plugin.json +18 -0
- package/plugins/context7/.codex-plugin/plugin.json +7 -0
- package/plugins/context7/README.md +19 -0
- package/plugins/context7/hooks/hooks.json +15 -0
- package/plugins/context7/hooks/session-start.sh +42 -0
- package/plugins/context7/skills/context7/SKILL.md +64 -0
- package/plugins/context7/skills/context7/scripts/search.sh +151 -0
- package/plugins/exa-search/.claude-plugin/plugin.json +18 -0
- package/plugins/exa-search/.codex-plugin/plugin.json +7 -0
- package/plugins/exa-search/README.md +19 -0
- package/plugins/exa-search/hooks/hooks.json +15 -0
- package/plugins/exa-search/hooks/session-start.sh +34 -0
- package/plugins/exa-search/skills/exa-search/SKILL.md +91 -0
- package/plugins/exa-search/skills/exa-search/scripts/search.sh +221 -0
- package/plugins/jev/.claude-plugin/plugin.json +19 -0
- package/plugins/jev/.codex-plugin/plugin.json +7 -0
- package/plugins/jev/README.md +61 -0
- package/plugins/jev/hooks/hooks.json +25 -0
- package/plugins/jev/hooks/lib/common.sh +49 -0
- package/plugins/jev/hooks/session-start.sh +45 -0
- package/plugins/jev/hooks/user-prompt-submit.sh +41 -0
- package/plugins/jev/skills/jev/SKILL.md +81 -0
- package/plugins/jev/skills/jev/evals/README.md +98 -0
- package/plugins/jev/skills/jev/references/problem-solving.md +198 -0
- package/plugins/jev/skills/jev/scripts/jev.sh +405 -0
- package/plugins/jira/.claude-plugin/plugin.json +18 -0
- package/plugins/jira/.codex-plugin/plugin.json +7 -0
- package/plugins/jira/README.md +42 -0
- package/plugins/jira/hooks/hooks.json +15 -0
- package/plugins/jira/hooks/session-start.sh +34 -0
- package/plugins/jira/skills/jira/SKILL.md +123 -0
- package/plugins/jira/skills/jira/scripts/jira.sh +70 -0
- package/plugins/jira/skills/jira/scripts/lib/adf.sh +17 -0
- package/plugins/jira/skills/jira/scripts/lib/attachment.sh +94 -0
- package/plugins/jira/skills/jira/scripts/lib/board.sh +58 -0
- package/plugins/jira/skills/jira/scripts/lib/http.sh +184 -0
- package/plugins/jira/skills/jira/scripts/lib/issue.sh +159 -0
- package/plugins/jira/skills/jira/scripts/lib/paginate.sh +45 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-parse.sh +70 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-run.sh +115 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-store.sh +168 -0
- package/plugins/jira/skills/jira/scripts/lib/plan.sh +108 -0
- package/plugins/jira/skills/jira/scripts/lib/project.sh +42 -0
- package/plugins/jira/skills/jira/scripts/lib/raw.sh +15 -0
- package/plugins/jira/skills/jira/scripts/lib/search.sh +41 -0
- package/plugins/jira/skills/jira/scripts/lib/sprint.sh +88 -0
- package/plugins/jira/skills/jira/scripts/lib/user.sh +45 -0
- package/plugins/jira/skills/jira/scripts/lib/worklog.sh +56 -0
- package/plugins/pr-babysit/.claude-plugin/plugin.json +25 -0
- package/plugins/pr-babysit/.codex-plugin/plugin.json +7 -0
- package/plugins/pr-babysit/README.md +38 -0
- package/plugins/pr-babysit/commands/babysit.md +13 -0
- package/plugins/pr-babysit/hooks/check-toolu.sh +20 -0
- package/plugins/pr-babysit/hooks/hooks.json +15 -0
- package/plugins/pr-babysit/scripts/babysit-tick.sh +133 -0
- package/plugins/pr-babysit/scripts/collect-pr.sh +224 -0
- package/plugins/pr-babysit/scripts/lib/common.sh +146 -0
- package/plugins/pr-babysit/scripts/lib/gh.sh +150 -0
- package/plugins/pr-babysit/scripts/lib/lock.sh +84 -0
- package/plugins/pr-babysit/scripts/lib/normalize.sh +98 -0
- package/plugins/pr-babysit/scripts/lib/state.sh +37 -0
- package/plugins/pr-babysit/scripts/parse-verdict.sh +171 -0
- package/plugins/pr-babysit/scripts/record.sh +69 -0
- package/plugins/pr-babysit/scripts/reduce-state.sh +245 -0
- package/plugins/pr-babysit/scripts/reply-thread.sh +90 -0
- package/plugins/pr-babysit/scripts/resolve-thread.sh +71 -0
- package/plugins/pr-babysit/skills/babysit/SKILL.md +31 -0
- package/plugins/pr-babysit/skills/babysit/references/helper.md +209 -0
- package/plugins/pr-babysit/workflows/babysit.md +722 -0
- package/plugins/python-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/python-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/python-quality/README.md +23 -0
- package/plugins/python-quality/hooks/check-toolu.sh +20 -0
- package/plugins/python-quality/hooks/concerns/00-preamble.sh +85 -0
- package/plugins/python-quality/hooks/concerns/10-size-file.sh +6 -0
- package/plugins/python-quality/hooks/concerns/20-tests.sh +37 -0
- package/plugins/python-quality/hooks/concerns/30-suppression.sh +33 -0
- package/plugins/python-quality/hooks/concerns/50-size-fn.sh +49 -0
- package/plugins/python-quality/hooks/concerns/70-no-mocks.sh +76 -0
- package/plugins/python-quality/hooks/concerns/90-docs.sh +52 -0
- package/plugins/python-quality/hooks/concerns/99-finalize.sh +36 -0
- package/plugins/python-quality/hooks/hooks.json +19 -0
- package/plugins/python-quality/hooks/register.sh +65 -0
- package/plugins/rust-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/rust-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/rust-quality/README.md +24 -0
- package/plugins/rust-quality/hooks/check-toolu.sh +20 -0
- package/plugins/rust-quality/hooks/concerns/00-preamble.sh +93 -0
- package/plugins/rust-quality/hooks/concerns/10-size-file.sh +10 -0
- package/plugins/rust-quality/hooks/concerns/20-tests.sh +84 -0
- package/plugins/rust-quality/hooks/concerns/30-suppression.sh +26 -0
- package/plugins/rust-quality/hooks/concerns/40-unsafe.sh +39 -0
- package/plugins/rust-quality/hooks/concerns/50-size-fn.sh +38 -0
- package/plugins/rust-quality/hooks/concerns/55-size-impl.sh +28 -0
- package/plugins/rust-quality/hooks/concerns/60-error-handling.sh +149 -0
- package/plugins/rust-quality/hooks/concerns/70-no-mocks.sh +139 -0
- package/plugins/rust-quality/hooks/concerns/90-docs.sh +32 -0
- package/plugins/rust-quality/hooks/concerns/99-finalize.sh +36 -0
- package/plugins/rust-quality/hooks/hooks.json +19 -0
- package/plugins/rust-quality/hooks/register.sh +65 -0
- package/plugins/statusline/.claude-plugin/plugin.json +19 -0
- package/plugins/statusline/.codex-plugin/plugin.json +7 -0
- package/plugins/statusline/README.md +108 -0
- package/plugins/statusline/commands/setup.md +30 -0
- package/plugins/statusline/hooks/hooks.json +15 -0
- package/plugins/statusline/hooks/session-start.sh +45 -0
- package/plugins/statusline/scripts/collect-status.sh +147 -0
- package/plugins/statusline/scripts/setup.sh +93 -0
- package/plugins/statusline/scripts/status.sh +55 -0
- package/plugins/statusline/skills/status/SKILL.md +13 -0
- package/plugins/statusline/statusline.sh +177 -0
- package/plugins/toolu/.claude-plugin/plugin.json +19 -0
- package/plugins/toolu/.codex-plugin/plugin.json +7 -0
- package/plugins/toolu/README.md +35 -0
- package/plugins/toolu/agents/.gitkeep +0 -0
- package/plugins/toolu/agents/architect.md +52 -0
- package/plugins/toolu/agents/deep-explore.md +65 -0
- package/plugins/toolu/agents/implementer.md +50 -0
- package/plugins/toolu/agents/quick-task.md +54 -0
- package/plugins/toolu/agents/research-agent.md +107 -0
- package/plugins/toolu/assets/agents/architect.toml +9 -0
- package/plugins/toolu/assets/agents/deep-explore.toml +9 -0
- package/plugins/toolu/assets/agents/implementer.toml +9 -0
- package/plugins/toolu/assets/agents/quick-task.toml +9 -0
- package/plugins/toolu/assets/agents/research-agent.toml +9 -0
- package/plugins/toolu/commands/.gitkeep +0 -0
- package/plugins/toolu/commands/commit.md +5 -0
- package/plugins/toolu/commands/review-and-commit.md +5 -0
- package/plugins/toolu/hooks/docs/gates.md +157 -0
- package/plugins/toolu/hooks/docs/model-routing.md +14 -0
- package/plugins/toolu/hooks/docs/post-compaction.md +3 -0
- package/plugins/toolu/hooks/docs/push-review.md +123 -0
- package/plugins/toolu/hooks/docs/session-start-python.md +3 -0
- package/plugins/toolu/hooks/docs/session-start-rust.md +4 -0
- package/plugins/toolu/hooks/docs/session-start-ts.md +3 -0
- package/plugins/toolu/hooks/docs/session-start.md +16 -0
- package/plugins/toolu/hooks/hooks.json +76 -0
- package/plugins/toolu/hooks/lib/config.sh +355 -0
- package/plugins/toolu/hooks/lib/detect.sh +929 -0
- package/plugins/toolu/hooks/lib/diff-sha.sh +32 -0
- package/plugins/toolu/hooks/lib/dispatch.sh +365 -0
- package/plugins/toolu/hooks/lib/docs-sync-config.sh +81 -0
- package/plugins/toolu/hooks/lib/edit-records.sh +157 -0
- package/plugins/toolu/hooks/lib/gate-file.sh +201 -0
- package/plugins/toolu/hooks/lib/gate-mode.sh +244 -0
- package/plugins/toolu/hooks/lib/host.sh +205 -0
- package/plugins/toolu/hooks/lib/permissions.sh +125 -0
- package/plugins/toolu/hooks/lib/plan-ledger-parse.sh +219 -0
- package/plugins/toolu/hooks/lib/plan-ledger-preflight.sh +137 -0
- package/plugins/toolu/hooks/lib/plan-ledger.sh +749 -0
- package/plugins/toolu/hooks/lib/push-waiver.sh +116 -0
- package/plugins/toolu/hooks/lib/quality-config.sh +184 -0
- package/plugins/toolu/hooks/lib/registry.sh +72 -0
- package/plugins/toolu/hooks/lib/state-sweeper.sh +194 -0
- package/plugins/toolu/hooks/lib/telemetry.sh +94 -0
- package/plugins/toolu/hooks/lib/verdict.sh +477 -0
- package/plugins/toolu/hooks/post-tools/mod.sh +42 -0
- package/plugins/toolu/hooks/post-tools/modules/gate-status.sh +140 -0
- package/plugins/toolu/hooks/post-tools/modules/push-waiver.sh +97 -0
- package/plugins/toolu/hooks/pre-compact.sh +18 -0
- package/plugins/toolu/hooks/pre-tools/agent-tier.sh +111 -0
- package/plugins/toolu/hooks/pre-tools/mod.sh +37 -0
- package/plugins/toolu/hooks/pre-tools/modules/bash-commands.sh +187 -0
- package/plugins/toolu/hooks/pre-tools/modules/code-edit-rules.sh +78 -0
- package/plugins/toolu/hooks/pre-tools/modules/commit-gate.sh +70 -0
- package/plugins/toolu/hooks/pre-tools/modules/docs-sync.sh +137 -0
- package/plugins/toolu/hooks/pre-tools/modules/mcp-blocker.sh +151 -0
- package/plugins/toolu/hooks/pre-tools/modules/plan-ledger.sh +201 -0
- package/plugins/toolu/hooks/pre-tools/modules/protected-files.sh +177 -0
- package/plugins/toolu/hooks/pre-tools/modules/push-review.sh +273 -0
- package/plugins/toolu/hooks/pre-tools/modules/quality-gate.sh +87 -0
- package/plugins/toolu/hooks/session-start.sh +379 -0
- package/plugins/toolu/hooks/user-prompt-submit.sh +197 -0
- package/plugins/toolu/scripts/context-budget.sh +111 -0
- package/plugins/toolu/scripts/debug-log.sh +98 -0
- package/plugins/toolu/scripts/debug-stack.sh +108 -0
- package/plugins/toolu/scripts/debug-testfail.sh +97 -0
- package/plugins/toolu/settings/.gitkeep +0 -0
- package/plugins/toolu/settings/README.md +127 -0
- package/plugins/toolu/settings/bash-allowlist.txt +12 -0
- package/plugins/toolu/settings/bash-denylist.txt +25 -0
- package/plugins/toolu/settings/code-edit-rules.json +67 -0
- package/plugins/toolu/settings/commit-prefixes.txt +12 -0
- package/plugins/toolu/settings/mcp-blocklist.txt +8 -0
- package/plugins/toolu/settings/permissions.fragment.json +36 -0
- package/plugins/toolu/settings/protected-files.txt +30 -0
- package/plugins/toolu/settings/rust-unsafe-exemptions.txt +5 -0
- package/plugins/toolu/settings/toolu.config.example.json +130 -0
- package/plugins/toolu/skills/.gitkeep +0 -0
- package/plugins/toolu/skills/brainstorm/SKILL.md +57 -0
- package/plugins/toolu/skills/brainstorm/references/design-questions.md +36 -0
- package/plugins/toolu/skills/commit/SKILL.md +11 -0
- package/plugins/toolu/skills/debug/SKILL.md +54 -0
- package/plugins/toolu/skills/debug/evals/README.md +17 -0
- package/plugins/toolu/skills/debug/evals/cases.json +24 -0
- package/plugins/toolu/skills/debug/evals/results.json +34 -0
- package/plugins/toolu/skills/deep-research/SKILL.md +51 -0
- package/plugins/toolu/skills/execution/SKILL.md +77 -0
- package/plugins/toolu/skills/orchestrator/SKILL.md +145 -0
- package/plugins/toolu/skills/orchestrator/references/delegation-cost.md +104 -0
- package/plugins/toolu/skills/orchestrator/references/model-routing.md +112 -0
- package/plugins/toolu/skills/plan/SKILL.md +56 -0
- package/plugins/toolu/skills/plan/references/ledger.md +18 -0
- package/plugins/toolu/skills/plan-review/SKILL.md +48 -0
- package/plugins/toolu/skills/review-and-commit/SKILL.md +10 -0
- package/plugins/toolu/skills/setup/SKILL.md +24 -0
- package/plugins/toolu/skills/setup/scripts/setup.sh +206 -0
- package/plugins/toolu/skills/spec/SKILL.md +67 -0
- package/plugins/toolu/skills/spec-review/SKILL.md +50 -0
- package/plugins/toolu/skills/test/SKILL.md +49 -0
- package/plugins/toolu/workflows/commit.md +21 -0
- package/plugins/toolu/workflows/host-mapping.md +22 -0
- package/plugins/toolu/workflows/review-and-commit.md +54 -0
- package/plugins/toolu/workflows/semantic-judgments.md +35 -0
- package/plugins/toolu-review/.claude-plugin/plugin.json +18 -0
- package/plugins/toolu-review/.codex-plugin/plugin.json +7 -0
- package/plugins/toolu-review/README.md +17 -0
- package/plugins/toolu-review/hooks/hooks.json +15 -0
- package/plugins/toolu-review/hooks/session-start.sh +34 -0
- package/plugins/toolu-review/skills/review/SKILL.md +90 -0
- package/plugins/toolu-review/skills/review/scripts/write-state.sh +189 -0
- package/plugins/ts-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/ts-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/ts-quality/README.md +24 -0
- package/plugins/ts-quality/hooks/check-toolu.sh +20 -0
- package/plugins/ts-quality/hooks/concerns/00-preamble.sh +123 -0
- package/plugins/ts-quality/hooks/concerns/10-imports.sh +33 -0
- package/plugins/ts-quality/hooks/concerns/15-type-as.sh +9 -0
- package/plugins/ts-quality/hooks/concerns/20-tests.sh +26 -0
- package/plugins/ts-quality/hooks/concerns/25-size-file.sh +40 -0
- package/plugins/ts-quality/hooks/concerns/30-size-fn.sh +53 -0
- package/plugins/ts-quality/hooks/concerns/35-react-hooks.sh +7 -0
- package/plugins/ts-quality/hooks/concerns/40-factory.sh +5 -0
- package/plugins/ts-quality/hooks/concerns/45-typeguard.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/50-type-dup.sh +16 -0
- package/plugins/ts-quality/hooks/concerns/55-naming.sh +11 -0
- package/plugins/ts-quality/hooks/concerns/60-console.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/65-suppression.sh +12 -0
- package/plugins/ts-quality/hooks/concerns/70-ui-confirm.sh +8 -0
- package/plugins/ts-quality/hooks/concerns/72-ui-radix.sh +12 -0
- package/plugins/ts-quality/hooks/concerns/74-react-props.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/76-toast.sh +10 -0
- package/plugins/ts-quality/hooks/concerns/78-error-ast.sh +242 -0
- package/plugins/ts-quality/hooks/concerns/80-throw-literal.sh +23 -0
- package/plugins/ts-quality/hooks/concerns/85-no-mocks.sh +109 -0
- package/plugins/ts-quality/hooks/concerns/90-duplication.sh +30 -0
- package/plugins/ts-quality/hooks/concerns/92-docs.sh +36 -0
- package/plugins/ts-quality/hooks/concerns/94-handler.sh +15 -0
- package/plugins/ts-quality/hooks/concerns/99-finalize.sh +46 -0
- package/plugins/ts-quality/hooks/hooks.json +19 -0
- package/plugins/ts-quality/hooks/register.sh +65 -0
- package/src/adapter/__tests__/evaluate.test.ts +82 -0
- package/src/adapter/__tests__/permission-map.test.ts +91 -0
- package/src/adapter/evaluate.ts +54 -0
- package/src/adapter/permission-map.ts +177 -0
- package/src/bootstrap/__tests__/bootstrap.test.ts +148 -0
- package/src/bootstrap/entrypoint.ts +18 -0
- package/src/bootstrap/index.ts +5 -0
- package/src/bootstrap/readiness.ts +59 -0
- package/src/bootstrap/result.ts +21 -0
- package/src/bootstrap/runtime.ts +99 -0
- package/src/bootstrap/test-helpers.ts +25 -0
- package/src/host/__tests__/host.test.ts +37 -0
- package/src/host/detect.ts +46 -0
- package/src/host/index.ts +10 -0
- package/src/host/roots.ts +59 -0
- package/src/host/types.ts +14 -0
- package/src/inventory/__tests__/inventory.test.ts +69 -0
- package/src/inventory/index.ts +9 -0
- package/src/inventory/manifest.ts +46 -0
- package/src/inventory/scan.ts +66 -0
- package/src/inventory/selection.ts +92 -0
- package/src/inventory/types.ts +22 -0
- package/src/lifecycle/__tests__/lifecycle.test.ts +7 -0
- package/src/lifecycle/index.ts +2 -0
- package/src/lifecycle/table.ts +42 -0
- package/src/plugin/__tests__/plugin-stub.test.ts +6 -0
- package/src/plugin/plugin-stub.ts +7 -0
- package/src/plugin/toolu.ts +142 -0
- package/src/preflight/__tests__/preflight.test.ts +20 -0
- package/src/preflight/check.ts +75 -0
- package/src/preflight/index.ts +2 -0
- package/src/select/__tests__/select.test.ts +52 -0
- package/src/select/index.ts +2 -0
- package/src/select/resolve.ts +87 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when the ask is deep research that must end in a multi-source cited report — tells: \"deep research\", \"research report\", \"cited report\", \"survey the state of the art\", \"investigate thoroughly\". Picks guiding questions, then fans out per-question researchers combining exa-search and context7. NOT for quick single-fact or API lookups — the research-agent subagent handles those internally — and NOT for local codebase questions (the deep-explore subagent). Standalone knowledge workflow — not part of the build chain."
|
|
3
|
+
name: toolu--deep-research
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deep Research
|
|
7
|
+
|
|
8
|
+
A standalone knowledge workflow — outside the build chain; its reports can feed `brainstorm` or `spec`. It exists because the expensive failure in research is not weak sources — it is aiming a whole fan-out at a misunderstood question. So the target is written down first, then the pipeline spends tokens. Do not wait for approval.
|
|
9
|
+
|
|
10
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) to rank
|
|
11
|
+
retrieved excerpts, detect no answer, and judge claim/source support. Verify quotes and provenance with tools.
|
|
12
|
+
|
|
13
|
+
## When this fires
|
|
14
|
+
|
|
15
|
+
The user wants a real research deliverable: multi-source, verified, cited. Not a quick fact or API lookup — that stays with `research-agent` — and not a question about this codebase — that is `deep-explore`'s job. Every run is multi-agent by design; if the fan-out isn't warranted, the ask wasn't deep research.
|
|
16
|
+
|
|
17
|
+
## How to run it
|
|
18
|
+
|
|
19
|
+
Four phases, driven from the main thread. Workers run on sonnet, synthesis stays on the frontier tier — rubric: `plugins/toolu/skills/orchestrator/references/model-routing.md`.
|
|
20
|
+
|
|
21
|
+
1. **Target (main thread).** Restate the topic in one sentence. Decompose it into guiding questions with sub-questions — 5 is the typical fan-out, 7 the hard cap (the orchestrator skill's parallel-agent guardrail is the reason). Name the assumptions and what is out of scope. Print the numbered question set, then run it immediately without waiting for approval. Do not open the host mapping's user-choice interface ([host-mapping.md](../../workflows/host-mapping.md)).
|
|
22
|
+
2. **Research fan-out.** One `research-agent` (sonnet) per question, launched in parallel. Each researcher combines both engines per its routing table — `context7` for library/API/docs-shaped questions, `exa-search` for general web, topics, and URL crawls — with native fallback inherited. Override the agent's default depth per call: ask for a 10–15 sentence synthesis, up to 8 sources, and `Claim → source URL` pairs for the 2–3 load-bearing claims.
|
|
23
|
+
3. **Verification wave.** One `research-agent` (sonnet) per finding set, prompted as an adversarial verifier: re-crawl up to 2 cited URLs per load-bearing claim (exa-search, native fallback) and return a per-claim verdict — confirmed / unsupported / source-unreachable. Unsupported claims are dropped or flagged in the report — never silently kept. If every researcher answered from training knowledge only (`Tools used: none`), skip the wave — nothing is crawlable — and banner the report "unverified — no live sources".
|
|
24
|
+
4. **Synthesis + delivery (main thread).** Merge the verified findings into the report format below, write it under `docs/research/`, and give the user a TLDR in chat.
|
|
25
|
+
|
|
26
|
+
**Failure semantics** — nothing fails silently: a researcher or verifier that returns nothing, errors, or is killed renders its section as `⚠ no findings returned` and is named as degraded in Reliability notes — never silently dropped, no automatic retry. Worst-case fan-out: 7 researchers + 7 verifiers = 14 subagents; typical ~10.
|
|
27
|
+
|
|
28
|
+
## Report format
|
|
29
|
+
|
|
30
|
+
Destination `docs/research/<slug>.md` — kebab-case slug from the topic. Create the directory if absent. On collision append a numeric suffix (`<slug>-2.md`); never overwrite an existing report unless the user explicitly asks.
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
# <Topic>: Research Report
|
|
34
|
+
|
|
35
|
+
> Date: <YYYY-MM-DD> · Questions: <n> · Scope: <one line>
|
|
36
|
+
|
|
37
|
+
## TL;DR
|
|
38
|
+
<the answer in ≤5 bullets>
|
|
39
|
+
|
|
40
|
+
## <Guiding question 1>
|
|
41
|
+
<verified synthesis; flagged claims marked ⚠ unverified>
|
|
42
|
+
|
|
43
|
+
## Sources
|
|
44
|
+
- <title> — <url>
|
|
45
|
+
|
|
46
|
+
> Reliability notes: <per-claim verdicts; degraded workers; the unverified banner if no live sources were reachable>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## What "done" looks like
|
|
50
|
+
|
|
51
|
+
A report at `docs/research/<slug>.md` with a TL;DR, one section per guiding question, real source URLs, and Reliability notes carrying the verification verdicts — plus the TLDR in chat. If targeting produced zero questions, "done" is: nothing ran and nothing was written.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use when you have a reviewed plan to implement and, when delivery is authorized, carry verified changes through a PR handoff. Drives the plan step by step with evidence checkpoints and respects the quality gate. Native toolu workflow: spec → spec-review → plan → plan-review → execution → pr-babysit.
|
|
3
|
+
name: toolu--execution
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Execution
|
|
7
|
+
|
|
8
|
+
The execution phase comes after `plan-review`. It carries out a reviewed plan with discipline: small steps, evidence before claims, and no skipped gate. `brainstorm` is optional upstream triage when the shape is not settled; `test` is the execution-time method for producing high-signal evidence, not a final workflow phase.
|
|
9
|
+
|
|
10
|
+
**Trigger phrases:** execute the plan, implement this, start building, work through the plan.
|
|
11
|
+
|
|
12
|
+
## Precondition
|
|
13
|
+
|
|
14
|
+
A reviewed plan exists (`plan` + `plan-review` ran for non-trivial work). If there's no plan, write one first; if the plan hasn't been pressure-tested, run `plan-review` before sinking time into code built on a shaky plan.
|
|
15
|
+
|
|
16
|
+
## Loop (per step)
|
|
17
|
+
|
|
18
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) to triage
|
|
19
|
+
evidence, including local review. Correctness requires the checks below.
|
|
20
|
+
|
|
21
|
+
For ledger-tracked work, **before the first step** run `bash plugins/toolu/hooks/lib/plan-ledger.sh preflight` — it refuses to start unless the plan is `Approved` and its declared spec (if any) is `Approved`. Then read progress with `bash plugins/toolu/hooks/lib/plan-ledger.sh status` to find the next non-fresh-green step, do the loop below for it, then record it with `bash plugins/toolu/hooks/lib/plan-ledger.sh run <plan_doc> --step <id>` — the engine requires the plan-doc positional arg, and stamps green from mechanical truth, you cannot claim it. On plan deviation, edit the steps block and note it under `## Deviations`, then re-run. Re-run any stale step (a `green` step whose diff has since changed) before calling the plan done. `status` also prints an AC-coverage report (report-only): read it to confirm every spec `AC-<n>` is covered by a fresh-green step — an uncovered AC is surfaced, not yet a push blocker, but it means the goal isn't proven done.
|
|
22
|
+
|
|
23
|
+
1. **Take one step** from the plan — the smallest shippable unit.
|
|
24
|
+
2. **Produce per-step real-data evidence** (use `test`) — map the relevant AC or risk to a representative real input/fixture, observable result, applicable boundary/failure case, and runner command. For a bugfix, reproduce first; record the passing output before the ledger step is stamped green.
|
|
25
|
+
3. **Handle errors in code, never suppress them.** Every fallible call gets a real handler — propagate (`?`, rethrow), match, or convert; never swallow, never silence with a disable comment (`@ts-ignore`, `eslint-disable`, `#[allow]`). The gate enforces this on every edit; write it right the first time.
|
|
26
|
+
4. **Land it clean.** A PostToolUse quality gate runs on every TS/Rust edit. If it reports a violation the gate goes **failing** and blocks further edits until fixed — fix immediately; do not pile on more changes.
|
|
27
|
+
5. **Verify, don't assume.** Run the command, read the output. "Done" requires evidence (test pass, log, runtime check), never a guess.
|
|
28
|
+
6. **Checkpoint** with the user at meaningful boundaries, or after each independent workstream.
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
- **Global gate** — do NOT move to the next step while any error/warning/test failure stands, even in unrelated files.
|
|
33
|
+
- **Delegate to stay compact** — push exploration, large reads, and parallelizable work to subagents; keep the main context lean.
|
|
34
|
+
- **Delegate at the step's tier** — `status` prints `model=<alias>` for the next step when the plan declared one; hand that step to a subagent on that model (`toolu:quick-task` / `toolu:implementer` / `toolu:architect`, or an explicit `model:`). No declared tier, or a step that turns out harder than planned? Fall back to the rubric and escalate one tier rather than retrying the same tier: `plugins/toolu/skills/orchestrator/references/model-routing.md`.
|
|
35
|
+
- **No scope creep** — do only what the plan calls for. New needs go back to `plan` (and `plan-review`), not into this step.
|
|
36
|
+
- **Honor the layout** — files named after their export, one responsibility each, under the line limit, docs present and concise.
|
|
37
|
+
- **Docs in sync** — when a step changes a user-facing surface (behavior, interfaces, CLI flags, commands, config), update the prose docs that describe it (README, `docs/` guides, `SKILL.md` triggers, release notes) in the same step; it's part of "done", not a follow-up.
|
|
38
|
+
- **Same approach failed twice? Stop.** Change the hypothesis (`systematic-debugging`), don't retry harder.
|
|
39
|
+
|
|
40
|
+
## What "done" looks like
|
|
41
|
+
|
|
42
|
+
Working, verified increments that match the plan, with real error handling and per-step real-data evidence, landed under a green gate. Execution owns the final local review; do not hand work to a separate review or terminal-test phase.
|
|
43
|
+
|
|
44
|
+
## Authorized delivery preflight
|
|
45
|
+
|
|
46
|
+
Only perform delivery when the user's request includes delivery authorization.
|
|
47
|
+
Before committing, pushing, creating a PR, or starting a durable babysitting
|
|
48
|
+
goal, check every prerequisite and stop before delivery with the exact unmet
|
|
49
|
+
prerequisite if any applies:
|
|
50
|
+
|
|
51
|
+
- delivery authorization is absent;
|
|
52
|
+
- GitHub auth is unavailable (`gh auth status` fails);
|
|
53
|
+
- the current branch is the repository default branch, detached, or otherwise not a non-default branch;
|
|
54
|
+
- the optional `pr-babysit` plugin is not installed and its `$pr-babysit:babysit` skill is unavailable.
|
|
55
|
+
|
|
56
|
+
When the per-step direct checks, documentation work, and prerequisites pass,
|
|
57
|
+
commit the scoped changes using the repository's conventions. Do not include
|
|
58
|
+
unrelated work.
|
|
59
|
+
|
|
60
|
+
## Local release-readiness audit
|
|
61
|
+
|
|
62
|
+
After that scoped commit and before pushing, establish all of the following
|
|
63
|
+
against the committed branch diff with command output, not assertion:
|
|
64
|
+
|
|
65
|
+
1. Re-run each affected step's real-data runner and ensure its AC/risk evidence is current. Read `plan-ledger.sh status` and resolve every missing or stale AC coverage entry.
|
|
66
|
+
2. Run `bash plugins/toolu/hooks/lib/plan-ledger.sh run <plan_doc> --verify`. This is the supported branch-wide verification command: it validates every step against the final diff and stamps the ledger only when all steps are fresh-green.
|
|
67
|
+
3. Confirm user-facing documentation is synchronized for every changed behavior, interface, CLI, command, or configuration surface. Treat a missing applicable doc update as a blocker.
|
|
68
|
+
4. Run `$toolu-review:review` (or the host's installed `toolu-review:review` invocation) against the committed branch diff. Its resulting push-review state must be v2 (`version: 2`) and cover every changed file; open findings or stale/incomplete coverage are blockers.
|
|
69
|
+
5. Run `bash plugins/toolu/hooks/lib/verdict.sh status`. Advance only when it reports `overall: green`; quality, plan, review, and docs must each be green.
|
|
70
|
+
|
|
71
|
+
## PR delivery
|
|
72
|
+
|
|
73
|
+
When the committed-diff audit and every prerequisite pass:
|
|
74
|
+
|
|
75
|
+
1. Push the non-default feature branch to its configured remote.
|
|
76
|
+
2. Discover the repository default branch, then locate or create a pull request for the current branch targeting that repository default branch. Verify that PR's number and head/base branches.
|
|
77
|
+
3. Invoke `$pr-babysit:babysit` with no arguments. The verified execution handoff plus this delivery authorization is sufficient authorization for its durable PR-clearing goal; do not add a handoff argument or weaken its isolated-worktree, strict-clearance, or durable-goal rules.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when deciding HOW to run a large task: whether to delegate it at all, and if so how to split it. Teaches the MAIN thread that inline is the default and a subagent must earn its round trip — plus which agent for which job, how to bound a delegation so it cannot hang, how to parallelize genuinely independent work, and which model tier fits each class. Read it before fanning anything out, especially when tempted to split work that one thread could just do. Tells: \"orchestrate this\", \"delegate this\", \"break this down\", \"coordinate subagents\", \"should I use subagents\", \"this is a big task\", or a UserPromptSubmit nudge flagged the prompt as large."
|
|
3
|
+
name: toolu--orchestrator
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Orchestrator
|
|
7
|
+
|
|
8
|
+
The main thread owns orchestration — and most of the time, orchestration means
|
|
9
|
+
doing the work. A subagent is a tool with a price: a spawn, a prompt you have to
|
|
10
|
+
write, a round trip, and a summary you then have to trust. Delegation is worth it
|
|
11
|
+
when that price buys something (isolation of a large read, real parallelism); it
|
|
12
|
+
is a loss when it does not.
|
|
13
|
+
|
|
14
|
+
The failure this skill exists to prevent is not under-delegation. It is a simple
|
|
15
|
+
task fanned out to five agents, each waiting on the last, taking ten minutes to
|
|
16
|
+
do three minutes of work.
|
|
17
|
+
|
|
18
|
+
Subagents do bounded work and return concise results; they do not recursively
|
|
19
|
+
delegate unless the task explicitly requires a nested workflow. Use [the host
|
|
20
|
+
mapping](../../workflows/host-mapping.md) for the active delegation, user-input,
|
|
21
|
+
and thread-control interfaces.
|
|
22
|
+
|
|
23
|
+
**Trigger phrases:** orchestrate this, delegate this, break this down, coordinate subagents, fan this out, this is a big/multi-step task.
|
|
24
|
+
|
|
25
|
+
## Does this need delegating at all?
|
|
26
|
+
|
|
27
|
+
Ask before decomposing anything. Delegation pays only when **at least one** of
|
|
28
|
+
these is true:
|
|
29
|
+
|
|
30
|
+
1. **The output is large and you need only the conclusion.** Reading thirty files
|
|
31
|
+
to answer one question — the bytes stay in the subagent, the answer comes back.
|
|
32
|
+
2. **Two or more units are genuinely independent** and can run at the same time.
|
|
33
|
+
Genuinely: neither needs the other's result.
|
|
34
|
+
|
|
35
|
+
…**and** the work is bigger than a handful of tool calls. Below that, the round
|
|
36
|
+
trip costs more than doing it.
|
|
37
|
+
|
|
38
|
+
If neither holds, do it inline. That is not a failure of orchestration; it is
|
|
39
|
+
orchestration. Worked examples, including the cases where delegation loses:
|
|
40
|
+
[delegation cost](references/delegation-cost.md).
|
|
41
|
+
|
|
42
|
+
Two shapes that look like orchestration and are not:
|
|
43
|
+
|
|
44
|
+
- **A dependent chain.** A → wait → B → wait → C, where each needs the last, is
|
|
45
|
+
strictly slower than doing A, B, C inline: you pay every round trip and gain no
|
|
46
|
+
parallelism. Chain inline; delegate the branches.
|
|
47
|
+
- **Splitting to look thorough.** Three agents on one small file is not coverage,
|
|
48
|
+
it is three summaries of the same thing.
|
|
49
|
+
|
|
50
|
+
## The core loop
|
|
51
|
+
|
|
52
|
+
1. **Do the cheap discovery yourself.** List the files, find the entry point, read
|
|
53
|
+
the file you already know. Never delegate a single-fact lookup.
|
|
54
|
+
2. **Decide whether delegation pays** by the test above. Often it does not — go
|
|
55
|
+
do the work.
|
|
56
|
+
3. **If it pays, decompose into independent units.** Independent units run in
|
|
57
|
+
parallel; dependent ones you do inline.
|
|
58
|
+
4. **Delegate with a contract.** One answerable question per agent, a tight
|
|
59
|
+
prompt, and an explicit return shape ("a file:line table", "the verdict + why",
|
|
60
|
+
"a 5-line summary").
|
|
61
|
+
5. **Synthesize.** The main thread holds the conclusions and makes the decisions.
|
|
62
|
+
|
|
63
|
+
## Delegate vs do inline
|
|
64
|
+
|
|
65
|
+
Inline is the default, so the right-hand column is where most work belongs.
|
|
66
|
+
|
|
67
|
+
| Do inline (main thread) | Delegate to a subagent |
|
|
68
|
+
|---|---|
|
|
69
|
+
| A read of a file you already know | Broad/fan-out search across many files or naming conventions |
|
|
70
|
+
| A single-fact grep where you know the symbol | Reading many files to answer one question |
|
|
71
|
+
| An edit you can make in a few tool calls, however many files | Independent work that can genuinely run in parallel |
|
|
72
|
+
| A dependent chain of steps — each needs the last | Review / audit of a whole diff or subsystem |
|
|
73
|
+
| The final synthesis and every decision | Anything returning a lot of bytes you need only the conclusion of |
|
|
74
|
+
| Anything where the round trip costs more than the work | A long-running sweep you want isolated from main context |
|
|
75
|
+
|
|
76
|
+
Rule of thumb: if the answer means reading across several files and you only need the conclusion, **delegate it and keep the conclusion, not the file dumps.** Once delegated, don't also run it yourself in parallel — that pays for the work twice.
|
|
77
|
+
|
|
78
|
+
## When an agent goes quiet
|
|
79
|
+
|
|
80
|
+
Waiting is not a strategy. Every delegation is bounded before it starts, and
|
|
81
|
+
unbounded waiting is a bug:
|
|
82
|
+
|
|
83
|
+
- **Scope it to one answerable question.** "Find every call site of X" comes back.
|
|
84
|
+
"Improve the module" does not.
|
|
85
|
+
- **State the return contract in the prompt.** An agent that knows it owes a
|
|
86
|
+
file:line table finishes; one asked to "look into it" wanders.
|
|
87
|
+
- **If it does not come back, check once. Then take the work back inline and say
|
|
88
|
+
so.** Report what you did instead — a silent takeover looks like the agent
|
|
89
|
+
succeeded.
|
|
90
|
+
- **Never block indefinitely.** A subagent that has gone quiet has already cost
|
|
91
|
+
more than the work; sitting on it converts a slow task into a stuck one.
|
|
92
|
+
|
|
93
|
+
An agent that returns something unusable is the same case: use it or redo the
|
|
94
|
+
work inline, but do not re-spawn the same prompt hoping for a better roll.
|
|
95
|
+
|
|
96
|
+
## Which agent for which job
|
|
97
|
+
|
|
98
|
+
Prefer a **tier-pinned** agent when one fits — its frontmatter fixes the model, so routing can't be forgotten:
|
|
99
|
+
|
|
100
|
+
- **`toolu:quick-task` / Codex `quick-task`** — mechanical lookups and listings.
|
|
101
|
+
- **`toolu:deep-explore` / Codex `deep-explore`** — structural exploration.
|
|
102
|
+
- **`toolu:research-agent` / Codex `research-agent`** — external research.
|
|
103
|
+
- **`toolu:implementer` / Codex `implementer`** — one bounded plan step and tests.
|
|
104
|
+
- **`toolu:architect` / Codex `architect`** — design and synthesis, read-only.
|
|
105
|
+
- **`Explore`** — broad read-only fan-out search when you need the conclusion, not file dumps.
|
|
106
|
+
- **`Plan`** — design an implementation strategy for a non-trivial change.
|
|
107
|
+
- **`general-purpose`** — multi-step research/execution that doesn't fit a specific agent; set `model:` yourself.
|
|
108
|
+
|
|
109
|
+
Carry the session mandates into every subagent prompt (comemory recall/save, ast-grep first). Delegation never exempts the work.
|
|
110
|
+
|
|
111
|
+
## Parallelize independent work
|
|
112
|
+
|
|
113
|
+
Launch independent subagents in **one message with multiple tool calls** so they run concurrently — not one-at-a-time. Dependent steps wait; independent steps don't. A four-way independent search done serially wastes three-quarters of the wall-clock.
|
|
114
|
+
|
|
115
|
+
## Keep main context lean
|
|
116
|
+
|
|
117
|
+
The expensive, recurring cost in a long session is **input tokens re-sent every turn**. Two rules follow:
|
|
118
|
+
|
|
119
|
+
- **Return conclusions, not bytes.** A subagent may read 50k tokens but should return a 1–2k-token distilled answer. The detailed context stays isolated in the subagent and never re-enters — or re-caches into — the main thread.
|
|
120
|
+
- **Prefer compact return formats** (tables, file:line lists) over prose dumps.
|
|
121
|
+
|
|
122
|
+
## Model tiers
|
|
123
|
+
|
|
124
|
+
Route on the **class of work**, not phrasing. Select the matching preconfigured
|
|
125
|
+
agent or pass the active host's explicit model and reasoning settings. Omitting
|
|
126
|
+
routing inherits host defaults, which may be inappropriate for the task.
|
|
127
|
+
|
|
128
|
+
| Class | Claude default | Codex default | Belongs here |
|
|
129
|
+
|---|---|---|---|
|
|
130
|
+
| mechanical | `haiku` | Luna / medium | lookups, listings, formatting, one command |
|
|
131
|
+
| exploration | `sonnet` | Terra / medium | read-only search across many files |
|
|
132
|
+
| implementation | `sonnet` | Terra / medium | a bounded decided edit + tests |
|
|
133
|
+
| review | `sonnet` | Terra / high | diff review, audits |
|
|
134
|
+
| synthesis | `opus` | Sol / high | reconciling findings |
|
|
135
|
+
| architecture | `opus` | Sol / high | design and hard-to-reverse calls |
|
|
136
|
+
|
|
137
|
+
Escalate one tier on any of: **hard to reverse**, **cross-cutting**, **the how isn't decided**, **must weigh alternatives**. De-escalate when the task is bounded and has one verifiable answer. Deciding and doing are different classes — one task often splits across two tiers.
|
|
138
|
+
|
|
139
|
+
A subagent that returns `ESCALATE: <reason>` should be re-run one tier up with that reason in the prompt; never re-run the same tier hoping for a better roll.
|
|
140
|
+
|
|
141
|
+
Full rubric (signals, worked examples, per-step plan tiers, config remap): `plugins/toolu/skills/orchestrator/references/model-routing.md`. Remap any class in `toolu.config.json` under `models`.
|
|
142
|
+
|
|
143
|
+
## Fan-out budget guardrail
|
|
144
|
+
|
|
145
|
+
Subagents multiply token spend (multi-agent runs can cost ~15× a single thread; unmanaged fan-out has produced four- and five-figure single-session bills). Before a large fan-out: cap the number of parallel agents to what the task needs, give each a tight scope, and prefer one well-scoped sweep over a runaway loop. If you bound coverage (top-N, sampling), say so — don't let "covered everything" hide a silent cap.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# What delegation costs
|
|
2
|
+
|
|
3
|
+
Delegation is usually presented as free — split the work, run it in parallel, win.
|
|
4
|
+
It is not free, and the cases where it loses are common enough that a default of
|
|
5
|
+
"delegate" makes ordinary tasks slower.
|
|
6
|
+
|
|
7
|
+
This is the arithmetic the [orchestrator skill](../SKILL.md) refers to.
|
|
8
|
+
|
|
9
|
+
## The price of one subagent
|
|
10
|
+
|
|
11
|
+
Every delegation pays, whether or not it earns it back:
|
|
12
|
+
|
|
13
|
+
| Cost | What it is |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Prompt authoring | You must write a self-contained brief. The subagent cannot see your conversation, so context you already hold has to be re-stated. |
|
|
16
|
+
| Spawn + round trip | Wall-clock before a single useful token, plus the return trip. |
|
|
17
|
+
| Summary risk | You get the agent's reading of what it found, not what it found. Anything it judged irrelevant is gone. |
|
|
18
|
+
| Verification | A returned claim you rely on has to be trusted or re-checked. Re-checking pays for the work twice. |
|
|
19
|
+
| Attention | You have to hold "what did I delegate, has it come back" while doing something else. |
|
|
20
|
+
|
|
21
|
+
A subagent buys two things and only two: **isolation** (a large read that never
|
|
22
|
+
enters your context) and **parallelism** (independent work at the same time). If a
|
|
23
|
+
delegation buys neither, it is pure cost.
|
|
24
|
+
|
|
25
|
+
## When it pays
|
|
26
|
+
|
|
27
|
+
**Isolation.** "Which of these 40 files register a hook?" — the agent reads
|
|
28
|
+
everything, you get a `file:line` table. The 40 files never enter your context and
|
|
29
|
+
never re-enter it on every later turn. This is the strongest case, and it gets
|
|
30
|
+
stronger the longer the session runs.
|
|
31
|
+
|
|
32
|
+
**Parallelism.** Four independent searches with no dependency between them, in one
|
|
33
|
+
message. Wall-clock is the slowest, not the sum. The word doing the work is
|
|
34
|
+
*independent*: if search two needs search one's answer, there is no parallelism to
|
|
35
|
+
win.
|
|
36
|
+
|
|
37
|
+
**Isolation of a long job.** A sweep that takes minutes and produces noise you do
|
|
38
|
+
not want interleaved with your work.
|
|
39
|
+
|
|
40
|
+
## When it loses
|
|
41
|
+
|
|
42
|
+
**The task is small.** Under roughly a handful of tool calls, the brief alone costs
|
|
43
|
+
more than the work. A single-file edit, a known-symbol grep, reading a file you
|
|
44
|
+
already know — do them.
|
|
45
|
+
|
|
46
|
+
**The chain is dependent.** A → B → C where each needs the last is *strictly*
|
|
47
|
+
worse delegated: every round trip is paid and no parallelism is gained. Chain
|
|
48
|
+
inline; delegate only branches.
|
|
49
|
+
|
|
50
|
+
**You will re-read the output anyway.** If you cannot act on the summary without
|
|
51
|
+
opening the files yourself, the isolation you paid for was never real.
|
|
52
|
+
|
|
53
|
+
**The work is the decision.** Trade-offs, architecture, "which of these is right" —
|
|
54
|
+
delegating produces a recommendation you must then evaluate, which is most of the
|
|
55
|
+
work. Get the *inputs* delegated; make the call yourself.
|
|
56
|
+
|
|
57
|
+
**You are splitting to look thorough.** Three agents on one small file produce
|
|
58
|
+
three summaries of the same thing. Coverage is a property of the search, not of
|
|
59
|
+
the agent count.
|
|
60
|
+
|
|
61
|
+
## A worked case
|
|
62
|
+
|
|
63
|
+
A session that built a cross-cutting feature end to end — a written spec, five new
|
|
64
|
+
shell libraries, seven module migrations, ~300 real-data tests, eight commits, a
|
|
65
|
+
pull request, three rounds of review response — ran entirely on one thread. Zero
|
|
66
|
+
subagents.
|
|
67
|
+
|
|
68
|
+
The bottleneck was never reasoning. It was the test suite: 131–165 seconds a run,
|
|
69
|
+
several runs. No amount of fan-out moves that number, because the suite is one
|
|
70
|
+
command. The delegable work — "read these files and tell me what is there" — was
|
|
71
|
+
a small fraction of the total, and the files were mostly ones the thread had
|
|
72
|
+
already read.
|
|
73
|
+
|
|
74
|
+
Fanning that same work across five agents would have added five briefs, five round
|
|
75
|
+
trips, and five summaries to verify, to save reading that had already happened.
|
|
76
|
+
The measurable win would have been zero and the wall-clock strictly worse.
|
|
77
|
+
|
|
78
|
+
The lesson is not "never delegate". It is that **the size of a task is not the
|
|
79
|
+
same as its delegability.** A big task made of dependent steps on files you
|
|
80
|
+
already understand is a big inline task.
|
|
81
|
+
|
|
82
|
+
## The test, restated
|
|
83
|
+
|
|
84
|
+
Before spawning anything:
|
|
85
|
+
|
|
86
|
+
1. Does this buy **isolation** (large output, conclusion only) or **parallelism**
|
|
87
|
+
(genuinely independent units)?
|
|
88
|
+
2. Is the work bigger than a handful of tool calls?
|
|
89
|
+
|
|
90
|
+
Both no → do it. One yes → probably delegate, with a bounded scope and a stated
|
|
91
|
+
return contract. Neither → you are about to make a fast task slow.
|
|
92
|
+
|
|
93
|
+
## Bounding what you do delegate
|
|
94
|
+
|
|
95
|
+
A delegation that cannot fail visibly will eventually hang:
|
|
96
|
+
|
|
97
|
+
- One answerable question per agent. "Find every call site of X" returns.
|
|
98
|
+
"Improve the module" does not.
|
|
99
|
+
- State the return shape in the prompt — a table, a verdict, a five-line summary.
|
|
100
|
+
- If it does not come back: check once, then do the work inline and say you did.
|
|
101
|
+
Never block indefinitely; an agent that went quiet has already cost more than
|
|
102
|
+
the work.
|
|
103
|
+
- Never re-spawn an identical prompt hoping for a better result. Change the tier
|
|
104
|
+
(see [model routing](model-routing.md)) or take it back.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Model routing
|
|
2
|
+
|
|
3
|
+
How to pick the model for a delegated task. The rule is: **route on the class of
|
|
4
|
+
work, not on how the request is phrased.** A one-line prompt can hide an
|
|
5
|
+
architecture decision; a long prompt can be a file listing.
|
|
6
|
+
|
|
7
|
+
Referenced by `orchestrator`, `brainstorm`, `plan`, and `execution`. The runtime
|
|
8
|
+
copy of the table is injected into every session by the toolu SessionStart hook
|
|
9
|
+
(`plugins/toolu/hooks/docs/model-routing.md`), so the tiers are in context from
|
|
10
|
+
turn one even when no skill has fired.
|
|
11
|
+
|
|
12
|
+
## The ladder
|
|
13
|
+
|
|
14
|
+
Claude tiers use stable aliases. Codex routes each class through the model and
|
|
15
|
+
reasoning-effort pair in `models.codex.<class>`.
|
|
16
|
+
|
|
17
|
+
| Class | Claude | Codex | What belongs here |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `mechanical` | `haiku` | Luna / medium | Exact lookups, formatting, one command. |
|
|
20
|
+
| `exploration` | `sonnet` | Terra / medium | Read-only subsystem mapping. |
|
|
21
|
+
| `implementation` | `sonnet` | Terra / medium | A bounded decided edit plus tests. |
|
|
22
|
+
| `review` | `sonnet` | Terra / high | Diff review and audits. |
|
|
23
|
+
| `synthesis` | `opus` | Sol / high | Reconciling several findings. |
|
|
24
|
+
| `architecture` | `opus` | Sol / high | Cross-cutting design and trade-offs. |
|
|
25
|
+
|
|
26
|
+
`inherit` is also a valid value — "whatever the lead thread runs". Use it when a
|
|
27
|
+
subagent must match the session's model exactly rather than a fixed tier.
|
|
28
|
+
|
|
29
|
+
## Classify by signal, not by vibe
|
|
30
|
+
|
|
31
|
+
Score the task on four signals. Any single **yes** in the escalate column pulls
|
|
32
|
+
the task up a tier; all-no in a bounded task pulls it down.
|
|
33
|
+
|
|
34
|
+
| Signal | Escalate | De-escalate |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| **Reversibility** | Hard to undo — schema, public interface, migration, deletion | Trivially revertable edit |
|
|
37
|
+
| **Blast radius** | Cross-cutting: many callers, several subsystems | One file, one function |
|
|
38
|
+
| **Ambiguity** | The *how* is not decided; requirements are implicit | Fully specified — what, where, and how to verify are all given |
|
|
39
|
+
| **Reasoning depth** | Must weigh alternatives or reconcile conflicting inputs | One correct answer, verifiable on sight |
|
|
40
|
+
|
|
41
|
+
Two worked examples:
|
|
42
|
+
|
|
43
|
+
- *"Find every call site of `pl_recompute`"* — reversible, no ambiguity, no
|
|
44
|
+
reasoning. Mechanical → `haiku`, even though the codebase is large.
|
|
45
|
+
- *"Add a `model` field to the ledger steps"* — touches a persisted contract
|
|
46
|
+
every reader parses. Hard to reverse, cross-cutting → `opus` decides the
|
|
47
|
+
shape, `sonnet` implements it once decided.
|
|
48
|
+
|
|
49
|
+
Note what the second example shows: **one task can split across tiers.** Deciding
|
|
50
|
+
and doing are different classes. Don't buy frontier reasoning to type out an
|
|
51
|
+
agreed edit, and don't hand an undecided design to the cheap tier because the
|
|
52
|
+
diff looks small.
|
|
53
|
+
|
|
54
|
+
## Escalation is one-way and cheap
|
|
55
|
+
|
|
56
|
+
If a subagent returns `ESCALATE: <reason>`, re-run the task one tier up with that
|
|
57
|
+
reason included in the prompt. That is the designed path, not a failure — the
|
|
58
|
+
`quick-task` and `implementer` agents are told to escalate rather than guess.
|
|
59
|
+
Never re-run a failed task on the *same* tier hoping for a better roll.
|
|
60
|
+
|
|
61
|
+
## Pre-tiered agents
|
|
62
|
+
|
|
63
|
+
Pinning the tier in the agent's own frontmatter is stronger than remembering to
|
|
64
|
+
pass `model:`, so prefer these when one fits:
|
|
65
|
+
|
|
66
|
+
| Agent | Tier | Job |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `toolu:quick-task` | `haiku` | Mechanical lookups and bounded mechanical edits |
|
|
69
|
+
| `toolu:deep-explore` | `sonnet` | Structural exploration via ast-grep |
|
|
70
|
+
| `toolu:research-agent` | `sonnet` | External docs / web research |
|
|
71
|
+
| `toolu:implementer` | `sonnet` | One bounded plan step + its tests |
|
|
72
|
+
| `toolu:architect` | `opus` | Design, trade-offs, synthesis (read-only) |
|
|
73
|
+
|
|
74
|
+
For anything else, route explicitly with the active host's delegation interface.
|
|
75
|
+
Leaving routing unset inherits host defaults.
|
|
76
|
+
|
|
77
|
+
## Plan steps carry their tier
|
|
78
|
+
|
|
79
|
+
A machine-readable plan step may declare `"model": "<alias>"`:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{ "id": "s3", "title": "Add the resolver", "check": "bats plugins/toolu/hooks/lib/__tests__/config-models.bats",
|
|
83
|
+
"model": "sonnet" }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`plan` assigns it while the complexity is still fresh; `execution` reads it back
|
|
87
|
+
(`plan-ledger.sh status` prints `model=<alias>` for the next step) and delegates
|
|
88
|
+
at that tier without re-deriving the judgment. The field is optional — a legacy
|
|
89
|
+
step without it is still valid, and the executor falls back to this rubric.
|
|
90
|
+
|
|
91
|
+
## Configuring the tiers
|
|
92
|
+
|
|
93
|
+
Remap any class in `toolu.config.json`:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{ "models": { "review": "opus", "mechanical": "sonnet" } }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Values must be one of `haiku`, `sonnet`, `opus`, `fable`, `inherit`; anything
|
|
100
|
+
else is rejected with a warning and falls back to the default, so a typo
|
|
101
|
+
mis-tiers nothing. `{"models": {"enabled": false}}` turns off the session
|
|
102
|
+
injection entirely.
|
|
103
|
+
|
|
104
|
+
**Limit:** Claude config remaps the rubric but cannot rewrite a pre-built agent's
|
|
105
|
+
frontmatter. Codex custom-agent files also take precedence over class routing;
|
|
106
|
+
run `$toolu:setup` after plugin upgrades to install current profile templates.
|
|
107
|
+
|
|
108
|
+
## Budget note
|
|
109
|
+
|
|
110
|
+
Routing saves money only if it is paired with restraint on fan-out. A wide
|
|
111
|
+
parallel sweep on the top tier is the expensive failure mode this rubric is meant
|
|
112
|
+
to prevent, not enable — cap the agent count first, then tier each one.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use after requirements are agreed when a behavior change needs an executable, ledger-backed implementation plan. Evidence-first and adaptive: mechanical work skips a plan; brainstorm is optional upstream triage."
|
|
3
|
+
name: toolu--plan
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan
|
|
7
|
+
|
|
8
|
+
**Evidence first:** recall relevant decisions, inspect the declared spec, and
|
|
9
|
+
search the codebase for existing paths, helpers, tests, and docs before drafting.
|
|
10
|
+
Do not turn assumptions into steps.
|
|
11
|
+
|
|
12
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) for
|
|
13
|
+
classifications that change step handling. Derive paths, dependencies, and ordering from repository evidence.
|
|
14
|
+
|
|
15
|
+
When a ledger step needs delegation, declare its model tier using the
|
|
16
|
+
[`model-routing` rubric](../orchestrator/references/model-routing.md) and map
|
|
17
|
+
host-specific delegation through `plugins/toolu/workflows/host-mapping.md`.
|
|
18
|
+
|
|
19
|
+
## Choose the planning depth
|
|
20
|
+
|
|
21
|
+
**Mechanical work** — a typo, rename, formatting-only change, or dependency
|
|
22
|
+
bump with no behavior change — skips a plan. State the bounded change and its
|
|
23
|
+
direct verification, then execute it.
|
|
24
|
+
|
|
25
|
+
Behavior changes, features, fixes, refactors, and changes with meaningful risk
|
|
26
|
+
always receive a compact plan at `docs/toolu/plans/<YYYY-MM-DD>-<slug>.md`.
|
|
27
|
+
Use a reviewed spec when one exists; clear requirements do not require a prior
|
|
28
|
+
brainstorm.
|
|
29
|
+
|
|
30
|
+
## Plan shape
|
|
31
|
+
|
|
32
|
+
1. **Header** — `**Date:** <YYYY-MM-DD> **Status:** Draft **Spec:**
|
|
33
|
+
<path | none> **Topic:** <one line>`.
|
|
34
|
+
2. **Evidence and approach** — brief outcome, constraints, reused paths, and
|
|
35
|
+
chosen design. Cite what was recalled or inspected.
|
|
36
|
+
3. **Workstream summary** — a short, non-duplicative overview of the sequence
|
|
37
|
+
(for example, “parser → validation → docs”). It is not a second task list.
|
|
38
|
+
4. **Steps (machine-readable)** — one JSON array under the literal heading
|
|
39
|
+
`## Steps (machine-readable)`. This ledger is the **sole detailed step list**;
|
|
40
|
+
use the shared reference for its schema and real-input evidence conventions.
|
|
41
|
+
5. **Critical files** — exact paths to create or modify.
|
|
42
|
+
6. **Verification** — end-to-end outcome, real inputs, failure/boundary checks,
|
|
43
|
+
and required documentation synchronization.
|
|
44
|
+
|
|
45
|
+
Use the canonical ledger shape and optional-field/path-freshness guidance in
|
|
46
|
+
[the shared ledger reference](references/ledger.md); do not duplicate it in a
|
|
47
|
+
plan. Keep checks runnable and order dependent work explicitly.
|
|
48
|
+
|
|
49
|
+
Every user-facing behavior, interface, CLI, command, or config change needs an
|
|
50
|
+
explicit documentation step and check. Keep files focused, use colocated tests,
|
|
51
|
+
and include the real inputs and failure propagation that prove the behavior.
|
|
52
|
+
|
|
53
|
+
## Handoff
|
|
54
|
+
|
|
55
|
+
Leave the plan `Draft` and send it to `plan-review`. Only an approved plan moves
|
|
56
|
+
to `execution`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Plan ledger reference
|
|
2
|
+
|
|
3
|
+
The JSON array under `## Steps (machine-readable)` is the authoritative detailed
|
|
4
|
+
step list. Each step requires non-empty string `id`, `title`, and `check`.
|
|
5
|
+
|
|
6
|
+
Optional fields preserve the existing ledger contract:
|
|
7
|
+
|
|
8
|
+
- `ac_refs`: spec `AC-<n>` ids covered by this step.
|
|
9
|
+
- `depends_on`: earlier step ids that must be green before this work.
|
|
10
|
+
- `paths`: pathspecs read by the step's check, including its test file.
|
|
11
|
+
- `input`: the real input or fixture used to prove the behavior.
|
|
12
|
+
- `model`: `haiku`, `sonnet`, `opus`, `fable`, or `inherit`.
|
|
13
|
+
|
|
14
|
+
`paths` narrows iteration freshness to what the check actually reads. Declare
|
|
15
|
+
all such paths: under-declaring can leave a stale green result. Before delivery,
|
|
16
|
+
`plan-ledger.sh run <plan_doc> --verify` judges every step against the whole
|
|
17
|
+
branch diff, so
|
|
18
|
+
scoped freshness never replaces final verification.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use to review the plan or poke holes in the plan before execution. Verifies ledger steps, AC coverage, real-input checks, paths, dependency order, docs, and PR-delivery readiness."
|
|
3
|
+
name: toolu--plan-review
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Review
|
|
7
|
+
|
|
8
|
+
Pressure-test a draft plan before code changes begin. Find the gap that would
|
|
9
|
+
force an implementer to guess; do not restate the plan or praise it.
|
|
10
|
+
|
|
11
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) for
|
|
12
|
+
step/requirement alignment. Keep ledger validation and approval grounded in the checks below.
|
|
13
|
+
|
|
14
|
+
## Checklist
|
|
15
|
+
|
|
16
|
+
- **Evidence and scope** — approach follows the approved spec or agreed
|
|
17
|
+
requirements, reuses discovered paths, and adds no silent scope.
|
|
18
|
+
- **AC-to-step coverage** — every spec AC has at least one ledger `ac_refs`
|
|
19
|
+
mapping. Run `pl_check_ac_refs <plan_doc> <spec_doc>` to reject dangling refs;
|
|
20
|
+
a spec-less plan must explicitly justify why no AC mapping applies.
|
|
21
|
+
- **Runnable evidence** — every ledger step has a non-empty runnable `check`;
|
|
22
|
+
each behavior check identifies a real input/fixture and observable result,
|
|
23
|
+
including applicable invalid or boundary input. Reject empty steps and
|
|
24
|
+
happy-path-only verification.
|
|
25
|
+
- **Path declarations** — `paths` include every file the check reads, especially
|
|
26
|
+
production and test files; omitted or stale paths invalidate freshness claims.
|
|
27
|
+
- **Dependency order** — `depends_on` and workstream order make prerequisites
|
|
28
|
+
green before dependent work; no circular or impossible ordering.
|
|
29
|
+
- **Critical files and failure behavior** — all edited paths are declared and
|
|
30
|
+
failure propagation/recovery is planned instead of deferred.
|
|
31
|
+
- **Documentation** — each user-facing behavior/interface/CLI/command/config
|
|
32
|
+
change has an explicit documentation step with a runnable check.
|
|
33
|
+
- **PR-delivery readiness** — plan includes end-to-end real-data verification,
|
|
34
|
+
the final ledger verification, scoped commit/push expectations, and the
|
|
35
|
+
delivery prerequisite for the automatic PR/babysit handoff.
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
Use one finding per line:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
<step/section>: 🔴 blocker: <problem>. <fix>.
|
|
43
|
+
<step/section>: 🟡 should-fix: <gap>. <fix>.
|
|
44
|
+
<step/section>: 🔵 consider: <minor>. <fix>.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Stamp `**Status:** Approved` only when the plan is executable and delivery-ready;
|
|
48
|
+
otherwise stamp `**Status:** Needs changes` and return it to `plan`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use when completed branch work needs a final code review, fixes, full quality gates, and intentional local commits without pushing or merging.
|
|
3
|
+
name: toolu--review-and-commit--skill
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review and commit
|
|
7
|
+
|
|
8
|
+
Read [the canonical review-and-commit workflow](../../workflows/review-and-commit.md)
|
|
9
|
+
and [the host mapping](../../workflows/host-mapping.md) completely, then execute
|
|
10
|
+
them. Do not push or merge.
|