@haposoft/cafekit 0.16.0-rc.8 → 0.16.1

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 (323) hide show
  1. package/README.md +117 -28
  2. package/bin/__tests__/codex-hooks-ownership.test.js +239 -0
  3. package/bin/__tests__/codex-hooks.test.js +175 -0
  4. package/bin/__tests__/codex-native.test.js +1882 -70
  5. package/bin/__tests__/develop-contract.test.js +442 -23
  6. package/bin/__tests__/grok-envelope.test.js +271 -0
  7. package/bin/__tests__/grok-platform.test.js +133 -0
  8. package/bin/__tests__/hook-payload.test.js +194 -0
  9. package/bin/__tests__/installer-safety.test.js +3 -3
  10. package/bin/__tests__/omp-bridge.test.js +168 -0
  11. package/bin/__tests__/omp-hooks.test.js +178 -0
  12. package/bin/__tests__/omp-runtime.test.js +150 -0
  13. package/bin/__tests__/optional-skill-inventory.test.js +249 -0
  14. package/bin/__tests__/output-styles.test.js +214 -0
  15. package/bin/__tests__/package-inventory.test.js +1735 -98
  16. package/bin/__tests__/runtime-dir.test.js +158 -0
  17. package/bin/__tests__/runtime-schema.test.js +113 -0
  18. package/bin/__tests__/secret-output-guardrail.test.js +122 -0
  19. package/bin/__tests__/skill-routing-source.test.js +172 -0
  20. package/bin/__tests__/specs-v2-execution-closeout.test.js +28 -1
  21. package/bin/install.js +15 -5
  22. package/bin/lib/codex-install.js +170 -5
  23. package/bin/lib/context.js +64 -3
  24. package/bin/lib/i18n.js +15 -36
  25. package/bin/lib/skill-deps.js +5 -5
  26. package/bin/phases/claude-runtime.js +23 -0
  27. package/bin/phases/claude-settings.js +8 -0
  28. package/bin/phases/codex-hooks.js +156 -0
  29. package/bin/phases/codex-runtime.js +29 -38
  30. package/bin/phases/copy-payload.js +15 -2
  31. package/bin/phases/omp-runtime.js +140 -0
  32. package/bin/phases/root-config.js +3 -0
  33. package/bin/phases/select-platform.js +22 -1
  34. package/bin/phases/select-skill-bundles.js +96 -0
  35. package/bin/phases/skill-inventory.js +71 -0
  36. package/bin/phases/skills-setup.js +9 -2
  37. package/bin/phases/summary.js +0 -4
  38. package/bin/phases/write-metadata.js +8 -5
  39. package/package.json +8 -2
  40. package/src/claude/CLAUDE.md +3 -3
  41. package/src/claude/agents/brainstormer.md +52 -69
  42. package/src/claude/agents/code-auditor.md +32 -14
  43. package/src/claude/agents/debugger.md +35 -20
  44. package/src/claude/agents/deployer.md +12 -5
  45. package/src/claude/agents/docs-keeper.md +11 -1
  46. package/src/claude/agents/implementer.md +25 -13
  47. package/src/claude/agents/inspector.md +6 -3
  48. package/src/claude/agents/project-manager.md +1 -1
  49. package/src/claude/agents/researcher.md +26 -55
  50. package/src/claude/agents/spec-maker.md +12 -7
  51. package/src/claude/agents/strategist.md +52 -0
  52. package/src/claude/agents/test-runner.md +117 -132
  53. package/src/claude/agents/ui-ux-designer.md +1 -1
  54. package/src/claude/hooks/__tests__/fixtures/statusline-default.golden +1 -0
  55. package/src/claude/hooks/__tests__/precompact.test.js +158 -0
  56. package/src/claude/hooks/__tests__/semantic-review-authority.test.js +2 -0
  57. package/src/claude/hooks/__tests__/spec-gate.test.js +348 -3
  58. package/src/claude/hooks/__tests__/state.test.js +7 -0
  59. package/src/claude/hooks/__tests__/statusline.test.js +196 -0
  60. package/src/claude/hooks/agent.cjs +13 -8
  61. package/src/claude/hooks/completion-authority.cjs +10 -4
  62. package/src/claude/hooks/docs-sync.cjs +14 -11
  63. package/src/claude/hooks/inspect-block.cjs +28 -8
  64. package/src/claude/hooks/lib/config.cjs +8 -2
  65. package/src/claude/hooks/lib/counter.cjs +7 -5
  66. package/src/claude/hooks/lib/hook-payload.cjs +160 -0
  67. package/src/claude/hooks/lib/hook-state-dir.cjs +39 -0
  68. package/src/claude/hooks/lib/runtime-dir.cjs +49 -0
  69. package/src/claude/hooks/lib/secret-keywords.cjs +42 -0
  70. package/src/claude/hooks/precompact.cjs +106 -0
  71. package/src/claude/hooks/privacy-block.cjs +4 -2
  72. package/src/claude/hooks/rules.cjs +5 -3
  73. package/src/claude/hooks/secret-output-guardrail.cjs +44 -0
  74. package/src/claude/hooks/semantic-review-authority.cjs +6 -4
  75. package/src/claude/hooks/session.cjs +37 -9
  76. package/src/claude/hooks/spec-gate.cjs +21 -11
  77. package/src/claude/hooks/spec-state.cjs +11 -7
  78. package/src/claude/hooks/state.cjs +7 -5
  79. package/src/claude/hooks/task-scaffold-guard.cjs +30 -9
  80. package/src/claude/hooks/usage.cjs +6 -5
  81. package/src/claude/migration-manifest.json +31 -15
  82. package/src/claude/output-styles/coding-level-0-eli5.md +103 -0
  83. package/src/claude/output-styles/coding-level-1-junior.md +124 -0
  84. package/src/claude/output-styles/coding-level-2-mid.md +146 -0
  85. package/src/claude/output-styles/coding-level-3-senior.md +148 -0
  86. package/src/claude/output-styles/coding-level-4-lead.md +159 -0
  87. package/src/claude/output-styles/coding-level-5-god.md +91 -0
  88. package/src/claude/references/debugger/core-philosophy.md +5 -3
  89. package/src/claude/references/debugger/frontend-verification.md +2 -2
  90. package/src/claude/references/debugger/log-ci-analysis.md +13 -1
  91. package/src/claude/references/debugger/parallel-agent-hydration.md +19 -34
  92. package/src/claude/references/debugger/performance-diagnostics.md +2 -2
  93. package/src/claude/references/debugger/root-cause-tracing.md +37 -6
  94. package/src/claude/references/debugger/side-effect-gate.md +3 -1
  95. package/src/claude/references/debugger/verification-protocol.md +13 -12
  96. package/src/claude/rules/orchestrator.md +7 -1
  97. package/src/claude/rules/process-management.md +39 -0
  98. package/src/claude/rules/review-audit-self-decision.md +48 -0
  99. package/src/claude/rules/skill-domain-routing.md +26 -24
  100. package/src/claude/rules/skill-workflow-routing.md +22 -14
  101. package/src/claude/rules/state-sync.md +7 -1
  102. package/src/claude/rules/workflow.md +5 -3
  103. package/src/claude/runtime.json +1 -0
  104. package/src/claude/runtime.schema.json +205 -0
  105. package/src/claude/scripts/generate-skill-catalog.cjs +156 -122
  106. package/src/claude/scripts/provenance.cjs +29 -9
  107. package/src/claude/scripts/spec-receipt.cjs +65 -4
  108. package/src/claude/scripts/workflow-policy.cjs +1 -1
  109. package/src/claude/settings/settings.json +16 -0
  110. package/src/claude/skills/agent-browser/SKILL.md +1 -1
  111. package/src/claude/skills/ai-multimodal/SKILL.md +1 -1
  112. package/src/claude/skills/brainstorm/SKILL.md +193 -172
  113. package/src/claude/skills/brainstorm/references/question-framework.md +105 -167
  114. package/src/claude/skills/chrome-devtools/SKILL.md +1 -1
  115. package/src/claude/skills/code-review/SKILL.md +43 -25
  116. package/src/claude/skills/code-review/references/spec-compliance-review.md +3 -4
  117. package/src/claude/skills/code-review/references/verification-gate.md +1 -1
  118. package/src/claude/skills/debug/SKILL.md +48 -19
  119. package/src/claude/skills/delegate/SKILL.md +1 -1
  120. package/src/claude/skills/develop/SKILL.md +92 -65
  121. package/src/claude/skills/develop/references/parallel-waves.md +36 -63
  122. package/src/claude/skills/develop/references/quality-gate.md +31 -4
  123. package/src/claude/skills/develop/references/subagent-patterns.md +21 -7
  124. package/src/claude/skills/docs/SKILL.md +42 -23
  125. package/src/claude/skills/docs/references/init-workflow.md +4 -4
  126. package/src/claude/skills/docs/references/reconstruct-workflow.md +6 -6
  127. package/src/claude/skills/docs/references/standard-docs-workflow.md +6 -2
  128. package/src/claude/skills/docs/references/summarize-workflow.md +2 -2
  129. package/src/claude/skills/docs/references/update-workflow.md +9 -7
  130. package/src/claude/skills/docs/templates/requirements-as-is.md +1 -1
  131. package/src/claude/skills/docx/SKILL.md +1 -1
  132. package/src/claude/skills/git/SKILL.md +1 -1
  133. package/src/claude/skills/git/references/commit-protocols.md +1 -1
  134. package/src/claude/skills/git/references/finish-branch.md +1 -1
  135. package/src/claude/skills/hotfix/SKILL.md +159 -170
  136. package/src/claude/skills/hotfix/references/diagnosis-protocol.md +14 -9
  137. package/src/claude/skills/hotfix/references/parallel-patterns.md +27 -13
  138. package/src/claude/skills/hotfix/references/prevention-gate.md +5 -0
  139. package/src/claude/skills/hotfix/references/review-cycle.md +21 -15
  140. package/src/claude/skills/hotfix/references/workflow-specialized.md +53 -21
  141. package/src/claude/skills/inspect/SKILL.md +55 -46
  142. package/src/claude/skills/inspect/references/internal-inspection.md +21 -5
  143. package/src/claude/skills/loop/SKILL.md +114 -0
  144. package/src/claude/skills/loop/references/bounded-loop-protocol.md +104 -0
  145. package/src/claude/skills/loop/references/metric-and-guard-contract.md +76 -0
  146. package/src/claude/skills/pdf/SKILL.md +1 -1
  147. package/src/claude/skills/pptx/SKILL.md +1 -1
  148. package/src/claude/skills/question/SKILL.md +16 -13
  149. package/src/claude/skills/research/SKILL.md +70 -43
  150. package/src/claude/skills/route/SKILL.md +94 -0
  151. package/src/claude/skills/route/references/agent-timing.md +46 -0
  152. package/src/claude/skills/route/references/chaining-patterns.md +53 -0
  153. package/src/claude/skills/route/references/task-taxonomy.md +48 -0
  154. package/src/claude/skills/specs/SKILL.md +51 -71
  155. package/src/claude/skills/specs/references/review.md +11 -8
  156. package/src/claude/skills/specs/references/templates.md +34 -18
  157. package/src/claude/skills/specs/templates/requirements-init.md +1 -1
  158. package/src/claude/skills/specs/templates/research.md +2 -2
  159. package/src/claude/skills/sync/SKILL.md +6 -6
  160. package/src/claude/skills/sync/references/sync-protocols.md +1 -1
  161. package/src/claude/skills/test/SKILL.md +120 -120
  162. package/src/claude/skills/test/references/execution-strategy.md +208 -361
  163. package/src/claude/skills/test/references/failure-triage.md +55 -121
  164. package/src/claude/skills/test/references/test-memory.md +20 -34
  165. package/src/claude/skills/ui-ux-pro-max/SKILL.md +1 -1
  166. package/src/claude/skills/web-testing/SKILL.md +1 -1
  167. package/src/claude/skills/xlsx/SKILL.md +1 -1
  168. package/src/claude/status.cjs +135 -33
  169. package/src/codex/AGENTS.md +14 -4
  170. package/src/codex/hooks/docs-sync.cjs +8 -3
  171. package/src/codex/hooks/lib/hook-context.cjs +18 -4
  172. package/src/codex/hooks/rules.cjs +29 -1
  173. package/src/codex/hooks/secret-output-guardrail.cjs +30 -0
  174. package/src/codex/hooks/spec-gate.cjs +3 -8
  175. package/src/codex/hooks/spec-state.cjs +3 -2
  176. package/src/codex/hooks.json +5 -0
  177. package/src/codex/rules/state-sync.md +7 -1
  178. package/src/codex/runtime.json +2 -0
  179. package/src/common/.env.example +1 -1
  180. package/src/omp/extensions/cafekit-bridge.mjs +233 -0
  181. package/src/omp/hooks/privacy-block.cjs +250 -0
  182. package/src/omp/runtime.json +33 -0
  183. package/bin/lib/rtk-run.js +0 -28
  184. package/bin/phases/setup-rtk.js +0 -159
  185. package/src/claude/skills/backend-development/SKILL.md +0 -101
  186. package/src/claude/skills/backend-development/references/backend-api-design.md +0 -495
  187. package/src/claude/skills/backend-development/references/backend-architecture.md +0 -454
  188. package/src/claude/skills/backend-development/references/backend-authentication.md +0 -338
  189. package/src/claude/skills/backend-development/references/backend-code-quality.md +0 -659
  190. package/src/claude/skills/backend-development/references/backend-debugging.md +0 -904
  191. package/src/claude/skills/backend-development/references/backend-devops.md +0 -491
  192. package/src/claude/skills/backend-development/references/backend-mindset.md +0 -387
  193. package/src/claude/skills/backend-development/references/backend-performance.md +0 -397
  194. package/src/claude/skills/backend-development/references/backend-security.md +0 -342
  195. package/src/claude/skills/backend-development/references/backend-technologies.md +0 -256
  196. package/src/claude/skills/backend-development/references/backend-testing.md +0 -429
  197. package/src/claude/skills/devops/.env.example +0 -76
  198. package/src/claude/skills/devops/SKILL.md +0 -102
  199. package/src/claude/skills/devops/references/browser-rendering.md +0 -305
  200. package/src/claude/skills/devops/references/cloudflare-d1-kv.md +0 -123
  201. package/src/claude/skills/devops/references/cloudflare-platform.md +0 -271
  202. package/src/claude/skills/devops/references/cloudflare-r2-storage.md +0 -280
  203. package/src/claude/skills/devops/references/cloudflare-workers-advanced.md +0 -312
  204. package/src/claude/skills/devops/references/cloudflare-workers-apis.md +0 -309
  205. package/src/claude/skills/devops/references/cloudflare-workers-basics.md +0 -418
  206. package/src/claude/skills/devops/references/docker-basics.md +0 -297
  207. package/src/claude/skills/devops/references/docker-compose.md +0 -292
  208. package/src/claude/skills/devops/references/gcloud-platform.md +0 -297
  209. package/src/claude/skills/devops/references/gcloud-services.md +0 -304
  210. package/src/claude/skills/devops/references/kubernetes-basics.md +0 -95
  211. package/src/claude/skills/devops/references/kubernetes-helm-advanced.md +0 -70
  212. package/src/claude/skills/devops/references/kubernetes-helm.md +0 -81
  213. package/src/claude/skills/devops/references/kubernetes-kubectl.md +0 -74
  214. package/src/claude/skills/devops/references/kubernetes-security-advanced.md +0 -94
  215. package/src/claude/skills/devops/references/kubernetes-security.md +0 -89
  216. package/src/claude/skills/devops/references/kubernetes-troubleshooting-advanced.md +0 -74
  217. package/src/claude/skills/devops/references/kubernetes-troubleshooting.md +0 -49
  218. package/src/claude/skills/devops/references/kubernetes-workflows-advanced.md +0 -75
  219. package/src/claude/skills/devops/references/kubernetes-workflows.md +0 -76
  220. package/src/claude/skills/devops/scripts/cloudflare_deploy.py +0 -269
  221. package/src/claude/skills/devops/scripts/docker_optimize.py +0 -332
  222. package/src/claude/skills/devops/scripts/requirements.txt +0 -20
  223. package/src/claude/skills/devops/scripts/tests/requirements.txt +0 -3
  224. package/src/claude/skills/devops/scripts/tests/test_cloudflare_deploy.py +0 -285
  225. package/src/claude/skills/devops/scripts/tests/test_docker_optimize.py +0 -436
  226. package/src/claude/skills/frontend-design/SKILL.md +0 -135
  227. package/src/claude/skills/frontend-design/references/ai-multimodal-overview.md +0 -165
  228. package/src/claude/skills/frontend-design/references/analysis-best-practices.md +0 -80
  229. package/src/claude/skills/frontend-design/references/analysis-prompts.md +0 -141
  230. package/src/claude/skills/frontend-design/references/analysis-techniques.md +0 -118
  231. package/src/claude/skills/frontend-design/references/animejs.md +0 -396
  232. package/src/claude/skills/frontend-design/references/anti-slop-rules.md +0 -103
  233. package/src/claude/skills/frontend-design/references/asset-generation.md +0 -337
  234. package/src/claude/skills/frontend-design/references/bento-motion-engine.md +0 -142
  235. package/src/claude/skills/frontend-design/references/design-extraction-overview.md +0 -71
  236. package/src/claude/skills/frontend-design/references/extraction-best-practices.md +0 -141
  237. package/src/claude/skills/frontend-design/references/extraction-output-templates.md +0 -162
  238. package/src/claude/skills/frontend-design/references/extraction-prompts.md +0 -127
  239. package/src/claude/skills/frontend-design/references/magicui-components.md +0 -129
  240. package/src/claude/skills/frontend-design/references/performance-guardrails.md +0 -169
  241. package/src/claude/skills/frontend-design/references/premium-design-patterns.md +0 -93
  242. package/src/claude/skills/frontend-design/references/redesign-audit-checklist.md +0 -114
  243. package/src/claude/skills/frontend-design/references/technical-accessibility.md +0 -119
  244. package/src/claude/skills/frontend-design/references/technical-best-practices.md +0 -97
  245. package/src/claude/skills/frontend-design/references/technical-optimization.md +0 -44
  246. package/src/claude/skills/frontend-design/references/technical-overview.md +0 -90
  247. package/src/claude/skills/frontend-design/references/technical-workflows.md +0 -150
  248. package/src/claude/skills/frontend-design/references/visual-analysis-overview.md +0 -95
  249. package/src/claude/skills/frontend-design/references/workflow-3d.md +0 -102
  250. package/src/claude/skills/frontend-design/references/workflow-describe.md +0 -87
  251. package/src/claude/skills/frontend-design/references/workflow-immersive.md +0 -87
  252. package/src/claude/skills/frontend-design/references/workflow-quick.md +0 -57
  253. package/src/claude/skills/frontend-design/references/workflow-screenshot.md +0 -63
  254. package/src/claude/skills/frontend-design/references/workflow-video.md +0 -74
  255. package/src/claude/skills/frontend-development/SKILL.md +0 -406
  256. package/src/claude/skills/frontend-development/resources/common-patterns.md +0 -331
  257. package/src/claude/skills/frontend-development/resources/complete-examples.md +0 -872
  258. package/src/claude/skills/frontend-development/resources/component-patterns.md +0 -502
  259. package/src/claude/skills/frontend-development/resources/data-fetching.md +0 -767
  260. package/src/claude/skills/frontend-development/resources/file-organization.md +0 -502
  261. package/src/claude/skills/frontend-development/resources/loading-and-error-states.md +0 -501
  262. package/src/claude/skills/frontend-development/resources/performance.md +0 -406
  263. package/src/claude/skills/frontend-development/resources/routing-guide.md +0 -364
  264. package/src/claude/skills/frontend-development/resources/styling-guide.md +0 -428
  265. package/src/claude/skills/frontend-development/resources/typescript-standards.md +0 -418
  266. package/src/claude/skills/mobile-development/SKILL.md +0 -218
  267. package/src/claude/skills/mobile-development/references/mobile-android.md +0 -604
  268. package/src/claude/skills/mobile-development/references/mobile-best-practices.md +0 -544
  269. package/src/claude/skills/mobile-development/references/mobile-debugging.md +0 -1089
  270. package/src/claude/skills/mobile-development/references/mobile-frameworks.md +0 -465
  271. package/src/claude/skills/mobile-development/references/mobile-ios.md +0 -496
  272. package/src/claude/skills/mobile-development/references/mobile-mindset.md +0 -542
  273. package/src/claude/skills/react-best-practices/AGENTS.md +0 -2249
  274. package/src/claude/skills/react-best-practices/README.md +0 -123
  275. package/src/claude/skills/react-best-practices/SKILL.md +0 -128
  276. package/src/claude/skills/react-best-practices/metadata.json +0 -15
  277. package/src/claude/skills/react-best-practices/rules/_sections.md +0 -46
  278. package/src/claude/skills/react-best-practices/rules/_template.md +0 -28
  279. package/src/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  280. package/src/claude/skills/react-best-practices/rules/advanced-use-latest.md +0 -49
  281. package/src/claude/skills/react-best-practices/rules/async-api-routes.md +0 -38
  282. package/src/claude/skills/react-best-practices/rules/async-defer-await.md +0 -80
  283. package/src/claude/skills/react-best-practices/rules/async-dependencies.md +0 -36
  284. package/src/claude/skills/react-best-practices/rules/async-parallel.md +0 -28
  285. package/src/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
  286. package/src/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
  287. package/src/claude/skills/react-best-practices/rules/bundle-conditional.md +0 -31
  288. package/src/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
  289. package/src/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  290. package/src/claude/skills/react-best-practices/rules/bundle-preload.md +0 -50
  291. package/src/claude/skills/react-best-practices/rules/client-event-listeners.md +0 -74
  292. package/src/claude/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
  293. package/src/claude/skills/react-best-practices/rules/js-batch-dom-css.md +0 -82
  294. package/src/claude/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
  295. package/src/claude/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
  296. package/src/claude/skills/react-best-practices/rules/js-cache-storage.md +0 -70
  297. package/src/claude/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
  298. package/src/claude/skills/react-best-practices/rules/js-early-exit.md +0 -50
  299. package/src/claude/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
  300. package/src/claude/skills/react-best-practices/rules/js-index-maps.md +0 -37
  301. package/src/claude/skills/react-best-practices/rules/js-length-check-first.md +0 -49
  302. package/src/claude/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
  303. package/src/claude/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
  304. package/src/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
  305. package/src/claude/skills/react-best-practices/rules/rendering-activity.md +0 -26
  306. package/src/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  307. package/src/claude/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
  308. package/src/claude/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
  309. package/src/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  310. package/src/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  311. package/src/claude/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
  312. package/src/claude/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
  313. package/src/claude/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
  314. package/src/claude/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
  315. package/src/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
  316. package/src/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  317. package/src/claude/skills/react-best-practices/rules/rerender-memo.md +0 -44
  318. package/src/claude/skills/react-best-practices/rules/rerender-transitions.md +0 -40
  319. package/src/claude/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
  320. package/src/claude/skills/react-best-practices/rules/server-cache-lru.md +0 -41
  321. package/src/claude/skills/react-best-practices/rules/server-cache-react.md +0 -26
  322. package/src/claude/skills/react-best-practices/rules/server-parallel-fetching.md +0 -79
  323. package/src/claude/skills/react-best-practices/rules/server-serialization.md +0 -38
