@hoilab/ada-cli 0.84.21 → 0.84.22

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 (344) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.es.md +163 -0
  3. package/README.md +99 -652
  4. package/dist/cli/args.d.ts +3 -0
  5. package/dist/cli/args.d.ts.map +1 -1
  6. package/dist/cli/args.js +11 -0
  7. package/dist/cli/args.js.map +1 -1
  8. package/dist/cli/file-processor.d.ts.map +1 -1
  9. package/dist/cli/file-processor.js +2 -1
  10. package/dist/cli/file-processor.js.map +1 -1
  11. package/dist/cli/home-screen.d.ts.map +1 -1
  12. package/dist/cli/home-screen.js +2 -2
  13. package/dist/cli/home-screen.js.map +1 -1
  14. package/dist/cli/startup-ui.d.ts.map +1 -1
  15. package/dist/cli/startup-ui.js +9 -3
  16. package/dist/cli/startup-ui.js.map +1 -1
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +2 -1
  19. package/dist/config.js.map +1 -1
  20. package/dist/core/agent-session.d.ts +57 -7
  21. package/dist/core/agent-session.d.ts.map +1 -1
  22. package/dist/core/agent-session.js +449 -73
  23. package/dist/core/agent-session.js.map +1 -1
  24. package/dist/core/auth-storage.d.ts.map +1 -1
  25. package/dist/core/auth-storage.js +4 -3
  26. package/dist/core/auth-storage.js.map +1 -1
  27. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  28. package/dist/core/compaction/branch-summarization.js +3 -0
  29. package/dist/core/compaction/branch-summarization.js.map +1 -1
  30. package/dist/core/compaction/compaction.d.ts +4 -3
  31. package/dist/core/compaction/compaction.d.ts.map +1 -1
  32. package/dist/core/compaction/compaction.js +41 -32
  33. package/dist/core/compaction/compaction.js.map +1 -1
  34. package/dist/core/defaults.d.ts +1 -0
  35. package/dist/core/defaults.d.ts.map +1 -1
  36. package/dist/core/defaults.js +9 -0
  37. package/dist/core/defaults.js.map +1 -1
  38. package/dist/core/engine-personality.d.ts +12 -0
  39. package/dist/core/engine-personality.d.ts.map +1 -0
  40. package/dist/core/engine-personality.js +53 -0
  41. package/dist/core/engine-personality.js.map +1 -0
  42. package/dist/core/extensions/index.d.ts +1 -1
  43. package/dist/core/extensions/index.d.ts.map +1 -1
  44. package/dist/core/extensions/index.js.map +1 -1
  45. package/dist/core/extensions/loader.d.ts.map +1 -1
  46. package/dist/core/extensions/loader.js +10 -5
  47. package/dist/core/extensions/loader.js.map +1 -1
  48. package/dist/core/extensions/types.d.ts +23 -4
  49. package/dist/core/extensions/types.d.ts.map +1 -1
  50. package/dist/core/extensions/types.js.map +1 -1
  51. package/dist/core/keybindings.d.ts.map +1 -1
  52. package/dist/core/keybindings.js +2 -1
  53. package/dist/core/keybindings.js.map +1 -1
  54. package/dist/core/memory-engine/audit-export.d.ts +54 -0
  55. package/dist/core/memory-engine/audit-export.d.ts.map +1 -0
  56. package/dist/core/memory-engine/audit-export.js +85 -0
  57. package/dist/core/memory-engine/audit-export.js.map +1 -0
  58. package/dist/core/memory-engine/audit.d.ts.map +1 -1
  59. package/dist/core/memory-engine/audit.js +7 -8
  60. package/dist/core/memory-engine/audit.js.map +1 -1
  61. package/dist/core/memory-engine/engine.d.ts +2 -3
  62. package/dist/core/memory-engine/engine.d.ts.map +1 -1
  63. package/dist/core/memory-engine/engine.js +148 -50
  64. package/dist/core/memory-engine/engine.js.map +1 -1
  65. package/dist/core/memory-engine/inverted-index.d.ts.map +1 -1
  66. package/dist/core/memory-engine/inverted-index.js +67 -10
  67. package/dist/core/memory-engine/inverted-index.js.map +1 -1
  68. package/dist/core/memory-engine/keychain.d.ts.map +1 -1
  69. package/dist/core/memory-engine/keychain.js +1 -6
  70. package/dist/core/memory-engine/keychain.js.map +1 -1
  71. package/dist/core/memory-engine/observation-store.d.ts +1 -0
  72. package/dist/core/memory-engine/observation-store.d.ts.map +1 -1
  73. package/dist/core/memory-engine/observation-store.js +37 -8
  74. package/dist/core/memory-engine/observation-store.js.map +1 -1
  75. package/dist/core/memory-engine/scanner.d.ts.map +1 -1
  76. package/dist/core/memory-engine/scanner.js +25 -5
  77. package/dist/core/memory-engine/scanner.js.map +1 -1
  78. package/dist/core/memory-engine/security.d.ts.map +1 -1
  79. package/dist/core/memory-engine/security.js +131 -23
  80. package/dist/core/memory-engine/security.js.map +1 -1
  81. package/dist/core/memory-engine/session-indexer.d.ts.map +1 -1
  82. package/dist/core/memory-engine/session-indexer.js +8 -2
  83. package/dist/core/memory-engine/session-indexer.js.map +1 -1
  84. package/dist/core/memory-engine/tools.d.ts +2 -2
  85. package/dist/core/memory-engine/tools.d.ts.map +1 -1
  86. package/dist/core/memory-engine/tools.js +14 -7
  87. package/dist/core/memory-engine/tools.js.map +1 -1
  88. package/dist/core/memory-engine/vault.d.ts.map +1 -1
  89. package/dist/core/memory-engine/vault.js +2 -2
  90. package/dist/core/memory-engine/vault.js.map +1 -1
  91. package/dist/core/model-config.d.ts.map +1 -1
  92. package/dist/core/model-config.js +2 -1
  93. package/dist/core/model-config.js.map +1 -1
  94. package/dist/core/model-resolver.d.ts +1 -0
  95. package/dist/core/model-resolver.d.ts.map +1 -1
  96. package/dist/core/model-resolver.js +12 -6
  97. package/dist/core/model-resolver.js.map +1 -1
  98. package/dist/core/models-store.d.ts.map +1 -1
  99. package/dist/core/models-store.js +2 -1
  100. package/dist/core/models-store.js.map +1 -1
  101. package/dist/core/package-manager.d.ts.map +1 -1
  102. package/dist/core/package-manager.js +11 -6
  103. package/dist/core/package-manager.js.map +1 -1
  104. package/dist/core/pi-manifest.d.ts.map +1 -1
  105. package/dist/core/pi-manifest.js +2 -1
  106. package/dist/core/pi-manifest.js.map +1 -1
  107. package/dist/core/prompt-optimizer.d.ts +53 -0
  108. package/dist/core/prompt-optimizer.d.ts.map +1 -0
  109. package/dist/core/prompt-optimizer.js +138 -0
  110. package/dist/core/prompt-optimizer.js.map +1 -0
  111. package/dist/core/provider-attribution.d.ts.map +1 -1
  112. package/dist/core/provider-attribution.js +1 -1
  113. package/dist/core/provider-attribution.js.map +1 -1
  114. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  115. package/dist/core/remote-catalog-provider.js +2 -1
  116. package/dist/core/remote-catalog-provider.js.map +1 -1
  117. package/dist/core/resource-loader.d.ts +50 -0
  118. package/dist/core/resource-loader.d.ts.map +1 -1
  119. package/dist/core/resource-loader.js +233 -7
  120. package/dist/core/resource-loader.js.map +1 -1
  121. package/dist/core/sdk.d.ts +8 -0
  122. package/dist/core/sdk.d.ts.map +1 -1
  123. package/dist/core/sdk.js +11 -1
  124. package/dist/core/sdk.js.map +1 -1
  125. package/dist/core/session-manager.d.ts.map +1 -1
  126. package/dist/core/session-manager.js +2 -1
  127. package/dist/core/session-manager.js.map +1 -1
  128. package/dist/core/settings-diagnostics.d.ts +9 -0
  129. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  130. package/dist/core/settings-diagnostics.js +21 -0
  131. package/dist/core/settings-diagnostics.js.map +1 -0
  132. package/dist/core/settings-manager.d.ts +52 -0
  133. package/dist/core/settings-manager.d.ts.map +1 -1
  134. package/dist/core/settings-manager.js +204 -10
  135. package/dist/core/settings-manager.js.map +1 -1
  136. package/dist/core/skills.d.ts.map +1 -1
  137. package/dist/core/skills.js +51 -33
  138. package/dist/core/skills.js.map +1 -1
  139. package/dist/core/slash-commands.d.ts.map +1 -1
  140. package/dist/core/slash-commands.js +2 -1
  141. package/dist/core/slash-commands.js.map +1 -1
  142. package/dist/core/tools/edit-diff.d.ts +0 -5
  143. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  144. package/dist/core/tools/edit-diff.js +2 -5
  145. package/dist/core/tools/edit-diff.js.map +1 -1
  146. package/dist/core/tools/edit.d.ts.map +1 -1
  147. package/dist/core/tools/edit.js +20 -4
  148. package/dist/core/tools/edit.js.map +1 -1
  149. package/dist/core/tools/index.d.ts.map +1 -1
  150. package/dist/core/tools/index.js +2 -2
  151. package/dist/core/tools/index.js.map +1 -1
  152. package/dist/core/tools/project-memory-tool.d.ts.map +1 -1
  153. package/dist/core/tools/project-memory-tool.js +4 -1
  154. package/dist/core/tools/project-memory-tool.js.map +1 -1
  155. package/dist/core/trust-manager.d.ts.map +1 -1
  156. package/dist/core/trust-manager.js +2 -1
  157. package/dist/core/trust-manager.js.map +1 -1
  158. package/dist/core/workflows/agent-runner.d.ts +86 -0
  159. package/dist/core/workflows/agent-runner.d.ts.map +1 -0
  160. package/dist/core/workflows/agent-runner.js +225 -0
  161. package/dist/core/workflows/agent-runner.js.map +1 -0
  162. package/dist/core/workflows/builtins.d.ts +41 -0
  163. package/dist/core/workflows/builtins.d.ts.map +1 -0
  164. package/dist/core/workflows/builtins.js +282 -0
  165. package/dist/core/workflows/builtins.js.map +1 -0
  166. package/dist/core/workflows/goal-engine/engine.d.ts +134 -0
  167. package/dist/core/workflows/goal-engine/engine.d.ts.map +1 -0
  168. package/dist/core/workflows/goal-engine/engine.js +462 -0
  169. package/dist/core/workflows/goal-engine/engine.js.map +1 -0
  170. package/dist/core/workflows/goal-engine/errors.d.ts +7 -0
  171. package/dist/core/workflows/goal-engine/errors.d.ts.map +1 -0
  172. package/dist/core/workflows/goal-engine/errors.js +9 -0
  173. package/dist/core/workflows/goal-engine/errors.js.map +1 -0
  174. package/dist/core/workflows/goal-engine/index.d.ts +13 -0
  175. package/dist/core/workflows/goal-engine/index.d.ts.map +1 -0
  176. package/dist/core/workflows/goal-engine/index.js +8 -0
  177. package/dist/core/workflows/goal-engine/index.js.map +1 -0
  178. package/dist/core/workflows/goal-engine/persistence.d.ts +31 -0
  179. package/dist/core/workflows/goal-engine/persistence.d.ts.map +1 -0
  180. package/dist/core/workflows/goal-engine/persistence.js +145 -0
  181. package/dist/core/workflows/goal-engine/persistence.js.map +1 -0
  182. package/dist/core/workflows/goal-engine/prompts.d.ts +37 -0
  183. package/dist/core/workflows/goal-engine/prompts.d.ts.map +1 -0
  184. package/dist/core/workflows/goal-engine/prompts.js +131 -0
  185. package/dist/core/workflows/goal-engine/prompts.js.map +1 -0
  186. package/dist/core/workflows/goal-engine/state.d.ts +41 -0
  187. package/dist/core/workflows/goal-engine/state.d.ts.map +1 -0
  188. package/dist/core/workflows/goal-engine/state.js +397 -0
  189. package/dist/core/workflows/goal-engine/state.js.map +1 -0
  190. package/dist/core/workflows/goal-engine/tools.d.ts +31 -0
  191. package/dist/core/workflows/goal-engine/tools.d.ts.map +1 -0
  192. package/dist/core/workflows/goal-engine/tools.js +211 -0
  193. package/dist/core/workflows/goal-engine/tools.js.map +1 -0
  194. package/dist/core/workflows/goal-engine/types.d.ts +286 -0
  195. package/dist/core/workflows/goal-engine/types.d.ts.map +1 -0
  196. package/dist/core/workflows/goal-engine/types.js +17 -0
  197. package/dist/core/workflows/goal-engine/types.js.map +1 -0
  198. package/dist/core/workflows/goal-engine/worktree-fingerprint.d.ts +23 -0
  199. package/dist/core/workflows/goal-engine/worktree-fingerprint.d.ts.map +1 -0
  200. package/dist/core/workflows/goal-engine/worktree-fingerprint.js +72 -0
  201. package/dist/core/workflows/goal-engine/worktree-fingerprint.js.map +1 -0
  202. package/dist/core/workflows/graph-sync.d.ts +67 -0
  203. package/dist/core/workflows/graph-sync.d.ts.map +1 -0
  204. package/dist/core/workflows/graph-sync.js +188 -0
  205. package/dist/core/workflows/graph-sync.js.map +1 -0
  206. package/dist/core/workflows/graph.d.ts +143 -0
  207. package/dist/core/workflows/graph.d.ts.map +1 -0
  208. package/dist/core/workflows/graph.js +319 -0
  209. package/dist/core/workflows/graph.js.map +1 -0
  210. package/dist/core/workflows/index.d.ts +18 -0
  211. package/dist/core/workflows/index.d.ts.map +1 -0
  212. package/dist/core/workflows/index.js +14 -0
  213. package/dist/core/workflows/index.js.map +1 -0
  214. package/dist/core/workflows/journal.d.ts +68 -0
  215. package/dist/core/workflows/journal.d.ts.map +1 -0
  216. package/dist/core/workflows/journal.js +83 -0
  217. package/dist/core/workflows/journal.js.map +1 -0
  218. package/dist/core/workflows/manager.d.ts +112 -0
  219. package/dist/core/workflows/manager.d.ts.map +1 -0
  220. package/dist/core/workflows/manager.js +327 -0
  221. package/dist/core/workflows/manager.js.map +1 -0
  222. package/dist/core/workflows/resolve-script.d.ts +35 -0
  223. package/dist/core/workflows/resolve-script.d.ts.map +1 -0
  224. package/dist/core/workflows/resolve-script.js +66 -0
  225. package/dist/core/workflows/resolve-script.js.map +1 -0
  226. package/dist/core/workflows/runtime.d.ts +49 -0
  227. package/dist/core/workflows/runtime.d.ts.map +1 -0
  228. package/dist/core/workflows/runtime.js +301 -0
  229. package/dist/core/workflows/runtime.js.map +1 -0
  230. package/dist/core/workflows/shared-store.d.ts +31 -0
  231. package/dist/core/workflows/shared-store.d.ts.map +1 -0
  232. package/dist/core/workflows/shared-store.js +80 -0
  233. package/dist/core/workflows/shared-store.js.map +1 -0
  234. package/dist/core/workflows/subagent-host.d.ts +50 -0
  235. package/dist/core/workflows/subagent-host.d.ts.map +1 -0
  236. package/dist/core/workflows/subagent-host.js +225 -0
  237. package/dist/core/workflows/subagent-host.js.map +1 -0
  238. package/dist/core/workflows/tool-workflow.d.ts +22 -0
  239. package/dist/core/workflows/tool-workflow.d.ts.map +1 -0
  240. package/dist/core/workflows/tool-workflow.js +120 -0
  241. package/dist/core/workflows/tool-workflow.js.map +1 -0
  242. package/dist/core/workflows/types.d.ts +142 -0
  243. package/dist/core/workflows/types.d.ts.map +1 -0
  244. package/dist/core/workflows/types.js +26 -0
  245. package/dist/core/workflows/types.js.map +1 -0
  246. package/dist/core/workflows/worktree.d.ts +42 -0
  247. package/dist/core/workflows/worktree.d.ts.map +1 -0
  248. package/dist/core/workflows/worktree.js +107 -0
  249. package/dist/core/workflows/worktree.js.map +1 -0
  250. package/dist/extensions/llama/index.d.ts.map +1 -1
  251. package/dist/extensions/llama/index.js +2 -0
  252. package/dist/extensions/llama/index.js.map +1 -1
  253. package/dist/extensions/llama/provider.d.ts.map +1 -1
  254. package/dist/extensions/llama/provider.js +6 -2
  255. package/dist/extensions/llama/provider.js.map +1 -1
  256. package/dist/index.d.ts +16 -12
  257. package/dist/index.d.ts.map +1 -1
  258. package/dist/index.js +14 -11
  259. package/dist/index.js.map +1 -1
  260. package/dist/main.d.ts +4 -0
  261. package/dist/main.d.ts.map +1 -1
  262. package/dist/main.js +20 -15
  263. package/dist/main.js.map +1 -1
  264. package/dist/migrations.d.ts.map +1 -1
  265. package/dist/migrations.js +4 -3
  266. package/dist/migrations.js.map +1 -1
  267. package/dist/modes/interactive/components/home-screen.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/home-screen.js +2 -2
  269. package/dist/modes/interactive/components/home-screen.js.map +1 -1
  270. package/dist/modes/interactive/components/model-selector.d.ts +2 -3
  271. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  272. package/dist/modes/interactive/components/model-selector.js +16 -6
  273. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  274. package/dist/modes/interactive/components/prompt-optimization.d.ts +16 -0
  275. package/dist/modes/interactive/components/prompt-optimization.d.ts.map +1 -0
  276. package/dist/modes/interactive/components/prompt-optimization.js +46 -0
  277. package/dist/modes/interactive/components/prompt-optimization.js.map +1 -0
  278. package/dist/modes/interactive/components/settings-selector.d.ts +19 -1
  279. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/settings-selector.js +247 -46
  281. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  282. package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  283. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  284. package/dist/modes/interactive/components/settings-submenu.js +165 -0
  285. package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  286. package/dist/modes/interactive/components/thinking-selector.d.ts +8 -3
  287. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  288. package/dist/modes/interactive/components/thinking-selector.js +29 -3
  289. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  290. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  291. package/dist/modes/interactive/external-editor.js +2 -1
  292. package/dist/modes/interactive/external-editor.js.map +1 -1
  293. package/dist/modes/interactive/interactive-mode.d.ts +24 -0
  294. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  295. package/dist/modes/interactive/interactive-mode.js +677 -34
  296. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  297. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  298. package/dist/modes/interactive/theme/theme.js +4 -3
  299. package/dist/modes/interactive/theme/theme.js.map +1 -1
  300. package/dist/modes/json-event.d.ts +16 -13
  301. package/dist/modes/json-event.d.ts.map +1 -1
  302. package/dist/modes/json-event.js +20 -6
  303. package/dist/modes/json-event.js.map +1 -1
  304. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  305. package/dist/modes/rpc/rpc-mode.js +173 -0
  306. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  307. package/dist/modes/rpc/rpc-types.d.ts +29 -0
  308. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  309. package/dist/modes/rpc/rpc-types.js.map +1 -1
  310. package/dist/package-manager-cli.d.ts.map +1 -1
  311. package/dist/package-manager-cli.js +1 -1
  312. package/dist/package-manager-cli.js.map +1 -1
  313. package/dist/skills/ada-engine/SKILL.md +153 -0
  314. package/dist/utils/frontmatter.d.ts.map +1 -1
  315. package/dist/utils/frontmatter.js +2 -1
  316. package/dist/utils/frontmatter.js.map +1 -1
  317. package/dist/utils/management-http.d.ts +5 -3
  318. package/dist/utils/management-http.d.ts.map +1 -1
  319. package/dist/utils/management-http.js +14 -10
  320. package/dist/utils/management-http.js.map +1 -1
  321. package/dist/utils/text.d.ts +8 -0
  322. package/dist/utils/text.d.ts.map +1 -0
  323. package/dist/utils/text.js +9 -0
  324. package/dist/utils/text.js.map +1 -0
  325. package/docs/compaction.md +15 -0
  326. package/docs/custom-provider.md +5 -2
  327. package/docs/extensions.md +11 -2
  328. package/docs/json.md +7 -2
  329. package/docs/llama-cpp.md +2 -0
  330. package/docs/models.md +8 -2
  331. package/docs/rpc.md +9 -3
  332. package/docs/settings.md +2 -2
  333. package/docs/skills.md +4 -3
  334. package/examples/extensions/border-status-editor.ts +1 -1
  335. package/examples/extensions/git-checkpoint.ts +2 -2
  336. package/examples/extensions/notify.ts +3 -1
  337. package/examples/extensions/subagent/README.md +1 -1
  338. package/examples/extensions/subagent/index.ts +6 -1
  339. package/examples/extensions/titlebar-spinner.ts +1 -1
  340. package/examples/rpc-extension-ui.ts +1 -1
  341. package/examples/sdk/06-extensions.ts +1 -1
  342. package/examples/sdk/README.md +1 -1
  343. package/npm-shrinkwrap.json +2 -12
  344. package/package.json +3 -3
