dsh-compound-engineering 0.0.0-stage → 0.1.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 (461) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +160 -2
  3. package/README.zh.md +161 -0
  4. package/cordis.patch.yml +6 -0
  5. package/lib/frontmatter.js +167 -0
  6. package/lib/index.js +46 -0
  7. package/lib/provider.js +201 -0
  8. package/package.json +62 -4
  9. package/skills/CODING_STANDARDS.md +68 -0
  10. package/skills/ce-babysit-pr/SKILL.md +59 -0
  11. package/skills/ce-babysit-pr/references/branch-currency.md +22 -0
  12. package/skills/ce-babysit-pr/references/envelope.md +44 -0
  13. package/skills/ce-babysit-pr/references/pipeline.md +15 -0
  14. package/skills/ce-babysit-pr/references/report.md +20 -0
  15. package/skills/ce-babysit-pr/references/settle.md +37 -0
  16. package/skills/ce-babysit-pr/references/setup.md +33 -0
  17. package/skills/ce-babysit-pr/references/stack-commands.md +39 -0
  18. package/skills/ce-babysit-pr/references/stack.md +43 -0
  19. package/skills/ce-babysit-pr/references/tick.md +102 -0
  20. package/skills/ce-babysit-pr/references/watch-loop.md +222 -0
  21. package/skills/ce-babysit-pr/scripts/pr-snapshot +3656 -0
  22. package/skills/ce-bakeoff/SKILL.md +48 -0
  23. package/skills/ce-bakeoff/references/candidates.md +37 -0
  24. package/skills/ce-bakeoff/references/judging.md +19 -0
  25. package/skills/ce-bakeoff/references/output.md +11 -0
  26. package/skills/ce-bakeoff/references/verification.md +15 -0
  27. package/skills/ce-brainstorm/SKILL.md +69 -0
  28. package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
  29. package/skills/ce-brainstorm/references/approaches.md +57 -0
  30. package/skills/ce-brainstorm/references/bakeoff.md +9 -0
  31. package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
  32. package/skills/ce-brainstorm/references/brainstorm-sections.md +458 -0
  33. package/skills/ce-brainstorm/references/dialogue.md +89 -0
  34. package/skills/ce-brainstorm/references/handoff.md +187 -0
  35. package/skills/ce-brainstorm/references/html-rendering.md +638 -0
  36. package/skills/ce-brainstorm/references/interaction-rules.md +33 -0
  37. package/skills/ce-brainstorm/references/markdown-rendering.md +242 -0
  38. package/skills/ce-brainstorm/references/model-tiers.md +13 -0
  39. package/skills/ce-brainstorm/references/output-mode.md +26 -0
  40. package/skills/ce-brainstorm/references/phase-0.md +104 -0
  41. package/skills/ce-brainstorm/references/plan-write.md +32 -0
  42. package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
  43. package/skills/ce-brainstorm/references/reasoning-elevation.md +124 -0
  44. package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
  45. package/skills/ce-brainstorm/references/synthesis-summary.md +149 -0
  46. package/skills/ce-brainstorm/references/universal-brainstorming.md +72 -0
  47. package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
  48. package/skills/ce-brainstorm/references/visual-probes.md +164 -0
  49. package/skills/ce-brainstorm/scripts/elevation-dispatch.sh +288 -0
  50. package/skills/ce-brainstorm/scripts/light-webserver.js +1275 -0
  51. package/skills/ce-brainstorm/scripts/packs-resolve.py +737 -0
  52. package/skills/ce-brainstorm/scripts/peer-job-runner.py +2594 -0
  53. package/skills/ce-code-review/SKILL.md +40 -0
  54. package/skills/ce-code-review/references/action-class-rubric.md +67 -0
  55. package/skills/ce-code-review/references/cross-model-recovery.md +38 -0
  56. package/skills/ce-code-review/references/cross-model-review.md +191 -0
  57. package/skills/ce-code-review/references/depth-paths.md +32 -0
  58. package/skills/ce-code-review/references/diff-scope.md +59 -0
  59. package/skills/ce-code-review/references/dispatch-reviewers.md +135 -0
  60. package/skills/ce-code-review/references/findings-schema.json +125 -0
  61. package/skills/ce-code-review/references/finish-input.md +118 -0
  62. package/skills/ce-code-review/references/finish-review.md +202 -0
  63. package/skills/ce-code-review/references/intent-and-plan.md +73 -0
  64. package/skills/ce-code-review/references/modes-and-output.md +156 -0
  65. package/skills/ce-code-review/references/persona-catalog.md +66 -0
  66. package/skills/ce-code-review/references/personas/adversarial-reviewer.md +111 -0
  67. package/skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
  68. package/skills/ce-code-review/references/personas/api-contract-reviewer.md +44 -0
  69. package/skills/ce-code-review/references/personas/correctness-reviewer.md +48 -0
  70. package/skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
  71. package/skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
  72. package/skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +45 -0
  73. package/skills/ce-code-review/references/personas/learnings-researcher.md +260 -0
  74. package/skills/ce-code-review/references/personas/maintainability-reviewer.md +85 -0
  75. package/skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
  76. package/skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
  77. package/skills/ce-code-review/references/personas/project-standards-reviewer.md +77 -0
  78. package/skills/ce-code-review/references/personas/reliability-reviewer.md +49 -0
  79. package/skills/ce-code-review/references/personas/security-reviewer.md +50 -0
  80. package/skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
  81. package/skills/ce-code-review/references/personas/testing-reviewer.md +51 -0
  82. package/skills/ce-code-review/references/review-output-template.md +172 -0
  83. package/skills/ce-code-review/references/scope.md +176 -0
  84. package/skills/ce-code-review/references/select-and-route.md +93 -0
  85. package/skills/ce-code-review/references/subagent-template.md +206 -0
  86. package/skills/ce-code-review/references/validator-batch-template.md +67 -0
  87. package/skills/ce-code-review/scripts/cross-model-adversarial-review.sh +1275 -0
  88. package/skills/ce-code-review/scripts/findings-mechanics.py +274 -0
  89. package/skills/ce-code-review/scripts/packs-resolve.py +737 -0
  90. package/skills/ce-code-review/scripts/peer-job-runner.py +2594 -0
  91. package/skills/ce-code-review/scripts/review-scope.py +419 -0
  92. package/skills/ce-code-review/scripts/run-log.py +280 -0
  93. package/skills/ce-commit/SKILL.md +60 -0
  94. package/skills/ce-commit-push-pr/SKILL.md +69 -0
  95. package/skills/ce-commit-push-pr/references/apply-and-handoff.md +79 -0
  96. package/skills/ce-commit-push-pr/references/branch-creation.md +47 -0
  97. package/skills/ce-commit-push-pr/references/commit-and-push.md +26 -0
  98. package/skills/ce-commit-push-pr/references/compose.md +29 -0
  99. package/skills/ce-commit-push-pr/references/context.md +42 -0
  100. package/skills/ce-commit-push-pr/references/gh-stack-cli.md +83 -0
  101. package/skills/ce-commit-push-pr/references/pr-description-writing.md +208 -0
  102. package/skills/ce-commit-push-pr/references/stack-submit.md +81 -0
  103. package/skills/ce-compound/SKILL.md +79 -0
  104. package/skills/ce-compound/assets/resolution-template.md +96 -0
  105. package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
  106. package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
  107. package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
  108. package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
  109. package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
  110. package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
  111. package/skills/ce-compound/references/agents/session-historian.md +82 -0
  112. package/skills/ce-compound/references/assembly.md +127 -0
  113. package/skills/ce-compound/references/concepts-vocabulary.md +98 -0
  114. package/skills/ce-compound/references/enhancement.md +42 -0
  115. package/skills/ce-compound/references/grounding-validation.md +89 -0
  116. package/skills/ce-compound/references/lightweight.md +56 -0
  117. package/skills/ce-compound/references/modes.md +13 -0
  118. package/skills/ce-compound/references/refresh-and-discoverability.md +96 -0
  119. package/skills/ce-compound/references/report.md +115 -0
  120. package/skills/ce-compound/references/research.md +144 -0
  121. package/skills/ce-compound/references/schema.yaml +236 -0
  122. package/skills/ce-compound/references/session-history.md +73 -0
  123. package/skills/ce-compound/references/yaml-schema.md +130 -0
  124. package/skills/ce-compound/scripts/packs-resolve.py +737 -0
  125. package/skills/ce-compound/scripts/session-history/__pycache__/dsh_session.cpython-314.pyc +0 -0
  126. package/skills/ce-compound/scripts/session-history/discover-sessions.sh +290 -0
  127. package/skills/ce-compound/scripts/session-history/discover_dsh.py +123 -0
  128. package/skills/ce-compound/scripts/session-history/dsh_session.py +225 -0
  129. package/skills/ce-compound/scripts/session-history/extract-errors.py +178 -0
  130. package/skills/ce-compound/scripts/session-history/extract-metadata.py +301 -0
  131. package/skills/ce-compound/scripts/session-history/extract-skeleton.py +346 -0
  132. package/skills/ce-compound/scripts/validate-doc-claims.py +497 -0
  133. package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
  134. package/skills/ce-compound-refresh/SKILL.md +88 -0
  135. package/skills/ce-compound-refresh/assets/resolution-template.md +96 -0
  136. package/skills/ce-compound-refresh/references/classify.md +42 -0
  137. package/skills/ce-compound-refresh/references/commit.md +7 -0
  138. package/skills/ce-compound-refresh/references/concepts-vocabulary.md +116 -0
  139. package/skills/ce-compound-refresh/references/discoverability.md +15 -0
  140. package/skills/ce-compound-refresh/references/investigate.md +23 -0
  141. package/skills/ce-compound-refresh/references/modes.md +27 -0
  142. package/skills/ce-compound-refresh/references/per-action-flows.md +142 -0
  143. package/skills/ce-compound-refresh/references/report.md +23 -0
  144. package/skills/ce-compound-refresh/references/schema.yaml +236 -0
  145. package/skills/ce-compound-refresh/references/scope.md +18 -0
  146. package/skills/ce-compound-refresh/references/worth-audit.md +35 -0
  147. package/skills/ce-compound-refresh/references/yaml-schema.md +130 -0
  148. package/skills/ce-compound-refresh/scripts/validate-doc-claims.py +497 -0
  149. package/skills/ce-compound-refresh/scripts/validate-frontmatter.py +137 -0
  150. package/skills/ce-debug/SKILL.md +122 -0
  151. package/skills/ce-debug/references/anti-patterns.md +91 -0
  152. package/skills/ce-debug/references/defense-in-depth.md +39 -0
  153. package/skills/ce-debug/references/fix.md +21 -0
  154. package/skills/ce-debug/references/investigate.md +114 -0
  155. package/skills/ce-debug/references/investigation-techniques.md +384 -0
  156. package/skills/ce-debug/references/pipeline-mode.md +78 -0
  157. package/skills/ce-debug/references/post-fix-handoff.md +60 -0
  158. package/skills/ce-debug/references/return-to-caller.md +57 -0
  159. package/skills/ce-doc-review/SKILL.md +75 -0
  160. package/skills/ce-doc-review/references/bulk-preview.md +146 -0
  161. package/skills/ce-doc-review/references/cross-model-review.md +207 -0
  162. package/skills/ce-doc-review/references/decision-primer.md +47 -0
  163. package/skills/ce-doc-review/references/dispatch.md +56 -0
  164. package/skills/ce-doc-review/references/document-intake.md +44 -0
  165. package/skills/ce-doc-review/references/findings-schema.json +85 -0
  166. package/skills/ce-doc-review/references/modes.md +20 -0
  167. package/skills/ce-doc-review/references/open-questions-defer.md +158 -0
  168. package/skills/ce-doc-review/references/persona-selection.md +41 -0
  169. package/skills/ce-doc-review/references/personas/adversarial-document-reviewer.md +109 -0
  170. package/skills/ce-doc-review/references/personas/coherence-reviewer.md +69 -0
  171. package/skills/ce-doc-review/references/personas/design-lens-reviewer.md +48 -0
  172. package/skills/ce-doc-review/references/personas/feasibility-reviewer.md +50 -0
  173. package/skills/ce-doc-review/references/personas/product-lens-reviewer.md +85 -0
  174. package/skills/ce-doc-review/references/personas/scope-guardian-reviewer.md +83 -0
  175. package/skills/ce-doc-review/references/personas/security-lens-reviewer.md +41 -0
  176. package/skills/ce-doc-review/references/personas/whole-doc-reviewer.md +25 -0
  177. package/skills/ce-doc-review/references/rendering-floor.md +175 -0
  178. package/skills/ce-doc-review/references/review-output-template.md +123 -0
  179. package/skills/ce-doc-review/references/subagent-template.md +188 -0
  180. package/skills/ce-doc-review/references/synthesis-and-presentation.md +350 -0
  181. package/skills/ce-doc-review/references/walkthrough.md +347 -0
  182. package/skills/ce-doc-review/scripts/cross-model-doc-review.sh +1270 -0
  183. package/skills/ce-doc-review/scripts/packs-resolve.py +737 -0
  184. package/skills/ce-doc-review/scripts/peer-job-runner.py +2594 -0
  185. package/skills/ce-dogfood/SKILL.md +66 -0
  186. package/skills/ce-dogfood/agents/openai.yaml +2 -0
  187. package/skills/ce-dogfood/references/dogfood-report-template.md +97 -0
  188. package/skills/ce-dogfood/references/phases.md +167 -0
  189. package/skills/ce-dogfood/references/test-matrix-taxonomy.md +62 -0
  190. package/skills/ce-dogfood/scripts/packs-resolve.py +737 -0
  191. package/skills/ce-explain/SKILL.md +81 -0
  192. package/skills/ce-explain/references/agents/behavior-trace-scout.md +19 -0
  193. package/skills/ce-explain/references/agents/work-recap-scout.md +23 -0
  194. package/skills/ce-explain/references/check-in.md +18 -0
  195. package/skills/ce-explain/references/destinations.md +35 -0
  196. package/skills/ce-explain/references/explainer-html.md +29 -0
  197. package/skills/ce-explain/references/explainer-markdown.md +24 -0
  198. package/skills/ce-explain/references/intake.md +50 -0
  199. package/skills/ce-explain/references/orchestration.md +46 -0
  200. package/skills/ce-handoff/SKILL.md +54 -0
  201. package/skills/ce-handoff/references/create.md +88 -0
  202. package/skills/ce-handoff/references/resume.md +46 -0
  203. package/skills/ce-ideate/SKILL.md +75 -0
  204. package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +166 -0
  205. package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
  206. package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
  207. package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
  208. package/skills/ce-ideate/references/decomposition.md +39 -0
  209. package/skills/ce-ideate/references/divergent-ideation.md +112 -0
  210. package/skills/ce-ideate/references/grounding.md +138 -0
  211. package/skills/ce-ideate/references/html-rendering.md +638 -0
  212. package/skills/ce-ideate/references/ideation-sections.md +191 -0
  213. package/skills/ce-ideate/references/issue-intelligence.md +44 -0
  214. package/skills/ce-ideate/references/markdown-rendering.md +242 -0
  215. package/skills/ce-ideate/references/output-mode.md +34 -0
  216. package/skills/ce-ideate/references/post-ideation-workflow.md +169 -0
  217. package/skills/ce-ideate/references/scope-gates.md +148 -0
  218. package/skills/ce-ideate/references/universal-ideation.md +119 -0
  219. package/skills/ce-ideate/references/user-research-artifacts.md +28 -0
  220. package/skills/ce-ideate/references/web-research-cache.md +56 -0
  221. package/skills/ce-noslop/SKILL.md +45 -0
  222. package/skills/ce-noslop/references/patterns.md +61 -0
  223. package/skills/ce-noslop/references/terminology.md +3 -0
  224. package/skills/ce-optimize/SKILL.md +64 -0
  225. package/skills/ce-optimize/references/agents/learnings-researcher.md +247 -0
  226. package/skills/ce-optimize/references/agents/repo-research-analyst.md +258 -0
  227. package/skills/ce-optimize/references/example-expensive-benchmark-spec.yaml +88 -0
  228. package/skills/ce-optimize/references/example-hard-spec.yaml +64 -0
  229. package/skills/ce-optimize/references/example-judge-spec.yaml +83 -0
  230. package/skills/ce-optimize/references/example-text-target-spec.yaml +80 -0
  231. package/skills/ce-optimize/references/experiment-log-schema.yaml +563 -0
  232. package/skills/ce-optimize/references/experiment-prompt-template.md +143 -0
  233. package/skills/ce-optimize/references/judge-prompt-template.md +117 -0
  234. package/skills/ce-optimize/references/loop.md +286 -0
  235. package/skills/ce-optimize/references/measurement.md +168 -0
  236. package/skills/ce-optimize/references/optimize-spec-schema.yaml +570 -0
  237. package/skills/ce-optimize/references/persistence.md +93 -0
  238. package/skills/ce-optimize/references/spec.md +107 -0
  239. package/skills/ce-optimize/references/text-targets.md +51 -0
  240. package/skills/ce-optimize/references/usage-guide.md +147 -0
  241. package/skills/ce-optimize/references/wrap-up.md +54 -0
  242. package/skills/ce-optimize/scripts/decide.mjs +676 -0
  243. package/skills/ce-optimize/scripts/experiment-worktree.sh +330 -0
  244. package/skills/ce-optimize/scripts/measure.sh +140 -0
  245. package/skills/ce-optimize/scripts/parallel-probe.sh +134 -0
  246. package/skills/ce-plan/SKILL.md +60 -0
  247. package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +66 -0
  248. package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
  249. package/skills/ce-plan/references/agents/best-practices-researcher.md +118 -0
  250. package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
  251. package/skills/ce-plan/references/agents/framework-docs-researcher.md +97 -0
  252. package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
  253. package/skills/ce-plan/references/agents/learnings-researcher.md +268 -0
  254. package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
  255. package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
  256. package/skills/ce-plan/references/agents/repo-research-analyst.md +262 -0
  257. package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
  258. package/skills/ce-plan/references/agents/slack-researcher.md +131 -0
  259. package/skills/ce-plan/references/agents/spec-flow-analyzer.md +84 -0
  260. package/skills/ce-plan/references/agents/web-researcher.md +125 -0
  261. package/skills/ce-plan/references/approach-altitude.md +55 -0
  262. package/skills/ce-plan/references/bakeoff.md +9 -0
  263. package/skills/ce-plan/references/deepening-workflow.md +263 -0
  264. package/skills/ce-plan/references/final-review.md +134 -0
  265. package/skills/ce-plan/references/html-rendering.md +638 -0
  266. package/skills/ce-plan/references/intake.md +158 -0
  267. package/skills/ce-plan/references/markdown-rendering.md +242 -0
  268. package/skills/ce-plan/references/output-contracts.md +29 -0
  269. package/skills/ce-plan/references/output-mode.md +45 -0
  270. package/skills/ce-plan/references/plan-handoff.md +116 -0
  271. package/skills/ce-plan/references/plan-sections.md +489 -0
  272. package/skills/ce-plan/references/reasoning-elevation.md +124 -0
  273. package/skills/ce-plan/references/research.md +211 -0
  274. package/skills/ce-plan/references/resume.md +61 -0
  275. package/skills/ce-plan/references/settled-decisions.md +45 -0
  276. package/skills/ce-plan/references/structure.md +207 -0
  277. package/skills/ce-plan/references/synthesis-summary.md +260 -0
  278. package/skills/ce-plan/references/universal-planning.md +170 -0
  279. package/skills/ce-plan/scripts/elevation-dispatch.sh +288 -0
  280. package/skills/ce-plan/scripts/packs-resolve.py +737 -0
  281. package/skills/ce-plan/scripts/peer-job-runner.py +2594 -0
  282. package/skills/ce-polish/SKILL.md +22 -0
  283. package/skills/ce-polish/agents/openai.yaml +2 -0
  284. package/skills/ce-polish/references/dev-server-astro.md +58 -0
  285. package/skills/ce-polish/references/dev-server-detection.md +40 -0
  286. package/skills/ce-polish/references/dev-server-next.md +61 -0
  287. package/skills/ce-polish/references/dev-server-nuxt.md +58 -0
  288. package/skills/ce-polish/references/dev-server-procfile.md +59 -0
  289. package/skills/ce-polish/references/dev-server-rails.md +50 -0
  290. package/skills/ce-polish/references/dev-server-remix.md +58 -0
  291. package/skills/ce-polish/references/dev-server-sveltekit.md +58 -0
  292. package/skills/ce-polish/references/dev-server-vite.md +48 -0
  293. package/skills/ce-polish/references/install-riffrec.md +35 -0
  294. package/skills/ce-polish/references/launch-json-schema.md +177 -0
  295. package/skills/ce-polish/references/live-loop.md +98 -0
  296. package/skills/ce-polish/references/live-remote.md +35 -0
  297. package/skills/ce-polish/references/live-start.md +93 -0
  298. package/skills/ce-polish/references/live-stream-contract.md +253 -0
  299. package/skills/ce-polish/references/run.md +67 -0
  300. package/skills/ce-polish/scripts/detect-project-type.sh +277 -0
  301. package/skills/ce-polish/scripts/detect-riffrec.sh +225 -0
  302. package/skills/ce-polish/scripts/live-endpoint.js +2841 -0
  303. package/skills/ce-polish/scripts/read-launch-json.sh +117 -0
  304. package/skills/ce-polish/scripts/resolve-package-manager.sh +95 -0
  305. package/skills/ce-polish/scripts/resolve-port.sh +307 -0
  306. package/skills/ce-pov/SKILL.md +64 -0
  307. package/skills/ce-pov/references/agents/external-evidence-researcher.md +26 -0
  308. package/skills/ce-pov/references/agents/pov-peer.md +43 -0
  309. package/skills/ce-pov/references/agents/precedent-activity-scout.md +21 -0
  310. package/skills/ce-pov/references/agents/project-grounding-scout.md +32 -0
  311. package/skills/ce-pov/references/boundaries.md +36 -0
  312. package/skills/ce-pov/references/cross-model-panel.md +596 -0
  313. package/skills/ce-pov/references/followup.md +9 -0
  314. package/skills/ce-pov/references/grounding.md +47 -0
  315. package/skills/ce-pov/references/intake.md +61 -0
  316. package/skills/ce-pov/references/invocation.md +47 -0
  317. package/skills/ce-pov/references/method.md +68 -0
  318. package/skills/ce-pov/references/pov-schema.json +56 -0
  319. package/skills/ce-pov/references/report.md +7 -0
  320. package/skills/ce-pov/scripts/cross-model-pov.sh +1110 -0
  321. package/skills/ce-pov/scripts/peer-job-runner.py +2594 -0
  322. package/skills/ce-product-pulse/SKILL.md +81 -0
  323. package/skills/ce-product-pulse/agents/openai.yaml +2 -0
  324. package/skills/ce-product-pulse/references/config.md +20 -0
  325. package/skills/ce-product-pulse/references/interview.md +260 -0
  326. package/skills/ce-product-pulse/references/report-template.md +89 -0
  327. package/skills/ce-product-pulse/references/run.md +46 -0
  328. package/skills/ce-product-pulse/references/setup.md +43 -0
  329. package/skills/ce-promote/SKILL.md +90 -0
  330. package/skills/ce-promote/agents/openai.yaml +2 -0
  331. package/skills/ce-promote/references/spiral-cli.md +149 -0
  332. package/skills/ce-proof/SKILL.md +65 -0
  333. package/skills/ce-proof/references/api.md +176 -0
  334. package/skills/ce-proof/references/workflows.md +124 -0
  335. package/skills/ce-prototype/SKILL.md +59 -0
  336. package/skills/ce-prototype/assets/annotate.css +206 -0
  337. package/skills/ce-prototype/assets/annotate.js +837 -0
  338. package/skills/ce-prototype/references/annotation-loop.md +32 -0
  339. package/skills/ce-prototype/references/build.md +39 -0
  340. package/skills/ce-prototype/references/craft-floor.md +43 -0
  341. package/skills/ce-prototype/references/preview.md +118 -0
  342. package/skills/ce-prototype/references/scoping.md +38 -0
  343. package/skills/ce-prototype/references/write-back.md +37 -0
  344. package/skills/ce-prototype/scripts/light-webserver.js +1275 -0
  345. package/skills/ce-resolve-pr-feedback/SKILL.md +60 -0
  346. package/skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +59 -0
  347. package/skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +141 -0
  348. package/skills/ce-resolve-pr-feedback/references/full-mode.md +336 -0
  349. package/skills/ce-resolve-pr-feedback/references/pipeline-mode.md +23 -0
  350. package/skills/ce-resolve-pr-feedback/references/resume.md +60 -0
  351. package/skills/ce-resolve-pr-feedback/references/return-to-caller.md +111 -0
  352. package/skills/ce-resolve-pr-feedback/references/targeted-mode.md +48 -0
  353. package/skills/ce-resolve-pr-feedback/scripts/get-pr-comments +176 -0
  354. package/skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +84 -0
  355. package/skills/ce-resolve-pr-feedback/scripts/pending-feedback.py +287 -0
  356. package/skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +57 -0
  357. package/skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
  358. package/skills/ce-retune/SKILL.md +42 -0
  359. package/skills/ce-retune/agents/openai.yaml +2 -0
  360. package/skills/ce-retune/references/baseline-mining.md +122 -0
  361. package/skills/ce-retune/references/corpus-audit.md +128 -0
  362. package/skills/ce-retune/references/cut-passes.md +129 -0
  363. package/skills/ce-retune/references/halt-taxonomy.md +123 -0
  364. package/skills/ce-retune/references/noise-floor.md +131 -0
  365. package/skills/ce-retune/references/workflow-shapes.md +73 -0
  366. package/skills/ce-riffrec-feedback-analysis/SKILL.md +33 -0
  367. package/skills/ce-riffrec-feedback-analysis/references/analyzer.md +18 -0
  368. package/skills/ce-riffrec-feedback-analysis/references/compound-engineering-feedback-format.md +116 -0
  369. package/skills/ce-riffrec-feedback-analysis/references/extensive-analysis.md +98 -0
  370. package/skills/ce-riffrec-feedback-analysis/references/install-riffrec.md +27 -0
  371. package/skills/ce-riffrec-feedback-analysis/references/quick-bug-report.md +38 -0
  372. package/skills/ce-riffrec-feedback-analysis/scripts/analyze_riffrec_zip.py +1306 -0
  373. package/skills/ce-setup/SKILL.md +103 -0
  374. package/skills/ce-setup/agents/openai.yaml +2 -0
  375. package/skills/ce-setup/assets/compounding-directive.md +11 -0
  376. package/skills/ce-setup/assets/noslop-directive.md +7 -0
  377. package/skills/ce-setup/assets/pack-rule-template.md +11 -0
  378. package/skills/ce-setup/references/acpx-cache-warm.md +14 -0
  379. package/skills/ce-setup/references/config-template.yaml +210 -0
  380. package/skills/ce-setup/references/legacy-codex-tool-map.md +15 -0
  381. package/skills/ce-setup/references/pack-scaffold.md +45 -0
  382. package/skills/ce-setup/references/repo-fixes.md +121 -0
  383. package/skills/ce-setup/scripts/check-health +929 -0
  384. package/skills/ce-setup/scripts/packs-resolve.py +737 -0
  385. package/skills/ce-simplify-code/SKILL.md +76 -0
  386. package/skills/ce-simplify-code/references/personas/code-quality-reviewer.md +17 -0
  387. package/skills/ce-simplify-code/references/personas/code-reuse-reviewer.md +7 -0
  388. package/skills/ce-simplify-code/references/personas/comment-reviewer.md +24 -0
  389. package/skills/ce-simplify-code/references/personas/efficiency-reviewer.md +11 -0
  390. package/skills/ce-simplify-code/references/personas/test-value-reviewer.md +23 -0
  391. package/skills/ce-simplify-code/references/reviewer-dispatch.md +11 -0
  392. package/skills/ce-simplify-code/references/standalone-report.md +25 -0
  393. package/skills/ce-strategy/SKILL.md +61 -0
  394. package/skills/ce-strategy/references/grounding.md +22 -0
  395. package/skills/ce-strategy/references/interview.md +179 -0
  396. package/skills/ce-strategy/references/strategy-template.md +94 -0
  397. package/skills/ce-strategy/references/update-run.md +33 -0
  398. package/skills/ce-sweep/SKILL.md +93 -0
  399. package/skills/ce-sweep/agents/openai.yaml +2 -0
  400. package/skills/ce-sweep/references/agents/media-analyzer.md +54 -0
  401. package/skills/ce-sweep/references/interview.md +208 -0
  402. package/skills/ce-sweep/references/model-tiers.md +13 -0
  403. package/skills/ce-sweep/references/plan-template.md +62 -0
  404. package/skills/ce-sweep/references/run.md +126 -0
  405. package/skills/ce-sweep/references/sources/email.md +57 -0
  406. package/skills/ce-sweep/references/sources/github-issues.md +59 -0
  407. package/skills/ce-sweep/references/sources/slack.md +61 -0
  408. package/skills/ce-sweep/references/state-schema.md +157 -0
  409. package/skills/ce-sweep/references/subagent-template.md +60 -0
  410. package/skills/ce-sweep/scripts/analyze_riffrec_zip.py +1306 -0
  411. package/skills/ce-sweep/scripts/sweep-state.py +793 -0
  412. package/skills/ce-test-browser/SKILL.md +50 -0
  413. package/skills/ce-test-browser/references/agent-browser-driver.md +47 -0
  414. package/skills/ce-test-browser/references/pipeline-orchestration.md +45 -0
  415. package/skills/ce-test-browser/references/route-and-report.md +129 -0
  416. package/skills/ce-test-browser/scripts/resolve-port.sh +41 -0
  417. package/skills/ce-test-xcode/SKILL.md +26 -0
  418. package/skills/ce-test-xcode/agents/openai.yaml +2 -0
  419. package/skills/ce-test-xcode/references/setup-and-build.md +32 -0
  420. package/skills/ce-test-xcode/references/test-and-report.md +64 -0
  421. package/skills/ce-work/SKILL.md +62 -0
  422. package/skills/ce-work/references/agents/figma-design-sync.md +27 -0
  423. package/skills/ce-work/references/agents/implementation-worker.md +17 -0
  424. package/skills/ce-work/references/cross-model-execution.md +191 -0
  425. package/skills/ce-work/references/execution-engines.md +64 -0
  426. package/skills/ce-work/references/execution-strategy.md +73 -0
  427. package/skills/ce-work/references/implementation-loop.md +107 -0
  428. package/skills/ce-work/references/implementation-result-schema.json +52 -0
  429. package/skills/ce-work/references/input-triage.md +50 -0
  430. package/skills/ce-work/references/non-code-execution.md +23 -0
  431. package/skills/ce-work/references/return-to-caller.md +33 -0
  432. package/skills/ce-work/references/review-findings-followup.md +82 -0
  433. package/skills/ce-work/references/shipping-workflow.md +89 -0
  434. package/skills/ce-work/references/tracker-defer.md +150 -0
  435. package/skills/ce-work/references/work-intake.md +51 -0
  436. package/skills/ce-work/references/workspace-setup.md +27 -0
  437. package/skills/ce-work/scripts/__pycache__/unit_workspace_jobs.cpython-314.pyc +0 -0
  438. package/skills/ce-work/scripts/__pycache__/unit_workspace_state.cpython-314.pyc +0 -0
  439. package/skills/ce-work/scripts/cross-model-work.sh +1385 -0
  440. package/skills/ce-work/scripts/peer-job-runner.py +2594 -0
  441. package/skills/ce-work/scripts/unit-workspace.py +215 -0
  442. package/skills/ce-work/scripts/unit_workspace_ignored.py +93 -0
  443. package/skills/ce-work/scripts/unit_workspace_integration.py +677 -0
  444. package/skills/ce-work/scripts/unit_workspace_jobs.py +1216 -0
  445. package/skills/ce-work/scripts/unit_workspace_lifecycle.py +981 -0
  446. package/skills/ce-work/scripts/unit_workspace_state.py +1379 -0
  447. package/skills/ce-work/scripts/unit_workspace_transaction.py +612 -0
  448. package/skills/ce-worktree/SKILL.md +54 -0
  449. package/skills/lfg/SKILL.md +59 -0
  450. package/skills/lfg/references/debug-return.md +25 -0
  451. package/skills/lfg/references/intake.md +30 -0
  452. package/skills/lfg/references/next-work-handoff.md +96 -0
  453. package/skills/lfg/references/plan-brief.md +36 -0
  454. package/skills/lfg/references/review-followup.md +78 -0
  455. package/skills/lfg/references/shipping.md +65 -0
  456. package/skills/lfg/references/stage-routing.md +49 -0
  457. package/skills/lfg/references/task-visibility.md +11 -0
  458. package/skills/lfg/references/tracker-defer.md +150 -0
  459. package/skills/lfg/references/work-return.md +27 -0
  460. package/skills/wtf/SKILL.md +33 -0
  461. package/skills/wtf/agents/openai.yaml +2 -0