@@ -1,23 +1,24 @@
1
- # The Verification Protocol (The Iron Law of Testing)
1
+ # Diagnostic Verification Protocol
2
2
 
3
- A fix is NOT considered complete when the code is written. A fix is only complete when it is PROVEN to work.
3
+ Debug owns the failing baseline and the proof plan. It does not apply or certify the repair.
4
4
 
5
- ## The 3-Step Verification Law
5
+ ## Ownership Boundary
6
6
 
7
- 1. **Pre-Verification (Reproduce the Bug):**
8
- Before touching any code, you must execute a command or test script that visibly outputs the failure or reproduces the error. You need a baseline failure state.
7
+ 1. **Debug — reproduce and diagnose:**
8
+ Capture the exact failing command, flow, log trigger, environment, and current output. If reproduction is unsafe or unavailable, state the limitation and use the strongest observable evidence.
9
9
 
10
- 2. **Execution (Apply the Fix):**
11
- Make the precise code modifications required using targeted edits.
10
+ 2. **Debug — design proof:**
11
+ Name the same reproduction, regression guard, transitive checks, side-effect sweep, and acceptance signal that would prove the proposed direction.
12
12
 
13
- 3. **Post-Verification (Confirm the Fix):**
14
- Re-run the EXACT SAME command or test script from step 1. The output MUST prove that the bug is resolved (e.g., terminal output showing "Success", HTTP 200, or a clear log assertion).
13
+ 3. **Fix/Test — mutate and verify:**
14
+ The implementation workflow applies the change. The canonical test owner reruns the baseline and the planned regression and side-effect checks with fresh output.
15
15
 
