raga-cli 0.0.0-stage → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/LICENSE +21 -0
  3. package/README.md +139 -2
  4. package/bundled-skills/AGENTS.md +5 -0
  5. package/bundled-skills/README.md +25 -0
  6. package/bundled-skills/agents/comment-sicko.json +9 -0
  7. package/bundled-skills/agents/comment-sicko.md +28 -0
  8. package/bundled-skills/agents/model-roles.json +41 -0
  9. package/bundled-skills/agents/poteto-agent.json +9 -0
  10. package/bundled-skills/agents/poteto-agent.md +4 -0
  11. package/bundled-skills/agents/worker.json +8 -0
  12. package/bundled-skills/agents/worker.md +1 -0
  13. package/bundled-skills/bundle.json +1448 -0
  14. package/bundled-skills/dependencies.json +40 -0
  15. package/bundled-skills/docs/guide/01-setup.md +3 -0
  16. package/bundled-skills/docs/guide/02-peak.md +135 -0
  17. package/bundled-skills/docs/guide/03-understand.md +79 -0
  18. package/bundled-skills/docs/guide/04-design.md +133 -0
  19. package/bundled-skills/docs/guide/05-build-and-clean.md +83 -0
  20. package/bundled-skills/docs/guide/06-verify-and-ship.md +166 -0
  21. package/bundled-skills/docs/guide/07-overnight.md +118 -0
  22. package/bundled-skills/docs/guide/08-principles.md +72 -0
  23. package/bundled-skills/docs/guide/09-make-it-yours.md +96 -0
  24. package/bundled-skills/docs/guide/10-recipes-and-pitfalls.md +180 -0
  25. package/bundled-skills/docs/guide/README.md +38 -0
  26. package/bundled-skills/docs/guide/images/design.jpg +0 -0
  27. package/bundled-skills/docs/guide/images/overnight.jpg +0 -0
  28. package/bundled-skills/docs/guide/images/recipes.jpg +0 -0
  29. package/bundled-skills/docs/guide/images/router.jpg +0 -0
  30. package/bundled-skills/docs/guide/images/understanding.jpg +0 -0
  31. package/bundled-skills/docs/guide/images/verification.jpg +0 -0
  32. package/bundled-skills/licenses/commander +22 -0
  33. package/bundled-skills/licenses/cursor-team-kit +21 -0
  34. package/bundled-skills/licenses/no-mistakes +21 -0
  35. package/bundled-skills/licenses/pstack +21 -0
  36. package/bundled-skills/skills/peak/SKILL.md +184 -0
  37. package/bundled-skills/skills/peak/playbooks/authoring-a-skill.md +12 -0
  38. package/bundled-skills/skills/peak/playbooks/autonomous-run.md +13 -0
  39. package/bundled-skills/skills/peak/playbooks/autopilot-full.md +25 -0
  40. package/bundled-skills/skills/peak/playbooks/autopilot-stack.md +12 -0
  41. package/bundled-skills/skills/peak/playbooks/babysit.md +18 -0
  42. package/bundled-skills/skills/peak/playbooks/bug-fix.md +15 -0
  43. package/bundled-skills/skills/peak/playbooks/eval.md +25 -0
  44. package/bundled-skills/skills/peak/playbooks/feature.md +21 -0
  45. package/bundled-skills/skills/peak/playbooks/hillclimb.md +21 -0
  46. package/bundled-skills/skills/peak/playbooks/investigation.md +14 -0
  47. package/bundled-skills/skills/peak/playbooks/multi-phase-plan.md +155 -0
  48. package/bundled-skills/skills/peak/playbooks/opening-a-pr.md +34 -0
  49. package/bundled-skills/skills/peak/playbooks/orchestrate.md +112 -0
  50. package/bundled-skills/skills/peak/playbooks/pause-safely.md +10 -0
  51. package/bundled-skills/skills/peak/playbooks/perf-issue.md +25 -0
  52. package/bundled-skills/skills/peak/playbooks/prototype.md +14 -0
  53. package/bundled-skills/skills/peak/playbooks/refactoring.md +16 -0
  54. package/bundled-skills/skills/peak/playbooks/runtime-forensics.md +11 -0
  55. package/bundled-skills/skills/peak/playbooks/session-pickup.md +11 -0
  56. package/bundled-skills/skills/peak/playbooks/shipping.md +12 -0
  57. package/bundled-skills/skills/peak/playbooks/trace-forensics.md +14 -0
  58. package/bundled-skills/skills/peak/playbooks/visual-parity.md +11 -0
  59. package/bundled-skills/skills/peak/playbooks/worktree-cleanup.md +6 -0
  60. package/bundled-skills/skills/peak/references/architect/SKILL.md +81 -0
  61. package/bundled-skills/skills/peak/references/architect/references/design-red-flags.md +57 -0
  62. package/bundled-skills/skills/peak/references/architect/references/rationale-template.md +35 -0
  63. package/bundled-skills/skills/peak/references/architect/references/runner-prompt.md +20 -0
  64. package/bundled-skills/skills/peak/references/arena/SKILL.md +50 -0
  65. package/bundled-skills/skills/peak/references/automate-me/SKILL.md +106 -0
  66. package/bundled-skills/skills/peak/references/benchmark-checklist/SKILL.md +41 -0
  67. package/bundled-skills/skills/peak/references/blast-radius/SKILL.md +52 -0
  68. package/bundled-skills/skills/peak/references/bro/SKILL.md +9 -0
  69. package/bundled-skills/skills/peak/references/control-cli/SKILL.md +111 -0
  70. package/bundled-skills/skills/peak/references/control-ui/SKILL.md +111 -0
  71. package/bundled-skills/skills/peak/references/correct/SKILL.md +34 -0
  72. package/bundled-skills/skills/peak/references/create-formal-verification-skill/SKILL.md +43 -0
  73. package/bundled-skills/skills/peak/references/create-skill/SKILL.md +14 -0
  74. package/bundled-skills/skills/peak/references/create-verification-skill/SKILL.md +46 -0
  75. package/bundled-skills/skills/peak/references/create-verification-skill/references/feature-map-example/README.md +47 -0
  76. package/bundled-skills/skills/peak/references/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  77. package/bundled-skills/skills/peak/references/create-verification-skill/references/feature-map-example/search.md +45 -0
  78. package/bundled-skills/skills/peak/references/deslop/SKILL.md +24 -0
  79. package/bundled-skills/skills/peak/references/figure-it-out/SKILL.md +54 -0
  80. package/bundled-skills/skills/peak/references/how/SKILL.md +38 -0
  81. package/bundled-skills/skills/peak/references/how/references/explainer-prompt.md +55 -0
  82. package/bundled-skills/skills/peak/references/how/references/explorer-prompt.md +35 -0
  83. package/bundled-skills/skills/peak/references/in-your-own-words/SKILL.md +9 -0
  84. package/bundled-skills/skills/peak/references/interrogate/SKILL.md +76 -0
  85. package/bundled-skills/skills/peak/references/interrogate/references/code-quality-review.md +47 -0
  86. package/bundled-skills/skills/peak/references/interrogate/references/lead-judgment.md +39 -0
  87. package/bundled-skills/skills/peak/references/interrogate/references/reviewer-prompt.md +62 -0
  88. package/bundled-skills/skills/peak/references/interrogate/references/rubric.md +77 -0
  89. package/bundled-skills/skills/peak/references/ketchup/SKILL.md +45 -0
  90. package/bundled-skills/skills/peak/references/maintain-formal-verification-skill/SKILL.md +60 -0
  91. package/bundled-skills/skills/peak/references/maintain-verification-skill/SKILL.md +41 -0
  92. package/bundled-skills/skills/peak/references/no-comments/SKILL.md +26 -0
  93. package/bundled-skills/skills/peak/references/no-mistakes/SKILL.md +20 -0
  94. package/bundled-skills/skills/peak/references/no-mistakes/upstream/SKILL.md +394 -0
  95. package/bundled-skills/skills/peak/references/peak-setup/SKILL.md +18 -0
  96. package/bundled-skills/skills/peak/references/poteto-help/SKILL.md +16 -0
  97. package/bundled-skills/skills/peak/references/poteto-help/references/prompting.md +51 -0
  98. package/bundled-skills/skills/peak/references/poteto-help/references/recipes.md +51 -0
  99. package/bundled-skills/skills/peak/references/principle-attack-the-premise/SKILL.md +23 -0
  100. package/bundled-skills/skills/peak/references/principle-boundary-discipline/SKILL.md +36 -0
  101. package/bundled-skills/skills/peak/references/principle-build-the-lever/SKILL.md +25 -0
  102. package/bundled-skills/skills/peak/references/principle-encode-lessons-in-structure/SKILL.md +13 -0
  103. package/bundled-skills/skills/peak/references/principle-exhaust-the-design-space/SKILL.md +11 -0
  104. package/bundled-skills/skills/peak/references/principle-experience-first/SKILL.md +21 -0
  105. package/bundled-skills/skills/peak/references/principle-explain-the-number/SKILL.md +19 -0
  106. package/bundled-skills/skills/peak/references/principle-fix-root-causes/SKILL.md +23 -0
  107. package/bundled-skills/skills/peak/references/principle-foundational-thinking/SKILL.md +23 -0
  108. package/bundled-skills/skills/peak/references/principle-guard-the-context-window/SKILL.md +14 -0
  109. package/bundled-skills/skills/peak/references/principle-laziness-protocol/SKILL.md +12 -0
  110. package/bundled-skills/skills/peak/references/principle-make-operations-idempotent/SKILL.md +24 -0
  111. package/bundled-skills/skills/peak/references/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +16 -0
  112. package/bundled-skills/skills/peak/references/principle-minimize-reader-load/SKILL.md +20 -0
  113. package/bundled-skills/skills/peak/references/principle-model-the-domain/SKILL.md +26 -0
  114. package/bundled-skills/skills/peak/references/principle-never-block-on-the-human/SKILL.md +17 -0
  115. package/bundled-skills/skills/peak/references/principle-outcome-oriented-execution/SKILL.md +23 -0
  116. package/bundled-skills/skills/peak/references/principle-prove-it-works/SKILL.md +24 -0
  117. package/bundled-skills/skills/peak/references/principle-redesign-from-first-principles/SKILL.md +18 -0
  118. package/bundled-skills/skills/peak/references/principle-separate-before-serializing-shared-state/SKILL.md +18 -0
  119. package/bundled-skills/skills/peak/references/principle-sequence-verifiable-units/SKILL.md +19 -0
  120. package/bundled-skills/skills/peak/references/principle-subtract-before-you-add/SKILL.md +20 -0
  121. package/bundled-skills/skills/peak/references/principle-test-behavior-not-implementation/SKILL.md +22 -0
  122. package/bundled-skills/skills/peak/references/principle-type-system-discipline/SKILL.md +15 -0
  123. package/bundled-skills/skills/peak/references/raga-runtime/SKILL.md +37 -0
  124. package/bundled-skills/skills/peak/references/raga-runtime/managed-tools.mjs +34 -0
  125. package/bundled-skills/skills/peak/references/raga-runtime/raga_runtime.py +44 -0
  126. package/bundled-skills/skills/peak/references/recall/SKILL.md +37 -0
  127. package/bundled-skills/skills/peak/references/reflect/SKILL.md +63 -0
  128. package/bundled-skills/skills/peak/references/reflect/references/divergent-reviewer.md +38 -0
  129. package/bundled-skills/skills/peak/references/reflect/references/judgment-reviewer.md +37 -0
  130. package/bundled-skills/skills/peak/references/reflect/references/synthesizer.md +56 -0
  131. package/bundled-skills/skills/peak/references/reflect/references/tooling-reviewer.md +48 -0
  132. package/bundled-skills/skills/peak/references/reviewer-triage.md +142 -0
  133. package/bundled-skills/skills/peak/references/sharpen/SKILL.md +18 -0
  134. package/bundled-skills/skills/peak/references/show-me-your-work/SKILL.md +84 -0
  135. package/bundled-skills/skills/peak/references/show-me-your-work/references/decision-log-template.tsv +1 -0
  136. package/bundled-skills/skills/peak/references/show-me-your-work/scripts/log.sh +42 -0
  137. package/bundled-skills/skills/peak/references/statechart/SKILL.md +38 -0
  138. package/bundled-skills/skills/peak/references/statechart/scripts/chart-to-tla.mjs +236 -0
  139. package/bundled-skills/skills/peak/references/statechart/scripts/compare-charts.mjs +104 -0
  140. package/bundled-skills/skills/peak/references/statechart/scripts/lib.mjs +725 -0
  141. package/bundled-skills/skills/peak/references/statechart/scripts/model/OutputFolder.cfg +6 -0
  142. package/bundled-skills/skills/peak/references/statechart/scripts/model/OutputFolder.map.mjs +106 -0
  143. package/bundled-skills/skills/peak/references/statechart/scripts/model/OutputFolder.tla +176 -0
  144. package/bundled-skills/skills/peak/references/statechart/scripts/statechart.mjs +749 -0
  145. package/bundled-skills/skills/peak/references/statechart/scripts/test/statechart.test.mjs +2790 -0
  146. package/bundled-skills/skills/peak/references/statechart/scripts/test/sync.mmd +19 -0
  147. package/bundled-skills/skills/peak/references/statechart/scripts/test/upload.mmd +16 -0
  148. package/bundled-skills/skills/peak/references/statechart/scripts/tlc-to-chart.mjs +1347 -0
  149. package/bundled-skills/skills/peak/references/swarm/SKILL.md +43 -0
  150. package/bundled-skills/skills/peak/references/tdd/SKILL.md +44 -0
  151. package/bundled-skills/skills/peak/references/teach/SKILL.md +23 -0
  152. package/bundled-skills/skills/peak/references/technical-writing/SKILL.md +108 -0
  153. package/bundled-skills/skills/peak/references/typescript-best-practices/SKILL.md +33 -0
  154. package/bundled-skills/skills/peak/references/typescript-best-practices/references/patterns.md +328 -0
  155. package/bundled-skills/skills/peak/references/unslop/SKILL.md +64 -0
  156. package/bundled-skills/skills/peak/references/verify-this/SKILL.md +76 -0
  157. package/bundled-skills/skills/peak/references/why/SKILL.md +100 -0
  158. package/bundled-skills/skills/peak/references/why/references/epistemics.md +71 -0
  159. package/bundled-skills/skills/peak/references/why/references/investigator-prompt.md +84 -0
  160. package/bundled-skills/skills/peak/references/why/references/source-playbook.md +17 -0
  161. package/bundled-skills/skills/peak/references/why/references/sources/code-archaeology.md +51 -0
  162. package/bundled-skills/skills/peak/references/why/references/sources/databricks.md +70 -0
  163. package/bundled-skills/skills/peak/references/why/references/sources/datadog.md +97 -0
  164. package/bundled-skills/skills/peak/references/why/references/sources/incident-postmortem.md +5 -0
  165. package/bundled-skills/skills/peak/references/why/references/sources/linear.md +48 -0
  166. package/bundled-skills/skills/peak/references/why/references/sources/notion.md +55 -0
  167. package/bundled-skills/skills/peak/references/why/references/sources/sentry.md +66 -0
  168. package/bundled-skills/skills/peak/references/why/references/sources/slack.md +17 -0
  169. package/bundled-skills/skills/peak/references/why/references/synthesizer-prompt.md +129 -0
  170. package/bundled-skills/skills/peak/scripts/check-plan.mjs +205 -0
  171. package/bundled-skills/skills/peak/scripts/check-plan.test.ts +96 -0
  172. package/bundled-skills/skills/peak/scripts/orch/orch.test.ts +761 -0
  173. package/bundled-skills/skills/peak/scripts/orch/orch.ts +588 -0
  174. package/bundled-skills/skills/peak/scripts/orch/store.ts +1676 -0
  175. package/bundled-skills/skills/peak/scripts/vendor/commander/LICENSE +22 -0
  176. package/bundled-skills/skills/peak/scripts/vendor/commander/esm.mjs +16 -0
  177. package/bundled-skills/skills/peak/scripts/vendor/commander/index.js +24 -0
  178. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/argument.js +149 -0
  179. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/command.js +2778 -0
  180. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/error.js +39 -0
  181. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/help.js +747 -0
  182. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/option.js +379 -0
  183. package/bundled-skills/skills/peak/scripts/vendor/commander/lib/suggestSimilar.js +101 -0
  184. package/bundled-skills/skills/peak/scripts/vendor/commander/package.json +1 -0
  185. package/bundled-skills/skills/peak/scripts/vendor/commander/typings/esm.d.mts +3 -0
  186. package/bundled-skills/skills/peak/scripts/vendor/commander/typings/index.d.ts +1113 -0
  187. package/bundled-skills/skills/peak/scripts/watch-pr/cli.test.ts +224 -0
  188. package/bundled-skills/skills/peak/scripts/watch-pr/cli.ts +223 -0
  189. package/bundled-skills/skills/peak/scripts/watch-pr/fakes.test-helper.ts +129 -0
  190. package/bundled-skills/skills/peak/scripts/watch-pr/github.test.ts +436 -0
  191. package/bundled-skills/skills/peak/scripts/watch-pr/github.ts +718 -0
  192. package/bundled-skills/skills/peak/scripts/watch-pr/policy.test.ts +420 -0
  193. package/bundled-skills/skills/peak/scripts/watch-pr/policy.ts +836 -0
  194. package/bundled-skills/skills/peak/scripts/watch-pr/render.ts +169 -0
  195. package/bundled-skills/skills/peak/scripts/watch-pr/tsconfig.json +13 -0
  196. package/bundled-skills/skills/peak/scripts/watch-pr/types.compile.ts +93 -0
  197. package/bundled-skills/skills/peak/scripts/watch-pr/types.ts +413 -0
  198. package/bundled-skills/skills/peak/scripts/watch-pr/watch-pr +4 -0
  199. package/bundled-skills/skills/peak/scripts/worktree-audit.sh +4 -0
  200. package/dist/bundle/chunks/anthropic-messages-BMDYDGHW.js +6 -0
  201. package/dist/bundle/chunks/anthropic.js +75 -0
  202. package/dist/bundle/chunks/azure-openai-responses-Q7EZTEHK.js +2 -0
  203. package/dist/bundle/chunks/bedrock-converse-stream.js +86 -0
  204. package/dist/bundle/chunks/chunk-3EGDWOKT.js +2 -0
  205. package/dist/bundle/chunks/chunk-3V45WARH.js +7 -0
  206. package/dist/bundle/chunks/chunk-5AGIVGSV.js +6 -0
  207. package/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
  208. package/dist/bundle/chunks/chunk-7CBJINYJ.js +20 -0
  209. package/dist/bundle/chunks/chunk-7DDKXS2Q.js +2 -0
  210. package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
  211. package/dist/bundle/chunks/chunk-AI2NMHE7.js +1567 -0
  212. package/dist/bundle/chunks/chunk-C4IJNE7U.js +2 -0
  213. package/dist/bundle/chunks/chunk-CF5GWZHW.js +31 -0
  214. package/dist/bundle/chunks/chunk-G54UBZTF.js +44 -0
  215. package/dist/bundle/chunks/chunk-H76KZMOI.js +2 -0
  216. package/dist/bundle/chunks/chunk-IOPE2TJ4.js +131 -0
  217. package/dist/bundle/chunks/chunk-IXDQLPKS.js +11 -0
  218. package/dist/bundle/chunks/chunk-J22MF7YW.js +64 -0
  219. package/dist/bundle/chunks/chunk-JLV25LHE.js +2 -0
  220. package/dist/bundle/chunks/chunk-JXWJOIH4.js +2 -0
  221. package/dist/bundle/chunks/chunk-KNY3PXQI.js +2 -0
  222. package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
  223. package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  224. package/dist/bundle/chunks/chunk-LVVZS2NO.js +12 -0
  225. package/dist/bundle/chunks/chunk-LX24DVQ5.js +2 -0
  226. package/dist/bundle/chunks/chunk-P2QCWBFM.js +9 -0
  227. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  228. package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
  229. package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
  230. package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
  231. package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
  232. package/dist/bundle/chunks/chunk-Q4U25BSY.js +2 -0
  233. package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  234. package/dist/bundle/chunks/chunk-RFPFZTK2.js +7 -0
  235. package/dist/bundle/chunks/chunk-RP2WKNT7.js +4 -0
  236. package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
  237. package/dist/bundle/chunks/chunk-TMTOQ7H7.js +2 -0
  238. package/dist/bundle/chunks/chunk-UDT647VB.js +82 -0
  239. package/dist/bundle/chunks/chunk-UKVNB6C4.js +2 -0
  240. package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
  241. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
  242. package/dist/bundle/chunks/chunk-WJGLPWUE.js +16 -0
  243. package/dist/bundle/chunks/chunk-YMZUNB25.js +2 -0
  244. package/dist/bundle/chunks/cli-4P6FVVLT.js +51 -0
  245. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-S6CT2FXS.js +2 -0
  246. package/dist/bundle/chunks/codemode-worker.js +478 -0
  247. package/dist/bundle/chunks/easter-egg-3d-65VIC4G2.js +2 -0
  248. package/dist/bundle/chunks/execute-3H5WKMA3.js +505 -0
  249. package/dist/bundle/chunks/github-copilot.js +2 -0
  250. package/dist/bundle/chunks/google-generative-ai-35NZKG6S.js +2 -0
  251. package/dist/bundle/chunks/google-vertex-P33AHYYX.js +2 -0
  252. package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
  253. package/dist/bundle/chunks/image-resize-worker.js +2 -0
  254. package/dist/bundle/chunks/jiti-loader-GL4HJFAD.js +21 -0
  255. package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +2 -0
  256. package/dist/bundle/chunks/kimi-coding.js +2 -0
  257. package/dist/bundle/chunks/lib-4AVRLBHM.js +9 -0
  258. package/dist/bundle/chunks/llama-cpp-classify-U4EH6TAM.js +22 -0
  259. package/dist/bundle/chunks/meta.js +2 -0
  260. package/dist/bundle/chunks/mistral-conversations-J62DPS2P.js +5 -0
  261. package/dist/bundle/chunks/multipart-parser-FMGQ7342.js +3 -0
  262. package/dist/bundle/chunks/node-AUOGOBCN.js +2 -0
  263. package/dist/bundle/chunks/node-KCMANYC2.js +16 -0
  264. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  265. package/dist/bundle/chunks/openai-codex-responses-4HXATL2M.js +10 -0
  266. package/dist/bundle/chunks/openai-codex.js +75 -0
  267. package/dist/bundle/chunks/openai-completions-75YYY35N.js +7 -0
  268. package/dist/bundle/chunks/openai-decisions-HEBEVGA2.js +5 -0
  269. package/dist/bundle/chunks/openai-responses-UWNAKTBV.js +4 -0
  270. package/dist/bundle/chunks/openrouter-images-HVOPXKHS.js +2 -0
  271. package/dist/bundle/chunks/openrouter.js +75 -0
  272. package/dist/bundle/chunks/pi-messages-DG7CALOV.js +8 -0
  273. package/dist/bundle/chunks/radius.js +75 -0
  274. package/dist/bundle/chunks/runtime-435R6IKY.js +2 -0
  275. package/dist/bundle/chunks/src-QKGKDFSU.js +4 -0
  276. package/dist/bundle/chunks/typesafe-system-one-24HEGHNN.js +2 -0
  277. package/dist/bundle/chunks/virtual-modules-U3JBUDP7.js +2 -0
  278. package/dist/bundle/chunks/xai.js +2 -0
  279. package/dist/bundle/cli-runtime.js +3 -0
  280. package/dist/bundle/cli.js +5 -0
  281. package/dist/bundle/index.js +2 -0
  282. package/dist/bundle/raga-runtime.js +3 -0
  283. package/dist/bundle/raga.js +5 -0
  284. package/dist/bundle/rpc-entry.js +3 -0
  285. package/dist/core/export-html/template.css +1085 -0
  286. package/dist/core/export-html/template.html +56 -0
  287. package/dist/core/export-html/template.js +2044 -0
  288. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  289. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  290. package/dist/core/export-html/vendor/marked.min.js +79 -0
  291. package/dist/modes/interactive/assets/clankolas.png +0 -0
  292. package/dist/modes/interactive/theme/dark.json +78 -0
  293. package/dist/modes/interactive/theme/light.json +78 -0
  294. package/docs/cli-integration.md +106 -0
  295. package/docs/cli.md +337 -0
  296. package/docs/codemode.md +230 -0
  297. package/docs/compaction.md +463 -0
  298. package/docs/configuration.md +62 -0
  299. package/docs/containerization.md +183 -0
  300. package/docs/custom-provider.md +227 -0
  301. package/docs/docs.json +220 -0
  302. package/docs/environment-variables.md +101 -0
  303. package/docs/extensions.md +400 -0
  304. package/docs/how-pi-works.md +49 -0
  305. package/docs/images/doom-extension.png +0 -0
  306. package/docs/images/exy.png +0 -0
  307. package/docs/images/interactive-mode.png +0 -0
  308. package/docs/images/tree-view.png +0 -0
  309. package/docs/index.md +39 -0
  310. package/docs/json.md +226 -0
  311. package/docs/keybindings.md +195 -0
  312. package/docs/llama-cpp.md +121 -0
  313. package/docs/mcp.md +272 -0
  314. package/docs/message-types.md +279 -0
  315. package/docs/models-configuration.md +196 -0
  316. package/docs/models.md +225 -0
  317. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  318. package/docs/packages.md +129 -0
  319. package/docs/prompt-templates.md +59 -0
  320. package/docs/providers.md +247 -0
  321. package/docs/quickstart.md +136 -0
  322. package/docs/rpc-commands.md +860 -0
  323. package/docs/rpc-extension-ui.md +200 -0
  324. package/docs/rpc.md +193 -0
  325. package/docs/sdk.md +148 -0
  326. package/docs/security.md +99 -0
  327. package/docs/session-format.md +293 -0
  328. package/docs/sessions.md +66 -0
  329. package/docs/settings.md +184 -0
  330. package/docs/shell-aliases.md +93 -0
  331. package/docs/skills.md +93 -0
  332. package/docs/slash-commands.md +61 -0
  333. package/docs/terminal-setup.md +233 -0
  334. package/docs/termux.md +117 -0
  335. package/docs/themes.md +138 -0
  336. package/docs/tmux.md +55 -0
  337. package/docs/tui.md +195 -0
  338. package/docs/usage.md +94 -0
  339. package/docs/virtual-models.md +114 -0
  340. package/docs/windows.md +81 -0
  341. package/examples/README.md +36 -0
  342. package/examples/extensions/README.md +214 -0
  343. package/examples/extensions/auto-commit-on-exit.ts +49 -0
  344. package/examples/extensions/bash-spawn-hook.ts +30 -0
  345. package/examples/extensions/bookmark.ts +50 -0
  346. package/examples/extensions/border-status-editor.ts +150 -0
  347. package/examples/extensions/built-in-tool-renderer.ts +225 -0
  348. package/examples/extensions/claude-rules.ts +86 -0
  349. package/examples/extensions/commands.ts +72 -0
  350. package/examples/extensions/confirm-destructive.ts +59 -0
  351. package/examples/extensions/custom-compaction.ts +117 -0
  352. package/examples/extensions/custom-footer.ts +64 -0
  353. package/examples/extensions/custom-header.ts +73 -0
  354. package/examples/extensions/custom-provider-anthropic/index.ts +617 -0
  355. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  356. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  357. package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
  358. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  359. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  360. package/examples/extensions/debug-provider.ts +90 -0
  361. package/examples/extensions/dirty-repo-guard.ts +56 -0
  362. package/examples/extensions/doom-overlay/README.md +46 -0
  363. package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  364. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  365. package/examples/extensions/doom-overlay/doom/build.sh +152 -0
  366. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  367. package/examples/extensions/doom-overlay/doom-component.ts +132 -0
  368. package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  369. package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  370. package/examples/extensions/doom-overlay/index.ts +74 -0
  371. package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  372. package/examples/extensions/dynamic-resources/SKILL.md +8 -0
  373. package/examples/extensions/dynamic-resources/dynamic.json +81 -0
  374. package/examples/extensions/dynamic-resources/dynamic.md +5 -0
  375. package/examples/extensions/dynamic-resources/index.ts +15 -0
  376. package/examples/extensions/dynamic-tools.ts +74 -0
  377. package/examples/extensions/entry-renderer.ts +41 -0
  378. package/examples/extensions/event-bus.ts +43 -0
  379. package/examples/extensions/file-trigger.ts +41 -0
  380. package/examples/extensions/git-checkpoint.ts +53 -0
  381. package/examples/extensions/git-merge-and-resolve.ts +115 -0
  382. package/examples/extensions/github-issue-autocomplete.ts +185 -0
  383. package/examples/extensions/gondolin/index.ts +531 -0
  384. package/examples/extensions/gondolin/package-lock.json +175 -0
  385. package/examples/extensions/gondolin/package.json +19 -0
  386. package/examples/extensions/handoff.ts +190 -0
  387. package/examples/extensions/hello.ts +26 -0
  388. package/examples/extensions/hidden-thinking-label.ts +53 -0
  389. package/examples/extensions/inline-bash.ts +94 -0
  390. package/examples/extensions/input-transform-streaming.ts +39 -0
  391. package/examples/extensions/input-transform.ts +43 -0
  392. package/examples/extensions/interactive-shell.ts +196 -0
  393. package/examples/extensions/jev-router.ts +113 -0
  394. package/examples/extensions/mac-system-theme.ts +47 -0
  395. package/examples/extensions/message-renderer.ts +59 -0
  396. package/examples/extensions/minimal-mode.ts +353 -0
  397. package/examples/extensions/modal-editor.ts +85 -0
  398. package/examples/extensions/model-status.ts +31 -0
  399. package/examples/extensions/notify.ts +57 -0
  400. package/examples/extensions/overlay-qa-tests.ts +1450 -0
  401. package/examples/extensions/overlay-test.ts +153 -0
  402. package/examples/extensions/permission-gate.ts +34 -0
  403. package/examples/extensions/pirate.ts +47 -0
  404. package/examples/extensions/plan-mode/README.md +66 -0
  405. package/examples/extensions/plan-mode/index.ts +394 -0
  406. package/examples/extensions/plan-mode/utils.ts +168 -0
  407. package/examples/extensions/preset.ts +436 -0
  408. package/examples/extensions/project-trust.ts +64 -0
  409. package/examples/extensions/prompt-customizer.ts +49 -0
  410. package/examples/extensions/protected-paths.ts +30 -0
  411. package/examples/extensions/provider-payload.ts +18 -0
  412. package/examples/extensions/qna.ts +118 -0
  413. package/examples/extensions/question.ts +286 -0
  414. package/examples/extensions/questionnaire.ts +448 -0
  415. package/examples/extensions/rainbow-editor.ts +88 -0
  416. package/examples/extensions/reload-runtime.ts +37 -0
  417. package/examples/extensions/rpc-demo.ts +118 -0
  418. package/examples/extensions/sandbox/index.ts +326 -0
  419. package/examples/extensions/sandbox/package-lock.json +92 -0
  420. package/examples/extensions/sandbox/package.json +19 -0
  421. package/examples/extensions/send-user-message.ts +97 -0
  422. package/examples/extensions/session-name.ts +27 -0
  423. package/examples/extensions/shutdown-command.ts +63 -0
  424. package/examples/extensions/snake.ts +343 -0
  425. package/examples/extensions/space-invaders.ts +560 -0
  426. package/examples/extensions/ssh.ts +220 -0
  427. package/examples/extensions/status-line.ts +32 -0
  428. package/examples/extensions/structured-output.ts +65 -0
  429. package/examples/extensions/subagent/README.md +177 -0
  430. package/examples/extensions/subagent/agents/planner.md +37 -0
  431. package/examples/extensions/subagent/agents/reviewer.md +35 -0
  432. package/examples/extensions/subagent/agents/scout.md +50 -0
  433. package/examples/extensions/subagent/agents/worker.md +24 -0
  434. package/examples/extensions/subagent/agents.ts +157 -0
  435. package/examples/extensions/subagent/index.ts +1038 -0
  436. package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  437. package/examples/extensions/subagent/prompts/implement.md +10 -0
  438. package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  439. package/examples/extensions/summarize.ts +199 -0
  440. package/examples/extensions/system-prompt-header.ts +17 -0
  441. package/examples/extensions/tic-tac-toe.ts +1008 -0
  442. package/examples/extensions/timed-confirm.ts +70 -0
  443. package/examples/extensions/titlebar-spinner.ts +58 -0
  444. package/examples/extensions/todo.ts +297 -0
  445. package/examples/extensions/tool-override.ts +144 -0
  446. package/examples/extensions/tools.ts +146 -0
  447. package/examples/extensions/trigger-compact.ts +50 -0
  448. package/examples/extensions/truncated-tool.ts +195 -0
  449. package/examples/extensions/widget-placement.ts +9 -0
  450. package/examples/extensions/with-deps/index.ts +32 -0
  451. package/examples/extensions/with-deps/package-lock.json +31 -0
  452. package/examples/extensions/with-deps/package.json +22 -0
  453. package/examples/extensions/working-indicator.ts +123 -0
  454. package/examples/extensions/working-message-test.ts +25 -0
  455. package/examples/rpc-client.ts +35 -0
  456. package/examples/rpc-extension-ui.ts +661 -0
  457. package/examples/sdk/01-minimal.ts +26 -0
  458. package/examples/sdk/02-custom-model.ts +49 -0
  459. package/examples/sdk/03-custom-prompt.ts +75 -0
  460. package/examples/sdk/04-skills.ts +55 -0
  461. package/examples/sdk/05-tools.ts +48 -0
  462. package/examples/sdk/06-extensions.ts +99 -0
  463. package/examples/sdk/07-context-files.ts +47 -0
  464. package/examples/sdk/08-prompt-templates.ts +51 -0
  465. package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  466. package/examples/sdk/10-settings.ts +53 -0
  467. package/examples/sdk/11-sessions.ts +52 -0
  468. package/examples/sdk/12-full-control.ts +74 -0
  469. package/examples/sdk/13-session-runtime.ts +67 -0
  470. package/examples/sdk/14-codemode-mcp.ts +61 -0
  471. package/examples/sdk/README.md +141 -0
  472. package/package.json +21 -5
  473. package/python/raga_rlm/__init__.py +336 -0
  474. package/python/raga_rlm/repl.py +920 -0
  475. package/schemas/keybindings.schema.json +393 -0
  476. package/schemas/models.schema.json +1211 -0
  477. package/schemas/settings.schema.json +815 -0
  478. package/schemas/theme.schema.json +365 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: principle-encode-lessons-in-structure
