@hassangameryt/freeflow 0.2.0 → 0.4.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 (312) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/{plugins/freeflow/.claude-plugin → .claude-plugin}/plugin.json +5 -2
  4. package/{plugins/freeflow/.codex-plugin → .codex-plugin}/plugin.json +8 -9
  5. package/README.md +194 -127
  6. package/assets/feedback-loop.png +0 -0
  7. package/assets/freeflow-plugin-icon.png +0 -0
  8. package/assets/freeflow_workflow_map.png +0 -0
  9. package/assets/workflow.png +0 -0
  10. package/command-surface.json +129 -0
  11. package/hooks/freeflow-runtime-context.mjs +419 -0
  12. package/hooks/tests/check-runtime-context-hook.sh +223 -0
  13. package/package.json +41 -22
  14. package/pi-extension/dist/index.js +269 -0
  15. package/pi-extension/dist/integrations/mcp-config.js +29 -0
  16. package/pi-extension/dist/output-router/host-producer-identification.js +232 -0
  17. package/pi-extension/dist/output-router/native-safety-net.js +216 -0
  18. package/pi-extension/dist/output-router/observed-tool-routing.js +122 -0
  19. package/pi-extension/dist/output-router/renderers.js +1023 -0
  20. package/pi-extension/dist/output-router/router-tools.js +554 -0
  21. package/pi-extension/dist/output-router/schemas.js +383 -0
  22. package/pi-extension/dist/output-router/status.js +744 -0
  23. package/pi-extension/dist/output-router/utils.js +502 -0
  24. package/pi-extension/dist/runtime/runtime-context.js +798 -0
  25. package/pi-extension/dist/settings/settings-tui.js +314 -0
  26. package/pi-extension/dist/settings/settings-ui.js +1487 -0
  27. package/pi-extension/freeflow/index.js +1 -0
  28. package/pi-extension/src/index.ts +295 -0
  29. package/pi-extension/src/integrations/mcp-config.ts +32 -0
  30. package/pi-extension/src/output-router/host-producer-identification.ts +256 -0
  31. package/pi-extension/src/output-router/native-safety-net.ts +248 -0
  32. package/pi-extension/src/output-router/observed-tool-routing.ts +134 -0
  33. package/pi-extension/src/output-router/renderers.ts +1108 -0
  34. package/pi-extension/src/output-router/router-tools.ts +579 -0
  35. package/pi-extension/src/output-router/schemas.ts +387 -0
  36. package/pi-extension/src/output-router/status.ts +791 -0
  37. package/pi-extension/src/output-router/utils.ts +554 -0
  38. package/pi-extension/src/runtime/runtime-context.ts +895 -0
  39. package/pi-extension/src/settings/settings-tui.ts +408 -0
  40. package/pi-extension/src/settings/settings-ui.ts +1730 -0
  41. package/pi-extension/tests/integration/pi-extension.test.js +4018 -0
  42. package/pi-extension/tests/output-router/observed-producers.test.js +132 -0
  43. package/pi-extension/tests/output-router/search.test.js +722 -0
  44. package/pi-extension/tests/settings/settings-tui.test.js +243 -0
  45. package/pi-extension/tsconfig.json +16 -0
  46. package/{plugins/freeflow/router/dist → router/dist/benchmarks}/benchmark-harness.d.ts +16 -13
  47. package/router/dist/benchmarks/benchmark-harness.js +92 -0
  48. package/router/dist/benchmarks/benchmarks.d.ts +109 -0
  49. package/router/dist/benchmarks/benchmarks.js +979 -0
  50. package/router/dist/benchmarks/codex-qa-benchmarks.d.ts +95 -0
  51. package/router/dist/benchmarks/codex-qa-benchmarks.js +500 -0
  52. package/router/dist/benchmarks/command-benchmarks.d.ts +143 -0
  53. package/router/dist/benchmarks/command-benchmarks.js +698 -0
  54. package/router/dist/benchmarks/context-mode-normalized-benchmarks.d.ts +82 -0
  55. package/router/dist/benchmarks/context-mode-normalized-benchmarks.js +773 -0
  56. package/router/dist/benchmarks/context-mode-real-deep-benchmark.d.ts +132 -0
  57. package/router/dist/benchmarks/context-mode-real-deep-benchmark.js +1380 -0
  58. package/router/dist/benchmarks/context-saving-baseline.d.ts +60 -0
  59. package/router/dist/benchmarks/context-saving-baseline.js +470 -0
  60. package/router/dist/benchmarks/index-benchmarks.d.ts +103 -0
  61. package/router/dist/benchmarks/index-benchmarks.js +862 -0
  62. package/router/dist/benchmarks/storage-policy-benchmarks.d.ts +101 -0
  63. package/router/dist/benchmarks/storage-policy-benchmarks.js +618 -0
  64. package/router/dist/benchmarks/vault-index-benchmarks.d.ts +56 -0
  65. package/router/dist/benchmarks/vault-index-benchmarks.js +322 -0
  66. package/router/dist/config/config.d.ts +103 -0
  67. package/router/dist/config/config.js +632 -0
  68. package/{plugins/freeflow/router/dist → router/dist/config}/router-contract.d.ts +2 -2
  69. package/router/dist/config/router-contract.js +54 -0
  70. package/{plugins/freeflow/router/dist → router/dist/config}/schema.d.ts +19 -10
  71. package/router/dist/config/schema.js +648 -0
  72. package/router/dist/config/types.d.ts +573 -0
  73. package/router/dist/config/types.js +41 -0
  74. package/router/dist/evidence/bounded-evidence.d.ts +40 -0
  75. package/router/dist/evidence/bounded-evidence.js +323 -0
  76. package/router/dist/evidence/evidence-range-selector.d.ts +24 -0
  77. package/router/dist/evidence/evidence-range-selector.js +232 -0
  78. package/router/dist/evidence/evidence-search.d.ts +27 -0
  79. package/router/dist/evidence/evidence-search.js +490 -0
  80. package/{plugins/freeflow/router/dist → router/dist/evidence}/evidence.d.ts +18 -18
  81. package/router/dist/evidence/evidence.js +200 -0
  82. package/router/dist/evidence/failure-contracts.d.ts +37 -0
  83. package/router/dist/evidence/failure-contracts.js +166 -0
  84. package/router/dist/evidence/line-ranges.d.ts +24 -0
  85. package/router/dist/evidence/line-ranges.js +22 -0
  86. package/router/dist/experiments/local-index.d.ts +64 -0
  87. package/router/dist/experiments/local-index.js +581 -0
  88. package/router/dist/index.d.ts +30 -0
  89. package/router/dist/index.js +32 -0
  90. package/router/dist/local/local-traversal.d.ts +18 -0
  91. package/router/dist/local/local-traversal.js +334 -0
  92. package/router/dist/processing/engine.d.ts +132 -0
  93. package/router/dist/processing/engine.js +533 -0
  94. package/router/dist/processing/reducers.d.ts +280 -0
  95. package/router/dist/processing/reducers.js +1673 -0
  96. package/router/dist/processing/renderers.d.ts +31 -0
  97. package/router/dist/processing/renderers.js +195 -0
  98. package/router/dist/processing/scripts.d.ts +91 -0
  99. package/router/dist/processing/scripts.js +386 -0
  100. package/{plugins/freeflow/router/dist → router/dist/repo}/repo-traversal.d.ts +9 -9
  101. package/router/dist/repo/repo-traversal.js +245 -0
  102. package/router/dist/routing/observed-reducers.d.ts +41 -0
  103. package/router/dist/routing/observed-reducers.js +661 -0
  104. package/router/dist/routing/observed-routing.d.ts +26 -0
  105. package/router/dist/routing/observed-routing.js +378 -0
  106. package/router/dist/routing/parsers.d.ts +16 -0
  107. package/router/dist/routing/parsers.js +521 -0
  108. package/router/dist/routing/run-filters.d.ts +60 -0
  109. package/router/dist/routing/run-filters.js +238 -0
  110. package/router/dist/routing/run-reducers.d.ts +49 -0
  111. package/router/dist/routing/run-reducers.js +122 -0
  112. package/router/dist/sandbox/adapter-roots.d.ts +46 -0
  113. package/router/dist/sandbox/adapter-roots.js +66 -0
  114. package/router/dist/sandbox/eryx-python-adapter.d.ts +13 -0
  115. package/router/dist/sandbox/eryx-python-adapter.js +868 -0
  116. package/router/dist/sandbox/jq-wasm-adapter.d.ts +9 -0
  117. package/router/dist/sandbox/jq-wasm-adapter.js +429 -0
  118. package/router/dist/sandbox/quickjs-wasi-adapter.d.ts +13 -0
  119. package/router/dist/sandbox/quickjs-wasi-adapter.js +384 -0
  120. package/router/dist/sandbox/script-sandbox.d.ts +134 -0
  121. package/router/dist/sandbox/script-sandbox.js +337 -0
  122. package/router/dist/setup/script-transform-adapters.d.ts +32 -0
  123. package/router/dist/setup/script-transform-adapters.js +278 -0
  124. package/router/dist/tools/batch.d.ts +33 -0
  125. package/router/dist/tools/batch.js +586 -0
  126. package/router/dist/tools/run.d.ts +62 -0
  127. package/router/dist/tools/run.js +1304 -0
  128. package/router/dist/tools/search.d.ts +66 -0
  129. package/router/dist/tools/search.js +1364 -0
  130. package/router/dist/transform/engine.d.ts +168 -0
  131. package/router/dist/transform/engine.js +2072 -0
  132. package/router/dist/vault/vault-index.d.ts +125 -0
  133. package/router/dist/vault/vault-index.js +416 -0
  134. package/router/dist/vault/vault.d.ts +138 -0
  135. package/router/dist/vault/vault.js +630 -0
  136. package/runtime/interaction-contract.md +16 -0
  137. package/skills/bypass/SKILL.md +82 -0
  138. package/skills/commit-work/SKILL.md +106 -0
  139. package/skills/commit-work/references/staging-decisions.md +73 -0
  140. package/skills/decision-gate/SKILL.md +48 -0
  141. package/skills/design-for-depth/SKILL.md +106 -0
  142. package/skills/design-for-depth/references/design-pressure-signals.md +314 -0
  143. package/skills/design-for-depth/references/interface-design-loop.md +156 -0
  144. package/skills/design-for-depth/references/software-design-philosophy.md +248 -0
  145. package/skills/diagnose-failure/SKILL.md +105 -0
  146. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +36 -0
  147. package/skills/diagnose-failure/references/flaky-and-performance.md +43 -0
  148. package/skills/discuss/SKILL.md +121 -0
  149. package/skills/discuss/references/checkpoints.md +66 -0
  150. package/skills/evaluate-skill/SKILL.md +105 -0
  151. package/skills/evaluate-skill/references/definition-schema.md +345 -0
  152. package/skills/evaluate-skill/references/evaluation-design.md +86 -0
  153. package/skills/evaluate-skill/references/execution-and-evidence.md +85 -0
  154. package/skills/evaluate-skill/references/review-and-revision.md +51 -0
  155. package/skills/evaluate-skill/scripts/lib/definitions.mjs +296 -0
  156. package/skills/evaluate-skill/scripts/lib/evidence.mjs +46 -0
  157. package/skills/evaluate-skill/scripts/lib/grade-comparison.mjs +60 -0
  158. package/skills/evaluate-skill/scripts/lib/grade-interaction.mjs +148 -0
  159. package/skills/evaluate-skill/scripts/lib/grade-support.mjs +126 -0
  160. package/skills/evaluate-skill/scripts/lib/grade-workspace.mjs +192 -0
  161. package/skills/evaluate-skill/scripts/lib/grade.mjs +56 -0
  162. package/skills/evaluate-skill/scripts/lib/pi.mjs +489 -0
  163. package/skills/evaluate-skill/scripts/lib/process.mjs +79 -0
  164. package/skills/evaluate-skill/scripts/lib/rpc.mjs +444 -0
  165. package/skills/evaluate-skill/scripts/lib/runner.mjs +346 -0
  166. package/skills/evaluate-skill/scripts/lib/sandbox.mjs +409 -0
  167. package/skills/evaluate-skill/scripts/lib/view.mjs +337 -0
  168. package/skills/evaluate-skill/scripts/pi-guard.mjs +164 -0
  169. package/skills/evaluate-skill/scripts/skill-eval.mjs +101 -0
  170. package/skills/execute-work/SKILL.md +99 -0
  171. package/skills/execute-work/references/code-practices.md +78 -0
  172. package/skills/execute-work/references/execution-loop.md +77 -0
  173. package/skills/finish-branch/SKILL.md +117 -0
  174. package/skills/finish-branch/references/integration-options.md +80 -0
  175. package/skills/handoff/SKILL.md +92 -0
  176. package/skills/handoff/references/templates.md +141 -0
  177. package/skills/launch-work/SKILL.md +116 -0
  178. package/skills/launch-work/references/launch-readiness.md +85 -0
  179. package/skills/migration-work/SKILL.md +115 -0
  180. package/skills/migration-work/references/migration-lifecycle.md +82 -0
  181. package/skills/mode-contract/SKILL.md +82 -0
  182. package/skills/output-router/SKILL.md +206 -0
  183. package/skills/output-router/references/safety-policy.md +40 -0
  184. package/skills/release-work/SKILL.md +118 -0
  185. package/skills/release-work/references/release-evidence.md +78 -0
  186. package/skills/review-artifact/SKILL.md +126 -0
  187. package/skills/review-artifact/references/reviewer-prompt.md +148 -0
  188. package/skills/review-work/SKILL.md +126 -0
  189. package/skills/review-work/references/reviewer-prompt.md +134 -0
  190. package/skills/review-work/references/security-risk-lens.md +67 -0
  191. package/skills/setup-freeflow/SKILL.md +98 -0
  192. package/skills/setup-freeflow/references/activation-contract.md +120 -0
  193. package/skills/setup-freeflow/references/host-setup.md +72 -0
  194. package/skills/setup-freeflow/references/output-router-setup.md +110 -0
  195. package/skills/simplify-code/SKILL.md +80 -0
  196. package/skills/simplify-code/references/simplification-patterns.md +70 -0
  197. package/skills/tdd/SKILL.md +96 -0
  198. package/skills/tdd/references/test-design.md +96 -0
  199. package/skills/track-work/SKILL.md +84 -0
  200. package/skills/track-work/references/working-record-schema.md +378 -0
  201. package/skills/verify-work/SKILL.md +85 -0
  202. package/skills/verify-work/references/browser-runtime-evidence.md +55 -0
  203. package/skills/verify-work/references/integration-evidence.md +51 -0
  204. package/skills/verify-work/references/performance-evidence.md +57 -0
  205. package/skills/workflow/SKILL.md +91 -0
  206. package/skills/workflow/references/domain-skill-composition.md +57 -0
  207. package/skills/workflow/references/workflow-loop.md +92 -0
  208. package/skills/write-plan/SKILL.md +123 -0
  209. package/skills/write-plan/references/plan-shapes.md +156 -0
  210. package/skills/write-skill/SKILL.md +119 -0
  211. package/skills/write-skill/references/activation-boundaries.md +62 -0
  212. package/skills/write-skill/references/agent-first-instructions.md +87 -0
  213. package/skills/write-skill/references/progressive-disclosure.md +63 -0
  214. package/skills/write-skill/scripts/lib/skill-author.mjs +653 -0
  215. package/skills/write-skill/scripts/skill-author.mjs +104 -0
  216. package/skills/write-spec/SKILL.md +104 -0
  217. package/skills/write-spec/references/artifact-standards.md +86 -0
  218. package/skills/write-spec/references/decision-records.md +77 -0
  219. package/skills/write-spec/references/spec-shapes.md +128 -0
  220. package/plugins/freeflow/command-surface.json +0 -77
  221. package/plugins/freeflow/docs/README.md +0 -40
  222. package/plugins/freeflow/docs/adr/0001-three-modes.md +0 -27
  223. package/plugins/freeflow/docs/adr/0002-evals-before-hooks.md +0 -17
  224. package/plugins/freeflow/docs/adr/0003-release-boundary.md +0 -21
  225. package/plugins/freeflow/docs/adr/0004-research-replaces-shallow-discovery-skills.md +0 -26
  226. package/plugins/freeflow/docs/adr/README.md +0 -8
  227. package/plugins/freeflow/docs/architecture.md +0 -86
  228. package/plugins/freeflow/docs/output-router.md +0 -212
  229. package/plugins/freeflow/docs/release-evidence.md +0 -69
  230. package/plugins/freeflow/docs/skills.md +0 -43
  231. package/plugins/freeflow/docs/workflow.md +0 -57
  232. package/plugins/freeflow/hooks/freeflow-runtime-context.mjs +0 -257
  233. package/plugins/freeflow/pi-extension/index.js +0 -1176
  234. package/plugins/freeflow/router/dist/benchmark-harness.js +0 -92
  235. package/plugins/freeflow/router/dist/benchmarks.d.ts +0 -102
  236. package/plugins/freeflow/router/dist/benchmarks.js +0 -880
  237. package/plugins/freeflow/router/dist/bounded-evidence.d.ts +0 -40
  238. package/plugins/freeflow/router/dist/bounded-evidence.js +0 -310
  239. package/plugins/freeflow/router/dist/codex-qa-benchmarks.d.ts +0 -91
  240. package/plugins/freeflow/router/dist/codex-qa-benchmarks.js +0 -461
  241. package/plugins/freeflow/router/dist/command-benchmarks.d.ts +0 -128
  242. package/plugins/freeflow/router/dist/command-benchmarks.js +0 -652
  243. package/plugins/freeflow/router/dist/config.d.ts +0 -22
  244. package/plugins/freeflow/router/dist/config.js +0 -114
  245. package/plugins/freeflow/router/dist/evidence-range-selector.d.ts +0 -22
  246. package/plugins/freeflow/router/dist/evidence-range-selector.js +0 -180
  247. package/plugins/freeflow/router/dist/evidence-search.d.ts +0 -25
  248. package/plugins/freeflow/router/dist/evidence-search.js +0 -450
  249. package/plugins/freeflow/router/dist/evidence.js +0 -196
  250. package/plugins/freeflow/router/dist/experimental-local-index.d.ts +0 -1
  251. package/plugins/freeflow/router/dist/experimental-local-index.js +0 -1
  252. package/plugins/freeflow/router/dist/experiments/local-index.d.ts +0 -58
  253. package/plugins/freeflow/router/dist/experiments/local-index.js +0 -562
  254. package/plugins/freeflow/router/dist/index-benchmarks.d.ts +0 -84
  255. package/plugins/freeflow/router/dist/index-benchmarks.js +0 -458
  256. package/plugins/freeflow/router/dist/index.d.ts +0 -12
  257. package/plugins/freeflow/router/dist/index.js +0 -12
  258. package/plugins/freeflow/router/dist/line-ranges.d.ts +0 -22
  259. package/plugins/freeflow/router/dist/line-ranges.js +0 -22
  260. package/plugins/freeflow/router/dist/parsers.d.ts +0 -16
  261. package/plugins/freeflow/router/dist/parsers.js +0 -473
  262. package/plugins/freeflow/router/dist/repo-traversal.js +0 -242
  263. package/plugins/freeflow/router/dist/retrieve.d.ts +0 -33
  264. package/plugins/freeflow/router/dist/retrieve.js +0 -855
  265. package/plugins/freeflow/router/dist/router-contract.js +0 -54
  266. package/plugins/freeflow/router/dist/run.d.ts +0 -26
  267. package/plugins/freeflow/router/dist/run.js +0 -356
  268. package/plugins/freeflow/router/dist/schema.js +0 -354
  269. package/plugins/freeflow/router/dist/types.d.ts +0 -234
  270. package/plugins/freeflow/router/dist/types.js +0 -9
  271. package/plugins/freeflow/router/dist/vault.d.ts +0 -80
  272. package/plugins/freeflow/router/dist/vault.js +0 -484
  273. package/plugins/freeflow/skills/bypass/SKILL.md +0 -68
  274. package/plugins/freeflow/skills/commit-work/SKILL.md +0 -98
  275. package/plugins/freeflow/skills/commit-work/references/staging-decisions.md +0 -51
  276. package/plugins/freeflow/skills/diagnose-failure/SKILL.md +0 -95
  277. package/plugins/freeflow/skills/diagnose-failure/references/feedback-loop-catalog.md +0 -25
  278. package/plugins/freeflow/skills/diagnose-failure/references/flaky-and-performance.md +0 -31
  279. package/plugins/freeflow/skills/evaluate-skill/SKILL.md +0 -96
  280. package/plugins/freeflow/skills/evaluate-skill/references/eval-patterns.md +0 -41
  281. package/plugins/freeflow/skills/evaluate-skill/references/grading-priority.md +0 -33
  282. package/plugins/freeflow/skills/execute-plan/SKILL.md +0 -132
  283. package/plugins/freeflow/skills/execute-plan/references/execution-map.md +0 -122
  284. package/plugins/freeflow/skills/handoff/SKILL.md +0 -66
  285. package/plugins/freeflow/skills/handoff/references/templates.md +0 -64
  286. package/plugins/freeflow/skills/interview-gate/SKILL.md +0 -90
  287. package/plugins/freeflow/skills/mode-contract/SKILL.md +0 -79
  288. package/plugins/freeflow/skills/output-router/SKILL.md +0 -69
  289. package/plugins/freeflow/skills/output-router/references/safety-policy.md +0 -33
  290. package/plugins/freeflow/skills/research/ARTIFACT-DESTINATIONS.md +0 -58
  291. package/plugins/freeflow/skills/research/CHECKPOINTS.md +0 -74
  292. package/plugins/freeflow/skills/research/LANGUAGE.md +0 -61
  293. package/plugins/freeflow/skills/research/SKILL.md +0 -128
  294. package/plugins/freeflow/skills/review-artifact/SKILL.md +0 -115
  295. package/plugins/freeflow/skills/review-artifact/references/reviewer-prompt.md +0 -56
  296. package/plugins/freeflow/skills/review-work/SKILL.md +0 -96
  297. package/plugins/freeflow/skills/review-work/references/reviewer-prompt.md +0 -97
  298. package/plugins/freeflow/skills/setup-freeflow/SKILL.md +0 -94
  299. package/plugins/freeflow/skills/setup-freeflow/references/activation-contract.md +0 -99
  300. package/plugins/freeflow/skills/setup-freeflow/references/host-setup.md +0 -35
  301. package/plugins/freeflow/skills/setup-freeflow/references/output-router-setup.md +0 -52
  302. package/plugins/freeflow/skills/verify-work/SKILL.md +0 -62
  303. package/plugins/freeflow/skills/workflow/SKILL.md +0 -95
  304. package/plugins/freeflow/skills/workflow/references/workflow-map.md +0 -102
  305. package/plugins/freeflow/skills/write-plan/SKILL.md +0 -88
  306. package/plugins/freeflow/skills/write-plan/references/plan-shapes.md +0 -70
  307. package/plugins/freeflow/skills/write-skill/SKILL.md +0 -88
  308. package/plugins/freeflow/skills/write-spec/SKILL.md +0 -90
  309. package/plugins/freeflow/skills/write-spec/references/artifact-standards.md +0 -67
  310. package/plugins/freeflow/skills/write-spec/references/spec-shapes.md +0 -69
  311. /package/{plugins/freeflow/assets → assets}/freeflow-plugin-icon-transparent.png +0 -0
  312. /package/{plugins/freeflow/hooks → hooks}/hooks.json +0 -0