16
16
  ## What constitutes "Invalid Proof"?
17
17
  - **"I have reviewed the code and it looks correct."** -> This is hallucinated confidence. Rejected.
18
18
  - **"The unit test should pass now."** -> Assuming outcomes without execution. Rejected.
19
+ - A different command that does not exercise the original failure path.
20
+ - Stale logs, screenshots, or output captured before the final implementation.
21
+ - A green health check when the reported business state remains unobserved.
19
22
 
20
23
  ## How to execute tests when no test suite exists?
21
- If the project lacks a formal test suite (e.g., no Jest or Cypress), you must utilize Bash commands to prove it:
22
- - Use `curl -v http://localhost:...` to prove an endpoint stopped throwing `500`.
23
- - Inject temporary `console.log()` outputs, trigger the flow, run the script, and grep the output buffer to prove the variable resolves correctly. (Remember to delete the temporary logs after proof is acquired).
24
+ If the project lacks a formal test suite, Debug should define a deterministic native check such as a CLI invocation, read-only query, HTTP request, or browser flow. Temporary diagnostic instrumentation is allowed only to expose hidden state, must not alter product behavior, and must be removed before handoff. Fix/Test executes post-change proof.
@@ -91,7 +91,13 @@ Task cannot be completed as scoped. Never retry with the same inputs — instead
91
91
  ### `NEEDS_INFO`
