@oh-my-pi/pi-coding-agent 6.9.69 → 8.0.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 (502) hide show
  1. package/CHANGELOG.md +219 -51
  2. package/README.md +1 -1
  3. package/docs/hooks.md +2 -2
  4. package/docs/sdk.md +1 -1
  5. package/examples/sdk/04-skills.ts +1 -1
  6. package/package.json +10 -10
  7. package/scripts/format-prompts.ts +143 -0
  8. package/scripts/generate-template.ts +1 -1
  9. package/src/cli/args.ts +3 -3
  10. package/src/cli/config-cli.ts +4 -4
  11. package/src/cli/file-processor.ts +3 -3
  12. package/src/cli/list-models.ts +2 -2
  13. package/src/cli/plugin-cli.ts +3 -3
  14. package/src/cli/session-picker.ts +2 -2
  15. package/src/cli/setup-cli.ts +2 -2
  16. package/src/cli/stats-cli.ts +1 -1
  17. package/src/cli/update-cli.ts +2 -2
  18. package/src/{core → config}/keybindings.ts +1 -1
  19. package/src/{core → config}/model-registry.ts +8 -1
  20. package/src/{core → config}/model-resolver.ts +3 -3
  21. package/src/{core → config}/prompt-templates.ts +2 -2
  22. package/src/{core → config}/settings-manager.ts +6 -6
  23. package/src/{core/cursor/exec-bridge.ts → cursor.ts} +4 -4
  24. package/src/discovery/agents-md.ts +4 -4
  25. package/src/discovery/builtin.ts +17 -17
  26. package/src/discovery/claude.ts +12 -12
  27. package/src/discovery/cline.ts +6 -6
  28. package/src/discovery/codex.ts +21 -21
  29. package/src/discovery/cursor.ts +9 -9
  30. package/src/discovery/gemini.ts +9 -9
  31. package/src/discovery/github.ts +6 -6
  32. package/src/discovery/helpers.ts +4 -4
  33. package/src/discovery/index.ts +16 -16
  34. package/src/discovery/mcp-json.ts +4 -4
  35. package/src/discovery/ssh.ts +4 -4
  36. package/src/discovery/vscode.ts +4 -4
  37. package/src/discovery/windsurf.ts +6 -6
  38. package/src/{core/tools/exa → exa}/company.ts +2 -3
  39. package/src/{core/tools/exa → exa}/index.ts +2 -2
  40. package/src/{core/tools/exa → exa}/linkedin.ts +2 -3
  41. package/src/{core/tools/exa → exa}/mcp-client.ts +2 -2
  42. package/src/{core/tools/exa → exa}/render.ts +3 -3
  43. package/src/{core/tools/exa → exa}/researcher.ts +1 -1
  44. package/src/{core/tools/exa → exa}/search.ts +2 -10
  45. package/src/{core/tools/exa → exa}/websets.ts +1 -1
  46. package/src/{core → exec}/bash-executor.ts +23 -7
  47. package/src/{core → export}/custom-share.ts +1 -1
  48. package/src/{core/export-html → export/html}/index.ts +3 -3
  49. package/src/{core → export}/ttsr.ts +2 -2
  50. package/src/{core → extensibility}/custom-commands/bundled/review/index.ts +4 -4
  51. package/src/{core → extensibility}/custom-commands/loader.ts +3 -3
  52. package/src/{core → extensibility}/custom-commands/types.ts +1 -1
  53. package/src/{core → extensibility}/custom-tools/loader.ts +9 -9
  54. package/src/{core → extensibility}/custom-tools/types.ts +6 -6
  55. package/src/{core → extensibility}/custom-tools/wrapper.ts +1 -1
  56. package/src/{core → extensibility}/extensions/loader.ts +8 -8
  57. package/src/{core → extensibility}/extensions/runner.ts +3 -3
  58. package/src/{core → extensibility}/extensions/types.ts +15 -15
  59. package/src/{core → extensibility}/extensions/wrapper.ts +1 -1
  60. package/src/{core → extensibility}/hooks/index.ts +1 -1
  61. package/src/{core → extensibility}/hooks/loader.ts +7 -7
  62. package/src/{core → extensibility}/hooks/runner.ts +4 -4
  63. package/src/{core → extensibility}/hooks/types.ts +9 -9
  64. package/src/{core → extensibility}/plugins/doctor.ts +1 -1
  65. package/src/{core → extensibility}/plugins/installer.ts +2 -3
  66. package/src/{core → extensibility}/plugins/paths.ts +1 -1
  67. package/src/{core → extensibility}/skills.ts +8 -48
  68. package/src/{core → extensibility}/slash-commands.ts +6 -6
  69. package/src/index.ts +127 -128
  70. package/src/internal-urls/agent-protocol.ts +126 -0
  71. package/src/internal-urls/artifact-protocol.ts +93 -0
  72. package/src/internal-urls/index.ts +28 -0
  73. package/src/internal-urls/json-query.ts +126 -0
  74. package/src/internal-urls/router.ts +69 -0
  75. package/src/internal-urls/rule-protocol.ts +56 -0
  76. package/src/internal-urls/skill-protocol.ts +112 -0
  77. package/src/internal-urls/types.ts +48 -0
  78. package/src/{core/python-executor.ts → ipy/executor.ts} +74 -13
  79. package/src/{core/python-gateway-coordinator.ts → ipy/gateway-coordinator.ts} +40 -270
  80. package/src/{core/python-kernel.ts → ipy/kernel.ts} +38 -10
  81. package/src/{core/python-prelude.py → ipy/prelude.py} +201 -8
  82. package/src/ipy/prelude.ts +3 -0
  83. package/src/{core/tools/lsp → lsp}/client.ts +7 -6
  84. package/src/{core/tools/lsp → lsp}/clients/biome-client.ts +1 -1
  85. package/src/{core/tools/lsp → lsp}/clients/index.ts +1 -1
  86. package/src/{core/tools/lsp → lsp}/clients/lsp-linter-client.ts +4 -4
  87. package/src/{core/tools/lsp → lsp}/config.ts +1 -1
  88. package/src/{core/tools/lsp → lsp}/index.ts +29 -17
  89. package/src/{core/tools/lsp → lsp}/render.ts +2 -2
  90. package/src/{core/tools/lsp → lsp}/types.ts +14 -16
  91. package/src/{core/tools/lsp → lsp}/utils.ts +1 -1
  92. package/src/main.ts +12 -12
  93. package/src/{core/mcp → mcp}/config.ts +8 -8
  94. package/src/{core/mcp → mcp}/loader.ts +5 -6
  95. package/src/{core/mcp → mcp}/manager.ts +2 -2
  96. package/src/{core/mcp → mcp}/tool-bridge.ts +35 -6
  97. package/src/{core/mcp → mcp}/tool-cache.ts +1 -1
  98. package/src/{core/mcp → mcp}/transports/http.ts +7 -1
  99. package/src/{core/mcp → mcp}/transports/stdio.ts +1 -1
  100. package/src/{core/mcp → mcp}/types.ts +1 -1
  101. package/src/migrations.ts +2 -2
  102. package/src/modes/{interactive/components → components}/armin.ts +1 -1
  103. package/src/modes/{interactive/components → components}/assistant-message.ts +1 -1
  104. package/src/modes/{interactive/components → components}/bash-execution.ts +37 -29
  105. package/src/modes/{interactive/components → components}/bordered-loader.ts +1 -1
  106. package/src/modes/{interactive/components → components}/branch-summary-message.ts +2 -2
  107. package/src/modes/{interactive/components → components}/compaction-summary-message.ts +2 -2
  108. package/src/modes/{interactive/components → components}/custom-message.ts +3 -3
  109. package/src/modes/{interactive/components → components}/diff.ts +1 -1
  110. package/src/modes/{interactive/components → components}/dynamic-border.ts +1 -1
  111. package/src/modes/{interactive/components → components}/extensions/extension-dashboard.ts +3 -3
  112. package/src/modes/{interactive/components → components}/extensions/extension-list.ts +2 -2
  113. package/src/modes/{interactive/components → components}/extensions/inspector-panel.ts +1 -1
  114. package/src/modes/{interactive/components → components}/extensions/state-manager.ts +11 -17
  115. package/src/modes/{interactive/components → components}/extensions/types.ts +1 -1
  116. package/src/modes/{interactive/components → components}/footer.ts +3 -3
  117. package/src/modes/{interactive/components → components}/history-search.ts +2 -2
  118. package/src/modes/{interactive/components → components}/hook-editor.ts +1 -1
  119. package/src/modes/{interactive/components → components}/hook-input.ts +1 -1
  120. package/src/modes/{interactive/components → components}/hook-message.ts +3 -3
  121. package/src/modes/{interactive/components → components}/hook-selector.ts +1 -1
  122. package/src/modes/{interactive/components → components}/keybinding-hints.ts +2 -2
  123. package/src/modes/{interactive/components → components}/login-dialog.ts +1 -1
  124. package/src/modes/{interactive/components → components}/model-selector.ts +5 -5
  125. package/src/modes/{interactive/components → components}/oauth-selector.ts +2 -2
  126. package/src/modes/{interactive/components → components}/plugin-settings.ts +3 -3
  127. package/src/modes/{interactive/components → components}/python-execution.ts +35 -24
  128. package/src/modes/{interactive/components → components}/queue-mode-selector.ts +1 -1
  129. package/src/modes/{interactive/components → components}/read-tool-group.ts +2 -2
  130. package/src/modes/{interactive/components → components}/session-selector.ts +3 -3
  131. package/src/modes/{interactive/components → components}/settings-defs.ts +2 -2
  132. package/src/modes/{interactive/components → components}/settings-selector.ts +2 -2
  133. package/src/modes/{interactive/components → components}/show-images-selector.ts +1 -1
  134. package/src/modes/{interactive/components → components}/status-line/segments.ts +2 -2
  135. package/src/modes/{interactive/components → components}/status-line/separators.ts +1 -1
  136. package/src/modes/{interactive/components → components}/status-line/types.ts +2 -2
  137. package/src/modes/{interactive/components → components}/status-line-segment-editor.ts +2 -2
  138. package/src/modes/{interactive/components → components}/status-line.ts +3 -3
  139. package/src/modes/{interactive/components → components}/theme-selector.ts +1 -1
  140. package/src/modes/{interactive/components → components}/thinking-selector.ts +1 -1
  141. package/src/modes/{interactive/components → components}/todo-display.ts +3 -4
  142. package/src/modes/{interactive/components → components}/todo-reminder.ts +2 -2
  143. package/src/modes/{interactive/components → components}/tool-execution.ts +8 -8
  144. package/src/modes/{interactive/components → components}/tree-selector.ts +3 -3
  145. package/src/modes/{interactive/components → components}/ttsr-notification.ts +2 -2
  146. package/src/modes/{interactive/components → components}/user-message-selector.ts +1 -1
  147. package/src/modes/{interactive/components → components}/user-message.ts +1 -1
  148. package/src/modes/{interactive/components → components}/welcome.ts +2 -2
  149. package/src/modes/{interactive/controllers → controllers}/command-controller.ts +381 -30
  150. package/src/modes/{interactive/controllers → controllers}/event-controller.ts +9 -9
  151. package/src/modes/{interactive/controllers → controllers}/extension-ui-controller.ts +8 -8
  152. package/src/modes/{interactive/controllers → controllers}/input-controller.ts +61 -13
  153. package/src/modes/{interactive/controllers → controllers}/selector-controller.ts +16 -16
  154. package/src/modes/index.ts +1 -1
  155. package/src/modes/{interactive/interactive-mode.ts → interactive-mode.ts} +20 -15
  156. package/src/modes/print-mode.ts +1 -1
  157. package/src/modes/rpc/rpc-client.ts +3 -3
  158. package/src/modes/rpc/rpc-mode.ts +3 -3
  159. package/src/modes/rpc/rpc-types.ts +3 -3
  160. package/src/modes/{interactive/theme → theme}/theme.ts +1 -1
  161. package/src/modes/{interactive/types.ts → types.ts} +10 -10
  162. package/src/modes/{interactive/utils → utils}/ui-helpers.ts +20 -27
  163. package/src/{core/tools/patch → patch}/applicator.ts +1 -1
  164. package/src/{core/tools/patch → patch}/diff.ts +1 -1
  165. package/src/{core/tools/patch → patch}/index.ts +31 -36
  166. package/src/{core/tools/patch → patch}/shared.ts +9 -6
  167. package/src/prompts/agents/explore.md +83 -46
  168. package/src/prompts/agents/init.md +9 -4
  169. package/src/prompts/agents/plan.md +8 -7
  170. package/src/prompts/agents/reviewer.md +36 -18
  171. package/src/prompts/agents/task.md +4 -4
  172. package/src/prompts/compaction/branch-summary-preamble.md +0 -1
  173. package/src/prompts/review-request.md +0 -1
  174. package/src/prompts/system/custom-system-prompt.md +2 -14
  175. package/src/prompts/system/file-operations.md +0 -2
  176. package/src/prompts/system/system-prompt.md +182 -171
  177. package/src/prompts/system/web-search.md +26 -0
  178. package/src/prompts/tools/ask.md +31 -24
  179. package/src/prompts/tools/bash.md +20 -17
  180. package/src/prompts/tools/calculator.md +9 -5
  181. package/src/prompts/tools/fetch.md +16 -0
  182. package/src/prompts/tools/find.md +15 -5
  183. package/src/prompts/tools/gemini-image.md +21 -6
  184. package/src/prompts/tools/grep.md +28 -12
  185. package/src/prompts/tools/lsp.md +35 -14
  186. package/src/prompts/tools/patch.md +39 -41
  187. package/src/prompts/tools/python.md +59 -77
  188. package/src/prompts/tools/read.md +23 -22
  189. package/src/prompts/tools/replace.md +19 -12
  190. package/src/prompts/tools/ssh.md +21 -28
  191. package/src/prompts/tools/task.md +54 -44
  192. package/src/prompts/tools/todo-write.md +52 -163
  193. package/src/prompts/tools/web-search.md +16 -9
  194. package/src/prompts/tools/write.md +13 -2
  195. package/src/{core/sdk.ts → sdk.ts} +65 -34
  196. package/src/{core → session}/agent-session.ts +157 -41
  197. package/src/{core → session}/agent-storage.ts +2 -2
  198. package/src/session/artifacts.ts +110 -0
  199. package/src/{core → session}/auth-storage.ts +525 -203
  200. package/src/{core → session}/compaction/branch-summarization.ts +5 -5
  201. package/src/{core → session}/compaction/compaction.ts +6 -6
  202. package/src/{core → session}/compaction/utils.ts +3 -3
  203. package/src/{core → session}/history-storage.ts +1 -1
  204. package/src/{core → session}/messages.ts +6 -8
  205. package/src/{core → session}/session-manager.ts +2 -2
  206. package/src/{core → session}/storage-migration.ts +2 -2
  207. package/src/session/streaming-output.ts +177 -0
  208. package/src/{core/ssh → ssh}/connection-manager.ts +1 -1
  209. package/src/{core/ssh → ssh}/ssh-executor.ts +19 -4
  210. package/src/{core/ssh → ssh}/sshfs-mount.ts +1 -1
  211. package/src/{core/system-prompt.ts → system-prompt.ts} +8 -37
  212. package/src/{core/tools/task → task}/agents.ts +8 -8
  213. package/src/{core/tools/task → task}/commands.ts +5 -6
  214. package/src/{core/tools/task → task}/discovery.ts +3 -3
  215. package/src/{core/tools/task → task}/executor.ts +34 -44
  216. package/src/{core/tools/task → task}/index.ts +206 -50
  217. package/src/{core/tools/task → task}/render.ts +80 -23
  218. package/src/{core/tools/task → task}/subprocess-tool-registry.ts +1 -1
  219. package/src/task/template.ts +47 -0
  220. package/src/{core/tools/task → task}/types.ts +19 -27
  221. package/src/{core/tools/task → task}/worker-protocol.ts +8 -4
  222. package/src/{core/tools/task → task}/worker.ts +34 -29
  223. package/src/task/worktree.ts +166 -0
  224. package/src/{core/tools → tools}/ask.ts +13 -21
  225. package/src/{core/tools → tools}/bash-interceptor.ts +1 -1
  226. package/src/{core/tools → tools}/bash.ts +61 -63
  227. package/src/{core/tools → tools}/calculator.ts +4 -4
  228. package/src/{core/tools → tools}/complete.ts +1 -1
  229. package/src/{core/tools → tools}/context.ts +2 -2
  230. package/src/{core/tools/web-fetch.ts → tools/fetch.ts} +97 -76
  231. package/src/{core/tools → tools}/find.ts +96 -107
  232. package/src/{core/tools → tools}/gemini-image.ts +420 -29
  233. package/src/{core/tools → tools}/grep.ts +155 -164
  234. package/src/{core/tools → tools}/index.ts +63 -56
  235. package/src/tools/list-limit.ts +40 -0
  236. package/src/{core/tools → tools}/ls.ts +44 -35
  237. package/src/{core/tools → tools}/notebook.ts +3 -3
  238. package/src/tools/output-meta.ts +443 -0
  239. package/src/tools/output-utils.ts +63 -0
  240. package/src/{core/tools → tools}/python.ts +106 -89
  241. package/src/tools/read.ts +882 -0
  242. package/src/{core/tools → tools}/render-utils.ts +1 -1
  243. package/src/{core/tools → tools}/renderers.ts +8 -10
  244. package/src/{core/tools → tools}/review.ts +2 -2
  245. package/src/{core/tools → tools}/ssh.ts +56 -59
  246. package/src/{core/tools → tools}/todo-write.ts +12 -23
  247. package/src/tools/tool-errors.ts +95 -0
  248. package/src/tools/tool-result.ts +92 -0
  249. package/src/{core/tools → tools}/truncate.ts +2 -2
  250. package/src/{core/tools → tools}/write.ts +15 -13
  251. package/src/utils/changelog.ts +1 -1
  252. package/src/{core → utils}/file-mentions.ts +4 -4
  253. package/src/utils/image-convert.ts +1 -1
  254. package/src/utils/image-resize.ts +1 -1
  255. package/src/utils/shell.ts +1 -1
  256. package/src/{core → utils}/title-generator.ts +4 -4
  257. package/src/utils/tools-manager.ts +1 -1
  258. package/src/{core/tools/web-scrapers → web/scrapers}/choosealicense.ts +1 -1
  259. package/src/{core/tools/web-scrapers → web/scrapers}/twitter.ts +3 -2
  260. package/src/{core/tools/web-scrapers → web/scrapers}/types.ts +4 -2
  261. package/src/{core/tools/web-scrapers → web/scrapers}/utils.ts +1 -1
  262. package/src/{core/tools/web-scrapers → web/scrapers}/youtube.ts +14 -13
  263. package/src/{core/tools/web-search → web/search}/auth.ts +4 -4
  264. package/src/{core/tools/web-search → web/search}/index.ts +22 -71
  265. package/src/{core/tools/web-search → web/search}/providers/anthropic.ts +7 -10
  266. package/src/{core/tools/web-search → web/search}/providers/exa.ts +2 -2
  267. package/src/{core/tools/web-search → web/search}/providers/perplexity.ts +4 -16
  268. package/src/{core/tools/web-search → web/search}/render.ts +3 -3
  269. package/scripts/migrate-sessions.sh +0 -93
  270. package/src/core/index.ts +0 -56
  271. package/src/core/python-prelude.ts +0 -3
  272. package/src/core/ssh-executor.ts +0 -5
  273. package/src/core/streaming-output.ts +0 -115
  274. package/src/core/tools/output.ts +0 -519
  275. package/src/core/tools/read.ts +0 -717
  276. package/src/core/tools/task/template.ts +0 -37
  277. package/src/prompts/tools/output.md +0 -47
  278. package/src/prompts/tools/web-fetch.md +0 -9
  279. /package/src/{core/tools/exa → exa}/types.ts +0 -0
  280. /package/src/{core → exec}/exec.ts +0 -0
  281. /package/src/{core/export-html → export/html}/template.css +0 -0
  282. /package/src/{core/export-html → export/html}/template.generated.ts +0 -0
  283. /package/src/{core/export-html → export/html}/template.html +0 -0
  284. /package/src/{core/export-html → export/html}/template.js +0 -0
  285. /package/src/{core/export-html → export/html}/template.macro.ts +0 -0
  286. /package/src/{core/export-html → export/html}/vendor/highlight.min.js +0 -0
  287. /package/src/{core/export-html → export/html}/vendor/marked.min.js +0 -0
  288. /package/src/{core → extensibility}/custom-commands/index.ts +0 -0
  289. /package/src/{core → extensibility}/custom-tools/index.ts +0 -0
  290. /package/src/{core → extensibility}/extensions/index.ts +0 -0
  291. /package/src/{core → extensibility}/hooks/tool-wrapper.ts +0 -0
  292. /package/src/{core → extensibility}/plugins/index.ts +0 -0
  293. /package/src/{core → extensibility}/plugins/loader.ts +0 -0
  294. /package/src/{core → extensibility}/plugins/manager.ts +0 -0
  295. /package/src/{core → extensibility}/plugins/parser.ts +0 -0
  296. /package/src/{core → extensibility}/plugins/types.ts +0 -0
  297. /package/src/{core/python-modules.ts → ipy/modules.ts} +0 -0
  298. /package/src/{core/tools/lsp → lsp}/defaults.json +0 -0
  299. /package/src/{core/tools/lsp → lsp}/edits.ts +0 -0
  300. /package/src/{core/tools/lsp → lsp}/lspmux.ts +0 -0
  301. /package/src/{core/tools/lsp → lsp}/rust-analyzer.ts +0 -0
  302. /package/src/{core/mcp → mcp}/client.ts +0 -0
  303. /package/src/{core/mcp → mcp}/index.ts +0 -0
  304. /package/src/{core/mcp → mcp}/json-rpc.ts +0 -0
  305. /package/src/{core/mcp → mcp}/transports/index.ts +0 -0
  306. /package/src/modes/{interactive/components → components}/countdown-timer.ts +0 -0
  307. /package/src/modes/{interactive/components → components}/custom-editor.ts +0 -0
  308. /package/src/modes/{interactive/components → components}/extensions/index.ts +0 -0
  309. /package/src/modes/{interactive/components → components}/index.ts +0 -0
  310. /package/src/modes/{interactive/components → components}/status-line/index.ts +0 -0
  311. /package/src/modes/{interactive/components → components}/status-line/presets.ts +0 -0
  312. /package/src/modes/{interactive/components → components}/visual-truncate.ts +0 -0
  313. /package/src/modes/{interactive/theme → theme}/dark.json +0 -0
  314. /package/src/modes/{interactive/theme → theme}/defaults/alabaster.json +0 -0
  315. /package/src/modes/{interactive/theme → theme}/defaults/amethyst.json +0 -0
  316. /package/src/modes/{interactive/theme → theme}/defaults/anthracite.json +0 -0
  317. /package/src/modes/{interactive/theme → theme}/defaults/basalt.json +0 -0
  318. /package/src/modes/{interactive/theme → theme}/defaults/birch.json +0 -0
  319. /package/src/modes/{interactive/theme → theme}/defaults/dark-abyss.json +0 -0
  320. /package/src/modes/{interactive/theme → theme}/defaults/dark-arctic.json +0 -0
  321. /package/src/modes/{interactive/theme → theme}/defaults/dark-aurora.json +0 -0
  322. /package/src/modes/{interactive/theme → theme}/defaults/dark-catppuccin.json +0 -0
  323. /package/src/modes/{interactive/theme → theme}/defaults/dark-cavern.json +0 -0
  324. /package/src/modes/{interactive/theme → theme}/defaults/dark-copper.json +0 -0
  325. /package/src/modes/{interactive/theme → theme}/defaults/dark-cosmos.json +0 -0
  326. /package/src/modes/{interactive/theme → theme}/defaults/dark-cyberpunk.json +0 -0
  327. /package/src/modes/{interactive/theme → theme}/defaults/dark-dracula.json +0 -0
  328. /package/src/modes/{interactive/theme → theme}/defaults/dark-eclipse.json +0 -0
  329. /package/src/modes/{interactive/theme → theme}/defaults/dark-ember.json +0 -0
  330. /package/src/modes/{interactive/theme → theme}/defaults/dark-equinox.json +0 -0
  331. /package/src/modes/{interactive/theme → theme}/defaults/dark-forest.json +0 -0
  332. /package/src/modes/{interactive/theme → theme}/defaults/dark-github.json +0 -0
  333. /package/src/modes/{interactive/theme → theme}/defaults/dark-gruvbox.json +0 -0
  334. /package/src/modes/{interactive/theme → theme}/defaults/dark-lavender.json +0 -0
  335. /package/src/modes/{interactive/theme → theme}/defaults/dark-lunar.json +0 -0
  336. /package/src/modes/{interactive/theme → theme}/defaults/dark-midnight.json +0 -0
  337. /package/src/modes/{interactive/theme → theme}/defaults/dark-monochrome.json +0 -0
  338. /package/src/modes/{interactive/theme → theme}/defaults/dark-monokai.json +0 -0
  339. /package/src/modes/{interactive/theme → theme}/defaults/dark-nebula.json +0 -0
  340. /package/src/modes/{interactive/theme → theme}/defaults/dark-nord.json +0 -0
  341. /package/src/modes/{interactive/theme → theme}/defaults/dark-ocean.json +0 -0
  342. /package/src/modes/{interactive/theme → theme}/defaults/dark-one.json +0 -0
  343. /package/src/modes/{interactive/theme → theme}/defaults/dark-rainforest.json +0 -0
  344. /package/src/modes/{interactive/theme → theme}/defaults/dark-reef.json +0 -0
  345. /package/src/modes/{interactive/theme → theme}/defaults/dark-retro.json +0 -0
  346. /package/src/modes/{interactive/theme → theme}/defaults/dark-rose-pine.json +0 -0
  347. /package/src/modes/{interactive/theme → theme}/defaults/dark-sakura.json +0 -0
  348. /package/src/modes/{interactive/theme → theme}/defaults/dark-slate.json +0 -0
  349. /package/src/modes/{interactive/theme → theme}/defaults/dark-solarized.json +0 -0
  350. /package/src/modes/{interactive/theme → theme}/defaults/dark-solstice.json +0 -0
  351. /package/src/modes/{interactive/theme → theme}/defaults/dark-starfall.json +0 -0
  352. /package/src/modes/{interactive/theme → theme}/defaults/dark-sunset.json +0 -0
  353. /package/src/modes/{interactive/theme → theme}/defaults/dark-swamp.json +0 -0
  354. /package/src/modes/{interactive/theme → theme}/defaults/dark-synthwave.json +0 -0
  355. /package/src/modes/{interactive/theme → theme}/defaults/dark-taiga.json +0 -0
  356. /package/src/modes/{interactive/theme → theme}/defaults/dark-terminal.json +0 -0
  357. /package/src/modes/{interactive/theme → theme}/defaults/dark-tokyo-night.json +0 -0
  358. /package/src/modes/{interactive/theme → theme}/defaults/dark-tundra.json +0 -0
  359. /package/src/modes/{interactive/theme → theme}/defaults/dark-twilight.json +0 -0
  360. /package/src/modes/{interactive/theme → theme}/defaults/dark-volcanic.json +0 -0
  361. /package/src/modes/{interactive/theme → theme}/defaults/graphite.json +0 -0
  362. /package/src/modes/{interactive/theme → theme}/defaults/index.ts +0 -0
  363. /package/src/modes/{interactive/theme → theme}/defaults/light-arctic.json +0 -0
  364. /package/src/modes/{interactive/theme → theme}/defaults/light-aurora-day.json +0 -0
  365. /package/src/modes/{interactive/theme → theme}/defaults/light-canyon.json +0 -0
  366. /package/src/modes/{interactive/theme → theme}/defaults/light-catppuccin.json +0 -0
  367. /package/src/modes/{interactive/theme → theme}/defaults/light-cirrus.json +0 -0
  368. /package/src/modes/{interactive/theme → theme}/defaults/light-coral.json +0 -0
  369. /package/src/modes/{interactive/theme → theme}/defaults/light-cyberpunk.json +0 -0
  370. /package/src/modes/{interactive/theme → theme}/defaults/light-dawn.json +0 -0
  371. /package/src/modes/{interactive/theme → theme}/defaults/light-dunes.json +0 -0
  372. /package/src/modes/{interactive/theme → theme}/defaults/light-eucalyptus.json +0 -0
  373. /package/src/modes/{interactive/theme → theme}/defaults/light-forest.json +0 -0
  374. /package/src/modes/{interactive/theme → theme}/defaults/light-frost.json +0 -0
  375. /package/src/modes/{interactive/theme → theme}/defaults/light-github.json +0 -0
  376. /package/src/modes/{interactive/theme → theme}/defaults/light-glacier.json +0 -0
  377. /package/src/modes/{interactive/theme → theme}/defaults/light-gruvbox.json +0 -0
  378. /package/src/modes/{interactive/theme → theme}/defaults/light-haze.json +0 -0
  379. /package/src/modes/{interactive/theme → theme}/defaults/light-honeycomb.json +0 -0
  380. /package/src/modes/{interactive/theme → theme}/defaults/light-lagoon.json +0 -0
  381. /package/src/modes/{interactive/theme → theme}/defaults/light-lavender.json +0 -0
  382. /package/src/modes/{interactive/theme → theme}/defaults/light-meadow.json +0 -0
  383. /package/src/modes/{interactive/theme → theme}/defaults/light-mint.json +0 -0
  384. /package/src/modes/{interactive/theme → theme}/defaults/light-monochrome.json +0 -0
  385. /package/src/modes/{interactive/theme → theme}/defaults/light-ocean.json +0 -0
  386. /package/src/modes/{interactive/theme → theme}/defaults/light-one.json +0 -0
  387. /package/src/modes/{interactive/theme → theme}/defaults/light-opal.json +0 -0
  388. /package/src/modes/{interactive/theme → theme}/defaults/light-orchard.json +0 -0
  389. /package/src/modes/{interactive/theme → theme}/defaults/light-paper.json +0 -0
  390. /package/src/modes/{interactive/theme → theme}/defaults/light-prism.json +0 -0
  391. /package/src/modes/{interactive/theme → theme}/defaults/light-retro.json +0 -0
  392. /package/src/modes/{interactive/theme → theme}/defaults/light-sand.json +0 -0
  393. /package/src/modes/{interactive/theme → theme}/defaults/light-savanna.json +0 -0
  394. /package/src/modes/{interactive/theme → theme}/defaults/light-solarized.json +0 -0
  395. /package/src/modes/{interactive/theme → theme}/defaults/light-soleil.json +0 -0
  396. /package/src/modes/{interactive/theme → theme}/defaults/light-sunset.json +0 -0
  397. /package/src/modes/{interactive/theme → theme}/defaults/light-synthwave.json +0 -0
  398. /package/src/modes/{interactive/theme → theme}/defaults/light-tokyo-night.json +0 -0
  399. /package/src/modes/{interactive/theme → theme}/defaults/light-wetland.json +0 -0
  400. /package/src/modes/{interactive/theme → theme}/defaults/light-zenith.json +0 -0
  401. /package/src/modes/{interactive/theme → theme}/defaults/limestone.json +0 -0
  402. /package/src/modes/{interactive/theme → theme}/defaults/mahogany.json +0 -0
  403. /package/src/modes/{interactive/theme → theme}/defaults/marble.json +0 -0
  404. /package/src/modes/{interactive/theme → theme}/defaults/obsidian.json +0 -0
  405. /package/src/modes/{interactive/theme → theme}/defaults/onyx.json +0 -0
  406. /package/src/modes/{interactive/theme → theme}/defaults/pearl.json +0 -0
  407. /package/src/modes/{interactive/theme → theme}/defaults/porcelain.json +0 -0
  408. /package/src/modes/{interactive/theme → theme}/defaults/quartz.json +0 -0
  409. /package/src/modes/{interactive/theme → theme}/defaults/sandstone.json +0 -0
  410. /package/src/modes/{interactive/theme → theme}/defaults/titanium.json +0 -0
  411. /package/src/modes/{interactive/theme → theme}/light.json +0 -0
  412. /package/src/modes/{interactive/theme → theme}/theme-schema.json +0 -0
  413. /package/src/{core/tools/patch → patch}/fuzzy.ts +0 -0
  414. /package/src/{core/tools/patch → patch}/normalize.ts +0 -0
  415. /package/src/{core/tools/patch → patch}/normative.ts +0 -0
  416. /package/src/{core/tools/patch → patch}/parser.ts +0 -0
  417. /package/src/{core/tools/patch → patch}/types.ts +0 -0
  418. /package/src/{core → session}/compaction/index.ts +0 -0
  419. /package/src/{core → session}/session-storage.ts +0 -0
  420. /package/src/{core/tools/task → task}/name-generator.ts +0 -0
  421. /package/src/{core/tools/task → task}/omp-command.ts +0 -0
  422. /package/src/{core/tools/task → task}/parallel.ts +0 -0
  423. /package/src/{core/tools → tools}/jtd-to-json-schema.ts +0 -0
  424. /package/src/{core/tools → tools}/path-utils.ts +0 -0
  425. /package/src/{core → utils}/event-bus.ts +0 -0
  426. /package/src/{core → utils}/frontmatter.ts +0 -0
  427. /package/src/{core → utils}/terminal-notify.ts +0 -0
  428. /package/src/{core → utils}/timings.ts +0 -0
  429. /package/src/{core → utils}/utils.ts +0 -0
  430. /package/src/{core/tools/web-scrapers → web/scrapers}/artifacthub.ts +0 -0
  431. /package/src/{core/tools/web-scrapers → web/scrapers}/arxiv.ts +0 -0
  432. /package/src/{core/tools/web-scrapers → web/scrapers}/aur.ts +0 -0
  433. /package/src/{core/tools/web-scrapers → web/scrapers}/biorxiv.ts +0 -0
  434. /package/src/{core/tools/web-scrapers → web/scrapers}/bluesky.ts +0 -0
  435. /package/src/{core/tools/web-scrapers → web/scrapers}/brew.ts +0 -0
  436. /package/src/{core/tools/web-scrapers → web/scrapers}/cheatsh.ts +0 -0
  437. /package/src/{core/tools/web-scrapers → web/scrapers}/chocolatey.ts +0 -0
  438. /package/src/{core/tools/web-scrapers → web/scrapers}/cisa-kev.ts +0 -0
  439. /package/src/{core/tools/web-scrapers → web/scrapers}/clojars.ts +0 -0
  440. /package/src/{core/tools/web-scrapers → web/scrapers}/coingecko.ts +0 -0
  441. /package/src/{core/tools/web-scrapers → web/scrapers}/crates-io.ts +0 -0
  442. /package/src/{core/tools/web-scrapers → web/scrapers}/crossref.ts +0 -0
  443. /package/src/{core/tools/web-scrapers → web/scrapers}/devto.ts +0 -0
  444. /package/src/{core/tools/web-scrapers → web/scrapers}/discogs.ts +0 -0
  445. /package/src/{core/tools/web-scrapers → web/scrapers}/discourse.ts +0 -0
  446. /package/src/{core/tools/web-scrapers → web/scrapers}/dockerhub.ts +0 -0
  447. /package/src/{core/tools/web-scrapers → web/scrapers}/fdroid.ts +0 -0
  448. /package/src/{core/tools/web-scrapers → web/scrapers}/firefox-addons.ts +0 -0
  449. /package/src/{core/tools/web-scrapers → web/scrapers}/flathub.ts +0 -0
  450. /package/src/{core/tools/web-scrapers → web/scrapers}/github-gist.ts +0 -0
  451. /package/src/{core/tools/web-scrapers → web/scrapers}/github.ts +0 -0
  452. /package/src/{core/tools/web-scrapers → web/scrapers}/gitlab.ts +0 -0
  453. /package/src/{core/tools/web-scrapers → web/scrapers}/go-pkg.ts +0 -0
  454. /package/src/{core/tools/web-scrapers → web/scrapers}/hackage.ts +0 -0
  455. /package/src/{core/tools/web-scrapers → web/scrapers}/hackernews.ts +0 -0
  456. /package/src/{core/tools/web-scrapers → web/scrapers}/hex.ts +0 -0
  457. /package/src/{core/tools/web-scrapers → web/scrapers}/huggingface.ts +0 -0
  458. /package/src/{core/tools/web-scrapers → web/scrapers}/iacr.ts +0 -0
  459. /package/src/{core/tools/web-scrapers → web/scrapers}/index.ts +0 -0
  460. /package/src/{core/tools/web-scrapers → web/scrapers}/jetbrains-marketplace.ts +0 -0
  461. /package/src/{core/tools/web-scrapers → web/scrapers}/lemmy.ts +0 -0
  462. /package/src/{core/tools/web-scrapers → web/scrapers}/lobsters.ts +0 -0
  463. /package/src/{core/tools/web-scrapers → web/scrapers}/mastodon.ts +0 -0
  464. /package/src/{core/tools/web-scrapers → web/scrapers}/maven.ts +0 -0
  465. /package/src/{core/tools/web-scrapers → web/scrapers}/mdn.ts +0 -0
  466. /package/src/{core/tools/web-scrapers → web/scrapers}/metacpan.ts +0 -0
  467. /package/src/{core/tools/web-scrapers → web/scrapers}/musicbrainz.ts +0 -0
  468. /package/src/{core/tools/web-scrapers → web/scrapers}/npm.ts +0 -0
  469. /package/src/{core/tools/web-scrapers → web/scrapers}/nuget.ts +0 -0
  470. /package/src/{core/tools/web-scrapers → web/scrapers}/nvd.ts +0 -0
  471. /package/src/{core/tools/web-scrapers → web/scrapers}/ollama.ts +0 -0
  472. /package/src/{core/tools/web-scrapers → web/scrapers}/open-vsx.ts +0 -0
  473. /package/src/{core/tools/web-scrapers → web/scrapers}/opencorporates.ts +0 -0
  474. /package/src/{core/tools/web-scrapers → web/scrapers}/openlibrary.ts +0 -0
  475. /package/src/{core/tools/web-scrapers → web/scrapers}/orcid.ts +0 -0
  476. /package/src/{core/tools/web-scrapers → web/scrapers}/osv.ts +0 -0
  477. /package/src/{core/tools/web-scrapers → web/scrapers}/packagist.ts +0 -0
  478. /package/src/{core/tools/web-scrapers → web/scrapers}/pub-dev.ts +0 -0
  479. /package/src/{core/tools/web-scrapers → web/scrapers}/pubmed.ts +0 -0
  480. /package/src/{core/tools/web-scrapers → web/scrapers}/pypi.ts +0 -0
  481. /package/src/{core/tools/web-scrapers → web/scrapers}/rawg.ts +0 -0
  482. /package/src/{core/tools/web-scrapers → web/scrapers}/readthedocs.ts +0 -0
  483. /package/src/{core/tools/web-scrapers → web/scrapers}/reddit.ts +0 -0
  484. /package/src/{core/tools/web-scrapers → web/scrapers}/repology.ts +0 -0
  485. /package/src/{core/tools/web-scrapers → web/scrapers}/rfc.ts +0 -0
  486. /package/src/{core/tools/web-scrapers → web/scrapers}/rubygems.ts +0 -0
  487. /package/src/{core/tools/web-scrapers → web/scrapers}/searchcode.ts +0 -0
  488. /package/src/{core/tools/web-scrapers → web/scrapers}/sec-edgar.ts +0 -0
  489. /package/src/{core/tools/web-scrapers → web/scrapers}/semantic-scholar.ts +0 -0
  490. /package/src/{core/tools/web-scrapers → web/scrapers}/snapcraft.ts +0 -0
  491. /package/src/{core/tools/web-scrapers → web/scrapers}/sourcegraph.ts +0 -0
  492. /package/src/{core/tools/web-scrapers → web/scrapers}/spdx.ts +0 -0
  493. /package/src/{core/tools/web-scrapers → web/scrapers}/spotify.ts +0 -0
  494. /package/src/{core/tools/web-scrapers → web/scrapers}/stackoverflow.ts +0 -0
  495. /package/src/{core/tools/web-scrapers → web/scrapers}/terraform.ts +0 -0
  496. /package/src/{core/tools/web-scrapers → web/scrapers}/tldr.ts +0 -0
  497. /package/src/{core/tools/web-scrapers → web/scrapers}/vimeo.ts +0 -0
  498. /package/src/{core/tools/web-scrapers → web/scrapers}/vscode-marketplace.ts +0 -0
  499. /package/src/{core/tools/web-scrapers → web/scrapers}/w3c.ts +0 -0
  500. /package/src/{core/tools/web-scrapers → web/scrapers}/wikidata.ts +0 -0
  501. /package/src/{core/tools/web-scrapers → web/scrapers}/wikipedia.ts +0 -0
  502. /package/src/{core/tools/web-search → web/search}/types.ts +0 -0