package/README.md CHANGED
@@ -1,703 +1,150 @@
1
1
  <p align="center">
2
- <a href="https://pi.dev">
3
- <img alt="pi logo" src="https://pi.dev/logo-auto.svg" width="128">
4
- </a>
2
+ <pre>
3
+ █████╗ ██████╗ █████╗
4
+ ██╔══██╗██╔══██╗██╔══██╗
5
+ ███████║██║ ██║███████║
6
+ ██╔══██║██║ ██║██╔══██║
7
+ ██║ ██║██████╔╝██║ ██║
8
+ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝
9
+ </pre>
5
10
  </p>
6
11
 
7
- > ⚠️ This is **Ada CLI**a rebranded fork of pi.dev. The `pi` binary becomes `ada`, config moves to `~/.ada/`, and it auto-syncs with upstream. See [ADA-CLI.md](../../ADA-CLI.md).
12
+ <h3 align="center">Ada CLI — the enterprise-grade autonomous coding agent</h3>
8
13
 
9
14
  <p align="center">
10
15
  <a href="https://discord.com/invite/3cU7Bz4UPx"><img alt="Discord" src="https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
11
16
  <a href="https://www.npmjs.com/package/@hoilab/ada-cli"><img alt="npm" src="https://img.shields.io/npm/v/@hoilab/ada-cli?style=flat-square" /></a>