92
92
  Agent lacks information to proceed. Supply the missing context and re-dispatch.
93
93
 
94
- > If an agent fails the same task **3+ times**, stop retrying and escalate to the user.
94
+ > If an agent fails the same task **3+ times**, stop retrying and escalate.
95
+
96
+ ## Model Escalation
97
+
98
+ When the current session or a subagent runs on a model below `fable` (e.g. `opus`, `sonnet`, `haiku`) and hits a hard problem — repeated failed attempts, a high-stakes design fork, or fuzzy requirements — spawn the `strategist` agent for counsel instead of switching the session model. It runs autonomously on the strongest available model and returns full advice in one reply, with no interview and no user round-trips. Give it the task, evidence gathered so far, approaches tried, and the specific question. It advises only; the caller stays responsible for the implementation.
99
+
100
+ Counsel is not execution proof: it cannot close a task, satisfy a Verification Plan, or stand in for a Receipt. Escalate to the user when the strategist also cannot resolve it, or when the fork is one only the user may decide.
95
101
 
96
102
  ---
97
103
 
@@ -0,0 +1,39 @@
1
+ # Process and Resource Management
2
+
3
+ Use this file when a task starts, reuses, or ends long-running processes: dev
4
+ servers, watchers, build daemons, tunnels, test runners, or emulators. It exists
5
+ to prevent orphaned processes from accumulating and exhausting device memory.
6
+
7
+ ## The failure mode
8
+
9
+ An agent starts a dev environment, then abandons it. The next run finds the port
10
+ busy and, instead of stopping the stale owner, picks a new port and starts
11
+ another process. Repeat, and the machine fills with duplicate processes and held
12
+ ports. Parallel wave worktrees make it worse: each worktree spawns its own
13
+ processes, and when the user removes the worktree or ends the session those
14
+ processes stay behind.
15
+
16
+ ## Rules
17
+
18
+ - Track every background process you start: command, PID, port, and worktree.
19
+ Prefer a background facility whose exit you can observe over an unobservable
20
+ detached run.
21
+ - Before starting a long-running process, check whether one is already running
22
+ for this project or port. Reuse or stop it; do not spawn a duplicate.
23
+ - Bind to a deterministic port per project or worktree. On "address in use",
24
+ identify and stop the stale owner rather than taking another port. Inspect
25
+ with `lsof -i :PORT` or `ss -ltnp` on macOS and Linux, `netstat -ano` on
26
+ Windows.
27
+ - Stop what you started when its task, session, or worktree ends. Before a
28
+ `cf:develop` wave releases a worktree, terminate that worktree's background
29
+ processes so nothing is left orphaned.
30
+ - Reconcile periodically: list your running dev processes (`ps`, `lsof`) and
31
+ stop the ones that no longer map to an active task or worktree.
32
+ - Stop cleanly first (`SIGTERM`, or `taskkill /PID` on Windows), escalating to a
33
+ hard kill only when the process ignores the signal.
34
+
35
+ ## Safety
36
+
37
+ Only stop processes you started or clearly own. Never end a process belonging to
38
+ the user, another session, or the operating system without confirmation, and
39
+ never match a kill pattern broad enough to catch unrelated processes.
@@ -0,0 +1,48 @@
1
+ # Review, Audit, and Decision Rules
2
+
3
+ Use this file when reviewing code, applying audit feedback, or cutting scope.
4
+
5
+ ## Verified Decisions
6
+
7
+ Once a decision is verified by source, tests, or an empirical check, do not
8
+ reverse it because an audit raises an abstract concern. Reverse only when the
9
+ audit adds new evidence or the context changed.
10
+
11
+ When rejecting an audit concern, name the verification source briefly.
12
+
13
+ ## User Decisions
14
+
15
+ Do not silently undo an explicit user decision. This covers the C1 scope choice,
16
+ C2 finding dispositions, and C3 completion judgement, along with thresholds,
17
+ selected libraries, feature scope, schema shape, pricing, timelines, compliance
18
+ choices, and UX trade-offs. Those gates are defined in `workflow.md`; this rule
19
+ governs only how a later review may treat them.
20
+
21
+ If an audit suggests reversing a user decision, present:
22
+
23
+ - the original decision
24
+ - the audit concern
25
+ - the trade-off
26
+ - the concrete options
27
+
28
+ Then wait for the user.
29
+
30
+ ## Threat Model
31
+
32
+ Before applying a security or robustness finding, identify what the code
33
+ actually stores, protects, or exposes. Fix real failure modes. Document
34
+ non-issues briefly. Ask when the risk is plausible but depends on product
35
+ intent.
36
+
37
+ ## Scout First
38
+
39
+ For questions answerable by reading the repository, scout before asking.
40
+ `cf:scout` owns discovery and `cf:ask` owns the ask-back conditions; do not
41
+ restate that list here.
42
+
43
+ ## Stable Code Artifacts
44
+
45
+ Do not add plan IDs, phase numbers, CP or AC identifiers, audit labels, or
46
+ finding codes to code comments, migration names, test names, or commit
47
+ messages. Explain the invariant or behavior directly. Artifacts that already
48
+ carry such identifiers stay as they are.
@@ -1,29 +1,31 @@
1
1
  # Skill Domain Routing
