@haposoft/cafekit 0.16.0-rc.7 → 0.16.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 (299) hide show
  1. package/README.md +116 -27
  2. package/bin/__tests__/codex-hooks-ownership.test.js +239 -0
  3. package/bin/__tests__/codex-hooks.test.js +295 -0
  4. package/bin/__tests__/codex-native.test.js +2289 -34
  5. package/bin/__tests__/develop-contract.test.js +400 -23
  6. package/bin/__tests__/installer-safety.test.js +3 -3
  7. package/bin/__tests__/optional-skill-inventory.test.js +249 -0
  8. package/bin/__tests__/output-styles.test.js +214 -0
  9. package/bin/__tests__/package-inventory.test.js +2131 -16
  10. package/bin/__tests__/runtime-schema.test.js +111 -0
  11. package/bin/__tests__/secret-output-guardrail.test.js +122 -0
  12. package/bin/__tests__/skill-routing-source.test.js +172 -0
  13. package/bin/__tests__/specs-v2-execution-closeout.test.js +1 -1
  14. package/bin/install.js +10 -0
  15. package/bin/lib/codex-install.js +170 -5
  16. package/bin/lib/context.js +14 -0
  17. package/bin/lib/i18n.js +12 -6
  18. package/bin/lib/skill-deps.js +5 -5
  19. package/bin/phases/claude-runtime.js +23 -0
  20. package/bin/phases/claude-settings.js +8 -0
  21. package/bin/phases/codex-hooks.js +156 -0
  22. package/bin/phases/codex-runtime.js +29 -38
  23. package/bin/phases/copy-payload.js +8 -2
  24. package/bin/phases/select-skill-bundles.js +96 -0
  25. package/bin/phases/skill-inventory.js +71 -0
  26. package/bin/phases/skills-setup.js +9 -2
  27. package/bin/phases/write-metadata.js +8 -5
  28. package/package.json +8 -2
  29. package/src/claude/CLAUDE.md +3 -3
  30. package/src/claude/agents/brainstormer.md +52 -69
  31. package/src/claude/agents/code-auditor.md +32 -14
  32. package/src/claude/agents/debugger.md +35 -20
  33. package/src/claude/agents/deployer.md +12 -5
  34. package/src/claude/agents/docs-keeper.md +11 -1
  35. package/src/claude/agents/implementer.md +25 -13
  36. package/src/claude/agents/inspector.md +6 -3
  37. package/src/claude/agents/project-manager.md +1 -1
  38. package/src/claude/agents/researcher.md +26 -55
  39. package/src/claude/agents/spec-maker.md +24 -13
  40. package/src/claude/agents/strategist.md +52 -0
  41. package/src/claude/agents/test-runner.md +117 -132
  42. package/src/claude/agents/ui-ux-designer.md +1 -1
  43. package/src/claude/hooks/__tests__/fixtures/statusline-default.golden +1 -0
  44. package/src/claude/hooks/__tests__/precompact.test.js +158 -0
  45. package/src/claude/hooks/__tests__/spec-gate.test.js +87 -4
  46. package/src/claude/hooks/__tests__/state.test.js +254 -3
  47. package/src/claude/hooks/__tests__/statusline.test.js +196 -0
  48. package/src/claude/hooks/agent.cjs +1 -1
  49. package/src/claude/hooks/docs-sync.cjs +12 -10
  50. package/src/claude/hooks/inspect-block.cjs +1 -1
  51. package/src/claude/hooks/lib/config.cjs +3 -0
  52. package/src/claude/hooks/lib/hook-state-dir.cjs +39 -0
  53. package/src/claude/hooks/lib/secret-keywords.cjs +42 -0
  54. package/src/claude/hooks/precompact.cjs +105 -0
  55. package/src/claude/hooks/rules.cjs +1 -1
  56. package/src/claude/hooks/secret-output-guardrail.cjs +43 -0
  57. package/src/claude/hooks/session.cjs +27 -1
  58. package/src/claude/hooks/spec-gate.cjs +3 -3
  59. package/src/claude/hooks/spec-state.cjs +32 -5
  60. package/src/claude/hooks/state.cjs +1 -1
  61. package/src/claude/hooks/task-scaffold-guard.cjs +1 -1
  62. package/src/claude/hooks/usage.cjs +1 -1
  63. package/src/claude/migration-manifest.json +29 -15
  64. package/src/claude/output-styles/coding-level-0-eli5.md +103 -0
  65. package/src/claude/output-styles/coding-level-1-junior.md +124 -0
  66. package/src/claude/output-styles/coding-level-2-mid.md +146 -0
  67. package/src/claude/output-styles/coding-level-3-senior.md +148 -0
  68. package/src/claude/output-styles/coding-level-4-lead.md +159 -0
  69. package/src/claude/output-styles/coding-level-5-god.md +91 -0
  70. package/src/claude/references/debugger/core-philosophy.md +5 -3
  71. package/src/claude/references/debugger/frontend-verification.md +2 -2
  72. package/src/claude/references/debugger/log-ci-analysis.md +13 -1
  73. package/src/claude/references/debugger/parallel-agent-hydration.md +19 -34
  74. package/src/claude/references/debugger/performance-diagnostics.md +2 -2
  75. package/src/claude/references/debugger/root-cause-tracing.md +37 -6
  76. package/src/claude/references/debugger/side-effect-gate.md +3 -1
  77. package/src/claude/references/debugger/verification-protocol.md +13 -12
  78. package/src/claude/rules/orchestrator.md +7 -1
  79. package/src/claude/rules/process-management.md +39 -0
  80. package/src/claude/rules/review-audit-self-decision.md +48 -0
  81. package/src/claude/rules/skill-domain-routing.md +26 -24
  82. package/src/claude/rules/skill-workflow-routing.md +22 -14
  83. package/src/claude/rules/workflow.md +3 -3
  84. package/src/claude/runtime.json +1 -0
  85. package/src/claude/runtime.schema.json +205 -0
  86. package/src/claude/scripts/generate-skill-catalog.cjs +156 -122
  87. package/src/claude/scripts/provenance.cjs +18 -5
  88. package/src/claude/scripts/spec-receipt.cjs +76 -21
  89. package/src/claude/scripts/spec-resolver.cjs +144 -4
  90. package/src/claude/scripts/workflow-policy.cjs +1 -1
  91. package/src/claude/settings/settings.json +16 -0
  92. package/src/claude/skills/agent-browser/SKILL.md +1 -1
  93. package/src/claude/skills/ai-multimodal/SKILL.md +1 -1
  94. package/src/claude/skills/brainstorm/SKILL.md +193 -172
  95. package/src/claude/skills/brainstorm/references/question-framework.md +105 -167
  96. package/src/claude/skills/chrome-devtools/SKILL.md +1 -1
  97. package/src/claude/skills/code-review/SKILL.md +43 -25
  98. package/src/claude/skills/code-review/references/spec-compliance-review.md +3 -4
  99. package/src/claude/skills/code-review/references/verification-gate.md +1 -1
  100. package/src/claude/skills/debug/SKILL.md +48 -19
  101. package/src/claude/skills/delegate/SKILL.md +1 -1
  102. package/src/claude/skills/develop/SKILL.md +92 -65
  103. package/src/claude/skills/develop/references/parallel-waves.md +36 -63
  104. package/src/claude/skills/develop/references/quality-gate.md +31 -4
  105. package/src/claude/skills/develop/references/subagent-patterns.md +21 -7
  106. package/src/claude/skills/docs/SKILL.md +42 -23
  107. package/src/claude/skills/docs/references/init-workflow.md +4 -4
  108. package/src/claude/skills/docs/references/reconstruct-workflow.md +6 -6
  109. package/src/claude/skills/docs/references/standard-docs-workflow.md +6 -2
  110. package/src/claude/skills/docs/references/summarize-workflow.md +2 -2
  111. package/src/claude/skills/docs/references/update-workflow.md +9 -7
  112. package/src/claude/skills/docs/templates/requirements-as-is.md +1 -1
  113. package/src/claude/skills/docx/SKILL.md +1 -1
  114. package/src/claude/skills/git/SKILL.md +1 -1
  115. package/src/claude/skills/git/references/commit-protocols.md +1 -1
  116. package/src/claude/skills/git/references/finish-branch.md +1 -1
  117. package/src/claude/skills/hotfix/SKILL.md +159 -170
  118. package/src/claude/skills/hotfix/references/diagnosis-protocol.md +14 -9
  119. package/src/claude/skills/hotfix/references/parallel-patterns.md +27 -13
  120. package/src/claude/skills/hotfix/references/prevention-gate.md +5 -0
  121. package/src/claude/skills/hotfix/references/review-cycle.md +21 -15
  122. package/src/claude/skills/hotfix/references/workflow-specialized.md +53 -21
  123. package/src/claude/skills/inspect/SKILL.md +55 -46
  124. package/src/claude/skills/inspect/references/internal-inspection.md +21 -5
  125. package/src/claude/skills/loop/SKILL.md +114 -0
  126. package/src/claude/skills/loop/references/bounded-loop-protocol.md +104 -0
  127. package/src/claude/skills/loop/references/metric-and-guard-contract.md +76 -0
  128. package/src/claude/skills/pdf/SKILL.md +1 -1
  129. package/src/claude/skills/pptx/SKILL.md +1 -1
  130. package/src/claude/skills/question/SKILL.md +16 -13
  131. package/src/claude/skills/research/SKILL.md +70 -43
  132. package/src/claude/skills/route/SKILL.md +94 -0
  133. package/src/claude/skills/route/references/agent-timing.md +46 -0
  134. package/src/claude/skills/route/references/chaining-patterns.md +53 -0
  135. package/src/claude/skills/route/references/task-taxonomy.md +48 -0
  136. package/src/claude/skills/specs/SKILL.md +48 -57
  137. package/src/claude/skills/specs/references/review.md +26 -8
  138. package/src/claude/skills/specs/references/templates.md +76 -31
  139. package/src/claude/skills/specs/templates/requirements-init.md +1 -1
  140. package/src/claude/skills/specs/templates/research.md +2 -2
  141. package/src/claude/skills/sync/SKILL.md +6 -6
  142. package/src/claude/skills/sync/references/sync-protocols.md +1 -1
  143. package/src/claude/skills/test/SKILL.md +120 -120
  144. package/src/claude/skills/test/references/execution-strategy.md +208 -361
  145. package/src/claude/skills/test/references/failure-triage.md +55 -121
  146. package/src/claude/skills/test/references/test-memory.md +20 -34
  147. package/src/claude/skills/ui-ux-pro-max/SKILL.md +1 -1
  148. package/src/claude/skills/web-testing/SKILL.md +1 -1
  149. package/src/claude/skills/xlsx/SKILL.md +1 -1
  150. package/src/claude/status.cjs +135 -33
  151. package/src/codex/AGENTS.md +14 -4
  152. package/src/codex/hooks/docs-sync.cjs +8 -3
  153. package/src/codex/hooks/lib/hook-context.cjs +18 -4
  154. package/src/codex/hooks/rules.cjs +29 -1
  155. package/src/codex/hooks/secret-output-guardrail.cjs +30 -0
  156. package/src/codex/hooks/spec-gate.cjs +3 -8
  157. package/src/codex/hooks/spec-state.cjs +34 -5
  158. package/src/codex/hooks.json +5 -0
  159. package/src/codex/runtime.json +2 -0
  160. package/src/common/.env.example +1 -1
  161. package/src/claude/skills/backend-development/SKILL.md +0 -101
  162. package/src/claude/skills/backend-development/references/backend-api-design.md +0 -495
  163. package/src/claude/skills/backend-development/references/backend-architecture.md +0 -454
  164. package/src/claude/skills/backend-development/references/backend-authentication.md +0 -338
  165. package/src/claude/skills/backend-development/references/backend-code-quality.md +0 -659
  166. package/src/claude/skills/backend-development/references/backend-debugging.md +0 -904
  167. package/src/claude/skills/backend-development/references/backend-devops.md +0 -491
  168. package/src/claude/skills/backend-development/references/backend-mindset.md +0 -387
  169. package/src/claude/skills/backend-development/references/backend-performance.md +0 -397
  170. package/src/claude/skills/backend-development/references/backend-security.md +0 -342
  171. package/src/claude/skills/backend-development/references/backend-technologies.md +0 -256
  172. package/src/claude/skills/backend-development/references/backend-testing.md +0 -429
  173. package/src/claude/skills/devops/.env.example +0 -76
  174. package/src/claude/skills/devops/SKILL.md +0 -102
  175. package/src/claude/skills/devops/references/browser-rendering.md +0 -305
  176. package/src/claude/skills/devops/references/cloudflare-d1-kv.md +0 -123
  177. package/src/claude/skills/devops/references/cloudflare-platform.md +0 -271
  178. package/src/claude/skills/devops/references/cloudflare-r2-storage.md +0 -280
  179. package/src/claude/skills/devops/references/cloudflare-workers-advanced.md +0 -312
  180. package/src/claude/skills/devops/references/cloudflare-workers-apis.md +0 -309
  181. package/src/claude/skills/devops/references/cloudflare-workers-basics.md +0 -418
  182. package/src/claude/skills/devops/references/docker-basics.md +0 -297
  183. package/src/claude/skills/devops/references/docker-compose.md +0 -292
  184. package/src/claude/skills/devops/references/gcloud-platform.md +0 -297
  185. package/src/claude/skills/devops/references/gcloud-services.md +0 -304
  186. package/src/claude/skills/devops/references/kubernetes-basics.md +0 -95
  187. package/src/claude/skills/devops/references/kubernetes-helm-advanced.md +0 -70
  188. package/src/claude/skills/devops/references/kubernetes-helm.md +0 -81
  189. package/src/claude/skills/devops/references/kubernetes-kubectl.md +0 -74
  190. package/src/claude/skills/devops/references/kubernetes-security-advanced.md +0 -94
  191. package/src/claude/skills/devops/references/kubernetes-security.md +0 -89
  192. package/src/claude/skills/devops/references/kubernetes-troubleshooting-advanced.md +0 -74
  193. package/src/claude/skills/devops/references/kubernetes-troubleshooting.md +0 -49
  194. package/src/claude/skills/devops/references/kubernetes-workflows-advanced.md +0 -75
  195. package/src/claude/skills/devops/references/kubernetes-workflows.md +0 -76
  196. package/src/claude/skills/devops/scripts/cloudflare_deploy.py +0 -269
  197. package/src/claude/skills/devops/scripts/docker_optimize.py +0 -332
  198. package/src/claude/skills/devops/scripts/requirements.txt +0 -20
  199. package/src/claude/skills/devops/scripts/tests/requirements.txt +0 -3
  200. package/src/claude/skills/devops/scripts/tests/test_cloudflare_deploy.py +0 -285
  201. package/src/claude/skills/devops/scripts/tests/test_docker_optimize.py +0 -436
  202. package/src/claude/skills/frontend-design/SKILL.md +0 -135
  203. package/src/claude/skills/frontend-design/references/ai-multimodal-overview.md +0 -165
  204. package/src/claude/skills/frontend-design/references/analysis-best-practices.md +0 -80
  205. package/src/claude/skills/frontend-design/references/analysis-prompts.md +0 -141
  206. package/src/claude/skills/frontend-design/references/analysis-techniques.md +0 -118
  207. package/src/claude/skills/frontend-design/references/animejs.md +0 -396
  208. package/src/claude/skills/frontend-design/references/anti-slop-rules.md +0 -103
  209. package/src/claude/skills/frontend-design/references/asset-generation.md +0 -337
  210. package/src/claude/skills/frontend-design/references/bento-motion-engine.md +0 -142
  211. package/src/claude/skills/frontend-design/references/design-extraction-overview.md +0 -71
  212. package/src/claude/skills/frontend-design/references/extraction-best-practices.md +0 -141
  213. package/src/claude/skills/frontend-design/references/extraction-output-templates.md +0 -162
  214. package/src/claude/skills/frontend-design/references/extraction-prompts.md +0 -127
  215. package/src/claude/skills/frontend-design/references/magicui-components.md +0 -129
  216. package/src/claude/skills/frontend-design/references/performance-guardrails.md +0 -169
  217. package/src/claude/skills/frontend-design/references/premium-design-patterns.md +0 -93
  218. package/src/claude/skills/frontend-design/references/redesign-audit-checklist.md +0 -114
  219. package/src/claude/skills/frontend-design/references/technical-accessibility.md +0 -119
  220. package/src/claude/skills/frontend-design/references/technical-best-practices.md +0 -97
  221. package/src/claude/skills/frontend-design/references/technical-optimization.md +0 -44
  222. package/src/claude/skills/frontend-design/references/technical-overview.md +0 -90
  223. package/src/claude/skills/frontend-design/references/technical-workflows.md +0 -150
  224. package/src/claude/skills/frontend-design/references/visual-analysis-overview.md +0 -95
  225. package/src/claude/skills/frontend-design/references/workflow-3d.md +0 -102
  226. package/src/claude/skills/frontend-design/references/workflow-describe.md +0 -87
  227. package/src/claude/skills/frontend-design/references/workflow-immersive.md +0 -87
  228. package/src/claude/skills/frontend-design/references/workflow-quick.md +0 -57
  229. package/src/claude/skills/frontend-design/references/workflow-screenshot.md +0 -63
  230. package/src/claude/skills/frontend-design/references/workflow-video.md +0 -74
  231. package/src/claude/skills/frontend-development/SKILL.md +0 -406
  232. package/src/claude/skills/frontend-development/resources/common-patterns.md +0 -331
  233. package/src/claude/skills/frontend-development/resources/complete-examples.md +0 -872
  234. package/src/claude/skills/frontend-development/resources/component-patterns.md +0 -502
  235. package/src/claude/skills/frontend-development/resources/data-fetching.md +0 -767
  236. package/src/claude/skills/frontend-development/resources/file-organization.md +0 -502
  237. package/src/claude/skills/frontend-development/resources/loading-and-error-states.md +0 -501
  238. package/src/claude/skills/frontend-development/resources/performance.md +0 -406
  239. package/src/claude/skills/frontend-development/resources/routing-guide.md +0 -364
  240. package/src/claude/skills/frontend-development/resources/styling-guide.md +0 -428
  241. package/src/claude/skills/frontend-development/resources/typescript-standards.md +0 -418
  242. package/src/claude/skills/mobile-development/SKILL.md +0 -218
  243. package/src/claude/skills/mobile-development/references/mobile-android.md +0 -604
  244. package/src/claude/skills/mobile-development/references/mobile-best-practices.md +0 -544
  245. package/src/claude/skills/mobile-development/references/mobile-debugging.md +0 -1089
  246. package/src/claude/skills/mobile-development/references/mobile-frameworks.md +0 -465
  247. package/src/claude/skills/mobile-development/references/mobile-ios.md +0 -496
  248. package/src/claude/skills/mobile-development/references/mobile-mindset.md +0 -542
  249. package/src/claude/skills/react-best-practices/AGENTS.md +0 -2249
  250. package/src/claude/skills/react-best-practices/README.md +0 -123
  251. package/src/claude/skills/react-best-practices/SKILL.md +0 -128
  252. package/src/claude/skills/react-best-practices/metadata.json +0 -15
  253. package/src/claude/skills/react-best-practices/rules/_sections.md +0 -46
  254. package/src/claude/skills/react-best-practices/rules/_template.md +0 -28
  255. package/src/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  256. package/src/claude/skills/react-best-practices/rules/advanced-use-latest.md +0 -49
  257. package/src/claude/skills/react-best-practices/rules/async-api-routes.md +0 -38
  258. package/src/claude/skills/react-best-practices/rules/async-defer-await.md +0 -80
  259. package/src/claude/skills/react-best-practices/rules/async-dependencies.md +0 -36
  260. package/src/claude/skills/react-best-practices/rules/async-parallel.md +0 -28
  261. package/src/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
  262. package/src/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
  263. package/src/claude/skills/react-best-practices/rules/bundle-conditional.md +0 -31
  264. package/src/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
  265. package/src/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  266. package/src/claude/skills/react-best-practices/rules/bundle-preload.md +0 -50
  267. package/src/claude/skills/react-best-practices/rules/client-event-listeners.md +0 -74
  268. package/src/claude/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
  269. package/src/claude/skills/react-best-practices/rules/js-batch-dom-css.md +0 -82
  270. package/src/claude/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
  271. package/src/claude/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
  272. package/src/claude/skills/react-best-practices/rules/js-cache-storage.md +0 -70
  273. package/src/claude/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
  274. package/src/claude/skills/react-best-practices/rules/js-early-exit.md +0 -50
  275. package/src/claude/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
  276. package/src/claude/skills/react-best-practices/rules/js-index-maps.md +0 -37
  277. package/src/claude/skills/react-best-practices/rules/js-length-check-first.md +0 -49
  278. package/src/claude/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
  279. package/src/claude/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
  280. package/src/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
  281. package/src/claude/skills/react-best-practices/rules/rendering-activity.md +0 -26
  282. package/src/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  283. package/src/claude/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
  284. package/src/claude/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
  285. package/src/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  286. package/src/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  287. package/src/claude/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
  288. package/src/claude/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
  289. package/src/claude/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
  290. package/src/claude/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
  291. package/src/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
  292. package/src/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  293. package/src/claude/skills/react-best-practices/rules/rerender-memo.md +0 -44
  294. package/src/claude/skills/react-best-practices/rules/rerender-transitions.md +0 -40
  295. package/src/claude/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
  296. package/src/claude/skills/react-best-practices/rules/server-cache-lru.md +0 -41
  297. package/src/claude/skills/react-best-practices/rules/server-cache-react.md +0 -26
  298. package/src/claude/skills/react-best-practices/rules/server-parallel-fetching.md +0 -79
  299. package/src/claude/skills/react-best-practices/rules/server-serialization.md +0 -38