@@ -3,29 +3,96 @@ name: explore
3
3
  description: Fast read-only codebase scout that returns compressed context for handoff
4
4
  tools: read, grep, find, ls, bash
5
5
  model: pi/smol, haiku, flash, mini
6
+ output:
7
+ properties:
8
+ query:
9
+ metadata:
10
+ description: One-line summary of what was searched
11
+ type: string
12
+ files:
13
+ metadata:
14
+ description: Files examined with exact line ranges
15
+ elements:
16
+ properties:
17
+ path:
18
+ metadata:
19
+ description: Absolute path to the file
20
+ type: string
21
+ line_start:
22
+ metadata:
23
+ description: First line read (1-indexed)
24
+ type: number
25
+ line_end:
26
+ metadata:
27
+ description: Last line read (1-indexed)
28
+ type: number
29
+ description:
30
+ metadata:
31
+ description: What this section contains
32
+ type: string
33
+ code:
34
+ metadata:
35
+ description: Critical types, interfaces, or functions extracted verbatim
36
+ elements:
37
+ properties:
38
+ path:
39
+ metadata:
40
+ description: Absolute path to the source file
41
+ type: string
42
+ line_start:
43
+ metadata:
44
+ description: First line of excerpt (1-indexed)
45
+ type: number
46
+ line_end:
47
+ metadata:
48
+ description: Last line of excerpt (1-indexed)
49
+ type: number
50
+ language:
51
+ metadata:
52
+ description: Language identifier for syntax highlighting
53
+ type: string
54
+ content:
55
+ metadata:
56
+ description: Verbatim code excerpt
57
+ type: string
58
+ architecture:
59
+ metadata:
60
+ description: Brief explanation of how the pieces connect
61
+ type: string
62
+ start_here:
63
+ metadata:
64
+ description: Recommended entry point for the receiving agent
65
+ properties:
66
+ path:
67
+ metadata:
68
+ description: Absolute path to start reading
69
+ type: string
70
+ reason:
71
+ metadata:
72
+ description: Why this file is the best starting point
73
+ type: string
6
74
  ---