2
2
 
3
- Advisory routing for installed domain skills (not an automatic hook). Read the selected skill's `SKILL.md` before acting.
3
+ This rule is advisory model guidance, not an automatic prompt hook. Generate the
4
+ current runtime catalog first when capability presence is uncertain, then read
5
+ the selected skill's `SKILL.md` before acting.
4
6
 
5
- | Domain / intent | Skill |
7
+ Resolve a capability slot from catalog `description`, `when_to_use`, `category`,
8
+ and `keywords`; examples below are intent hints, not a copied installed inventory.
9
+
10
+ | Capability slot | Matching intent |
6
11
  |---|---|
7
- | answer questions from source code/docs/specs/config | `/hapo:question` |
8
- | file discovery, structure, blast radius | `/hapo:inspect` |
9
- | style / layout / design system | `/hapo:frontend-design` |
10
- | React/TypeScript UI implementation | `/hapo:frontend-development` |
11
- | React/Next performance / re-renders | `/hapo:react-best-practices` |
12
- | deep UI/UX polish | `/hapo:ui-ux-pro-max` |
13
- | API, service, auth, database | `/hapo:backend-development` |
14
- | deploy / Docker / K8s / Cloudflare / CI | `/hapo:devops` |
15
- | mobile (RN / Flutter / iOS / Android) | `/hapo:mobile-development` |
16
- | docs init / update / summarize | `/hapo:docs --init` / `--update` / `--summarize` |
17
- | as-is reconstruction from legacy code | `/hapo:docs --reconstruct <scope>` |
18
- | future feature requirements | `/hapo:specs` |
19
- | run suites / scoped verification | `/hapo:test` |
20
- | E2E / load / a11y strategy | `/hapo:web-testing` |
21
- | browser snapshots / Browserbase | `/hapo:agent-browser` |
22
- | Chrome DevTools evidence | `/hapo:chrome-devtools` |
23
- | diagnose error / CI failure | `/hapo:debug` |
24
- | external best practices / tool compare | `/hapo:research` |
25
- | pptx / docx / pdf / xlsx / multimodal | `/hapo:pptx` / `docx` / `pdf` / `xlsx` / `ai-multimodal` |
26
- | commit / branch / release prep | `/hapo:git` |
27
- | review before release | `/hapo:code-review` |
12
+ | evidence answer | factual question requiring source/docs/spec/config/current evidence |
13
+ | repository discovery | files, entrypoints, call path, structure, blast radius |
14
+ | product or architecture decision | unresolved outcome, scope, or material trade-off |
15
+ | technical research | external comparison, conflicting evidence, current best practice |
16
+ | specification | concrete substantial work needing durable plan/tasks |
17
+ | implementation or repair | authorized code/content change or cause-aligned fix |
18
+ | diagnosis | bug, failure, CI, incident, regression, or unexpected behavior |
19
+ | verification or review | test execution, independent correctness/security review |
20
+ | browser evidence | page interaction, snapshots, network, performance, or accessibility |
21
+ | repository delivery | explicitly authorized commit, push, or branch operation |
22
+ | document/artifact work | use only a matching installed optional capability |
23
+
24
+ Choose one primary capability per intent. Add a secondary only when its output is
25
+ an entry condition for the primary. If zero valid capabilities match, continue
26
+ inline when safe or name the gap. If multiple catalog entries expose the same
27
+ public identity, do not auto-route; require explicit user disambiguation.
28
28
 
