ashlr-plugin 1.36.4

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 (499) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +39 -0
  3. package/.claude-plugin/plugin.json +36 -0
  4. package/.codex/agents/README.md +9 -0
  5. package/.codex/agents/ashlr-explorer.md +36 -0
  6. package/.codex/agents/ashlr-worker.md +38 -0
  7. package/.codex-plugin/plugin.json +45 -0
  8. package/.mcp.json +14 -0
  9. package/LICENSE +21 -0
  10. package/README.md +311 -0
  11. package/agents/ashlr-code.md +69 -0
  12. package/agents/ashlr-explore.md +44 -0
  13. package/agents/ashlr-plan.md +54 -0
  14. package/bench/fixtures/notebook-large.ipynb +660 -0
  15. package/bench/fixtures/notebook-small.ipynb +39 -0
  16. package/bench/fixtures/tasklist-closed.json +62 -0
  17. package/bench/fixtures/tasklist-large-mixed.json +27 -0
  18. package/bench/fixtures/tasklist-sprint-open.json +79 -0
  19. package/bench/fixtures/websearch-bun-runtime.json +32 -0
  20. package/bench/fixtures/websearch-react-hooks-patterns.json +32 -0
  21. package/bench/fixtures/websearch-typescript-generics.json +38 -0
  22. package/bench/refs/node-sdk/.refrev +1 -0
  23. package/bench/refs/node-sdk/README.md +17 -0
  24. package/bench/refs/node-sdk/src/agent/agent.ts +163 -0
  25. package/bench/refs/node-sdk/src/agent/create-agent-ui-stream.ts +83 -0
  26. package/bench/refs/node-sdk/src/agent/tool-loop-agent.ts +238 -0
  27. package/bench/refs/node-sdk/src/embed/embed-many.ts +409 -0
  28. package/bench/refs/node-sdk/src/embed/embed-result.ts +50 -0
  29. package/bench/refs/node-sdk/src/embed/embed.ts +257 -0
  30. package/bench/refs/node-sdk/src/error/invalid-argument-error.ts +34 -0
  31. package/bench/refs/node-sdk/src/error/invalid-tool-input-error.ts +33 -0
  32. package/bench/refs/node-sdk/src/error/no-object-generated-error.ts +70 -0
  33. package/bench/refs/node-sdk/src/generate-image/generate-image-result.ts +42 -0
  34. package/bench/refs/node-sdk/src/generate-image/generate-image.ts +362 -0
  35. package/bench/refs/node-sdk/src/generate-object/generate-object-result.ts +67 -0
  36. package/bench/refs/node-sdk/src/generate-object/generate-object.ts +501 -0
  37. package/bench/refs/node-sdk/src/generate-object/inject-json-instruction.ts +30 -0
  38. package/bench/refs/node-sdk/src/generate-object/output-strategy.ts +415 -0
  39. package/bench/refs/node-sdk/src/generate-object/repair-text.ts +12 -0
  40. package/bench/refs/node-sdk/src/generate-object/stream-object.ts +960 -0
  41. package/bench/refs/node-sdk/src/generate-speech/generate-speech.ts +191 -0
  42. package/bench/refs/node-sdk/src/generate-text/generate-text.ts +1484 -0
  43. package/bench/refs/node-sdk/src/generate-text/stream-text.ts +2708 -0
  44. package/bench/refs/node-sdk/src/generate-text/tool-call.ts +59 -0
  45. package/bench/refs/node-sdk/src/generate-text/tool-result.ts +36 -0
  46. package/bench/refs/node-sdk/src/telemetry/create-telemetry-dispatcher.ts +146 -0
  47. package/bench/refs/node-sdk/src/telemetry/telemetry-registry.ts +15 -0
  48. package/bench/refs/node-sdk/src/telemetry/telemetry.ts +223 -0
  49. package/bench/refs/node-sdk/src/util/async-iterable-stream.ts +94 -0
  50. package/bench/refs/node-sdk/src/util/consume-stream.ts +31 -0
  51. package/bench/refs/node-sdk/src/util/create-stitchable-stream.ts +112 -0
  52. package/bench/refs/node-sdk/src/util/download/download.ts +74 -0
  53. package/bench/refs/node-sdk/src/util/error-handler.ts +1 -0
  54. package/bench/refs/node-sdk/src/util/fix-json.ts +401 -0
  55. package/bench/refs/node-sdk/src/util/merge-objects.ts +79 -0
  56. package/bench/refs/python-lib/.refrev +1 -0
  57. package/bench/refs/python-lib/README.md +18 -0
  58. package/bench/refs/python-lib/pandas/core/_numba/executor.py +249 -0
  59. package/bench/refs/python-lib/pandas/core/_numba/extensions.py +586 -0
  60. package/bench/refs/python-lib/pandas/core/_numba/kernels/mean_.py +198 -0
  61. package/bench/refs/python-lib/pandas/core/_numba/kernels/min_max_.py +178 -0
  62. package/bench/refs/python-lib/pandas/core/_numba/kernels/sum_.py +255 -0
  63. package/bench/refs/python-lib/pandas/core/_numba/kernels/var_.py +251 -0
  64. package/bench/refs/python-lib/pandas/core/accessor.py +520 -0
  65. package/bench/refs/python-lib/pandas/core/api.py +138 -0
  66. package/bench/refs/python-lib/pandas/core/array_algos/masked_accumulations.py +97 -0
  67. package/bench/refs/python-lib/pandas/core/array_algos/masked_reductions.py +252 -0
  68. package/bench/refs/python-lib/pandas/core/array_algos/putmask.py +150 -0
  69. package/bench/refs/python-lib/pandas/core/array_algos/quantile.py +232 -0
  70. package/bench/refs/python-lib/pandas/core/array_algos/replace.py +159 -0
  71. package/bench/refs/python-lib/pandas/core/array_algos/take.py +609 -0
  72. package/bench/refs/python-lib/pandas/core/arraylike.py +534 -0
  73. package/bench/refs/python-lib/pandas/core/arrays/_arrow_string_mixins.py +434 -0
  74. package/bench/refs/python-lib/pandas/core/arrays/_mixins.py +630 -0
  75. package/bench/refs/python-lib/pandas/core/arrays/_ranges.py +276 -0
  76. package/bench/refs/python-lib/pandas/core/arrays/_utils.py +77 -0
  77. package/bench/refs/python-lib/pandas/core/arrays/arrow/accessors.py +521 -0
  78. package/bench/refs/python-lib/pandas/core/arrays/arrow/extension_types.py +174 -0
  79. package/bench/refs/python-lib/pandas/core/arrays/boolean.py +454 -0
  80. package/bench/refs/python-lib/pandas/core/arrays/floating.py +192 -0
  81. package/bench/refs/python-lib/pandas/core/arrays/integer.py +296 -0
  82. package/bench/refs/python-lib/pandas/core/arrays/masked.py +2140 -0
  83. package/bench/refs/python-lib/pandas/core/arrays/numeric.py +305 -0
  84. package/bench/refs/python-lib/pandas/core/arrays/numpy_.py +701 -0
  85. package/bench/refs/python-lib/pandas/core/arrays/period.py +1586 -0
  86. package/bench/refs/python-lib/pandas/core/arrays/sparse/accessor.py +505 -0
  87. package/bench/refs/python-lib/pandas/core/arrays/sparse/scipy_sparse.py +208 -0
  88. package/bench/refs/rust-project/.refrev +1 -0
  89. package/bench/refs/rust-project/README.md +17 -0
  90. package/bench/refs/rust-project/tokio/src/doc/os.rs +68 -0
  91. package/bench/refs/rust-project/tokio/src/fs/dir_builder.rs +129 -0
  92. package/bench/refs/rust-project/tokio/src/fs/file.rs +1113 -0
  93. package/bench/refs/rust-project/tokio/src/fs/mocks.rs +176 -0
  94. package/bench/refs/rust-project/tokio/src/fs/mod.rs +324 -0
  95. package/bench/refs/rust-project/tokio/src/fs/open_options.rs +856 -0
  96. package/bench/refs/rust-project/tokio/src/fs/read.rs +80 -0
  97. package/bench/refs/rust-project/tokio/src/fs/read_dir.rs +357 -0
  98. package/bench/refs/rust-project/tokio/src/fs/write.rs +99 -0
  99. package/bench/refs/rust-project/tokio/src/future/maybe_done.rs +123 -0
  100. package/bench/refs/rust-project/tokio/src/future/try_join.rs +82 -0
  101. package/bench/refs/rust-project/tokio/src/io/async_buf_read.rs +117 -0
  102. package/bench/refs/rust-project/tokio/src/io/async_read.rs +133 -0
  103. package/bench/refs/rust-project/tokio/src/io/async_seek.rs +96 -0
  104. package/bench/refs/rust-project/tokio/src/io/async_write.rs +402 -0
  105. package/bench/refs/rust-project/tokio/src/io/blocking.rs +339 -0
  106. package/bench/refs/rust-project/tokio/src/io/interest.rs +345 -0
  107. package/bench/refs/rust-project/tokio/src/io/join.rs +130 -0
  108. package/bench/refs/rust-project/tokio/src/io/mod.rs +308 -0
  109. package/bench/refs/rust-project/tokio/src/io/poll_evented.rs +319 -0
  110. package/bench/refs/rust-project/tokio/src/io/read_buf.rs +344 -0
  111. package/bench/refs/rust-project/tokio/src/io/ready.rs +322 -0
  112. package/bench/refs/rust-project/tokio/src/io/split.rs +166 -0
  113. package/bench/refs/rust-project/tokio/src/io/stderr.rs +148 -0
  114. package/bench/refs/rust-project/tokio/src/io/stdin.rs +98 -0
  115. package/bench/refs/rust-project/tokio/src/io/stdio_common.rs +222 -0
  116. package/bench/refs/rust-project/tokio/src/io/stdout.rs +197 -0
  117. package/bench/refs/rust-project/tokio/src/io/util/buf_reader.rs +311 -0
  118. package/bench/refs/rust-project/tokio/src/io/util/buf_stream.rs +207 -0
  119. package/bench/refs/rust-project/tokio/src/io/util/buf_writer.rs +310 -0
  120. package/bench/refs/rust-project/tokio/src/io/util/chain.rs +144 -0
  121. package/commands/_spawn-patterns.json +32 -0
  122. package/commands/ashlr-allow.md +21 -0
  123. package/commands/ashlr-benchmark.md +53 -0
  124. package/commands/ashlr-brief.md +97 -0
  125. package/commands/ashlr-budget.md +76 -0
  126. package/commands/ashlr-compact.md +54 -0
  127. package/commands/ashlr-dashboard.md +37 -0
  128. package/commands/ashlr-doctor.md +56 -0
  129. package/commands/ashlr-eco-mode.md +92 -0
  130. package/commands/ashlr-genome-init.md +24 -0
  131. package/commands/ashlr-genome-keygen.md +36 -0
  132. package/commands/ashlr-genome-loop.md +118 -0
  133. package/commands/ashlr-genome-push.md +36 -0
  134. package/commands/ashlr-genome-rewrap.md +48 -0
  135. package/commands/ashlr-genome-team-init.md +67 -0
  136. package/commands/ashlr-handoff.md +23 -0
  137. package/commands/ashlr-help.md +86 -0
  138. package/commands/ashlr-hook-timings.md +30 -0
  139. package/commands/ashlr-leaderboard.md +50 -0
  140. package/commands/ashlr-ollama-setup.md +39 -0
  141. package/commands/ashlr-orchestrate-status.md +72 -0
  142. package/commands/ashlr-orchestrate.md +83 -0
  143. package/commands/ashlr-parallelize.md +63 -0
  144. package/commands/ashlr-report-crash.md +33 -0
  145. package/commands/ashlr-resume.md +72 -0
  146. package/commands/ashlr-savings.md +24 -0
  147. package/commands/ashlr-settings.md +50 -0
  148. package/commands/ashlr-spawn.md +61 -0
  149. package/commands/ashlr-start.md +60 -0
  150. package/commands/ashlr-status.md +64 -0
  151. package/commands/ashlr-team-invite.md +47 -0
  152. package/commands/ashlr-tier.md +122 -0
  153. package/commands/ashlr-tour.md +60 -0
  154. package/commands/ashlr-update.md +155 -0
  155. package/commands/ashlr-upgrade.md +96 -0
  156. package/commands/goal.md +58 -0
  157. package/commands/loop.md +40 -0
  158. package/docs/CNAME +1 -0
  159. package/docs/PRO_TIER.md +104 -0
  160. package/docs/README.md +21 -0
  161. package/docs/architecture.md +415 -0
  162. package/docs/ashlr-pipe.md +161 -0
  163. package/docs/assets/logo.svg +19 -0
  164. package/docs/assets/og.png +0 -0
  165. package/docs/assets/og.svg +41 -0
  166. package/docs/benchmarks-v2.json +355 -0
  167. package/docs/benchmarks.json +102 -0
  168. package/docs/benchmarks.md +211 -0
  169. package/docs/billing.md +185 -0
  170. package/docs/cloud-genome.md +155 -0
  171. package/docs/competitive-wozcode.md +92 -0
  172. package/docs/deploy.md +325 -0
  173. package/docs/email-templates.md +113 -0
  174. package/docs/embed-tuning.md +103 -0
  175. package/docs/genome.md +120 -0
  176. package/docs/github-oauth-onboarding.md +127 -0
  177. package/docs/hero-video-script.md +129 -0
  178. package/docs/index.html +2262 -0
  179. package/docs/install-prompt.md +78 -0
  180. package/docs/install-windows.md +132 -0
  181. package/docs/install.ps1 +171 -0
  182. package/docs/install.sh +146 -0
  183. package/docs/launch/README.md +114 -0
  184. package/docs/launch/hn.md +49 -0
  185. package/docs/launch/reddit.md +45 -0
  186. package/docs/launch/x.md +65 -0
  187. package/docs/launch-post.md +112 -0
  188. package/docs/legal.md +78 -0
  189. package/docs/llm-providers.md +99 -0
  190. package/docs/multi-host-mcp.md +217 -0
  191. package/docs/multi-turn-architecture.md +108 -0
  192. package/docs/operations/deployment.md +108 -0
  193. package/docs/operations/error-monitoring.md +70 -0
  194. package/docs/operations/weekly-digest.md +70 -0
  195. package/docs/operations.md +494 -0
  196. package/docs/platform-support.md +133 -0
  197. package/docs/policy-packs.md +188 -0
  198. package/docs/press-kit/fact-sheet.md +78 -0
  199. package/docs/press-kit/founder-bio.md +3 -0
  200. package/docs/press-kit/logo.svg +33 -0
  201. package/docs/press-kit/screenshots.md +146 -0
  202. package/docs/pricing.md +251 -0
  203. package/docs/pro-backend-architecture.md +523 -0
  204. package/docs/producthunt.md +52 -0
  205. package/docs/router-migration.md +110 -0
  206. package/docs/session-log-schema.md +68 -0
  207. package/docs/social.md +95 -0
  208. package/docs/team-genome.md +528 -0
  209. package/docs/telemetry.md +194 -0
  210. package/docs/test-isolation.md +100 -0
  211. package/docs/upgrade.md +159 -0
  212. package/hooks/_hook-errors.ts +87 -0
  213. package/hooks/_hook-perf-emit.ts +113 -0
  214. package/hooks/_hook-timing-ledger.ts +1133 -0
  215. package/hooks/_nudge-throttle.ts +127 -0
  216. package/hooks/_recent-blocks.ts +127 -0
  217. package/hooks/audit-upload.ts +86 -0
  218. package/hooks/codex-hooks.json +171 -0
  219. package/hooks/commit-attribution.ts +179 -0
  220. package/hooks/edit-batching-nudge.ts +154 -0
  221. package/hooks/genome-scribe-hook.ts +219 -0
  222. package/hooks/hooks.json +294 -0
  223. package/hooks/orient-nudge-hook.ts +242 -0
  224. package/hooks/policy-enforce.ts +214 -0
  225. package/hooks/post-tool-use-embedding.ts +93 -0
  226. package/hooks/post-tool-use-genome.sh +37 -0
  227. package/hooks/post-tool-use-genome.ts +69 -0
  228. package/hooks/posttooluse-correlate.ts +122 -0
  229. package/hooks/posttooluse-dedupe-output.ts +241 -0
  230. package/hooks/posttooluse-genome-refresh.ts +223 -0
  231. package/hooks/posttooluse-native-nudge.ts +205 -0
  232. package/hooks/posttooluse-stale-result.ts +277 -0
  233. package/hooks/pretooluse-bash.ts +63 -0
  234. package/hooks/pretooluse-budget-guard.ts +318 -0
  235. package/hooks/pretooluse-common.ts +985 -0
  236. package/hooks/pretooluse-eco-router.ts +196 -0
  237. package/hooks/pretooluse-edit.sh +93 -0
  238. package/hooks/pretooluse-edit.ts +197 -0
  239. package/hooks/pretooluse-glob.ts +70 -0
  240. package/hooks/pretooluse-grep.sh +85 -0
  241. package/hooks/pretooluse-grep.ts +96 -0
  242. package/hooks/pretooluse-notebookedit.ts +121 -0
  243. package/hooks/pretooluse-read.sh +118 -0
  244. package/hooks/pretooluse-read.ts +118 -0
  245. package/hooks/pretooluse-task.ts +130 -0
  246. package/hooks/pretooluse-webfetch.ts +66 -0
  247. package/hooks/pretooluse-websearch.ts +85 -0
  248. package/hooks/pretooluse-write.ts +128 -0
  249. package/hooks/pulse-emit.ts +197 -0
  250. package/hooks/session-end-consolidate.sh +35 -0
  251. package/hooks/session-end-consolidate.ts +188 -0
  252. package/hooks/session-end-stats-gc.ts +80 -0
  253. package/hooks/session-log-append.sh +94 -0
  254. package/hooks/session-log-append.ts +116 -0
  255. package/hooks/session-start.ts +993 -0
  256. package/hooks/sessionend-hook-health-nudge.ts +451 -0
  257. package/hooks/sessionend-savings-nudge.ts +318 -0
  258. package/hooks/sessionend-status-line-nudge.ts +296 -0
  259. package/hooks/sessionstart-brief.ts +140 -0
  260. package/hooks/sessionstart-cost-refactor.ts +95 -0
  261. package/hooks/sessionstart-efficient.ts +110 -0
  262. package/hooks/sessionstart-genome-author.ts +93 -0
  263. package/hooks/sessionstart-lean-tools.ts +98 -0
  264. package/hooks/sessionstart-search.ts +97 -0
  265. package/hooks/stop-accounting.ts +152 -0
  266. package/hooks/subagent-stop-rollup.ts +162 -0
  267. package/hooks/userpromptsubmit-brief-trigger.ts +156 -0
  268. package/package.json +56 -0
  269. package/ports/README.md +108 -0
  270. package/ports/cursor/mcp.json +11 -0
  271. package/ports/goose/recipe.yaml +26 -0
  272. package/scripts/ashlr-mcp.ts +40 -0
  273. package/scripts/auto-update.ts +177 -0
  274. package/scripts/baseline-scan.ts +831 -0
  275. package/scripts/bench-orchestrate.ts +377 -0
  276. package/scripts/benchmark-refs.ts +292 -0
  277. package/scripts/bootstrap.mjs +100 -0
  278. package/scripts/brief-eval.ts +234 -0
  279. package/scripts/bump-version.ts +82 -0
  280. package/scripts/bun-resolve.d.mts +11 -0
  281. package/scripts/bun-resolve.mjs +59 -0
  282. package/scripts/calibrate-grep.ts +467 -0
  283. package/scripts/capture-grep-workload.ts +260 -0
  284. package/scripts/check-tier.ts +61 -0
  285. package/scripts/check-version-sync.ts +97 -0
  286. package/scripts/cli-orchestrate-status.ts +386 -0
  287. package/scripts/cli-orchestrate.ts +303 -0
  288. package/scripts/cli.ts +478 -0
  289. package/scripts/cloud-smoke-test.ts +313 -0
  290. package/scripts/coach-report.ts +373 -0
  291. package/scripts/context-db-migrate.ts +137 -0
  292. package/scripts/context-status.ts +43 -0
  293. package/scripts/demo-run.ts +255 -0
  294. package/scripts/deploy-smoke.sh +140 -0
  295. package/scripts/doctor.ts +992 -0
  296. package/scripts/embed-file-worker.ts +104 -0
  297. package/scripts/embed-tune.ts +308 -0
  298. package/scripts/errors-report.ts +428 -0
  299. package/scripts/find-test-leak.ts +69 -0
  300. package/scripts/generate-badge.ts +357 -0
  301. package/scripts/genome-auto-consolidate.ts +533 -0
  302. package/scripts/genome-auto-propose.ts +578 -0
  303. package/scripts/genome-cloud-pull.ts +363 -0
  304. package/scripts/genome-cloud-push.ts +382 -0
  305. package/scripts/genome-cloud-sync.ts +587 -0
  306. package/scripts/genome-commit-watcher.ts +295 -0
  307. package/scripts/genome-init.ts +986 -0
  308. package/scripts/genome-key.ts +233 -0
  309. package/scripts/genome-keygen.ts +168 -0
  310. package/scripts/genome-link.ts +59 -0
  311. package/scripts/genome-refresh-worker.ts +364 -0
  312. package/scripts/genome-rewrap.ts +90 -0
  313. package/scripts/genome-synthesizer.ts +679 -0
  314. package/scripts/genome-team-init.ts +312 -0
  315. package/scripts/handoff-pack.ts +438 -0
  316. package/scripts/hook-bootstrap.mjs +75 -0
  317. package/scripts/hook-timing-reader.ts +371 -0
  318. package/scripts/hook-timings-report.ts +554 -0
  319. package/scripts/install-genome-hooks.ts +196 -0
  320. package/scripts/install-onnx-model.ts +154 -0
  321. package/scripts/install-permissions.ts +276 -0
  322. package/scripts/install-status-line.ts +150 -0
  323. package/scripts/mcp-entrypoint.sh +78 -0
  324. package/scripts/mcp-entrypoint.ts +130 -0
  325. package/scripts/mdx-angle-bracket-lint.ts +152 -0
  326. package/scripts/measure-cold-start.ts +126 -0
  327. package/scripts/migrate-stats-to-sqlite.ts +86 -0
  328. package/scripts/ollama-setup.ts +498 -0
  329. package/scripts/onboarding-wizard.ts +1691 -0
  330. package/scripts/orchestrate-emit-telemetry.ts +177 -0
  331. package/scripts/orchestrate-expand.ts +517 -0
  332. package/scripts/orchestrate-run.ts +744 -0
  333. package/scripts/print-legend.ts +50 -0
  334. package/scripts/product-metadata.ts +38 -0
  335. package/scripts/prune-old-memories.ts +208 -0
  336. package/scripts/publish.sh +88 -0
  337. package/scripts/read-calibration.ts +122 -0
  338. package/scripts/report-crash.ts +226 -0
  339. package/scripts/run-benchmark.ts +750 -0
  340. package/scripts/run-root-tests.ts +28 -0
  341. package/scripts/savings-dashboard.ts +1258 -0
  342. package/scripts/savings-report-extras.ts +447 -0
  343. package/scripts/savings-status-line.ts +873 -0
  344. package/scripts/session-event-emit.ts +266 -0
  345. package/scripts/session-greet.ts +686 -0
  346. package/scripts/session-log-report.ts +551 -0
  347. package/scripts/session-resume.ts +614 -0
  348. package/scripts/set-hook-mode.ts +83 -0
  349. package/scripts/smoke-cross-platform.ts +117 -0
  350. package/scripts/smoke-realtime.ts +257 -0
  351. package/scripts/smoke-tools.ts +21 -0
  352. package/scripts/stats-cloud-pull.ts +213 -0
  353. package/scripts/stats-cloud-sync.ts +261 -0
  354. package/scripts/telemetry-flush.ts +160 -0
  355. package/scripts/telemetry-status.ts +266 -0
  356. package/scripts/timing-budget.ts +35 -0
  357. package/scripts/ui-animation.ts +120 -0
  358. package/scripts/ui.ts +431 -0
  359. package/scripts/upgrade-flow.ts +775 -0
  360. package/scripts/weekly-digest.ts +394 -0
  361. package/servers/_accounting.ts +78 -0
  362. package/servers/_ask-router.ts +84 -0
  363. package/servers/_ast-chunker.ts +434 -0
  364. package/servers/_ast-helpers.ts +183 -0
  365. package/servers/_ast-languages.ts +153 -0
  366. package/servers/_ast-refactor/_shared.ts +221 -0
  367. package/servers/_ast-refactor/cross-file-rename.ts +560 -0
  368. package/servers/_ast-refactor/extract-function.ts +357 -0
  369. package/servers/_ast-refactor/file-local-rename.ts +172 -0
  370. package/servers/_ast-refactor.ts +41 -0
  371. package/servers/_ast-skeleton.ts +107 -0
  372. package/servers/_bash-summarizers-registry.ts +1096 -0
  373. package/servers/_crash-dump.ts +210 -0
  374. package/servers/_cwd-clamp.ts +342 -0
  375. package/servers/_edit-log.ts +28 -0
  376. package/servers/_edit-match.ts +236 -0
  377. package/servers/_edit-validate.ts +196 -0
  378. package/servers/_embed-calibration.ts +123 -0
  379. package/servers/_embedding-cache.ts +401 -0
  380. package/servers/_embedding-model.ts +329 -0
  381. package/servers/_events.ts +113 -0
  382. package/servers/_genome-cache.ts +154 -0
  383. package/servers/_genome-commits.ts +172 -0
  384. package/servers/_genome-crypto-v2.ts +242 -0
  385. package/servers/_genome-crypto.ts +259 -0
  386. package/servers/_genome-discoveries.ts +140 -0
  387. package/servers/_genome-embed-populator.ts +216 -0
  388. package/servers/_genome-freshness.ts +134 -0
  389. package/servers/_genome-issues.ts +171 -0
  390. package/servers/_genome-live.ts +263 -0
  391. package/servers/_genome-prs.ts +188 -0
  392. package/servers/_genome-search.ts +479 -0
  393. package/servers/_genome-sync.ts +297 -0
  394. package/servers/_history-tracker.ts +279 -0
  395. package/servers/_http-helpers.ts +151 -0
  396. package/servers/_identity-hash.ts +151 -0
  397. package/servers/_llm-providers/anthropic.ts +132 -0
  398. package/servers/_llm-providers/cloud.ts +195 -0
  399. package/servers/_llm-providers/index.ts +350 -0
  400. package/servers/_llm-providers/local.ts +127 -0
  401. package/servers/_llm-providers/onnx.ts +393 -0
  402. package/servers/_llm-providers/types.ts +27 -0
  403. package/servers/_manifest-v2.ts +447 -0
  404. package/servers/_mcp-host.ts +93 -0
  405. package/servers/_nudge-events.ts +451 -0
  406. package/servers/_orchestrate-executor.ts +316 -0
  407. package/servers/_prefetch.ts +435 -0
  408. package/servers/_pricing.ts +256 -0
  409. package/servers/_pro.ts +381 -0
  410. package/servers/_read-cache.ts +44 -0
  411. package/servers/_router-handlers.ts +46 -0
  412. package/servers/_router.ts +55 -0
  413. package/servers/_run-with-timeout.ts +173 -0
  414. package/servers/_savings-render.ts +214 -0
  415. package/servers/_stats-sqlite.ts +640 -0
  416. package/servers/_stats.ts +1183 -0
  417. package/servers/_status-line-cells.ts +469 -0
  418. package/servers/_streaks.ts +162 -0
  419. package/servers/_summarize.ts +208 -0
  420. package/servers/_task-graph-render.ts +217 -0
  421. package/servers/_task-graph.ts +545 -0
  422. package/servers/_telemetry.ts +719 -0
  423. package/servers/_test-parsers.ts +530 -0
  424. package/servers/_test-watch.ts +626 -0
  425. package/servers/_text-helpers.ts +37 -0
  426. package/servers/_token-measure.ts +160 -0
  427. package/servers/_tool-base.ts +248 -0
  428. package/servers/_weekly-digest.ts +391 -0
  429. package/servers/ask-server-handlers.ts +49 -0
  430. package/servers/ask-server.ts +174 -0
  431. package/servers/bash-server-handlers.ts +138 -0
  432. package/servers/bash-server.ts +1136 -0
  433. package/servers/bench.ts +186 -0
  434. package/servers/diff-semantic-server-handlers.ts +39 -0
  435. package/servers/diff-semantic-server.ts +566 -0
  436. package/servers/diff-server-handlers.ts +317 -0
  437. package/servers/diff-server.ts +20 -0
  438. package/servers/edit-server-handlers.ts +31 -0
  439. package/servers/edit-server.ts +209 -0
  440. package/servers/edit-structural-server-handlers.ts +322 -0
  441. package/servers/efficiency-server-handlers.ts +161 -0
  442. package/servers/efficiency-server.ts +1135 -0
  443. package/servers/flush-server-handlers.ts +21 -0
  444. package/servers/flush-server.ts +19 -0
  445. package/servers/genome-server-handlers.ts +118 -0
  446. package/servers/genome-server.ts +397 -0
  447. package/servers/github-server-handlers.ts +187 -0
  448. package/servers/github-server.ts +856 -0
  449. package/servers/glob-server-handlers.ts +233 -0
  450. package/servers/glob-server.ts +20 -0
  451. package/servers/grep-server-handlers.ts +61 -0
  452. package/servers/grep-server.ts +564 -0
  453. package/servers/http-server-handlers.ts +36 -0
  454. package/servers/http-server.ts +149 -0
  455. package/servers/logs-server-handlers.ts +42 -0
  456. package/servers/logs-server.ts +359 -0
  457. package/servers/ls-server-handlers.ts +166 -0
  458. package/servers/ls-server.ts +20 -0
  459. package/servers/multi-edit-server-handlers.ts +51 -0
  460. package/servers/multi-edit-server.ts +422 -0
  461. package/servers/notebook-edit-server-handlers.ts +34 -0
  462. package/servers/notebook-edit-server.ts +181 -0
  463. package/servers/orient-server-handlers.ts +52 -0
  464. package/servers/orient-server.ts +436 -0
  465. package/servers/pipe-server-handlers.ts +68 -0
  466. package/servers/pipe-server.ts +300 -0
  467. package/servers/read-server-handlers.ts +42 -0
  468. package/servers/read-server.ts +206 -0
  469. package/servers/rename-file-server-handlers.ts +67 -0
  470. package/servers/rename-file-server.ts +699 -0
  471. package/servers/savings-server-handlers.ts +27 -0
  472. package/servers/savings-server.ts +54 -0
  473. package/servers/search-replace-regex-server-handlers.ts +96 -0
  474. package/servers/search-replace-regex-server.ts +751 -0
  475. package/servers/sql-server-handlers.ts +58 -0
  476. package/servers/sql-server.ts +505 -0
  477. package/servers/task-server-handlers.ts +358 -0
  478. package/servers/task-server.ts +24 -0
  479. package/servers/test-server-handlers.ts +351 -0
  480. package/servers/test-server.ts +20 -0
  481. package/servers/tree-server-handlers.ts +503 -0
  482. package/servers/tree-server.ts +20 -0
  483. package/servers/webfetch-server-handlers.ts +166 -0
  484. package/servers/webfetch-server.ts +20 -0
  485. package/servers/websearch-server-handlers.ts +215 -0
  486. package/servers/websearch-server.ts +19 -0
  487. package/servers/write-server-handlers.ts +27 -0
  488. package/servers/write-server.ts +97 -0
  489. package/skills/ashlr-brief/SKILL.md +80 -0
  490. package/skills/ashlr-codex-doctor/SKILL.md +21 -0
  491. package/skills/ashlr-codex-efficient-tools/SKILL.md +17 -0
  492. package/skills/ashlr-codex-genome-refresh/SKILL.md +20 -0
  493. package/skills/ashlr-codex-parallel-explore/SKILL.md +20 -0
  494. package/skills/ashlr-codex-savings/SKILL.md +17 -0
  495. package/skills/ashlr-cost-refactor/SKILL.md +50 -0
  496. package/skills/ashlr-efficient/SKILL.md +64 -0
  497. package/skills/ashlr-genome-author/SKILL.md +43 -0
  498. package/skills/ashlr-lean-tools/SKILL.md +43 -0
  499. package/skills/ashlr-search/SKILL.md +46 -0
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: ashlr-budget
3
+ description: Set, check, or clear a session spend cap. Guards against runaway tool use in long sessions.
4
+ argument-hint: "$X | tokens=N | status | off"
5
+ ---
6
+
7
+ Manage a session budget cap that blocks tool calls when the limit is reached.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /ashlr-budget $X # set USD cap (e.g. /ashlr-budget $2.00 or /ashlr-budget $0.50)
13
+ /ashlr-budget tokens=200000 # set token cap (e.g. /ashlr-budget tokens=200000)
14
+ /ashlr-budget status # show current usage vs budget
15
+ /ashlr-budget off # clear the budget cap
16
+ ```
17
+
18
+ `$X` and `tokens=N` are mutually exclusive — setting one clears the other.
19
+
20
+ ## Environment variables
21
+
22
+ The budget guard hook (`hooks/pretooluse-budget-guard.ts`) reads these env vars:
23
+
24
+ | Variable | Description |
25
+ |----------|-------------|
26
+ | `ASHLR_SESSION_BUDGET_USD` | USD cap as a decimal string (e.g. `"2.00"`) |
27
+ | `ASHLR_SESSION_BUDGET_TOKENS` | Token cap as an integer string (e.g. `"200000"`) |
28
+
29
+ The status line shows `$X / $Y · Z%` when `ASHLR_SESSION_BUDGET_USD` is set, or `Nt / Nmax · Z%` when `ASHLR_SESSION_BUDGET_TOKENS` is set.
30
+
31
+ ## Steps
32
+
33
+ ### `$X` — set USD cap
34
+
35
+ 1. Parse the dollar amount (strip `$`, parse as float). Reject if non-positive or non-numeric.
36
+ 2. Set environment variable: `ASHLR_SESSION_BUDGET_USD=<amount>` via Bash:
37
+ ```sh
38
+ export ASHLR_SESSION_BUDGET_USD=<amount>
39
+ unset ASHLR_SESSION_BUDGET_TOKENS
40
+ ```
41
+ 3. Confirm: "Budget set to $`<amount>`. The pretooluse-budget-guard hook will warn at 80%, warn loudly at 95%, and block at 100%."
42
+
43
+ ### `tokens=N` — set token cap
44
+
45
+ 1. Parse N as integer. Reject if non-positive.
46
+ 2. Set: `ASHLR_SESSION_BUDGET_TOKENS=<N>` via Bash, unset USD cap.
47
+ 3. Confirm: "Budget set to `<N>` tokens."
48
+
49
+ ### `status` — print current usage
50
+
51
+ 1. Read `ASHLR_SESSION_BUDGET_USD` and `ASHLR_SESSION_BUDGET_TOKENS` from environment.
52
+ 2. Read session-log (`~/.ashlr/session-log.jsonl`) to compute cumulative `input_size` + `output_size` bytes for the current session.
53
+ 3. Estimate token usage: `tokens ≈ (input_bytes + output_bytes) / 4`.
54
+ 4. Estimate USD: `usd ≈ tokens / 1_000_000 * 12` (blended $4/Mtok input + $20/Mtok output at typical 60/40 mix).
55
+ 5. Print:
56
+ ```
57
+ Session budget status
58
+ ─────────────────────
59
+ USD cap: $<cap> (or "not set")
60
+ Token cap: <N> (or "not set")
61
+ Est. tokens used: ~<N>
62
+ Est. USD used: ~$<X>
63
+ Usage: <Z>%
64
+ ```
65
+ If no budget is set: "No budget set. Use /ashlr-budget $X or /ashlr-budget tokens=N to set one."
66
+
67
+ ### `off` — clear the budget cap
68
+
69
+ 1. Unset both `ASHLR_SESSION_BUDGET_USD` and `ASHLR_SESSION_BUDGET_TOKENS` via Bash.
70
+ 2. Confirm: "Budget cap cleared."
71
+
72
+ ## Budget guard behavior (implemented in hooks/pretooluse-budget-guard.ts)
73
+
74
+ - At **80%**: emits an `additionalContext` warning: "[ashlr] Budget at 80% — $X of $Y used."
75
+ - At **95%**: emits a louder warning: "[ashlr] Budget at 95% — consider stopping soon."
76
+ - At **100%**: exits non-zero, blocking the tool call with: "[ashlr] Budget exceeded — $X cap reached. Run /ashlr-budget off to clear."
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: ashlr-compact
3
+ description: Identify stale tool results accumulating in the conversation history and surface a recompression plan.
4
+ ---
5
+
6
+ Read `~/.ashlr/session-history/<sessionId>.jsonl` using the `ashlr__read` tool (or Bash if the path resolves) and then run the following analysis logic:
7
+
8
+ 1. **Find the session ID**: It is in `~/.ashlr/last-project.json` under the `sessionId` key. Read that file first.
9
+
10
+ 2. **Read the session history**: Read `~/.ashlr/session-history/<sessionId>.jsonl`. Each line is a JSON object with fields: `ts`, `tool`, `sizeBytes`, `contentSha8`, `turn`, `sessionId`.
11
+
12
+ 3. **Compute current turn count**: Count the total number of lines in the history file — this is `currentTurn`.
13
+
14
+ 4. **Classify entries by staleness**:
15
+ - `turnDelta = currentTurn - entry.turn`
16
+ - Fresh: `turnDelta < 5` (freshness 1.0)
17
+ - Stale: `5 ≤ turnDelta < 15` (freshness 0.5)
18
+ - Very stale: `turnDelta ≥ 15` (freshness 0.2)
19
+
20
+ 5. **Aggregate**:
21
+ - Total stale results: count of entries where `turnDelta ≥ 5`
22
+ - Total stale bytes: sum of `sizeBytes` for stale entries
23
+ - Per-tool breakdown: group by `tool`, show count + bytes
24
+
25
+ 6. **Print the report** to the user in this format:
26
+ ```
27
+ ashlr-compact: Stale result analysis
28
+ ─────────────────────────────────────
29
+ Session turns: <currentTurn>
30
+ Stale results: <count> (turnDelta ≥ 5)
31
+ Stale volume: ~<KB> KB
32
+
33
+ By tool:
34
+ <tool> <count> results · ~<KB> KB
35
+ ...
36
+
37
+ Recompression opportunity: ~<staleKB> KB could be freed by re-running
38
+ these reads now (the fresh results would replace stale ones in context).
39
+
40
+ Suggested actions:
41
+ ```
42
+ Then list the top 5 stale entries (by sizeBytes descending) and suggest
43
+ re-running the specific tool that produced them (e.g., `re-run ashlr__read
44
+ on <implied subject>` if tool is ashlr__read or Read).
45
+
46
+ 7. **Inject recompression hint** as your next assistant message context:
47
+ > "ashlr: The above stale results are from 5+ turns ago. If any are still
48
+ > needed, consider re-running the relevant reads now with fresh context.
49
+ > Stale results from earlier turns remain in the conversation history and
50
+ > count against the context window even when no longer load-bearing."
51
+
52
+ If the history file does not exist or is empty, tell the user: "No ashlr session history found — the tracker starts recording after the first ashlr__read or ashlr__grep call."
53
+
54
+ If total stale bytes < 5 KB, tell the user: "Session looks clean — less than 5 KB of stale tool output. No recompression needed yet."
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: ashlr-dashboard
3
+ description: Rich token-savings dashboard — per-tool bar charts, 7d/30d sparklines, projected annual savings, and cost in dollars.
4
+ ---
5
+
6
+ Run the dashboard script via Bash and show the user its output verbatim.
7
+
8
+ Steps:
9
+
10
+ 1. Run this command:
11
+
12
+ ```
13
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/savings-dashboard.ts
14
+ ```
15
+
16
+ If `$CLAUDE_PLUGIN_ROOT` is unset, fall back to resolving the plugin root by walking up from the current command file to find `.claude-plugin/plugin.json`, or use the path already known from other ashlr commands.
17
+
18
+ 2. Print the script's stdout **verbatim** inside a fenced code block (```) so the ANSI colors, Unicode box-drawing, bar charts, and sparklines all render correctly. The script is self-contained — it reads `~/.ashlr/stats.json` directly and renders a multi-panel view.
19
+
20
+ 3. Do not paraphrase, re-order, or summarize the numbers. The dashboard is the output — the user wants to see it as-is.
21
+
22
+ 4. After the verbatim block, add **at most one** short line of context:
23
+ - If the dashboard shows the "No stats.json found yet" panel: "Run any `ashlr__read`, `ashlr__grep`, or `ashlr__edit` call and this dashboard will come alive."
24
+ - If the projection section says "Not enough history yet": "Check back after a few more days of activity — the projection unlocks with ≥3 active days in the last 30."
25
+ - Otherwise: say nothing extra. The dashboard speaks for itself.
26
+
27
+ Pricing note (only surface if asked): the dashboard uses a blended $5/M-token rate derived from Claude Sonnet 4.5 pricing ($3/M input, $15/M output) as a rough honest estimate for read-heavy workloads.
28
+
29
+ If `$ARGUMENTS` contains `--by-tool`, also run:
30
+
31
+ ```sh
32
+ bun run "${CLAUDE_PLUGIN_ROOT}/scripts/session-log-report.ts"
33
+ ```
34
+
35
+ Append its stdout verbatim under a `## By tool` section after the main dashboard block. Display it inside a fenced code block so column alignment renders correctly.
36
+
37
+ Related: `/ashlr-savings` gives the compact text-only version.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: ashlr-doctor
3
+ description: Diagnose an ashlr-plugin install — checks plugin path, version, MCP servers, hooks, stats, genome, and settings in under 10 seconds.
4
+ ---
5
+
6
+ Run the diagnostics script and show the user what's wrong (and how to fix it).
7
+
8
+ Steps:
9
+
10
+ 1. Run this command via Bash:
11
+
12
+ ```
13
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/doctor.ts
14
+ ```
15
+
16
+ If `$CLAUDE_PLUGIN_ROOT` is unset, fall back to resolving the plugin root by walking up from the current command file to find `.claude-plugin/plugin.json`, or use the path already known from other ashlr commands.
17
+
18
+ 2. Print the script's stdout verbatim inside a fenced code block. Do not paraphrase, truncate, or re-order lines — the block is designed to be copy-pasted into a GitHub issue.
19
+
20
+ 3. Read the final summary line (`N warnings · M failures`). If either count is nonzero, ask the user a single targeted follow-up:
21
+
22
+ > "I see {N} warning(s) and {M} failure(s) above. Want me to apply the suggested fixes?"
23
+
24
+ Do not apply fixes without confirmation. Each `⚠` / `✗` line already contains the exact command to run.
25
+
26
+ 4. If the script itself exits non-zero (couldn't find the plugin root at all), print the stderr and stop — nothing else will work until that's resolved.
27
+
28
+ ## Cloud check
29
+
30
+ The report includes a **cloud** section that pings `GET /healthz` on the
31
+ ashlr backend with a 3-second timeout. Possible status lines:
32
+
33
+ - `cloud: healthy (Xms)` — backend reachable; X is the round-trip time.
34
+ - `cloud: unreachable (timeout/error)` — backend not responding. This is a
35
+ **warning only** — it does not mark the install as unhealthy or cause
36
+ the script to exit 1. The fix line suggests
37
+ `set ASHLR_API_URL_DISABLE=1 to suppress, or check https://status.ashlr.ai`.
38
+ - `cloud: disabled (ASHLR_API_URL_DISABLE=1)` — check intentionally
39
+ suppressed. Use this in offline environments or CI runs without internet.
40
+
41
+ **Env vars that control the cloud check:**
42
+
43
+ | Variable | Default | Effect |
44
+ |---|---|---|
45
+ | `ASHLR_API_URL` | `https://api.ashlr.ai` | Override the backend URL (e.g., point at staging or localhost). |
46
+ | `ASHLR_API_URL_DISABLE` | *(unset)* | Set to `1` to skip the ping entirely. |
47
+
48
+ If `$ARGUMENTS` contains `--errors`, also run:
49
+
50
+ ```sh
51
+ bun run "${CLAUDE_PLUGIN_ROOT}/scripts/errors-report.ts" $ARGUMENTS
52
+ ```
53
+
54
+ (Strip `--errors` from the forwarded arguments if the script doesn't accept it.) Append its stdout verbatim under a `## Recent errors` section after the main diagnostics block. Display it inside a fenced code block.
55
+
56
+ No preamble. No trailing summary beyond the follow-up question.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: ashlr-eco-mode
3
+ description: Toggle eco mode — aggressive token-saving behaviors that trade some response richness for lower session cost.
4
+ argument-hint: "on | off | status"
5
+ ---
6
+
7
+ Toggle eco mode for the current session.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /ashlr-eco-mode on # enable eco mode
13
+ /ashlr-eco-mode off # disable eco mode
14
+ /ashlr-eco-mode status # show current eco mode state + active behaviors
15
+ ```
16
+
17
+ ## What eco mode does
18
+
19
+ When `ASHLR_ECO=1` is set, the following behaviors activate automatically:
20
+
21
+ | Behavior | Details |
22
+ |----------|---------|
23
+ | Auto-compact every 15 tool calls | Triggers `/ashlr-compact` automatically to prevent stale result accumulation |
24
+ | Force genome grep | Errors if `.ashlrcode/genome/` is missing, with a link to `/ashlr-genome-init` |
25
+ | Lower summarization threshold | Reduces LLM summarization threshold from 16384 → 12288 bytes (fires more often) |
26
+ | Smart Task routing | Task tool calls without explicit `subagent_type` are routed to `ashlr:ashlr:explore` when the prompt is question-shaped (starts with what/where/how/find/explain/why/which/when/who) |
27
+ | Suppress image attachments | Image data in tool results is stripped before processing |
28
+ | Auto-activate `/ashlr-brief` | If `~/.ashlr/brief.json` is unset or `off`, eco-mode-on writes `level: standard` and eco-mode-off restores the prior level. See `/ashlr-brief` for details. |
29
+
30
+ ## Environment variable
31
+
32
+ | Variable | Value | Effect |
33
+ |----------|-------|--------|
34
+ | `ASHLR_ECO` | `1` | Eco mode on |
35
+ | `ASHLR_ECO` | unset / `0` | Eco mode off |
36
+
37
+ The eco router hook (`hooks/pretooluse-eco-router.ts`) reads `ASHLR_ECO` and injects `subagent_type: "ashlr:ashlr:explore"` into question-shaped Task tool calls.
38
+
39
+ The status line shows a `eco` badge when `ASHLR_ECO=1`.
40
+
41
+ ## Steps
42
+
43
+ ### `on`
44
+
45
+ 1. Set env var via Bash:
46
+ ```sh
47
+ export ASHLR_ECO=1
48
+ ```
49
+ 2. Print:
50
+ ```
51
+ Eco mode ON. Active behaviors:
52
+ - Auto-compact every 15 tool calls
53
+ - Force genome grep (error if .ashlrcode/genome/ missing)
54
+ - Summarization threshold: 12288 bytes (was 16384)
55
+ - Question-shaped Task calls routed to ashlr:ashlr:explore
56
+ - Image attachments suppressed in tool results
57
+
58
+ Run /ashlr-eco-mode off to disable.
59
+ ```
60
+
61
+ ### `off`
62
+
63
+ 1. Unset env var via Bash:
64
+ ```sh
65
+ unset ASHLR_ECO
66
+ ```
67
+ 2. Print: "Eco mode OFF. All behaviors restored to defaults."
68
+
69
+ ### `status`
70
+
71
+ 1. Check `ASHLR_ECO` in environment.
72
+ 2. If `ASHLR_ECO=1`:
73
+ ```
74
+ Eco mode: ON (ASHLR_ECO=1)
75
+
76
+ Active behaviors:
77
+ - Auto-compact every 15 tool calls ✓
78
+ - Force genome grep ✓
79
+ - Summarization threshold: 12288 bytes ✓ (default: 16384)
80
+ - Question Task routing → ashlr:ashlr:explore ✓
81
+ - Image attachment suppression ✓
82
+ ```
83
+ 3. If off:
84
+ ```
85
+ Eco mode: OFF
86
+
87
+ Run /ashlr-eco-mode on to enable all token-saving behaviors.
88
+ ```
89
+
90
+ ### No argument
91
+
92
+ Print the status (same as `status`).
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: ashlr-genome-init
3
+ description: Initialize a `.ashlrcode/genome/` in the current project so ashlr__grep can route through genome RAG for ~-84% token savings.
4
+ ---
5
+
6
+ Initialize a genome for the user's current project.
7
+
8
+ Run the following Bash command:
9
+
10
+ ```
11
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-init.ts --dir "$(pwd)"
12
+ ```
13
+
14
+ Pass `--force` only if the user explicitly asks to overwrite an existing genome.
15
+ Pass `--minimal` only if the user asks to skip the auto-populated architecture/conventions sections.
16
+ Pass `--summarize` if the user wants to use a local Ollama model to generate concise CLAUDE.md summaries instead of truncating. Requires Ollama running locally — falls back gracefully to truncation if unavailable.
17
+
18
+ After the command runs:
19
+
20
+ - Relay the script's stdout verbatim as the response.
21
+ - If the script exits non-zero because a genome already exists, tell the user to re-run with `/ashlr-genome-init --force` only if they confirm they want to overwrite.
22
+ - Do not read or modify any generated files unless the user asks.
23
+
24
+ No preamble, no trailing summary beyond the script's output.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: ashlr-genome-keygen
3
+ description: Generate an X25519 keypair for team-cloud genome v2 encryption and register the public half with Ashlr. Run this once per machine before running /ashlr-genome-team-init. Safe to re-run — a no-op when the machine's key is already registered.
4
+ ---
5
+
6
+ Run the keygen script and show the user the outcome.
7
+
8
+ Steps:
9
+
10
+ 1. Run via Bash:
11
+
12
+ ```
13
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-keygen.ts $ARGUMENTS
14
+ ```
15
+
16
+ 2. Print the script's stdout verbatim. Do not paraphrase — the user needs to see the exact pubkey path and value on first generation.
17
+
18
+ 3. If the script exits non-zero, surface its stderr:
19
+ - Exit 2: user hasn't signed in. Suggest `/ashlr-upgrade` first.
20
+ - Exit 3: network or server error. Suggest checking `$ASHLR_API_URL` and network.
21
+
22
+ Flags (forwarded via `$ARGUMENTS`):
23
+
24
+ | Flag | Purpose |
25
+ |---|---|
26
+ | `--force` | Regenerate even if a keypair already exists (key rotation). Previous envelopes will no longer decrypt — ask an admin to run `/ashlr-genome-rewrap`. |
27
+ | `--dry-run` | Print what would happen, no network, no file writes |
28
+ | `--endpoint <url>` | Override the default `https://api.ashlr.ai` |
29
+
30
+ ## What it does
31
+
32
+ Generates a 32-byte X25519 keypair client-side. Saves both halves to `~/.ashlr/member-keys/<yourUserId>.json` with mode 0600. Uploads only the public half via `POST /user/genome-pubkey`. Your private key never leaves the machine.
33
+
34
+ ## Why
35
+
36
+ Team-cloud genome v2 uses envelope encryption: admins wrap the team DEK for each member's public key; members unwrap with their private key on first pull. This replaces the v1 flow where you had to DM a 32-byte base64 string to a teammate via Signal / 1Password.
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: ashlr-genome-loop
3
+ description: Inspect and control the automatic genome propose + consolidate loop (PostToolUse observer + SessionEnd consolidator).
4
+ ---
5
+
6
+ The ashlr-plugin runs an automatic genome loop: a PostToolUse hook proposes
7
+ architecture/decision-flavored observations to
8
+ `.ashlrcode/genome/proposals.jsonl`, and a SessionEnd hook consolidates them
9
+ back into section files when ≥ 3 are pending. This command exposes the
10
+ loop's status and on/off state.
11
+
12
+ Subcommands (arg to the slash command):
13
+
14
+ - `status` — show pending proposal count, last consolidation timestamp, and
15
+ whether the loop is currently enabled.
16
+ - `run` — force a consolidation pass on the current project's genome.
17
+ - `on` — enable the loop (writes `~/.ashlr/config.json`).
18
+ - `off` — disable the loop (writes `~/.ashlr/config.json`). The
19
+ `ASHLR_GENOME_AUTO=0` env var also disables it per-shell.
20
+
21
+ Dispatch on `$1`:
22
+
23
+ ### If `$1` is empty or `status`
24
+
25
+ Run the following Bash command and relay the output:
26
+
27
+ ```bash
28
+ bash -c '
29
+ set -e
30
+ CFG="$HOME/.ashlr/config.json"
31
+ LOG="$HOME/.ashlr/genome-consolidation.log"
32
+ GENOME="$(pwd)/.ashlrcode/genome"
33
+ PROPOSALS="$GENOME/proposals.jsonl"
34
+
35
+ ENABLED="on"
36
+ if [ "${ASHLR_GENOME_AUTO:-1}" = "0" ]; then ENABLED="off (env ASHLR_GENOME_AUTO=0)"; fi
37
+ if [ -f "$CFG" ] && grep -q "\"genomeAuto\"[[:space:]]*:[[:space:]]*false" "$CFG" 2>/dev/null; then
38
+ ENABLED="off (~/.ashlr/config.json)"
39
+ fi
40
+
41
+ PENDING=0
42
+ if [ -f "$PROPOSALS" ]; then
43
+ PENDING=$(grep -c . "$PROPOSALS" 2>/dev/null || echo 0)
44
+ fi
45
+
46
+ LAST="(never)"
47
+ if [ -f "$LOG" ]; then
48
+ LAST=$(tail -n 1 "$LOG" 2>/dev/null | awk "{print \$1}")
49
+ [ -z "$LAST" ] && LAST="(never)"
50
+ fi
51
+
52
+ echo "ashlr genome loop — $ENABLED"
53
+ echo " pending proposals: $PENDING ($PROPOSALS)"
54
+ echo " last consolidation: $LAST"
55
+ '
56
+ ```
57
+
58
+ ### If `$1` is `run`
59
+
60
+ Run the following Bash command and relay its output verbatim:
61
+
62
+ ```bash
63
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-auto-consolidate.ts --dir "$(pwd)"
64
+ ```
65
+
66
+ If no output appears, say "No pending proposals to consolidate (need ≥ 3)."
67
+
68
+ ### If `$1` is `on`
69
+
70
+ Run the following Bash command:
71
+
72
+ ```bash
73
+ bash -c '
74
+ mkdir -p "$HOME/.ashlr"
75
+ CFG="$HOME/.ashlr/config.json"
76
+ if [ -f "$CFG" ]; then
77
+ bun -e "
78
+ const fs = require(\"fs\");
79
+ const p = process.env.HOME + \"/.ashlr/config.json\";
80
+ let j = {};
81
+ try { j = JSON.parse(fs.readFileSync(p, \"utf-8\")); } catch {}
82
+ j.genomeAuto = true;
83
+ fs.writeFileSync(p, JSON.stringify(j, null, 2));
84
+ console.log(\"ashlr genome loop: enabled\");
85
+ "
86
+ else
87
+ echo "{\"genomeAuto\": true}" > "$CFG"
88
+ echo "ashlr genome loop: enabled"
89
+ fi
90
+ '
91
+ ```
92
+
93
+ ### If `$1` is `off`
94
+
95
+ Run the following Bash command:
96
+
97
+ ```bash
98
+ bash -c '
99
+ mkdir -p "$HOME/.ashlr"
100
+ CFG="$HOME/.ashlr/config.json"
101
+ if [ -f "$CFG" ]; then
102
+ bun -e "
103
+ const fs = require(\"fs\");
104
+ const p = process.env.HOME + \"/.ashlr/config.json\";
105
+ let j = {};
106
+ try { j = JSON.parse(fs.readFileSync(p, \"utf-8\")); } catch {}
107
+ j.genomeAuto = false;
108
+ fs.writeFileSync(p, JSON.stringify(j, null, 2));
109
+ console.log(\"ashlr genome loop: disabled\");
110
+ "
111
+ else
112
+ echo "{\"genomeAuto\": false}" > "$CFG"
113
+ echo "ashlr genome loop: disabled"
114
+ fi
115
+ '
116
+ ```
117
+
118
+ No preamble, no trailing summary beyond the command output.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: ashlr-genome-push
3
+ description: Push the local .ashlrcode/genome/ to the team cloud. Safe to run any time; invoked automatically at SessionEnd after consolidation. No-op when the repo has no .cloud-id (i.e. team-genome not initialized) or when ASHLR_CLOUD_GENOME_DISABLE=1.
4
+ ---
5
+
6
+ Run the push script and show the user the outcome.
7
+
8
+ Steps:
9
+
10
+ 1. Run via Bash:
11
+
12
+ ```
13
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-cloud-push.ts $ARGUMENTS
14
+ ```
15
+
16
+ 2. Print the script's stdout verbatim. Don't paraphrase — exit-code-specific messages tell the user how to recover:
17
+ - Exit 0: success or no-op. Nothing to do.
18
+ - Exit 1: another push is in progress for this repo (lockfile held). Suggest retrying in a moment.
19
+ - Exit 2: auth / network / server error OR no local member keypair. Check the stderr for the specific cause. Common fixes: `/ashlr-genome-keygen`, `/ashlr-upgrade`, ask admin to re-wrap for you.
20
+
21
+ Flags (forwarded via `$ARGUMENTS`):
22
+
23
+ | Flag | Purpose |
24
+ |---|---|
25
+ | `--dry-run` | Enumerate + encrypt + show what would be POSTed, no network |
26
+ | `--quiet` | Suppress stderr info messages — used by SessionEnd hook path |
27
+ | `--endpoint <url>` | Override the default `https://api.ashlr.ai` |
28
+ | `--cwd <dir>` | Use a different repo root (for testing) |
29
+
30
+ ## What it does
31
+
32
+ 1. Reads `.ashlrcode/genome/.cloud-id` to learn which team genome to push to.
33
+ 2. Acquires a cross-process lockfile at `.ashlrcode/genome/.push.lock` so concurrent pushes (e.g. two MCP processes or a hook + a manual CLI) serialize cleanly.
34
+ 3. Fetches your wrapped DEK via `GET /genome/:id/key-envelope` (T1) and unwraps with your local X25519 private key (T2).
35
+ 4. Enumerates `.ashlrcode/genome/{knowledge,vision,milestones,strategies}/*.md` + `manifest.json`, encrypts each with the DEK via AES-256-GCM, and POSTs with a bumped per-machine vclock component.
36
+ 5. Persists the new vclock only on a successful push so a mid-push crash doesn't leave a ghost-bumped clock.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ashlr-genome-rewrap
3
+ description: Re-wrap the team-cloud genome DEK for every member with a current pubkey. Run this after a teammate rotates their keypair (/ashlr-genome-keygen --force) or joins the team and runs /ashlr-genome-keygen for the first time. Admin-only.
4
+ argument-hint: "[--rotate-dek] [--endpoint <url>]"
5
+ ---
6
+
7
+ Run the rewrap script and show the user its output verbatim.
8
+
9
+ Steps:
10
+
11
+ 1. Run via Bash:
12
+
13
+ ```sh
14
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-rewrap.ts $ARGUMENTS
15
+ ```
16
+
17
+ 2. Print the script's stdout verbatim — the per-member wrap log is what
18
+ the admin needs to confirm success.
19
+
20
+ 3. If the script exits non-zero, surface its stderr:
21
+ - Exit 2: prereq missing — likely no Pro token, no local keypair, or
22
+ no `.cloud-id` in this repo. Suggest the relevant skill:
23
+ `/ashlr-upgrade`, `/ashlr-genome-keygen`, or `/ashlr-genome-team-init`.
24
+ - Exit 3: network / server error. Suggest checking `$ASHLR_API_URL`
25
+ and the team's tier (rewrap requires Team tier).
26
+
27
+ Flags (forwarded via `$ARGUMENTS`):
28
+
29
+ | Flag | Purpose |
30
+ |---|---|
31
+ | `--rotate-dek` | Generate a fresh team DEK before wrapping. Invalidates every existing envelope. Use after a suspected key compromise. |
32
+ | `--endpoint <url>` | Override the default `https://api.ashlr.ai` |
33
+ | `--cwd <dir>` | Repo to operate on (default cwd) |
34
+
35
+ ## When to use
36
+
37
+ - A teammate ran `/ashlr-genome-keygen --force` (rotated their key); their
38
+ previous envelope no longer decrypts.
39
+ - A new teammate joined the team and ran `/ashlr-genome-keygen`; they now
40
+ have a pubkey on file but no envelope yet.
41
+ - Suspected key compromise — run with `--rotate-dek` to mint a fresh DEK
42
+ and invalidate every prior envelope at once.
43
+
44
+ ## What it does
45
+
46
+ Re-wraps the existing team DEK for every member with a current pubkey on
47
+ file. With `--rotate-dek`, generates a fresh DEK first so every old
48
+ envelope is invalidated.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: ashlr-genome-team-init
3
+ description: Initialize (or rewrap for new members of) a team-cloud genome for the current repo. One-time per repo by an admin; then teammates join via /ashlr-team-invite + /ashlr-genome-keygen + admin re-runs with --wrap-all.
4
+ ---
5
+
6
+ Run the team-init script and show the user the outcome.
7
+
8
+ Steps:
9
+
10
+ 1. Run via Bash:
11
+
12
+ ```
13
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-team-init.ts $ARGUMENTS
14
+ ```
15
+
16
+ 2. Print the script's stdout verbatim. Don't paraphrase — the user needs to see the `genomeId` and `.cloud-id` path to understand what to commit.
17
+
18
+ 3. If the script exits non-zero, surface its stderr:
19
+ - Exit 2: prereq missing. Most common: `/ashlr-upgrade` (no pro-token), `/ashlr-genome-keygen` (no local member keypair), team-tier not reached, no git remote.
20
+ - Exit 3: network / server error.
21
+
22
+ Flags (forwarded via `$ARGUMENTS`):
23
+
24
+ | Flag | Purpose |
25
+ |---|---|
26
+ | `--force` | Reinitialize even if `.cloud-id` already exists. **This rotates the DEK** — existing team envelopes stop working until re-wrapped. |
27
+ | `--wrap-all` | Skip init; just mint envelopes for every team member with a pubkey on file. Use after adding a teammate (`/ashlr-team-invite` + they run `/ashlr-genome-keygen`). |
28
+ | `--endpoint <url>` | Override the default `https://api.ashlr.ai` |
29
+ | `--cwd <dir>` | Use a different repo root |
30
+
31
+ ## What it does (fresh init)
32
+
33
+ 1. Resolves the repo URL from `git remote get-url origin`.
34
+ 2. `POST /genome/init` — server allocates a new `genomeId` scoped to your team.
35
+ 3. Generates a fresh 32-byte DEK client-side.
36
+ 4. Wraps the DEK for your own X25519 pubkey (via T2's `wrapDek`).
37
+ 5. `POST /genome/:id/key-envelope` — uploads the self-wrapped envelope so your push path immediately works.
38
+ 6. Writes `.ashlrcode/genome/.cloud-id` so subsequent pushes (and SessionStart pulls, T5) find the genome.
39
+
40
+ Commit `.ashlrcode/genome/.cloud-id` to the repo so teammates auto-discover the cloud genome on checkout.
41
+
42
+ ## What it does (--wrap-all)
43
+
44
+ 1. Reads `.cloud-id`, fetches your own envelope, unwraps to recover the team DEK.
45
+ 2. Lists all team members + their registered pubkeys (via `GET /genome/:id/members`).
46
+ 3. For each member with a pubkey, wraps the DEK and uploads the envelope.
47
+ 4. Reports who got wrapped and who was skipped (no pubkey yet — they need to run `/ashlr-genome-keygen`).
48
+
49
+ ## Typical team setup
50
+
51
+ ```
52
+ # on admin's machine
53
+ /ashlr-upgrade # get pro-token (team tier)
54
+ /ashlr-genome-keygen # generate X25519 keypair
55
+ /ashlr-genome-team-init # bootstrap genome, self-wrap
56
+ git add .ashlrcode/genome/.cloud-id && git commit -m "chore: team genome" && git push
57
+
58
+ # on each teammate's machine
59
+ /ashlr-upgrade # same (or accept invite first)
60
+ /ashlr-genome-keygen # generate their X25519 keypair
61
+ # wait for admin...
62
+
63
+ # back on admin's machine
64
+ /ashlr-genome-team-init --wrap-all # mint envelopes for the new pubkeys
65
+
66
+ # teammate pulls, next /ashlr-genome-push works
67
+ ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: ashlr-handoff
3
+ description: Generate a context-pack for the next session to resume cold.
4
+ argument-hint: ""
5
+ ---
6
+
7
+ Generate a plain-text handoff that can be pasted into a fresh Claude Code
8
+ session. Renders branch/dirty state, last 5 commits, genome state, top
9
+ session tools, and top lifetime projects — all in ASCII so it copies
10
+ cleanly.
11
+
12
+ Run via Bash:
13
+
14
+ ```sh
15
+ bun run ${CLAUDE_PLUGIN_ROOT}/scripts/savings-dashboard.ts --handoff
16
+ ```
17
+
18
+ Print the script's stdout verbatim — do not paraphrase. The output is
19
+ designed to be copy-pasted, so any reformatting from this skill weakens
20
+ the handoff.
21
+
22
+ If the script fails, fall back to telling the user:
23
+ `/ashlr-dashboard --handoff failed — run git log and check status line.`