@@ -0,0 +1,76 @@
1
+ # Metric and Guard contract
2
+
3
+ Freeze this contract before mutation. If any field changes, stop for drift; do
4
+ not silently recompute the baseline under new rules.
5
+
6
+ ## Required Metric fields
7
+
8
+ - `argv`: nonempty trusted argv vector; no shell string.
9
+ - `cwd`: canonical detached worktree root, fixed by Loop.
10
+ - `unit`: one nonempty unit label.
11
+ - `direction`: exactly `higher` or `lower`.
12
+ - `sample_count`: integer at least 3, identical for baseline and candidates.
13
+ - `timeout_ms`: positive integer per sample.
14
+ - `minimum_delta`: finite nonnegative number in the declared unit.
15
+ - `numeric_format`: exactly IEEE-754 binary64, roundTiesToEven after every
16
+ operation, with negative zero normalized to positive zero.
17
+ - `environment`: fixed allowlisted names and redacted non-secret values; no
18
+ inherited credential or mutable random/time seed unless explicitly frozen.
19
+
20
+ Each successful sample must emit exactly one trimmed UTF-8 line matching
21
+ `^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$`. Reject empty,
22
+ multi-line, multi-value, `NaN`, `Infinity`, unit-suffixed, nonzero exit, signaled,
23
+ or timed-out output. Parse to a finite number without locale-dependent separators.
24
+ Reject a decimal with a nonzero significand when binary64 parsing underflows it
25
+ to zero.
26
+
27
+ ## Fixed calculation
28
+
29
+ For each sample set:
30
+
31
+ 1. Sort binary64 values and calculate the median. For an even count with central
32
+ values `lower <= upper`, use `lower + (upper - lower) / 2` when both have the
33
+ same sign (zero may join either sign); otherwise use
34
+ `lower / 2 + upper / 2`. Apply binary64 roundTiesToEven after every operation
35
+ and normalize negative zero to positive zero.
36
+ 2. Calculate noise as the maximum absolute distance from that median.
37
+ 3. For `higher`, improvement is `candidate_median - best_median`; for `lower`,
38
+ improvement is `best_median - candidate_median`.
39
+ 4. Calculate `required_delta = max(minimum_delta, best_noise + candidate_noise)`.
40
+ 5. Accept only when `improvement > required_delta` and Guard passes on the exact
41
+ candidate bytes. Equality is not an improvement.
42
+
43
+ After every operation, require median, noise, improvement, and required delta to
44
+ remain finite. A parsed nonzero value that became zero, an overflow, or a
45
+ non-finite derived value blocks the baseline or rejects the candidate; never
46
+ store it as current best. A rounded zero produced by subtraction is handled
47
+ conservatively as no improvement, never as a win.
48
+
49
+ The initial current best is the pinned baseline. Keep the accepted candidate's
50
+ median and noise as the next current best. Never compare a candidate against an
51
+ older, more favorable baseline or select one sample from a noisy set.
52
+
53
+ ## Guard independence
54
+
55
+ For code mutation, Guard is mandatory, fixed before baseline, and distinct from
56
+ Metric. It must validate correctness beyond the optimized outcome—for example a
57
+ relevant real test command, typecheck, or invariant checker. A second invocation
58
+ of Metric, a threshold over the same output, or an oracle the loop may edit is
59
+ not an independent Guard.
60
+
61
+ Run Guard after Metric on the identical candidate fingerprint. Guard passes only
62
+ with its predeclared literal exit/oracle and zero required skips; `NO_TESTS`,
63
+ warning-only, partial, flaky-history waiver, or changed Guard bytes do not pass.
64
+ Metric and Guard may create disposable caches only at exact predeclared paths.
65
+ Snapshot the complete detached-worktree tracked/untracked state around each
66
+ oracle, subtract only that fixed cache allowlist, and treat every other byte,
67
+ mode, type, or path mutation—including outside Scope—as drift.
68
+
69
+ ## Reproducibility and drift
70
+
71
+ Record tool versions, immutable Metric/Guard/test/benchmark/dataset digests,
72
+ fixed inputs/data digest, relevant configuration digest,
73
+ base OID, scoped byte manifest digest, and environment fingerprint. Stop when any
74
+ of them changes. Report variance and raw sample values; do not hide outliers or
75
+ retry only bad samples. A failed sample rejects the candidate rather than being
76
+ dropped from aggregation.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: hapo:pdf
2
+ name: cf:pdf
3
3
  description: Extract text/tables, create, merge, split PDFs. Fill PDF forms programmatically. Use for PDF processing, generation, form filling, document analysis, batch operations.