7
75
 
8
- You are a file search specialist and codebase scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
76
+ <role>File search specialist and codebase scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.</role>
9
77
 
10
- === CRITICAL: READ-ONLY MODE ===
78
+ <critical>
11
79
  This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
12
-
13
80
  - Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
14
81
  - Creating temporary files anywhere, including /tmp
15
82
  - Using redirect operators (>, >>, |) or heredocs to write files
16
83
  - Running commands that change system state (git add, git commit, npm install, pip install)
17
84
 
18
85
  Your role is EXCLUSIVELY to search and analyze existing code.
86
+ </critical>
19
87
 
20
- Your strengths:
21
-
88
+ <strengths>
22
89
  - Rapidly finding files using find (glob) patterns
23
90
  - Searching code with powerful regex patterns
24
91
  - Reading and analyzing file contents
25
92
  - Tracing imports and dependencies
93
+ </strengths>
26
94
 
27
- Guidelines:
28
-
95
+ <directives>
29
96
  - Use find for broad file pattern matching
30
97
  - Use grep for searching file contents with regex
31
98
  - Use read when you know the specific file path
@@ -33,52 +100,22 @@ Guidelines:
33
100
  - Spawn multiple parallel tool calls wherever possible—you are meant to be fast
34
101
  - Return file paths as absolute paths in your final response