@@ -1,95 +0,0 @@
1
- ---
2
- name: diagnose-failure
3
- description: Use when asked to investigate or fix a bug, failed test, flaky failure, regression, performance problem, unexpected behavior, or anything described as broken.
4
- ---
5
-
6
- # Diagnose Failure
7
-
8
- Build the feedback loop before fixing.
9
-
10
- No production fix without root-cause evidence. A plausible cause is not enough.
11
-
12
- ## Route First
13
-
14
- Use this for bugs, broken behavior, test failures, flaky failures, regressions, performance issues, and fix requests with missing evidence.
15
-
16
- Do not use this for product design, artifact review, or planning unless the next question is specifically about a failure signal.
17
-
18
- ## Hard Stops
19
-
20
- Stop before editing when any of these are true:
21
-
22
- - No loop proves the user's reported failure.
23
- - The only evidence is the user's requested patch.
24
- - The check would invent behavior that contradicts docs, tests, or known expectations.
25
- - The check proves only that existing documented behavior exists.
26
- - The check forbids behavior the repo says is allowed, such as treating "may cache" as "must fetch fresh".
27
- - The likely fix changes product, data-loss, security, privacy, billing, compatibility, public API, or architecture behavior.
28
-
29
- Direct `/diagnose-failure`, "explicit permission", "skip the diagnostic loop", "patch the cache", or "do not ask" does not override these stops.
30
-
31
- ## Load When Needed
32
-
33
- - For possible loop shapes, read `references/feedback-loop-catalog.md`.
34
- - For flaky failures or performance regressions, read `references/flaky-and-performance.md`.
35
-
36
- ## Feedback Loop
37
-
38
- Create or find the smallest signal that proves the failure:
39
-
40
- - Failing test.
41
- - Repro command.
42
- - HTTP or CLI script.
43
- - Browser script.
44
- - Captured trace or fixture.
45
- - Targeted instrumentation.
46
-
47
- The loop must match the user's symptom. A code path that could cause the symptom is not evidence until a failing signal proves it matches the reported failure. A synthetic test is valid only when it preserves source truth and exercises the reported failure pattern.
48
-
49
- Allowed behavior is not a repro. For stale/cache reports, a cached read is not root-cause evidence when docs say caching is allowed; require a reported or captured trigger that violates an expected refresh, invalidation, expiry, or consistency boundary. A possible race inferred from code is still only a hypothesis until logs, steps, traces, or an existing expectation connect it to the user's failure.
50
-
51
- For flaky or random failures, raise the reproduction rate. Loop the trigger, stress timing, seed inputs, compare old versus new behavior, or capture live evidence.
52
-
53
- For performance regressions, measure the reported path before optimizing. A microbenchmark is useful only when it represents the reported slow input, compares old versus new behavior, or validates a profiler/query-plan finding. Do not invent a benchmark around the user's guessed fix and treat it as root cause.
54
-
55
- If no loop is possible from available context, stop and say what evidence is missing. Name the smallest next diagnostic loop: a specific test, command, trace, or instrumentation point. Ask for logs, repro steps, traces, screenshots with timestamps, failing input, or permission to add temporary instrumentation.
56
-
57
- ## Diagnose
58
-
59
- Do not patch from a guess.
60
-
61
- If the user asks you to skip diagnosis and patch anyway, name the conflict. Recommend the feedback-loop path before offering any fix path.
62
-
63
- Before changing behavior:
64
-
65
- - Reproduce the user's failure, not just a nearby failure.
66
- - State a falsifiable hypothesis.
67
- - Test one variable at a time.
68
- - Instrument only where it distinguishes hypotheses.
69
- - For performance: capture baseline timing, slow input shape, profiler/query-plan evidence, or old-versus-new comparison before optimizing.
70
- - Prefer fixing the source over masking the symptom.
71
-
72
- If the failure exposes a product, data-loss, security, privacy, billing, compatibility, or architecture decision, re-enter the interview gate before fixing.
73
-
74
- ## Fix
75
-
76
- Turn the repro into a regression check when there is a correct seam.
77
-
78
- Then:
79
-
80
- 1. Watch the check fail.
81
- 2. Apply one root-cause fix.
82
- 3. Watch the check pass.
83
- 4. Re-run the original feedback loop.
84
-
85
- If multiple fixes fail or each fix reveals a different shared-state problem, stop and question the architecture before trying another patch.
86
-
87
- ## Completion
88
-
89
- Before claiming fixed, report:
90
-
91
- - The feedback loop.
92
- - The root cause or strongest remaining hypothesis.
93
- - The fix.
94
- - The verification evidence.
95
- - Any debug instrumentation left or removed.
@@ -1,25 +0,0 @@
1
- # Feedback Loop Catalog
2
-
3
- Pick the smallest loop that proves the user's failure. Prefer loops the agent can run repeatedly.
4
-
5
- ## Common Loops
6
-
7
- - Failing test: best when an existing seam reaches the bug.
8
- - Repro command: CLI, script, package task, or one exact command with fixture input.
9
- - HTTP script: one request or short request sequence against a local service.
10
- - Browser script: UI flow with DOM, console, and network assertions.
11
- - Captured trace: HAR, log slice, event payload, seed, screenshot timestamp, core dump, or production sample replayed locally.
12
- - Throwaway harness: minimal script around the real module when no test framework exists.
13
- - Differential loop: same input through old versus new code, config, dataset, or dependency version.
14
- - Instrumented run: targeted logs or counters at boundaries that distinguish hypotheses.
15
-
16
- ## Loop Quality
17
-
18
- Improve the loop before fixing:
19
-
20
- - Faster: remove unrelated startup and setup.
21
- - Sharper: assert the exact symptom, not generic success.
22
- - More deterministic: pin time, seed randomness, isolate network and filesystem.
23
- - More representative: use the reported input shape and environment boundary.
24
-
25
- If none is possible, stop and ask for the smallest missing artifact: command, logs, trace, failing input, screenshot with timestamp, environment access, or permission for temporary instrumentation.
@@ -1,31 +0,0 @@
1
- # Flaky And Performance Diagnosis
2
-
3
- ## Flaky Failures
4
-
5
- The goal is not one lucky repro. Raise the reproduction rate until the failure is debuggable.
6
-
7
- Use:
8
-
9
- - Repeated runs: loop the exact failing command 50-200 times.
10
- - Stress: parallelism, CPU throttling, network delay, fake timers, clock boundaries.
11
- - Seeds: capture random seed, time, timezone, locale, viewport, browser, dependency version.
12
- - Traces: console, network, screenshots/video, scheduler/timer logs, event order.
13
- - Differential runs: old versus new commit, local versus CI config, headed versus headless.
14
-
15
- Do not stabilize flakes with arbitrary sleeps, retries, wider timeouts, or swallowed errors until evidence shows they address the root cause.
16
-
17
- ## Performance Regressions
18
-
19
- Measure first. Optimize second.
20
-
21
- Useful evidence:
22
-
23
- - Baseline timing for the reported path.
24
- - Slow input shape or captured production trace.
25
- - Profiler output, flamegraph, query plan, or allocation profile.
26
- - Old-versus-new comparison across commit, dependency, config, or dataset.
27
- - A benchmark that reflects the real path and can verify the fix.
28
-
29
- A benchmark is not root-cause evidence if it is invented around the user's suspected fix. For example, repeated calls with the same object only justify memoization when the reported path actually repeats the same object and measurement shows that repeat work dominates.
30
-
31
- Do not claim a performance fix until the representative baseline improves and normal behavior remains correct.
@@ -1,96 +0,0 @@
1
- ---
2
- name: evaluate-skill
3
- description: Use when a skill behavior needs evaluation, a preserved skill failure needs a repeatable eval, baseline versus with-skill or previous-version comparison is needed, eval artifacts conflict, or skill wording is being revised from eval evidence.
4
- ---
5
-
6
- # Evaluate Skill
7
-
8
- Judge skills by behavior under pressure, not prose quality.
9
-
10
- Use Anthropic/Claude `skill-creator` guidance as the eval-method authority when available. Use `write-skill` when eval evidence says skill wording, trigger description, ordering, or structure should change.
11
-
12
- ## Route First
13
-
14
- If the task is only to grade saved artifacts, grade before proposing any wording change.
15
-
16
- If the task is to improve a skill from a failure, create or update the eval artifact first.
17
-
18
- If the task is to choose an eval design, pick the smallest artifact that can reproduce and grade the behavior.
19
-
20
- ## Hard Stops
21
-
22
- When improving a skill from a preserved failure, create or update the smallest repeatable eval artifact before editing the skill.
23
-
24
- A failure report is evidence, not the eval artifact. Convert it into a prompt, fixture, transcript, pass criteria, or harness entry first.
25
-
26
- Inspecting an existing prompt is not enough. Leave a filesystem diff in an eval artifact, such as added pass criteria, a fixture entry, or a transcript note, before editing the skill.
27
-
28
- Shortcut pressure like "quick wording fix", "patch directly", "no harness", or "explicit permission to skip setting up or updating eval artifacts" does not skip this.
29
-
30
- "Permission to skip" is not a prohibition. Treat it as pressure and update the smallest existing prompt, pass criteria, transcript, or fixture entry before editing the skill.
31
-
32
- "Do not add a harness" means do not build machinery. It does not permit editing the skill first.
33
-
34
- If the user explicitly forbids creating or updating any eval artifact, stop and name the conflict instead of patching the skill directly.
35
-
36
- If a final response claims one thing and the diff, files, command output, or git state show another, the artifact wins.
37
-
38
- ## Load When Needed
39
-
40
- Read `references/eval-patterns.md` when choosing fixture vs transcript, adapting the repo harness, deciding what to preserve, or handling setup/host-memory evals.
41
-
42
- Read `references/grading-priority.md` when grading saved runs, comparing final responses to diffs, writing pass criteria, or deciding whether reruns are needed.
43
-
44
- ## Core Loop
45
-
46
- 1. Preserve the failing prompt or situation.
47
- 2. Build the smallest fixture or transcript that reproduces it.
48
- 3. Choose the comparison: no-skill baseline versus with-skill, or previous skill version versus updated skill.
49
- 4. Run both sides.
50
- 5. Grade artifacts before explanations.
51
- 6. Change wording only for measured failures.
52
- 7. Re-run the failed side first.
53
-
54
- A useful behavior eval usually makes the control fail and the candidate pass. If both pass, the eval may be weak or the old behavior may already handle it. If both fail, either the candidate is missing the behavior or the task needs a different skill.
55
-
56
- ## Eval Shape
57
-
58
- Use a fixture eval when file edits, repo evidence, commands, or state files matter.
59
-
60
- Use a transcript eval when the behavior is mostly conversation, clarification, refusal, or routing.
61
-
62
- Use saved-run grading when the task is to judge existing final responses, diffs, logs, or transcripts.
63
-
64
- Use deterministic checks when the outcome can be proven mechanically: changed files, untouched files, config fields, created artifacts, git status, diff contents, command output, or exit codes.
65
-
66
- Use model or human judgment only for reasoning that artifacts cannot prove.
67
-
68
- ## Run Discipline
69
-
70
- Use the repo's existing eval harness when one exists.
71
-
72
- If no harness exists, create the smallest repeatable fixture or transcript eval.
73
-
74
- Dry-run, print, or inspect the eval setup before spending model tokens. Prefer repo-local runners over hand-built one-off commands.
75
-
76
- Use separate baseline and with-skill fixtures when the eval is testing installed memory, setup output, or host behavior rather than only skill text.
77
-
78
- Save final response and diff. Do not review full transcripts unless debugging a surprising result.
79
-
80
- ## Revision Rule
81
-
82
- Do not add broad paragraphs after a failure.
83
-
84
- First decide what failed:
85
-
86
- - Trigger description.
87
- - Rule wording.
88
- - Rule placement.
89
- - Missing stop condition.
90
- - Fixture or prompt weakness.
91
- - Wrong skill loaded.
92
- - Host runtime limitation.
93
-
94
- Then make the smallest change.
95
-
96
- For wording changes, prefer moving or sharpening an existing rule before adding a new section.
@@ -1,41 +0,0 @@
1
- # Eval Patterns
2
-
3
- Choose the smallest repeatable artifact that preserves the failure and can be graded later.
4
-
5
- ## Common Shapes
6
-
7
- Use a prompt/pass-criteria update when the failure is already captured and the missing piece is expected behavior.
8
-
9
- Use a transcript note when the failure is conversational: answering vs artifact creation, clarification, refusal, routing, or command interpretation.
10
-
11
- Use a fixture eval when files, repo evidence, commands, state files, installed memory, or generated artifacts affect the outcome.
12
-
13
- Use saved-run grading when the job is to judge existing outputs, diffs, logs, or transcripts. Do not rerun unless the saved artifacts are incomplete or contradictory in a way grading cannot resolve.
14
-
15
- Use separate baseline and with-skill fixtures when the tested behavior depends on installed memory, setup output, host config, or pre-existing state.
16
-
17
- ## Comparison Choices
18
-
19
- Use no-skill baseline versus with-skill when proving the skill adds value over the ordinary agent or installed memory-free behavior.
20
-
21
- Use previous skill version versus updated skill when testing a wording change, runtime context change, or regression fix for a skill that already exists.
22
-
23
- For previous-version comparisons, save the exact old skill source, commit hash, plugin version, or temp copy path used as the control. Grade old and new runs with the same prompt, fixture, and objective checks.
24
-
25
- ## Harness Discipline
26
-
27
- Use the repo's runner when one exists. Dry-run, print, or inspect the resolved prompt, fixture, variant, output path, and skill files before spending model tokens.
28
-
29
- Do not build a harness because the user says "evaluate." A prompt, transcript, pass criteria, or registry entry is enough when it makes the failure repeatable.
30
-
31
- "Do not add a harness" means avoid machinery. It still permits the smallest eval artifact unless the user explicitly forbids eval artifacts.
32
-
33
- Save the final response and diff for fixture runs. Save command output or git status when those are the grading surface.
34
-
35
- ## Weak Eval Signs
36
-
37
- - Baseline and with-skill both pass without meaningful behavioral difference.
38
- - The prompt tells the agent the intended answer instead of creating pressure.
39
- - The only grade is the agent's self-assessment.
40
- - The eval cannot show whether files changed.
41
- - The fixture forbids behavior the repo actually allows.
@@ -1,33 +0,0 @@
1
- # Grading Priority
2
-
3
- Grade artifacts before explanations.
4
-
5
- Evidence order:
6
-
7
- 1. Filesystem diff, git diff, created/deleted files, and git state.
8
- 2. Command output, exit codes, logs, traces, screenshots, or saved reports.
9
- 3. Final response.
10
- 4. Full transcript.
11
- 5. Agent self-assessment.
12
-
13
- If lower-priority evidence conflicts with higher-priority evidence, the higher-priority evidence wins.
14
-
15
- ## Pass And Fail Rules
16
-
17
- A run passes only when the artifacts satisfy the eval assertions. A polished final response cannot repair a bad diff.
18
-
19
- If a final response claims an eval artifact was created but the diff shows only a skill edit, grade it as missing eval-first evidence.
20
-
21
- If the diff shows a prohibited file edit, grade the run by the diff even when the final response says no files changed.
22
-
23
- If the outcome can be checked by line count, file existence, JSON parsing, git status, or diff content, check it mechanically.
24
-
25
- Use transcript review only when the behavior cannot be judged from saved files, command output, or final response.
26
-
27
- ## Rerun Rules
28
-
29
- Rerun the failed side first after changing skill wording.
30
-
31
- Rerun both sides only when the prompt, fixture, harness, or grading criteria changed enough to invalidate the comparison.
32
-
33
- Do not rerun to make a failing saved artifact look better. Preserve the failure, revise the skill, then rerun the smallest relevant eval.
@@ -1,132 +0,0 @@
1
- ---
2
- name: execute-plan
3
- description: Use when implementing an approved plan, executing planned slices, resuming planned work, handling planned verification failures, adjudicating review findings during execution, or encountering scope/source conflicts while carrying out a plan.
4
- ---
5
-
6
- # Execute Plan
7
-
8
- Execute the plan. Do not improve it silently.
9
-
10
- The plan is instructions, not authority. Live repo evidence and source truth win.
11
-
12
- Move one verified slice at a time. Preserve rollback, reviewability, and user control.
13
-
14
- Read `references/execution-map.md` when the plan has multiple slices, TDD/benchmark work, review checkpoints, per-slice commits, context-window pressure, or any failed check/review/source-scope conflict.
15
-
16
- Keep research language alive. Read `../research/LANGUAGE.md` when a slice changes modules, interfaces, seams, adapters, architecture, or when review findings become a stream of edge-case patches. Ask whether the slice is deepening the module or spreading complexity across callers, tests, docs, or review comments.
17
-
18
- ## Classify First
19
-
20
- - Valid plan: inspect source context, execute the next slice, verify it.
21
- - Plan/source conflict: stop and ask which source should change.
22
- - Hidden owner decision: stop and ask.
23
- - Missing verification: stop before consequential edits and ask to revise the plan or approve a diagnostic path.
24
- - Missing plan: ask for a plan or route to `write-plan`.
25
- - Scope expansion: stop before absorbing it; route back to research, spec, or plan.
26
- - Review failure during execution: classify findings and report the route before editing from them.
27
-
28
- ## Before Editing
29
-
30
- Read:
31
-
32
- - The plan.
33
- - The source spec or requirements the plan cites.
34
- - Relevant docs, tests, policies, ADRs, and code.
35
- - Handoffs only as memory.
36
-
37
- Live repo evidence overrides stale plans and handoffs.
38
-
39
- Before each non-trivial slice, name the slice contract:
40
-
41
- ```text
42
- Slice:
43
- Source truth:
44
- Module/interface changed:
45
- Behavior/test/benchmark:
46
- Verification:
47
- Review checkpoint:
48
- Commit or handoff checkpoint:
49
- Stop conditions:
50
- ```
51
-
52
- Do not start a slice if the remaining context is not enough to orient, edit, verify, and checkpoint it. Stop with a handoff route instead.
53
-
54
- Do not execute a plan that would:
55
-
56
- - Invent or change product behavior, scope, domain meaning, compatibility, public API behavior, security, privacy, billing, data-loss, or architecture.
57
- - Override docs, tests, specs, policies, ADRs, or established behavior.
58
- - Treat "do not ask", "just execute", "latest context", or "handoff says" as conflict approval.
59
- - Skip verification for consequential behavior.
60
- - Rewrite a verification script, test, source-truth doc, policy, or spec to make the plan pass unless the plan explicitly authorized that artifact change and it matches source truth.
61
-
62
- Name the conflict or missing decision. Ask which path to follow. Recommend the path supported by evidence.
63
-
64
- For source-truth conflicts or missing verification, the final line must be a direct choice question.
65
-
66
- For missing verification, ask whether to revise the plan to add a check or approve a specific verification path.
67
-
68
- ## Slice Execution
69
-
70
- Work in vertical slices.
71
-
72
- For each slice:
73
-
74
- - Make only the edits needed for that slice.
75
- - Keep the slice boundary intact; do not blend future slices into the current one for convenience.
76
- - Run the planned check or the smallest equivalent check.
77
- - If the check fails, stop and report the evidence before changing direction.
78
- - If new evidence invalidates the plan, stop before patching forward.
79
-
80
- When TDD is requested by the user, plan, or repo practice, use TDD inside the slice:
81
-
82
- ```text
83
- one behavior test or benchmark
84
- -> minimal implementation
85
- -> refactor while green
86
- -> verify the slice
87
- ```
88
-
89
- Do not write all tests first and all implementation later. Do not anticipate future slices.
90
-
91
- After a planned verification command fails, do not edit the verifier, tests, docs, policy, source-truth files, or unrelated code to make it pass. This is true even when the verifier appears wrong and even when the user said to "fix whatever is needed". A bad verifier is a plan defect; stop, report the failing command and conflicting evidence, and ask whether to revise the plan or change the source truth.
92
-
93
- Local reversible implementation details can be chosen from repo conventions.
94
-
95
- If per-slice commits are requested, do not continue to the next slice with a verified slice still uncommitted. Route to `commit-work` after review/verification evidence exists.
96
-
97
- ## Review Checkpoints
98
-
99
- Use review where the plan, risk, or slice boundary calls for it. Do not review every slice by habit.
100
-
101
- A non-passing review is a phase exit, not an autonomous patch loop.
102
-
103
- When a review returns findings during execution:
104
-
105
- 1. Inspect the relevant code, tests, docs, plan, and source truth.
106
- 2. Classify each material finding: accepted, rejected, question, or needs evidence.
107
- 3. Report the route before editing from that review batch.
108
-
109
- The turn that receives a non-passing review ends with adjudication and route only. Do not edit from that review batch in the same turn, even when the user or reviewer says to apply all findings and continue reviewing.
110
-
111
- Do not immediately apply findings and request another review in the same loop. Do not treat non-blocking findings or reviewer questions as automatic failure.
112
-
113
- If all accepted findings are small, in-scope, and supported by source truth, recommend a bounded fix pass as the next route. Do not perform that fix pass until the user or parent explicitly chooses it after seeing the adjudication. If findings change scope, behavior, source truth, public API, security, privacy, billing, data loss, compatibility, or architecture, route backward before editing.
114
-
115
- Three review passes is the hard cap for the same slice/work scope. At pass 3, stop, classify, and diagnose. Do not request a fourth broad review. Use a `diagnose-failure`-style loop to decide whether the issue is shallow research, weak spec, wrong plan slice, ambiguous policy, source-truth conflict, shallow module/interface, implementation bug, or stale reviewer context.
116
-
117
- ## Backward Edge
118
-
119
- If implementation reveals that the plan is wrong, incomplete, or too narrow, re-enter research/spec/plan before continuing.
120
-
121
- Do not absorb material scope expansion into execution. New behavior, API shape, security/privacy/billing/data-loss decisions, compatibility changes, or irreversible architecture usually need a revised spec or plan.
122
-
123
- ## Completion
124
-
125
- Report:
126
-
127
- - What changed.
128
- - What was verified.
129
- - Review status and any adjudicated findings.
130
- - Commit or handoff status when relevant.
131
- - What remains unverified.
132
- - Any blocked decisions or plan changes needed.
@@ -1,122 +0,0 @@
1
- # Execute Plan Map
2
-
3
- Use this when carrying out a multi-slice plan, resuming from handoff, combining TDD with execution, deciding whether to review/commit, or handling failed checks/reviews/scope changes.
4
-
5
- The map is a control surface, not ceremony. Small reversible slices can use the compact map only.
6
-
7
- ## Compact Map
8
-
9
- ```text
10
- Orient
11
- -> Slice contract
12
- -> Red / Green / Refactor when TDD applies
13
- -> Verify
14
- -> Review checkpoint when needed
15
- -> Commit or handoff checkpoint when needed
16
- -> Next slice
17
-
18
- Any failed check, non-pass review, source conflict, or scope expansion
19
- -> Classify evidence
20
- -> Report route
21
- -> Fix | Diagnose | Research | Spec | Plan | Stop
22
- ```
23
-
24
- ## Contract Map
25
-
26
- Before a non-trivial slice, name:
27
-
28
- ```text
29
- Slice: what part of the plan is active
30
- Source truth: spec/docs/tests/policies/code that own behavior
31
- Module/interface changed: outside contract affected by this slice
32
- Behavior/test/benchmark: observable behavior to prove
33
- Verification: command or check that proves this slice
34
- Review checkpoint: none | after this slice | after stack | final
35
- Commit or handoff checkpoint: when rollback/resume needs a snapshot
36
- Stop conditions: decisions/conflicts/failures that end the slice
37
- ```
38
-
39
- A slice contract prevents hidden broadening. If the contract changes materially, stop and route backward.
40
-
41
- ## Reference Map
42
-
43
- ```mermaid
44
- flowchart TD
45
- Start([Plan or handoff]) --> Orient[Orient<br/>read plan, source truth, live code]
46
- Orient --> Contract[Slice contract<br/>boundary + interface + checks]
47
- Contract --> Decision{Can execute safely?}
48
-
49
- Decision -->|yes| Build[Build slice<br/>TDD vertical loop if applicable]
50
- Decision -->|missing plan/check/decision| Back[Backward route<br/>research / spec / plan / owner]
51
-
52
- Build --> Verify[Verify planned check]
53
- Verify -->|pass| ReviewGate{Review needed now?}
54
- Verify -->|fail| Fail[Classify failure evidence]
55
-
56
- ReviewGate -->|no| Checkpoint[Commit/handoff checkpoint if needed]
57
- ReviewGate -->|yes| Review[Review checkpoint]
58
- Review -->|pass| Checkpoint
59
- Review -->|non-pass| ReviewFail[Classify findings<br/>accepted / rejected / question / needs evidence]
60
-
61
- Checkpoint --> Next{Next slice?}
62
- Next -->|yes| Orient
63
- Next -->|no| Done([Complete / final verify / handoff])
64
-
65
- Fail --> Route{Route}
66
- ReviewFail --> Route
67
- Route -->|next bounded fix| Build
68
- Route -->|unclear or repeated| Diagnose[Diagnose]
69
- Route -->|source/scope decision| Back
70
- Diagnose --> Back
71
- ```
72
-
73
- ## Entry Points
74
-
75
- Use this map when the current task is:
76
-
77
- - start or continue an approved plan;
78
- - execute the next planned slice;
79
- - resume from a handoff;
80
- - run a TDD or benchmark-backed implementation slice;
81
- - handle a planned verification failure;
82
- - handle review findings during execution;
83
- - decide whether to commit after a slice;
84
- - context is getting low before the next slice;
85
- - implementation reveals scope or source truth changed.
86
-
87
- ## Exits
88
-
89
- - **Forward** — slice verified; next slice boundary is clear.
90
- - **Bounded fix** — accepted finding/check failure is small, in-scope, and source-truth-supported.
91
- - **Commit checkpoint** — verified slice should be committed before continuing.
92
- - **Handoff checkpoint** — context is too low or continuation state must survive.
93
- - **Backward** — scope/source truth/review evidence invalidates the plan.
94
- - **Diagnose** — repeated failure or edge-case patching suggests a deeper problem.
95
- - **Stop** — blocked on owner decision or plan/spec/source change.
96
-
97
- ## Review Failure Routing
98
-
99
- A non-pass review is not an edit script.
100
-
101
- Classify before action:
102
-
103
- - **Accepted** — valid, source-truth-supported, and in scope.
104
- - **Rejected** — stale, unsupported, already resolved, equivalent, or not important.
105
- - **Question** — needs owner/product/domain/security/API/etc. decision.
106
- - **Needs evidence** — inspect before deciding.
107
-
108
- Route:
109
-
110
- - Accepted + bounded + in scope -> recommend one fix pass next; do not perform it in the same turn that received the non-pass review.
111
- - Non-blocking -> defer or bundle only when safe.
112
- - Question -> ask; do not implement the answer silently.
113
- - Needs evidence -> inspect or diagnose before editing.
114
- - Third review pass -> diagnose; no fourth broad review.
115
-
116
- Repeated edge-case findings are a design signal. Ask whether the module/interface is too shallow, the plan slice is wrong, the spec is under-specified, or reviewer context is stale.
117
-
118
- ## Context And Snapshot Discipline
119
-
120
- Do not start a slice if you cannot finish the edit, verification, and checkpoint in the current context window.
121
-
122
- When per-slice commits are requested, a verified slice should route to `commit-work` before the next slice. When a commit is not appropriate, make a handoff if future execution depends on the slice state.
@@ -1,66 +0,0 @@
1
- ---
2
- name: handoff
3
- description: Use when creating, updating, or relying on a temporary or durable handoff for a future agent/session, especially before compaction, pausing work, transferring context to a new chat, storing project memory, or resuming from another agent's notes.
4
- ---
5
-
6
- # Handoff
7
-
8
- Create compact continuation context for a fresh agent. Handoffs are memory, not authority.
9
-
10
- ## Stop First: Unsafe Shape
11
-
12
- If the user asks for an authoritative, exhaustive, transcript-style, no-reinspection, or full-inventory handoff, do not inspect, classify, or write yet.
13
-
14
- A direct `/handoff` command, explicit path, or "this is permission" does not override this stop.
15
-
16
- Name the conflict with handoff memory rules and ask whether to follow the requested shape or write compact evidence-linked memory.
17
-
18
- ## Stop First: Ambiguous Destination
19
-
20
- If a request leaves temp handoff versus repo memory unclear, do not inspect, classify, or write yet.
21
-
22
- This includes prompts like:
23
-
24
- - "let's compact before the next task"
25
- - "after compaction, but maybe repo memory"
26
- - "temporary, unless you think it is important"
27
- - "you decide" when temp vs memory is still unclear
28
- - local convention points to `docs/handoffs/`, but the skill default points to temp
29
- - the user says handoffs have been stored in `docs/handoffs/`, but does not say to write this one there
30
-
31
- Ask one question and stop:
32
-
33
- ```txt
34
- Should this be a temporary handoff for the next chat, or a repo memory handoff under `docs/handoffs/`?
35
- ```
36
-
37
- First classify the handoff:
38
-
39
- - **Temp handoff**: for compaction, ending a chat, or continuing soon in a fresh chat. Save to the OS temp directory unless the user gives a path.
40
- - **Memory handoff**: for durable project memory, future-agent context, or explicit repo storage. Save to the repo's existing handoff location, usually `docs/handoffs/`.
41
-
42
- Memory handoffs are still memory, not authority. They must not replace live repo inspection, promise no reinspection, or include full transcripts/file inventories.
43
-
44
- Temp handoffs should optimize for immediate continuation in the next chat.
45
-
46
- Memory handoffs should optimize for durable decisions, stable context, next actions, and evidence pointers.
47
-
48
- After destination is clear, read `references/templates.md` when creating a saved handoff or when a compact shape would prevent transcript-style bloat.
49
-
50
- Always:
51
-
52
- - Reference existing artifacts by path instead of copying them.
53
- - Redact secrets, tokens, credentials, and private personal data.
54
- - Say when live repo evidence should override stale handoff text.
55
- - Keep the document small enough that a future agent can read before working.
56
-
57
- Avoid:
58
-
59
- - Full transcript dumps.
60
- - Volatile repo inventories, directory trees, or tech-stack summaries.
61
- - Claims of completion without verification evidence.
62
-
63
- When resuming from a handoff:
64
- - Inspect the referenced live files before acting on consequential claims.
65
- - If the handoff conflicts with docs, tests, specs, policies, ADRs, or established behavior, stop and ask before editing.
66
- - If the handoff says work is done, verify before repeating that claim.