4
4
  license: Proprietary. LICENSE.txt has complete terms
5
5
  user-invocable: true
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: hapo:pptx
2
+ name: cf:pptx
3
3
  description: Create, edit, analyze .pptx PowerPoint files. Use for presentations, slides, layouts, speaker notes, template modification, content extraction, slide generation.
4
4
  license: Proprietary. LICENSE.txt has complete terms
5
5
  user-invocable: true
@@ -1,18 +1,18 @@
1
1
  ---
2
- name: hapo:question
2
+ name: cf:ask
3
3
  description: "Answer questions with evidence. Use when the user asks about project behavior, source code, specs, docs, configuration, dependencies, or external technical information; inspect the repo first, use internet/current docs when repo evidence is insufficient, and ask back only when the question cannot be answered safely."
4
4
  user-invocable: true
5
5
  when_to_use: "Invoke to answer project or technical questions with repo-first evidence."
6
6
  category: utilities
7
- keywords: [question, evidence, answer, research]
7
+ keywords: [ask, question, evidence, answer, research]
8
8
  argument-hint: "<question> [--repo|--web|--both|--brief|--deep]"
9
9
  metadata:
10
10
  author: haposoft
11
11
  version: "1.0.0"
12
12
  ---
13
- # Question Skill
13
+ # Ask Skill
14
14
 