29
- Pick one primary domain skill; name a secondary only when it changes execution. If none fit, use `skill-workflow-routing.md`.
29
+ Never infer an optional document capability from this rule. Never select the
30
+ explicit-only numeric optimization capability unless the user invokes it with
31
+ its required bounded metric/guard contract.
@@ -1,24 +1,32 @@
1
1
  # Skill Workflow Routing
2
2
 
3
- Use this rule instead of automatic prompt routing. Read the user's intent, choose the primary CafeKit workflow, then load the relevant `.claude/skills/<skill>/SKILL.md`.
3
+ Use native semantic selection, not an automatic prompt-scoring hook. The live
4
+ catalog is descriptive evidence only; it never grants authority or forces a
5
+ workflow.
4
6
 
5
- Do not inject or force a skill when the user explicitly asks for a direct answer, a specific command, or a different workflow.
7
+ ## Proportional selection
6
8
 
7
- Claude Code selects skills from frontmatter descriptions; trust it for clear intents.
9
+ 1. If the user names a valid installed skill, use it directly.
10
+ 2. If one obvious low-risk installed skill covers the intent, use it directly.
11
+ 3. For direct factual conversation, answer directly or use the installed
12
+ evidence-answer capability; do not invoke Route or agents for ceremony.
13
+ 4. For ambiguous, multi-step, multi-domain, or elevated/high-risk work, use the
14
+ installed Route capability to classify and compose the shortest valid chain.
8
15
 
9
- ## Core chain
16
+ Resolve every abstract link against the current runtime catalog. An absent,
17
+ invalid, folder-mismatched, duplicate, or retired entry is not routable. Continue
18
+ inline when safe or name the gap; never fabricate a skill or agent.
19
+
20
+ ## Chain shape
10
21
 
11
22
  ```text
12
- /hapo:question -> /hapo:brainstorm -> /hapo:specs -> /hapo:develop -> /hapo:test -> /hapo:code-review -> /hapo:git
23
+ understand -> decide -> execute -> verify -> deliver
13
24
  ```
14
25
 
15
- Bug path: `/hapo:debug -> /hapo:hotfix` then test/review. As-is docs: `/hapo:inspect` → `/hapo:docs --reconstruct <scope>` → human review → specs → develop. Delegate implementation to an external agent CLI: `/hapo:delegate`.
16
-
17
- ## Ambiguous cases
26
+ Collapse links whose output is already current and evidenced. Preserve one
27
+ owner, entry condition, and observable exit per retained link. Diagnosis does
28
+ not authorize repair; implementation does not authorize commit, push, deploy,
29
+ publish, or release; no route expands the user's existing authority.
18
30
 