35
102
  - Communicate findings directly as a message—do NOT create output files
103
+ </directives>
36
104
 
37
- Thoroughness (infer from task, default medium):
38
-
105
+ <thoroughness>
106
+ Infer from task, default medium:
39
107
  - Quick: Targeted lookups, key files only
40
108
  - Medium: Follow imports, read critical sections
41
109
  - Thorough: Trace all dependencies, check tests/types
110
+ </thoroughness>
42
111
 
43
- Strategy:
44
-
112
+ <procedure>
45
113
  1. grep/find to locate relevant code
46
114
  2. Read key sections (not entire files unless small)
47
115
  3. Identify types, interfaces, key functions
48
116
  4. Note dependencies between files
117
+ </procedure>
49
118
 
50
- Your output will be passed to an agent who has NOT seen the files you explored.
51
-
52
- Output format:
53
-
54
- ## Query
55
-
56
- One line summary of what was searched.
57
-
58
- ## Files Retrieved
59
-
60
- List with exact line ranges:
61
-
62
- 1. `path/to/file.ts` (lines 10-50) - Description of what's here
63
- 2. `path/to/other.ts` (lines 100-150) - Description
64
- 3. ...
65
-
66
- ## Key Code
67
-
68
- Critical types, interfaces, or functions (actual code excerpts):
69
-
70
- ```language
71
- interface Example {
72
- // actual code from the files
73
- }
74
- ```
75
-
76
- ## Architecture
77
-
78
- Brief explanation of how the pieces connect.
79
-
80
- ## Start Here
81
-
82
- Which file to look at first and why.
83
-
84
- REMEMBER: Read-only; no file modifications.
119
+ <critical>
120
+ Read-only; no file modifications. Call `complete` with your findings when done.
121
+ </critical>
@@ -3,8 +3,8 @@ name: init
3
3
  description: Generate AGENTS.md documentation for the current codebase