15
- `hapo:question` is an evidence-backed question-answering skill. It answers user questions by checking the local project first, then external/current sources when the repository cannot answer the question.
15
+ `cf:ask` is an evidence-backed question-answering skill. It answers user questions by checking the local project first, then external/current sources when the repository cannot answer the question.
16
16
 
17
17
  ## Core Stance
18
18
 
@@ -29,7 +29,7 @@ The output is an answer, evidence, confidence, and a follow-up only when needed.
29
29
 
30
30
  ## When To Use
31
31
 
32
- Use `hapo:question` when the user asks:
32
+ Use `cf:ask` when the user asks:
33
33
  - "What does X do in this system?"
34
34
  - "Where is this flow handled?"
35
35
  - "What is the current config/version/package?"
@@ -41,10 +41,13 @@ Use `hapo:question` when the user asks:
41
41
 
42
42
  Do not use it when:
43
43
  - The user asks to implement, fix, debug, test, commit, or publish.
44
- - The user wants ideation/tradeoff exploration; use `hapo:brainstorm`.
45
- - The user wants a formal spec; use `hapo:specs`.
46
- - The user wants full legacy documentation reconstruction; use `hapo:docs --reconstruct`.
47
- - The user wants root-cause diagnosis for a failure; use `hapo:debug`.
44
+ - The user wants ideation/tradeoff exploration; use `cf:brainstorm`.
45
+ - The user wants a formal spec; use `cf:specs`.
46
+ - The user wants full legacy documentation reconstruction: use
47
+ `cf:docs --reconstruct` when the optional document bundle is installed;
48
+ otherwise use `cf:scout` plus source evidence, or explain how to install the
49
+ bundle with `npx @haposoft/cafekit --with-document-skills`.
50
+ - The user wants root-cause diagnosis for a failure; use `cf:debug`.
48
51
 