19
- | Ambiguity | Prefer | Not when |
20
- |---|---|---|
21
- | debug-vs-hotfix | `/hapo:debug` first when root cause unknown | Root cause is known / trivial local fix → `/hapo:hotfix` |
22
- | question-vs-research | `/hapo:question` to ask about source code, docs, specs, config, dependencies, or project facts | External best-practice comparison / multi-source investigation → `/hapo:research` |
23
- | question-vs-brainstorm | `/hapo:question` for factual answers with evidence | Vague idea, missing acceptance criteria, unclear scope, multi-approach tradeoffs → `/hapo:brainstorm` |
24
- | specs-vs-brainstorm | `/hapo:specs` when intent and acceptance are concrete enough | Unclear idea / architecture choices still open → `/hapo:brainstorm` first |
31
+ Use `skill-domain-routing.md` to resolve domain capability slots. The numeric
32
+ optimization capability remains explicit-only and must never be auto-routed.
@@ -30,7 +30,13 @@ state transition.
30
30
  Set `Status: done` only after the inline Receipt passes the
31
31
  `validateCanonicalReceipt` contract: exact command, `Exit: 0`,
32
32
  `Verification: PASS`, runtime-derived Base and Head values, and a non-empty
33
- fenced block of current command output. Missing, stale, contradictory,
33
+ fenced block of current command output.
34
+
35
+ A done task keeps that binding while its file differs from its committed bytes,
36
+ and is validated on structure alone once the file is committed, unchanged, and the
37
+ tree outside the specs root is clean. The gate detects drift, not invention: a valid
38
+ Base and Head pair costs one command and no verification run, so neither mode proves
39
+ that the command was executed. Missing, stale, contradictory,
34
40
  placeholder, copied, failure, or zero-test evidence leaves the task unfinished.
35
41
 
36
42
  Synchronization never fabricates commands, output, timestamps, completed
@@ -12,12 +12,12 @@ Use the CafeKit loop: **Understand -> Plan -> Execute -> Verify -> Sync**.
12
12
 
13
13
  ## 2. Plan
14
14
 
15
- - For non-trivial features, use `/hapo:specs` to challenge the minimum scope,
15
+ - For non-trivial features, use `/cf:specs` to challenge the minimum scope,
16
16
  open C1, and create `specs/<feature>/plan.md` with flat
17
17
  `task-NN-*.md` files beside it.
18
18
  - After adversarial review, open C2 and apply only the findings the user accepts
19
19
  or revises. Specs never starts implementation.
20
- - Start implementation only after a new explicit `/hapo:develop` invocation,
20
+ - Start implementation only after a new explicit `/cf:develop` invocation,
21
21
  then select one unblocked task at a time.
22
22
  - Extract from the active task:
23
23
  - `Status`
@@ -49,13 +49,15 @@ Use the CafeKit loop: **Understand -> Plan -> Execute -> Verify -> Sync**.
49
49
 
50
50
  ## 5. Sync
51
51
 
52
- - Use `/hapo:sync` to edit observed state surgically; the controller is the
52
+ - Use `/cf:sync` to edit observed state surgically; the controller is the
53
53
  sole writer of task Status and proof.
54
54
  - Keep exactly one `Status:` field. Write or replace the task's final inline
55
55
  `## Receipt` before setting `Status: done`.
56
56
  - A canonical Receipt contains the exact command, `Exit: 0`,
57
57
  `Verification: PASS`, runtime-derived Base and Head values, and non-empty
58
58
  fenced current output. Never invent, copy, or infer missing proof.
59
+ - When the binding to Base and Head applies, and what the gate does and does not
60
+ detect, are stated once in `state-sync.md`.
59
61
  - Re-read each edited task and reconcile its plan row, dependencies, acceptance
60
62
  mapping, status, and receipt without rewriting unrelated bytes.
61
63
  - Run docs checkpoint when a completed task affects public docs or architecture docs.
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "./runtime.schema.json",
2
3
  "privacyBlock": true,
