@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.
Files changed (331) hide show
  1. package/generated/GENERATED-NOTES.md +16 -0
  2. package/generated/agents/toolu--architect.md +52 -0
  3. package/generated/agents/toolu--deep-explore.md +65 -0
  4. package/generated/agents/toolu--implementer.md +50 -0
  5. package/generated/agents/toolu--quick-task.md +54 -0
  6. package/generated/agents/toolu--research-agent.md +101 -0
  7. package/generated/commands/toolu--commit.md +8 -0
  8. package/generated/commands/toolu--review-and-commit.md +8 -0
  9. package/generated/opencode.toolu.json +116 -0
  10. package/generated/skills/toolu--brainstorm/SKILL.md +57 -0
  11. package/generated/skills/toolu--brainstorm/references/design-questions.md +36 -0
  12. package/generated/skills/toolu--commit--skill/SKILL.md +11 -0
  13. package/generated/skills/toolu--debug/SKILL.md +54 -0
  14. package/generated/skills/toolu--deep-research/SKILL.md +51 -0
  15. package/generated/skills/toolu--execution/SKILL.md +77 -0
  16. package/generated/skills/toolu--orchestrator/SKILL.md +145 -0
  17. package/generated/skills/toolu--orchestrator/references/delegation-cost.md +104 -0
  18. package/generated/skills/toolu--orchestrator/references/model-routing.md +112 -0
  19. package/generated/skills/toolu--plan/SKILL.md +56 -0
  20. package/generated/skills/toolu--plan/references/ledger.md +18 -0
  21. package/generated/skills/toolu--plan-review/SKILL.md +48 -0
  22. package/generated/skills/toolu--review-and-commit--skill/SKILL.md +10 -0
  23. package/generated/skills/toolu--setup/SKILL.md +24 -0
  24. package/generated/skills/toolu--setup/scripts/setup.sh +206 -0
  25. package/generated/skills/toolu--spec/SKILL.md +67 -0
  26. package/generated/skills/toolu--spec-review/SKILL.md +50 -0
  27. package/generated/skills/toolu--test/SKILL.md +49 -0
  28. package/package.json +51 -0
  29. package/plugins/agent-browser/.claude-plugin/plugin.json +18 -0
  30. package/plugins/agent-browser/.codex-plugin/plugin.json +7 -0
  31. package/plugins/agent-browser/README.md +18 -0
  32. package/plugins/agent-browser/hooks/hooks.json +15 -0
  33. package/plugins/agent-browser/hooks/session-start.sh +42 -0
  34. package/plugins/agent-browser/skills/agent-browser/SKILL.md +77 -0
  35. package/plugins/agent-browser/skills/agent-browser/scripts/agent-browser.sh +80 -0
  36. package/plugins/ast-grep/.claude-plugin/plugin.json +18 -0
  37. package/plugins/ast-grep/.codex-plugin/plugin.json +7 -0
  38. package/plugins/ast-grep/README.md +21 -0
  39. package/plugins/ast-grep/hooks/hooks.json +15 -0
  40. package/plugins/ast-grep/hooks/post-tools.d/byte-savings.sh +67 -0
  41. package/plugins/ast-grep/hooks/pre-tools.d/search-nudge.sh +170 -0
  42. package/plugins/ast-grep/hooks/register.sh +68 -0
  43. package/plugins/ast-grep/scripts/byte-savings-report.sh +28 -0
  44. package/plugins/ast-grep/skills/ast-grep/SKILL.md +127 -0
  45. package/plugins/ast-grep/skills/ast-grep/references/ast-grep-advanced.md +44 -0
  46. package/plugins/ast-grep/skills/ast-grep/scripts/ast-grep.sh +103 -0
  47. package/plugins/context7/.claude-plugin/plugin.json +18 -0
  48. package/plugins/context7/.codex-plugin/plugin.json +7 -0
  49. package/plugins/context7/README.md +19 -0
  50. package/plugins/context7/hooks/hooks.json +15 -0
  51. package/plugins/context7/hooks/session-start.sh +42 -0
  52. package/plugins/context7/skills/context7/SKILL.md +64 -0
  53. package/plugins/context7/skills/context7/scripts/search.sh +151 -0
  54. package/plugins/exa-search/.claude-plugin/plugin.json +18 -0
  55. package/plugins/exa-search/.codex-plugin/plugin.json +7 -0
  56. package/plugins/exa-search/README.md +19 -0
  57. package/plugins/exa-search/hooks/hooks.json +15 -0
  58. package/plugins/exa-search/hooks/session-start.sh +34 -0
  59. package/plugins/exa-search/skills/exa-search/SKILL.md +91 -0
  60. package/plugins/exa-search/skills/exa-search/scripts/search.sh +221 -0
  61. package/plugins/jev/.claude-plugin/plugin.json +19 -0
  62. package/plugins/jev/.codex-plugin/plugin.json +7 -0
  63. package/plugins/jev/README.md +61 -0
  64. package/plugins/jev/hooks/hooks.json +25 -0
  65. package/plugins/jev/hooks/lib/common.sh +49 -0
  66. package/plugins/jev/hooks/session-start.sh +45 -0
  67. package/plugins/jev/hooks/user-prompt-submit.sh +41 -0
  68. package/plugins/jev/skills/jev/SKILL.md +81 -0
  69. package/plugins/jev/skills/jev/evals/README.md +98 -0
  70. package/plugins/jev/skills/jev/references/problem-solving.md +198 -0
  71. package/plugins/jev/skills/jev/scripts/jev.sh +405 -0
  72. package/plugins/jira/.claude-plugin/plugin.json +18 -0
  73. package/plugins/jira/.codex-plugin/plugin.json +7 -0
  74. package/plugins/jira/README.md +42 -0
  75. package/plugins/jira/hooks/hooks.json +15 -0
  76. package/plugins/jira/hooks/session-start.sh +34 -0
  77. package/plugins/jira/skills/jira/SKILL.md +123 -0
  78. package/plugins/jira/skills/jira/scripts/jira.sh +70 -0
  79. package/plugins/jira/skills/jira/scripts/lib/adf.sh +17 -0
  80. package/plugins/jira/skills/jira/scripts/lib/attachment.sh +94 -0
  81. package/plugins/jira/skills/jira/scripts/lib/board.sh +58 -0
  82. package/plugins/jira/skills/jira/scripts/lib/http.sh +184 -0
  83. package/plugins/jira/skills/jira/scripts/lib/issue.sh +159 -0
  84. package/plugins/jira/skills/jira/scripts/lib/paginate.sh +45 -0
  85. package/plugins/jira/skills/jira/scripts/lib/plan-parse.sh +70 -0
  86. package/plugins/jira/skills/jira/scripts/lib/plan-run.sh +115 -0
  87. package/plugins/jira/skills/jira/scripts/lib/plan-store.sh +168 -0
  88. package/plugins/jira/skills/jira/scripts/lib/plan.sh +108 -0
  89. package/plugins/jira/skills/jira/scripts/lib/project.sh +42 -0
  90. package/plugins/jira/skills/jira/scripts/lib/raw.sh +15 -0
  91. package/plugins/jira/skills/jira/scripts/lib/search.sh +41 -0
  92. package/plugins/jira/skills/jira/scripts/lib/sprint.sh +88 -0
  93. package/plugins/jira/skills/jira/scripts/lib/user.sh +45 -0
  94. package/plugins/jira/skills/jira/scripts/lib/worklog.sh +56 -0
  95. package/plugins/pr-babysit/.claude-plugin/plugin.json +25 -0
  96. package/plugins/pr-babysit/.codex-plugin/plugin.json +7 -0
  97. package/plugins/pr-babysit/README.md +38 -0
  98. package/plugins/pr-babysit/commands/babysit.md +13 -0
  99. package/plugins/pr-babysit/hooks/check-toolu.sh +20 -0
  100. package/plugins/pr-babysit/hooks/hooks.json +15 -0
  101. package/plugins/pr-babysit/scripts/babysit-tick.sh +133 -0
  102. package/plugins/pr-babysit/scripts/collect-pr.sh +224 -0
  103. package/plugins/pr-babysit/scripts/lib/common.sh +146 -0
  104. package/plugins/pr-babysit/scripts/lib/gh.sh +150 -0
  105. package/plugins/pr-babysit/scripts/lib/lock.sh +84 -0
  106. package/plugins/pr-babysit/scripts/lib/normalize.sh +98 -0
  107. package/plugins/pr-babysit/scripts/lib/state.sh +37 -0
  108. package/plugins/pr-babysit/scripts/parse-verdict.sh +171 -0
  109. package/plugins/pr-babysit/scripts/record.sh +69 -0
  110. package/plugins/pr-babysit/scripts/reduce-state.sh +245 -0
  111. package/plugins/pr-babysit/scripts/reply-thread.sh +90 -0
  112. package/plugins/pr-babysit/scripts/resolve-thread.sh +71 -0
  113. package/plugins/pr-babysit/skills/babysit/SKILL.md +31 -0
  114. package/plugins/pr-babysit/skills/babysit/references/helper.md +209 -0
  115. package/plugins/pr-babysit/workflows/babysit.md +722 -0
  116. package/plugins/python-quality/.claude-plugin/plugin.json +24 -0
  117. package/plugins/python-quality/.codex-plugin/plugin.json +6 -0
  118. package/plugins/python-quality/README.md +23 -0
  119. package/plugins/python-quality/hooks/check-toolu.sh +20 -0
  120. package/plugins/python-quality/hooks/concerns/00-preamble.sh +85 -0
  121. package/plugins/python-quality/hooks/concerns/10-size-file.sh +6 -0
  122. package/plugins/python-quality/hooks/concerns/20-tests.sh +37 -0
  123. package/plugins/python-quality/hooks/concerns/30-suppression.sh +33 -0
  124. package/plugins/python-quality/hooks/concerns/50-size-fn.sh +49 -0
  125. package/plugins/python-quality/hooks/concerns/70-no-mocks.sh +76 -0
  126. package/plugins/python-quality/hooks/concerns/90-docs.sh +52 -0
  127. package/plugins/python-quality/hooks/concerns/99-finalize.sh +36 -0
  128. package/plugins/python-quality/hooks/hooks.json +19 -0
  129. package/plugins/python-quality/hooks/register.sh +65 -0
  130. package/plugins/rust-quality/.claude-plugin/plugin.json +24 -0
  131. package/plugins/rust-quality/.codex-plugin/plugin.json +6 -0
  132. package/plugins/rust-quality/README.md +24 -0
  133. package/plugins/rust-quality/hooks/check-toolu.sh +20 -0
  134. package/plugins/rust-quality/hooks/concerns/00-preamble.sh +93 -0
  135. package/plugins/rust-quality/hooks/concerns/10-size-file.sh +10 -0
  136. package/plugins/rust-quality/hooks/concerns/20-tests.sh +84 -0
  137. package/plugins/rust-quality/hooks/concerns/30-suppression.sh +26 -0
  138. package/plugins/rust-quality/hooks/concerns/40-unsafe.sh +39 -0
  139. package/plugins/rust-quality/hooks/concerns/50-size-fn.sh +38 -0
  140. package/plugins/rust-quality/hooks/concerns/55-size-impl.sh +28 -0
  141. package/plugins/rust-quality/hooks/concerns/60-error-handling.sh +149 -0
  142. package/plugins/rust-quality/hooks/concerns/70-no-mocks.sh +139 -0
  143. package/plugins/rust-quality/hooks/concerns/90-docs.sh +32 -0
  144. package/plugins/rust-quality/hooks/concerns/99-finalize.sh +36 -0
  145. package/plugins/rust-quality/hooks/hooks.json +19 -0
  146. package/plugins/rust-quality/hooks/register.sh +65 -0
  147. package/plugins/statusline/.claude-plugin/plugin.json +19 -0
  148. package/plugins/statusline/.codex-plugin/plugin.json +7 -0
  149. package/plugins/statusline/README.md +108 -0
  150. package/plugins/statusline/commands/setup.md +30 -0
  151. package/plugins/statusline/hooks/hooks.json +15 -0
  152. package/plugins/statusline/hooks/session-start.sh +45 -0
  153. package/plugins/statusline/scripts/collect-status.sh +147 -0
  154. package/plugins/statusline/scripts/setup.sh +93 -0
  155. package/plugins/statusline/scripts/status.sh +55 -0
  156. package/plugins/statusline/skills/status/SKILL.md +13 -0
  157. package/plugins/statusline/statusline.sh +177 -0
  158. package/plugins/toolu/.claude-plugin/plugin.json +19 -0
  159. package/plugins/toolu/.codex-plugin/plugin.json +7 -0
  160. package/plugins/toolu/README.md +35 -0
  161. package/plugins/toolu/agents/.gitkeep +0 -0
  162. package/plugins/toolu/agents/architect.md +52 -0
  163. package/plugins/toolu/agents/deep-explore.md +65 -0
  164. package/plugins/toolu/agents/implementer.md +50 -0
  165. package/plugins/toolu/agents/quick-task.md +54 -0
  166. package/plugins/toolu/agents/research-agent.md +107 -0
  167. package/plugins/toolu/assets/agents/architect.toml +9 -0
  168. package/plugins/toolu/assets/agents/deep-explore.toml +9 -0
  169. package/plugins/toolu/assets/agents/implementer.toml +9 -0
  170. package/plugins/toolu/assets/agents/quick-task.toml +9 -0
  171. package/plugins/toolu/assets/agents/research-agent.toml +9 -0
  172. package/plugins/toolu/commands/.gitkeep +0 -0
  173. package/plugins/toolu/commands/commit.md +5 -0
  174. package/plugins/toolu/commands/review-and-commit.md +5 -0
  175. package/plugins/toolu/hooks/docs/gates.md +157 -0
  176. package/plugins/toolu/hooks/docs/model-routing.md +14 -0
  177. package/plugins/toolu/hooks/docs/post-compaction.md +3 -0
  178. package/plugins/toolu/hooks/docs/push-review.md +123 -0
  179. package/plugins/toolu/hooks/docs/session-start-python.md +3 -0
  180. package/plugins/toolu/hooks/docs/session-start-rust.md +4 -0
  181. package/plugins/toolu/hooks/docs/session-start-ts.md +3 -0
  182. package/plugins/toolu/hooks/docs/session-start.md +16 -0
  183. package/plugins/toolu/hooks/hooks.json +76 -0
  184. package/plugins/toolu/hooks/lib/config.sh +355 -0
  185. package/plugins/toolu/hooks/lib/detect.sh +929 -0
  186. package/plugins/toolu/hooks/lib/diff-sha.sh +32 -0
  187. package/plugins/toolu/hooks/lib/dispatch.sh +365 -0
  188. package/plugins/toolu/hooks/lib/docs-sync-config.sh +81 -0
  189. package/plugins/toolu/hooks/lib/edit-records.sh +157 -0
  190. package/plugins/toolu/hooks/lib/gate-file.sh +201 -0
  191. package/plugins/toolu/hooks/lib/gate-mode.sh +244 -0
  192. package/plugins/toolu/hooks/lib/host.sh +205 -0
  193. package/plugins/toolu/hooks/lib/permissions.sh +125 -0
  194. package/plugins/toolu/hooks/lib/plan-ledger-parse.sh +219 -0
  195. package/plugins/toolu/hooks/lib/plan-ledger-preflight.sh +137 -0
  196. package/plugins/toolu/hooks/lib/plan-ledger.sh +749 -0
  197. package/plugins/toolu/hooks/lib/push-waiver.sh +116 -0
  198. package/plugins/toolu/hooks/lib/quality-config.sh +184 -0
  199. package/plugins/toolu/hooks/lib/registry.sh +72 -0
  200. package/plugins/toolu/hooks/lib/state-sweeper.sh +194 -0
  201. package/plugins/toolu/hooks/lib/telemetry.sh +94 -0
  202. package/plugins/toolu/hooks/lib/verdict.sh +477 -0
  203. package/plugins/toolu/hooks/post-tools/mod.sh +42 -0
  204. package/plugins/toolu/hooks/post-tools/modules/gate-status.sh +140 -0
  205. package/plugins/toolu/hooks/post-tools/modules/push-waiver.sh +97 -0
  206. package/plugins/toolu/hooks/pre-compact.sh +18 -0
  207. package/plugins/toolu/hooks/pre-tools/agent-tier.sh +111 -0
  208. package/plugins/toolu/hooks/pre-tools/mod.sh +37 -0
  209. package/plugins/toolu/hooks/pre-tools/modules/bash-commands.sh +187 -0
  210. package/plugins/toolu/hooks/pre-tools/modules/code-edit-rules.sh +78 -0
  211. package/plugins/toolu/hooks/pre-tools/modules/commit-gate.sh +70 -0
  212. package/plugins/toolu/hooks/pre-tools/modules/docs-sync.sh +137 -0
  213. package/plugins/toolu/hooks/pre-tools/modules/mcp-blocker.sh +151 -0
  214. package/plugins/toolu/hooks/pre-tools/modules/plan-ledger.sh +201 -0
  215. package/plugins/toolu/hooks/pre-tools/modules/protected-files.sh +177 -0
  216. package/plugins/toolu/hooks/pre-tools/modules/push-review.sh +273 -0
  217. package/plugins/toolu/hooks/pre-tools/modules/quality-gate.sh +87 -0
  218. package/plugins/toolu/hooks/session-start.sh +379 -0
  219. package/plugins/toolu/hooks/user-prompt-submit.sh +197 -0
  220. package/plugins/toolu/scripts/context-budget.sh +111 -0
  221. package/plugins/toolu/scripts/debug-log.sh +98 -0
  222. package/plugins/toolu/scripts/debug-stack.sh +108 -0
  223. package/plugins/toolu/scripts/debug-testfail.sh +97 -0
  224. package/plugins/toolu/settings/.gitkeep +0 -0
  225. package/plugins/toolu/settings/README.md +127 -0
  226. package/plugins/toolu/settings/bash-allowlist.txt +12 -0
  227. package/plugins/toolu/settings/bash-denylist.txt +25 -0
  228. package/plugins/toolu/settings/code-edit-rules.json +67 -0
  229. package/plugins/toolu/settings/commit-prefixes.txt +12 -0
  230. package/plugins/toolu/settings/mcp-blocklist.txt +8 -0
  231. package/plugins/toolu/settings/permissions.fragment.json +36 -0
  232. package/plugins/toolu/settings/protected-files.txt +30 -0
  233. package/plugins/toolu/settings/rust-unsafe-exemptions.txt +5 -0
  234. package/plugins/toolu/settings/toolu.config.example.json +130 -0
  235. package/plugins/toolu/skills/.gitkeep +0 -0
  236. package/plugins/toolu/skills/brainstorm/SKILL.md +57 -0
  237. package/plugins/toolu/skills/brainstorm/references/design-questions.md +36 -0
  238. package/plugins/toolu/skills/commit/SKILL.md +11 -0
  239. package/plugins/toolu/skills/debug/SKILL.md +54 -0
  240. package/plugins/toolu/skills/debug/evals/README.md +17 -0
  241. package/plugins/toolu/skills/debug/evals/cases.json +24 -0
  242. package/plugins/toolu/skills/debug/evals/results.json +34 -0
  243. package/plugins/toolu/skills/deep-research/SKILL.md +51 -0
  244. package/plugins/toolu/skills/execution/SKILL.md +77 -0
  245. package/plugins/toolu/skills/orchestrator/SKILL.md +145 -0
  246. package/plugins/toolu/skills/orchestrator/references/delegation-cost.md +104 -0
  247. package/plugins/toolu/skills/orchestrator/references/model-routing.md +112 -0
  248. package/plugins/toolu/skills/plan/SKILL.md +56 -0
  249. package/plugins/toolu/skills/plan/references/ledger.md +18 -0
  250. package/plugins/toolu/skills/plan-review/SKILL.md +48 -0
  251. package/plugins/toolu/skills/review-and-commit/SKILL.md +10 -0
  252. package/plugins/toolu/skills/setup/SKILL.md +24 -0
  253. package/plugins/toolu/skills/setup/scripts/setup.sh +206 -0
  254. package/plugins/toolu/skills/spec/SKILL.md +67 -0
  255. package/plugins/toolu/skills/spec-review/SKILL.md +50 -0
  256. package/plugins/toolu/skills/test/SKILL.md +49 -0
  257. package/plugins/toolu/workflows/commit.md +21 -0
  258. package/plugins/toolu/workflows/host-mapping.md +22 -0
  259. package/plugins/toolu/workflows/review-and-commit.md +54 -0
  260. package/plugins/toolu/workflows/semantic-judgments.md +35 -0
  261. package/plugins/toolu-review/.claude-plugin/plugin.json +18 -0
  262. package/plugins/toolu-review/.codex-plugin/plugin.json +7 -0
  263. package/plugins/toolu-review/README.md +17 -0
  264. package/plugins/toolu-review/hooks/hooks.json +15 -0
  265. package/plugins/toolu-review/hooks/session-start.sh +34 -0
  266. package/plugins/toolu-review/skills/review/SKILL.md +90 -0
  267. package/plugins/toolu-review/skills/review/scripts/write-state.sh +189 -0
  268. package/plugins/ts-quality/.claude-plugin/plugin.json +24 -0
  269. package/plugins/ts-quality/.codex-plugin/plugin.json +6 -0
  270. package/plugins/ts-quality/README.md +24 -0
  271. package/plugins/ts-quality/hooks/check-toolu.sh +20 -0
  272. package/plugins/ts-quality/hooks/concerns/00-preamble.sh +123 -0
  273. package/plugins/ts-quality/hooks/concerns/10-imports.sh +33 -0
  274. package/plugins/ts-quality/hooks/concerns/15-type-as.sh +9 -0
  275. package/plugins/ts-quality/hooks/concerns/20-tests.sh +26 -0
  276. package/plugins/ts-quality/hooks/concerns/25-size-file.sh +40 -0
  277. package/plugins/ts-quality/hooks/concerns/30-size-fn.sh +53 -0
  278. package/plugins/ts-quality/hooks/concerns/35-react-hooks.sh +7 -0
  279. package/plugins/ts-quality/hooks/concerns/40-factory.sh +5 -0
  280. package/plugins/ts-quality/hooks/concerns/45-typeguard.sh +6 -0
  281. package/plugins/ts-quality/hooks/concerns/50-type-dup.sh +16 -0
  282. package/plugins/ts-quality/hooks/concerns/55-naming.sh +11 -0
  283. package/plugins/ts-quality/hooks/concerns/60-console.sh +6 -0
  284. package/plugins/ts-quality/hooks/concerns/65-suppression.sh +12 -0
  285. package/plugins/ts-quality/hooks/concerns/70-ui-confirm.sh +8 -0
  286. package/plugins/ts-quality/hooks/concerns/72-ui-radix.sh +12 -0
  287. package/plugins/ts-quality/hooks/concerns/74-react-props.sh +6 -0
  288. package/plugins/ts-quality/hooks/concerns/76-toast.sh +10 -0
  289. package/plugins/ts-quality/hooks/concerns/78-error-ast.sh +242 -0
  290. package/plugins/ts-quality/hooks/concerns/80-throw-literal.sh +23 -0
  291. package/plugins/ts-quality/hooks/concerns/85-no-mocks.sh +109 -0
  292. package/plugins/ts-quality/hooks/concerns/90-duplication.sh +30 -0
  293. package/plugins/ts-quality/hooks/concerns/92-docs.sh +36 -0
  294. package/plugins/ts-quality/hooks/concerns/94-handler.sh +15 -0
  295. package/plugins/ts-quality/hooks/concerns/99-finalize.sh +46 -0
  296. package/plugins/ts-quality/hooks/hooks.json +19 -0
  297. package/plugins/ts-quality/hooks/register.sh +65 -0
  298. package/src/adapter/__tests__/evaluate.test.ts +82 -0
  299. package/src/adapter/__tests__/permission-map.test.ts +91 -0
  300. package/src/adapter/evaluate.ts +54 -0
  301. package/src/adapter/permission-map.ts +177 -0
  302. package/src/bootstrap/__tests__/bootstrap.test.ts +148 -0
  303. package/src/bootstrap/entrypoint.ts +18 -0
  304. package/src/bootstrap/index.ts +5 -0
  305. package/src/bootstrap/readiness.ts +59 -0
  306. package/src/bootstrap/result.ts +21 -0
  307. package/src/bootstrap/runtime.ts +99 -0
  308. package/src/bootstrap/test-helpers.ts +25 -0
  309. package/src/host/__tests__/host.test.ts +37 -0
  310. package/src/host/detect.ts +46 -0
  311. package/src/host/index.ts +10 -0
  312. package/src/host/roots.ts +59 -0
  313. package/src/host/types.ts +14 -0
  314. package/src/inventory/__tests__/inventory.test.ts +69 -0
  315. package/src/inventory/index.ts +9 -0
  316. package/src/inventory/manifest.ts +46 -0
  317. package/src/inventory/scan.ts +66 -0
  318. package/src/inventory/selection.ts +92 -0
  319. package/src/inventory/types.ts +22 -0
  320. package/src/lifecycle/__tests__/lifecycle.test.ts +7 -0
  321. package/src/lifecycle/index.ts +2 -0
  322. package/src/lifecycle/table.ts +42 -0
  323. package/src/plugin/__tests__/plugin-stub.test.ts +6 -0
  324. package/src/plugin/plugin-stub.ts +7 -0
  325. package/src/plugin/toolu.ts +142 -0
  326. package/src/preflight/__tests__/preflight.test.ts +20 -0
  327. package/src/preflight/check.ts +75 -0
  328. package/src/preflight/index.ts +2 -0
  329. package/src/select/__tests__/select.test.ts +52 -0
  330. package/src/select/index.ts +2 -0
  331. package/src/select/resolve.ts +87 -0