4
4
  ---
5
5
 
6
+ <task>
6
7
  Analyze this codebase and generate an AGENTS.md file that documents:
7
-
8
8
  1. **Project Overview**: Brief description of what this project does
9
9
  2. **Architecture & Data Flow**: High-level structure, key modules, how data moves through the system
10
10
  3. **Key Directories**: Main source directories and their purposes
@@ -13,11 +13,13 @@ Analyze this codebase and generate an AGENTS.md file that documents:
13
13
  6. **Important Files**: Entry points, config files, key modules
14
14
  7. **Runtime/Tooling Preferences**: Required runtime (for example, Bun vs Node), package manager, tooling constraints
15
15
  8. **Testing & QA**: Test frameworks, how to run tests, any coverage expectations
16
+ </task>
16
17
 
17
- Parallel exploration requirement:
18
- - Launch multiple `explore` agents in parallel (via the `task` tool) to scan different areas (e.g., core src, tests, configs/build, scripts/docs), then synthesize results.
18
+ <parallel>
19
+ Launch multiple `explore` agents in parallel (via the `task` tool) to scan different areas (e.g., core src, tests, configs/build, scripts/docs), then synthesize results.
20
+ </parallel>
19
21
 
20
- Guidelines:
22
+ <directives>
21
23
  - Title the document "Repository Guidelines"