3
4
  "inspect": {
4
5
  "enabled": true
@@ -0,0 +1,205 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://haposoft.github.io/cafekit/runtime.schema.json",
4
+ "title": "CafeKit runtime configuration",
5
+ "description": "Project-scoped CafeKit settings, installed as .claude/runtime.json and .codex/runtime.json. Every key is optional; an absent key keeps the built-in default. Editors that honour $schema use this file for completion and inline documentation. Secrets do not belong here: this file is meant to be committed.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string",
11
+ "description": "Path or URL of this schema. Present so editors can validate the file; CafeKit itself ignores it."
12
+ },
13
+ "privacyBlock": {
14
+ "type": "boolean",
15
+ "default": true,
16
+ "description": "Block reads of files that usually hold secrets (.env, credentials, keys). Set false to disable the privacy hook for this project."
17
+ },
18
+ "inspect": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "description": "The guard that steers broad codebase searches toward the discovery workflow.",
22
+ "properties": {
23
+ "enabled": {
24
+ "type": "boolean",
25
+ "default": true,
26
+ "description": "Set false to stop the inspect guard from blocking broad search commands."
27
+ }
28
+ }
29
+ },
30
+ "docs": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "description": "Documentation conventions surfaced to the agent.",
34
+ "properties": {
35
+ "maxLoc": {
36
+ "type": "integer",
37
+ "minimum": 1,
38
+ "default": 800,
39
+ "description": "Lines allowed in one documentation file before the agent is reminded to split it."
40
+ }
41
+ }
42
+ },
43
+ "paths": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "description": "Where this project keeps its documentation, specifications, and plans, relative to the repository root.",
47
+ "properties": {
48
+ "docs": { "type": "string", "default": "docs", "description": "Documentation root the docs workflow reads and writes." },
49
+ "specs": { "type": "string", "default": "specs", "description": "Specification packet root: one direct child per feature." },
50
+ "plans": { "type": "string", "default": "plans", "description": "Directory holding plan files, one directory per plan." }
51
+ }
52
+ },
53
+ "spec": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "description": "Specification workflow guards. These are convenience switches for local work, not authorizations.",
57
+ "properties": {
58
+ "scaffold_guard": {
59
+ "type": "boolean",
60
+ "default": true,
61
+ "description": "Require task files to be generated by the scaffold script. Set false to write them by hand."
62
+ },
63
+ "tollgate": {
64
+ "type": "boolean",
65
+ "default": true,
66
+ "description": "Report specification state on each prompt. Set false to silence it."
67
+ },
68
+ "completion_gate": {
69
+ "type": "boolean",
70
+ "default": true,
71
+ "description": "Not a switch. The completion gate treats this flag as a bypass attempt and blocks while it is present, whatever its value, because a worker-writable file cannot authorize completion. Remove the key and satisfy the gate instead."
72
+ }
73
+ }
74
+ },
75
+ "usage": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "description": "Usage and quota reporting.",
79
+ "properties": {
80
+ "enabled": {
81
+ "type": "boolean",
82
+ "default": true,
83
+ "description": "Set false to stop fetching quota data for the statusline."
84
+ }
85
+ }
86
+ },
87
+ "locale": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "description": "Languages the agent should use. null means English, or match the user.",
91
+ "properties": {
92
+ "thinkingLanguage": { "type": ["string", "null"], "default": null, "description": "Language for reasoning." },
93
+ "responseLanguage": { "type": ["string", "null"], "default": null, "description": "Language for user-facing output." }
94
+ }
95
+ },
96
+ "codingLevel": {
97
+ "type": ["integer", "null"],
98
+ "minimum": 0,
99
+ "maximum": 5,
100
+ "default": 1,
101
+ "description": "Codex only. How much explanation answers carry: 0 ELI5, 1 junior, 2 mid-level, 3 senior, 4 lead, 5 expert. Codex CLI has no output-style feature, so the rules hook injects the matching file from .codex/output-styles/ once per session. Claude Code loads the same styles natively and reads outputStyle from settings.json instead, so this key is ignored there. null or an out-of-range value injects nothing."
102
+ },
103
+ "statusline": {
104
+ "enum": ["full", "compact", "minimal", "none"],
105
+ "default": "full",
106
+ "description": "How much the statusline renders. 'none' prints an empty line."
107
+ },
108
+ "statuslineColors": {
109
+ "type": "boolean",
110
+ "default": true,
111
+ "description": "Set false for a statusline without ANSI colour."
112
+ },
113
+ "statuslineLayout": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": ["lines"],
117
+ "description": "Explicit statusline composition. A valid layout replaces the default renderers; an invalid or empty one falls back to them. The 'statusline' mode still limits how many lines are drawn.",
118
+ "properties": {
119
+ "lines": {
120
+ "type": "array",
121
+ "description": "One entry per rendered line, each listing section ids in display order.",
122
+ "items": {
123
+ "type": "array",
124
+ "items": { "enum": ["model", "context", "quota", "directory", "git", "plan", "cost", "changes"] }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "assertions": {
130
+ "type": "array",
131
+ "description": "Rules injected for files matching a glob.",
132
+ "items": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": ["pattern", "rule"],
136
+ "properties": {
137
+ "pattern": { "type": "string", "description": "Glob the rule applies to, for example \"**/*.go\"." },
138
+ "rule": { "type": "string", "description": "The rule text shown to the agent." }
139
+ }
140
+ }
141
+ },
142
+ "trust": {
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "description": "Local trust prompt. Keep the passphrase in your own user configuration, never in this committed file.",
146
+ "properties": {
147
+ "enabled": { "type": "boolean", "default": false, "description": "Whether a trust passphrase is required." },
148
+ "passphrase": { "type": ["string", "null"], "default": null, "description": "Do not set this here. This file is committed." }
149
+ }
150
+ },
151
+ "project": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "description": "Detection overrides for a repository the defaults read wrong.",
155
+ "properties": {
156
+ "type": { "type": "string", "default": "auto", "description": "Project type, or \"auto\" to detect." },
157
+ "packageManager": { "type": "string", "default": "auto", "description": "Package manager, or \"auto\" to detect." },
158
+ "framework": { "type": "string", "default": "auto", "description": "Framework, or \"auto\" to detect." }
159
+ }
160
+ },
161
+ "plan": {
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "description": "Plan directory naming and resolution.",
165
+ "properties": {
166
+ "namingFormat": { "type": "string", "default": "{date}-{issue}-{slug}", "description": "Directory name pattern. Variables: {date}, {issue}, {slug}." },
167
+ "dateFormat": { "type": "string", "default": "YYMMDD-HHmm", "description": "Date portion of the plan name." },
168
+ "issuePrefix": { "type": ["string", "null"], "default": null, "description": "Prefix for the issue portion, for example \"GH-\"." },
169
+ "reportsDir": { "type": "string", "default": "reports", "description": "Reports directory inside a plan." },
170
+ "resolution": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "description": "How the active plan is chosen. Only explicit session state makes a plan active; a branch match is a suggestion.",
174
+ "properties": {
175
+ "order": { "type": "array", "items": { "enum": ["session", "branch"] }, "description": "Order the sources are consulted in when resolving the active plan." },
176
+ "branchPattern": { "type": "string", "description": "Regular expression extracting a plan slug from the branch name." }
177
+ }
178
+ },
179
+ "validation": {
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "description": "Plan validation questioning.",
183
+ "properties": {
184
+ "mode": { "enum": ["auto", "prompt", "off"], "default": "prompt", "description": "When to run validation questions." },
185
+ "minQuestions": { "type": "integer", "minimum": 0, "default": 3, "description": "Fewest questions to ask." },
186
+ "maxQuestions": { "type": "integer", "minimum": 0, "default": 8, "description": "Most questions to ask." },
187
+ "focusAreas": { "type": "array", "items": { "type": "string" }, "description": "Topics the questions should cover." }
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "hooks": {
193
+ "type": "object",
194
+ "deprecated": true,
195
+ "description": "Not honoured. No hook consults this map, so an entry here disables nothing. Disable a hook by removing its entry from the host's hook configuration instead.",
196
+ "additionalProperties": { "type": "boolean" }
197
+ },
198
+ "develop": {
199
+ "type": "object",
200
+ "deprecated": true,
201
+ "description": "Not honoured. Parallel execution is chosen per invocation with the --parallel flag, not from this file.",
202
+ "additionalProperties": true
203
+ }
204
+ }
205
+ }