one-code-extension 0.4.1 → 0.5.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 (419) hide show
  1. package/README.md +16 -5
  2. package/agents/general-purpose.md +2 -2
  3. package/docs/guide/README.md +2 -1
  4. package/docs/guide/bring-your-claude-code-setup.md +60 -9
  5. package/docs/guide/configuration.md +48 -14
  6. package/docs/guide/differences-from-claude-code.md +32 -23
  7. package/docs/guide/doctor.md +20 -13
  8. package/docs/guide/hooks.md +18 -3
  9. package/docs/guide/installation.md +27 -4
  10. package/docs/guide/permissions-modes-and-auto-mode.md +225 -49
  11. package/docs/guide/providers-and-models.md +137 -54
  12. package/docs/guide/reference.md +27 -15
  13. package/docs/guide/sessions-and-context.md +69 -16
  14. package/docs/guide/skills-plugins-and-mcp.md +57 -20
  15. package/docs/guide/subagents-and-workflows.md +95 -29
  16. package/docs/guide/tasks-and-background-work.md +101 -26
  17. package/docs/guide/terminal-interface.md +24 -12
  18. package/docs/guide/tools.md +46 -5
  19. package/docs/guide/troubleshooting.md +13 -9
  20. package/docs/guide/windows.md +58 -31
  21. package/extensions/artifacts/gallery.ts +227 -0
  22. package/extensions/artifacts/index.ts +288 -0
  23. package/extensions/artifacts/store.ts +570 -0
  24. package/extensions/artifacts/viewer.ts +199 -0
  25. package/extensions/ask-user/description.ts +67 -0
  26. package/extensions/ask-user/dialogs.ts +80 -0
  27. package/extensions/ask-user/index.ts +37 -33
  28. package/extensions/ask-user/questions.ts +32 -7
  29. package/extensions/ask-user/widget.ts +45 -25
  30. package/extensions/auto-mode/actions.ts +6 -0
  31. package/extensions/auto-mode/cache.ts +88 -0
  32. package/extensions/auto-mode/classifier-prompt.ts +5 -4
  33. package/extensions/auto-mode/classifier.ts +290 -65
  34. package/extensions/auto-mode/config.ts +72 -20
  35. package/extensions/auto-mode/decision-log.ts +2 -0
  36. package/extensions/auto-mode/defaults.ts +1 -1
  37. package/extensions/auto-mode/denials.ts +123 -0
  38. package/extensions/auto-mode/git-checkout-programs.ts +187 -0
  39. package/extensions/auto-mode/git-status-meta.ts +159 -0
  40. package/extensions/auto-mode/history.ts +189 -0
  41. package/extensions/auto-mode/instructions.ts +58 -52
  42. package/extensions/auto-mode/model-select.ts +159 -134
  43. package/extensions/auto-mode/paths.ts +57 -5
  44. package/extensions/auto-mode/pause.ts +57 -2
  45. package/extensions/auto-mode/prompt.ts +37 -21
  46. package/extensions/auto-mode/read-only-options.ts +724 -0
  47. package/extensions/auto-mode/resolved-paths-meta.ts +133 -0
  48. package/extensions/auto-mode/rules.ts +18 -1
  49. package/extensions/auto-mode/safety-floor.ts +361 -18
  50. package/extensions/auto-mode/setup-run.ts +20 -14
  51. package/extensions/auto-mode/shell-analysis.ts +764 -490
  52. package/extensions/auto-mode/shell-parse.ts +885 -0
  53. package/extensions/auto-mode/system-note.ts +33 -0
  54. package/extensions/auto-mode/transcript.ts +80 -51
  55. package/extensions/background/cron.ts +515 -0
  56. package/extensions/background/index.ts +514 -236
  57. package/extensions/background/loop-fire.ts +136 -0
  58. package/extensions/background/loop-preamble.ts +59 -0
  59. package/extensions/background/loop-skill.ts +163 -0
  60. package/extensions/background/monitor-batch.ts +53 -0
  61. package/extensions/background/noop-fold.ts +128 -0
  62. package/extensions/background/switch-guard.ts +52 -0
  63. package/extensions/background/wakeup.ts +159 -55
  64. package/extensions/bash/background.ts +53 -17
  65. package/extensions/bash/child.ts +7 -0
  66. package/extensions/bash/description.ts +188 -0
  67. package/extensions/bash/guards.ts +15 -67
  68. package/extensions/bash/index.ts +88 -35
  69. package/extensions/branding/compaction-keep.ts +63 -0
  70. package/extensions/branding/declined.ts +22 -0
  71. package/extensions/branding/index.ts +133 -9
  72. package/extensions/branding/prompt-editor.ts +53 -6
  73. package/extensions/branding/queued-edit.ts +31 -0
  74. package/extensions/branding/replaced-builtins.ts +68 -0
  75. package/extensions/branding/startup.ts +33 -71
  76. package/extensions/btw/index.ts +229 -71
  77. package/extensions/btw/panel.ts +228 -100
  78. package/extensions/btw/prompt.ts +41 -4
  79. package/extensions/claude-compat/index.ts +7 -11
  80. package/extensions/claude-context/index.ts +446 -58
  81. package/extensions/compaction/cut.ts +157 -0
  82. package/extensions/compaction/index.ts +216 -75
  83. package/extensions/compaction/kept-thinking.ts +62 -0
  84. package/extensions/compaction/prompt.ts +15 -12
  85. package/extensions/context-budget/index.ts +24 -5
  86. package/extensions/context-management/index.ts +25 -0
  87. package/extensions/doctor/build.ts +59 -8
  88. package/extensions/doctor/builtins.ts +84 -0
  89. package/extensions/doctor/cli.ts +7 -1
  90. package/extensions/doctor/compat.ts +88 -23
  91. package/extensions/doctor/dependencies.ts +41 -5
  92. package/extensions/doctor/fix-prompt.ts +9 -2
  93. package/extensions/doctor/index.ts +102 -58
  94. package/extensions/doctor/models.ts +102 -63
  95. package/extensions/doctor/presets.ts +42 -27
  96. package/extensions/doctor/report.ts +19 -2
  97. package/extensions/doctor/viewer.ts +49 -27
  98. package/extensions/effort/index.ts +72 -19
  99. package/extensions/effort/settings.ts +21 -0
  100. package/extensions/effort/slider.ts +24 -20
  101. package/extensions/exit/index.ts +32 -1
  102. package/extensions/file-tracker/index.ts +337 -26
  103. package/extensions/file-tracker/replay.ts +96 -10
  104. package/extensions/file-tracker/restore.ts +63 -0
  105. package/extensions/file-tracker/results.ts +66 -0
  106. package/extensions/file-tracker/shell-reads.ts +211 -0
  107. package/extensions/file-tracker/tracker.ts +32 -15
  108. package/extensions/footer/footer-line.ts +45 -24
  109. package/extensions/footer/index.ts +47 -2
  110. package/extensions/footer/pr.ts +34 -5
  111. package/extensions/hooks/compaction.ts +7 -0
  112. package/extensions/hooks/executor.ts +32 -30
  113. package/extensions/hooks/index.ts +198 -31
  114. package/extensions/hooks/matcher.ts +3 -0
  115. package/extensions/hooks/protocol.ts +41 -3
  116. package/extensions/hooks/settings.ts +50 -19
  117. package/extensions/hooks/subagent-bridge.ts +2 -0
  118. package/extensions/hooks/trust.ts +13 -5
  119. package/extensions/idle-compact/index.ts +119 -0
  120. package/extensions/idle-compact/policy.ts +143 -0
  121. package/extensions/init/index.ts +11 -10
  122. package/extensions/init/prompt.ts +25 -32
  123. package/extensions/interrupted/index.ts +13 -1
  124. package/extensions/kept-thinking/index.ts +27 -0
  125. package/extensions/lib/agent-cron.ts +130 -0
  126. package/extensions/lib/agent-loader.ts +15 -1
  127. package/extensions/lib/agent-view.ts +85 -0
  128. package/extensions/lib/anthropic-payload.ts +82 -1
  129. package/extensions/lib/anthropic-server-call.ts +230 -0
  130. package/extensions/lib/anthropic-server-tools.ts +485 -0
  131. package/extensions/lib/app-launch.mjs +94 -0
  132. package/extensions/lib/argument-hints.ts +190 -0
  133. package/extensions/lib/atomic-write.ts +6 -2
  134. package/extensions/lib/auto-memory.ts +75 -0
  135. package/extensions/lib/bash-parser.ts +84 -0
  136. package/extensions/lib/btw-fork.ts +93 -0
  137. package/extensions/lib/child-extensions.ts +42 -0
  138. package/extensions/lib/child-writes.ts +45 -0
  139. package/extensions/lib/claude-context.ts +515 -100
  140. package/extensions/lib/claude-external-includes.ts +68 -0
  141. package/extensions/lib/claude-id.ts +22 -0
  142. package/extensions/lib/claude-rules.ts +323 -0
  143. package/extensions/lib/claude-settings.ts +76 -4
  144. package/extensions/lib/compaction-boundary.ts +36 -0
  145. package/extensions/lib/compaction-keep.mjs +83 -0
  146. package/extensions/lib/config-mode.ts +112 -0
  147. package/extensions/lib/consent-dialogs.ts +63 -0
  148. package/extensions/lib/consent-preview.ts +5 -1
  149. package/extensions/lib/consent-stores.ts +48 -0
  150. package/extensions/lib/context-facts.ts +78 -0
  151. package/extensions/lib/context-stack.ts +81 -0
  152. package/extensions/lib/deferred.ts +219 -25
  153. package/extensions/lib/dock-rows.ts +60 -0
  154. package/extensions/lib/empty-tool-result.ts +27 -0
  155. package/extensions/lib/environment-block.ts +76 -0
  156. package/extensions/lib/fetch-timeout.ts +24 -6
  157. package/extensions/{system-prompt → lib}/git-status.ts +51 -13
  158. package/extensions/lib/git.ts +75 -13
  159. package/extensions/lib/grammars/LICENSE-tree-sitter-bash +21 -0
  160. package/extensions/lib/grammars/README.md +2 -0
  161. package/extensions/lib/grammars/tree-sitter-bash.wasm +0 -0
  162. package/extensions/lib/guide-docs.ts +45 -0
  163. package/extensions/lib/headless-output.ts +46 -0
  164. package/extensions/lib/hook-gate.ts +7 -7
  165. package/extensions/lib/interrupt.ts +20 -4
  166. package/extensions/lib/key-input.ts +455 -0
  167. package/extensions/lib/keys.ts +14 -1
  168. package/extensions/lib/local-command.ts +47 -13
  169. package/extensions/lib/mcp-overrides.ts +1 -1
  170. package/extensions/lib/mcp-share.ts +46 -0
  171. package/extensions/lib/memory-content.ts +146 -0
  172. package/extensions/lib/memory-index.ts +18 -0
  173. package/extensions/lib/memory.ts +134 -123
  174. package/extensions/lib/model-catalog/huggingface.json +174 -0
  175. package/extensions/lib/model-catalog/models-dev.json +18297 -0
  176. package/extensions/lib/model-catalog/openrouter.json +5252 -0
  177. package/extensions/lib/model-catalog-data.ts +513 -0
  178. package/extensions/lib/model-catalog.ts +462 -0
  179. package/extensions/lib/model-choice-warnings.ts +137 -0
  180. package/extensions/lib/model-pairings.ts +152 -0
  181. package/extensions/{auto-mode → lib}/model-picker.ts +26 -43
  182. package/extensions/lib/model-policy.ts +112 -15
  183. package/extensions/lib/model-tier.ts +283 -355
  184. package/extensions/lib/model-unusable.ts +1 -1
  185. package/extensions/lib/newer-model.ts +100 -0
  186. package/extensions/lib/notices.ts +87 -0
  187. package/extensions/lib/notifications.ts +308 -64
  188. package/extensions/lib/one-code-settings.ts +74 -8
  189. package/extensions/lib/open-browser.ts +63 -0
  190. package/extensions/lib/openrouter-generation.ts +94 -0
  191. package/extensions/lib/operation-deadline.ts +30 -0
  192. package/extensions/lib/original-command.ts +4 -4
  193. package/extensions/lib/package-version.ts +1 -1
  194. package/extensions/lib/panel-focus.ts +134 -0
  195. package/extensions/lib/paths.ts +17 -2
  196. package/extensions/lib/permission-gate.ts +72 -6
  197. package/extensions/lib/persisted-output.ts +60 -8
  198. package/extensions/lib/pi-ai-estimate.ts +19 -3
  199. package/extensions/lib/pi-version.ts +21 -2
  200. package/extensions/lib/plan-mode-channels.ts +20 -5
  201. package/extensions/lib/plugins.ts +26 -17
  202. package/extensions/lib/powershell-parse-script.ts +208 -0
  203. package/extensions/lib/powershell-parser.ts +344 -0
  204. package/extensions/lib/process-tree.ts +131 -8
  205. package/extensions/lib/prompt-options.ts +82 -0
  206. package/extensions/lib/queued-delivery.ts +44 -0
  207. package/extensions/lib/reminders.ts +364 -58
  208. package/extensions/lib/replaced-builtins.mjs +199 -0
  209. package/extensions/lib/replay-call.ts +70 -0
  210. package/extensions/lib/request-replay.ts +439 -0
  211. package/extensions/lib/scratchpad.ts +81 -14
  212. package/extensions/lib/send-now-channel.ts +7 -0
  213. package/extensions/lib/session-model-tier.ts +51 -0
  214. package/extensions/lib/session-work.ts +64 -0
  215. package/extensions/lib/settings-channels.ts +4 -4
  216. package/extensions/lib/shell-exit-semantics.ts +170 -0
  217. package/extensions/lib/shell-quote.ts +11 -0
  218. package/extensions/lib/shell-result.ts +70 -0
  219. package/extensions/lib/shell-spawn.ts +70 -6
  220. package/extensions/lib/shell-tool.ts +75 -25
  221. package/extensions/lib/side-call-cache.ts +124 -0
  222. package/extensions/lib/side-call-run.ts +96 -0
  223. package/extensions/lib/side-call-usage.ts +38 -0
  224. package/extensions/lib/side-call.ts +13 -1
  225. package/extensions/lib/single-flight.ts +18 -0
  226. package/extensions/lib/skill-body.ts +42 -0
  227. package/extensions/lib/skill-scan.ts +63 -24
  228. package/extensions/lib/spill-file.ts +140 -0
  229. package/extensions/lib/subagent-handback.ts +113 -0
  230. package/extensions/lib/system-role.ts +156 -0
  231. package/extensions/lib/terminal-text.ts +114 -0
  232. package/extensions/lib/text-width.ts +47 -16
  233. package/extensions/lib/timer-ops.ts +20 -0
  234. package/extensions/lib/tool-additions.ts +149 -0
  235. package/extensions/lib/tool-call-corruption.ts +134 -0
  236. package/extensions/lib/tool-path.ts +66 -0
  237. package/extensions/lib/tool-variants.ts +69 -0
  238. package/extensions/lib/tui-render.ts +255 -27
  239. package/extensions/lib/turn-budget-layout.ts +143 -0
  240. package/extensions/lib/update-check.mjs +15 -2
  241. package/extensions/lib/usage-bus.ts +1 -1
  242. package/extensions/lib/user-denial.ts +38 -0
  243. package/extensions/lib/workspace-channel.ts +16 -0
  244. package/extensions/lib/worktree-channel.ts +31 -3
  245. package/extensions/lib/worktree-isolation.ts +40 -10
  246. package/extensions/lsp/client.ts +8 -9
  247. package/extensions/lsp/index.ts +70 -4
  248. package/extensions/lsp/keep-alive.ts +1 -1
  249. package/extensions/lsp/trust.ts +119 -0
  250. package/extensions/lsp/watcher.ts +1 -1
  251. package/extensions/mcp/announce.ts +87 -5
  252. package/extensions/mcp/client.ts +161 -48
  253. package/extensions/mcp/config.ts +132 -8
  254. package/extensions/mcp/discovery.ts +19 -0
  255. package/extensions/mcp/index.ts +209 -71
  256. package/extensions/mcp/oauth/browser.ts +38 -17
  257. package/extensions/mcp/oauth/flow.ts +25 -17
  258. package/extensions/mcp/oauth/provider.ts +14 -8
  259. package/extensions/mcp/oauth/store.ts +34 -16
  260. package/extensions/mcp/panel/keys.ts +12 -11
  261. package/extensions/mcp/panel/render.ts +9 -6
  262. package/extensions/mcp/schema.ts +104 -5
  263. package/extensions/mcp/trust.ts +151 -67
  264. package/extensions/memory/entries.ts +23 -14
  265. package/extensions/memory/index.ts +134 -28
  266. package/extensions/memory/open-external.ts +33 -18
  267. package/extensions/memory/panel.ts +135 -26
  268. package/extensions/newer-model/index.ts +31 -0
  269. package/extensions/notebook/description.ts +18 -0
  270. package/extensions/notebook/index.ts +6 -5
  271. package/extensions/notebook/notebook.ts +1 -1
  272. package/extensions/permissions/index.ts +1300 -381
  273. package/extensions/permissions/matcher.ts +425 -74
  274. package/extensions/permissions/modes.ts +6 -4
  275. package/extensions/permissions/panel/host.ts +130 -0
  276. package/extensions/permissions/panel/keys.ts +48 -0
  277. package/extensions/permissions/panel/render.ts +450 -0
  278. package/extensions/permissions/panel/state.ts +550 -0
  279. package/extensions/permissions/powershell-cmdlets.ts +198 -0
  280. package/extensions/permissions/powershell-paths.ts +197 -0
  281. package/extensions/permissions/powershell-rules.ts +207 -280
  282. package/extensions/permissions/powershell-tree.ts +557 -0
  283. package/extensions/permissions/project-trust.ts +27 -11
  284. package/extensions/permissions/protected-paths.ts +14 -2
  285. package/extensions/permissions/session-grant.ts +6 -0
  286. package/extensions/permissions/settings.ts +166 -31
  287. package/extensions/permissions/subagent-gate.ts +25 -0
  288. package/extensions/permissions/workspace.ts +78 -0
  289. package/extensions/plan-mode/index.ts +156 -69
  290. package/extensions/plan-mode/reminder.ts +89 -21
  291. package/extensions/plan-mode/texts.ts +177 -0
  292. package/extensions/plan-mode/viewer.ts +92 -27
  293. package/extensions/plugins/counts.ts +3 -3
  294. package/extensions/plugins/index.ts +61 -46
  295. package/extensions/plugins/install/install.ts +16 -0
  296. package/extensions/plugins/marketplace/sync.ts +9 -3
  297. package/extensions/plugins/marketplace/types.ts +3 -1
  298. package/extensions/plugins/panel/keys.ts +21 -24
  299. package/extensions/plugins/panel/render.ts +12 -6
  300. package/extensions/plugins/shell-expand.ts +107 -0
  301. package/extensions/plugins/template.ts +32 -15
  302. package/extensions/powershell/child.ts +7 -0
  303. package/extensions/powershell/description.ts +38 -6
  304. package/extensions/powershell/guards.ts +1 -1
  305. package/extensions/powershell/index.ts +12 -7
  306. package/extensions/recap/index.ts +65 -60
  307. package/extensions/recap/prompt.ts +2 -2
  308. package/extensions/recap/scheduler.ts +3 -5
  309. package/extensions/search-tools/grep-merge.ts +39 -0
  310. package/extensions/search-tools/index.ts +0 -0
  311. package/extensions/send-now/chord.ts +62 -0
  312. package/extensions/send-now/index.ts +133 -0
  313. package/extensions/session-title/index.ts +3 -0
  314. package/extensions/session-title/title.ts +4 -1
  315. package/extensions/skill/code-review.ts +97 -0
  316. package/extensions/skill/index.ts +421 -101
  317. package/extensions/skill/invoke.ts +128 -18
  318. package/extensions/skill/listing.ts +133 -9
  319. package/extensions/skill/panel/keys.ts +15 -16
  320. package/extensions/skill/panel/render.ts +5 -2
  321. package/extensions/skill/panel/state.ts +12 -1
  322. package/extensions/subagents/agent-args.ts +39 -0
  323. package/extensions/subagents/agent-description.ts +132 -0
  324. package/extensions/subagents/agents.ts +116 -23
  325. package/extensions/subagents/announce.ts +69 -0
  326. package/extensions/subagents/default-model.ts +2 -3
  327. package/extensions/subagents/delegation-steer.ts +4 -4
  328. package/extensions/subagents/fork-cache.ts +76 -0
  329. package/extensions/subagents/guide-agent.ts +189 -0
  330. package/extensions/subagents/hand-back-review.ts +3 -0
  331. package/extensions/subagents/index.ts +1493 -824
  332. package/extensions/subagents/live-runs.ts +26 -6
  333. package/extensions/subagents/model-select.ts +38 -25
  334. package/extensions/subagents/outcome.ts +2 -2
  335. package/extensions/subagents/panel-keys.ts +73 -31
  336. package/extensions/subagents/panel-render.ts +120 -96
  337. package/extensions/subagents/panel-widget.ts +60 -89
  338. package/extensions/subagents/runner.ts +108 -80
  339. package/extensions/subagents/runs.ts +39 -5
  340. package/extensions/subagents/send-to-main-tool.ts +1 -1
  341. package/extensions/subagents/session-turns.ts +32 -8
  342. package/extensions/subagents/shell-panel.ts +36 -178
  343. package/extensions/subagents/tasks-dialog.ts +170 -0
  344. package/extensions/subagents/viewport-mirror.ts +95 -0
  345. package/extensions/subagents/worktree.ts +57 -13
  346. package/extensions/system-prompt/environment.ts +19 -19
  347. package/extensions/system-prompt/idle-turn.ts +65 -0
  348. package/extensions/system-prompt/index.ts +131 -47
  349. package/extensions/system-prompt/template.ts +24 -50
  350. package/extensions/system-prompt/tiers/common.ts +23 -64
  351. package/extensions/system-prompt/tiers/frontier.ts +32 -11
  352. package/extensions/system-prompt/tiers/low.ts +67 -45
  353. package/extensions/system-prompt/tiers/mid.ts +96 -38
  354. package/extensions/system-reminder/index.ts +175 -13
  355. package/extensions/tasks/descriptions.ts +190 -0
  356. package/extensions/tasks/index.ts +120 -41
  357. package/extensions/tasks/store.ts +83 -16
  358. package/extensions/tool-call-corruption/child.ts +7 -0
  359. package/extensions/tool-call-corruption/index.ts +237 -0
  360. package/extensions/tool-search/announce.ts +16 -0
  361. package/extensions/tool-search/index.ts +189 -41
  362. package/extensions/tool-style/index.ts +68 -10
  363. package/extensions/tool-style/write-description.ts +40 -0
  364. package/extensions/tool-style/write-render.ts +237 -0
  365. package/extensions/turn-duration/index.ts +7 -3
  366. package/extensions/turn-duration/line.ts +47 -4
  367. package/extensions/web/backends.ts +6 -9
  368. package/extensions/web/description.ts +50 -0
  369. package/extensions/web/index.ts +118 -53
  370. package/extensions/web/native-call.ts +15 -0
  371. package/extensions/web/native-results.ts +41 -0
  372. package/extensions/web-fetch/description.ts +42 -0
  373. package/extensions/web-fetch/extract.ts +53 -6
  374. package/extensions/web-fetch/index.ts +125 -76
  375. package/extensions/web-fetch/page-content.ts +19 -0
  376. package/extensions/web-fetch/response.ts +49 -0
  377. package/extensions/web-fetch/summarize.ts +9 -10
  378. package/extensions/workflow/agent-session.ts +105 -18
  379. package/extensions/workflow/args.ts +24 -0
  380. package/extensions/workflow/description.ts +67 -0
  381. package/extensions/workflow/globals.ts +17 -3
  382. package/extensions/workflow/index.ts +145 -162
  383. package/extensions/workflow/records.ts +1 -0
  384. package/extensions/workflow/run-manager.ts +29 -6
  385. package/extensions/workflow/saved-workflows.ts +3 -2
  386. package/extensions/workflow/types.ts +22 -1
  387. package/extensions/workflow/viewer.ts +54 -24
  388. package/extensions/workflow/widget.ts +20 -0
  389. package/extensions/worktree/descriptions.ts +91 -0
  390. package/extensions/worktree/guards.ts +316 -54
  391. package/extensions/worktree/index.ts +121 -39
  392. package/extensions/worktree/powershell-guards.ts +167 -0
  393. package/extensions/worktree/rewrite.ts +14 -16
  394. package/package.json +18 -7
  395. package/skills/artifact-design/SKILL.md +85 -0
  396. package/skills/code-review/SKILL.md +20 -20
  397. package/skills/code-review/cells/arguments-and-flags.md +19 -0
  398. package/skills/code-review/cells/high-3x5-recall-verify.md +137 -0
  399. package/skills/code-review/cells/high-8-inline.md +122 -0
  400. package/skills/code-review/cells/low-1-pass-max4.md +27 -0
  401. package/skills/code-review/cells/low-1-pass-min-files-4.md +28 -0
  402. package/skills/code-review/cells/max-5x5-verify-sweep.md +162 -0
  403. package/skills/code-review/cells/medium-3x5-verify.md +132 -0
  404. package/skills/code-review/cells/minimal-prompt.md +32 -0
  405. package/skills/code-review/cells/xhigh-10-inline-sweep.md +149 -0
  406. package/skills/code-review/cells/xhigh-5x5-verify-sweep.md +162 -0
  407. package/skills/fewer-permission-prompts/SKILL.md +1 -1
  408. package/skills/loop/SKILL.md +11 -0
  409. package/skills/security-review/SKILL.md +2 -5
  410. package/skills/simplify/SKILL.md +7 -5
  411. package/skills/workflow-authoring/SKILL.md +143 -0
  412. package/themes/onecode-light.json +1 -1
  413. package/themes/onecode.json +1 -1
  414. package/types/app.d.ts +58 -0
  415. package/types/community-packages.d.ts +26 -1
  416. package/extensions/auto-mode/recoverability.ts +0 -229
  417. package/extensions/lib/capability-index.ts +0 -466
  418. package/extensions/lib/model-facts.generated.json +0 -2675
  419. package/extensions/lib/model-facts.ts +0 -162