12
17
  </p>
13
18
 
14
- > New issues and PRs from new contributors are auto-closed by default. Maintainers review auto-closed issues daily. See [CONTRIBUTING.md](../../CONTRIBUTING.md).
19
+ <p align="center">🇬🇧 English · <a href="README.es.md">🇪🇸 Español</a></p>
15
20
 
16
- ---
17
-
18
- Pi is a minimal terminal coding harness. Adapt pi to your workflows, not the other way around, without having to fork and modify pi internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Pi Packages](#pi-packages) and share them with others via npm or git.
19
-
20
- Pi ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask pi to build what you want or install a third party pi package that matches your workflow.
21
-
22
- Pi runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps.
23
-
24
- ## Share your OSS coding agent sessions
25
-
26
- If you use pi for open source work, please share your coding agent sessions.
27
-
28
- Public OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.
29
-
30
- For the full explanation, see [this post on X](https://x.com/badlogicgames/status/2037811643774652911).
31
-
32
- To publish sessions, use [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). Read its README.md for setup instructions. All you need is a Hugging Face account, the Hugging Face CLI, and `pi-share-hf`.
33
-
34
- You can also watch [this video](https://x.com/badlogicgames/status/2041151967695634619), where I show how I publish my `pi-mono` sessions.
35
-
36
- I regularly publish my own `pi-mono` work sessions here:
37
-
38
- - [badlogicgames/pi-mono on Hugging Face](https://huggingface.co/datasets/badlogicgames/pi-mono)
39
-
40
- ## Table of Contents
41
-
42
- - [Quick Start](#quick-start)
43
- - [Providers & Models](#providers--models)
44
- - [Interactive Mode](#interactive-mode)
45
- - [Editor](#editor)
46
- - [Commands](#commands)
47
- - [Keyboard Shortcuts](#keyboard-shortcuts)
48
- - [Message Queue](#message-queue)
49
- - [Sessions](#sessions)
50
- - [Branching](#branching)
51
- - [Compaction](#compaction)
52
- - [Settings](#settings)
53
- - [Context Files](#context-files)
54
- - [Customization](#customization)
55
- - [Prompt Templates](#prompt-templates)
56
- - [Skills](#skills)
57
- - [Extensions](#extensions)
58
- - [Themes](#themes)
59
- - [Pi Packages](#pi-packages)
60
- - [Programmatic Usage](#programmatic-usage)
61
- - [Philosophy](#philosophy)
62
- - [CLI Reference](#cli-reference)
21
+ > Ada CLI is HOILAB's fork of [pi.dev](https://pi.dev) (`earendil-works/pi`): the `pi` binary becomes `ada-cli`, config moves to `~/.ada/`, and the fork auto-syncs with upstream daily so security fixes and new models land immediately. See [ADA-CLI.md](../../ADA-CLI.md) for the full sync mechanics. New issues and PRs from new contributors are auto-closed by default — see [CONTRIBUTING.md](../../CONTRIBUTING.md).
63
22
 
64
23
  ---
65
24
 
66
- ## Quick Start
25
+ Ada CLI is a coding agent built on pi.dev's proven minimal terminal core, with an **Ada Intelligence Engine** layered on top: autonomous goal pursuit with a mandatory evidence-backed judge, sandboxed parallel workflows, a traceability graph that gates "done" on observed evidence, durable cross-session memory with a tamper-evident audit log and PII scanning, encrypted secrets, and a native desktop app — all wired to the same `settings.json` your terminal already uses.
67
26
 
68
- ```bash
69
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent
70
- ```
27
+ Where most coding agents ask you to trust a single long-running chat, Ada is built to be **auditable**: every autonomous action either has cited evidence behind it or it doesn't happen.
71
28
 
72
- `--ignore-scripts` disables dependency lifecycle scripts during install. Pi does not require install scripts for normal npm installs.
29
+ - **Everything is optional and inspectable.** The core stays as minimal as pi.dev's four tools (`read`, `write`, `edit`, `bash`) by default. Autonomy, memory, and orchestration are opt-in layers you can turn off in `settings.json`.
30
+ - **Autonomy requires a signed-off contract.** The [Goal Engine](#ada-intelligence-engine) won't touch a codebase until you `/goal approve` its plan, runs fixed TDD phases, and never marks work `done` without a judge citing evidence for it.
31
+ - **Nothing is "done" on the model's word alone.** The [Work Graph](#ada-intelligence-engine) gates completion on observed evidence — a passing test, a real diff, a verified command — not a claim in the transcript.
32
+ - **Memory is compliance-ready by default.** The [Memory Engine](#ada-intelligence-engine) blocks PII before it's ever written to disk and keeps a hash-chained audit log of every write and rejection.
33
+ - **Secrets never touch the model's context.** The built-in [Vault](#ada-intelligence-engine) is a local encrypted store shared across the CLI, desktop app, and subagents of an unlocked session.
34
+ - **Teams get a GUI, not just a terminal.** The [Ada Desktop](../../desktop/) app (Tauri + Next.js) reads the exact same SDK and config as the CLI — no parallel product to maintain.
35
+ - **Extensible instead of opinionated.** No baked-in MCP, sub-agent framework, or permission popups — build exactly the workflow you need with [extensions](docs/extensions.md), [skills](docs/skills.md), or third-party [Ada packages](docs/packages.md). See [Philosophy](#philosophy).
73
36
 
74
- Installer alternative:
37
+ ## Getting Started
75
38
 
76
39
  ```bash
77
- curl -fsSL https://pi.dev/install.sh | sh
40
+ npm install -g --ignore-scripts @hoilab/ada-cli
78
41
  ```
79
42
 
80
- Authenticate with an API key:
81
-
82
43
  ```bash
83
44
  export ANTHROPIC_API_KEY=sk-ant-...
84
- pi
85
- ```
86
-
87
- Or use your existing subscription:
88
-
89
- ```bash
90
- pi
91
- /login # Then select provider
92
- ```
93
-
94
- Then just talk to pi. By default, pi gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [pi packages](#pi-packages).
95
-
96
- **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
97
-
98
- ---
99
-
100
- ## Providers & Models
101
-
102
- For each built-in provider, pi maintains a list of tool-capable models. Configured provider catalogs refresh automatically; run `pi update --models` to force an immediate refresh. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L).
103
-
104
- **Subscriptions:**
105
- - Anthropic Claude Pro/Max
106
- - OpenAI ChatGPT Plus/Pro (Codex)
107
- - GitHub Copilot
108
-
109
- **API keys:**
110
- - Anthropic
111
- - Ant Ling
112
- - OpenAI
113
- - Azure OpenAI
114
- - DeepSeek
115
- - NVIDIA NIM
116
- - Google Gemini
117
- - Google Vertex
118
- - Amazon Bedrock
119
- - Mistral
120
- - Groq
121
- - Cerebras
122
- - Cloudflare AI Gateway
123
- - Cloudflare Workers AI
124
- - xAI
125
- - OpenRouter
126
- - Vercel AI Gateway
127
- - ZAI Coding Plan (Global)
128
- - ZAI Coding Plan (China)
129
- - OpenCode Zen
130
- - OpenCode Go
131
- - Hugging Face
132
- - Fireworks
133
- - Together AI
134
- - Baseten
135
- - Kimi For Coding
136
- - MiniMax
137
- - Xiaomi MiMo
138
- - Xiaomi MiMo Token Plan (China)
139
- - Xiaomi MiMo Token Plan (Amsterdam)
140
- - Xiaomi MiMo Token Plan (Singapore)
141
-
142
- Pi also supports the llama.cpp router server. Configure it with `/login llama.cpp`, manage downloads and loaded models with `/llama`, then select a loaded model with `/model`. See [docs/llama-cpp.md](docs/llama-cpp.md) for setup and usage.
143
-
144
- See [docs/providers.md](docs/providers.md) for other provider setup instructions.
145
-
146
- **Custom providers & models:** Add providers via `~/.pi/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md).
147
-
148
- ---
149
-
150
- ## Interactive Mode
151
-
152
- <p align="center"><img src="docs/images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
153
-
154
- The interface from top to bottom:
155
-
156
- - **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions
157
- - **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
158
- - **Editor** - Where you type; border color indicates thinking level
159
- - **Footer** - Working directory, session name, total token/cache usage (`↑` input, `↓` output, `R` cache read, `W` cache write, `CH` latest cache hit rate), cost, context usage, current model. Totals include assistant responses, usage reported by tools, and summary generation.
160
-
161
- The editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.
162
-
163
- ### Editor
164
-
165
- | Feature | How |
166
- |---------|-----|
167
- | File reference | Type `@` to fuzzy-search project files |
168
- | Path completion | Tab to complete paths |
169
- | Multi-line | Shift+Enter (or Ctrl+Enter on Windows Terminal) |
170
- | External editor | Ctrl+G opens `externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere |
171
- | Clipboard | Ctrl+V to paste an image or text (Alt+V on Windows), or drag images onto terminal |
172
- | Bash commands | `!command` runs and sends output to LLM, `!!command` runs without sending |
173
-
174
- Standard editing keybindings for delete word, undo, etc. See [docs/keybindings.md](docs/keybindings.md).
175
-
176
- ### Commands
177
-
178
- Type `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.
179
-
180
- | Command | Description |
181
- |---------|-------------|
182
- | `/login`, `/logout` | Manage provider credentials |
183
- | [`/llama`](docs/llama-cpp.md) | Download, load, and unload llama.cpp router models |
184
- | `/model` | Switch models |
185
- | `/scoped-models` | Enable/disable models for Ctrl+P cycling |
186
- | `/settings` | Thinking level, theme, message delivery, transport |
187
- | `/resume` | Pick from previous sessions |
188
- | `/new` | Start a new session |
189
- | `/name <name>` | Set session display name |
190
- | `/session` | Show session info (file, ID, messages, tokens, cost) |
191
- | `/tree` | Jump to any point in the session and continue from there |
192
- | `/trust` | Save project trust decision for future sessions (restart required) |
193
- | `/fork` | Create a new session from a previous user message |
194
- | `/clone` | Duplicate the current active branch into a new session |
195
- | `/compact [prompt]` | Manually compact context, optional custom instructions |
196
- | `/copy` | Copy last assistant message to clipboard |
197
- | `/export [file]` | Export session to HTML or JSONL file |
198
- | `/import <file>` | Import and resume a session from a JSONL file |
199
- | `/share` | Upload as private GitHub gist with shareable HTML link |
200
- | `/reload` | Reload keybindings, extensions, skills, prompts, themes, and context files |
201
- | `/hotkeys` | Show all keyboard shortcuts |
202
- | `/changelog` | Display version history |
203
- | `/quit` | Quit pi |
204
-
205
- ### Keyboard Shortcuts
206
-
207
- See `/hotkeys` for the full list. Customize via `~/.pi/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md).
208
-
209
- **Commonly used:**
210
-
211
- | Key | Action |
212
- |-----|--------|
213
- | Ctrl+C | Clear editor |
214
- | Ctrl+C twice | Quit |
215
- | Escape | Cancel/abort |
216
- | Escape twice | Open `/tree` |
217
- | Ctrl+L | Open model selector |
218
- | Ctrl+P / Shift+Ctrl+P | Cycle scoped models forward/backward |
219
- | Shift+Tab | Cycle thinking level |
220
- | Ctrl+O | Collapse/expand tool output |
221
- | Ctrl+T | Collapse/expand thinking blocks |
222
- | Ctrl+X | Copy the last assistant message |
223
-
224
- ### Message Queue
225
-
226
- Submit messages while the agent is working:
227
-
228
- - **Enter** queues a *steering* message, delivered after the current assistant turn finishes executing its tool calls
229
- - **Alt+Enter** queues a *follow-up* message, delivered only after the agent finishes all work
230
- - **Escape** aborts and restores queued messages to editor
231
- - **Alt+Up** retrieves queued messages back to editor
232
-
233
- On Windows Terminal, `Alt+Enter` is fullscreen by default. Remap it in [docs/terminal-setup.md](docs/terminal-setup.md) so pi can receive the follow-up shortcut.
234
-
235
- Configure delivery in [settings](docs/settings.md): `steeringMode` and `followUpMode` can be `"one-at-a-time"` (default, waits for response) or `"all"` (delivers all queued at once). `transport` selects provider transport preference (`"sse"`, `"websocket"`, or `"auto"`) for providers that support multiple transports.
236
-
237
- ---
238
-
239
- ## Sessions
240
-
241
- Sessions are stored as JSONL files with a tree structure. Each entry has an `id` and `parentId`, enabling in-place branching without creating new files. See [docs/session-format.md](docs/session-format.md) for file format.
242
-
243
- ### Management
244
-
245
- Sessions auto-save to `~/.pi/agent/sessions/` organized by working directory.
246
-
247
- ```bash
248
- pi -c # Continue most recent session
249
- pi -r # Browse and select from past sessions
250
- pi --no-session # Ephemeral mode (don't save)
251
- pi --name "my task" # Set session display name at startup
252
- pi --session <path|id> # Use specific session file or ID
253
- pi --fork <path|id> # Fork specific session file or ID into a new session
254
- ```
255
-
256
- Use `/session` in interactive mode to see the current session ID before reusing it with `--session <id>` or `--fork <id>`.
257
-
258
- ### Branching
259
-
260
- **`/tree`** - Navigate the session tree in-place. Select any previous point, continue from there, and switch between branches. All history preserved in a single file.
261
-
262
- <p align="center"><img src="docs/images/tree-view.png" alt="Tree View" width="600"></p>
263
-
264
- - Search by typing, fold/unfold and jump between branches with Ctrl+←/Ctrl+→ or Alt+←/Alt+→, page with ←/→
265
- - Filter modes (Ctrl+O): default → no-tools → user-only → labeled-only → all
266
- - Press Ctrl+X to copy the selected message
267
- - Press Shift+L to label entries as bookmarks and Shift+T to toggle label timestamps
268
-
269
- **`/fork`** - Create a new session file from a previous user message on the active branch. Opens a selector, copies the active path up to that point, and places the selected prompt in the editor for modification.
270
-
271
- **`/clone`** - Duplicate the current active branch into a new session file at the current position. The new session keeps the full active-path history and opens with an empty editor.
272
-
273
- **`--fork <path|id>`** - Fork an existing session file or partial session UUID directly from the CLI. This copies the full source session into a new session file in the current project.
274
-
275
- ### Compaction
276
-
277
- Long sessions can exhaust context windows. Compaction summarizes older messages while keeping recent ones.
278
-
279
- **Manual:** `/compact` or `/compact <custom instructions>`
280
-
281
- **Automatic:** Enabled by default. Triggers on context overflow (recovers and retries) or when approaching the limit (proactive). Configure via `/settings` or `settings.json`.
282
-
283
- Compaction is lossy. The full history remains in the JSONL file; use `/tree` to revisit. Customize compaction behavior via [extensions](#extensions). See [docs/compaction.md](docs/compaction.md) for internals.
284
-
285
- ---
286
-
287
- ## Settings
288
-
289
- Use `/settings` to modify common options, or edit JSON files directly:
290
-
291
- | Location | Scope |
292
- |----------|-------|
293
- | `~/.pi/agent/settings.json` | Global (all projects) |
294
- | `.pi/settings.json` | Project (overrides global) |
295
-
296
- See [docs/settings.md](docs/settings.md) for all options.
297
-
298
- ### Project Trust
299
-
300
- On interactive startup, pi asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
301
-
302
- Before the trust decision, pi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
303
-
304
- Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
305
-
306
- If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
307
-
308
- `pi config` and package commands use the same project trust flow, except `pi update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
309
-
310
- Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
311
-
312
- ### Telemetry and update checks
313
-
314
- Pi has two separate startup features:
315
-
316
- - **Update check:** fetches `https://pi.dev/api/latest-version` to check whether a newer Pi version exists. Disable it with `PI_SKIP_VERSION_CHECK=1`. Disabling update checks only turns off this check.
317
- - **Install/update telemetry:** after first install or a changelog-detected update, sends an anonymous version ping to `https://pi.dev/api/report-install`. This setting also controls optional provider attribution headers for OpenRouter, Cloudflare, and direct NVIDIA NIM requests. Opt out by setting `enableInstallTelemetry` to `false` in `settings.json`, or by setting `PI_TELEMETRY=0`. This does not disable update checks; Pi may still contact `pi.dev` for the latest version unless update checks are disabled or offline mode is enabled.
318
-
319
- Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
320
-
321
- ---
322
-
323
- ## Context Files
324
-
325
- Pi loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
326
- - `~/.pi/agent/AGENTS.md` (global)
327
- - Parent directories (walking up from cwd)
328
- - Current directory
329
-
330
- If a directory contains `AGENTS.override.md`, Pi loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory. Context files from other directories are still concatenated.
331
-
332
- Use for project instructions (`AGENTS.md`/`CLAUDE.md`), conventions, common commands. All matching files are concatenated.
333
-
334
- Disable context file loading with `--no-context-files` (or `-nc`).
335
-
336
- ### System Prompt
337
-
338
- Replace the default system prompt with `.pi/SYSTEM.md` (project) or `~/.pi/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`.
339
-
340
- ---
341
-
342
- ## Customization
343
-
344
- ### Prompt Templates
345
-
346
- Reusable prompts as Markdown files. Type `/name` to expand.
347
-
348
- ```markdown
349
- <!-- ~/.pi/agent/prompts/review.md -->
350
- Review this code for bugs, security issues, and performance problems.
351
- Focus on: {{focus}}
352
- ```
353
-
354
- Place in `~/.pi/agent/prompts/`, `.pi/prompts/`, or a [pi package](#pi-packages) to share with others. See [docs/prompt-templates.md](docs/prompt-templates.md).
355
-
356
- ### Skills
357
-
358
- On-demand capability packages following the [Agent Skills standard](https://agentskills.io). Invoke via `/skill:name` or let the agent load them automatically.
359
-
360
- ```markdown
361
- <!-- ~/.pi/agent/skills/my-skill/SKILL.md -->
362
- # My Skill
363
- Use this skill when the user asks about X.
364
-
365
- ## Steps
366
- 1. Do this
367
- 2. Then that
45
+ ada-cli
368
46
  ```
369
47
 
370
- Place in `~/.pi/agent/skills/`, `~/.agents/skills/`, `.pi/skills/`, or `.agents/skills/` (from `cwd` up through parent directories) or a [pi package](#pi-packages) to share with others. See [docs/skills.md](docs/skills.md).
48
+ Or authenticate with an existing subscription: run `ada-cli`, then `/login`. First run in a new project asks you to trust the folder see [Project Trust](docs/security.md).
371
49
 
372
- ### Extensions
50
+ Full walkthrough: [Quickstart](docs/quickstart.md) · [Providers & models](docs/providers.md) · [Windows](docs/windows.md) · [Termux](docs/termux.md) · [tmux](docs/tmux.md)
373
51
 
374
- <p align="center"><img src="docs/images/doom-extension.png" alt="Doom Extension" width="600"></p>
52
+ ## Built for Enterprise
375
53
 
376
- TypeScript modules that extend pi with custom tools, commands, keyboard shortcuts, event handlers, and UI components.
377
-
378
- ```typescript
379
- export default function (pi: ExtensionAPI) {
380
- pi.registerTool({ name: "deploy", ... });
381
- pi.registerCommand("stats", { ... });
382
- pi.on("tool_call", async (event, ctx) => { ... });
383
- }
384
- ```
54
+ - **Governed autonomy.** Permission modes (`ask` / `auto` / `plan` / `full`) and the Goal Engine's `askBefore` brakes gate irreversible actions (publish, delete, spend) behind explicit approval, in both the CLI and the desktop app.
55
+ - **Evidence over assertions.** The Goal Engine's judge and the Work Graph's gates both require cited, observed evidence before anything counts as complete — no autonomous run can silently mark itself done.
56
+ - **Privacy and audit built in.** `memoryPrivacyLevel: "strict"` (default) blocks PII before it's persisted; every memory write, rejection, and search is hash-chained in an audit log via `/memory-audit` — designed to support GDPR/AI Act obligations without extra tooling.
57
+ - **Secrets isolation.** Vault-backed credentials never enter the model's prompt context and never touch disk unencrypted.
58
+ - **Budgeted, bounded runs.** Every autonomous surface (Goal Engine, Workflows) enforces turn limits, repeat-loop detection, a stop-file kill switch, and token/cost budgets — no open-ended spend.
59
+ - **Deployable as CLI or desktop.** Same SDK, same `settings.json`, same audit trail whether your team works in a terminal or a GUI.
60
+ - **Stays current automatically.** A deterministic daily sync (`scripts/sync-ada.sh` + GitHub Action) re-bases onto upstream pi.dev, so security fixes and new provider support land without manual patch-tracking.
385
61
 
386
- The default export can also be `async`. pi waits for async extension factories before startup continues, which is useful for one-time initialization such as fetching remote model lists before calling `pi.registerProvider()`.
62
+ ## Ada Intelligence Engine
387
63
 
388
- **What's possible:**
389
- - Custom tools (or replace built-in tools entirely)
390
- - Sub-agents and plan mode
391
- - Custom compaction and summarization
392
- - Permission gates and path protection
393
- - Custom editors and UI components
394
- - Status lines, headers, footers
395
- - Git checkpointing and auto-commit
396
- - SSH and sandbox execution
397
- - MCP server integration
398
- - Make pi look like Claude Code
399
- - Games while waiting (yes, Doom runs)
400
- - ...anything you can dream up
64
+ pi.dev is deliberately minimal — its own philosophy is to skip sub-agents and plan mode and let each team extend it their own way. Ada CLI takes the opposite bet: it ships that orchestration layer as part of the product.
401
65
 
402
- Place in `~/.pi/agent/extensions/`, `.pi/extensions/`, or a [pi package](#pi-packages) to share with others. See [docs/extensions.md](docs/extensions.md) and [examples/extensions/](examples/extensions/).
66
+ | Module | What it's for |
67
+ |---|---|
68
+ | 🎯 **Goal Engine** (`/goal`) | Pursues an objective autonomously, turn by turn, through fixed TDD phases, gated by a contract (`doneCriteria` + `verifyCommand`) you must approve before it starts. A mandatory judge requires cited evidence before anything is marked done, backed by safety brakes (turn limits, loop detection, stop-file, cost/token budget). |
69
+ | ⚙️ **Workflows** (`/workflow`) | Orchestrates multiple agents in parallel via sandboxed JS scripts, budgeted and resumable after an interruption. Ships 5 ready-to-use builtins: deep research, code review, product build, codebase audit, multi-perspective. |
70
+ | 🕸️ **Work Graph** (`/graph`) | A typed graph connecting intent → requirement → task → file → test. Gates block declaring work "done" without observed evidence — never on the model's word alone. |
71
+ | 🧠 **Memory Engine** (`/memory-audit`, `/memory-consolidate`, `/memory-insights`) | Durable 3-layer memory (global, project, past failures) with full-text session search, a tamper-evident audit log, and a PII scanner that blocks sensitive data before it's ever stored. |
72
+ | ✨ **Prompt Optimizer** | Before processing a request, decides whether to ask up to 3 clarifying questions (`clarify`) or rewrite it as a structured prompt (`enhance`). |
73
+ | 🔐 **Vault** (`/vault`) | Passphrase-encrypted local secret store, shared across the CLI, the desktop app, and subagents of an unlocked session. |
74
+ | 🖥️ **Desktop app** | Tauri 2 + Next.js, running on the exact same SDK and `settings.json` as the CLI. pi.dev is terminal-only. |
403
75
 
404
- ### Themes
76
+ <details>
77
+ <summary><b>Row-by-row comparison vs. upstream pi.dev</b> (verified against both codebases)</summary>
405
78
 
406
- Built-in: `dark`, `light`. Themes hot-reload: modify the active theme file and pi immediately applies changes.
79
+ | | pi.dev (upstream) | Ada CLI (this fork) |
80
+ |---|---|---|
81
+ | Product | CLI (`pi`) | CLI (`ada-cli`) **+ desktop app** |
82
+ | Multi-turn autonomy | Not included — skips sub-agents and plan mode by design | **Goal Engine**: contract-first loop, fixed TDD phases, mandatory judge with cited evidence, safety brakes |
83
+ | Orchestrated parallelism | No | **Workflows**: sandboxed JS scripts (`node:vm`) with `agent()/parallel()/pipeline()`, resumable journal, 5 builtins |
84
+ | Work traceability | No | **Work Graph**: typed graph with evidence-gated completion |
85
+ | Cross-session memory | Only within the active session / context files (`AGENTS.md`) | **Memory Engine**: 3 durable layers + full-text session search + tamper-evident audit log + PII scanner |
86
+ | Prompt optimization | No | **Prompt Optimizer**: `clarify` or `enhance` before processing |
87
+ | Secrets | No | **Vault**, encrypted, shared CLI/desktop/subagents |
88
+ | Slash commands | pi.dev's base set | + `/goal` `/workflow` `/graph` `/vault` `/memory-audit` `/memory-consolidate` `/memory-insights` |
89
+ | Anti-recursion | N/A | `goal_*`/`workflow`/`graph_add_nodes`/memory tools register only on the main session — subagents never self-orchestrate |
90
+ | Upstream sync | — (it is upstream) | Deterministic daily reset + delta reapply, no manual merges |
407
91
 
408
- Place in `~/.pi/agent/themes/`, `.pi/themes/`, or a [pi package](#pi-packages) to share with others. See [docs/themes.md](docs/themes.md).
92
+ </details>
409
93
 
410
- ### Pi Packages
94
+ <details>
95
+ <summary><b>Ada CLI vs. Prime Agent</b> (another pi.dev fork, 17k+ ⭐)</summary>
411
96
 
412
- Bundle and share extensions, skills, prompts, and themes via npm or git. Find packages on [npmjs.com](https://www.npmjs.com/search?q=keywords%3Api-package) or [Discord](https://discord.com/channels/1456806362351669492/1457744485428629628).
97
+ [PrimeIntellect-ai/prime-agent](https://github.com/PrimeIntellect-ai/prime-agent) is also built on `earendil-works/pi`, with a persistent-Python-kernel execution model and a self-improving "Continual Harness". Full breakdown with sources: [docs/AUDIT.md §7.5](../../docs/AUDIT.md).
413
98
 
414
- > **Security:** Pi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
99
+ | Capability | Ada CLI | Prime Agent | Edge |
100
+ |---|---|---|---|
101
+ | Background sessions surviving terminal close | No | Daemon-backed, `attach`/`detach` | Prime Agent |
102
+ | Agent-to-agent messaging | Deliberately blocked (anti-recursion by design) | Built in | Design trade-off, not a gap |
103
+ | Scheduling / heartbeats | No | `/heartbeat`, cron schedules | Prime Agent |
104
+ | Self-improving instructions | Memory stores, doesn't self-edit | `/refine` with rollback snapshots | Prime Agent |
105
+ | Executable / Python-backed skills | Markdown only | Python packages + skill-creator | Prime Agent |
106
+ | Work traceability graph | Yes, evidence-gated | None | **Ada CLI** |
107
+ | Native desktop app | Yes | TUI-only | **Ada CLI** |
108
+ | Dedicated encrypted secrets vault | Yes | Plain `auth.json` | **Ada CLI** |
109
+ | Mandatory evidence-backed judge | Yes, by default | User-configurable gates, not forced | **Ada CLI** |
415
110
 
416
- ```bash
417
- pi install npm:@foo/pi-tools
418
- pi install npm:@foo/pi-tools@1.2.3 # pinned version
419
- pi install git:github.com/user/repo
420
- pi install git:github.com/user/repo@v1 # tag or commit
421
- pi install git:git@github.com:user/repo
422
- pi install git:git@github.com:user/repo@v1 # tag or commit
423
- pi install https://github.com/user/repo
424
- pi install https://github.com/user/repo@v1 # tag or commit
425
- pi install ssh://git@github.com/user/repo
426
- pi install ssh://git@github.com/user/repo@v1 # tag or commit
427
- pi remove npm:@foo/pi-tools
428
- pi uninstall npm:@foo/pi-tools # alias for remove
429
- pi list
430
- pi update # update pi only
431
- pi update --all # update pi and packages
432
- pi update --extensions # update packages only
433
- pi update --models # refresh model catalogs only
434
- pi update --self # update pi only
435
- pi update --self --force # reinstall pi even if current
436
- pi update npm:@foo/pi-tools # update one package
437
- pi config # enable/disable extensions, skills, prompts, themes
438
- ```
111
+ See [docs/AUDIT.md](../../docs/AUDIT.md) for the full technical audit, the exact fork/sync mechanics, and proposed improvements (background daemon, scheduling, self-refining memory) mapped to how they'd plug into the existing engine.
439
112
 
440
- Packages install to `~/.pi/agent/git/` (git) or `~/.pi/agent/npm/` (npm). Use `-l` for project-local installs (`.pi/git/`, `.pi/npm/`). Git `@ref` values are pinned tags or commits; pinned packages are skipped by `pi update --extensions` and `pi update --all`, so use `pi install git:host/user/repo@new-ref` to move an existing package to a new ref. Git packages install dependencies with `npm install --omit=dev` by default, so runtime deps must be listed under `dependencies`; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers. If you use a Node version manager and want package installs to reuse a stable npm context, set `npmCommand` in `settings.json`, for example `["mise", "exec", "node@20", "--", "npm"]`.
441
-
442
- Create a package by adding a `pi` key to `package.json`:
443
-
444
- ```json
445
- {
446
- "name": "my-pi-package",
447
- "keywords": ["pi-package"],
448
- "pi": {
449
- "extensions": ["./extensions"],
450
- "skills": ["./skills"],
451
- "prompts": ["./prompts"],
452
- "themes": ["./themes"]
453
- }
454
- }
455
- ```
113
+ </details>
456
114
 
457
- Without a `pi` manifest, pi auto-discovers from conventional directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
115
+ ### The three guarantees, and what they are not
458
116
 
459
- See [docs/packages.md](docs/packages.md).
117
+ These are enforced in code, not by policy. Each line is checkable — open the file and read it.
460
118
 
461
- ---
119
+ | Guarantee | Where it is enforced |
120
+ |---|---|
121
+ | **A goal cannot complete without a judge citing evidence.** The judge is independent, sees only the goal, its `doneCriteria`, the `verifyCommand` and the cited evidence, and runs cross-model. No verdict, no completion. | `workflows/goal-engine/engine.ts` (`runJudge`), `resource-loader.ts` |
122
+ | **Subagents cannot orchestrate or write durable memory — structurally.** The tools are not registered in a subagent's registry at all; it is not a permission check that could be bypassed or relaxed. Asserted in `test/anti-recursion-tools.test.ts`. | `agent-session.ts` (`_isSubagentSession` gates) |
123
+ | **Memory is written through a PII scanner and a hash-chained audit log.** Rejections are logged too, and `/memory-audit` verifies the chain. | `memory-engine/scanner.ts`, `memory-engine/audit.ts` |
462
124
 
463
- ## Programmatic Usage
125
+ **What Ada does *not* claim.** The `node:vm` sandbox contains the *orchestrator script* — it has no `require`, `process` or `import` and cannot reach the host. The **leaf agents it spawns are ordinary sessions** with `read`/`bash`/`edit`/`write` and the same OS permissions as any coding agent, yours included. Ada is not an OS sandbox and does not pretend to be one; for untrusted work, run it in a container. What is genuinely contained is the orchestration layer, and credentials live in an encrypted vault rather than in plaintext environment variables.
464
126
 
465
- ### SDK
127
+ Engine command reference, `settings.json` schema, and model-routing rules: [docs/AUDIT.md §4](../../docs/AUDIT.md) covers the architecture; slash-command syntax for `/goal`, `/workflow`, `/graph`, `/memory-*`, and `/vault` is documented inline via `--help` and `/hotkeys` in the CLI itself.
466
128
 
467
- ```typescript
468
- import { createAgentSession, ModelRuntime, SessionManager } from "@earendil-works/pi-coding-agent";
129
+ ## Documentation
469
130
 
470
- const modelRuntime = await ModelRuntime.create();
471
- const { session } = await createAgentSession({
472
- sessionManager: SessionManager.inMemory(),
473
- modelRuntime,
474
- });
475
-
476
- await session.prompt("What files are in the current directory?");
477
- ```
478
-
479
- For advanced multi-session runtime replacement, use `createAgentSessionRuntime()` and `AgentSessionRuntime`.
480
-
481
- See [docs/sdk.md](docs/sdk.md) and [examples/sdk/](examples/sdk/).
482
-
483
- ### RPC Mode
484
-
485
- For non-Node.js integrations, use RPC mode over stdin/stdout:
486
-
487
- ```bash
488
- pi --mode rpc
489
- ```
490
-
491
- RPC mode uses strict LF-delimited JSONL framing. Clients must split records on `\n` only. Do not use generic line readers like Node `readline`, which also split on Unicode separators inside JSON payloads.
492
-
493
- See [docs/rpc.md](docs/rpc.md) for the protocol.
494
-
495
- ---
131
+ - [Quickstart](docs/quickstart.md) install, authenticate, run a first session
132
+ - [Using Ada](docs/usage.md) interactive mode, slash commands, CLI reference
133
+ - [TUI reference](docs/tui.md) — full keyboard shortcuts, message queue, tree navigation
134
+ - [Sessions](docs/sessions.md) · [Compaction](docs/compaction.md) — branching, forking, context management
135
+ - [Settings](docs/settings.md) — global and project configuration
136
+ - [Security](docs/security.md) · [Containerization](docs/containerization.md) — project trust, sandboxing
137
+ - [Extensions](docs/extensions.md) · [Skills](docs/skills.md) · [Prompt templates](docs/prompt-templates.md) · [Themes](docs/themes.md) · [Ada packages](docs/packages.md)
138
+ - [SDK](docs/sdk.md) · [RPC mode](docs/rpc.md) · [JSON mode](docs/json.md) — headless and embedded usage
139
+ - [docs/AUDIT.md](../../docs/AUDIT.md) — fork architecture, sync mechanics, and the full competitive analysis
496
140
 
497
141
  ## Philosophy
498
142
 
499
- Pi is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with [extensions](#extensions), [skills](#skills), or installed from third-party [pi packages](#pi-packages). This keeps the core minimal while letting you shape pi to fit how you work.
500
-
501
- **No MCP.** Build CLI tools with READMEs (see [Skills](#skills)), or build an extension that adds MCP support. [Why?](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/)
502
-
503
- **No sub-agents.** There's many ways to do this. Spawn pi instances via tmux, or build your own with [extensions](#extensions), or install a package that does it your way.
504
-
505
- **No permission popups.** Run in a container, or build your own confirmation flow with [extensions](#extensions) inline with your environment and security requirements.
506
-
507
- **No plan mode.** Write plans to files, or build it with [extensions](#extensions), or install a package.
508
-
509
- **No built-in to-dos.** They confuse models. Use a TODO.md file, or build your own with [extensions](#extensions).
510
-
511
- **No background bash.** Use tmux. Full observability, direct interaction.
512
-
513
- Read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/) for the full rationale.
514
-
515
- ---
516
-
517
- ## CLI Reference
518
-
519
- ```bash
520
- pi [options] [@files...] [messages...]
521
- ```
522
-
523
- ### Package Commands
524
-
525
- ```bash
526
- pi install <source> [-l] # Install package, -l for project-local
527
- pi remove <source> [-l] # Remove package
528
- pi uninstall <source> [-l] # Alias for remove
529
- pi update [source|self|pi] # Update pi only, or one package source
530
- pi update --all # Update pi and packages
531
- pi update --extensions # Update packages only
532
- pi update --models # Refresh model catalogs only
533
- pi update --self # Update pi only
534
- pi update --self --force # Reinstall pi even if current
535
- pi update --extension <src> # Update one package
536
- pi list # List installed packages
537
- pi config # Enable/disable package resources
538
- ```
539
-
540
- `pi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command. `pi update` never prompts for project trust.
541
-
542
- ### Modes
543
-
544
- | Flag | Description |
545
- |------|-------------|
546
- | (default) | Interactive mode |
547
- | `-p`, `--print` | Print response and exit |
548
- | `--mode json` | Output all events as JSON lines (see [docs/json.md](docs/json.md)) |
549
- | `--mode rpc` | RPC mode for process integration (see [docs/rpc.md](docs/rpc.md)) |
550
- | `--export <in> [out]` | Export session to HTML |
551
-
552
- In print mode, pi also reads piped stdin and merges it into the initial prompt:
553
-
554
- ```bash
555
- cat README.md | pi -p "Summarize this text"
556
- ```
557
-
558
- ### Model Options
559
-
560
- | Option | Description |
561
- |--------|-------------|
562
- | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
563
- | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
564
- | `--api-key <key>` | API key (overrides env vars) |
565
- | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
566
- | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
567
- | `--list-models [search]` | List available models |
568
-
569
- ### Session Options
570
-
571
- | Option | Description |
572
- |--------|-------------|
573
- | `-c`, `--continue` | Continue most recent session |
574
- | `-r`, `--resume` | Browse and select session |
575
- | `--session <path\|id>` | Use specific session file or partial UUID |
576
- | `--fork <path\|id>` | Fork specific session file or partial UUID into a new session |
577
- | `--session-dir <dir>` | Custom session storage directory |
578
- | `--no-session` | Ephemeral mode (don't save) |
579
- | `--name <name>`, `-n <name>` | Set session display name at startup |
580
-
581
- ### Tool Options
582
-
583
- | Option | Description |
584
- |--------|-------------|
585
- | `--tools <list>`, `-t <list>` | Allowlist specific tool names across built-in, extension, and custom tools |
586
- | `--exclude-tools <list>`, `-xt <list>` | Disable specific tool names across built-in, extension, and custom tools |
587
- | `--no-builtin-tools`, `-nbt` | Disable built-in tools by default but keep extension/custom tools enabled |
588
- | `--no-tools`, `-nt` | Disable all tools by default |
589
-
590
- Available built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
591
-
592
- ### Resource Options
593
-
594
- | Option | Description |
595
- |--------|-------------|
596
- | `-e`, `--extension <source>` | Load extension from path, npm, or git (repeatable) |
597
- | `--no-extensions` | Disable extension discovery |
598
- | `--skill <path>` | Load skill (repeatable) |
599
- | `--no-skills` | Disable skill discovery |
600
- | `--prompt-template <path>` | Load prompt template (repeatable) |
601
- | `--no-prompt-templates` | Disable prompt template discovery |
602
- | `--theme <path>` | Load theme (repeatable) |
603
- | `--no-themes` | Disable theme discovery |
604
- | `--no-context-files`, `-nc` | Disable AGENTS.md and CLAUDE.md context file discovery |
605
-
606
- Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings.json (e.g., `--no-extensions -e ./my-ext.ts`).
607
-
608
- ### Other Options
609
-
610
- | Option | Description |
611
- |--------|-------------|
612
- | `--system-prompt <text>` | Replace default prompt (context files and skills still appended) |
613
- | `--append-system-prompt <text>` | Append to system prompt |
614
- | `--tui-mode <mode>` | TUI mode: `regular` (default) or experimental `fullscreen` |
615
- | `--use-theme <name[/name]>` | Set the initial interactive theme for this run without changing settings |
616
- | `--verbose` | Force verbose startup |
617
- | `-a`, `--approve` | Trust project-local files for this run |
618
- | `-na`, `--no-approve` | Ignore project-local files for this run |
619
- | `-h`, `--help` | Show help |
620
- | `-v`, `--version` | Show version |
621
-
622
- ### File Arguments
623
-
624
- Prefix files with `@` to include in the message:
625
-
626
- ```bash
627
- pi @prompt.md "Answer this"
628
- pi -p @screenshot.png "What's in this image?"
629
- pi @code.ts @test.ts "Review these files"
630
- ```
631
-
632
- ### Examples
633
-
634
- ```bash
635
- # Interactive with initial prompt
636
- pi "List all .ts files in src/"
637
-
638
- # Non-interactive
639
- pi -p "Summarize this codebase"
640
-
641
- # Non-interactive with piped stdin
642
- cat README.md | pi -p "Summarize this text"
643
-
644
- # Named one-shot session
645
- pi --name "release audit" -p "Audit this repository"
646
-
647
- # Different model
648
- pi --provider openai --model gpt-4o "Help me refactor"
649
-
650
- # Model with provider prefix (no --provider needed)
651
- pi --model openai/gpt-4o "Help me refactor"
652
-
653
- # Model with thinking level shorthand
654
- pi --model sonnet:high "Solve this complex problem"
655
-
656
- # Limit model cycling
657
- pi --models "claude-*,gpt-4o"
658
-
659
- # Read-only mode
660
- pi --tools read,grep,find,ls -p "Review the code"
661
-
662
- # Disable one extension or built-in tool while keeping the rest available
663
- pi --exclude-tools ask_question
664
-
665
- # High thinking level
666
- pi --thinking high "Solve this complex problem"
667
- ```
668
-
669
- ### Environment Variables
670
-
671
- | Variable | Description |
672
- |----------|-------------|
673
- | `AI_AGENT` | Set to `pi` by the CLI and RPC entry points so generic tooling can attribute child processes to Pi |
674
- | `PI_CODING_AGENT` | Set to `true` by the CLI and RPC entry points so child processes can detect that they run inside Pi |
675
- | `PI_CODING_AGENT_DIR` | Override config directory (default: `~/.pi/agent`) |
676
- | `PI_CODING_AGENT_SESSION_DIR` | Override session storage directory (overridden by `--session-dir`) |
677
- | `PI_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) |
678
- | `PI_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
679
- | `PI_SKIP_VERSION_CHECK` | Skip the Pi version update check at startup. This prevents the `pi.dev` latest-version request |
680
- | `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers. Use `1`/`true`/`yes` to enable or `0`/`false`/`no` to disable. This does not disable update checks |
681
- | `PI_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) |
682
- | `VISUAL`, `EDITOR` | Fallback external editor for Ctrl+G when `externalEditor` is unset; defaults to Notepad on Windows and `nano` elsewhere |
683
-
684
- Commands run by the LLM-callable bash tool also receive current session metadata:
685
-
686
- | Variable | Description |
687
- |----------|-------------|
688
- | `PI_SESSION_ID` | Current session ID |
689
- | `PI_SESSION_FILE` | Absolute session JSONL path; unset for ephemeral sessions |
690
- | `PI_PROVIDER` | Currently selected model provider |
691
- | `PI_MODEL` | Currently selected model ID |
692
- | `PI_REASONING_LEVEL` | Current effective reasoning level |
693
-
694
- These values are resolved when each command starts. See [Environment Variables](docs/environment-variables.md#bash-tool-session-environment) for semantics, examples, and custom-tool opt-out.
695
-
696
- ---
143
+ Ada stays extensible instead of opinionated: no baked-in MCP (build a skill or extension instead — [why](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/)), no forced sub-agent framework, no permission popups, no built-in to-dos. Build exactly what your workflow needs with [extensions](docs/extensions.md), [skills](docs/skills.md), or a third-party [Ada package](docs/packages.md) see the [original pi.dev rationale](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/).
697
144
 
698
145
  ## Contributing & Development
699
146
 
700
- See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines and [docs/development.md](docs/development.md) for setup, forking, and debugging.
147
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) and [docs/development.md](docs/development.md).
701
148
 
702
149
  ## License
703
150
 
@@ -705,9 +152,9 @@ MIT
705
152
 
706
153
  ## See Also
707
154
 
708
- - [@earendil-works/pi-ai](https://www.npmjs.com/package/@earendil-works/pi-ai): Core LLM toolkit
709
- - [@earendil-works/pi-agent-core](https://www.npmjs.com/package/@earendil-works/pi-agent-core): Agent framework
710
- - [@earendil-works/pi-tui](https://www.npmjs.com/package/@earendil-works/pi-tui): Terminal UI components
155
+ - [@earendil-works/pi-ai](https://www.npmjs.com/package/@earendil-works/pi-ai) core LLM toolkit
156
+ - [@earendil-works/pi-agent-core](https://www.npmjs.com/package/@earendil-works/pi-agent-core) agent framework
157
+ - [@earendil-works/pi-tui](https://www.npmjs.com/package/@earendil-works/pi-tui) terminal UI components
711
158
 
712
159
  <p align="center">
713
160
  <a href="https://pi.dev">pi.dev</a> domain graciously donated by