49
52
  ## Modes
50
53
 
@@ -77,7 +80,7 @@ Repo evidence priority:
77
80
  3. source files, tests, scripts, package manifests, config files
78
81
  4. git history only when the question asks about changes or provenance
79
82
 
80
- Use focused search (`rg`, targeted file reads) instead of broad scans. Use `hapo:inspect` when the user asks where something lives or the source surface is unclear.
83
+ Use focused search (`rg`, targeted file reads) instead of broad scans. Use `cf:scout` when the user asks where something lives or the source surface is unclear.
81
84
 
82
85
  External evidence:
83
86
  - Use external/current docs when repo evidence is absent, stale, or not authoritative.
@@ -138,7 +141,7 @@ Use `templates/question.md` when the user asks to save or document the answer.
138
141
  ### Source Question
139
142
 
140
143
  ```text
141
- /hapo:question "In this system, which file does cafekit use to toggle skill routing?"
144
+ /cf:ask "In this system, which file does cafekit use to toggle skill routing?"
142
145
  ```
143
146
 
144
147
  Expected behavior:
@@ -149,7 +152,7 @@ Expected behavior:
149
152
  ### Mixed Source + Web Question
150
153
 
151
154
  ```text
152
- /hapo:question "Which React version does this project use, and does that version still match current best practice?" --both
155
+ /cf:ask "Which React version does this project use, and does that version still match current best practice?" --both
153
156
  ```
154
157
 
155
158
  Expected behavior:
@@ -160,7 +163,7 @@ Expected behavior:
160
163
  ### Ask Back
161
164
 
162
165
  ```text
163
- /hapo:question "Is this system stable?"
166
+ /cf:ask "Is this system stable?"
164
167
  ```
165
168
 
166
169
  Expected behavior:
@@ -1,58 +1,85 @@
1
1
  ---
2
- name: hapo:research
3
- description: "Research technical solutions and analyze architectures. Acts as a command facade to trigger the 'researcher' subagent for multi-source verification and deep report synthesis."
2
+ name: cf:research
3
+ description: "Research technical decisions with proportional depth, traceable evidence, explicit uncertainty, and project-fit recommendations."
4
4
  user-invocable: true