@@ -24,15 +24,21 @@ For each tool call, the gate checks the following in order:
24
24
  3. **`ask` rules.** A matching `ask` rule prompts you, even in a mode that
25
25
  would otherwise approve the call.
26
26
  4. **`allow` rules.** A matching `allow` rule approves the call without a
27
- prompt.
27
+ prompt. A shell rule doesn't cover the command's redirects outside the
28
+ working directory: with `Bash(echo:*)`, `echo x >> ~/.zshrc` still
29
+ prompts you, and in auto mode it goes to the classifier.
28
30
  5. **The mode's default.** Anything no rule covers is decided by the current
29
31
  permission mode.
30
32
 
31
33
  A handful of tools are always allowed because other tools sit behind them:
32
34
  `tool_search`, `skill`, `Agent`, `SendMessage`, `list_agents`, `workflow`,
33
35
  `ask_user_question`, `lsp_diagnostics`, `list_mcp_resources`, the task-list
34
- tools, `schedule_wakeup`, and the plan-mode tools. The tool calls these
35
- tools make in turn (a subagent's own edits, for example) are still gated.
36
+ tools, `cron_list`, `cron_delete`, and the plan-mode tools. The tool calls
37
+ these tools make in turn (a subagent's own edits, for example) are still
38
+ gated. `cron_create` and `schedule_wakeup` are allowed too, except in auto
39
+ mode, where the classifier reviews what the scheduled prompt asks for unless an
40
+ allow rule names the tool, as in Claude Code. A fired prompt's own tool calls
41
+ go through the usual checks.
36
42
 
37
43
  ## Permission rules
38
44
 
@@ -73,15 +79,22 @@ they are hard to sidestep. They apply when they match the raw line, any
73
79
  subcommand of a compound line (`&&`, `||`, `;`, `|`, `&`, or a newline), or
74
80
  the payload of a wrapper. Wrappers such as `env`, `command`, `nice`,
75
81
  `timeout`, and `xargs` are peeled, `sh -c '…'` and the other shells are
76
- expanded, and the command word is reduced to its lowercased basename, so
82
+ expanded (so is a heredoc or here-string fed to a shell, as in
83
+ `sh <<'EOF'`), and the command word is reduced to its lowercased basename, so
77
84
  `/bin/rm`, `\rm`, and `RM` all match a rule written for `rm`.
78
85
 
79
86
  `allow` rules are matched against the literal spelling only, and a compound
80
87
  command line is allowed only when an `allow` rule covers every one of its
81
- subcommands, or when an exact rule matches the whole line. A line that
82
- contains command substitution (`$(…)` or backticks), `eval`, `exec`, a pipe
83
- into an interpreter, or a base64 decode is never covered by a prefix or
84
- wildcard `allow` rule.
88
+ subcommands, or when an exact rule matches the whole line. `eval`, `sh`, and
89
+ `xargs` are subcommands like any other, so each needs a rule of its own.
90
+
91
+ The commands inside a command substitution (`$(…)` or backticks) or a
92
+ process substitution (`<(…)`) must be covered too, because they run. A rule
93
+ can cover them, or One Code covers the whole substitution when it can prove
94
+ the substitution only reads files inside the project. So
95
+ `Bash(git commit:*)` allows `git commit -m "$(cat <<'EOF' … EOF)"`, but it
96
+ doesn't allow `npm test $(curl …)`. A line containing a subshell, a loop, or
97
+ a function is never covered by a prefix or wildcard `allow` rule.
85
98
 
86
99
  ### PowerShell rule patterns
87
100
 
@@ -109,11 +122,32 @@ Add `global` at the end to save it for every repository instead:
109
122
  /allow Bash(npm test:*) global
110
123
  ```
111
124
 
112
- To review the current mode and every loaded rule, including which project
113
- rules are trusted and which rules couldn't be parsed, run `/permissions`.
114
-
115
125
  Rules One Code adds are saved under `~/.onecode`, never under `~/.claude`.
116
126
 
127
+ ### Manage permissions in the panel
128
+
129
+ Run `/permissions` to open the permissions panel. It has the same tabs as
130
+ Claude Code's:
131
+
132
+ - **Recently denied**: calls the auto-mode classifier blocked in this
133
+ session. See [Approve a call auto mode denied](#approve-a-call-auto-mode-denied).
134
+ - **Allow**, **Ask**, and **Deny**: every rule, with the file it came from.
135
+ Type to filter the list. Choose **Add a new rule…** to add one, and pick
136
+ whether it's saved for this project or for every project.
137
+ - **Auto mode**: the classifier's own rules and environment. See
138
+ [Configure auto mode](#configure-auto-mode).
139
+ - **Workspace**: the working directory and any extra directories. See
140
+ [Workspace directories](#workspace-directories).
141
+
142
+ Use ←/→ to switch tabs, ↑/↓ to move, Enter to open a row, and Esc to close.
143
+ The footer always shows the keys that work where you are.
144
+
145
+ The panel only changes One Code's own files and this session's grants. A
146
+ rule from Claude Code's settings, the repository's `.claude` files, or
147
+ managed settings is listed but read-only, and its detail view names the file
148
+ to change instead. Whatever you change is passed to the model when the panel
149
+ closes, so it knows a rule is gone.
150
+
117
151
  ## Permission modes
118
152
 
119
153
  A mode sets the default answer for actions no rule covers. **Auto is the
@@ -123,7 +157,7 @@ stops risky ones, so you're not prompted for every step.
123
157
  | Mode | Badge | What it does |
124
158
  |---|---|---|
125
159
  | Manual | `⏸ manual mode on` | Prompts for anything not already allowed. The `--permission-mode` value is `default`. |
126
- | Accept edits | `⏵⏵ accept edits on` | File edits inside the working directory run without a prompt. Everything else still prompts. The flag value is `acceptEdits`. |
160
+ | Accept edits | `⏵⏵ accept edits on` | File edits inside the working directory run without a prompt. With a frontier or workhorse model, so do in-project `mkdir`, `touch`, `cp`, `mv`, `rm`, and `rmdir` commands. Everything else still prompts. The flag value is `acceptEdits`. |
127
161
  | Plan | `⏸ plan mode on` | Read-only investigation plus one plan file. See [Plan mode](#plan-mode). The flag value is `plan`. |
128
162
  | Auto | `⏵⏵ auto mode on` | A classifier screens each action. See [Auto mode](#auto-mode). The flag value is `auto`. |
129
163
  | Bypass permissions | `⏵⏵ bypass permissions on` | Runs everything without prompts, including writes to protected paths. The flag value is `bypassPermissions`; `--dangerously-skip-permissions` also selects it. |
@@ -208,7 +242,8 @@ and these choices:
208
242
  - A file inside the working directory: that tool anywhere in the working
209
243
  directory.
210
244
  - A file outside the working directory: that tool within the file's
211
- directory only.
245
+ directory only. For a file directly in your home directory, only that
246
+ file.
212
247
  - A URL: that host.
213
248
  - **No, tell the agent what to do differently.** Deny it, with an optional
214
249
  note that is passed to the model as the reason.
@@ -225,9 +260,25 @@ action that would have prompted is denied and the model is told why.
225
260
  Reads and edits are confined to the working directory by default:
226
261
 
227
262
  - Reading a file inside the working directory is allowed in every mode.
228
- Reading outside it prompts in manual mode, goes to the classifier in auto
229
- mode, and is denied in don't-ask mode.
230
- - Accept-edits mode approves edits only inside the working directory.
263
+ Reading outside it prompts in manual mode and is denied in don't-ask
264
+ mode. In auto mode it runs without the classifier with a frontier or
265
+ workhorse model, after a one-time question (see [Reads outside the
266
+ working directories](#reads-outside-the-working-directories)), and goes
267
+ to the classifier with a cheap or tiny model.
268
+ - A shell command that only reads inside the working directory (`ls`,
269
+ `git status`, `head README.md`) runs without a prompt in every mode, the
270
+ way Claude Code's shell tools approve one themselves. The same analysis
271
+ auto mode uses decides it, so a command it can't prove read-only prompts,
272
+ and one that reads outside the working directory is treated like an
273
+ outside read.
274
+ - Accept-edits mode approves edits only inside the working directory. With
275
+ a frontier or workhorse model it also approves a command line made only
276
+ of `mkdir`, `touch`, `cp`, `mv`, `rm`, and `rmdir` whose paths all stay
277
+ inside, as Claude Code does. Removing or moving the working directory
278
+ itself, a `.git` directory, or a directory that holds one still prompts.
279
+ So does any of these commands that would remove, overwrite, or create a
280
+ protected path or a credential file, even inside a directory it names
281
+ (`cp settings.json .claude`, `rm -rf .husky`).
231
282
  - The harness's own session directories count as inside: the auto-memory
232
283
  folder, the session scratchpad, persisted tool output, the plan file, and
233
284
  this project's own session transcripts (with auto mode's decision log next
@@ -237,6 +288,33 @@ Reads and edits are confined to the working directory by default:
237
288
  Paths are compared after resolving symlinks, so a symlink inside the project
238
289
  that points outside it counts as outside.
239
290
 
291
+ ### Workspace directories
292
+
293
+ To let One Code read another directory without asking, add it to the
294
+ workspace. It works like Claude Code's additional working directories:
295
+
296
+ - Run `/add-dir PATH`, then choose **Yes, for this session** or **Yes, and
297
+ remember this directory**. A remembered directory is saved to this
298
+ project's One Code settings.
299
+ - Start One Code with `--add-dir PATH`. To add several, separate them with
300
+ `:` (`;` on Windows).
301
+ - List them under `permissions.additionalDirectories` in your settings.
302
+ - Add or remove them in the **Workspace** tab of `/permissions`.
303
+
304
+ Reading inside a workspace directory then works like reading inside the
305
+ working directory, and accept-edits mode can edit files there. A
306
+ credential file inside a workspace directory, such as a key under `.ssh`,
307
+ still prompts. With a cheap or tiny model, auto mode also sends every write
308
+ or delete in a workspace directory to the classifier; with a frontier or
309
+ workhorse model it treats them like writes in the working directory.
310
+
311
+ The filesystem root, your home directory, and any directory that contains
312
+ it (such as `/Users`) can't be added; add something narrower. If a settings file lists one of them, One Code ignores it and warns
313
+ you. Directories listed in the repository's own `.claude` settings apply
314
+ only after you trust the repository (see [Trusting a project](#trusting-a-project)).
315
+ The system prompt lists the workspace directories that were in force when
316
+ the session started.
317
+
240
318
  In auto mode, a shell command that reads outside the working directory, a
241
319
  bare `env`, or a `printenv` is never treated as safe by the deterministic
242
320
  check and always goes to the classifier.
@@ -250,7 +328,7 @@ Protected directories, including everything inside them:
250
328
 
251
329
  `.git`, `.config/git`, `.vscode`, `.idea`, `.husky`, `.cargo`,
252
330
  `.devcontainer`, `.yarn`, `.mvn`, `.claude`, `.onecode`,
253
- `Library/LaunchAgents`, `.config/fish`, `.local/bin`.
331
+ `Library/LaunchAgents`, `.config/fish`, `.local/bin`, `.ssh`.
254
332
 
255
333
  `.claude/worktrees` and `.onecode/plans` are ordinary working space and are
256
334
  exempt.
@@ -285,6 +363,7 @@ current session only.
285
363
  | Hooks in `.claude/settings.json` or `.claude/settings.local.json` | At startup: "Run this project's hooks?", listing each command. | `~/.onecode/hooks/project-approvals.json` |
286
364
  | MCP servers in `.mcp.json` | At startup, for each new server. See [MCP servers](skills-plugins-and-mcp.md#mcp-servers). | `~/.onecode/mcp/project-approvals.json` |
287
365
  | `permissions.allow` rules in the project's settings files | The first time such a rule would decide a call: "Trust this repository's allow rules?" | `~/.onecode/permissions/project-allow-approvals.json` |
366
+ | `permissions.additionalDirectories` in the project's settings files | The first time a read inside one of them would skip a prompt. The same question covers the project's allow rules. | `~/.onecode/permissions/project-allow-approvals.json` |
288
367
 
289
368
  `deny` and `ask` rules from a project never prompt; they only tighten the
290
369
  gate. Hooks and servers from your user settings, managed settings, or an
@@ -315,12 +394,14 @@ shows the plan. Nothing runs until you choose. The choices are:
315
394
  2. **Approve into auto mode**, when a classifier model is available.
316
395
  3. **Approve into accept-edits mode.**
317
396
  4. **Approve into manual mode.**
318
- 5. **Keep planning.** No mode change; the model refines the plan file.
397
+ 5. **Keep planning.** You're asked what to change, and the model gets your
398
+ answer and refines the plan file. No mode change.
319
399
 
320
400
  The initial highlight is the option that restores your previous mode, or
321
401
  manual mode when that isn't offered. It never lands on a more permissive
322
- option by default. Press the number of a choice to pick it directly, or
323
- **Esc** to keep planning.
402
+ option by default. Press the number of a choice to pick it directly. **Esc**
403
+ rejects the plan and stops the turn; the session stays in plan mode until you
404
+ tell the model how to go on.
324
405
 
325
406
  In a non-interactive run there's no one to approve, so `exit_plan_mode`
326
407
  refuses and the session stays in plan mode with the plan on disk.
@@ -333,24 +414,72 @@ classifier.
333
414
 
334
415
  ### What is approved without a classifier call
335
416
 
417
+ Which actions skip the classifier depends on the tier of the model making
418
+ the call (see [Prompting adapts to the
419
+ model](providers-and-models.md#prompting-adapts-to-the-model)). Frontier
420
+ and workhorse models get Claude Code's shortcuts. Cheap and tiny models
421
+ get a stricter set: Claude Code doesn't run auto mode on Haiku 4.5 and
422
+ older at all, and smaller models are the likeliest to take a risky
423
+ action nobody asked for.
424
+
425
+ With every model:
426
+
336
427
  - Actions a deterministic analysis proves safe. Read-only shell commands
337
- inside the working directory are the common case. This analysis can only
338
- ever conclude "safe"; anything it can't parse or recognize goes to the
428
+ inside the working directory are the common case (they run without a
429
+ prompt in every mode, see [the working directory
430
+ boundary](#the-working-directory-boundary)), including multi-line
431
+ commands, heredocs, and substitutions whose own commands are read-only
432
+ (`diff <(git show HEAD:a) a`). An in-project redirect such as
433
+ `echo hi > notes.txt` counts too. This analysis can only ever conclude
434
+ "safe"; anything it can't parse or recognize, or a value that only exists
435
+ when the command runs (an environment variable, say), goes to the
339
436
  classifier rather than through.
340
437
  - Edits and writes to files inside the project that are not credential
341
438
  files, not protected paths, and not files that run code on their own
342
439
  (build wrappers, CI workflows, editor auto-run configuration).
343
- - Deleting or resetting files inside the project **when git can recover
344
- them**. A tracked, committed file can be restored, so removing it is
345
- approved. An untracked or modified file can't, so removing it goes to
346
- the classifier. Claude Code trusts the whole project directory here; One
347
- Code checks recoverability first.
440
+
441
+ With a frontier or workhorse model, also everything accept-edits mode
442
+ would approve, as in Claude Code:
443
+
444
+ - Edits and writes anywhere in the working directory and the workspace
445
+ directories, including CI workflows and build wrappers. Protected paths
446
+ are still judged.
447
+ - Command lines made only of `mkdir`, `touch`, `cp`, `mv`, `rm`, and
448
+ `rmdir` whose paths all stay inside. `sed` isn't included; it goes to the
449
+ classifier.
450
+ - Reads outside the working directories, except credential files (see
451
+ [Reads outside the working directories](#reads-outside-the-working-directories)).
452
+
453
+ A subagent's calls are judged by the subagent's own model, so a subagent
454
+ on a cheaper model gets the stricter set. When you switch the session to a
455
+ model on the other side of this line, One Code shows a notice.
348
456
 
349
457
  ### What goes to the classifier
350
458
 
351
- Everything else: destructive commands git can't undo, anything that
352
- reaches outside the project, network-affecting commands, writes to
353
- protected paths, and reads outside the working directory.
459
+ Everything else: `git reset --hard` and other destructive commands,
460
+ deleting files with a cheap or tiny model, anything that reaches outside
461
+ the project other than the reads described earlier, network-affecting
462
+ commands, and writes to protected paths.
463
+
464
+ ### Reads outside the working directories
465
+
466
+ With a frontier or workhorse model, the first time auto mode reads a file
467
+ outside the working directories, One Code asks once, as Claude Code does:
468
+
469
+ - **Yes, keep allowing reads outside the working directories** allows the
470
+ read and doesn't ask again.
471
+ - **No, block reads outside the working directories from now on** refuses
472
+ the read and saves `permissions.blockReadsOutsideWorkingDirectories: true`
473
+ to `~/.onecode/settings.json`. From then on the read tools refuse any path
474
+ outside the working directories, in every mode except bypass and in every
475
+ project.
476
+ - **No, ask again next time** refuses this read and asks again on the next.
477
+
478
+ The question isn't asked in a one-shot run, or when you already answered
479
+ it in One Code or in Claude Code. To undo **Block**, remove the setting.
480
+ You can also set it yourself in any settings file. Reading a credential
481
+ file outside the working directories, such as a key under `~/.ssh`, still
482
+ goes to the classifier.
354
483
 
355
484
  The classifier is Claude Code's two-stage ruleset, embedded verbatim:
356
485
 
@@ -369,7 +498,29 @@ consult its classifier approves nothing.
369
498
  A blocked action is reported to the model with the reason so it can choose
370
499
  a safer route. You're not prompted per action while auto mode runs. After
371
500
  repeated blocks in a row, auto mode pauses and the next action prompts you;
372
- approving it resumes auto mode.
501
+ approving it resumes auto mode. As in Claude Code, any action that runs
502
+ without a block, such as a read, also breaks the run and resumes auto mode.
503
+ A pause after 20 blocks in total waits for your approval. So that an
504
+ unattended session isn't held indefinitely, the first of these prompts after three blocks in a row denies
505
+ the action if nobody answers within two minutes, as Claude Code does, and
506
+ shows a countdown. A later prompt in the same run of blocks waits for you.
507
+ To change the wait, set `CLAUDE_CODE_TICKLISH_WHISPER_TIMEOUT_MS`, Claude
508
+ Code's variable for it, to a number of milliseconds.
509
+
510
+ ### Approve a call auto mode denied
511
+
512
+ When the classifier blocks a call, a notice says so and points to
513
+ `/permissions`. If the block was wrong, open the **Recently denied** tab:
514
+
515
+ - Press Enter on the call to approve it. The model is told it may retry.
516
+ - Press `r` to approve it and have the model retry right away.
517
+
518
+ Approvals apply when you close the panel. An approval covers that exact call
519
+ once: the same tool, the same input, and the same directory. The retry then
520
+ runs without the classifier, and the next call is judged as usual. Deny
521
+ rules and the safety floor still apply to it. Claude Code handles this
522
+ differently: it tells the model permission was granted, but judges the
523
+ retry again.
373
524
 
374
525
  Allow rules that are broad enough to pre-approve arbitrary execution, such
375
526
  as `Bash(*)`, a wildcarded interpreter, or a rule that allows delegation to
@@ -378,18 +529,31 @@ Session grants from the approval prompt don't apply in auto mode either.
378
529
 
379
530
  ### The classifier model
380
531
 
381
- The classifier runs on a model from the same provider as your session,
382
- chosen automatically as the cheapest model that is at least as capable as
383
- the floor: a Sonnet-class model when your session runs a Sonnet-class or
384
- stronger model, a Haiku-class model otherwise. A weak classifier is a
385
- measurably weaker boundary; in testing, a Haiku-class classifier scored an
386
- explicitly requested recursive delete far below the block threshold that a
387
- Sonnet-class classifier applied to the same command.
388
-
389
- To choose the classifier yourself, run `/auto-mode model <provider/model-id>`.
390
- `/auto-mode model clear` returns to automatic selection. The choice is saved
391
- to `~/.onecode/settings.json`. When auto mode is active, the banner shows
392
- the classifier in use.
532
+ The classifier stays on your session's provider unless you choose otherwise.
533
+ For the models people use most, a pairing table built from measured scores
534
+ picks it: an Opus session screens with Sonnet 5.5, a Sonnet 5.5 session with
535
+ Haiku 5.5, and GPT-6 Astra with GPT-6.1 Sol. Where no smaller model of the same
536
+ vendor comes close enough, like GPT-6.1 Sol, your own model screens. For any
537
+ other model, it runs on the cheapest model in your session's tier or above that
538
+ costs less than your own: there's no point screening a model with a weaker or
539
+ more expensive one, and a model at the same price saves nothing. Either way,
540
+ the pick has to fit your session's context window and can't be an experimental
541
+ (`-exp`) build. If nothing meets all of that, your own model screens its calls.
542
+ The table and the rest of the rules are in
543
+ [Automatic model selection](providers-and-models.md#automatic-model-selection).
544
+
545
+ To choose the classifier yourself, run `/auto-mode model`, or
546
+ `/auto-mode model <provider/model-id>`. The choice is saved in
547
+ `~/.onecode/settings.json`, never in a project's settings, and
548
+ `/auto-mode model clear` goes back to the automatic pick. A model on another
549
+ provider gets your messages, so it's used only on the provider you chose it
550
+ on; after you switch providers, the automatic pick takes over until you choose
551
+ again. One Code warns when your choice has a newer model in its line, sits two
552
+ or more tiers below your session model, or has a smaller context window than
553
+ your session's.
554
+
555
+ When auto mode is on, the banner shows which classifier is in use, and a
556
+ notice tells you when your own model is screening and why.
393
557
 
394
558
  ### The safety floor
395
559
 
@@ -402,6 +566,11 @@ is blocked in a non-interactive one:
402
566
  - `~/.onecode/settings.json` and any `~/.onecode/projects/<slug>/settings.json`
403
567
  - `~/.claude.json`
404
568
  - Managed settings files
569
+ - The files that record which projects you approved:
570
+ `~/.onecode/hooks/project-approvals.json`,
571
+ `~/.onecode/mcp/project-approvals.json`,
572
+ `~/.onecode/permissions/project-allow-approvals.json` and
573
+ `~/.onecode/lsp/trusted-projects.json`
405
574
 
406
575
  ### Configure auto mode
407
576
 
@@ -409,6 +578,13 @@ Run `/auto-mode` (or `/auto-mode config`) to see the effective
409
578
  configuration: the files it was read from, the environment description,
410
579
  any extra rules, and which classifier model is in use.
411
580
 
581
+ The **Auto mode** tab of `/permissions` edits the same configuration. It
582
+ lists each section's built-in rules and your own, and you can add a rule
583
+ as a plain sentence, edit it, or delete it. The environment opens in an
584
+ editor. Changes are saved to `~/.onecode/settings.json` and apply from the
585
+ next classifier call. The built-in rules are always in effect. Unlike Claude
586
+ Code's panel, this one has no switch to turn a section's built-ins off.
587
+
412
588
  Run `/auto-mode setup` to have a model draft a configuration for your
413
589
  environment. It asks how you use One Code here, offers to scan recent shell
414
590
  history for evidence, proposes an environment description and extra rules,
@@ -425,15 +601,15 @@ The configuration keys, under `autoMode`, follow Claude Code's own schema:
425
601
  | `soft_deny` | string array | Extra rules that block unless you explicitly asked for the action. |
426
602
  | `allow` | string array | Extra rules that approve. |
427
603
  | `classifyAllShell` | boolean | Send every shell command to the classifier, even ones a narrow allow rule covers. |
428
- | `classifierModel` | string | The classifier model, as `provider/model-id`. |
604
+ | `classifierModel` | string | One Code's own key: the classifier model, `provider/model-id`, instead of the automatic pick. Set it with `/auto-mode model`. |
429
605
  | `logDecisions` | boolean | Append every gate decision to `auto-mode-decisions.jsonl` next to the session files. |
430
606
 
431
607
  One Code reads `autoMode` from `~/.claude/settings.json`,
432
- `~/.onecode/settings.json`, and managed settings. It never reads `autoMode`
433
- from a project's `.claude/settings.json` or `.claude/settings.local.json`,
434
- because a checked-in file must not be able to loosen the classifier for
435
- whoever clones it. `classifierModel` is read only from `~/.onecode` and
436
- managed settings.
608
+ `~/.onecode/settings.json`, and managed settings, except `classifierModel`,
609
+ which it reads only from `~/.onecode/settings.json` and managed settings.
610
+ It never reads `autoMode` from a project's `.claude/settings.json` or
611
+ `.claude/settings.local.json`, because a checked-in file must not be able
612
+ to loosen the classifier for whoever clones it.
437
613
 
438
614
  To see the classifier's verdicts while you work, set `CC_AUTO_MODE_DEBUG=1`
439
615
  before launching; each decision is printed to stderr with its stage,
@@ -74,8 +74,9 @@ run on different models:
74
74
  for routine work and a stronger one for the hard parts.
75
75
  - **A cheaper subagent tier.** Subagents, workflow agents, the auto-mode
76
76
  classifier, and the reader model behind web fetch and recaps all run on
77
- their own model. By default One Code picks these for you; see the next
78
- section. `/subagent` and `/auto-mode model` set them by hand.
77
+ their own model. One Code picks these automatically; see the next section.
78
+ `/subagent` sets the subagent default by hand, and `/auto-mode model` the
79
+ classifier.
79
80
 
80
81
  This matters most for `ultracode` workflows, which fan work out across many
81
82
  agents at once. Running those agents on a cheap tier keeps a large fan-out
@@ -84,55 +85,79 @@ affordable while the parent session stays on a frontier model.
84
85
  ## Automatic model selection
85
86
 
86
87
  For its side roles, One Code chooses a model from the **same provider** as
87
- your session; automatic picks never send your data to another provider. The
88
- choice is the cheapest model that clears a capability floor:
89
-
90
- - **Subagents and the classifier** share one rule: a Sonnet-class model when
91
- your session runs a Sonnet-class or stronger model, and a Haiku-class model
92
- otherwise. This is Claude Code's classifier rule, applied to delegated work
93
- too, so on most providers both roles land on the same model. A subagent is
94
- never dearer than your main model; if nothing cheaper qualifies, it runs on
95
- the main model.
96
- - **The reader** (web fetch answers, recaps) uses the cheapest capable
97
- model.
88
+ your session; automatic picks never send your data to another provider. Each
89
+ role has its own rule, built on the model tiers that
90
+ [Prompting adapts to the model](#prompting-adapts-to-the-model) describes:
91
+
92
+ - **Subagents and the classifier** first check a pairing table for the
93
+ models people use most. Each pair comes from measured scores and prices,
94
+ so a pick is the cheapest model of the same vendor that comes close enough
95
+ to your main model. Subagents get a looser bar than the classifier, which
96
+ judges your tool calls with thinking off:
97
+
98
+ | Main model | Subagents | Classifier |
99
+ |---|---|---|
100
+ | Opus 5.5, Opus 5, Opus 4.8, Fable 5 and 5.1 | Sonnet 5.5 | Sonnet 5.5 |
101
+ | Sonnet 5.5, Sonnet 5 | Haiku 5.5 | Haiku 5.5 |
102
+ | GPT-6 Astra, GPT-5.6 Sol | GPT-6.1 Sol | GPT-6.1 Sol |
103
+ | GPT-6.1 Sol, GPT-6 Sol | GPT-6 Luna | main model |
104
+ | GPT-5.6 Terra, GPT-5.6 Luna | GPT-6 Luna | GPT-6 Luna |
105
+ | Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.5 to 3.7 Flash | Gemini 3.8 Flash | Gemini 3.8 Flash |
106
+ | DeepSeek V4 Pro, DeepSeek V4 Flash | DeepSeek V4.1 Flash | DeepSeek V4.1 Flash |
107
+ | GLM-5.3 | GLM-5.3 Flash | GLM-5.3 Flash |
108
+ | MiMo V2.6 Pro | MiMo V2.6 Flash | main model |
109
+ | Qwen3.8 Max | Qwen3.8 Flash | Qwen3.8 Flash |
110
+
111
+ Haiku 5.5, GPT-6 Luna, Gemini 3.8 Flash, DeepSeek V4.1 Flash, GLM-5.3
112
+ Flash, MiMo V2.6 Flash, Qwen3.8 Flash, Kimi K3, Grok 4.7, Muse Spark 1.3,
113
+ MiniMax M3, Step 5 and Mistral Large 4 keep their own model for both: no
114
+ smaller model of theirs comes close enough. The paired model has to be on
115
+ your provider and can't cost more there than your main model; the
116
+ classifier's pick must also fit your session's context window.
117
+ - **Everything else** takes the cheapest model in your session's tier or
118
+ above that's cheaper than your main model. That covers a model the table
119
+ doesn't name, a pair your provider doesn't serve, and a vendor that has
120
+ shipped a model newer than the table: the table steps aside for that
121
+ vendor until it's updated. A cheap-tier session never gets upgraded. The
122
+ classifier's pick also has to fit your session's whole context window and
123
+ is never an experimental build (a `-exp` model). If nothing qualifies,
124
+ your own model does the job. The pick is redone when you switch models.
125
+ - **The reader** (web fetch answers, recaps) uses the cheapest model that
126
+ isn't tiny.
127
+
128
+ You can choose the subagent and classifier models yourself with `/subagent`
129
+ and `/auto-mode model`. Naming a model is choosing it, even on another
130
+ provider. One Code still tells you when a choice looks off, when you make it
131
+ and again when a session starts (for the classifier, only when auto mode is
132
+ on):
133
+
134
+ - **A newer model is available** in the same line at about the same price.
135
+ GPT-5.6 Sol gets "GPT-6.1 Sol is newer and costs less". The same notice
136
+ appears when you pick an older main model with `/model`.
137
+ - **The model is far weaker than your session's**: two or more tiers below
138
+ it, like a cheap-tier classifier for a frontier session.
139
+ - **The classifier's context window is smaller than your session's.** It
140
+ still screens, but once the conversation outgrows it, each call asks for
141
+ your approval until you `/compact`.
142
+ - **The classifier is a moving alias or an experimental build**, like a
143
+ `-latest` id. The model behind it can change without notice, and your
144
+ permission checks change with it. Automatic selection never picks one.
145
+
146
+ `suggestNewerModels: false` in `~/.onecode/settings.json` turns off the
147
+ newer-model notices; the others can't be turned off. `/doctor report`
148
+ lists them all under the model they apply to.
98
149
 
99
150
  Claude Code's model aliases work everywhere: `sonnet`, `haiku`, `opus` and
100
151
  `fable` resolve to a model of that name when your provider has one, and
101
152
  otherwise to the matching class within your provider (`haiku` the cheapest
102
- capable model, `sonnet` the cheapest Sonnet-class model, `opus` and `fable`
103
- your main model). They never switch providers.
104
-
105
- Capability is judged by tier (see the next section). One Code excludes
106
- models that can't call tools, have no price, or are a generation behind: a
107
- model released more than a year after its vendor's newest drops one tier,
108
- and one more than two years behind never gets picked automatically.
109
- Provider aliases such as `:free` or `:online` variants are skipped.
110
-
111
- ### Measured selection with Artificial Analysis
112
-
113
- If you have an [Artificial Analysis](https://artificialanalysis.ai) API key,
114
- One Code uses measured coding ability instead of name-based tiers for these
115
- picks: a candidate must score at least the lower of your session model's
116
- coding index and a Sonnet 5 reference (the reader gets 10 percent
117
- tolerance; subagents and the classifier get none). The score can also move
118
- a model to a more scaffolded prompt: a model whose coding index is below 85
119
- percent of the Sonnet 5 reference gets at most the cheap register, and one
120
- below 60 percent at most the tiny register. A score never moves a model to
121
- a leaner register than its name class allows. Models sold under several
122
- providers share one release date for this purpose, so a Codex or Azure
123
- listing is scored like its OpenAI twin. Set `AA_API_KEY`, or add the key to `~/.onecode/settings.json`:
153
+ non-tiny model, `sonnet` the cheapest workhorse-tier model, `opus` and
154
+ `fable` your main model). They never switch providers.
124
155
 
125
- ```json
126
- {
127
- "capabilityIndex": {
128
- "artificialAnalysisApiKey": "…"
129
- }
130
- }
131
- ```
132
-
133
- The snapshot is cached under `~/.onecode/cache/` and refreshed at most once
134
- a day. Without a key, selection uses tiers alone. The measured index never
135
- changes the prompt tier itself.
156
+ An automatic pick is always a model the public catalogs know and consider
157
+ current. It skips a model that a newer one from the same vendor replaces at
158
+ about the same price, one more than two years older than its vendor's newest
159
+ release, and anything deprecated, unable to call tools, or unpriced.
160
+ Provider aliases such as `:free` or `:online` variants are skipped too.
136
161
 
137
162
  `/doctor report` shows the model each role gets and why, and `/doctor
138
163
  presets` offers three coordinated presets; see
@@ -145,14 +170,72 @@ the system prompt to match:
145
170
 
146
171
  | Tier | Models | Prompt |
147
172
  |---|---|---|
148
- | Frontier | Opus and Fable, current generation. | Claude Code's terse prompt. |
149
- | Workhorse | Sonnet-class models and comparable third-party models. | Claude Code's full prompt. |
150
- | Cheap | Haiku-class models and comparable "flash", "mini", or "small" models. | The verbose prompt Claude Code gives Haiku. |
151
- | Tiny | Sub-Haiku models. | The verbose prompt plus extra scaffolding and the `grep`, `find`, and `ls` tools. |
152
-
153
- The tier is derived from the model's name, release date, and price. You
154
- don't configure it; set `CC_PROMPT_TIER` to force one when you want to
155
- experiment. `/doctor report` shows the tier in use.
173
+ | Frontier | Opus and Fable, current generation, Sonnet 5.5 and later, Haiku 5 and later, and OpenAI's GPT-6 Astra and Sol, served by Anthropic and OpenAI themselves. | A short, terse prompt. |
174
+ | Workhorse | A vendor's large current models. | A full, detailed prompt. |
175
+ | Cheap | A vendor's smaller models, and large ones a year or more behind its newest. | The full prompt, with longer, more explicit tool descriptions. |
176
+ | Tiny | Small models: under 40 billion parameters, or, when the size isn't published, a name with `nano`, `micro`, `lite` or `tiny` in it. | The cheap tier's prompt plus extra scaffolding and the `grep`, `find`, and `ls` tools. |
177
+
178
+ Frontier is a fixed list, decided by model version. Haiku 5 and later get
179
+ the frontier prompt only: when One Code picks a model for subagents or the
180
+ classifier, or decides how strict the permission gate is, a Haiku counts at
181
+ its catalog tier, so it never stands in for Opus. Everything else
182
+ comes from three public catalogs: [models.dev](https://models.dev) for
183
+ release dates and prices, OpenRouter's model list, and Hugging Face for
184
+ parameter counts. Each model is compared with its own vendor's current
185
+ lineup, not with other vendors:
186
+
187
+ - When every current model of a vendor publishes its size, size decides: a
188
+ model is workhorse when it has at least half the parameters of the
189
+ vendor's largest current model.
190
+ - Otherwise price decides, for all of that vendor's models: a model is
191
+ workhorse when its price is at least 30 percent of the median price of
192
+ the vendor's current models. The median keeps a premium `-pro` or `-fast`
193
+ model from setting the bar.
194
+ - When price decides and a vendor has fewer than three current priced
195
+ models, there's nothing to compare against, so its models count as cheap.
196
+ - A workhorse model more than a year older than its vendor's newest
197
+ workhorse model drops to cheap. Age never makes a model tiny.
198
+
199
+ A model no catalog knows is tiny when its name gives a small size (`27b`)
200
+ or one of those small-model words, or when it has no price or runs on a
201
+ custom provider. Otherwise it's cheap.
202
+
203
+ One Code ships with a copy of all three catalogs and refreshes them once a
204
+ day in the background from interactive sessions; a one-shot `-p` run only
205
+ reads the copy on disk. A refresh changes the subagent default, the reader
206
+ and the permission checks right away. The prompt tier and the classifier
207
+ pick change at your next session or model switch, never in the middle of
208
+ one. Set `"refreshModelCatalog": false` in `~/.onecode/settings.json` (or
209
+ `PI_OFFLINE=1`) to stay on the copy you have.
210
+
211
+ If you disagree with a tier, set it yourself in `~/.onecode/settings.json`.
212
+ Key it by `provider/id`, or by the model id alone, spelled exactly as the
213
+ provider spells it (on OpenRouter that includes the vendor, as in
214
+ `z-ai/glm-5.3-flash`). An id alone applies on every provider that uses it:
215
+
216
+ ```json
217
+ {
218
+ "modelTiers": {
219
+ "openrouter/qwen/qwen3.8-max-0902": "workhorse",
220
+ "glm-5.3-flash": "cheap"
221
+ }
222
+ }
223
+ ```
224
+
225
+ This setting is read from your user settings only, never from a project.
226
+ `CC_PROMPT_TIER` forces one tier for the session's prompt when you want to
227
+ experiment. `/doctor report` shows the tier in use and the rule that set it.
228
+
229
+ The tier also decides which permission shortcuts apply in auto and
230
+ accept-edits modes (see [What is approved without a classifier
231
+ call](permissions-modes-and-auto-mode.md#what-is-approved-without-a-classifier-call)).
232
+ `CC_PROMPT_TIER` never changes the permission checks; `modelTiers` does,
233
+ because it states what the model is.
234
+
235
+ Like Claude Code, One Code gives frontier models and Sonnet 5 or later no
236
+ task list: the `task_create` family is left out, along with the prompt line
237
+ that points at it. Set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to turn the task
238
+ tools back on for them.
156
239
 
157
240
  ## Web search on providers without a search API
158
241