@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,221 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Exa API CLI — search, crawl, and find similar content
5
+ # Usage: ./search.sh <command> [options]
6
+ #
7
+ # Reads EXA_API_KEY from the environment (never from .env).
8
+
9
+ command -v jq >/dev/null 2>&1 || { echo "exa-search: jq required" >&2; exit 1; }
10
+ command -v curl >/dev/null 2>&1 || { echo "exa-search: curl required" >&2; exit 1; }
11
+
12
+ EXA_API_KEY="${EXA_API_KEY:-}"
13
+ EXA_URL="https://api.exa.ai"
14
+
15
+ if [[ -z "$EXA_API_KEY" ]]; then
16
+ echo "exa-search: EXA_API_KEY unset" >&2
17
+ exit 1
18
+ fi
19
+
20
+ exa_post() {
21
+ local endpoint="$1"
22
+ local body="$2"
23
+ curl -sS --fail-with-body \
24
+ -X POST "$EXA_URL/$endpoint" \
25
+ -H "x-api-key: $EXA_API_KEY" \
26
+ -H "Content-Type: application/json" \
27
+ -H "Accept: application/json" \
28
+ -d "$body"
29
+ }
30
+
31
+ # ── search ──────────────────────────────────────────────────
32
+ cmd_search() {
33
+ local query="" num_results=10 search_type="auto" category=""
34
+ local include_domains="" exclude_domains=""
35
+ local start_date="" end_date=""
36
+ local include_text="" exclude_text=""
37
+ local highlights_chars=4000 with_text="false" lean="false"
38
+
39
+ while [[ $# -gt 0 ]]; do
40
+ case "$1" in
41
+ -q|--query) query="$2"; shift 2;;
42
+ -n|--num-results) num_results="$2"; shift 2;;
43
+ -t|--type) search_type="$2"; shift 2;;
44
+ -c|--category) category="$2"; shift 2;;
45
+ --include-domains) include_domains="$2"; shift 2;;
46
+ --exclude-domains) exclude_domains="$2"; shift 2;;
47
+ --start-date) start_date="$2"; shift 2;;
48
+ --end-date) end_date="$2"; shift 2;;
49
+ --include-text) include_text="$2"; shift 2;;
50
+ --exclude-text) exclude_text="$2"; shift 2;;
51
+ --highlights) highlights_chars="$2"; shift 2;;
52
+ --with-text) with_text="true"; shift;;
53
+ --lean) lean="true"; shift;;
54
+ *)
55
+ # treat bare arg as query
56
+ if [[ -z "$query" ]]; then query="$1"; shift
57
+ else echo "Unknown option: $1" >&2; exit 1; fi
58
+ ;;
59
+ esac
60
+ done
61
+
62
+ if [[ -z "$query" ]]; then
63
+ echo "Usage: search.sh search -q <query> [options]" >&2
64
+ echo " -n, --num-results Number of results (default: 10)" >&2
65
+ echo " -t, --type instant|fast|auto|deep-lite|deep|deep-reasoning (default: auto)" >&2
66
+ echo " -c, --category company|research paper|news|personal site|financial report|people" >&2
67
+ echo " --include-domains Comma-separated domains to include" >&2
68
+ echo " --exclude-domains Comma-separated domains to exclude" >&2
69
+ echo " --start-date Start published date (YYYY-MM-DD)" >&2
70
+ echo " --end-date End published date (YYYY-MM-DD)" >&2
71
+ echo " --include-text Text that must appear in results" >&2
72
+ echo " --exclude-text Text to exclude from results" >&2
73
+ echo " --highlights N Max highlight chars (default: 4000)" >&2
74
+ echo " --with-text Include full text in results" >&2
75
+ echo " --lean Strip image/favicon/subpages/entities for AI prompts" >&2
76
+ exit 1
77
+ fi
78
+
79
+ # Build JSON with jq to handle escaping properly
80
+ local body
81
+ body=$(jq -n \
82
+ --arg q "$query" \
83
+ --arg t "$search_type" \
84
+ --argjson n "$num_results" \
85
+ --argjson hc "$highlights_chars" \
86
+ --argjson wt "$with_text" \
87
+ '{query: $q, type: $t, numResults: $n, contents: {highlights: {maxCharacters: $hc}}}
88
+ | if $wt then .contents.text = true else . end')
89
+
90
+ # Add optional fields
91
+ if [[ -n "$category" ]]; then
92
+ body=$(echo "$body" | jq --arg c "$category" '.category = $c')
93
+ fi
94
+ if [[ -n "$include_domains" ]]; then
95
+ body=$(echo "$body" | jq --arg d "$include_domains" '.includeDomains = ($d | split(","))')
96
+ fi
97
+ if [[ -n "$exclude_domains" ]]; then
98
+ body=$(echo "$body" | jq --arg d "$exclude_domains" '.excludeDomains = ($d | split(","))')
99
+ fi
100
+ if [[ -n "$start_date" ]]; then
101
+ body=$(echo "$body" | jq --arg d "${start_date}T00:00:00.000Z" '.startPublishedDate = $d')
102
+ fi
103
+ if [[ -n "$end_date" ]]; then
104
+ body=$(echo "$body" | jq --arg d "${end_date}T00:00:00.000Z" '.endPublishedDate = $d')
105
+ fi
106
+ if [[ -n "$include_text" ]]; then
107
+ body=$(echo "$body" | jq --arg t "$include_text" '.includeText = [$t]')
108
+ fi
109
+ if [[ -n "$exclude_text" ]]; then
110
+ body=$(echo "$body" | jq --arg t "$exclude_text" '.excludeText = [$t]')
111
+ fi
112
+
113
+ if [[ "$lean" == "true" ]]; then
114
+ exa_post "search" "$body" | jq '{
115
+ requestId,
116
+ results: [(.results // [])[] | {
117
+ title,
118
+ url,
119
+ publishedDate,
120
+ author,
121
+ highlights,
122
+ text,
123
+ summary
124
+ } | with_entries(select(.value != null and .value != ""))]
125
+ }'
126
+ else
127
+ exa_post "search" "$body" | jq '.'
128
+ fi
129
+ }
130
+
131
+ # ── crawl ───────────────────────────────────────────────────
132
+ cmd_crawl() {
133
+ local max_chars=3000
134
+ local urls=()
135
+
136
+ while [[ $# -gt 0 ]]; do
137
+ case "$1" in
138
+ -m|--max-chars) max_chars="$2"; shift 2;;
139
+ *) urls+=("$1"); shift;;
140
+ esac
141
+ done
142
+
143
+ if [[ ${#urls[@]} -eq 0 ]]; then
144
+ echo "Usage: search.sh crawl <url> [url...] [-m max_chars]" >&2
145
+ echo " Extracts content from one or more URLs" >&2
146
+ echo " -m, --max-chars Max characters per page (default: 3000)" >&2
147
+ exit 1
148
+ fi
149
+
150
+ # Build URL array as JSON
151
+ local urls_json
152
+ urls_json=$(printf '%s\n' "${urls[@]}" | jq -R . | jq -s .)
153
+
154
+ local body
155
+ body=$(jq -n \
156
+ --argjson mc "$max_chars" \
157
+ --argjson urls "$urls_json" \
158
+ '{urls: $urls, text: true, highlights: {maxCharacters: $mc}}')
159
+
160
+ exa_post "contents" "$body" | jq '.'
161
+ }
162
+
163
+ # ── similar ─────────────────────────────────────────────────
164
+ cmd_similar() {
165
+ local url="" num_results=10 highlights_chars=4000
166
+
167
+ while [[ $# -gt 0 ]]; do
168
+ case "$1" in
169
+ -n|--num-results) num_results="$2"; shift 2;;
170
+ --highlights) highlights_chars="$2"; shift 2;;
171
+ *)
172
+ if [[ -z "$url" ]]; then url="$1"; shift
173
+ else echo "Unknown option: $1" >&2; exit 1; fi
174
+ ;;
175
+ esac
176
+ done
177
+
178
+ if [[ -z "$url" ]]; then
179
+ echo "Usage: search.sh similar <url> [-n num_results]" >&2
180
+ echo " Finds pages similar to the given URL" >&2
181
+ echo " -n, --num-results Number of results (default: 10)" >&2
182
+ echo " --highlights N Max highlight chars (default: 4000)" >&2
183
+ exit 1
184
+ fi
185
+
186
+ local body
187
+ body=$(jq -n \
188
+ --arg u "$url" \
189
+ --argjson n "$num_results" \
190
+ --argjson hc "$highlights_chars" \
191
+ '{url: $u, numResults: $n, contents: {highlights: {maxCharacters: $hc}}}')
192
+
193
+ exa_post "findSimilar" "$body" | jq '.'
194
+ }
195
+
196
+ # ── main ────────────────────────────────────────────────────
197
+ usage() {
198
+ echo "Exa Search CLI" >&2
199
+ echo "" >&2
200
+ echo "Usage: search.sh <command> [options]" >&2
201
+ echo "" >&2
202
+ echo "Environment:" >&2
203
+ echo " EXA_API_KEY Required. Exa API key." >&2
204
+ echo "" >&2
205
+ echo "Commands:" >&2
206
+ echo " search Search the web (default if no command given)" >&2
207
+ echo " crawl Extract content from URLs" >&2
208
+ echo " similar Find pages similar to a URL" >&2
209
+ echo "" >&2
210
+ echo "Run 'search.sh <command>' with no args for command-specific help." >&2
211
+ exit 1
212
+ }
213
+
214
+ case "${1:-}" in
215
+ -h|--help|"") usage;;
216
+ search) shift; cmd_search "$@";;
217
+ crawl) shift; cmd_crawl "$@";;
218
+ similar) shift; cmd_similar "$@";;
219
+ # bare query — default to search
220
+ *) cmd_search "$@";;
221
+ esac
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "jev",
3
+ "version": "6.8.0",
4
+ "description": "Typed judgments from TypeSafe's Jev model at runtime (skill + REST wrapper) — yes/no probabilities, choices, and scores a script can branch on. Standalone, no dependencies.",
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
+ "typesafe",
15
+ "jev",
16
+ "judgment",
17
+ "skills"
18
+ ]
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "jev",
3
+ "version": "6.8.0",
4
+ "description": "Typed judgments from TypeSafe's Jev model at runtime (skill + REST wrapper) — yes/no probabilities, choices, and scores a script can branch on. Standalone, no dependencies.",
5
+ "skills": "./skills/",
6
+ "hooks": "./hooks/hooks.json"
7
+ }
@@ -0,0 +1,61 @@
1
+ # jev
2
+
3
+ Typed judgments from TypeSafe's Jev model at runtime (skill + REST wrapper) — yes/no probabilities, choices, and scores a script can branch on.
4
+
5
+ ## Install
6
+
7
+ Claude Code:
8
+
9
+ ```text
10
+ /plugin marketplace add Falconiere/toolu
11
+ /plugin install jev@toolu
12
+ ```
13
+
14
+ Codex:
15
+
16
+ ```bash
17
+ codex plugin marketplace add Falconiere/toolu
18
+ codex plugin add jev@toolu
19
+ ```
20
+
21
+ Restart the host after installation. In Codex, review and trust the installed
22
+ hook through `/hooks`; installation alone does not trust hooks. Both hosts
23
+ need `curl`, `jq`, and `TYPESAFE_API_KEY` in their launch environment.
24
+
25
+ Standalone, no plugin dependencies.
26
+
27
+ ## What it provides
28
+
29
+ - **`jev` skill** — mandatory when semantic decisions exist: gather evidence, call before the decision it informs, and reassess after new evidence, failed hypotheses, or changed requirements. Batch independent questions and reuse unchanged results.
30
+ - **`jev.sh` wrapper** — `noul` (probability of yes), `choice` (pick one, with the full distribution), `score` (rate on your own ordered levels), and `ask` (many questions in one call).
31
+ - **SessionStart hook** — publishes `jev.sh` at `<config-dir>/jev/jev.sh` and injects the full mandate on startup, resume, clear, and compaction. It checks local prerequisites and makes no API call.
32
+ - **UserPromptSubmit hook** — restates the mandate on every prompt so it survives long sessions; silent for trivial confirmations and when prerequisites are missing (SessionStart already reported them). No API call.
33
+
34
+ ## Wiring
35
+
36
+ The wrapper calls TypeSafe's single evaluation endpoint,
37
+ `POST https://api.typesafe.ai/v1/systemone`, with `curl` and `jq` — no SDK.
38
+
39
+ Set `TYPESAFE_API_KEY` in your environment (keys: `https://console.typesafe.ai/settings/keys`);
40
+ it is never read from a `.env` file. `JEV_TIMEOUT` overrides the 60-second timeout
41
+ per attempt. Model defaults to `jev-latest`.
42
+
43
+ Full CLI reference and usage guidance: [`skills/jev/SKILL.md`](skills/jev/SKILL.md).
44
+ Executable [problem-solving examples](skills/jev/references/problem-solving.md) cover search, debugging, planning, and review with uncertainty and no-match handling.
45
+ Plugin page: [`docs/jev/README.md`](../../docs/jev/README.md).
46
+
47
+ ## Wrapper reference
48
+
49
+ Text input only; preprocess other formats. Context: 64k tokens/request, 32k for
50
+ state + longest question. Slice large inputs. English is the primary training language.
51
+
52
+ `@FILE`/stdin become structured state only for a JSON object/array; other values
53
+ stay strings. Default output is `.answers`; `--raw` includes model/token usage.
54
+ Missing/invalid answers fail explicitly.
55
+
56
+ Retries: at most three attempts for timeout, connection failure, HTTP 408/429/5xx;
57
+ 1s then 2s backoff. `Retry-After` seconds or `retry-after-ms` up to 60s is honored;
58
+ longer waits surface the error. Other 4xx, including 401/422, are not retried.
59
+
60
+ Exit codes: `1` usage/config/invalid response; `22` HTTP error (body on stderr);
61
+ `28` timeout. `JEV_TIMEOUT` sets timeout per attempt (default 60s).
@@ -0,0 +1,25 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\""
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/user-prompt-submit.sh\""
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env bash
2
+ # Shared by jev's hooks. Resolves the host-native config root, the stable
3
+ # published wrapper path, and the local prerequisites, and emits hook output.
4
+ # No network calls: everything here must be safe to run on every prompt.
5
+ #
6
+ # Source via: . "$HOOK_DIR/lib/common.sh"
7
+
8
+ # jev_config_root -> writable config root for the active host.
9
+ # An explicit TOOLU_CONFIG_DIR wins; Codex is detected by TOOLU_HOST_OVERRIDE
10
+ # or by its native PLUGIN_ROOT variable; otherwise Claude Code.
11
+ jev_config_root() {
12
+ if [ -n "${TOOLU_CONFIG_DIR:-}" ]; then
13
+ printf '%s\n' "$TOOLU_CONFIG_DIR"
14
+ elif [ "${TOOLU_HOST_OVERRIDE:-}" = codex ] ||
15
+ { [ -z "${TOOLU_HOST_OVERRIDE:-}" ] && [ -n "${PLUGIN_ROOT:-}" ]; }; then
16
+ printf '%s\n' "${CODEX_HOME:-$HOME/.codex}"
17
+ else
18
+ printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
19
+ fi
20
+ }
21
+
22
+ # jev_published_path -> the stable wrapper path the agent's shell can reach.
23
+ jev_published_path() {
24
+ printf '%s/jev/jev.sh\n' "$(jev_config_root)"
25
+ }
26
+
27
+ # jev_missing_prereqs WRAPPER -> space-prefixed list of what is missing, or "".
28
+ jev_missing_prereqs() {
29
+ local dst="$1" missing="" tool
30
+ for tool in jq curl; do
31
+ command -v "$tool" >/dev/null 2>&1 || missing="$missing $tool"
32
+ done
33
+ [ -n "${TYPESAFE_API_KEY:-}" ] || missing="$missing TYPESAFE_API_KEY"
34
+ [ -x "$dst" ] || missing="$missing executable-wrapper"
35
+ printf '%s' "$missing"
36
+ }
37
+
38
+ # jev_emit EVENT CONTEXT -> hookSpecificOutput JSON; plain text without jq.
39
+ # Both hosts accept the JSON shape for SessionStart and UserPromptSubmit.
40
+ jev_emit() {
41
+ local event="$1" context="$2"
42
+ [ -n "$context" ] || return 0
43
+ if command -v jq >/dev/null 2>&1; then
44
+ jq -nc --arg event "$event" --arg context "$context" \
45
+ '{hookSpecificOutput: {hookEventName: $event, additionalContext: $context}}'
46
+ else
47
+ printf '%s\n' "$context"
48
+ fi
49
+ }
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart hook — publish the jev wrapper at a STABLE, env-independent
3
+ # path. See exa-search's session-start.sh for the same fix rationale:
4
+ # ${CLAUDE_PLUGIN_ROOT} is exported to hook subprocesses only — NOT to the
5
+ # agent's Bash tool subshell — so a SKILL.md path of
6
+ # "${CLAUDE_PLUGIN_ROOT}/skills/jev/scripts/jev.sh" expands to
7
+ # "/skills/.../jev.sh: No such file" when an agent pastes it. Symlink the
8
+ # wrapper to ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/jev/jev.sh instead.
9
+ # Refreshed every session; inject the mandate without network calls.
10
+ set -euo pipefail
11
+
12
+ # Consume stdin so Claude Code's hook IPC never stalls.
13
+ cat >/dev/null 2>&1 || true
14
+
15
+ HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
16
+ # Fail soft on a corrupted install: a missing lib must never break the session.
17
+ [ -f "$HOOK_DIR/lib/common.sh" ] || exit 0
18
+ # shellcheck source=lib/common.sh
19
+ . "$HOOK_DIR/lib/common.sh"
20
+
21
+ plugin_dir="$(cd "$HOOK_DIR/.." 2>/dev/null && pwd)"
22
+ src="${plugin_dir:+$plugin_dir/skills/jev/scripts/jev.sh}"
23
+ [ -n "$src" ] && [ -f "$src" ] || exit 0
24
+
25
+ reg_root="$(jev_config_root)/jev"
26
+ mkdir -p "$reg_root" 2>/dev/null || { echo "jev: cannot create $reg_root — wrapper not published" >&2; exit 0; }
27
+
28
+ dst="$reg_root/jev.sh"
29
+ if [ -L "$dst" ] || [ ! -e "$dst" ]; then
30
+ ln -sf "$src" "$dst" 2>/dev/null || { echo "jev: cannot publish $dst" >&2; exit 0; }
31
+ fi
32
+
33
+ # This plugin owns its mandate so first-session delivery does not depend on
34
+ # the core plugin, hook ordering, or the model choosing to load a skill. The
35
+ # UserPromptSubmit hook repeats a shorter form on every task so the rule
36
+ # survives long sessions; this is the full statement.
37
+ missing="$(jev_missing_prereqs "$dst")"
38
+ if [ -n "$missing" ]; then
39
+ context="Jev unavailable (missing:$missing). Set TYPESAFE_API_KEY in the agent's launch environment and install curl/jq. Jev is mandatory on every task once available; until then, state the limitation once per task and use an explicit reasoning/evidence fallback; never invent a Jev result. Do not read credentials from .env."
40
+ else
41
+ context="Jev is mandatory on every task containing semantic decisions. After initial exploration, identify useful judgments over supplied evidence; you MUST call \"$dst\" before the decision it informs. Reassess after new evidence, failed hypotheses, or changed requirements. Batch independent questions in one ask call. Reuse unchanged evidence and questions rather than repeating calls. If a task has no semantic decision, say so in one sentence rather than skipping silently. Syntax and linked examples: $plugin_dir/skills/jev/SKILL.md. Keep exact rules, tests, and code verification deterministic. On service failure, state the limitation and use an explicit evidence fallback. Jev never replaces tests or authorization."
42
+ fi
43
+ jev_emit SessionStart "$context"
44
+
45
+ exit 0
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+ # UserPromptSubmit hook — restate the Jev mandate on every task.
3
+ #
4
+ # SessionStart states the full rule once per startup, resume, clear, and
5
+ # compaction, but a long session drifts away from it. Each user prompt is a
6
+ # task, so each one gets a short reminder naming the published wrapper. No
7
+ # network calls; the hook only checks local prerequisites, exactly like
8
+ # SessionStart.
9
+ #
10
+ # Silent cases, deliberately:
11
+ # - trivial confirmations (y / ok / lgtm ...) are not tasks;
12
+ # - missing prerequisites — SessionStart already reported them, repeating
13
+ # the same failure on every prompt is noise the agent cannot act on.
14
+ set -euo pipefail
15
+
16
+ HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
17
+ # Fail soft on a corrupted install: a missing lib must never break the session.
18
+ [ -f "$HOOK_DIR/lib/common.sh" ] || exit 0
19
+ # shellcheck source=lib/common.sh
20
+ . "$HOOK_DIR/lib/common.sh"
21
+
22
+ input=$(cat 2>/dev/null || true)
23
+ prompt=""
24
+ if command -v jq >/dev/null 2>&1; then
25
+ prompt=$(jq -r '.prompt // ""' <<<"$input" 2>/dev/null || true)
26
+ fi
27
+ [ -n "$prompt" ] || exit 0
28
+
29
+ prompt_lower=$(printf '%s' "$prompt" | tr '[:upper:]' '[:lower:]')
30
+ if [[ "$prompt_lower" =~ ^[[:space:]]*(y|n|yes|no|ok|okay|sure|thanks|thank\ you|go\ ahead|looks\ good|lgtm|correct|exactly|right|done|nah|nope|yep|yup|continue)[\.\!\?]?[[:space:]]*$ ]]; then
31
+ exit 0
32
+ fi
33
+
34
+ plugin_dir="$(cd "$HOOK_DIR/.." 2>/dev/null && pwd)"
35
+ dst="$(jev_published_path)"
36
+ [ -z "$(jev_missing_prereqs "$dst")" ] || exit 0
37
+
38
+ context="Jev is mandatory for this task when it contains semantic decisions. After initial exploration, identify useful judgments over supplied evidence; you MUST call \"$dst\" before the decision it informs. Reassess after new evidence, failed hypotheses, or changed requirements. Batch independent questions in one ask call. Reuse unchanged evidence and questions rather than repeating calls. If a task has no semantic decision, say so in one sentence rather than skipping silently. Syntax and linked examples: $plugin_dir/skills/jev/SKILL.md. On failure, state the limitation and use an evidence fallback; Jev never replaces tests or authorization."
39
+ jev_emit UserPromptSubmit "$context"
40
+
41
+ exit 0
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: jev
3
+ description: Mandatory for semantic decisions during search, debugging, planning, execution, and review — classify, rank, rate, route, or assess supplied evidence.
4
+ ---
5
+
6
+ # Jev: typed judgments
7
+
8
+ ## When to call
9
+
10
+ **Semantic decision + Jev available → MUST call before that decision.**
11
+ Explore first; supply evidence, candidates, and criteria. Reassess after new
12
+ evidence, failed hypotheses, or changed requirements. Batch independent questions
13
+ in one `ask`; wait for evidence/answers needed by dependent questions. Reuse
14
+ results while evidence, questions, and criteria are unchanged. No call quotas.
15
+
16
+ No semantic decision → say so once. Missing plugin, credentials, or service →
17
+ state limitation once per task; continue with explicit evidence-based reasoning.
18
+ Never invent results. Architecture, exact checks, arithmetic, reproduction,
19
+ tests, correctness, and authorization stay with the agent/tools.
20
+
21
+ ## CLI
22
+
23
+ Requires `curl`, `jq`, environment `TYPESAFE_API_KEY`; never read `.env`.
24
+ Use the active host's published wrapper; plugin lifecycle variables are unavailable
25
+ in ordinary shells:
26
+
27
+ ```bash
28
+ # Codex
29
+ JEV="${TOOLU_CONFIG_DIR:-${CODEX_HOME:-$HOME/.codex}}/jev/jev.sh"
30
+ # Claude Code: use this assignment instead
31
+ # JEV="${TOOLU_CONFIG_DIR:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}}/jev/jev.sh"
32
+ ```
33
+
34
+ Repository fallback, when not installed: `plugins/jev/skills/jev/scripts/jev.sh`.
35
+
36
+ ```text
37
+ "$JEV" noul "question" -s STATE [--true DESC] [--false DESC]
38
+ "$JEV" choice "question" -s STATE -o KEY=DESC -o KEY=DESC
39
+ "$JEV" score "question" -s STATE -l "lowest situation" -l "highest situation"
40
+ "$JEV" ask questions.json -s STATE
41
+ ```
42
+
43
+ - `-s/--state`: literal text, `@FILE`, or `-` (stdin). Required.
44
+ - `ask`: question-map JSON file or `-` (stdin); keys become answer IDs. Each
45
+ question needs `type` and `instructions`; `criteria` is required for Choice/Score,
46
+ optional for Noul.
47
+ Structured instructions/criteria use `ask`; other commands take strings.
48
+ - Options: `-m/--model` (default `jev-latest`), `--raw` (model/usage),
49
+ `--id` (default `q`; single-question commands only).
50
+ - Choice: `-o/--option`, 2–255 options; bare `-o KEY` omits description.
51
+ Score: `-l/--level`, 2–10 levels,
52
+ lowest first. Read returned legend; fractional Scores are not exact quantities.
53
+ - Output: answer map (`noul`, or `choice`/`score` plus probabilities/confidence).
54
+ Nonzero exit → fallback, never interpret absent output as a judgment.
55
+
56
+ ## Question contract
57
+
58
+ - Minimal named evidence; reference fields explicitly, e.g. `source.text`.
59
+ - Exact condition + boundary criteria; instructions and criteria must agree.
60
+ Meaning belongs here, not in IDs (the model never sees IDs).
61
+ - Split independently useful judgments; keep context for coherent judgments
62
+ such as claim/source support. High Noul = stated condition holds.
63
+ - Score levels: self-contained situations, e.g. “Feature broken; workaround
64
+ exists”. Avoid bare numbers or “worse than previous”.
65
+ - Include no-match/insufficient-evidence outcomes when candidates may not fit.
66
+ - Choice probabilities are relative alternatives; graded relevance needs
67
+ comparable per-candidate Scores. Check answer existence separately from rank.
68
+ - Noul near 0.5 = uncertainty. Choice/Score confidence = concentration, not
69
+ correctness. Inspect uncertain/conflicting results; gather missing evidence.
70
+ - Calibrate thresholds on representative data, separately per question/type;
71
+ `P(yes)` need not equal `1-P(not yes)`. Pin model when thresholds depend on it.
72
+ - Record useful evidence → question → answer → next action. Use `--raw` for
73
+ model/usage evaluation; extra questions cost tokens.
74
+
75
+ ## Load on demand
76
+
77
+ - Need a pattern: read Setup + the matching section in
78
+ [problem-solving](references/problem-solving.md), not all examples.
79
+ - Need transport limits/errors: [wrapper reference](../../README.md#wrapper-reference).
80
+ - Designing new question formats: check relevant [live docs](https://docs.typesafe.ai/llms.txt).
81
+ - Evaluation only: [record and scenarios](evals/README.md).
@@ -0,0 +1,98 @@
1
+ # Ongoing problem-solving evaluation
2
+
3
+ Manual, opt-in evaluation; never part of hermetic CI. Requires an existing
4
+ `TYPESAFE_API_KEY` in the launch environment. Do not read `.env` or record keys.
5
+
6
+ ## Repeat
7
+
8
+ 1. Run setup and the search, debugging (both evidence sets), planning, and review
9
+ blocks in [problem-solving.md](../references/problem-solving.md), using the
10
+ existing wrapper. Retain the scratch results until session evaluation ends.
11
+ 2. In a fresh agent session, load the updated skill and reference. Ask it to
12
+ select and record its next action, not just report the model's answers:
13
+ - Search: replace the query with “What telescope aperture is recommended to
14
+ resolve the rings of Saturn?” Keep the same two excerpts. Change the Noul
15
+ criteria to require an aperture recommendation. Score each excerpt on the
16
+ same levels: “Unrelated to telescopes or observing Saturn”, “Discusses
17
+ observing Saturn but omits an aperture recommendation”, “Supplies the
18
+ requested telescope aperture recommendation”. Neither excerpt matches.
19
+ - Debugging: supply the first observations, record the chosen experiment,
20
+ then supply the explicitly synthetic new observations. Record whether the
21
+ agent abandons the first hypothesis and chooses a discriminating experiment.
22
+ - Reuse: move the unchanged planning evidence and questions to review with
23
+ the saved answer. Check that the agent reuses it without another call.
24
+ - Unavailable: invoke the wrapper with `env -u TYPESAFE_API_KEY`, then ask
25
+ the agent to continue from the supplied evidence and record its fallback.
26
+ 3. Inspect the raw model, usage, choices, uncertainty, and decision impact. Do
27
+ not assert exact probabilities. A plausible classification alone does not
28
+ pass a case: it must lead to an appropriate next action or explicit fallback.
29
+
30
+ No application is included in these examples. Actual debugging experiments and
31
+ technical feasibility checks need a real target; do not report them as executed.
32
+ Installed-host hook lifecycle behavior is separately covered by the hook tests.
33
+
34
+ ## Observed run — 2026-09-21
35
+
36
+ The parent Codex session ran the documented shell blocks through the repository
37
+ wrapper with real API calls. `jev-latest` resolved to `jev-1.13.0`. Five requests
38
+ used 2,641 input and 254 output tokens; results below are observations, not
39
+ thresholds or guarantees.
40
+
41
+ | Case | Observed answer | Decision impact |
42
+ | --- | --- | --- |
43
+ | Search, retention query | Existence 0.03; access relevance 1, billing 0 on a 0–2 rubric | Read access first but seek retention policy; neither excerpt supplies a duration. |
44
+ | Debug, initial evidence | `cache`, confidence 0.97 | Prioritize disabling cache in the affected profile. |
45
+ | Debug, changed evidence | `insufficient`, confidence 0.92 | Drop the supplied hypotheses as complete explanations; propose an override removal/restoration experiment. |
46
+ | Planning | `worker` for both preferences | Prefer the existing worker under stated assumptions; technical checks still required. |
47
+ | Review | `contradicts` | Correct the claim against the full policy passage; verify provenance separately. |
48
+
49
+ A separate fresh Codex agent session then read the updated guidance and performed
50
+ three more real calls (1,660 input / 137 output tokens, same model):
51
+
52
+ | Session case | Observed behavior and next action |
53
+ | --- | --- |
54
+ | No relevant search match | Existence 0.01 and both Scores 0. Rejected both excerpts and ran a targeted local search for telescope/Saturn/astronomy; no matches. Reported the corpus gap rather than inventing an answer. |
55
+ | Debug with new evidence | Selected cache first, then `insufficient` (confidence 0.88). Changed the proposed experiment to isolating the saved label override; did not claim the synthetic bug was reproduced. |
56
+ | Unchanged planning evidence | Read saved state, questions, and answers. Reused both worker judgments with zero new planning API calls; retained capacity/retry/requirements checks as next steps. |
57
+ | Missing credentials | Actual wrapper exit 1, `jev: TYPESAFE_API_KEY unset`, empty stdout. Compared observations manually and chose the override experiment with explicit reasons, without inventing a result. |
58
+
59
+ One earlier design-comparison call chose preserving the old initial-call demand
60
+ with confidence 0.56, contrary to the user's explicit plan. The implementing
61
+ agent rejected that recommendation after inspecting the conflict. This is also
62
+ evidence for keeping user requirements and technical verification authoritative.
63
+
64
+ Limits: these were real agent/API sessions over controlled synthetic evidence,
65
+ not installed-host end-to-end sessions or production accuracy measurements. The
66
+ browser experiment and worker capacity checks were proposed, not executed.
67
+
68
+ ## Repository verification
69
+
70
+ The 25 Jev hook tests passed locally, including host paths, prerequisite failures,
71
+ confirmation suppression, and JSON output. The full `bun run test` passed in an
72
+ Ubuntu 24.04 ARM container with GNU awk: 1,841 passed and 99 skipped
73
+ (including missing Cargo, platform-specific checks, and opt-in live checks). All Jev hook
74
+ and offline wrapper tests ran; live scenarios were evaluated separately above. Shellcheck and context-budget checks passed. A fresh-context review
75
+ reported no blocking findings.
76
+
77
+ The native macOS full run was stopped after script-launch delays reproduced on
78
+ a trivial temporary script. A minimal Debian container lacked CI tools and
79
+ failed loopback transport checks; an Ubuntu run using mawk hit a regex compiler
80
+ panic in unchanged debug-log tests. Matching the test tools and using GNU awk
81
+ resolved those environment failures without production-code changes.
82
+
83
+ ## Prompt-size audit — 2026-09-21
84
+
85
+ Compared with commit `7c5915e`, the skill + shared workflow decreased from
86
+ 1,908 to 762 whitespace-delimited words (13,063 to 5,841 UTF-8 bytes).
87
+ These are size measurements, not tokenizer counts. Stage prompts link to the
88
+ shared rules; transport details and evaluation records load only on demand.
89
+ Examples explicitly load Setup + the relevant section. All six executable
90
+ Bash blocks remain byte-identical to the previously evaluated examples.
91
+
92
+ A fresh agent loaded only the compact skill and Setup + Debugging. Live calls
93
+ through the byte-identical wrapper in the sibling checkout selected `cache`,
94
+ then `insufficient` after changed observations; next experiment shifted to the
95
+ saved override. The isolated checkout call did not complete and was terminated;
96
+ no answer was inferred. Missing-key invocation returned exit 1. The agent
97
+ recognized unchanged-input reuse and retained explicit manual fallback. This
98
+ checks prompt usability, not installed-host behavior or production accuracy.