@@ -0,0 +1,116 @@
1
+ # Plan Handoff
2
+
3
+ This file contains post-plan-writing instructions for the Durable path: document review, post-generation options, and issue creation. Load it after the plan file has been written and the confidence check (5.3.1-5.3.7) is complete. Direct and Chat brief results never reach it.
4
+
5
+ ## 5.3.8 Document Review
6
+
7
+ Invoke the `ce-doc-review` skill with arguments `mode:non-interactive <plan-path>` using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; those are delegation mechanisms, not skill invocation. This phase runs for both markdown and HTML; `ce-doc-review` applies fixes in the artifact's native format. It is mandatory — do not skip it because the confidence check already ran. The two workflows catch different classes of issues.
8
+
9
+ While authoring or revising a draft within the user's planning request, carry that permission to edit into the review: "Apply corrections to this draft's implementation and verification sections needed to satisfy its established Product Contract. Preserve that contract, existing constraints, and user-reserved or session-settled decisions." Supply the document path and the actual contract; the skill name or non-interactive mode alone does not grant permission. If the request does not authorize revising the document, grant no permission to edit. `ce-doc-review` decides whether a fix is applied and enforces its restriction on fixes that only another model found; do not apply a returned proposal merely to bypass that restriction.
10
+
11
+ If `ce-doc-review` cannot be invoked, record a stand-in structured review result (the shape `ce-doc-review` would normally return) with these values and proceed to Final Checks:
12
+ - `fixes_applied = 0`
13
+ - `proposed_fixes_count = 0`, `decisions_count = 0`, `fyi_count = 0`
14
+ - `skipped_reason: skill_unreachable`
15
+ - `skipped_detail: <why the host's normal skill-invocation mechanism could not start ce-doc-review>`
16
+
17
+ The review never started: say that `ce-doc-review` did not run. Report a review error or timeout only after the `ce-doc-review` workflow actually begins.
18
+
19
+ Non-interactive is the default at this phase because most users want to start work after planning, not adjudicate every reviewer concern up front. Non-interactive returns structured findings without blocking prompts. Its applied list includes corrections covered by the permission to edit you supplied; proposals still needing approval and unresolved user decisions remain separate. The post-generation menu (see 5.4) offers `Decide on the review's open items` as a first-class option so users can opt into the full interactive walkthrough when they want it.
20
+
21
+ The confidence check and ce-doc-review are complementary:
22
+ - The confidence check strengthens rationale, sequencing, risk treatment, and grounding
23
+ - Document-review checks coherence, feasibility, scope alignment, and surfaces role-specific issues
24
+
25
+ **Take responsibility for the completed plan.** Before applying or presenting review results, save a resolved review alongside the original evidence. Each claim has a disposition and its reason. A retained claim needs project evidence of a practical consequence if the plan stays unchanged, plus an explanation of why the existing plan and settled decisions do not already address it. A retained claim that would add a mechanism must also pass `references/structure.md` 3.8; one that fails it goes to the considered-and-not-built list instead. Review can also claim that a committed mechanism fails 3.8, or that something on the considered-and-not-built list passes it. Retain such a claim when its reasoning holds under 3.8, and make the removal or restoration yourself, since the review does not apply those changes. A reviewer label, recommendation, or request for more detail does not satisfy that condition. Dismiss claims that do not meet it, including advisory observations.
26
+
27
+ Your result is a plan the user can act on, with only worthwhile unresolved choices. Investigate factual uncertainty and choose technical corrections within the planning request. Leave an already adequate plan unchanged. A user decision remains only when progress requires essential information you cannot obtain or a consequential choice that the request and constraints do not settle. Record what remains for the user to decide and why you cannot settle it from that context.
28
+
29
+ For a retained correction, invoke `ce-doc-review` with the resolved review, evidence, and the existing permission to edit. It applies the correction and reuses completed review results. Do not apply returned proposals yourself or treat your agreement as permission to bypass its application restrictions.
30
+
31
+ Save actual edits and the reviewed document's identity with the resolved review. Only its remaining findings supply the handoff and menu counts; original counts stay in the saved evidence. Dismissed and completed items must not reappear as FYIs or deferred questions. Proceed to Final Checks when the resolved review and any authorized corrections are complete.
32
+
33
+ **Pipeline mode:** Invoke `ce-doc-review` with `mode:non-interactive` and the plan path — non-interactive mode is identical to the interactive default at this phase. No further routing is offered in pipeline mode; the caller decides what to do with the returned findings. Address any P0/P1 findings before returning control to the caller. If the review could not start and ce-plan recorded the `skill_unreachable` stand-in result, return that result explicitly so the caller does not treat review as complete.
34
+
35
+ ## 5.3.9 Final Checks and Cleanup
36
+
37
+ Before proceeding to post-generation options:
38
+ - Confirm the plan is stronger in specific ways, not merely longer
39
+ - Confirm the planning boundary is intact
40
+ - Confirm origin decisions were preserved when an origin document exists
41
+
42
+ If artifact-backed mode was used:
43
+ - Clean up the temporary scratch directory after the plan is safely updated
44
+ - If cleanup is not practical on the current platform, note where the artifacts were left
45
+
46
+ **Format-specific composition.** When `OUTPUT_FORMAT=html` (resolved in SKILL.md Phase 0.0), the plan is written as a single self-contained `.html` file — there is no markdown sibling. Read `references/html-rendering.md` for composition rules: invariants, precedence stack, format principles, agent-consumability rules, and the post-compose audit. The `.html` file is the artifact downstream consumers (`ce-doc-review`, `ce-work`, human readers) read and update directly.
47
+
48
+ When `OUTPUT_FORMAT=md`, write the markdown directly per `references/markdown-rendering.md`. No HTML is composed.
49
+
50
+ After all mutations in this run have settled (initial write, deepening synthesis, and `ce-doc-review` fixes in the artifact's native format), the artifact at its single path reflects the final state.
51
+
52
+ ## 5.4 Post-Generation Options
53
+
54
+ **Already-authorized next action:** If the request already authorizes what happens after the plan (implement, create an issue, stop), fire that action. Do not present the menu to re-ask. Pipeline mode still returns to the caller.
55
+
56
+ **Execution handoff:** After review and any corrections, assess the final plan against its implementation contract and repository evidence. Do not offer execution while a material prerequisite is unverified or a launch-blocking question or finding remains. Name the blocker in the plan and handoff; in pipeline mode return `status: blocked` with the artifact path, blocker, and recovery path. A skipped review is not a pass; establish the needed evidence within the planning request or report the gap. Deferred details and explicitly planned new files do not prevent handoff.
57
+
58
+ **Pipeline mode:** No interactive menu. The result below is the last thing this skill writes. It ends this skill, not the turn. The caller runs in this same session, and its next step follows the result. If document review started but did not complete, return the skill's `status: blocked` result with `phase`, `blocker`, `recovery_path`, and the preserved `artifact_path`. Otherwise return the resolved structured review result from completion, or the `skill_unreachable` stand-in recorded when the review never started.
59
+
60
+ **Path format:** Use absolute paths for chat-output file references — relative paths are not auto-linked as clickable in most terminals.
61
+
62
+ **Summary line above the menu (always):** Print a single concise line summarizing the resolved review state — e.g., `Doc review applied 3 fixes. 2 decisions, 1 proposed fix, 4 FYI observations remain (1 at P1).` When no fixes were applied and no findings remain, print `Doc review clean — no fixes needed.` When the structured review result carries `skipped_reason: skill_unreachable`, print `Doc review skipped — ce-doc-review could not be invoked (<skipped_detail>); it did not run.` If a review that actually began failed, print `Doc review failed after starting — <actual error>; the plan was not fully reviewed.` This line establishes what the autofix pass did (or didn't) so the user has the context to choose between the menu options below. Never describe a harness or delegation failure that kept the review from starting as a downstream skill timeout.
63
+
64
+ **Render only the findings that still need the reader.** Preserve the decision-first structure (Recommendation / Consequence if unchanged / Change / Basis) for retained actionable findings. Do not re-narrate them into dense paragraphs or unexplained identifiers. Explain any changed disposition in the saved review evidence; do not copy dismissed findings into the handoff. The summary reports changes actually made and items still unresolved after your judgment.
65
+
66
+ **Question:** "Plan ready at `<absolute path to plan>`. What would you like to do next?"
67
+
68
+ **Options:**
69
+ 1. **Start `ce-work`** - Build and ship the plan in this session, with verification, simplification, code review, and commits. Show only when the plan contents support implementation and no launch-blocking question or finding remains; universal-planning, answer-seeking, approach-plan, and requirements-only artifacts keep their own handoff/checkpoint behavior.
70
+
71
+ **Recommended marker:** render option 1 as **Start `ce-work`** *(recommended)*. No other option carries the marker.
72
+ 2. **Decide on the review's open items** - Confirm or skip the suggested edits, and settle the judgment calls the auto-pass left for you. (Authorized corrections were already applied; you can also defer items into Open Questions.) Hide this option when **Prototype a remaining feel-question** is shown.
73
+ 2. **Prototype a remaining feel-question** - Invoke `ce-prototype` on a named remaining question that is expensive to unravel and that neither talk nor a cheap sketch can settle. A question turning on finish or motion is already past the sketch tier; a cheap-to-reverse decision does not qualify however visual it is. Shown only when such a question remains. A visual-probe question that already settled fails this predicate. The option description names the proposed slice. When this option is shown, omit **Decide on the review's open items** from the same menu.
74
+ 3. **Create Issue** - Create a tracked issue from this plan in your configured issue tracker (e.g., GitHub Issues, Linear, Jira)
75
+ 4. **Open in browser** - Open the HTML plan file locally for review and sharing. **Render only when `OUTPUT_FORMAT=html`.**
76
+
77
+ There is no "done" / "pause" option — the blocking question already waits, and the user ends the turn by dismissing it (Esc) or just not picking anything. The plan file is already saved.
78
+
79
+ **HTML browser option.** Only one output format is ever in effect, so the plan exists as exactly one artifact — `.md` or `.html`, never both. Render **Open in browser** only for HTML runs. Implementation handoff (option 1) remains available in both modes only when the artifact is implementation-ready code; `ce-work` reads either format.
80
+
81
+ **Menu rendering:** The menu has up to 4 options (option 1 renders only for implementation-ready code; option 2 is the exclusive review-or-prototype slot — see below; Open in browser is HTML-only). Account for each platform's blocking-question option cap rather than trimming choices: Claude Code `AskUserQuestion` supports up to 4 explicit options, Codex `request_user_input` supports only 2-3 explicit options, and DeepSeek Harness `ask_user_question` has no hard option cap, so the full menu always fits. When the visible menu exceeds the current platform's cap, render it as a numbered list in chat with the hint "Pick a number or describe what you want." When the visible menu fits the cap, use the platform's blocking tool and renumber the visible options 1-N. When no matching tool is in the current list or a real question call errors, fall back to the same numbered-list-in-chat rendering. Never silently skip the question.
82
+
83
+ **Show `Decide on the review's open items` (option 2) only when the resolved review state has `proposed_fixes_count + decisions_count > 0` and no `skipped_reason: skill_unreachable`.** FYIs alone do not offer a decision to make. Keep their retained count in the summary even when this option is hidden. Renumber the visible menu options after applying this condition. `ce-doc-review` defines how a selected review resumes and returns.
84
+
85
+ **Cross-skill invocation rule:** Invoke `ce-work`, `ce-doc-review`, and `ce-prototype` using the host's normal skill-invocation mechanism. Do not substitute a generic Task, Agent, or subagent; the invoked skill may still dispatch its own subagents according to its protocol.
86
+
87
+ Before acting on any selection received after a user turn, reload this file. Then act on the selection; rendering the menu or announcing the route is not the routed action:
88
+ - **Start `ce-work`** -> Classify the artifact first. If the plan contents do not support code implementation or a launch blocker remains, do not execute it; route requirements-only artifacts back to `ce-plan` enrichment and non-code artifacts to their own workflow. If it is executable, invoke the `ce-work` skill under the cross-skill invocation rule, passing the plan path as the skill argument; `ce-work` then chooses how to execute and carries the implementation through verification and shipping. If `ce-work` cannot be invoked, print the existing `ce-work` fallback prompt for the user to run; in that prompt, tell the executor to read Goal Capsule, Verification Contract, Definition of Done, and active U-IDs (scanning headings to find them) rather than the whole document first. Do not merely tell the user to type an invocation when the host can invoke it directly.
89
+ - **Decide on the review's open items** -> Invoke the `ce-doc-review` skill again under the cross-skill invocation rule, passing the plan path **without** `mode:non-interactive` so the interactive routing question and walkthrough run. The non-interactive pass already applied `safe_auto` fixes and recorded its findings in the session, so the interactive pass reuses that prior `safe_auto` / R29 decision state (its R29 suppression rule prevents prior-round Skipped/Deferred entries from re-raising) — "picks up where non-interactive stopped" means that state reuse, **not** skipping Phase 4 presentation or jumping straight to routing with a count. `ce-doc-review`'s walkthrough enforces the same-turn presentation-before-routing rule on this re-entry; a structured review result shown in an earlier turn beside this menu does not satisfy it. If the skill cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu with the refreshed counts so the user can pick what to do next.
90
+ - **Create Issue** -> Follow the Issue Creation section below through an available connector, MCP, API, or documented CLI; no `linear` CLI is guaranteed, and one missing binary is not proof that the tracker is unavailable.
91
+ - **Prototype a remaining feel-question** -> Invoke the `ce-prototype` skill under the cross-skill invocation rule, passing the plan path as the skill argument. Do not build a prototype in this skill. If it cannot be invoked, say that it did not run and return to the menu. After it returns, re-render this menu from the artifact's current contents — a plan it wrote back to needs implementation planning again, so the execution options drop out on their own; when it returned decisions instead of writing them, say so, since the plan still describes the pre-prototype behavior.
92
+ - **Open in browser** -> Display the absolute path to the `.html` plan file so the user can open it locally. Where the platform exposes a browser-opening primitive (e.g., `open` on macOS, `xdg-open` on Linux, `start` on Windows), the agent may invoke it directly; otherwise print the absolute path and let the user open it. After the path is displayed (or the browser is opened), return to the post-generation options so the user can pick a follow-up action.
93
+ - **Free-form prompts that target the findings** (e.g., the user types "review", "walk through", "deep review" instead of picking a numbered option) -> route as if they had picked `Decide on the review's open items`. Do not loop back to the menu without running the review. When the structured review result carries `skipped_reason: skill_unreachable`, say that `ce-doc-review` could not be invoked and loop back without misreporting a review failure.
94
+ - **Other free-form input** -> Accept revisions to the plan and loop back to options.
95
+
96
+ ## Issue Creation
97
+
98
+ When the user selects "Create Issue":
99
+
100
+ 1. **Identify the project's issue tracker from the active instructions and conventions already in your context** — the issue / project-management tool the project uses (e.g., GitHub Issues, Linear, Jira). Don't open or name specific instruction files to do this; the project's instructions are already available to you. Look for an explicit `project_tracker:` declaration (`github`, `linear`, …) or any documented tracker convention. Only if your context doesn't already carry the project's instructions (e.g., you're a fresh subagent) or they're silent, consult supplementary signals: `README.md`, `CONTRIBUTING.md`, PR templates under `.github/`, or visible tracker URLs.
101
+
102
+ 2. **Create the issue through whatever interface that tracker actually exposes in this environment** — a platform connector/MCP tool, documented API/GraphQL credentials, or a documented CLI. First actively discover what's available: use the platform's tool-discovery primitive (e.g., `ToolSearch` in Claude Code) to look for a tracker connector or MCP tool before assuming none exists — lazy-loaded connectors and credentials stored outside the shell won't surface in a passive check. Do not assume a tracker means a particular CLI, and do not treat a missing binary, env var, or unloaded MCP server as proof the tracker is unavailable — those are false negatives when access comes through a connector or a raw API with credentials stored outside the shell. When using a direct API, never print secret values; read the plan body from disk and send it as the issue's markdown/description per the API contract. Worked examples for the common cases:
103
+ - **GitHub** — `gh issue create --title "<type>: <title>" --body-file <plan_path>`
104
+ - **Linear** (no guaranteed first-party CLI) — prefer, in order: a Linear connector or MCP tool that can create issues → documented direct API/GraphQL credentials and endpoint → a documented local Linear CLI, only when the project or user explicitly states it is installed and authenticated.
105
+
106
+ 3. If no tracker is configured, ask the user which tracker they use with the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Fall back to asking on the host's user-visible chat surface only when no such tool is in the list or a real question call errors. Never silently skip. Offer three explicit options — `GitHub`, `Linear`, `Skip` — and let the user name a different tracker (Jira, etc.) through the tool's built-in free-form / "Other" input. Don't add an explicit fourth `Other` option — that's redundant where the tool already offers free-form and can exceed a 2–3 explicit-option cap. When the tool exposes no free-form path, capture the other-tracker name via the chat fallback. Then:
107
+ - Proceed with the chosen tracker's creation path above
108
+ - If the user names a different tracker through the free-form path, ask for its reachable interface if they didn't say, then create the issue via the capability path in step 2
109
+ - Offer to persist the choice by adding a `project_tracker: <value>` declaration to the project's root agent-instructions file (e.g., `AGENTS.md`; if it `@`-includes another file, write to the substantive one). Use the lowercase tracker key (`github`, `linear`, `jira`, …) — not the display label — so future runs match step 1 and skip this prompt
110
+ - If `Skip`, return to the options without creating an issue
111
+
112
+ 4. If the detected tracker has no reachable interface after actively discovering available connector/MCP tools and following its documented access method — no working connector, MCP tool, CLI, or API path — report a clear error (e.g., "`gh` CLI not found or not authenticated for GitHub Issues"; "Linear is documented for this project, but no connector, MCP tool, or API credentials were found") and return to the options. Do not silently fall back to a local issue-plan document unless the user explicitly asks for a local-only artifact.
113
+
114
+ After issue creation:
115
+ - Display the issue URL
116
+ - Ask whether to proceed with `ce-work` using the host's blocking question tool already in the current tool list
@@ -0,0 +1,489 @@
1
+ # Plan Sections
2
+
3
+ This reference describes what makes a great implementation plan. It does NOT
4
+ prescribe how the plan looks on the page — rendering is handled by the
5
+ format-specific references (`markdown-rendering.md`, `html-rendering.md`).
6
+
7
+ ## The outcome
8
+
9
+ A great plan enables three audiences to act:
10
+
11
+ - **The implementing agent** (`ce-work` or a human) starts from an informed
12
+ baseline — the decisions everything else rests on are named, research breadcrumbs orient
13
+ their own investigation, unit boundaries are clear. The plan gives the
14
+ implementer a starting point, not a substitute for their own investigation.
15
+ - **The reviewer** identifies the decisions everything else rests on and the boundaries
16
+ of what's being changed in one pass.
17
+ - **The future reader** (anyone returning months later) traces why the work
18
+ was done, what shaped it, and where the artifacts live.
19
+
20
+ A section belongs only when it serves one of these audiences. Omit padding.
21
+
22
+ ## Unified plan artifact contract
23
+
24
+ `ce-plan` writes the canonical compound-engineering plan artifact. The same
25
+ artifact may begin as a requirements-only skeleton from `ce-brainstorm` and
26
+ later be enriched by `ce-plan`; it is still one plan file moving through
27
+ planning stages, not a requirements doc plus a separate implementation doc.
28
+
29
+ When the artifact is meant to be consumed by implementation agents, use:
30
+
31
+ - **`artifact_contract: ce-unified-plan/v1`** — declares this contract.
32
+ - **`product_contract_source`** — where the Product Contract came from:
33
+ `ce-brainstorm`, `ce-plan-bootstrap`, `legacy-requirements`, or another
34
+ explicit source string when a repo has a specialized producer.
35
+ - **`execution`** — `code` for implementation plans, `knowledge-work` for
36
+ non-code deliverables. Absence remains legacy-compatible and means `code`
37
+ only for older plans without `artifact_contract`.
38
+
39
+ Determine whether a plan can be executed from its contents. The Product Contract, Planning Contract, Implementation Units, Verification Contract, and Definition of Done must give the executor enough direction, with no launch-blocking question remaining. Mark open questions as blocking or deferred; deferred implementation details do not prevent work. A Product Contract without sufficient planning needs enrichment.
40
+
41
+ Do not write a readiness or execution-status field. When updating an older artifact, remove `artifact_readiness` from its frontmatter or visible HTML metadata. An old readiness label does not establish completeness or override a blocker. Plans carry no `status` field and no mutable execution lifecycle.
42
+
43
+ Approach-plans, answer-seeking outputs, and universal-planning outputs remain outside this software implementation contract unless they contain the full contract above. Route non-code deliverables by their contents and `execution: knowledge-work`.
44
+
45
+ ## Section ID Registry
46
+
47
+ Unified artifacts use these stable logical sections. Markdown uses the
48
+ heading text; HTML uses matching visible headings and anchor IDs. Downstream
49
+ skills grep or anchor-scan for these names before reading large bodies.
50
+
51
+ | Logical section | Markdown heading | HTML id | Reader use |
52
+ |---|---|---|---|
53
+ | Goal Capsule | `## Goal Capsule` | `goal-capsule` | Objective (outcome), Means (chosen approach), authority hierarchy, and stop conditions |
54
+ | Product Contract | `## Product Contract` | `product-contract` | Requirements, actors, flows, acceptance examples, product scope |
55
+ | Product Requirements | `### Requirements` under Product Contract | `product-requirements` | Requirement extraction for review and implementation trace |
56
+ | Planning Contract | `## Planning Contract` | `planning-contract` | KTDs, technical design, assumptions, sequencing |
57
+ | Implementation Units | `## Implementation Units` | `implementation-units` | U-ID work packets for execution |
58
+ | Verification Contract | `## Verification Contract` | `verification-contract` | Repo-specific test commands and quality gates |
59
+ | Definition of Done | `## Definition of Done` | `definition-of-done` | Global and per-unit completion criteria |
60
+ | Appendix | `## Appendix` | `appendix` | Long research, raw notes, or supporting detail |
61
+
62
+ Requirements-only artifacts are kept light: a Goal Capsule and the Product
63
+ Contract. They must not point implementers at absent Planning Contract,
64
+ Implementation Units, Verification Contract, or Definition of Done sections.
65
+ `ce-plan` adds those implementation sections when it enriches to
66
+ implementation-ready. Implementation-ready artifacts include the full registry
67
+ above, except Appendix remains optional.
68
+
69
+ ### Wayfinding: map before reading (size-aware)
70
+
71
+ The document does not carry a reading guide; consuming skills own the reading
72
+ algorithm. A **short** plan — a lightweight or requirements-only artifact that
73
+ fits in a screen or two — can just be read in full; that is cheaper and simpler
74
+ than scanning and ranging. But an implementation-ready unified plan is often
75
+ long, and HTML output (also supported) is more verbose still, so for anything
76
+ beyond short, do **not** load the entire artifact to find your way around.
77
+ Build a section map first, then read only the ranges the task needs:
78
+
79
+ - **Markdown:** scan headings to get the section and unit map — e.g.
80
+ `rg -n '^#{1,3} ' <plan>` (top-level sections plus `### U<N>.` units).
81
+ - **HTML:** scan the heading elements (`<h1>`–`<h3>`) and their anchor ids;
82
+ match on the section name and ignore the wrapper tags.
83
+
84
+ In both formats the section **names and anchor ids are the stable contract**
85
+ from the Section ID Registry above (`Goal Capsule`/`goal-capsule`,
86
+ `Verification Contract`/`verification-contract`, `### U<N>.` units, …). Wayfind
87
+ against those registry names, not a brittle tag/format pattern, so the
88
+ instruction survives rendering changes. After mapping, read metadata, then only
89
+ the sections the task needs — e.g. Goal Capsule, the active U-ID plus its cited
90
+ R/F/AE/KTD, Verification Contract, and Definition of Done. Read the Appendix or
91
+ unrelated units only when a section you are already reading cites them.
92
+
93
+ ## Whether a plan file is warranted
94
+
95
+ SKILL.md's Output Contract gate decides this at intake, before any research: Direct and Chat brief results stay in chat (`references/output-contracts.md`); a Durable run writes the file this reference describes.
96
+
97
+ ## Implementation-ready hard floor
98
+
99
+ When an implementation-ready software plan is warranted, these sections are
100
+ present. They carry the contracts downstream consumers depend on.
101
+
102
+ - **Goal Capsule** — objective, means (only when an approach is fixed),
103
+ authority hierarchy, stop conditions, execution profile, and who
104
+ finishes and ships the work. This is the fastest way for an executor to avoid drifting from
105
+ the plan. A reader who has not read the rest of the plan must be able to
106
+ hold the Objective as the goal. Remaining-true constraints live on their
107
+ owning R-IDs (the R-IDs that state them), not as extra Objective clauses — user-checkable is not a
108
+ license to pack them onto the Objective. An Objective that is only
109
+ understandable after later sections is not yet the Objective, even when a
110
+ user could check the outcome and a different implementation would still
111
+ serve it. The **Objective** is always the outcome: what is true for users
112
+ or operators afterwards, phrased so it would still read as the goal under
113
+ a different implementation. It sits outside the component being changed,
114
+ which is a question of who can check it rather than of which nouns it
115
+ uses: an outcome someone outside that component can verify without knowing
116
+ its internals is an Objective even when that component is what changed,
117
+ and one only its internals can settle is not the Objective however
118
+ outcome-shaped its wording; the registry above decides where it does
119
+ belong. The usual failure is an objective about the component's own
120
+ execution — the wall-clock it no longer holds, the runtime it no longer
121
+ consumes, what stays isolated inside it — which only its internals settle.
122
+ Infrastructure and refactor work has such an objective too: the reason
123
+ that component's behavior mattered to someone. The chosen approach is the
124
+ **Means**, its own line whenever the request or the plan has fixed one —
125
+ never invented for outcome-only work. It is a linked projection under the
126
+ one-owner rule below: one line naming the approach and citing the KTD or
127
+ Key Decision that owns it (`Means: … (KTD2)`), never a restatement of that
128
+ owner's mechanism. Test: if the implementation changed, would the
129
+ Objective still be the goal, and could a reader who does not know the
130
+ changed component's internals tell whether it was met? No to the first
131
+ makes it a Means. No to the second means it is stated at the component's
132
+ level, and the Objective is whatever depended on that component. When a
133
+ request supplies only its approach ("move X out of A into B"), that is the
134
+ Means; the Objective is the outcome it serves, derived from the request's
135
+ motivation, the project's stated problem, or asked for — never the approach
136
+ restated.
137
+ - **Product Contract** — product scope and behavior. Contains Summary, Problem
138
+ Frame, Requirements with stable R-IDs, and any material Actors, Flows,
139
+ Acceptance Examples, Success Criteria, Scope Boundaries, Dependencies,
140
+ Outstanding Questions, and Sources. This replaces the separate requirements
141
+ artifact in new brainstorm-to-plan flows.
142
+ - **Planning Contract** — the implementation-facing decisions: Key Technical
143
+ Decisions, high-level design, assumptions, implementation constraints,
144
+ sequencing, and research that shapes how the Product Contract will be built.
145
+ - **Implementation Units** (with stable U-IDs) — discrete work packets sized so
146
+ each is independently executable. Each unit names Goal, Requirements,
147
+ Files, Approach, Test Scenarios, and Verification. `ce-work` and other
148
+ executors consume these units.
149
+ - **Unit Index (large plans only, ~10+ units).** When the plan has roughly
150
+ ten or more units, open the section with a compact navigation table — one
151
+ row per unit: **U-ID · one-line title · files touched · depends-on**. It
152
+ lets an executor map units to files and resolve dependency order without
153
+ scanning every unit body. It is a **navigation aid only**: the unit bodies
154
+ stay authoritative, it carries nothing beyond those four fields (no
155
+ approach, tests, or rationale), and `files touched` is the key/primary
156
+ paths, not an exhaustive restatement. **Omit it below ~10 units** — there
157
+ the per-unit `Dependencies`/`Files` (and any sequencing or dependency
158
+ diagram) already suffice, and an index would be ceremony.
159
+ - **Verification Contract** — repo-specific commands and quality gates,
160
+ including which tests prove the plan, when `release:validate` applies, and
161
+ what behavioral skill evaluation is required. Avoid generic "run tests"
162
+ language when the repo has concrete commands. When the goal is
163
+ optimization-shaped (build time, latency, coverage, bundle size), express a
164
+ measurable threshold as the exit criterion (e.g., "p95 latency < 200ms",
165
+ "build time reduced 30%") and consider routing to `ce-optimize` — a metric
166
+ target is a sharper done signal for a long-running goal than a boolean check.
167
+ - **Definition of Done** — global and per-unit done criteria. This is the
168
+ completion contract an executor checks before declaring the work done. Include
169
+ a cleanup criterion: a long autonomous run accumulates dead-end and
170
+ experimental code from approaches that did not pan out; declaring done
171
+ requires that abandoned-attempt code is removed, not left in the diff.
172
+
173
+ ## Include when material
174
+
175
+ These sections are present when they carry information that isn't covered
176
+ elsewhere. The test is not "is this a substantial plan?" — it is
177
+ *"does this specific plan have content this section would surface?"* Filling
178
+ a section with placeholder prose is worse than omitting it.
179
+
180
+ The first five entries below carry the Product Contract's product framing —
181
+ what is being built and why. Later entries mix Product Contract subsections
182
+ (Scope Boundaries, Open Questions, Acceptance Examples, Sources) with
183
+ Planning Contract ones; the hard floor above remains authoritative for which
184
+ section sits under which contract. Problem Frame is unconditional; each of the other four is included when its own test says so. A plan
185
+ that skips all four conditional framing entries has usually inherited its
186
+ framing from an upstream Product Contract — check before concluding none of
187
+ them apply.
188
+
189
+ - **Problem Frame** — the hard floor above contains it unconditionally, so
190
+ this entry governs its depth, never whether to include it. Give it
191
+ paragraphs when motivation isn't obvious from Summary alone; keep it to a
192
+ line or two when the motivation was settled upstream and more would only
193
+ echo the origin document. Backward-looking / situational. Does NOT restate
194
+ the proposal; the remedy lives in Summary.
195
+
196
+ - **Key Decisions** — include when the plan carries product-level choices
197
+ that constrain the Requirements below, whether made during planning (scope
198
+ narrowings, defaults chosen against a real alternative, framing the user
199
+ picked) or inherited from an upstream Product Contract, which Phase 0.3
200
+ requires carrying forward with its rationale. Each entry is a provenance
201
+ index entry, not a second statement of the rule: the decision in bold, at
202
+ most one line of rationale, and exact `Governs R5, R7` links when it
203
+ constrains specific requirements. The normative text lives on the governed
204
+ Rs. Session-settled annotations follow the rules under "ID and content
205
+ rules" below. Distinct from Planning Contract's Key Technical Decisions,
206
+ which record how-level choices; a product decision belongs here, and a KTD
207
+ cites it rather than mirroring it. Skip only when no such
208
+ choice exists on any side: every requirement follows directly from the
209
+ request, any upstream Product Contract weighed no alternatives, and the
210
+ session settled none. A `session-settled:` decision always keeps the
211
+ section — plan-write and the routing table both require its labeled entry
212
+ to live here.
213
+
214
+ - **Success Criteria** — include when there are quality / metric / handoff
215
+ signals that Requirements don't already carry: quantitative metrics ("p95
216
+ latency under 200ms"), qualitative criteria ("the agent's output reads as
217
+ one voice"), process / handoff quality ("ce-doc-review can act on this
218
+ without follow-ups"). Skip when Requirements ARE the success criteria
219
+ (every R is "done when the R is true"). Requirements that describe an
220
+ approach rather than an outcome are not success criteria; then include at
221
+ least one criterion that would show the Goal Capsule Objective was reached.
222
+
223
+ - **Actors** — include when the work has multi-party behavior (multiple
224
+ humans, agents, or systems meaningfully involved) that the units must
225
+ honor. Skip for single-actor work and for plans whose change is internal
226
+ to one component — most implementation plans skip this.
227
+
228
+ - **Key Flows** — include when the work has multi-step behavior whose
229
+ sequencing the units must preserve. Skip when the change is not
230
+ flow-shaped, or when Requirements and Acceptance Examples together already
231
+ prevent downstream invention of paths — again, most implementation plans
232
+ skip this.
233
+
234
+ - **High-Level Technical Design** — include when the technical approach has
235
+ shape that prose alone doesn't carry well: architecture across components,
236
+ sequencing across processes, state machines, branching gates.
237
+ Visualizations (component topology, sequence, swim lane, flowchart,
238
+ data-flow) typically live here. Skip when the approach is a one-paragraph
239
+ pattern application that the prose itself conveys.
240
+
241
+ - **Scope Boundaries** — include when scope is contested, when there are
242
+ tempting non-goals worth naming explicitly, or when "deferred for later"
243
+ needs distinguishing from "outside the product's identity." Skip when scope
244
+ is obvious from Requirements alone.
245
+
246
+ - **Open Questions** — include when there are genuinely unresolved items that
247
+ block planning or implementation. Skip when the plan is complete; an empty
248
+ "Open Questions: none" section signals false uncertainty.
249
+
250
+ - **System-Wide Impact** — include when the change affects cross-cutting
251
+ concerns (data lifecycles, auth boundaries, performance characteristics, cardinal
252
+ rules, shared infrastructure, agent/tool parity, prompt context, shared
253
+ workspaces). Skip for changes localized to one component where the impact is
254
+ self-evident.
255
+
256
+ - **Risks & Dependencies** — include when there are real risks worth flagging
257
+ (external service changes, version pins under churn, behavioral assumptions
258
+ worth highlighting) or material upstream dependencies. Skip for low-risk
259
+ localized work.
260
+
261
+ - **Acceptance Examples** — include when any requirement has a state-dependent
262
+ or conditional shape ("When X, Y") where the prose alone leaves ambiguity
263
+ about edge cases. Skip when all requirements are unconditional and
264
+ unambiguous.
265
+
266
+ - **Documentation / Operational Notes** — include when documentation,
267
+ monitoring, runbooks, or rollout steps need explicit notes. Skip when the
268
+ work is purely internal and uses existing operational scaffolding without
269
+ modification.
270
+
271
+ - **Sources / Research** — include the research that orients the implementer
272
+ or justifies the choices the plan rests on. The test: *"if I were the implementer
273
+ reading this cold, would this breadcrumb help me make better choices?"*
274
+ Yes → include (code locations like `services/convex/reports.ts:174-176`,
275
+ external docs, RFCs, constraints, prior plans — the category is inclusive,
276
+ not enumerated). A record of the planning process itself (reading the
277
+ user's prompt, glancing at obvious entry points, restating prose) → omit. Put it inline next to the
278
+ KTD or unit it justifies, or in a dedicated section — both shapes work.
279
+ A constraint adopted from a Compound Pack file is cited inline as
280
+ `(pack: <id>, <path within the pack>)` after the requirement, KTD, constraint,
281
+ or risk it shaped. The path is relative to the pack's own directory, so it
282
+ is stable for path- and git-sourced packs alike. Cite the pack text; do not
283
+ restate it. That marker is reserved for pack files; `<root>/solutions/`
284
+ learnings keep the ordinary path citation, so a reader can tell a
285
+ prescriptive pack rule from a retrospective learning.
286
+
287
+ ## Agent agency
288
+
289
+ The catalog is a floor, not a ceiling. When the plan's content doesn't fit
290
+ any catalog section, introduce a new one — don't force the content into a
291
+ section it doesn't belong in. Content drives section choices, not vice
292
+ versa.
293
+
294
+ The agent also picks per artifact:
295
+
296
+ - Whether Problem Frame merges into Summary — legacy and non-unified plans
297
+ only. Any `ce-unified-plan/v1` artifact keeps both headings regardless of
298
+ plan depth: the hard floor names them separately and downstream consumers
299
+ anchor on them. (Scoped by artifact contract, not by depth — a `Lightweight`
300
+ plan can still be implementation-ready.)
301
+ - Sub-groupings (Requirements by capability, KTDs by component, Units phased
302
+ into milestones)
303
+ - How much detail each section carries
304
+ - Whether HTD has one diagram, several, or none — and whether visualizations
305
+ live in HTD or embedded in other sections
306
+
307
+ ## Prose economy
308
+
309
+ "Include when material" sizes *which* sections appear; this sizes *how the kept
310
+ prose reads*. A section can be material and still be written loosely — the
311
+ failure mode is a material section padded into a wall of text where
312
+ contradictions hide and the implementing agent loses the thread. A deep plan
313
+ earns length through coverage (more units, more traced requirements, real
314
+ risks), never through wordiness around that coverage.
315
+
316
+ Write every kept section through the `ce-noslop` skill.
317
+
318
+ Hold every kept section to these:
319
+
320
+ - **Lead with the decision or outcome.** Put the conclusion first, then the
321
+ reason, then background; keep one claim plus its support per paragraph. Don't
322
+ bury a Key Technical Decision, the chosen scope, an open blocker, or a unit
323
+ goal beneath its rationale. This does not override section roles — Summary
324
+ stays proposal-only, Problem Frame stays motivation-only and never restates
325
+ the remedy.
326
+ - **A Summary is a handful of sentences**, not one sentence with five
327
+ semicolons and four parentheticals. A KTD's rationale is the reason that
328
+ decided it, not every reason.
329
+ - **A requirement or unit is one sentence of intent plus at most one
330
+ qualifier.** When it would specify two outcomes ("either A or B, the
331
+ implementer decides"), state the intent and send the fork to Open Questions —
332
+ don't write both arms in full inside the item.
333
+
334
+ Precision is not padding: keep file paths, IDs, dates, domain terms,
335
+ conditionals, and exact thresholds verbatim; when a concrete anchor is knowable
336
+ from the work already done, use it instead of a vague abstraction. Economy
337
+ targets the connective tissue around precision, never the precision itself.
338
+
339
+ **Resolve in place; don't stratify.** When deepening, a doc-review pass, or a
340
+ later decision supersedes earlier text, rewrite or remove the original — don't
341
+ leave it standing as strikethrough or stack a separate "resolutions" layer on
342
+ top of it. Version control holds the history. Stacked strata double the reading
343
+ surface and hide which text is live.
344
+
345
+ **One owner per rule; cite, don't restate.** A normative rule — a gate, cap,
346
+ threshold, protocol, or output contract — is stated in full at exactly one
347
+ owning entry: product behavior on its R-ID; an implementation choice on its
348
+ KTD. Every other layer cites the owning ID and adds only what is local to
349
+ it — a unit's Approach carries unit-local deltas (files, sequencing,
350
+ patterns), never a re-derivation of the protocol its cited Rs and KTDs own.
351
+ Linked projections are allowed (an AE restating behavior under
352
+ `Covers R…`, a Flow citing the Rs it sequences). **Unlinked sibling
353
+ restatement** — the same rule written out again in a KTD, Scope bullet, or
354
+ Approach with no ID link — is the defect: each copy drifts independently.
355
+ When linked layers disagree, authority is typed: the **R wins on product
356
+ behavior**; the **KTD wins on implementation mechanism** within its cited R
357
+ constraints; a unit overrides neither; AEs and Flows illustrate and
358
+ sequence, never amend.
359
+
360
+ **Bind external authorities; don't summarize them.** When a requirement,
361
+ KTD, or unit adopts an external document (a field guide, spec, standard),
362
+ state the commitment, cite the path, and record only this work's deltas. A
363
+ multi-sentence summary of the cited document is restatement of an owner that
364
+ lives outside the doc.
365
+
366
+ **Named test, run before the plan is declared written:** could the implementer
367
+ find a contradiction in each section in one pass? Could a colleague who was
368
+ not in the session say what this work is after the Objective alone? A sentence
369
+ carrying more than one parenthetical, a sentence chaining more than two
370
+ semicolons, an item specifying two outcomes, or a rule stated in full in more than one section
371
+ fails the test — split it (a semicolon chain becomes a list), defer it, or
372
+ replace the duplicate with its owning ID.
373
+
374
+ ## Plan metadata fields
375
+
376
+ Every plan carries a small set of stable metadata fields that downstream
377
+ tooling depends on. The contract is format-independent: in markdown these
378
+ fields appear as YAML frontmatter at the top of the file; in HTML they
379
+ appear as visible header text (typically a `<dl>` of `<dt>`/`<dd>` pairs or
380
+ a stats strip). Field names and semantics are the same across both formats
381
+ so consumers can locate them without knowing which format produced the
382
+ plan.
383
+
384
+ ### Required
385
+
386
+ - **`title`** — the plan's descriptive name with a ` - Plan` suffix
387
+ (e.g., `Highlighter Tool - Plan`), matching the H1 (markdown) or document
388
+ `<h1>` (HTML) so file metadata and visible heading don't drift. Stable
389
+ across planning stages (it is a plan at every stage). Do not put a
390
+ conventional-commit prefix (`feat:`/`fix:`) in the title — the `type` field
391
+ carries that classification.
392
+ - **`type`** — conventional-commit-prefix-aligned classification (`feat`,
393
+ `fix`, `refactor`, `chore`, `docs`, `perf`, `test`, etc.). Carries the
394
+ intent the eventual commit message should reflect.
395
+ - **`date`** — creation date in ISO 8601 (`YYYY-MM-DD`), ASCII digits only.
396
+
397
+ Plans carry **no `status` field** — a plan is a decision artifact, not a
398
+ tracked work item. `ce-work` does not mutate the plan at ship time;
399
+ whether a plan shipped is derived from git, not stored in the doc. Do not
400
+ add a `status` field or an `active → completed` lifecycle.
401
+
402
+ ### Optional but well-known
403
+
404
+ These fields are not required, but when set they have fixed names and
405
+ semantics so downstream tooling can rely on them:
406
+
407
+ - **`origin`** — repo-relative path to an upstream brainstorm requirements
408
+ doc (e.g., `docs/brainstorms/2026-05-12-pagination-requirements.md`).
409
+ Set when planning from an upstream brainstorm; carried for traceability
410
+ and re-resolved when `ce-plan` re-deepens.
411
+ - **`deepened`** — ISO 8601 date marking the first time the confidence
412
+ check substantively strengthened the plan. Presence affects Phase 0.1
413
+ resume fast-path logic (see `references/deepening-workflow.md`).
414
+ - **`execution`** — execution domain for downstream routing: `code`
415
+ (the default when absent) or `knowledge-work`. `ce-work`'s input triage
416
+ reads this: a plan marked `execution: knowledge-work` routes to the
417
+ non-code carve-out (read sources, synthesize, produce a deliverable —
418
+ skipping the branch/test/commit/CI lifecycle); absent or `code` routes
419
+ to the normal code path. Written by `ce-plan`'s approach-altitude flow
420
+ (`references/approach-altitude.md`) when a non-code deliverable is
421
+ persisted for execution.
422
+
423
+ Field names are stable across plan revisions — never rename a field or
424
+ repurpose its semantics. Agents composing new plans MUST use these exact
425
+ names; adding new fields is fine, but renaming `origin` to `source` or
426
+ `date` to `created` breaks the downstream consumers above.
427
+
428
+ ## ID and content rules
429
+
430
+ These apply regardless of rendering format.
431
+
432
+ - **Stable IDs.** R-IDs (Requirements), U-IDs (Implementation Units),
433
+ KTD-IDs (Key Technical Decisions, implementation-ready plans), A-IDs
434
+ (if the plan has Actors), F-IDs (if it has Flows), AE-IDs (if it has
435
+ Acceptance Examples). IDs are stable across plan revisions — never renumber to "clean
436
+ up gaps."
437
+ - **Plain prefix.** `R1.`, `U1.`, `KTD1.` as bullet prefixes. Do not bold;
438
+ the prefix is visually distinctive on its own.
439
+ - **KTD-IDs on implementation-ready plans.** Number Key Technical Decisions
440
+ (`KTD1.`, next unused number, same never-renumber rule as U-IDs) in newly
441
+ authored implementation-ready plans, and in an existing plan whenever a
442
+ KTD is added, split, or first cited by a unit. Untouched unnumbered KTDs
443
+ in legacy plans stay as they are — readable by label, no mass renumbering.
444
+ - **Repo-relative paths.** Always. Never absolute paths in plan content;
445
+ they break portability across machines, worktrees, teammates.
446
+ - **No record of the planning process.** No "captured at Phase X" notes, no `## Next Steps`
447
+ pointing to the next skill, no italic provenance lines. Engineering process
448
+ metadata belongs in commit messages and tool output, not the artifact.
449
+ - **Session-settled annotations on KTDs.** A Key Technical Decision that
450
+ records a decision settled in the invoking conversation carries an inline
451
+ annotation on its entry:
452
+ `(session-settled: user-directed — chosen over <alternative>: <one-line reason>)`.
453
+ Exactly two classes: `user-directed` (the user chose against or between
454
+ surfaced options) and `user-approved` (the agent proposed with the tradeoff
455
+ surfaced; the user assented). An agent never labels its own unexamined
456
+ proposal. A KTD that makes the how-level choice instantiating a labeled
457
+ Product Contract Key Decision inherits the label and cites the decision's
458
+ governed R-IDs. Do **not** create a KTD that merely mirrors a Product Key
459
+ Decision with no new technical choice — the Key Decision plus its
460
+ `Governs R…` links already own that content. The annotation is
461
+ self-contained — decision, rejected alternative, and one-line reason
462
+ readable without the conversation — and lives inline on the entry: no
463
+ sidecar files, no frontmatter registry, no numeric weights, no lifecycle
464
+ field. Like a `(see origin: <path>)` citation, it is decision provenance,
465
+ not a record of the planning process — review passes must not strip it. A consumer that
466
+ does not recognize the annotation treats the entry as a normal KTD.
467
+ - **Group Requirements by concern when they span distinct logical areas.**
468
+ The trigger is distinct concerns, not item count — even four requirements
469
+ benefit from grouping if they cover three different topics. Skip grouping
470
+ only when all requirements are genuinely about the same thing; a long flat
471
+ list is a smell that subgroups were missed. Group by capability (e.g.,
472
+ "Packaging", "Migration and compatibility", "Contributor workflow"), not by
473
+ the order requirements were discussed. R-IDs stay continuous across groups
474
+ (R1, R2 in the first group; R3, R4 in the second; never restart at R1 per
475
+ group).
476
+
477
+ ## Rendering
478
+
479
+ The format-specific references describe how to render these sections in each
480
+ output format:
481
+
482
+ - **Markdown rendering:** `references/markdown-rendering.md`
483
+ - **HTML rendering:** `references/html-rendering.md`
484
+
485
+ This reference (`plan-sections.md`) is about WHAT the plan contains;
486
+ rendering references are about HOW each format presents it. The plan is
487
+ written in one format — markdown OR HTML, never both — based on the
488
+ resolved output mode. The section catalog is the same regardless of
489
+ format.