5
- when_to_use: "Invoke for deep technical research and solution evaluation before building."
5
+ when_to_use: "Use for external technical facts, architecture comparisons, or decisions whose uncertainty needs multi-source evidence."
6
6
  category: research
7
- keywords: [research, evaluation, analysis, solutions]
8
- argument-hint: "<topic_or_question>"
7
+ keywords: [research, evidence, evaluation, architecture, comparison]
8
+ argument-hint: "<topic_or_decision>"
9
9
  metadata:
10
10
  author: haposoft
11
- version: "2.0.0"
11
+ version: "3.0.0"
12
12
  ---
13
- # Research (Delegation Facade)
13
+ # Research — proportional evidence for a decision
14
14
 
15
- **Mantra:** Return ranked recommendations with sources; never an unsorted list of options.
15
+ Return a decision-ready answer, not a search diary or an unsorted option list.
16
+ Research evaluates choices; it does not implement them or invent certainty.
16
17
 
17
- This skill acts as a **Command Facade**. When invoked, the main Orchestrator MUST NOT attempt to run WebSearch itself. Instead, it must instantly delegate the operation to the Specialized Subagent.
18
+ ## 1. Frame the decision
18
19
 
19
- ## Execution Sequence
20
+ Restate the decision, project constraints, affected consumers, and what evidence
21
+ would change the answer. Inspect current repository sources first whenever local
22
+ fit matters. Ask the user only when a missing choice materially changes scope or
23
+ safety; otherwise label bounded assumptions and continue.
20
24
 
21
- ### Phase 1: Clarification (Scope Lock)
22
- Before delegating, briefly assess the `[topic]`.
23
- - Is it vague? (e.g. "Research React"). If yes, immediately reject and demand the user specify the context (e.g. "Research SEO capabilities of React Server Components").
24
- - If solid, proceed.
25
+ ## 2. Select depth
25
26
 
26
- ### Phase 2: Agent Delegation
27
- Call the `Agent` tool to invoke the `researcher` subagent. Use `TaskCreate` only for task-list tracking when the workflow needs persistent task state.
28
- **Instructions to pass to Researcher:**
29
- ```text
30
- Conduct comprehensive research on: [topic]
31
- Constraint 1: ALWAYS use native `WebSearch` as the primary search method.
32
- Constraint 2: Validate key claims with multiple credible sources. Prioritize official docs, maintainers, release notes, and strong production references.
33
- Constraint 3: Use direct `WebFetch` only when search results are insufficient or raw source inspection is required.
34
- Constraint 4: Limit total search calls to a maximum of 5 distinct queries.
35
- Constraint 5: Stop excessive "chain-searching". Synthesize decisively once the evidence is sufficient.
36
- Output Format: Must strictly follow the 'Standard Research Report' layout.
37
- ```
27
+ Choose the smallest depth that can support the decision:
38
28
 
39
- ### Phase 3: The Standard Report Format (Mandatory)
40
- The subagent MUST return the findings formatted EXACTLY according to the built-in specification template.
29
+ | Depth | Route when | Evidence work |
30
+ |---|---|---|
31
+ | Quick | One low-risk, reversible fact or known option | Resolve the fact from one authoritative source; add a repository anchor when project fit matters. |
32
+ | Standard | Several viable options or a material integration choice | Verify material claims across at least two independent authoritative sources where available; compare fit and tradeoffs. |
33
+ | Deep | High blast radius, hard-to-reverse architecture, security/compliance, substantial cost, or conflicting evidence | Complete Standard, then run a separate contradiction-and-gap round; use at least three independent sources for disputed material claims where available. |
41
34
 
42
- Instruct the Researcher Subagent with this strict requirement:
43
- > "Use the template at .claude/skills/specs/templates/research.md verbatim. Do not add sections beyond it."
35
+ Escalate depth when evidence conflicts, a primary source is missing, or a finding
36
+ changes the decision boundary. Do not inflate source counts with mirrors or
37
+ articles that repeat the same upstream claim. Stop when new evidence no longer
38
+ changes the ranking, limitations, or unresolved gaps.
44
39
 
45
- ## Post-Execution
46
- Once the `researcher` completes the Task and returns the Markdown output, save it based on context:
40
+ ## 3. Gather evidence
47
41
 