@@ -0,0 +1,177 @@
1
+ #!/usr/bin/env bash
2
+ # Statusline — the toolu statusline.
3
+ # Reads the Claude Code statusline JSON on stdin and prints a single status line:
4
+ # model | effort | ctx | <email domain> | <gate> | folder | branch [↑↓] [dirty] | <comemory> | <jev>
5
+ # The signature segment is the quality-gate marker: when this project's
6
+ # PostToolUse gate is failing, it shows a loud red marker so you can't miss it.
7
+ # (Lights up only when a gate writer — e.g. rust-quality/ts-quality/toolu — is present.)
8
+ #
9
+ # Wire it up (settings.json) after the SessionStart hook has symlinked it to a
10
+ # stable path:
11
+ # "statusLine": { "type": "command",
12
+ # "command": "bash ~/.claude/statusline/statusline.sh" }
13
+ #
14
+ # Every field is read defensively — the schema marks effort/used_percentage/etc.
15
+ # as absent before the first API call, after /compact, or on models that lack
16
+ # them. Missing jq degrades to a minimal line rather than erroring.
17
+
18
+ input=$(cat 2>/dev/null || echo '{}')
19
+
20
+ # --- Colors (ANSI) ---
21
+ CYAN=$'\033[36m'; GREEN=$'\033[32m'; YELLOW=$'\033[33m'
22
+ MAGENTA=$'\033[35m'; BLUE=$'\033[34m'; RED=$'\033[31m'
23
+ DIM=$'\033[2m'; BOLD=$'\033[1m'; RESET=$'\033[0m'
24
+
25
+ # Without jq we cannot parse the payload — emit nothing rather than garbage.
26
+ command -v jq >/dev/null 2>&1 || { printf 'toolu'; exit 0; }
27
+
28
+ # One jq pass extracts every field — a statusline renders on every prompt, so
29
+ # six separate jq spawns would be wasteful. One value per line (not @tsv: tab is
30
+ # IFS-whitespace, so `read` would collapse empty fields and shift everything);
31
+ # the per-field `read` preserves empty lines. bash-3.2-safe (no mapfile).
32
+ {
33
+ IFS= read -r model
34
+ IFS= read -r effort
35
+ IFS= read -r cwd
36
+ IFS= read -r ctx_size
37
+ IFS= read -r ctx_used
38
+ IFS= read -r ctx_pct
39
+ } < <(printf '%s' "$input" | jq -r '
40
+ (.model.display_name // "Claude"),
41
+ (.effort.level // ""),
42
+ (.workspace.current_dir // .cwd // ""),
43
+ (.context_window.context_window_size // 0),
44
+ (.context_window.total_input_tokens // 0),
45
+ (.context_window.used_percentage // "")' 2>/dev/null)
46
+ [ -n "$model" ] || model="Claude"
47
+ [ -n "$ctx_size" ] || ctx_size=0
48
+ [ -n "$ctx_used" ] || ctx_used=0
49
+
50
+ # Resolve the real plugin directory even when this renderer was invoked through
51
+ # the stable SessionStart symlink. Shared project status lives in the collector;
52
+ # this file only adds Claude's transient model/context/account presentation.
53
+ _self="${BASH_SOURCE[0]}"
54
+ case "$_self" in */*) ;; *) _self="./$_self" ;; esac
55
+ _hops=0
56
+ while [ -L "$_self" ] && [ "$_hops" -lt 40 ]; do
57
+ _hops=$((_hops + 1))
58
+ _link=$(readlink "$_self")
59
+ case "$_link" in
60
+ /*) _self="$_link" ;;
61
+ *) _self="${_self%/*}/$_link" ;;
62
+ esac
63
+ done
64
+ _plugin_dir=$(cd "${_self%/*}" 2>/dev/null && pwd) || _plugin_dir=""
65
+ _collector="${_plugin_dir:+$_plugin_dir/}scripts/collect-status.sh"
66
+ if [ -f "$_collector" ]; then
67
+ project_status=$(bash "$_collector" "$cwd" 2>/dev/null || true)
68
+ else
69
+ project_status=""
70
+ fi
71
+ if ! jq -e 'type == "object"' <<<"$project_status" >/dev/null 2>&1; then
72
+ project_status='{"repo_root":"","folder":"","branch":"","ahead":0,"behind":0,"working_tree":{"staged":0,"unstaged":0,"untracked":0},"gate":{"status":"","reason":""},"comemory_count":null}'
73
+ fi
74
+
75
+ format_tokens() {
76
+ local n="$1"
77
+ # Guard non-numeric input (a future schema change could emit a string) so the
78
+ # arithmetic and printf below stay safe on the per-render hot path.
79
+ [[ "$n" =~ ^[0-9]+$ ]] || { printf '0'; return; }
80
+ if [ "$n" -ge 1000000 ]; then
81
+ # M-tier with one decimal, integer-only (no float arithmetic in bash): 13779513 -> 13.7M
82
+ printf '%d.%dM' "$(( n / 1000000 ))" "$(( (n % 1000000) / 100000 ))"
83
+ elif [ "$n" -ge 1000 ]; then printf '%dk' "$(( n / 1000 ))"; else printf '%d' "$n"; fi
84
+ }
85
+ ctx_used_fmt=$(format_tokens "$ctx_used")
86
+ ctx_size_fmt=$(format_tokens "$ctx_size")
87
+ if [[ "$ctx_pct" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
88
+ tokens_seg="${ctx_used_fmt}/${ctx_size_fmt} ($(printf '%.0f%%' "$ctx_pct"))"
89
+ else
90
+ tokens_seg="${ctx_used_fmt}/${ctx_size_fmt}"
91
+ fi
92
+
93
+ # --- Account (Claude login email domain) ---
94
+ # Reads the OAuth account email Claude Code itself stores in ~/.claude.json
95
+ # (or $CLAUDE_CONFIG_DIR/.claude.json when that's set — no fallback to $HOME
96
+ # in that case, so a custom config dir never leaks another account's email).
97
+ # Only the domain is shown: enough to tell accounts apart across sessions
98
+ # without printing the full address to the terminal.
99
+ account_seg=""
100
+ if [ -n "${CLAUDE_CONFIG_DIR:-}" ]; then
101
+ _acct_file="${CLAUDE_CONFIG_DIR}/.claude.json"
102
+ else
103
+ _acct_file="$HOME/.claude.json"
104
+ fi
105
+ if [ -f "$_acct_file" ]; then
106
+ _acct_email=$(jq -r '.oauthAccount.emailAddress // empty' "$_acct_file" 2>/dev/null)
107
+ [[ "$_acct_email" == *@* ]] && account_seg="${GREEN}${_acct_email#*@}${RESET}"
108
+ fi
109
+
110
+ # --- Quality gate (toolu): red marker only when failing ---
111
+ # Resolve the gate file at the git root (where the rust-quality / ts-quality hooks write it
112
+ # via $PROJECT_ROOT), not at $cwd — a subdir-launched session or worktree has
113
+ # cwd != project root, which would silently miss the marker.
114
+ gate_seg=""
115
+ gate_status=$(jq -r '.gate.status // ""' <<<"$project_status")
116
+ [ "$gate_status" = "failing" ] && gate_seg="${BOLD}${RED}✗ gate:failing${RESET}"
117
+
118
+ # --- Git branch + folder + working tree status + ahead/behind ---
119
+ branch=$(jq -r '.branch // ""' <<<"$project_status")
120
+ folder=$(jq -r '.folder // ""' <<<"$project_status")
121
+ _repo_root=$(jq -r '.repo_root // ""' <<<"$project_status")
122
+ _ahead=$(jq -r '.ahead // 0' <<<"$project_status")
123
+ _behind=$(jq -r '.behind // 0' <<<"$project_status")
124
+ _staged=$(jq -r '.working_tree.staged // 0' <<<"$project_status")
125
+ _unstaged=$(jq -r '.working_tree.unstaged // 0' <<<"$project_status")
126
+ _untracked=$(jq -r '.working_tree.untracked // 0' <<<"$project_status")
127
+ _first=true
128
+ [ -z "$_repo_root" ] || _first=false
129
+ _ab_txt=""
130
+ [ "$_ahead" -gt 0 ] && _ab_txt="${_ab_txt}↑${_ahead}"
131
+ [ "$_behind" -gt 0 ] && _ab_txt="${_ab_txt}↓${_behind}"
132
+ _ab_seg=""
133
+ [ -n "$_ab_txt" ] && _ab_seg="${DIM}${_ab_txt}${RESET}"
134
+ _parts=""
135
+ [ "$_staged" -gt 0 ] && _parts="${_parts}+${_staged} "
136
+ [ "$_unstaged" -gt 0 ] && _parts="${_parts}~${_unstaged} "
137
+ [ "$_untracked" -gt 0 ] && _parts="${_parts}?${_untracked} "
138
+ _parts="${_parts%" "}"
139
+ _git_seg=""
140
+ [ -n "$_parts" ] && _git_seg="${YELLOW}[${_parts}]${RESET}"
141
+
142
+ # --- Comemory memory count ([COMEMORY:N]): per-project, main-repo scoped ---
143
+ # Read the marker written by comemory's comemory-status SessionStart hook.
144
+ # The key derivation MUST match that hook (git-common-dir → main-repo basename)
145
+ # so a worktree resolves to the same scope as its main checkout.
146
+ comemory_seg=""
147
+ _cn=$(jq -r '.comemory_count // empty' <<<"$project_status")
148
+ [ -n "$_cn" ] && comemory_seg="${BOLD}${GREEN}[COMEMORY:${_cn}]${RESET}"
149
+
150
+ # --- Jev readiness (local prerequisites only; no inference or health request) ---
151
+ jev_seg=""
152
+ jev_status=$(jq -r '.jev.status // ""' <<<"$project_status")
153
+ case "$jev_status" in
154
+ ready) jev_seg="${BOLD}${GREEN}[JEV:READY]${RESET}" ;;
155
+ unavailable)
156
+ jev_reason=$(jq -r '.jev.reason // ""' <<<"$project_status")
157
+ jev_seg="${BOLD}${YELLOW}[JEV:UNAVAILABLE: ${jev_reason}]${RESET}"
158
+ ;;
159
+ esac
160
+
161
+ # --- Assemble ---
162
+ sep="${DIM} | ${RESET}"
163
+ line="${CYAN}${model}${RESET}"
164
+ [ -n "$effort" ] && [ "$effort" != "null" ] && line="${line}${sep}${YELLOW}effort:${effort}${RESET}"
165
+ line="${line}${sep}${MAGENTA}ctx:${tokens_seg}${RESET}"
166
+ [ -n "$account_seg" ] && line="${line}${sep}${account_seg}"
167
+ [ -n "$gate_seg" ] && line="${line}${sep}${gate_seg}"
168
+ [ -n "$folder" ] && line="${line}${sep}${BOLD}${folder}${RESET}"
169
+ [ -n "$branch" ] && line="${line}${sep}${BLUE}${branch}${RESET}"
170
+ if [ "$_first" = false ]; then
171
+ [ -n "$_ab_seg" ] && line="${line}${_ab_seg}"
172
+ [ -n "$_git_seg" ] && line="${line}${_git_seg}"
173
+ fi
174
+ [ -n "$comemory_seg" ] && line="${line}${sep}${comemory_seg}"
175
+ [ -n "$jev_seg" ] && line="${line}${sep}${jev_seg}"
176
+
177
+ printf '%s' "$line"
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "toolu",
3
+ "version": "6.8.0",
4
+ "description": "Dual-host engineering discipline for Claude Code and Codex: workflow skills, agents, commands, and registry-driven quality hooks.",
5
+ "author": {
6
+ "name": "Falconiere Barbosa",
7
+ "email": "hello@falconiere.io"
8
+ },
9
+ "homepage": "https://github.com/falconiere/toolu",
10
+ "repository": "https://github.com/falconiere/toolu.git",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "claude-code",
14
+ "skills",
15
+ "agents",
16
+ "hooks"
17
+ ],
18
+ "dependencies": []
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "toolu",
3
+ "version": "6.8.0",
4
+ "description": "Dual-host engineering discipline for Claude Code and Codex: workflow skills, agents, commands, and registry-driven quality hooks.",
5
+ "skills": "./skills/",
6
+ "hooks": "./hooks/hooks.json"
7
+ }
@@ -0,0 +1,35 @@
1
+ # toolu
2
+
3
+ Dual-host engineering discipline for Claude Code and Codex: workflow skills,
4
+ agents, commands, and registry-driven quality hooks. This is the core plugin;
5
+ domain plugins (`rust-quality`, `ts-quality`, …) register into it.
6
+
7
+ ## Install
8
+
9
+ ```text
10
+ /plugin install toolu@toolu
11
+ ```
12
+
13
+ ```bash
14
+ codex plugin marketplace add Falconiere/toolu
15
+ codex plugin add toolu@toolu
16
+ ```
17
+
18
+ `toolu` has no required plugin dependencies. The `push-review` gate is reviewer-agnostic and uses the built-in `/code-review` (or `toolu-review:review`). See the root [README](../../README.md) for the full install sequence.
19
+
20
+ ## What it provides
21
+
22
+ - **Workflow skills** — **Brainstorm** (`brainstorm`) is optional upstream triage with an adaptive default-and-proceed baseline; the six-stage delivery chain is `spec` → `spec-review` → `plan` → `plan-review` → `execution` → `pr-babysit`. Execution owns local review readiness and, for an authorized delivery, the verified PR handoff. `test` is a reusable execution-time method, not a terminal phase. Plus three non-chain skills: `orchestrator` for deciding whether a large task should be split at all and delegating what genuinely benefits, `debug` — a break-glass scientific-debug loop (reproduce → observe → hypothesize → isolate root cause → fix → regress) any phase can drop into, backed by language-agnostic evidence helpers (`debug-testfail`/`debug-stack`/`debug-log`) and an opt-in Sentry adapter, and `deep-research` — a research pipeline: guiding questions fanned out across `research-agent` workers (exa-search + context7), verified, and delivered as a cited report under `docs/research/`.
23
+ - **Quality gate engine** — the `PreToolUse` / `PostToolUse` / `SessionStart` hook dispatcher and runtime **registry** that domain plugins contribute checks to (fail-closed; a module runs only while its owning plugin is installed).
24
+ - **\`push-review\` gate** — gates \`git push\` on a feature branch until the diff has been run through an accepted reviewer (the built-in \`/code-review\` skill or \`toolu-review:review\`), with a round cap that escalates instead of looping (5 rewrites against an unchanged diff; a changed diff restarts the count). Gated per target repo — `git -C <worktree> push` is judged on the worktree's own branch, diff, and state file. **Delivery is configurable** (`gates.pushReview.mode`): the shipped default advises rather than blocking; `ask` is opt-in and a yes is remembered for that diff. See [hooks/docs/gates.md](hooks/docs/gates.md).
25
+ - **docs-sync backstop** — an advisory (never a block) on push when code changes but no docs surface does.
26
+ - **Commit workflows** — Claude `/commit` and `/review-and-commit`, with Codex equivalents `$toolu:commit` and `$toolu:review-and-commit`, all reading shared workflow bodies.
27
+ - **Model routing** — Claude keeps its Haiku/Sonnet/Opus aliases. Codex defaults to Luna/medium, Terra/medium or high, and Sol/high by work class. Both are configurable under `models`.
28
+ - **Tier-pinned agents** — Claude reads bundled definitions; `$toolu:setup` safely installs the equivalent five Codex TOML profiles with preview, backup, conflict refusal, update, and removal modes.
29
+
30
+ ## Configuration
31
+
32
+ Toggle individual skills, hooks, or MCP servers via the host-native config:
33
+ `~/.claude/toolu.config.json` / `<repo>/.claude/toolu.config.json` for Claude,
34
+ or `${CODEX_HOME:-~/.codex}/toolu.config.json` / `<repo>/.codex/toolu.config.json`
35
+ for Codex. Defaults are opt-out. Full schema: [`docs/config.md`](../../docs/config.md).
File without changes
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: architect
3
+ description: Deep design reasoning — compare candidate approaches, weigh trade-offs, settle ambiguous or cross-cutting decisions, and synthesize many findings into one recommendation. Runs on the most capable tier. Read-only. NOT for lookups, mechanical edits, or bounded single-file work.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: opus
6
+ ---
7
+
8
+ ## Instructions
9
+
10
+ You are called when getting it **wrong is expensive**: the shape is not obvious, the decision is hard to reverse, or several findings must be reconciled into one call. You reason and recommend; you do not edit.
11
+
12
+ ### Model tier
13
+
14
+ This agent runs on **Opus**, the most capable tier in the toolu ladder (Haiku mechanical → Sonnet exploration/implementation/review → Opus synthesis/architecture). It is the expensive tier on purpose — spend it on decisions, not on gathering. If you find yourself doing broad mechanical discovery, that was the wrong tier: say so in your answer so the caller re-routes next time.
15
+
16
+ ### Use it for
17
+
18
+ - Choosing between approaches when the trade-off actually matters.
19
+ - Cross-cutting or hard-to-reverse decisions (data model, interface contract, migration order, failure semantics).
20
+ - Synthesizing several agents' findings into one coherent recommendation.
21
+ - Pressure-testing a plan or spec for the failure mode nobody named.
22
+
23
+ ### How to reason
24
+
25
+ 1. **Restate the decision** in one sentence, including what is actually at stake if it is wrong.
26
+ 2. **Ground it in the code that exists.** Read the real call sites and constraints before theorizing; prefer extending something that already works over new machinery.
27
+ 3. **Weigh two or three candidates.** Name the trade-off that matters *here* — simplicity vs. flexibility, blast radius vs. cleanliness, speed vs. correctness. Reject the others explicitly and say why.
28
+ 4. **Commit.** A menu with no recommendation pushes the decision back on the caller. Have an opinion and defend it.
29
+ 5. **Name what stays open** — the risks and assumptions the recommendation rides on.
30
+
31
+ ### Output contract
32
+
33
+ - `Decision:` the recommendation, one sentence.
34
+ - `Why:` the trade-off that decided it, 2–4 sentences, citing `path:line` where it is grounded in code.
35
+ - `Rejected:` each alternative with its one-line reason.
36
+ - `Risks:` open assumptions and what would falsify the call.
37
+
38
+ Return conclusions, not the files you read.
39
+
40
+ ### What you return
41
+
42
+ A recommendation with the trade-off named, the alternatives you rejected and why,
43
+ and the risks that remain. One chosen approach — a menu with no recommendation
44
+ pushes the decision back to the caller, who delegated precisely to avoid making it
45
+ uninformed.
46
+
47
+ ### When to stop
48
+
49
+ When the decision is made and written down. You are read-only: you do not
50
+ implement the design, and you do not explore beyond what the decision needs. If
51
+ the question as posed cannot be decided — it depends on something only the user
52
+ knows — return that, with the specific question that needs answering.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: deep-explore
3
+ description: Deep codebase exploration using ast-grep structural search. Use this agent for understanding code architecture, finding implementations by intent, analyzing function relationships, and exploring unfamiliar code areas.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ ## Instructions
9
+
10
+ You are a specialized code exploration agent. Do the exploration yourself with the tools you have — do not attempt to delegate to other agents. Use ast-grep for structural patterns; Grep for exact literals; Glob for file finding.
11
+
12
+ ### Model tier
13
+
14
+ This agent runs on **Sonnet**, not the session's frontier model. Read-only structural exploration is a bounded subtask where a mid-tier model keeps ~full quality at a fraction of the cost — routing the bulk of exploration here reserves the expensive tier for hard reasoning and synthesis. The toolu ladder: **Haiku** mechanical (`quick-task`) → **Sonnet** exploration / implementation / review (`deep-explore`, `research-agent`, `implementer`) → **Opus** synthesis / architecture (`architect`). Rubric: `plugins/toolu/skills/orchestrator/references/model-routing.md`.
15
+
16
+ ### Search hierarchy
17
+
18
+ 1. **ast-grep** — structural/AST patterns (impl blocks, fn signatures, trait bounds, hooks, components) on code files
19
+ 2. **Grep** — exact literals; first choice on non-code files (`*.toml`, `*.md`, `*.yaml`)
20
+ 3. **Glob** — file finding by path pattern
21
+
22
+ ---
23
+
24
+ ### 1. Structural search — ast-grep
25
+
26
+ ```bash
27
+ # Find function signatures by pattern
28
+ ast-grep run --pattern 'fn $NAME($$$ARGS) -> Result<$$$>' --lang rust .
29
+
30
+ # Find trait impls
31
+ ast-grep run --pattern 'impl $TRAIT for $TYPE { $$$ }' --lang rust .
32
+
33
+ # Find React components
34
+ ast-grep run --pattern 'export function $NAME($PROPS) { $$$ }' --lang tsx .
35
+ ```
36
+
37
+ ### 2. Exact literal — Grep
38
+
39
+ Use the Grep tool when you need an exact string match on a file or non-code config.
40
+
41
+ ### 3. File finding — Glob
42
+
43
+ Use the Glob tool for path patterns like `**/*.rs`, `apps/**/package.json`.
44
+
45
+ ### Workflow
46
+
47
+ 1. `ast-grep run` — find code by structural pattern
48
+ 2. `Read` — examine specific files from results
49
+ 3. `Grep` — exact string/regex when needed
50
+ 4. Synthesize into a clear, concise summary
51
+
52
+ ### What you return
53
+
54
+ A compact map, not a file dump: a `file:line` table of what you found, plus at
55
+ most a short paragraph of what it means. The caller delegated this to avoid
56
+ reading the bytes — sending them back defeats the point and re-enters the context
57
+ they were trying to keep out.
58
+
59
+ ### When to stop
60
+
61
+ You were sent for one answerable question. When you can answer it, stop — do not
62
+ keep exploring adjacent code because it looks interesting. If the question turns
63
+ out to be unanswerable as asked (the symbol does not exist, the pattern matches
64
+ nothing), return that finding immediately with what you searched; a fast "not
65
+ there" is worth more than a slow guess.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: implementer
3
+ description: Executes ONE bounded, already-decided step of a plan — the code edits plus their colocated real-data tests — then reports the diff and the verification output. Runs on the mid tier. NOT for choosing the approach, and NOT for a whole multi-step plan at once.
4
+ tools: Read, Edit, Write, Grep, Glob, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ ## Instructions
9
+
10
+ You implement **one bounded step** whose approach is already decided. The caller owns the design; you own making it real and proving it works. Do the work yourself — do not delegate.
11
+
12
+ ### Model tier
13
+
14
+ This agent runs on **Sonnet**, the mid tier in the toolu ladder (Haiku mechanical → Sonnet exploration/implementation/review → Opus synthesis/architecture). Standard implementation against a clear spec is bounded work where the mid tier holds full quality, so the frontier tier stays free for the calls that need it.
15
+
16
+ ### Preconditions
17
+
18
+ You must have been given: what to change, where, and how to verify it. If any of the three is missing or the step turns out to require an unspecified design decision, stop and return `ESCALATE: <what is undecided>` rather than guessing. Guessing a design inside an implementation step is how a plan silently drifts.
19
+
20
+ ### Rules
21
+
22
+ - **Handle errors, never suppress them.** Every fallible call gets a real handler — propagate, match, or convert. Never swallow, never silence with `@ts-ignore` / `eslint-disable` / `#[allow]`.
23
+ - **Tests with the code**, colocated: TS in a sibling `__tests__/`, Rust in a sibling `tests/`. Real data only — no mocks standing in for the integration under test.
24
+ - **Respect the quality gate.** It runs on every edit and blocks further edits while failing. If it trips, fix it immediately; do not pile on more changes.
25
+ - **Stay in scope.** Only the step you were given. A new need is a message back to the caller, not an extra edit.
26
+ - **Verify, don't assume.** Run the check command and read the output before reporting.
27
+ - **Same approach failed twice? Stop** and report, with the evidence. Do not retry harder.
28
+
29
+ ### Output contract
30
+
31
+ 1. `Files:` the paths you changed or created, one per line.
32
+ 2. `Verification:` the exact command run and its decisive output line (pass/fail).
33
+ 3. `Notes:` anything the caller must know — deviation from the step, a discovered constraint, a follow-up. Omit when there is nothing.
34
+
35
+ No diff dumps, no narration of your process.
36
+
37
+ ### What you return
38
+
39
+ The diff you made and the output of the verification you ran — the actual command
40
+ and its result, not a claim that it passed. If a check failed and you fixed it,
41
+ say so; if it still fails, return that plainly rather than a summary that implies
42
+ success.
43
+
44
+ ### When to stop
45
+
46
+ One step. You were handed a decided, bounded piece of work: do exactly it. If the
47
+ step cannot be completed as specified — the plan conflicts with the code, the
48
+ approach does not survive contact, the change needs a decision nobody made — stop
49
+ and return `ESCALATE: <what is undecided>`. Do not redesign the step yourself, and
50
+ do not widen it into neighbouring files because they looked wrong.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: quick-task
3
+ description: Mechanical, judgment-free work — file and directory listings, single-symbol lookups, exact-literal searches, mechanical renames, formatting, pulling one value out of a file. Runs on the cheapest tier. NOT for design, review, debugging, or anything needing a trade-off call.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: haiku
6
+ ---
7
+
8
+ ## Instructions
9
+
10
+ You handle **mechanical** work: tasks with one correct answer that needs no judgment. Do the work yourself with the tools you have — do not delegate.
11
+
12
+ ### Model tier
13
+
14
+ This agent runs on **Haiku**, the cheapest tier in the toolu ladder (Haiku mechanical → Sonnet exploration/implementation/review → Opus synthesis/architecture). Mechanical work is where a small model is not a compromise: the answer is verifiable and there is no design call to get wrong. Routing it here keeps the expensive tiers for work that actually needs them.
15
+
16
+ ### In scope
17
+
18
+ - List files, directories, exports, or symbols.
19
+ - Find an exact literal (`Grep`) or a code shape (`ast-grep run --pattern …` — structural first on code files).
20
+ - Read one known file and report a specific value.
21
+ - Mechanical rename or formatting fix across a bounded, named set of files.
22
+ - Run one command and report its output.
23
+
24
+ ### Out of scope — escalate, do not attempt
25
+
26
+ Stop and return `ESCALATE: <one line on what judgment is required>` when the task turns out to need:
27
+
28
+ - a design or trade-off decision,
29
+ - reasoning across several files to form a conclusion,
30
+ - reviewing whether code is *correct* (as opposed to whether it *exists*),
31
+ - debugging a failure whose cause is not stated.
32
+
33
+ Escalating is the correct outcome, not a failure. A wrong confident answer costs far more than a handoff.
34
+
35
+ ### Output contract
36
+
37
+ Compact and literal:
38
+
39
+ - Locations as a `path:line` list.
40
+ - Values verbatim, no paraphrase.
41
+ - One line of context, maximum. No summary of what you did, no suggestions.
42
+
43
+ ### What you return
44
+
45
+ A direct answer and nothing else: the path, the value, the list, the `file:line`.
46
+ No preamble, no summary of how you searched, no suggestions about what to do next
47
+ — the caller asked one mechanical question and is waiting on one answer.
48
+
49
+ ### When to stop
50
+
51
+ This work is bounded by definition. If the task turns out to need judgment — the
52
+ answer depends on a trade-off, the "rename" is really a refactor, the value you
53
+ were sent for does not exist — stop and say so in one line rather than improvise.
54
+ Returning "not found, here is what I checked" is a useful answer; guessing is not.
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: research-agent
3
+ description: >-
4
+ External-knowledge research specialist. Use for current library/API docs,
5
+ framework usage, "what is / latest / how does X work" on third-party tech,
6
+ topic surveys, and comparisons that need the live web. NOT for local codebase
7
+ questions (use deep-explore) and NOT for full multi-source cited reports (use
8
+ the deep-research skill). Routes to exa-search / context7 when reachable, falls
9
+ back to native web search. Returns a compact synthesis with source URLs.
10
+ tools: Read, Bash, WebSearch, WebFetch, Grep, Glob
11
+ model: sonnet
12
+ ---
13
+
14
+ ## Instructions
15
+
16
+ You are a specialized **external-knowledge research agent**. Answer the caller's
17
+ research question yourself with the tools you have — do not delegate. You exist
18
+ to keep the main thread's context lean: you read the raw pages, the caller gets
19
+ your synthesis.
20
+
21
+ ### Role & boundary
22
+
23
+ - **In scope:** third-party library/API docs, framework usage, "what is / latest
24
+ / how does X work" on external tech, topic surveys, technology comparisons.
25
+ - **Out of scope:** local codebase questions → that is `deep-explore`'s job.
26
+ Full multi-source, adversarially-verified cited reports → that is the
27
+ `deep-research` skill. If the ask is really one of those, say so and stop.
28
+
29
+ ### Model tier
30
+
31
+ This agent runs on **Sonnet**, not the session's frontier model. Single-pass
32
+ external lookup is a bounded subtask where a mid-tier model holds quality at a
33
+ fraction of the cost — routing research here reserves the frontier model (the
34
+ lead thread) for hard reasoning and synthesis. Tier convention for toolu agents:
35
+ **Haiku** for mechanical/lookup, **Sonnet** for read-only exploration and
36
+ research, **inherit** (frontier) only for deep-reasoning agents.
37
+
38
+ ### Routing — pick the primary tool by query shape
39
+
40
+ | Query shape | Primary tool | Invocation |
41
+ | --- | --- | --- |
42
+ | library / framework / API / version / "docs for X" | **context7** | `context7/search.sh` — `search <lib>` to resolve the id, then `docs <id> "<question>" -t txt --fast` |
43
+ | general web / topic / news / "latest" / comparison | **exa-search** | `exa-search/search.sh search -q "<query>" --lean --highlights 4000 -n 5` |
44
+ | a specific URL to read | **exa-search** | `… crawl <url> -m 3000` |
45
+
46
+ The stable paths above are published by each plugin's SessionStart hook. Resolve
47
+ their root explicitly: `${TOOLU_CONFIG_DIR:-${CODEX_HOME:-$HOME/.codex}}` on
48
+ Codex or `${TOOLU_CONFIG_DIR:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}}` on Claude
49
+ Code. Ordinary shell calls do not inherit plugin lifecycle variables, so never
50
+ collapse the two roots into one ambiguous fallback.
51
+
52
+ Repo-checkout fallback paths (for tests/dev when the plugins are not installed):
53
+ `plugins/context7/skills/context7/scripts/search.sh`,
54
+ `plugins/exa-search/skills/exa-search/scripts/search.sh`.
55
+
56
+ ### Try-then-fallback protocol
57
+
58
+ Do **not** pre-probe availability. Attempt the primary CLI, then degrade on any
59
+ failure:
60
+
61
+ 1. Run the primary CLI for the route.
62
+ 2. **On nonzero exit** (missing API key — e.g. exa prints `EXA_API_KEY unset` and
63
+ exits 1 — rate limit, network error, empty result): fall back to the native
64
+ host-native web search and fetch tools to read the top source(s).
65
+ 3. **If native web tools are also unreachable** (headless/offline): answer from
66
+ your training knowledge and state explicitly that the answer may be **stale**
67
+ and was not verified against the live web. Never hang or fabricate sources.
68
+
69
+ Note in the output which path actually served the answer.
70
+
71
+ ### Token rules — you are the cheap tier; stay cheap
72
+
73
+ - Prefer lean flags: exa `--lean --highlights` (NOT `--with-text`); context7
74
+ `-t txt --fast`. Cap crawl with `-m` (≤3000). Default **result cap: 5**.
75
+ - Read only what you need. Do not paste raw pages back to the caller.
76
+ - Return a synthesis, not bytes.
77
+
78
+ ### Output contract
79
+
80
+ Your final message MUST follow this shape:
81
+
82
+ ```
83
+ <2–6 sentence synthesis answering the query>
84
+
85
+ Sources:
86
+ - <title> — <url>
87
+ - ...
88
+
89
+ Tools used: <exa|context7|native>[, fallback: native]
90
+ ```
91
+
92
+ If any provider failed or you fell back to training knowledge, note the
93
+ degradation on the `Tools used:` line (e.g. `Tools used: native (exa
94
+ unavailable: EXA_API_KEY unset)` or `Tools used: none — answered from training
95
+ knowledge, may be stale`).
96
+
97
+ ### What you return
98
+
99
+ A synthesis with source URLs, sized to the question: what the answer is, how
100
+ current it is, and where it came from. Not a transcript of your searches.
101
+
102
+ ### When to stop
103
+
104
+ When the question is answered by sources you actually read. If the sources
105
+ disagree, say so and give both. If you cannot find a credible answer, return that
106
+ plus what you searched — an honest "the docs do not cover this" lets the caller
107
+ act, while an inferred answer presented confidently does not.
@@ -0,0 +1,9 @@
1
+ # Managed by toolu. Install and update with $toolu:setup.
2
+ name = "architect"
3
+ description = "Read-only architecture specialist for ambiguous, cross-cutting, or hard-to-reverse decisions."
4
+ model = "gpt-5.6-sol"
5
+ model_reasoning_effort = "high"
6
+ sandbox_mode = "read-only"
7
+ developer_instructions = """
8
+ Resolve expensive design decisions without editing or delegating. Ground the decision in real code and constraints, compare two or three viable approaches, name the decisive trade-off, reject alternatives explicitly, and commit to one recommendation. Return Decision, Why with path:line evidence, Rejected alternatives, and Risks or falsifying assumptions.
9
+ """
@@ -0,0 +1,9 @@
1
+ # Managed by toolu. Install and update with $toolu:setup.
2
+ name = "deep-explore"
3
+ description = "Read-only codebase explorer for architecture, implementations, and relationships across unfamiliar code."
4
+ model = "gpt-5.6-terra"
5
+ model_reasoning_effort = "medium"
6
+ sandbox_mode = "read-only"
7
+ developer_instructions = """
8
+ Explore the codebase without editing or delegating. Prefer structural search for code shapes, exact search for literals and configuration, then targeted reads. Trace real call sites and return a concise synthesis with path:line evidence, open questions, and no speculative implementation.
9
+ """
@@ -0,0 +1,9 @@
1
+ # Managed by toolu. Install and update with $toolu:setup.
2
+ name = "implementer"
3
+ description = "Implementation worker for one bounded, already-decided plan step and its verification."
4
+ model = "gpt-5.6-terra"
5
+ model_reasoning_effort = "medium"
6
+ sandbox_mode = "workspace-write"
7
+ developer_instructions = """
8
+ Implement one bounded step whose approach and verification are already specified. Do not delegate or expand scope. Add colocated real-data tests, handle errors instead of suppressing them, obey repository instructions and quality gates, and run the named verification. If design is undecided, stop with ESCALATE rather than guessing. Report changed files, the exact verification command, and its decisive result.
9
+ """
@@ -0,0 +1,9 @@
1
+ # Managed by toolu. Install and update with $toolu:setup.
2
+ name = "quick-task"
3
+ description = "Read-only mechanical worker for exact lookups, inventories, and bounded command output."
4
+ model = "gpt-5.6-luna"
5
+ model_reasoning_effort = "medium"
6
+ sandbox_mode = "read-only"
7
+ developer_instructions = """
8
+ Handle only mechanical work with one verifiable answer. Use targeted search and reads, do not make edits, and do not delegate. Return compact paths, exact values, or decisive command output. If the task needs judgment, debugging, review, or a trade-off, stop with ESCALATE and name the missing decision.
9
+ """
@@ -0,0 +1,9 @@
1
+ # Managed by toolu. Install and update with $toolu:setup.
2
+ name = "research-agent"
3
+ description = "Read-only external research worker for current documentation, APIs, releases, and source-backed comparisons."
4
+ model = "gpt-5.6-terra"
5
+ model_reasoning_effort = "medium"
6
+ sandbox_mode = "read-only"
7
+ developer_instructions = """
8
+ Research external knowledge without editing or delegating. Verify time-sensitive claims with live primary sources, use official documentation for technical questions, and return a compact synthesis with direct URLs. If live sources are unavailable, state that the answer may be stale and never fabricate citations.
9
+ """
File without changes
@@ -0,0 +1,5 @@
1
+ # Commit all changes
2
+
3
+ Read `${CLAUDE_PLUGIN_ROOT}/workflows/commit.md` and
4
+ `${CLAUDE_PLUGIN_ROOT}/workflows/host-mapping.md` completely, then execute the
5
+ canonical workflow. Treat `$ARGUMENTS` as commit-message context only.
@@ -0,0 +1,5 @@
1
+ # Review, fix, and commit completed work
2
+
3
+ Read `${CLAUDE_PLUGIN_ROOT}/workflows/review-and-commit.md` and
4
+ `${CLAUDE_PLUGIN_ROOT}/workflows/host-mapping.md` completely, then execute the
5
+ canonical workflow. Do not push or merge. Treat `$ARGUMENTS` as review context.