3
+ description: "Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Encode Lessons in Structure
10
+
11
+ If the lesson needs judgment and cannot be encoded, make the instruction more prominent and add an example of the failure mode.
12
+
13
+ **Corollary:** If the fix is structural, only use the structural fix. The instruction is the symptom.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: principle-exhaust-the-design-space
3
+ description: "Apply when facing a novel UI interaction or architectural decision with no precedent in the codebase. Build 2-3 competing prototypes and compare side by side before committing."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Exhaust the Design Space
10
+
11
+ It also applies to product design decisions where user experience depends on feel, not logic.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: principle-experience-first
3
+ description: "Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Experience First
10
+
11
+ When implementation convenience conflicts with user delight, choose delight.
12
+
13
+ - Every feature, control, and option must be justified
14
+ - Ship less, ship better (polished experience with three features beats rough one with ten)
15
+ - Prototype before committing (design decisions are cheaper in throwaway HTML than production code)
16
+ - Get the details right (transitions, alignment, spacing, feedback, error states)
17
+ - Tighten the core loop (every feature should serve the central workflow or get out of the way)
18
+
19
+ The user is whoever consumes the work. For a UI that is the end user. For a library or an internal API it is the colleague who imports it. The engineer who maintains the code next is a user too. Weigh their experience the same way, and explain impact from their perspective.
20
+
21
+ Foundations should serve the experience. Foundational thinking governs the *sequence* of work. This principle governs the *target*.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: principle-explain-the-number
3
+ description: "Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Explain the Number
10
+
11
+ - **Ask "why not double?"** Name the resource or code path that bounds the result, such as a core, a lock, the disk, the network, or the load generator itself. Get it from a profile or from system counters taken during a run, then map it to source. A guess from reading the code is not a limiter. If you cannot say why the number is not twice as good, you do not know what you measured.
12
+ - **List what else the number could be measuring, and rule out each one with evidence.** The usual suspects are errors, skipped or cached work, code that never ran, an untuned side (one left on default settings), noise, and a piece too small to matter end to end.
13
+ - **Keep the evidence with the number.** Put the run count, the spread, and the limiter in the notes or a linked artifact.
14
+
15
+ For a performance number, run the full procedure with the [benchmark-checklist](../benchmark-checklist/SKILL.md) skill. For an eval result, ask the same of the trials: did every run do the task, does the gap hold across trials and models, and does the scenario matter.
16
+
17
+ You skipped this when the evidence behind a number has no run count, no spread, or no named limiter, or when the time saved is larger than the time the changed piece took.
18
+
19
+ Distinct from [Prove It Works](../principle-prove-it-works/SKILL.md), which checks that an output is real.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: principle-fix-root-causes
3
+ description: "Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Fix Root Causes
10
+
11
+ When debugging, fix the fault, not the place where it surfaced. The symptom is where a wrong state became visible. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.
12
+
13
+ **Why:** A symptom fix hides the evidence and leaves the fault free to surface somewhere else. Each one makes the system harder to reason about, because the code now carries a workaround for a bug that nobody named.
14
+
15
+ **Pattern:**
16
+ - Reproduce first.
17
+ - Ask "why" at each step until the answer is a wrong decision in the code, not a consequence of an earlier one.
18
+ - When stuck, instrument. Read the actual error and the actual state. Do not guess.
19
+ - Ask whether the state that triggered the symptom is legitimate. If the system may be in that state, the code that broke on it is the root cause, and handling the state there is the fix. If the state should never exist, a check where it broke hides the bug. Find what produced the state. Guards, retries, swallowed errors, clamped values, and discarded state are the usual ways to hide a bug.
20
+ - When something fails only after a restart, suspect persisted state first: config files, caches, lock files, serialized state.
21
+ - Check for the pattern, not just the instance. Find every place with the same fault and fix them all.
22
+ - If a workaround needs a paragraph-long comment to justify it, the code is wrong. Fix the code, not the comment.
23
+ - If the deciding fact took a deep dig to find, propose the cheap, always-on signal that would have shown it at first look.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: principle-foundational-thinking
3
+ description: "Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Foundational Thinking
10
+
11
+ **Structural decisions** protect option value. **Code-level decisions** protect simplicity.
12
+
13
+ **Data structures first.** Get the data shape right before writing logic. Define core types early, trace every access pattern, and choose structures that match the dominant paths.
14
+
15
+ At code level, DRY the structure, not every line. Types and data models should converge. Three similar statements still beat a premature abstraction. Prefer explicit over clever. Test behavior and edge cases, not line counts.
16
+
17
+ **Concurrency corollary.** Before sharing state between actors, ask "what happens if another actor modifies this concurrently?" If not "nothing", isolate.
18
+
19
+ **Scaffold first.** If something helps every later phase, do it first. Ask "does every subsequent phase benefit from this existing?" CI, linting, test infrastructure, and shared types are scaffold. Sequence for option value: setup before features, tests before fixes. Keep commits small and single-purpose.
20
+
21
+ Each increment should land a coherent abstraction or deepen one that exists. Do not spread a new capability across callers as special-case coordination.
22
+
23
+ Subtraction comes before scaffolding. Remove dead code first, then lay foundations.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: principle-guard-the-context-window
3
+ description: "Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Guard the Context Window
10
+
11
+ **Why:** Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.
12
+
13
+ **Pattern:**
14
+ - **Size phases and cap scope.** Limit files per phase, set turn budgets, account for mechanism costs.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: principle-laziness-protocol
3
+ description: "Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Laziness Protocol
10
+
11
+ - **Consolidate decisions.** Do not repeat the same choice in several places. Put it behind one source of truth and pass the result as a simple flag.
12
+ - **Minimize the diff.** Make the smallest change that solves the problem. Fewer lines beat "elegant" boilerplate.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: principle-make-operations-idempotent
3
+ description: "Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Make Operations Idempotent
10
+
11
+ Design operations so they converge to the correct state regardless of how many times they run or where the previous run stopped. Every state-mutating operation should answer: "What happens if this runs twice? What happens if the previous run crashed halfway?"
12
+
13
+ **Why:** Commands, lifecycle operations, and processing loops run where crashes, restarts, and retries are normal. If partial state changes the next run's outcome, every restart becomes a debugging session.
14
+
15
+ **The idea:** derive each step from the state that exists, not from what the previous run meant to do. Read the current state, compare it to the goal, and apply only the difference. A step written this way is safe to repeat, because a repeat finds nothing left to do.
16
+
17
+ Anything a run leaves behind, such as a lock, a temporary file, a half-written record, or a claimed job, must be recognizable as stale by the next run. Judge staleness by evidence that stays true wherever the previous run could have stopped, not only in the common case. A marker that the next run cannot judge turns every crash into manual cleanup. For example, write to a temporary path and rename it into place, or compare artifacts by content instead of by creation order.
18
+
19
+ **The test:**
20
+ 1. What happens if this runs twice in a row?
21
+ 2. What happens if the previous run crashed at every possible point?
22
+ 3. Does re-execution converge to the same end state?
23
+
24
+ If any answer is "it depends on what state was left behind," the operation needs a reconciliation step.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: principle-migrate-callers-then-delete-legacy-apis
3
+ description: "Apply when introducing a new internal API while old callers still exist. Migrate callers and delete the old API in the same wave instead of preserving compatibility layers."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Migrate Callers Then Delete Legacy APIs
10
+
11
+ - Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details
12
+
13
+ **When this applies:**
14
+ - No external users depend on backward compatibility
15
+ - The project can absorb coordinated breaking changes
16
+ - The new API is part of a simplification or refactor initiative
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: principle-minimize-reader-load
3
+ description: "Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Minimize Reader Load
10
+
11
+ Maintainability is the work a reader must do to understand code. Track two axes: **layers to trace** (indirections between the question and the answer) and **state to hold** (hidden or mutable context the reader must keep in their head). LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of [Guard the Context Window](../principle-guard-the-context-window/SKILL.md). Working memory is finite for readers too.
12
+
13
+ - **Collapse layers** that cost more than they save: wrappers with one caller, adapters with no second implementation, speculative indirection that was never needed. Inline them.
14
+ - **Make adjacent layers change the abstraction.** A layer that repeats the same methods and arguments adds reader load without compression. Collapse pass-through layers.
15
+ - **Demand interface compression.** A broad interface that hides little complexity makes readers learn both the surface and the implementation. Prefer boundaries that hide meaningful decisions.
16
+ - **Shrink state scope:** prefer pure functions (returns over mutations), locals over fields, fields over module state, and module state over globals. Derive instead of sync.
17
+ - **Name the invariant at the boundary,** not in every consumer, so the reader learns it once.
18
+ - Before adding a layer or a piece of state, ask: does it reduce reader load elsewhere by at least as much?
19
+
20
+ **The test:** can a new reader answer "where does X come from?" and "what can change X?" in under 30 seconds? If not, cut layers or cut state.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: principle-model-the-domain
3
+ description: "Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Model the Domain
10
+
11
+ Encode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.
12
+
13
+ Reach for:
14
+
15
+ - A state machine instead of scattered booleans, phases, or lifecycle checks.
16
+ - A typed model instead of loose parameters or repeated shape assumptions.
17
+ - A map, registry, lookup table, or discriminated union instead of branching spread across files.
18
+ - A reducer or command/event model instead of ad hoc state mutations.
19
+ - A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.
20
+ - A small module boundary that gathers repeated behavior, ownership, or invariants.
21
+ - A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.
22
+ - Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.
23
+
24
+ Do not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.
25
+
26
+ The sign that you skipped this is a new feature that grows an existing if/else chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: principle-never-block-on-the-human
3
+ description: "Apply when tempted to ask 'should I do X?' on reversible work."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Never Block on the Human
10
+
11
+ The human supervises asynchronously. Agents must stay unblocked. Make reasonable decisions, proceed, and let the human course-correct after the fact. Since code changes are reversible and reviewable, a wrong decision usually costs less than blocking.
12
+
13
+ - Proceed, then present. Do the work, show the result. Don't ask "should I do X?" Do X, explain why.
14
+ - Make the system self-healing. When you notice a problem, log it and fix it in the next round.
15
+ - Irreversible actions (force-push, delete production data, send external messages) still require confirmation.
16
+ - Reversible actions (write code, edit notes, split tasks) should proceed without blocking.
17
+ - Product direction comes from the human. Execution should not block.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: principle-outcome-oriented-execution
3
+ description: "Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Outcome-Oriented Execution
10
+
11
+ Optimize for the intended, verifiable end state rather than preserving smooth intermediate states.
12
+
13
+ **Why:** Keeping every intermediate step fully stable often creates temporary compatibility code that becomes long-lived debt. Converge on the target architecture and prove correctness at explicit verification boundaries.
14
+
15
+ **Core rule:**
16
+ - Prioritize end-state integrity over transitional stability
17
+ - Intermediate breakage is acceptable when it is planned, scoped, and reversible
18
+
19
+ **Guardrails:**
20
+ - Use this for planned rewrites and migrations with explicit phase boundaries
21
+ - Declare where temporary breakage is acceptable
22
+ - Keep high-signal checks for actively touched areas while migrating
23
+ - Require full static and runtime verification at plan completion
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: principle-prove-it-works
3
+ description: "Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'"
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Prove It Works
10
+
11
+ Verify every task output by checking the real thing directly. Do not infer from proxies, self-reports, or "it compiles."
12
+
13
+ **Why:** Unverified work has unknown correctness. Indirect verification (file mtimes, output freshness, agent self-reports, cached screenshots) feels cheaper than direct observation. Acting on a wrong inference costs far more than checking the source.
14
+
15
+ Check the real thing, not a proxy:
16
+ - Check process liveness directly, not indirectly through derived state
17
+ - Read the actual value, not a cached or derived representation
18
+ - When verification fails, suspect the observation method before suspecting the system
19
+
20
+ ## Script the check when you can
21
+
22
+ The strongest proof is a deterministic script that re-runs the same comparison, not a one-time eyeball. Write the script, run it, and keep its output as an artifact a reviewer can re-run instead of trusting your word.
23
+
24
+ Keep the artifact visible for the human. Commit it only for large or complex work where the trail has to be auditable later, like a big port or migration (the **show-me-your-work** skill).
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: principle-redesign-from-first-principles
3
+ description: "Apply when integrating a new requirement into an existing design."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Redesign From First Principles
10
+
11
+ When integrating a change, don't bolt it onto the existing design. Redesign as if the requirement had been a foundational assumption from the start.
12
+
13
+ - Read all affected files and understand the current design
14
+ - Ask: "if we were writing this from scratch with this new requirement, what would we build?"
15
+ - Propagate the change through every reference: types, docs, examples, rationale sections
16
+ - Think about the whole redesign, then deliver it incrementally
17
+
18
+ This is the method for preserving option value when integrating changes into an existing design.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: principle-separate-before-serializing-shared-state
3
+ description: "Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Separate Before Serializing Shared State
10
+
11
+ When concurrent actors might share mutable state, first ask whether they need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.
12
+
13
+ **Why:** Concurrent writes to shared state create race conditions that are intermittent, hard to reproduce, and expensive to debug.
14
+
15
+ **Pattern:**
16
+ 1. **Identify shared mutable state** (files both read and write, branches both push to, APIs both define and consume).
17
+ 2. **Default: eliminate the shared write target.** Ask: do these actors need one canonical object, or are they publishing independent facts? Give each actor its own owned file, key, branch, or state directory, and merge only at the read/reporting boundary. Two workers writing their own `lastX` field into one `state.json` is still shared mutation. `indexer-state.json` + `metrics-state.json` is not.
18
+ 3. **Only when one shared write target is a real invariant, serialize access structurally** (lockfiles, sequential phases, single-writer actor, or atomic compare-and-swap). Treat "we need a lock" as a design smell to check, not as the default answer.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: principle-sequence-verifiable-units
3
+ description: "Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Sequence work into verifiable units
10
+
11
+ Order work as a sequence of small units, each ending in a state you can check, and don't advance until the current one is green.
12
+
13
+ **Why:** A break caught at the unit that caused it is cheap to localize. A break caught after a batch is buried, and you have already built further on a broken base. Sequencing those same units into a delivery a reviewer can replay turns "trust me" into "watch it go red, then green."
14
+
15
+ **Execution.** In a sweep, migration, or any run of similar edits, verify each change before starting the next. Each unit is a before/after bracket: known-good state, one change, run the check, then proceed. Rebase onto clean trunk first so every check measures against the real baseline. When a lever does the edits, the per-unit check is nearly free. Run it anyway.
16
+
17
+ **Delivery.** Stack commits and PRs in the order that proves the work. The canonical shape is the failing test first, then the fix on top. Other story orders are a subtraction before the reshape, a baseline capture before the treatment, the scaffold before the feature. Each commit lands on its own and the sequence reads as an argument.
18
+
19
+ The sequencing complement to the **prove-it-works** principle skill, which keeps each check real, and the **build-the-lever** principle skill, which makes the per-unit check cheap.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: principle-subtract-before-you-add
3
+ description: "Apply when sequencing an addition, refactor, or rewrite. Remove dead code, redundant validators, and stub references first, then build on the simpler base."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Subtract Before You Add
10
+
11
+ When evolving a system, remove complexity first, then build. Default to subtraction.
12
+
13
+ Make simplification a continual investment. Leave the design slightly simpler and more capable behind the same or smaller surface than you found it.
14
+
15
+ - Sequence removal before construction
16
+ - Cut before you polish (get to the minimum before investing in quality)
17
+ - Design for observed usage, not speculative edge cases
18
+ - No speculative validators, parsers, or guards beyond what the spec demands
19
+ - Simplify prompts (remove redundant instructions, excessive templates)
20
+ - When a reference has no novel content, delete it rather than leaving a stub
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: principle-test-behavior-not-implementation
3
+ description: "Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Test Behavior, Not Implementation
10
+
11
+ A test is a claim about what the code does for its users: a caller, an end user, or another service. Behavior is what those users can observe through the interface they use. That includes return values, errors, state they can read back, and effects on systems outside the code, such as a request sent, a row written, or a message emitted. Implementation is what they cannot observe: private helpers, internal call order, intermediate data, and which internal collaborator did the work.
12
+
13
+ Judge each test against two imagined edits:
14
+
15
+ - **Break the behavior.** Make the code return a wrong value, skip an effect, or do the effect twice. If the test still passes, it proves nothing. The usual causes are an assertion looser than the contract, an expected value computed by the code under test, a restated constant or prompt string that never runs the code that reads it, and an assertion on data that the test built itself.
16
+ - **Change the internals.** Keep every observable result the same and restructure the code underneath. If the test now fails, it is pinned to the implementation. It will need a rewrite on every refactor and still catches no bug.
17
+
18
+ Keep a test that catches the first edit and survives the second. Rewrite or delete the rest. To write a test that does both, drive the code through its users' interface with a concrete input. Derive the expected value from the requirement, not from a run of the code. Assert what the contract promises, no less and no more.
19
+
20
+ The contract decides, not the shape of the assertion. When "an empty cart never charges" is the promise, an assertion that the payment client got no call is behavior. Pair it with a case where the charge happens, so that the test shows it can see a call. The payload that a mocked external service receives is behavior, because that service observes it. A call to an internal helper is implementation, because no user can see it. An empty list is the exact answer when no record matches, and a hollow check when the test only needs some result. An exact error message pins wording that no caller reads. The error type that callers branch on is the contract.
21
+
22
+ A test can pin an invariant instead of a call, such as a key that must exist in two tables or a compile-time type check. The invariant is the behavior.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: principle-type-system-discipline
3
+ description: "Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Type System Discipline
10
+
11
+ Make the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. For TypeScript syntax, see the `typescript-best-practices` skill.
12
+
13
+ - **Brand semantic primitives.** `UserId` and `OrderId` are strings underneath but should not be interchangeable. Give each its own type, such as a branded intersection in TypeScript or a newtype elsewhere. Validate once at creation, trust the type downstream. If two arguments share a primitive type but mean different things, brand them.
14
+ - **External data is untyped until parsed.** RPC payloads, JSON, IPC messages, CLI args, config files, environment variables, database rows. Have a parse function at every boundary that turns unstructured input into the typed model. The **boundary-discipline** principle skill says where to put validation.
15
+ - **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, database migration, design-token file, or another file owns a shape, derive from it instead of hand-rolling a parallel type. See the **encode-lessons-in-structure** principle skill.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: raga-runtime
3
+ description: Native Python runtime, child specification, capability, and instance adapter for the portable engineering skills.
4
+ ---
5
+
6
+ # Native raga runtime
7
+
8
+ Use the Python tool. It owns one persistent kernel per session. Load this adapter before another bundled workflow.
9
+
10
+
11
+ `await read(path, offset=None, limit=None)` reads a file. `await write(path, content)` creates a file in the allowed workspace. `await edit(path, [(old, new)])` changes unique matching text. `await bash(command, timeout=None)` executes through the host's current sandbox. Keep large outputs in variables and print a summary.
12
+
13
+ `await context.history(offset=0, limit=None)` reads only this session's history. Use explicitly provided current-instance records for historical research. Never scan another project's home or transcripts. `await llm_query(prompt, system=None, model=None)` is a one-shot model call. `await llm_batch(prompts, system=None, model=None)` runs independent one-shot calls.
14
+
15
+ Load `raga_runtime.py` beside this skill with `exec(await read(absolute_helper_path), globals())`, then call `await run_child(spec, task, resource_root, context_data=None, model=None, max_turns=None, read_only=True, details=False)`. The resource root is the session's pinned harness path. Independent calls run with `await asyncio.gather(...)`. Writing children require `read_only=False, details=True` and receive isolated application workspaces from the supervisor. A context value is data, never a permission grant. The supervisor pins every child to the parent's harness revision.
16
+
17
+ Child specifications are in `../../../agents/`. `poteto-agent` carries the engineering style. `comment-sicko` reviews comments. `worker` handles general tasks. Model selectors are real provider/model strings from the configured registry. `None` inherits the parent. Role settings live in `agents/model-roles.json` in a candidate revision. When different review seats resolve to the same family, report that the review is not model-diverse. Do not invent aliases or silently replace a rejected model.
18
+
19
+ `answer['content']` and `answer['ready'] = True` return a child result. The native `rlm_query` API returns text by default. `details=True` returns the supervisor's workspace and change evidence. Never promise a worktree from a plain text answer.
20
+
21
+ Only the documented run_child parameters are supported. Inherited spec labels select one of the three native specifications. Tool-schema, environment, cloud branch, background, resume, effort, and file-attachment fields from other agents are not launch arguments. Read-only review does not remove ordinary sandboxed inspection tools. Configure real model selectors in agents/model-roles.json. Null inherits. A rejected selector is a prerequisite failure, never permission to choose an unapproved substitute.
22
+
23
+ Use `await instance.child_patch(workspace_id)` to collect a child's owned change and patch. Use `await instance.integrate(workspace_ids, command, args, timeout_ms=120000)` for one supervisor-owned integration workspace and combined verification after each merge. Inspect its accepted result and returned patch before applying changes to the root workspace. Do not create or remove Git worktrees from worker shell commands. Git administration is deliberately hidden. Portable prose that requests branches or worktrees means these supervisor APIs, not raw Git worktree mutation.
24
+
25
+ Use an in-process bounded loop for autonomous work. A process exit ends the loop. There is no persistent wake scheduler or editor automation service. Keep ownership records in the instance state and stop descendant processes before cleanup.
26
+
27
+ ## Candidate authoring
28
+
29
+ `await instance.info()` reports the current pin. `candidate = await instance.candidate_create()` creates an editable proposal. Read and write its allowlisted resources with `await instance.candidate_read(candidate['id'], path)` and `await instance.candidate_write(candidate['id'], path, content)`. Use `await instance.candidate_commit(candidate['id'], message)` to commit it. Ordinary model filesystem access does not expose instance state or accepted artifacts. Do not invoke management CLI commands through shell. Promotion is a user CLI operation backed by exact-revision evidence, never a model approval.
30
+
31
+ `await memory.search(query)`, `await memory.get(entry_id)`, and `await memory.observe(text, evidence)` access only this project's structured observations. Search returns observations, not an automatic proof that an earlier decision remains valid. Read the current source before reusing a lesson.
32
+
33
+ ## Capabilities and dependencies
34
+
35
+ TLC is pinned to v1.8.0 with SHA-256 d15655eeaff4b3f7b3d65c46b838bc0f35d131b2ef4b1e473689b62c98d4726f. The operator can explicitly provision it with the adjacent managed-tools.mjs into a supervisor runtime directory using provision-tla --root and --approved. Workers request this capability and cannot grant the approval themselves. Shipped statechart helpers verify the jar digest before execution. Upstream helper test fixtures require optional Bun 1.3.11; production orchestration and PR watchers run on Node.
36
+
37
+ Node 22.19.0 or newer runs the shipped operational helpers. Commander 14.0.0 and its MIT license are vendored, so helper startup never installs npm packages. `await capability_report()` checks available local commands without installing software. Terminal verification uses an existing repo harness or Python's standard pty module. Browser verification requires the repo's pinned Playwright and managed browser installation. Ask for approved setup when absent; never run an unpinned npx download. TLA+ requires a digest-verified tla2tools.jar and an approved Java runtime, supplied by the operator through TLA2TOOLS and JAVA. Mermaid PNG rendering uses a provisioned MERMAID_CLI path, never a runtime download. GitHub and other optional integrations require their explicit tools and authentication. An absent optional capability is a prerequisite report, not a successful check.
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import { createHash } from "node:crypto";
3
+ import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
4
+ import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const args = process.argv.slice(2);
8
+ const directory = args[args.indexOf("--root") + 1];
9
+ if (args[0] !== "provision-tla" || !args.includes("--approved") || !args.includes("--root") || !directory || !isAbsolute(directory)) {
10
+ throw new Error("Operator use: node managed-tools.mjs provision-tla --root <absolute supervisor runtime directory> --approved");
11
+ }
12
+ if (process.env.NO_MISTAKES_GATE || process.env.RAGA_VALIDATION_STEP) throw new Error("Nested validation agents cannot provision runtimes");
13
+ const harness = resolve(dirname(fileURLToPath(import.meta.url)), "../../..");
14
+ const root = resolve(directory);
15
+ const within = relative(harness, root);
16
+ if (!within || (!within.startsWith(".." + sep) && within !== ".." && !isAbsolute(within))) throw new Error("Runtime provisioning cannot write a pinned harness");
17
+ await mkdir(root, { recursive: true, mode: 0o700 });
18
+ const digest = "d15655eeaff4b3f7b3d65c46b838bc0f35d131b2ef4b1e473689b62c98d4726f";
19
+ const destination = join(root, "tla2tools-v1.8.0.jar");
20
+ const valid = (bytes) => createHash("sha256").update(bytes).digest("hex") === digest;
21
+ let installed = false;
22
+ try { installed = valid(await readFile(destination)); } catch (error) { if (error.code !== "ENOENT") throw error; }
23
+ if (!installed) {
24
+ const response = await fetch("https://github.com/tlaplus/tlaplus/releases/download/v1.8.0/tla2tools.jar", { signal: AbortSignal.timeout(60000) });
25
+ if (!response.ok) throw new Error("Pinned TLC download failed: " + response.status);
26
+ const bytes = Buffer.from(await response.arrayBuffer());
27
+ if (!valid(bytes)) throw new Error("Pinned TLC checksum mismatch");
28
+ const temporary = destination + "." + process.pid;
29
+ try {
30
+ await writeFile(temporary, bytes, { mode: 0o600, flag: "wx" });
31
+ await rename(temporary, destination);
32
+ } finally { await rm(temporary, { force: true }); }
33
+ }
34
+ console.log(JSON.stringify({ TLA2TOOLS: destination, version: "1.8.0", sha256: digest }));
@@ -0,0 +1,44 @@
1
+ import asyncio
2
+ import json
3
+ import os
4
+ import shlex
5
+ from pathlib import PurePosixPath
6
+
7
+ async def run_child(spec, task, resource_root, context_data=None, model=None, max_turns=None, read_only=True, details=False):
8
+ if spec not in ("worker", "poteto-agent", "comment-sicko"):
9
+ raise ValueError("Unknown bundled child specification")
10
+ if not read_only and not details:
11
+ raise ValueError("Writing children require details=True for supervisor-owned change evidence")
12
+ root = resource_root.rstrip("/")
13
+ definition = json.loads(await read(root + "/agents/" + spec + ".json"))
14
+ definition_path = PurePosixPath(definition["instructions"])
15
+ if definition_path.is_absolute() or ".." in definition_path.parts:
16
+ raise ValueError("Child instructions must stay in the pinned resource root")
17
+ instructions = await read(root + "/" + definition["instructions"])
18
+ for name in definition["skills"]:
19
+ path = root + ("/skills/peak/SKILL.md" if name == "peak" else "/skills/peak/references/" + name + "/SKILL.md")
20
+ instructions += "\n\n" + await read(path)
21
+ roles = json.loads(await read(root + "/agents/model-roles.json"))
22
+ if model is None:
23
+ model = roles.get(definition["modelRole"])
24
+ prompt = instructions + "\n\nPinned resource root: " + root + "\n\n# Assignment\n" + task
25
+ return await rlm_query(prompt, context=context_data, model=model, max_turns=max_turns, read_only=read_only, details=details)
26
+
27
+ async def capability_report():
28
+ commands = {
29
+ "node": "node -e " + shlex.quote("const [major,minor]=process.versions.node.split('.').map(Number); if(major<22 || (major===22 && minor<19)) throw new Error('Node >=22.19.0 required'); console.log(process.versions.node)"),
30
+ "git": "git --version",
31
+ "terminal": "python3 -c " + shlex.quote("import pty; print('pty available')"),
32
+ "java": "java -version",
33
+ "github": "gh --version",
34
+ "browser": "node -e " + shlex.quote("const p=require('playwright'); const fs=require('node:fs'); const exe=p.chromium.executablePath(); if(!fs.existsSync(exe)) throw new Error('Approved browser provisioning required'); console.log(JSON.stringify({version:require('playwright/package.json').version,executable:exe}))"),
35
+ "mermaid": shlex.quote(os.environ.get("MERMAID_CLI", "mmdc")) + " --version",
36
+ "tla": "python3 -c " + shlex.quote("import hashlib,os,pathlib; path=os.environ.get('TLA2TOOLS'); assert path, 'Approved TLC provisioning required'; assert hashlib.sha256(pathlib.Path(path).read_bytes()).hexdigest() == 'd15655eeaff4b3f7b3d65c46b838bc0f35d131b2ef4b1e473689b62c98d4726f', 'TLC checksum mismatch'; print('TLC 1.8.0')"),
37
+ }
38
+ report = {}
39
+ for name, command in commands.items():
40
+ try:
41
+ report[name] = {"available": True, "output": await bash(command, timeout=10)}
42
+ except Exception as error:
43
+ report[name] = {"available": False, "reason": str(error)}
44
+ return report
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: recall
3
+ description: "Reconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
8
+
9
+ # Recall
10
+
11
+ **Before you start or resume work, you rebuild the user's recent working context and hand back a tight capsule of where things stand now and what to do next.**
12
+
13
+ Keep it tight and on-topic. Read only what the in-scope threads need, then stop.
14
+
15
+ Your context lives in two records. Your own chat history holds what you did and decided. The shared record holds everything that happened around the same code under other names: the symptoms users keep reporting, the fixes that shipped and got reverted, the errors still firing in prod. That second record is what the **why** skill searches, across source control, the issue tracker, chat and issue channels, long-form docs, and error tracking. A feature with a long bug tail keeps most of its story there, so don't reconstruct it from your transcripts alone.
16
+
17
+ Read this session with await context.history(). Retrieve earlier project observations through await memory.search(query) and await memory.get(id). Historical transcripts must be explicitly supplied by the supervisor. Do not invent a home-directory transcript layout.
18
+
19
+ 1. Classify, then route. One specific prior chat to resume is the `session-pickup` playbook, not this. Turning habits into a durable skill is `automate-me`. A human-readable summary of your work is a different task. Recall loads working context across recent chats before you act. If the user already gave you a full state capsule (paths, branch, the change), use it and skip the mining.
20
+ 2. Lock the scope before searching. Pin the window ("recent" is a real range, default the last 7 days), the topic if named, and the workspace (default the active one. Never read another project's transcripts without being asked). State the scope back. Never quietly turn "all" into "recent N".
21
+ 3. Fan out across your chat history. Spawn parallel subagents on a fast, cheap model, each taking a slice of the corpus. Tell every subagent to order candidates by real modification time (`ls -t`) and never by UUID name, grep the topic first and then read only the matching chats and only their relevant regions, and skip the current chat plus obvious noise (subagent, eval, and test chats). Each returns the same schema, one block per chat: topic, the user's goal, decisions, open threads, struggles and corrections, and artifacts (PRs, tickets, branches), each citing the chat UUID. For one or two chats, skip the fan-out and search directly. The raw transcripts stay in the subagents. The main thread gets only their findings. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **peak** skill.
22
+ 4. Sweep the shared record whenever the topic names a feature, file, subsystem, area, or bug. This is the default, not a judgment call, and "my work on X" does not exempt it. Hand it to the **why** skill's source investigators, but steer their question from "why was this built this way" to "what's the current state, what's been tried and didn't hold, and what are users still reporting". Reuse its per-source playbooks, run the investigators in parallel with the chat-history mining, and inherit its posture: one investigator per source, null results are findings, skip an unavailable MCP and say so. Fold what comes back into the brief. Skip this step only for pure activity recall with no named target ("what did I do this week"), where your own history and live state are the entire answer.
23
+ 5. Verify against live state. Take the PRs, branches, and tickets that the mining and the sweep surfaced and check them with `git` and `gh`. When the answer hinges on what an agent actually did (the tools it ran, files it read, errors it hit), read the full transcript, not just a trimmed local copy.
24
+ 6. Write the brief to the contract below. Group by thread. Stay on the named topic.
25
+
26
+ ## Output contract
27
+
28
+ Lead with the capsule, then the thread status, then the problems, then the next move. Deeper detail goes below or gets cut.
29
+
30
+ - **Capsule.** At most 5 bullets. What this work is and where it stands overall.
31
+ - **Threads.** One line each, prefixed with exactly one status tag: `[merged #N]`, `[open PR #N]`, `[in flight <branch>]`, `[verified, uncommitted]`, `[reverted #N]`, or `[planned, not started]`. A thread with no tag is not done yet, so tag it.
32
+ - **Problems.** At most 5, the recurring ones. Include the symptoms users keep reporting and any fix that shipped and was reverted, so the next attempt starts where the last one failed.
33
+ - **Next move.** The single most useful next action, concrete.
34
+
35
+ An adjacent feature or ticket stays out unless it blocks this one. When the capsule and thread lines outgrow a screen, cut detail before you cut threads. Write the brief through the **unslop** skill, cite chat findings by UUID and shared-record findings by their source (PR #, ticket ID, chat permalink, error-tracker issue), and sanitize private context before any public output.
36
+
37
+ **Reply:** the brief, to the contract above.