48
- ### Output Routing
49
- | Context | Save to | Example |
50
- |---|---|---|
51
- | Active spec exists (`specs/<feature>/`) | `specs/<feature>/research.md` | `specs/auth-login/research.md` |
52
- | No active spec (system-wide / general) | `specs/_shared/Research-<slug>-<date>.md` | `specs/_shared/Research-mv3-best-practices-2026-04-11.md` |
53
-
54
- ### Rules
55
- 1. **Feature research** → Always save inside the active spec folder. If `specs/<feature>/` doesn't exist yet, create it.
56
- 2. **System-wide research** → Save to `specs/_shared/`. Create the directory if it doesn't exist.
57
- 3. **Never** save to `plans/reports/` or `docs/`. All research belongs in `specs/`.
58
- 4. Conclude the workflow by providing the user with the saved file path.
42
+ - Repository claims: cite a resolvable `path:line` anchor from current bytes.
43
+ - External claims: prefer current official documentation, standards, research
44
+ papers, maintainer material, and release notes. Browse when facts may have
45
+ changed; record the source date or applicable version.
46
+ - For each material claim record: claim, URL or repository anchor, authority,
47
+ date/version, applicability to this project, and status
48
+ `confirmed | inferred | unresolved`.
49
+ - A source count is not confidence. Explain conflicts, missing primary evidence,
50
+ version mismatch, and why a source does or does not apply.
51
+
52
+ Use delegated researchers only as optional acceleration when two or more
53
+ independent evidence tracks can be bounded. The controller owns the question,
54
+ source reconciliation, and final recommendation. If delegation is unavailable,
55
+ unauthorized, or not useful, research sequentially with the same evidence bar.
56
+
57
+ ## 4. Synthesize
58
+
59
+ For comparisons, rank only viable options and name a winner when evidence and
60
+ project fit support one. For every ranked option include fit, decisive evidence,
61
+ tradeoffs, adoption/operational risks, and limitations. If evidence cannot choose
62
+ a winner, return `unresolved` plus the smallest fact or experiment that would.
63
+
64
+ Use the four mandatory H2 sections from
65
+ `.claude/skills/specs/templates/research.md`. Keep claim records and comparisons
66
+ inside `## Evidence Summary`; do not add or reorder mandatory H2 headings.
67
+
68
+ ## 5. Output and persistence
69
+
70
+ Default to a concise answer in chat. Persist only when:
71
+
72
+ 1. one explicitly resolved active Spec requires durable `research.md`; save to
73
+ that exact `specs/<feature>/research.md`, preserving its existing lifecycle; or
74
+ 2. the user explicitly requests a durable report and approves its destination.
75
+
76
+ Do not create a Spec or `_shared` archive merely to save an answer. The
77
+ controller performs any authorized write after reviewing and redacting the
78
+ output; delegated researchers never write reports or task state. Always state
79
+ depth used, decisive evidence, recommendation, limitations, and unresolved gaps.
80
+
81
+ ## Handoff boundary
82
+
83
+ Research may recommend Brainstorm or Specs when a material product/design choice
84
+ remains. It never starts Develop, edits implementation code, claims user approval,
85
+ or presents source/installed evidence as live-system proof.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: cf:route
3
+ description: "Route ambiguous, multi-step, multi-domain, or risk-elevated work through the shortest valid chain of installed CafeKit skills and agents."
4
+ user-invocable: true
5
+ when_to_use: "Use when no single obvious installed skill covers the request; skip for an explicitly named skill, one clear low-risk intent, or a direct factual answer."
6
+ category: utilities
7
+ keywords: [routing, workflow, orchestration, delegation, risk]
8
+ argument-hint: "<task>"
9
+ metadata:
10
+ author: haposoft
11
+ version: "1.0.0"
12
+ ---
13
+ # Route — proportional native routing
14
+
15
+ Choose the shortest valid path through capabilities that are installed now.
16
+ Route is a decision layer: it classifies, composes, and hands off; each selected
17
+ skill or agent still owns its domain contract and evidence.
18
+
19
+ ## 1. Proportional gate
20
+
21
+ Apply these exits before discovery, classification, or delegation:
22
+
23
+ 1. **Explicit installed skill:** when the user names a valid installed skill,
24
+ invoke that skill directly. Do not reclassify it or add routing ceremony.
25
+ 2. **One obvious intent:** when exactly one installed skill clearly covers a
26
+ low-risk request, use it directly without constructing a chain.
27
+ 3. **Direct factual conversation:** answer a factual question directly, or use
28
+ the installed evidence-answering skill when repository or current evidence is
29
+ needed. Do not create a route chain or spawn agents merely to answer it.
30
+ 4. Continue in Route only for ambiguity, multiple dependent steps, multiple
31
+ domains, elevated/high risk, or no obvious installed capability.
32
+
33
+ An explicitly named capability that is absent, invalid, duplicate, ambiguous,
34
+ or retired is not an installed route. Name the gap; do not invent a substitute
35
+ with broader authority.
36
+
37
+ ## 2. Classify material work
38
+
39
+ Load `references/task-taxonomy.md`. Record exactly one class based on the final
40
+ deliverable, then record size (`trivial | standard | epic`), the highest-link
41
+ risk (`low | elevated | high`), and the number of material domains. Never
42
+ average risk down across links.
43
+
44
+ Use the runtime's live installed skill and agent catalogs. Never synthesize a
45
+ skill, agent, command, or optional bundle from examples in these instructions.
46
+ If inventory is unavailable, use only capabilities the runtime visibly exposes;
47
+ otherwise name the capability gap and keep the path inline where safe.
48
+
49
+ ## 3. Compose the shortest valid chain
50
+
51
+ Load `references/chaining-patterns.md` only when two or more links are required.
52
+ Start from `understand -> decide -> execute -> verify -> deliver`, remove every
53
+ link whose output is already evidenced, and add a link only when a modifier
54
+ requires it. Every retained link has an entry condition, an observable exit
55
+ artifact, and exactly one owner.
56
+
57
+ Prefer the user-named skill, then the narrowest domain skill, then a generic
58
+ workflow skill. One intent has one primary skill. Supporting skills may produce
59
+ inputs for it but may not compete for ownership.
60
+
61
+ ## 4. Agents and risk gates
62
+
63
+ Load `references/agent-timing.md` only when delegation may materially improve
64
+ fresh context, specialization, tool isolation, or safe parallel work. Discover
65
+ agents from the current runtime; if the preferred agent is missing, continue
66
+ inline when safe or return the named gap. Never synthesize an unavailable agent.
67
+
68
+ - `low`: the owning link's normal proof is sufficient.
69
+ - `elevated`: add explicit verification appropriate to the changed surface.
70
+ - `high`: require independent review and user confirmation before advancing
71
+ past the high-risk gate. When an irreversible or external action is present,
72
+ obtain that confirmation immediately before the action.
73
+
74
+ ## 5. Authority is monotonic
75
+
76
+ The route may narrow user authority but never expand it. Read-only stays
77
+ read-only; diagnosis does not authorize repair; implementation does not
78
+ authorize commit, push, deploy, publish, or release; local work does not
79
+ authorize an external action. Stop before any mutation or delivery link that
80
+ the user did not already authorize and state what authority is missing.
81
+
82
+ ## 6. Return and handoff
83
+
84
+ Return a compact route record before the first material handoff:
85
+
86
+ ```text
87
+ Route: <class> | size=<trivial|standard|epic> | risk=<low|elevated|high> | domains=<n>
88
+ Chain: <owner: entry -> exit> [-> ...]
89
+ Gates: <authority, verification, confirmation, or named gap>
90
+ ```
91
+
92
+ Do not claim that source text or installed projection proves live-model
93
+ adherence. That behavior remains `[UNPROVEN]` until a separate host run observes
94
+ it.
@@ -0,0 +1,46 @@
1
+ # Agent timing
2
+
3
+ Delegation is optional acceleration, not a mandatory stage. Keep work inline
4
+ when it is small, tightly coupled, dependent on shared evolving context, or no
5
+ installed specialist offers a material advantage.
6
+
7
+ Delegate only when at least one trigger is evidenced:
8
+
9
+ - a specialist needs fresh isolated context;
10
+ - a distinct tool or runtime boundary must be owned separately;
11
+ - two or more scopes are genuinely independent and can run in parallel;
12
+ - an independent reviewer or tester is required by risk.
13
+
14
+ Discover the current runtime's installed agent catalog before delegation. Use
15
+ Claude-native agent types in Claude Code and Codex-native agents/subagents in
16
+ Codex. If the preferred agent is absent, do the work inline when safe or name
17
+ the gap and stop; never synthesize a role or pretend delegation occurred.
18
+
19
+ ## Delegation brief
20
+
21
+ Every delegated link receives exactly these seven fields:
22
+
23
+ 1. **Outcome** — observable result.
24
+ 2. **Scope** — owned files, systems, or questions.
25
+ 3. **Inputs** — current evidence and prerequisite artifacts.
26
+ 4. **Constraints** — safety, compatibility, authority, and non-goals.
27
+ 5. **Acceptance** — proof required for completion.
28
+ 6. **Handoff** — expected returned artifact and destination.
29
+ 7. **Status vocabulary** — `DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT`.
30
+
31
+ Parallel delegates require disjoint write ownership and no hidden dependency.
32
+ The controller reconciles their outputs and remains responsible for route state;
33
+ an agent never gains commit, push, deploy, publish, release, or other mutation
34
+ authority from delegation alone.
35
+
36
+ ## Status handling
37
+
38
+ - `DONE`: validate the exit artifact, then advance.
39
+ - `DONE_WITH_CONCERNS`: resolve correctness or scope concerns before advancing;
40
+ record observational concerns without inventing failure.
41
+ - `BLOCKED`: change evidence, owner, scope, or dependency before retrying.
42
+ - `NEEDS_CONTEXT`: supply the missing bounded context before retrying.
43
+
44
+ Never blindly retry `BLOCKED` or `NEEDS_CONTEXT`. A retry without a material
45
+ change preserves the same normalized cause and therefore the same route failure
46
+ key.
@@ -0,0 +1,53 @@
1
+ # Chaining patterns
2
+
3
+ Use a chain only when one link's output is required by another. The default
4
+ skeleton is:
5
+
6
+ ```text
7
+ understand -> decide -> execute -> verify -> deliver
8
+ ```
9
+
10
+ ## Link contract
11
+
12
+ Every retained link must state:
13
+
14
+ - **Entry:** the evidence or artifact required to start.
15
+ - **Exit:** one observable artifact or decision passed forward.
16
+ - **Owner:** exactly one installed skill, installed agent, or the controller.
17
+
18
+ Pass only the exit artifact plus the target, constraints, authority, acceptance,
19
+ and unresolved gaps needed by the next owner. For one or two short links, chat
20
+ context is enough. For longer or interruption-prone work, use an already
21
+ authorized repository artifact; routing never grants permission to create one.
22
+
23
+ ## Collapse and insertion
24
+
25
+ Remove a link when its exit is already current and evidenced. An explicit valid
26
+ skill or one obvious low-risk intent normally collapses to one link. Do not keep
27
+ Scout, Brainstorm, Research, Specs, Test, Review, Git, or delivery merely for
28
+ ceremony.
29
+
30
+ Insert a link only for a real modifier:
31
+
32
+ - unresolved repository shape -> discovery;
33
+ - unresolved material choice -> decision;
34
+ - implementation or repair -> execution;
35
+ - elevated risk or changed behavior -> verification;
36
+ - high risk -> independent review and confirmation;
37
+ - commit, push, deploy, publish, or release -> delivery, only with matching
38
+ user authority.
39
+
40
+ ## Failure detours and stop
41
+
42
+ On a failed link, preserve its valid exit evidence, normalize the root cause,
43
+ and choose one bounded detour that can change that cause. Track the failure key
44
+ as `(link, owner, normalized cause)` within the current chain.
45
+
46
+ Two failures with the same failure key stop the chain and return `BLOCKED` with
47
+ the evidence and missing decision or capability. Different normalized causes do
48
+ not share a key and must not stop early merely because the link name matches.
49
+ This route-level stop does not replace a separate orchestrator's authoritative
50
+ task-retry budget.
51
+
52
+ No detour may add authority. In particular, review cannot imply push,
53
+ diagnosis cannot imply repair, and build cannot imply deploy.
@@ -0,0 +1,48 @@
1
+ # Task taxonomy
2
+
3
+ Classify by the final deliverable the user expects, not by the first verb, file
4
+ type, or tool mentioned. Choose exactly one class; use domains as modifiers.
5
+
6
+ | Class | Final deliverable |
7
+ |---|---|
8
+ | `answer` | Evidence-backed explanation or factual response |
9
+ | `discover` | Located files, call path, inventory, or blast-radius map |
10
+ | `decide` | Chosen product, architecture, or technical direction |
11
+ | `specify` | Approved bounded plan and executable task packet |
12
+ | `change` | Working implementation or content change |
13
+ | `diagnose` | Root cause and verification-ready repair plan |
14
+ | `repair` | Cause-aligned fix plus regression proof |
15
+ | `verify` | Test or review verdict with owned evidence |
16
+ | `deliver` | Authorized commit, push, deploy, publish, or release result |
17
+
18
+ When a request contains several verbs, classify by its terminal observable
19
+ result. For example, “research options and implement the winner” is `change`,
20
+ while research is a decision link. “Inspect this failure and tell me why” is
21
+ `diagnose`, not `repair`.
22
+
23
+ ## Size
24
+
25
+ - `trivial`: one clear reversible outcome, normally one owner and one link.
26
+ - `standard`: multiple dependent links or a bounded cross-file/domain change.
27
+ - `epic`: three or more independently deliverable subsystems; split them into
28
+ bounded routes instead of creating one oversized chain.
29
+
30
+ ## Risk
31
+
32
+ Risk is the maximum risk of any retained link, never an average:
33
+
34
+ - `low`: local, reversible, no material compatibility or data boundary.
35
+ - `elevated`: shared contract, integration, migration, sensitive data, or a
36
+ meaningful regression surface.
37
+ - `high`: security boundary, irreversible data/action, production delivery,
38
+ public compatibility, or large blast radius.
39
+
40
+ ## Domains and ambiguity
41
+
42
+ Count only material domains that need distinct evidence or ownership. A file
43
+ extension alone is not a domain. Ambiguity adds an understand or decide link
44
+ only when unresolved information can change the final deliverable, authority,
45
+ or verification; otherwise choose the shortest valid direct path.
46
+
47
+ Modifiers constrain a route. They never grant mutation, external-action,
48
+ commit, push, deploy, publish, or release authority.