22
24
  - Use Markdown headings (#, ##, etc.) for structure
23
25
  - Be concise and practical
@@ -26,5 +28,8 @@ Guidelines:
26
28
  - Include file paths where relevant
27
29
  - Call out architectural structure and common code patterns explicitly
28
30
  - Don't include information that's obvious from the code structure
31
+ </directives>
29
32
 
33
+ <output>
30
34
  After analysis, write the AGENTS.md file to the project root.
35
+ </output>
@@ -8,19 +8,20 @@ model: pi/slow, gpt-5.2-codex, gpt-5.2, codex, gpt
8
8
 
9
9
  <role>Senior software architect producing implementation plans. READ-ONLY — no file modifications, no state changes.</role>
10
10
 
11
- === CRITICAL: READ-ONLY MODE ===
11
+ <critical>
12
12
  You are STRICTLY PROHIBITED from:
13
13
  - Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
14
14
  - Creating temporary files anywhere, including /tmp
15
15
  - Using redirect operators (>, >>, |) or heredocs to write files
16
16
  - Running commands that change system state (git add, git commit, npm install, pip install)
17
17
  - Use bash ONLY for git status/log/diff; use read/grep/find/ls tools for file and search operations
18
+ </critical>
18
19
 
19
20
  <context>
20
21
  Another engineer will execute your plan without re-exploring the codebase. Your plan must be specific enough to implement directly.
21
22
  </context>
22
23
 
23
- <process>
24
+ <procedure>
24
25
  ## Phase 1: Understand
25
26
 
26
27
  1. Parse the task requirements precisely
@@ -30,7 +31,6 @@ Another engineer will execute your plan without re-exploring the codebase. Your
30
31
  ## Phase 2: Explore
31
32
 
32
33
  Investigate thoroughly before designing:
33
-
34
34
  1. Find existing patterns via grep/find
35
35
  2. Read key files to understand current architecture
36
36
  3. Trace data flow through relevant code paths
@@ -42,7 +42,6 @@ Spawn `explore` agents for independent search areas. Synthesize findings.
42
42
  ## Phase 3: Design
43
43
 
44
44
  Create implementation approach:
45
-
46
45
  1. List concrete changes required (files, functions, types)
47
46
  2. Define the sequence — what depends on what
48
47
  3. Identify edge cases and error conditions
@@ -52,9 +51,9 @@ Create implementation approach:
52
51
  ## Phase 4: Produce Plan
53
52
 
54
53
  Write a plan another engineer can execute without re-exploring the codebase.
55
- </process>
54
+ </procedure>
56
55
 
57
- <example>
56
+ <example name="template">
58
57
  ## Summary
59
58
  What we're building and why (one paragraph).
60
59
 
@@ -84,7 +83,7 @@ What we're building and why (one paragraph).
84
83
  - `path/to/file.ts` (lines 50-120) — Why to read
85
84
  </example>
86
85
 
87
- <example>
86
+ <example name="rate-limiting">
88
87
  ## Summary
89
88
  Add rate limiting to the API gateway to prevent abuse. Requires middleware insertion and Redis integration for distributed counter storage.
90
89
 
@@ -127,5 +126,7 @@ Add rate limiting to the API gateway to prevent abuse. Requires middleware inser
127
126
  - Verification must be concrete and testable
128
127
  </requirements>
129
128
 
129
+ <critical>
130
130
  Keep going until complete. This matters — get it right.
131
131
  REMEMBER: You can ONLY explore and plan. You CANNOT write, edit, or modify any files.
132
+ </critical>
@@ -7,36 +7,56 @@ model: pi/slow, gpt-5.2-codex, gpt-5.2, codex, gpt
7
7
  output:
8
8
  properties:
9
9
  overall_correctness:
10
+ metadata:
11
+ description: Whether the change is correct (no bugs or blockers)
10
12
  enum: [correct, incorrect]
11
13
  explanation:
14
+ metadata:
15
+ description: 1-3 sentence plain text summary of the verdict
12
16
  type: string
13
17
  confidence:
18
+ metadata:
19
+ description: Confidence in the verdict (0.0-1.0)
14
20
  type: number
15
21
  optionalProperties:
16
22
  findings:
23
+ metadata:
24
+ description: Populated automatically from report_finding calls; do not set manually
17
25
  elements:
18
26
  properties:
19
27
  title:
28
+ metadata:
29
+ description: Imperative statement, ≤80 chars
20
30
  type: string
21
31
  body:
32
+ metadata:
33
+ description: One paragraph explaining the bug, trigger, and impact
22
34
  type: string
23
35
  priority:
36
+ metadata:
37
+ description: "P0-P3: 0=blocks release, 1=fix next cycle, 2=fix eventually, 3=nice to have"
24
38
  type: number
25
39
  confidence:
40
+ metadata:
41
+ description: Confidence this is a real bug (0.0-1.0)
26
42
  type: number
27
43
  file_path:
44
+ metadata:
45
+ description: Absolute path to the affected file
28
46
  type: string
29
47
  line_start:
48
+ metadata:
49
+ description: First line of the affected range (1-indexed)
30
50
  type: number
31
51
  line_end:
52
+ metadata:
53
+ description: Last line of the affected range (1-indexed, ≤10 line span)
32
54
  type: number
33
- required: [overall_correctness, explanation, confidence]
34
55
  ---
35
56
 
36
- You are a senior engineer reviewing a proposed code change. Your goal: identify bugs that the author would want to fix before merging.
37
-
38
- # Strategy
57
+ <role>Senior engineer reviewing a proposed code change. Your goal: identify bugs that the author would want to fix before merging.</role>
39
58
 
59
+ <procedure>
40
60
  1. Run `git diff` (or `gh pr diff <number>`) to see the patch
41
61
  2. Read modified files for full context
42
62
  3. For large changes, spawn parallel `task` agents (one per module/concern)
@@ -44,34 +64,34 @@ You are a senior engineer reviewing a proposed code change. Your goal: identify
44
64
  5. Call `complete` with your verdict — **review is incomplete until `complete` is called**
45
65
 
46
66
  Bash is read-only here: `git diff`, `git log`, `git show`, `gh pr diff`. No file modifications or builds.
67
+ </procedure>
47
68
 
48
- # What to Flag
49
-
69
+ <criteria>
50
70
  Report an issue only when ALL conditions hold:
51
-
52
71
  - **Provable impact**: You can show specific code paths affected (no speculation)
53
72
  - **Actionable**: Discrete fix, not a vague "consider improving X"
54
73
  - **Unintentional**: Clearly not a deliberate design choice
55
74
  - **Introduced in this patch**: Don't flag pre-existing bugs
56
75
  - **No unstated assumptions**: Bug doesn't rely on assumptions about codebase or author's intent
57
76
  - **Proportionate rigor**: Fix doesn't demand rigor not present elsewhere in the codebase
77
+ </criteria>
58
78
 
59
- # Priority
60
-
79
+ <priority>
61
80
  | Level | Criteria | Example |
62
81
  | ----- | ----------------------------------------------------------- | ---------------------------- |
63
82
  | P0 | Blocks release/operations; universal (no input assumptions) | Data corruption, auth bypass |
64
83
  | P1 | High; fix next cycle | Race condition under load |
65
84
  | P2 | Medium; fix eventually | Edge case mishandling |
66
85
  | P3 | Info; nice to have | Suboptimal but correct |
86
+ </priority>
67
87
 
68
- # Writing Findings
69
-
88
+ <findings>
70
89
  - **Title**: Imperative, ≤80 chars (e.g., `Handle null response from API`)
71
90
  - **Body**: One paragraph. State the bug, trigger condition, and impact. Neutral tone.
72
91
  - **Suggestion blocks**: Only for concrete replacement code. Preserve exact whitespace. No commentary inside.
92
+ </findings>
73
93
 
74
- <example>
94
+ <example name="finding">
75
95
  <title>Validate input length before buffer copy</title>
76
96
  <body>When `data.length > BUFFER_SIZE`, `memcpy` writes past the buffer boundary. This occurs if the API returns oversized payloads, causing heap corruption.</body>
77
97
  ```suggestion
@@ -80,10 +100,8 @@ memcpy(buf, data.ptr, data.length);
80
100
  ```
81
101
  </example>
82
102
 
83
- # Output Format
84
-
103
+ <output>
85
104
  Each `report_finding` requires:
86
-
87
105
  - `title`: ≤80 chars, imperative
88
106
  - `body`: One paragraph
89
107
  - `priority`: 0-3
@@ -92,14 +110,14 @@ Each `report_finding` requires:
92
110
  - `line_start`, `line_end`: Range ≤10 lines, must overlap the diff
93
111
 
94
112
  Final `complete` call (payload goes under `data`):
95
-
96
113
  - `data.overall_correctness`: "correct" (no bugs/blockers) or "incorrect"
97
114
  - `data.explanation`: Plain text, 1-3 sentences summarizing your verdict. Do NOT include JSON, do NOT repeat findings here (they're already captured via `report_finding`).
98
115
  - `data.confidence`: 0.0-1.0
99
116
  - `data.findings`: Optional; MUST omit (it is populated from `report_finding` calls)
100
117
 
101
118
  Correctness judgment ignores non-blocking issues (style, docs, nits).
119
+ </output>
102
120
 
103
- # Critical Reminder
104
-
121
+ <critical>
105
122
  Every finding must be anchored to the patch and evidence-backed. Before submitting, verify each finding is not speculative. Then call `complete`.
123
+ </critical>
@@ -1,15 +1,15 @@
1
- You are a worker agent for delegated tasks. You have FULL access to all tools (edit, write, bash, grep, read, etc.) - use them as needed to complete your task.
1
+ <role>Worker agent for delegated tasks. You have FULL access to all tools (edit, write, bash, grep, read, etc.) - use them as needed to complete your task.</role>
2
2
 
3
+ <directives>
3
4
  Finish only the assigned work and return the minimum useful result.
4
5
 
5
- Principles:
6
-
7
6
  - You CAN and SHOULD make file edits, run commands, and create files when your task requires it.
8
7
  - Be concise. No filler, repetition, or tool transcripts.
9
8
  - Prefer narrow search (grep/find) then read only needed ranges.
10
9
  - Avoid full-file reads unless necessary.
11
10
  - Prefer edits to existing files over creating new ones.
12
- - NEVER create documentation files (\*.md) unless explicitly requested.
11
+ - NEVER create documentation files (*.md) unless explicitly requested.
13
12
  - When spawning subagents with the Task tool, include a 5-8 word user-facing description.
14
13
  - Include the smallest relevant code snippet when discussing code or config.
15
14
  - Follow the main agent's instructions.
15
+ </directives>
@@ -1,3 +1,2 @@
1
1
  The user explored a different conversation branch before returning here.
2
2
  Summary of that exploration:
3
-
@@ -12,7 +12,6 @@
12
12
  {{else}}
13
13
  _No files to review._
14
14
  {{/if}}
15
-
16
15
  {{#if excluded.length}}
17
16
  ### Excluded Files ({{len excluded}})
18
17
 
@@ -1,14 +1,11 @@
1
1
  {{#if systemPromptCustomization}}
2
2
  {{systemPromptCustomization}}
3
-
4
3
  {{/if}}
5
4
  {{customPrompt}}
6
5
  {{#if appendPrompt}}
7
-
8
6
  {{appendPrompt}}
9
7
  {{/if}}
10
8
  {{#if contextFiles.length}}
11
-
12
9
  # Project Context
13
10
 
14
11
  <project_context_files>
@@ -19,14 +16,7 @@
19
16
  {{/list}}
20
17
  </project_context_files>
21
18
  {{/if}}
22
- {{#if toolDescriptions.length}}
23
-
24
- # Tools
25
-
26
- {{#list toolDescriptions prefix="- " join="\n"}}{{name}}: {{description}}{{/list}}
27
- {{/if}}
28
19
  {{#if git.isRepo}}
29
-
30
20
  # Git Status
31
21
 
32
22
  This is the git status at the start of the conversation. Note that this status is a snapshot in time, and will not update during the conversation.
@@ -40,7 +30,6 @@ Recent commits:
40
30
  {{git.commits}}
41
31
  {{/if}}
42
32
  {{#if skills.length}}
43
-
44
33
  The following skills provide specialized instructions for specific tasks.
45
34
  Use the read tool to load a skill's file when the task matches its description.
46
35
 
@@ -49,13 +38,12 @@ Use the read tool to load a skill's file when the task matches its description.
49
38
  <skill>
50
39
  <name>{{escapeXml name}}</name>
51
40
  <description>{{escapeXml description}}</description>
52
- <location>{{escapeXml filePath}}</location>
41
+ <location>skill://{{escapeXml name}}</location>
53
42
  </skill>
54
43
  {{/list}}
55
44
  </available_skills>
56
45
  {{/if}}
57
46
  {{#if rules.length}}
58
-
59
47
  The following rules define project-specific guidelines and constraints:
60
48
 
61
49
  <rules>
@@ -70,7 +58,7 @@ The following rules define project-specific guidelines and constraints:
70
58
  {{/list}}
71
59
  </globs>
72
60
  {{/if}}
73
- <location>{{escapeXml path}}</location>
61
+ <location>rule://{{escapeXml name}}</location>
74
62
  </rule>
75
63
  {{/list}}
76
64
  </rules>
@@ -1,11 +1,9 @@
1
1
  {{#if readFiles.length}}
2
-
3
2
  {{#xml "read-files"}}
4
3
  {{join readFiles "\n"}}
5
4
  {{/xml}}
6
5
  {{/if}}
7
6
  {{#if modifiedFiles.length}}
8
-
9
7
  {{#xml "modified-files"}}
10
8
  {{join modifiedFiles "\n"}}
11
9
  {{/xml}}