claude-code-pilot 2.0.0 → 3.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 (514) hide show
  1. package/README.md +76 -97
  2. package/bin/install.js +267 -250
  3. package/manifest.json +5 -18
  4. package/package.json +5 -7
  5. package/src/agents/build-error-resolver.md +114 -0
  6. package/src/agents/ccp-advisor-researcher.md +104 -0
  7. package/src/agents/ccp-assumptions-analyzer.md +105 -0
  8. package/{gsd/agents/gsd-codebase-mapper.md → src/agents/ccp-codebase-mapper.md} +7 -7
  9. package/{gsd/agents/gsd-debugger.md → src/agents/ccp-debugger.md} +125 -8
  10. package/{gsd/agents/gsd-executor.md → src/agents/ccp-executor.md} +31 -20
  11. package/{gsd/agents/gsd-integration-checker.md → src/agents/ccp-integration-checker.md} +2 -2
  12. package/{gsd/agents/gsd-nyquist-auditor.md → src/agents/ccp-nyquist-auditor.md} +3 -3
  13. package/{gsd/agents/gsd-phase-researcher.md → src/agents/ccp-phase-researcher.md} +127 -13
  14. package/{gsd/agents/gsd-plan-checker.md → src/agents/ccp-plan-checker.md} +57 -21
  15. package/{gsd/agents/gsd-planner.md → src/agents/ccp-planner.md} +61 -23
  16. package/{gsd/agents/gsd-project-researcher.md → src/agents/ccp-project-researcher.md} +33 -6
  17. package/{gsd/agents/gsd-research-synthesizer.md → src/agents/ccp-research-synthesizer.md} +11 -11
  18. package/{gsd/agents/gsd-roadmapper.md → src/agents/ccp-roadmapper.md} +39 -10
  19. package/src/agents/ccp-ui-auditor.md +439 -0
  20. package/src/agents/ccp-ui-checker.md +300 -0
  21. package/src/agents/ccp-ui-researcher.md +357 -0
  22. package/{gsd/agents/gsd-verifier.md → src/agents/ccp-verifier.md} +81 -15
  23. package/src/agents/cpp-build-resolver.md +90 -0
  24. package/src/agents/cpp-reviewer.md +72 -0
  25. package/src/agents/database-reviewer.md +91 -0
  26. package/{ecc → src}/agents/doc-updater.md +1 -1
  27. package/src/agents/docs-lookup.md +68 -0
  28. package/src/agents/flutter-reviewer.md +243 -0
  29. package/src/agents/gan-evaluator.md +209 -0
  30. package/src/agents/gan-generator.md +131 -0
  31. package/src/agents/gan-planner.md +99 -0
  32. package/src/agents/go-build-resolver.md +94 -0
  33. package/src/agents/go-reviewer.md +76 -0
  34. package/src/agents/harness-optimizer.md +35 -0
  35. package/src/agents/java-build-resolver.md +153 -0
  36. package/src/agents/java-reviewer.md +92 -0
  37. package/src/agents/kotlin-build-resolver.md +118 -0
  38. package/src/agents/kotlin-reviewer.md +159 -0
  39. package/src/agents/loop-operator.md +36 -0
  40. package/src/agents/opensource-forker.md +198 -0
  41. package/src/agents/opensource-packager.md +249 -0
  42. package/src/agents/opensource-sanitizer.md +188 -0
  43. package/src/agents/performance-optimizer.md +446 -0
  44. package/src/agents/planner.md +212 -0
  45. package/src/agents/python-reviewer.md +98 -0
  46. package/src/agents/pytorch-build-resolver.md +120 -0
  47. package/src/agents/refactor-cleaner.md +85 -0
  48. package/src/agents/rust-build-resolver.md +148 -0
  49. package/src/agents/rust-reviewer.md +94 -0
  50. package/src/agents/typescript-reviewer.md +112 -0
  51. package/src/available-rules/README.md +80 -0
  52. package/src/available-rules/cpp/coding-style.md +44 -0
  53. package/src/available-rules/cpp/hooks.md +39 -0
  54. package/src/available-rules/cpp/patterns.md +51 -0
  55. package/src/available-rules/cpp/security.md +51 -0
  56. package/src/available-rules/cpp/testing.md +44 -0
  57. package/src/available-rules/csharp/coding-style.md +72 -0
  58. package/src/available-rules/csharp/hooks.md +25 -0
  59. package/src/available-rules/csharp/patterns.md +50 -0
  60. package/src/available-rules/csharp/security.md +58 -0
  61. package/src/available-rules/csharp/testing.md +46 -0
  62. package/src/available-rules/java/coding-style.md +114 -0
  63. package/src/available-rules/java/hooks.md +18 -0
  64. package/src/available-rules/java/patterns.md +146 -0
  65. package/src/available-rules/java/security.md +100 -0
  66. package/src/available-rules/java/testing.md +131 -0
  67. package/src/available-rules/kotlin/hooks.md +17 -0
  68. package/src/available-rules/rust/coding-style.md +151 -0
  69. package/src/available-rules/rust/hooks.md +16 -0
  70. package/src/available-rules/rust/patterns.md +168 -0
  71. package/src/available-rules/rust/security.md +141 -0
  72. package/src/available-rules/rust/testing.md +154 -0
  73. package/src/commands/ccp/add-backlog.md +76 -0
  74. package/{gsd/commands-gsd → src/commands/ccp}/add-phase.md +3 -3
  75. package/{gsd/commands-gsd → src/commands/ccp}/add-tests.md +5 -5
  76. package/{gsd/commands-gsd → src/commands/ccp}/add-todo.md +4 -4
  77. package/src/commands/ccp/aside.md +165 -0
  78. package/{gsd/commands-gsd → src/commands/ccp}/audit-milestone.md +3 -3
  79. package/src/commands/ccp/audit-uat.md +24 -0
  80. package/src/commands/ccp/autonomous.md +41 -0
  81. package/src/commands/ccp/build-fix.md +67 -0
  82. package/{gsd/commands-gsd → src/commands/ccp}/check-todos.md +3 -3
  83. package/{ecc/commands → src/commands/ccp}/checkpoint.md +12 -7
  84. package/{gsd/commands-gsd → src/commands/ccp}/cleanup.md +3 -3
  85. package/src/commands/ccp/code-review.md +45 -0
  86. package/{gsd/commands-gsd → src/commands/ccp}/complete-milestone.md +9 -9
  87. package/src/commands/ccp/context-budget.md +30 -0
  88. package/src/commands/ccp/cpp-build.md +174 -0
  89. package/src/commands/ccp/cpp-review.md +133 -0
  90. package/src/commands/ccp/cpp-test.md +252 -0
  91. package/{gsd/commands-gsd → src/commands/ccp}/debug.md +14 -9
  92. package/src/commands/ccp/discuss-phase.md +64 -0
  93. package/src/commands/ccp/do.md +30 -0
  94. package/src/commands/ccp/docs-update.md +48 -0
  95. package/src/commands/ccp/docs.md +32 -0
  96. package/src/commands/ccp/e2e.md +365 -0
  97. package/src/commands/ccp/eval.md +125 -0
  98. package/{ecc/commands → src/commands/ccp}/evolve.md +5 -5
  99. package/src/commands/ccp/execute-phase.md +59 -0
  100. package/src/commands/ccp/fast.md +30 -0
  101. package/src/commands/ccp/forensics.md +56 -0
  102. package/src/commands/ccp/go-build.md +184 -0
  103. package/src/commands/ccp/go-review.md +149 -0
  104. package/src/commands/ccp/go-test.md +269 -0
  105. package/src/commands/ccp/gradle-build.md +71 -0
  106. package/src/commands/ccp/harness-audit.md +76 -0
  107. package/{gsd/commands-gsd → src/commands/ccp}/health.md +3 -3
  108. package/{gsd/commands-gsd → src/commands/ccp}/help.md +5 -5
  109. package/{gsd/commands-gsd → src/commands/ccp}/insert-phase.md +3 -3
  110. package/src/commands/ccp/kotlin-build.md +175 -0
  111. package/src/commands/ccp/kotlin-review.md +141 -0
  112. package/src/commands/ccp/kotlin-test.md +313 -0
  113. package/{ecc/commands → src/commands/ccp}/learn.md +7 -2
  114. package/{gsd/commands-gsd → src/commands/ccp}/list-phase-assumptions.md +2 -2
  115. package/src/commands/ccp/manager.md +39 -0
  116. package/{gsd/commands-gsd → src/commands/ccp}/map-codebase.md +7 -7
  117. package/src/commands/ccp/milestone-summary.md +51 -0
  118. package/{ecc/commands → src/commands/ccp}/model-route.md +6 -1
  119. package/{gsd/commands-gsd → src/commands/ccp}/new-milestone.md +8 -8
  120. package/{gsd/commands-gsd → src/commands/ccp}/new-project.md +8 -8
  121. package/src/commands/ccp/next.md +24 -0
  122. package/src/commands/ccp/note.md +34 -0
  123. package/src/commands/ccp/orchestrate.md +232 -0
  124. package/{gsd/commands-gsd → src/commands/ccp}/pause-work.md +3 -3
  125. package/{gsd/commands-gsd → src/commands/ccp}/plan-milestone-gaps.md +5 -5
  126. package/{gsd/commands-gsd → src/commands/ccp}/plan-phase.md +9 -7
  127. package/src/commands/ccp/plan.md +115 -0
  128. package/src/commands/ccp/plant-seed.md +28 -0
  129. package/src/commands/ccp/pr-branch.md +25 -0
  130. package/src/commands/ccp/profile-user.md +46 -0
  131. package/{gsd/commands-gsd → src/commands/ccp}/progress.md +3 -3
  132. package/src/commands/ccp/prompt-optimize.md +39 -0
  133. package/src/commands/ccp/prune.md +25 -0
  134. package/src/commands/ccp/python-review.md +298 -0
  135. package/{ecc/commands → src/commands/ccp}/quality-gate.md +7 -2
  136. package/{gsd/commands-gsd → src/commands/ccp}/quick.md +10 -8
  137. package/src/commands/ccp/refactor-clean.md +85 -0
  138. package/{gsd/commands-gsd → src/commands/ccp}/remove-phase.md +3 -3
  139. package/{gsd/commands-gsd → src/commands/ccp}/research-phase.md +17 -12
  140. package/{ecc/commands → src/commands/ccp}/resume-session.md +9 -8
  141. package/{gsd/commands-gsd → src/commands/ccp}/resume-work.md +3 -3
  142. package/src/commands/ccp/review-backlog.md +61 -0
  143. package/src/commands/ccp/review.md +37 -0
  144. package/src/commands/ccp/rules-distill.md +12 -0
  145. package/src/commands/ccp/rust-build.md +188 -0
  146. package/src/commands/ccp/rust-review.md +143 -0
  147. package/src/commands/ccp/rust-test.md +309 -0
  148. package/{ecc/commands → src/commands/ccp}/save-session.md +2 -1
  149. package/src/commands/ccp/secure-phase.md +35 -0
  150. package/src/commands/ccp/session-report.md +19 -0
  151. package/{ecc/commands → src/commands/ccp}/sessions.md +39 -34
  152. package/src/commands/ccp/set-profile.md +12 -0
  153. package/{gsd/commands-gsd → src/commands/ccp}/settings.md +5 -5
  154. package/src/commands/ccp/setup-pm.md +81 -0
  155. package/{kit/commands → src/commands/ccp}/setup-refresh.md +4 -3
  156. package/{kit/commands → src/commands/ccp}/setup.md +67 -40
  157. package/src/commands/ccp/ship.md +23 -0
  158. package/src/commands/ccp/skill-create.md +172 -0
  159. package/src/commands/ccp/skill-health.md +51 -0
  160. package/src/commands/ccp/stats.md +18 -0
  161. package/src/commands/ccp/tdd.md +329 -0
  162. package/src/commands/ccp/test-coverage.md +74 -0
  163. package/src/commands/ccp/thread.md +127 -0
  164. package/{kit/commands → src/commands/ccp}/tool-guide.md +2 -1
  165. package/src/commands/ccp/ui-phase.md +34 -0
  166. package/src/commands/ccp/ui-review.md +32 -0
  167. package/src/commands/ccp/update-codemaps.md +77 -0
  168. package/src/commands/ccp/update-docs.md +89 -0
  169. package/{gsd/commands-gsd → src/commands/ccp}/update.md +5 -5
  170. package/{gsd/commands-gsd → src/commands/ccp}/validate-phase.md +3 -3
  171. package/{gsd/commands-gsd → src/commands/ccp}/verify-work.md +5 -5
  172. package/{ecc/commands → src/commands/ccp}/verify.md +5 -0
  173. package/src/commands/ccp/workstreams.md +68 -0
  174. package/{ecc → src}/examples/CLAUDE.md +4 -4
  175. package/{ecc → src}/examples/django-api-CLAUDE.md +5 -5
  176. package/{ecc → src}/examples/go-microservice-CLAUDE.md +6 -6
  177. package/{ecc → src}/examples/rust-api-CLAUDE.md +4 -4
  178. package/{ecc → src}/examples/saas-nextjs-CLAUDE.md +8 -8
  179. package/{gsd/hooks/gsd-context-monitor.js → src/hooks/ccp-context-monitor.js} +3 -3
  180. package/src/hooks/ccp-prompt-guard.js +96 -0
  181. package/{gsd/hooks/gsd-statusline.js → src/hooks/ccp-statusline.js} +7 -7
  182. package/src/hooks/ccp-workflow-guard.js +94 -0
  183. package/src/hooks/config-protection.js +141 -0
  184. package/{kit → src}/hooks/kit-check-update.js +7 -4
  185. package/src/hooks/mcp-health-check.js +620 -0
  186. package/{ecc/scripts → src}/hooks/run-with-flags-shell.sh +1 -1
  187. package/{ecc/scripts → src}/hooks/run-with-flags.js +74 -13
  188. package/src/hooks/session-end-marker.js +29 -0
  189. package/{ecc/scripts → src}/hooks/session-end.js +83 -40
  190. package/{ecc/scripts → src}/hooks/session-start.js +76 -10
  191. package/{ecc/scripts → src}/lib/hook-flags.js +8 -4
  192. package/{ecc/scripts → src}/lib/project-detect.js +2 -1
  193. package/{ecc/scripts → src}/lib/session-manager.d.ts +5 -1
  194. package/{ecc/scripts → src}/lib/session-manager.js +202 -92
  195. package/{ecc/scripts → src}/lib/utils.d.ts +23 -1
  196. package/{ecc/scripts → src}/lib/utils.js +91 -3
  197. package/{gsd/get-shit-done/bin/gsd-tools.cjs → src/pilot/bin/ccp-tools.cjs} +257 -86
  198. package/{gsd/get-shit-done → src/pilot}/bin/lib/commands.cjs +1 -1
  199. package/src/pilot/bin/lib/config.cjs +444 -0
  200. package/src/pilot/bin/lib/core.cjs +1190 -0
  201. package/src/pilot/bin/lib/init.cjs +1281 -0
  202. package/src/pilot/bin/lib/model-profiles.cjs +67 -0
  203. package/{gsd/get-shit-done → src/pilot}/bin/lib/phase.cjs +2 -2
  204. package/src/pilot/bin/lib/security.cjs +382 -0
  205. package/{gsd/get-shit-done → src/pilot}/bin/lib/state.cjs +1 -1
  206. package/src/pilot/bin/lib/uat.cjs +282 -0
  207. package/{gsd/get-shit-done → src/pilot}/bin/lib/verify.cjs +10 -10
  208. package/{gsd/get-shit-done → src/pilot}/references/continuation-format.md +16 -16
  209. package/{gsd/get-shit-done → src/pilot}/references/decimal-phase-calculation.md +5 -5
  210. package/{gsd/get-shit-done → src/pilot}/references/git-integration.md +5 -5
  211. package/{gsd/get-shit-done → src/pilot}/references/git-planning-commit.md +4 -4
  212. package/src/pilot/references/mcp-servers.json +153 -0
  213. package/{gsd/get-shit-done → src/pilot}/references/model-profile-resolution.md +2 -2
  214. package/{gsd/get-shit-done → src/pilot}/references/model-profiles.md +20 -20
  215. package/{gsd/get-shit-done → src/pilot}/references/phase-argument-parsing.md +4 -4
  216. package/{gsd/get-shit-done → src/pilot}/references/planning-config.md +15 -15
  217. package/{gsd/get-shit-done → src/pilot}/references/ui-brand.md +5 -5
  218. package/{gsd/get-shit-done → src/pilot}/references/verification-patterns.md +1 -1
  219. package/{gsd/get-shit-done → src/pilot}/templates/DEBUG.md +1 -1
  220. package/{gsd/get-shit-done → src/pilot}/templates/UAT.md +3 -3
  221. package/src/pilot/templates/UI-SPEC.md +100 -0
  222. package/{gsd/get-shit-done → src/pilot}/templates/VALIDATION.md +1 -1
  223. package/src/pilot/templates/claude-md.md +122 -0
  224. package/{gsd/get-shit-done → src/pilot}/templates/codebase/architecture.md +2 -2
  225. package/{gsd/get-shit-done → src/pilot}/templates/codebase/structure.md +13 -13
  226. package/{gsd/get-shit-done → src/pilot}/templates/context.md +4 -4
  227. package/src/pilot/templates/copilot-instructions.md +7 -0
  228. package/{gsd/get-shit-done → src/pilot}/templates/debug-subagent-prompt.md +4 -4
  229. package/src/pilot/templates/dev-preferences.md +21 -0
  230. package/{gsd/get-shit-done → src/pilot}/templates/discovery.md +2 -2
  231. package/src/pilot/templates/discussion-log.md +63 -0
  232. package/{gsd/get-shit-done → src/pilot}/templates/phase-prompt.md +12 -12
  233. package/{gsd/get-shit-done → src/pilot}/templates/planner-subagent-prompt.md +7 -7
  234. package/{gsd/get-shit-done → src/pilot}/templates/project.md +1 -1
  235. package/{gsd/get-shit-done → src/pilot}/templates/research.md +2 -2
  236. package/{gsd/get-shit-done → src/pilot}/templates/state.md +2 -2
  237. package/{gsd/get-shit-done → src/pilot}/templates/summary-complex.md +1 -1
  238. package/{gsd/get-shit-done → src/pilot}/workflows/add-phase.md +11 -11
  239. package/{gsd/get-shit-done → src/pilot}/workflows/add-tests.md +15 -15
  240. package/{gsd/get-shit-done → src/pilot}/workflows/add-todo.md +7 -7
  241. package/{gsd/get-shit-done → src/pilot}/workflows/audit-milestone.md +24 -16
  242. package/src/pilot/workflows/audit-uat.md +109 -0
  243. package/src/pilot/workflows/autonomous.md +891 -0
  244. package/{gsd/get-shit-done → src/pilot}/workflows/check-todos.md +10 -10
  245. package/{gsd/get-shit-done → src/pilot}/workflows/cleanup.md +3 -3
  246. package/{gsd/get-shit-done → src/pilot}/workflows/complete-milestone.md +19 -16
  247. package/{gsd/get-shit-done → src/pilot}/workflows/diagnose-issues.md +9 -4
  248. package/{gsd/get-shit-done → src/pilot}/workflows/discovery-phase.md +8 -8
  249. package/src/pilot/workflows/discuss-phase-assumptions.md +653 -0
  250. package/{gsd/get-shit-done → src/pilot}/workflows/discuss-phase.md +407 -49
  251. package/src/pilot/workflows/do.md +104 -0
  252. package/src/pilot/workflows/docs-update.md +1165 -0
  253. package/src/pilot/workflows/execute-phase.md +821 -0
  254. package/{gsd/get-shit-done → src/pilot}/workflows/execute-plan.md +79 -28
  255. package/src/pilot/workflows/fast.md +105 -0
  256. package/src/pilot/workflows/forensics.md +265 -0
  257. package/{gsd/get-shit-done → src/pilot}/workflows/health.md +34 -11
  258. package/src/pilot/workflows/help.md +767 -0
  259. package/{gsd/get-shit-done → src/pilot}/workflows/insert-phase.md +10 -10
  260. package/{gsd/get-shit-done → src/pilot}/workflows/list-phase-assumptions.md +4 -4
  261. package/src/pilot/workflows/manager.md +362 -0
  262. package/{gsd/get-shit-done → src/pilot}/workflows/map-codebase.md +27 -17
  263. package/src/pilot/workflows/milestone-summary.md +223 -0
  264. package/{gsd/get-shit-done → src/pilot}/workflows/new-milestone.md +135 -33
  265. package/{gsd/get-shit-done → src/pilot}/workflows/new-project.md +152 -79
  266. package/src/pilot/workflows/next.md +97 -0
  267. package/src/pilot/workflows/node-repair.md +92 -0
  268. package/src/pilot/workflows/note.md +156 -0
  269. package/src/pilot/workflows/pause-work.md +177 -0
  270. package/{gsd/get-shit-done → src/pilot}/workflows/plan-milestone-gaps.md +10 -11
  271. package/src/pilot/workflows/plan-phase.md +859 -0
  272. package/src/pilot/workflows/plant-seed.md +169 -0
  273. package/src/pilot/workflows/pr-branch.md +129 -0
  274. package/src/pilot/workflows/profile-user.md +452 -0
  275. package/{gsd/get-shit-done → src/pilot}/workflows/progress.md +95 -34
  276. package/{gsd/get-shit-done → src/pilot}/workflows/quick.md +33 -21
  277. package/{gsd/get-shit-done → src/pilot}/workflows/remove-phase.md +14 -14
  278. package/{gsd/get-shit-done → src/pilot}/workflows/research-phase.md +18 -10
  279. package/{gsd/get-shit-done → src/pilot}/workflows/resume-project.md +37 -18
  280. package/src/pilot/workflows/review.md +244 -0
  281. package/src/pilot/workflows/secure-phase.md +164 -0
  282. package/src/pilot/workflows/session-report.md +146 -0
  283. package/{gsd/get-shit-done → src/pilot}/workflows/set-profile.md +7 -7
  284. package/{gsd/get-shit-done → src/pilot}/workflows/settings.md +75 -22
  285. package/src/pilot/workflows/ship.md +228 -0
  286. package/src/pilot/workflows/stats.md +60 -0
  287. package/{gsd/get-shit-done → src/pilot}/workflows/transition.md +57 -17
  288. package/src/pilot/workflows/ui-phase.md +302 -0
  289. package/src/pilot/workflows/ui-review.md +165 -0
  290. package/{gsd/get-shit-done → src/pilot}/workflows/update.md +88 -58
  291. package/{gsd/get-shit-done → src/pilot}/workflows/validate-phase.md +24 -17
  292. package/{gsd/get-shit-done → src/pilot}/workflows/verify-phase.md +26 -15
  293. package/{gsd/get-shit-done → src/pilot}/workflows/verify-work.md +89 -37
  294. package/{ecc → src}/rules/common/agents.md +1 -0
  295. package/src/rules/common/code-review.md +124 -0
  296. package/{ecc → src}/rules/common/coding-style.md +21 -0
  297. package/src/rules/zh/README.md +108 -0
  298. package/src/rules/zh/agents.md +50 -0
  299. package/src/rules/zh/code-review.md +124 -0
  300. package/src/rules/zh/coding-style.md +48 -0
  301. package/src/rules/zh/development-workflow.md +44 -0
  302. package/src/rules/zh/git-workflow.md +24 -0
  303. package/src/rules/zh/hooks.md +30 -0
  304. package/src/rules/zh/patterns.md +31 -0
  305. package/src/rules/zh/performance.md +55 -0
  306. package/src/rules/zh/security.md +29 -0
  307. package/src/rules/zh/testing.md +29 -0
  308. package/src/skills/agentic-engineering/SKILL.md +63 -0
  309. package/src/skills/ai-first-engineering/SKILL.md +51 -0
  310. package/src/skills/ai-regression-testing/SKILL.md +385 -0
  311. package/src/skills/api-design/SKILL.md +523 -0
  312. package/src/skills/architecture-decision-records/SKILL.md +179 -0
  313. package/src/skills/autonomous-agent-harness/SKILL.md +267 -0
  314. package/src/skills/autonomous-loops/SKILL.md +610 -0
  315. package/src/skills/backend-patterns/SKILL.md +598 -0
  316. package/src/skills/benchmark/SKILL.md +87 -0
  317. package/src/skills/blueprint/SKILL.md +90 -0
  318. package/src/skills/browser-qa/SKILL.md +81 -0
  319. package/src/skills/bun-runtime/SKILL.md +84 -0
  320. package/src/skills/claude-api/SKILL.md +337 -0
  321. package/src/skills/codebase-onboarding/SKILL.md +233 -0
  322. package/src/skills/coding-standards/SKILL.md +530 -0
  323. package/src/skills/content-hash-cache-pattern/SKILL.md +161 -0
  324. package/src/skills/context-budget/SKILL.md +135 -0
  325. package/{ecc → src}/skills/continuous-learning-v2/SKILL.md +6 -6
  326. package/{ecc → src}/skills/continuous-learning-v2/agents/observer-loop.sh +1 -1
  327. package/{ecc → src}/skills/continuous-learning-v2/agents/observer.md +1 -1
  328. package/src/skills/cost-aware-llm-pipeline/SKILL.md +183 -0
  329. package/src/skills/cpp-coding-standards/SKILL.md +723 -0
  330. package/src/skills/cpp-testing/SKILL.md +324 -0
  331. package/src/skills/database-migrations/SKILL.md +429 -0
  332. package/src/skills/deep-research/SKILL.md +155 -0
  333. package/src/skills/deployment-patterns/SKILL.md +427 -0
  334. package/src/skills/design-system/SKILL.md +82 -0
  335. package/src/skills/django-patterns/SKILL.md +734 -0
  336. package/src/skills/django-security/SKILL.md +593 -0
  337. package/src/skills/django-tdd/SKILL.md +729 -0
  338. package/src/skills/django-verification/SKILL.md +469 -0
  339. package/src/skills/docker-patterns/SKILL.md +364 -0
  340. package/src/skills/documentation-lookup/SKILL.md +90 -0
  341. package/src/skills/e2e-testing/SKILL.md +326 -0
  342. package/src/skills/eval-harness/SKILL.md +270 -0
  343. package/src/skills/exa-search/SKILL.md +103 -0
  344. package/src/skills/flutter-dart-code-review/SKILL.md +435 -0
  345. package/src/skills/frontend-patterns/SKILL.md +642 -0
  346. package/src/skills/gan-style-harness/SKILL.md +278 -0
  347. package/src/skills/git-workflow/SKILL.md +715 -0
  348. package/src/skills/golang-patterns/SKILL.md +674 -0
  349. package/src/skills/golang-testing/SKILL.md +720 -0
  350. package/src/skills/hexagonal-architecture/SKILL.md +276 -0
  351. package/src/skills/iterative-retrieval/SKILL.md +211 -0
  352. package/src/skills/java-coding-standards/SKILL.md +147 -0
  353. package/src/skills/jpa-patterns/SKILL.md +151 -0
  354. package/src/skills/kotlin-coroutines-flows/SKILL.md +284 -0
  355. package/src/skills/kotlin-exposed-patterns/SKILL.md +719 -0
  356. package/src/skills/kotlin-ktor-patterns/SKILL.md +689 -0
  357. package/src/skills/kotlin-patterns/SKILL.md +711 -0
  358. package/src/skills/kotlin-testing/SKILL.md +824 -0
  359. package/src/skills/laravel-patterns/SKILL.md +415 -0
  360. package/src/skills/laravel-plugin-discovery/SKILL.md +229 -0
  361. package/src/skills/laravel-security/SKILL.md +285 -0
  362. package/src/skills/laravel-tdd/SKILL.md +283 -0
  363. package/src/skills/laravel-verification/SKILL.md +179 -0
  364. package/src/skills/mcp-server-patterns/SKILL.md +67 -0
  365. package/src/skills/nextjs-turbopack/SKILL.md +44 -0
  366. package/src/skills/nuxt4-patterns/SKILL.md +100 -0
  367. package/src/skills/opensource-pipeline/SKILL.md +255 -0
  368. package/src/skills/perl-patterns/SKILL.md +504 -0
  369. package/src/skills/perl-security/SKILL.md +503 -0
  370. package/src/skills/perl-testing/SKILL.md +475 -0
  371. package/src/skills/postgres-patterns/SKILL.md +147 -0
  372. package/src/skills/project-flow-ops/SKILL.md +111 -0
  373. package/src/skills/project-guidelines-example/SKILL.md +349 -0
  374. package/src/skills/prompt-optimizer/SKILL.md +397 -0
  375. package/src/skills/python-patterns/SKILL.md +750 -0
  376. package/src/skills/python-testing/SKILL.md +816 -0
  377. package/src/skills/pytorch-patterns/SKILL.md +396 -0
  378. package/src/skills/regex-vs-llm-structured-text/SKILL.md +220 -0
  379. package/src/skills/repo-scan/SKILL.md +78 -0
  380. package/src/skills/rules-distill/SKILL.md +264 -0
  381. package/src/skills/rules-distill/scripts/scan-rules.sh +58 -0
  382. package/src/skills/rules-distill/scripts/scan-skills.sh +129 -0
  383. package/src/skills/rust-patterns/SKILL.md +499 -0
  384. package/src/skills/rust-testing/SKILL.md +500 -0
  385. package/src/skills/safety-guard/SKILL.md +69 -0
  386. package/src/skills/search-first/SKILL.md +161 -0
  387. package/src/skills/security-review/SKILL.md +495 -0
  388. package/src/skills/security-review/cloud-infrastructure-security.md +361 -0
  389. package/src/skills/security-scan/SKILL.md +165 -0
  390. package/src/skills/springboot-patterns/SKILL.md +314 -0
  391. package/src/skills/springboot-security/SKILL.md +272 -0
  392. package/src/skills/springboot-tdd/SKILL.md +158 -0
  393. package/src/skills/springboot-verification/SKILL.md +231 -0
  394. package/src/skills/swift-concurrency-6-2/SKILL.md +216 -0
  395. package/src/skills/tdd-workflow/SKILL.md +410 -0
  396. package/src/skills/token-budget-advisor/SKILL.md +133 -0
  397. package/{ecc/skills/verification-loop-SKILL.md → src/skills/verification-loop/SKILL.md} +1 -1
  398. package/src/skills/workspace-surface-audit/SKILL.md +125 -0
  399. package/ecc/scripts/hooks/session-end-marker.js +0 -15
  400. package/gsd/LICENSE +0 -21
  401. package/gsd/commands-gsd/discuss-phase.md +0 -90
  402. package/gsd/commands-gsd/execute-phase.md +0 -41
  403. package/gsd/commands-gsd/join-discord.md +0 -18
  404. package/gsd/commands-gsd/reapply-patches.md +0 -123
  405. package/gsd/commands-gsd/set-profile.md +0 -34
  406. package/gsd/get-shit-done/bin/lib/config.cjs +0 -169
  407. package/gsd/get-shit-done/bin/lib/core.cjs +0 -492
  408. package/gsd/get-shit-done/bin/lib/init.cjs +0 -710
  409. package/gsd/get-shit-done/workflows/execute-phase.md +0 -459
  410. package/gsd/get-shit-done/workflows/help.md +0 -489
  411. package/gsd/get-shit-done/workflows/pause-work.md +0 -122
  412. package/gsd/get-shit-done/workflows/plan-phase.md +0 -560
  413. package/gsd/hooks/gsd-check-update.js +0 -81
  414. package/kit/CLAUDE.md +0 -43
  415. package/kit/commands/kit/update.md +0 -46
  416. package/kit/mcp.json +0 -10
  417. package/kit/rules/code-style.md +0 -24
  418. /package/{ecc → src}/agents/architect.md +0 -0
  419. /package/{ecc → src}/agents/code-reviewer.md +0 -0
  420. /package/{ecc → src}/agents/e2e-runner.md +0 -0
  421. /package/{ecc → src}/agents/security-reviewer.md +0 -0
  422. /package/{ecc → src}/agents/tdd-guide.md +0 -0
  423. /package/{ecc/rules → src/available-rules}/golang/coding-style.md +0 -0
  424. /package/{ecc/rules → src/available-rules}/golang/hooks.md +0 -0
  425. /package/{ecc/rules → src/available-rules}/golang/patterns.md +0 -0
  426. /package/{ecc/rules → src/available-rules}/golang/security.md +0 -0
  427. /package/{ecc/rules → src/available-rules}/golang/testing.md +0 -0
  428. /package/{ecc/rules → src/available-rules}/kotlin/coding-style.md +0 -0
  429. /package/{ecc/rules → src/available-rules}/kotlin/patterns.md +0 -0
  430. /package/{ecc/rules → src/available-rules}/kotlin/security.md +0 -0
  431. /package/{ecc/rules → src/available-rules}/kotlin/testing.md +0 -0
  432. /package/{ecc/rules → src/available-rules}/perl/coding-style.md +0 -0
  433. /package/{ecc/rules → src/available-rules}/perl/hooks.md +0 -0
  434. /package/{ecc/rules → src/available-rules}/perl/patterns.md +0 -0
  435. /package/{ecc/rules → src/available-rules}/perl/security.md +0 -0
  436. /package/{ecc/rules → src/available-rules}/perl/testing.md +0 -0
  437. /package/{ecc/rules → src/available-rules}/php/coding-style.md +0 -0
  438. /package/{ecc/rules → src/available-rules}/php/hooks.md +0 -0
  439. /package/{ecc/rules → src/available-rules}/php/patterns.md +0 -0
  440. /package/{ecc/rules → src/available-rules}/php/security.md +0 -0
  441. /package/{ecc/rules → src/available-rules}/php/testing.md +0 -0
  442. /package/{ecc/rules → src/available-rules}/python/coding-style.md +0 -0
  443. /package/{ecc/rules → src/available-rules}/python/hooks.md +0 -0
  444. /package/{ecc/rules → src/available-rules}/python/patterns.md +0 -0
  445. /package/{ecc/rules → src/available-rules}/python/security.md +0 -0
  446. /package/{ecc/rules → src/available-rules}/python/testing.md +0 -0
  447. /package/{ecc/rules → src/available-rules}/swift/coding-style.md +0 -0
  448. /package/{ecc/rules → src/available-rules}/swift/hooks.md +0 -0
  449. /package/{ecc/rules → src/available-rules}/swift/patterns.md +0 -0
  450. /package/{ecc/rules → src/available-rules}/swift/security.md +0 -0
  451. /package/{ecc/rules → src/available-rules}/swift/testing.md +0 -0
  452. /package/{ecc/rules → src/available-rules}/typescript/coding-style.md +0 -0
  453. /package/{ecc/rules → src/available-rules}/typescript/hooks.md +0 -0
  454. /package/{ecc/rules → src/available-rules}/typescript/patterns.md +0 -0
  455. /package/{ecc/rules → src/available-rules}/typescript/security.md +0 -0
  456. /package/{ecc/rules → src/available-rules}/typescript/testing.md +0 -0
  457. /package/{ecc → src}/contexts/dev.md +0 -0
  458. /package/{ecc → src}/contexts/research.md +0 -0
  459. /package/{ecc → src}/contexts/review.md +0 -0
  460. /package/{ecc → src}/examples/user-CLAUDE.md +0 -0
  461. /package/{ecc/scripts → src}/hooks/check-hook-enabled.js +0 -0
  462. /package/{ecc/scripts → src}/hooks/evaluate-session.js +0 -0
  463. /package/{ecc/scripts → src}/hooks/pre-compact.js +0 -0
  464. /package/{ecc/scripts → src}/hooks/suggest-compact.js +0 -0
  465. /package/{ecc/scripts → src}/lib/package-manager.d.ts +0 -0
  466. /package/{ecc/scripts → src}/lib/package-manager.js +0 -0
  467. /package/{ecc/scripts → src}/lib/resolve-formatter.js +0 -0
  468. /package/{ecc/scripts → src}/lib/session-aliases.d.ts +0 -0
  469. /package/{ecc/scripts → src}/lib/session-aliases.js +0 -0
  470. /package/{ecc/scripts → src}/lib/shell-split.js +0 -0
  471. /package/{gsd/get-shit-done → src/pilot}/bin/lib/frontmatter.cjs +0 -0
  472. /package/{gsd/get-shit-done → src/pilot}/bin/lib/milestone.cjs +0 -0
  473. /package/{gsd/get-shit-done → src/pilot}/bin/lib/roadmap.cjs +0 -0
  474. /package/{gsd/get-shit-done → src/pilot}/bin/lib/template.cjs +0 -0
  475. /package/{gsd/get-shit-done → src/pilot}/references/checkpoints.md +0 -0
  476. /package/{gsd/get-shit-done → src/pilot}/references/questioning.md +0 -0
  477. /package/{gsd/get-shit-done → src/pilot}/references/tdd.md +0 -0
  478. /package/{gsd/get-shit-done → src/pilot}/templates/codebase/concerns.md +0 -0
  479. /package/{gsd/get-shit-done → src/pilot}/templates/codebase/conventions.md +0 -0
  480. /package/{gsd/get-shit-done → src/pilot}/templates/codebase/integrations.md +0 -0
  481. /package/{gsd/get-shit-done → src/pilot}/templates/codebase/stack.md +0 -0
  482. /package/{gsd/get-shit-done → src/pilot}/templates/codebase/testing.md +0 -0
  483. /package/{gsd/get-shit-done → src/pilot}/templates/config.json +0 -0
  484. /package/{gsd/get-shit-done → src/pilot}/templates/continue-here.md +0 -0
  485. /package/{gsd/get-shit-done → src/pilot}/templates/milestone-archive.md +0 -0
  486. /package/{gsd/get-shit-done → src/pilot}/templates/milestone.md +0 -0
  487. /package/{gsd/get-shit-done → src/pilot}/templates/requirements.md +0 -0
  488. /package/{gsd/get-shit-done → src/pilot}/templates/research-project/ARCHITECTURE.md +0 -0
  489. /package/{gsd/get-shit-done → src/pilot}/templates/research-project/FEATURES.md +0 -0
  490. /package/{gsd/get-shit-done → src/pilot}/templates/research-project/PITFALLS.md +0 -0
  491. /package/{gsd/get-shit-done → src/pilot}/templates/research-project/STACK.md +0 -0
  492. /package/{gsd/get-shit-done → src/pilot}/templates/research-project/SUMMARY.md +0 -0
  493. /package/{gsd/get-shit-done → src/pilot}/templates/retrospective.md +0 -0
  494. /package/{gsd/get-shit-done → src/pilot}/templates/roadmap.md +0 -0
  495. /package/{gsd/get-shit-done → src/pilot}/templates/summary-minimal.md +0 -0
  496. /package/{gsd/get-shit-done → src/pilot}/templates/summary-standard.md +0 -0
  497. /package/{gsd/get-shit-done → src/pilot}/templates/summary.md +0 -0
  498. /package/{gsd/get-shit-done → src/pilot}/templates/user-setup.md +0 -0
  499. /package/{gsd/get-shit-done → src/pilot}/templates/verification-report.md +0 -0
  500. /package/{ecc → src}/rules/common/development-workflow.md +0 -0
  501. /package/{ecc → src}/rules/common/git-workflow.md +0 -0
  502. /package/{ecc → src}/rules/common/hooks.md +0 -0
  503. /package/{ecc → src}/rules/common/patterns.md +0 -0
  504. /package/{ecc → src}/rules/common/performance.md +0 -0
  505. /package/{ecc → src}/rules/common/security.md +0 -0
  506. /package/{ecc → src}/rules/common/testing.md +0 -0
  507. /package/{ecc → src}/skills/continuous-learning-v2/agents/start-observer.sh +0 -0
  508. /package/{ecc → src}/skills/continuous-learning-v2/config.json +0 -0
  509. /package/{ecc → src}/skills/continuous-learning-v2/hooks/observe.sh +0 -0
  510. /package/{ecc → src}/skills/continuous-learning-v2/scripts/detect-project.sh +0 -0
  511. /package/{ecc → src}/skills/continuous-learning-v2/scripts/instinct-cli.py +0 -0
  512. /package/{ecc → src}/skills/continuous-learning-v2/scripts/test_parse_instinct.py +0 -0
  513. /package/{ecc → src}/skills/strategic-compact/SKILL.md +0 -0
  514. /package/{ecc → src}/skills/strategic-compact/suggest-compact.sh +0 -0
@@ -7,11 +7,11 @@ You are a thinking partner, not an interviewer. The user is the visionary — yo
7
7
  <downstream_awareness>
8
8
  **CONTEXT.md feeds into:**
9
9
 
10
- 1. **gsd-phase-researcher** — Reads CONTEXT.md to know WHAT to research
10
+ 1. **ccp-phase-researcher** — Reads CONTEXT.md to know WHAT to research
11
11
  - "User wants card-based layout" → researcher investigates card component patterns
12
12
  - "Infinite scroll decided" → researcher looks into virtualization libraries
13
13
 
14
- 2. **gsd-planner** — Reads CONTEXT.md to know WHAT decisions are locked
14
+ 2. **ccp-planner** — Reads CONTEXT.md to know WHAT decisions are locked
15
15
  - "Pull-to-refresh on mobile" → planner includes that in task specs
16
16
  - "Claude's Discretion: loading skeleton" → planner can decide approach
17
17
 
@@ -105,16 +105,36 @@ Phase: "API documentation"
105
105
  - Scope (roadmap defines this)
106
106
  </gray_area_identification>
107
107
 
108
+ <answer_validation>
109
+ **IMPORTANT: Answer validation** — After every AskUserQuestion call, check if the response is empty or whitespace-only. If so:
110
+ 1. Retry the question once with the same parameters
111
+ 2. If still empty, present the options as a plain-text numbered list and ask the user to type their choice number
112
+ Never proceed with an empty answer.
113
+
114
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):**
115
+ When text mode is active, **do not use AskUserQuestion at all**. Instead, present every
116
+ question as a plain-text numbered list and ask the user to type their choice number.
117
+ This is required for Claude Code remote sessions (`/rc` mode) where the Claude App
118
+ cannot forward TUI menu selections back to the host.
119
+
120
+ Enable text mode:
121
+ - Per-session: pass `--text` flag to any command (e.g., `/ccp:discuss-phase --text`)
122
+ - Per-project: `ccp-tools config-set workflow.text_mode true`
123
+
124
+ Text mode applies to ALL workflows in the session, not just discuss-phase.
125
+ </answer_validation>
126
+
108
127
  <process>
109
128
 
110
- **Express path available:** If you already have a PRD or acceptance criteria document, use `/gsd:plan-phase {phase} --prd path/to/prd.md` to skip this discussion and go straight to planning.
129
+ **Express path available:** If you already have a PRD or acceptance criteria document, use `/ccp:plan-phase {phase} --prd path/to/prd.md` to skip this discussion and go straight to planning.
111
130
 
112
131
  <step name="initialize" priority="first">
113
132
  Phase number from argument (required).
114
133
 
115
134
  ```bash
116
- INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE}")
135
+ INIT=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" init phase-op "${PHASE}")
117
136
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
137
+ AGENT_SKILLS_ADVISOR=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" agent-skills ccp-advisor 2>/dev/null)
118
138
  ```
119
139
 
120
140
  Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`.
@@ -123,22 +143,32 @@ Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phas
123
143
  ```
124
144
  Phase [X] not found in roadmap.
125
145
 
126
- Use /gsd:progress to see available phases.
146
+ Use /ccp:progress to see available phases.
127
147
  ```
128
148
  Exit workflow.
129
149
 
130
150
  **If `phase_found` is true:** Continue to check_existing.
151
+
152
+ **Auto mode** — If `--auto` is present in ARGUMENTS:
153
+ - In `check_existing`: auto-select "Skip" (if context exists) or continue without prompting (if no context/plans)
154
+ - In `present_gray_areas`: auto-select ALL gray areas without asking the user
155
+ - In `discuss_areas`: for each discussion question, choose the recommended option (first option, or the one marked "recommended") without using AskUserQuestion
156
+ - Log each auto-selected choice inline so the user can review decisions in the context file
157
+ - After discussion completes, auto-advance to plan-phase (existing behavior)
131
158
  </step>
132
159
 
133
160
  <step name="check_existing">
134
161
  Check if CONTEXT.md already exists using `has_context` from init.
135
162
 
136
163
  ```bash
137
- ls ${phase_dir}/*-CONTEXT.md 2>/dev/null
164
+ ls ${phase_dir}/*-CONTEXT.md 2>/dev/null || true
138
165
  ```
139
166
 
140
167
  **If exists:**
141
- Use AskUserQuestion:
168
+
169
+ **If `--auto`:** Auto-select "Update it" — load existing context and continue to analyze_phase. Log: `[auto] Context exists — updating with auto-selected decisions.`
170
+
171
+ **Otherwise:** Use AskUserQuestion:
142
172
  - header: "Context"
143
173
  - question: "Phase [X] already has context. What do you want to do?"
144
174
  - options:
@@ -154,11 +184,13 @@ If "Skip": Exit workflow
154
184
 
155
185
  Check `has_plans` and `plan_count` from init. **If `has_plans` is true:**
156
186
 
157
- Use AskUserQuestion:
187
+ **If `--auto`:** Auto-select "Continue and replan after". Log: `[auto] Plans exist — continuing with context capture, will replan after.`
188
+
189
+ **Otherwise:** Use AskUserQuestion:
158
190
  - header: "Plans exist"
159
191
  - question: "Phase [X] already has {plan_count} plan(s) created without user context. Your decisions here won't affect existing plans unless you replan."
160
192
  - options:
161
- - "Continue and replan after" — Capture context, then run /gsd:plan-phase {X} to replan
193
+ - "Continue and replan after" — Capture context, then run /ccp:plan-phase {X} to replan
162
194
  - "View existing plans" — Show plans before deciding
163
195
  - "Cancel" — Skip discuss-phase
164
196
 
@@ -175,9 +207,9 @@ Read project-level and prior phase context to avoid re-asking decided questions
175
207
  **Step 1: Read project-level files**
176
208
  ```bash
177
209
  # Core project files
178
- cat .planning/PROJECT.md 2>/dev/null
179
- cat .planning/REQUIREMENTS.md 2>/dev/null
180
- cat .planning/STATE.md 2>/dev/null
210
+ cat .planning/PROJECT.md 2>/dev/null || true
211
+ cat .planning/REQUIREMENTS.md 2>/dev/null || true
212
+ cat .planning/STATE.md 2>/dev/null || true
181
213
  ```
182
214
 
183
215
  Extract from these:
@@ -188,7 +220,7 @@ Extract from these:
188
220
  **Step 2: Read all prior CONTEXT.md files**
189
221
  ```bash
190
222
  # Find all CONTEXT.md files from phases before current
191
- find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
223
+ (find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
192
224
  ```
193
225
 
194
226
  For each CONTEXT.md where phase number < current phase:
@@ -223,12 +255,53 @@ Structure the extracted information:
223
255
  **If no prior context exists:** Continue without — this is expected for early phases.
224
256
  </step>
225
257
 
258
+ <step name="cross_reference_todos">
259
+ Check if any pending todos are relevant to this phase's scope. Surfaces backlog items that might otherwise be missed.
260
+
261
+ **Load and match todos:**
262
+ ```bash
263
+ TODO_MATCHES=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" todo match-phase "${PHASE_NUMBER}")
264
+ ```
265
+
266
+ Parse JSON for: `todo_count`, `matches[]` (each with `file`, `title`, `area`, `score`, `reasons`).
267
+
268
+ **If `todo_count` is 0 or `matches` is empty:** Skip silently — no workflow slowdown.
269
+
270
+ **If matches found:**
271
+
272
+ Present matched todos to the user. Show each match with its title, area, and why it matched:
273
+
274
+ ```
275
+ Found {N} pending todo(s) that may be relevant to Phase {X}:
276
+
277
+ {For each match:}
278
+ - **{title}** (area: {area}, relevance: {score}) — matched on {reasons}
279
+ ```
280
+
281
+ Use AskUserQuestion (multiSelect) asking which todos to fold into this phase's scope:
282
+
283
+ ```
284
+ Which of these todos should be folded into Phase {X} scope?
285
+ (Select any that apply, or none to skip)
286
+ ```
287
+
288
+ **For selected (folded) todos:**
289
+ - Store internally as `<folded_todos>` for inclusion in CONTEXT.md `<decisions>` section
290
+ - These become additional scope items that downstream agents (researcher, planner) will see
291
+
292
+ **For unselected (reviewed but not folded) todos:**
293
+ - Store internally as `<reviewed_todos>` for inclusion in CONTEXT.md `<deferred>` section
294
+ - This prevents future phases from re-surfacing the same todos as "missed"
295
+
296
+ **Auto mode (`--auto`):** Fold all todos with score >= 0.4 automatically. Log the selection.
297
+ </step>
298
+
226
299
  <step name="scout_codebase">
227
300
  Lightweight scan of existing code to inform gray area identification and discussion. Uses ~10% context — acceptable for an interactive session.
228
301
 
229
302
  **Step 1: Check for existing codebase maps**
230
303
  ```bash
231
- ls .planning/codebase/*.md 2>/dev/null
304
+ ls .planning/codebase/*.md 2>/dev/null || true
232
305
  ```
233
306
 
234
307
  **If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract:
@@ -244,12 +317,12 @@ Extract key terms from the phase goal (e.g., "feed" → "post", "card", "list";
244
317
 
245
318
  ```bash
246
319
  # Find files related to phase goal terms
247
- grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10
320
+ grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
248
321
 
249
322
  # Find existing components/hooks
250
- ls src/components/ 2>/dev/null
251
- ls src/hooks/ 2>/dev/null
252
- ls src/lib/ src/utils/ 2>/dev/null
323
+ ls src/components/ 2>/dev/null || true
324
+ ls src/hooks/ 2>/dev/null || true
325
+ ls src/lib/ src/utils/ 2>/dev/null || true
253
326
  ```
254
327
 
255
328
  Read the 3-5 most relevant files to understand existing patterns.
@@ -272,6 +345,15 @@ Analyze the phase to identify gray areas worth discussing. **Use both `prior_dec
272
345
 
273
346
  1. **Domain boundary** — What capability is this phase delivering? State it clearly.
274
347
 
348
+ 1b. **Initialize canonical refs accumulator** — Start building the `<canonical_refs>` list for CONTEXT.md. This accumulates throughout the entire discussion, not just this step.
349
+
350
+ **Source 1 (now):** Copy `Canonical refs:` from ROADMAP.md for this phase. Expand each to a full relative path.
351
+ **Source 2 (now):** Check REQUIREMENTS.md and PROJECT.md for any specs/ADRs referenced for this phase.
352
+ **Source 3 (scout_codebase):** If existing code references docs (e.g., comments citing ADRs), add those.
353
+ **Source 4 (discuss_areas):** When the user says "read X", "check Y", or references any doc/spec/ADR during discussion — add it immediately. These are often the MOST important refs because they represent docs the user specifically wants followed.
354
+
355
+ This list is MANDATORY in CONTEXT.md. Every ref must have a full relative path so downstream agents can read it directly. If no external docs exist, note that explicitly.
356
+
275
357
  2. **Check prior decisions** — Before generating gray areas, check if any were already decided:
276
358
  - Scan `<prior_decisions>` for relevant choices (e.g., "Ctrl+C only, no single-key shortcuts")
277
359
  - These are **pre-answered** — don't re-ask unless this phase has conflicting needs
@@ -281,6 +363,23 @@ Analyze the phase to identify gray areas worth discussing. **Use both `prior_dec
281
363
 
282
364
  4. **Skip assessment** — If no meaningful gray areas exist (pure infrastructure, clear-cut implementation, or all already decided in prior phases), the phase may not need discussion.
283
365
 
366
+ **Advisor Mode Detection:**
367
+
368
+ Check if advisor mode should activate:
369
+
370
+ 1. Check for research_before_questions config:
371
+ ```bash
372
+ RESEARCH_MODE=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" config-get workflow.research_before_questions 2>/dev/null || echo "false")
373
+ ```
374
+ ADVISOR_MODE = `RESEARCH_MODE` is `"true"` → true, otherwise → false
375
+
376
+ 2. If ADVISOR_MODE is true, resolve model for advisor agents:
377
+ ```bash
378
+ ADVISOR_MODEL=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" resolve-model ccp-advisor-researcher --raw)
379
+ ```
380
+
381
+ If ADVISOR_MODE is false, skip all advisor-specific steps — workflow proceeds with existing conversational flow unchanged.
382
+
284
383
  **Output your analysis internally, then present to user.**
285
384
 
286
385
  Example analysis for "Post Feed" phase (with code and prior context):
@@ -314,7 +413,9 @@ We'll clarify HOW to implement this.
314
413
  - [Decision from Phase M that applies here]
315
414
  ```
316
415
 
317
- **Then use AskUserQuestion (multiSelect: true):**
416
+ **If `--auto`:** Auto-select ALL gray areas. Log: `[auto] Selected all gray areas: [list area names].` Skip the AskUserQuestion below and continue directly to discuss_areas with all areas selected.
417
+
418
+ **Otherwise, use AskUserQuestion (multiSelect: true):**
318
419
  - header: "Discuss"
319
420
  - question: "Which areas do you want to discuss for [phase name]?"
320
421
  - options: Generate 3-4 phase-specific gray areas, each with:
@@ -368,15 +469,163 @@ For "Organize photo library" (organization task):
368
469
  ☐ Folder structure — Flat, nested by year, or by category?
369
470
  ```
370
471
 
371
- Continue to discuss_areas with selected areas.
472
+ Continue to discuss_areas with selected areas (or advisor_research if ADVISOR_MODE is true).
473
+ </step>
474
+
475
+ <step name="advisor_research">
476
+ **Advisor Research** (only when ADVISOR_MODE is true)
477
+
478
+ After user selects gray areas in present_gray_areas, spawn parallel research agents.
479
+
480
+ 1. Display brief status: "Researching {N} areas..."
481
+
482
+ 2. For EACH user-selected gray area, spawn a Task() in parallel:
483
+
484
+ Task(
485
+ prompt="First, read @~/.claude/agents/ccp-advisor-researcher.md for your role and instructions.
486
+
487
+ <gray_area>{area_name}: {area_description from gray area identification}</gray_area>
488
+ <phase_context>{phase_goal and description from ROADMAP.md}</phase_context>
489
+ <project_context>{project name and brief description from PROJECT.md}</project_context>
490
+
491
+ Research this gray area and return a structured comparison table with rationale.
492
+ ${AGENT_SKILLS_ADVISOR}",
493
+ subagent_type="ccp-advisor-researcher",
494
+ model="{ADVISOR_MODEL}",
495
+ description="Research: {area_name}"
496
+ )
497
+
498
+ All Task() calls spawn simultaneously — do NOT wait for one before starting the next.
499
+
500
+ 3. After ALL agents return, SYNTHESIZE results before presenting:
501
+ For each agent's return:
502
+ a. Parse the markdown comparison table and rationale paragraph
503
+ b. Verify all 5 columns present (Option | Pros | Cons | Complexity | Recommendation) — fill any missing columns rather than showing broken table
504
+ c. Verify option count is reasonable (2-4 options acceptable)
505
+ d. Rewrite rationale paragraph to weave in project context and ongoing discussion context that the agent did not have access to
506
+ e. If agent returned only 1 option, convert from table format to direct recommendation: "Standard approach for {area}: {option}. {rationale}"
507
+
508
+ 4. Store synthesized tables for use in discuss_areas.
509
+
510
+ **If ADVISOR_MODE is false:** Skip this step entirely — proceed directly from present_gray_areas to discuss_areas.
372
511
  </step>
373
512
 
374
513
  <step name="discuss_areas">
514
+ Discuss each selected area with the user. Flow depends on advisor mode.
515
+
516
+ **If ADVISOR_MODE is true:**
517
+
518
+ Table-first discussion flow — present research-backed comparison tables, then capture user picks.
519
+
520
+ **For each selected area:**
521
+
522
+ 1. **Present the synthesized comparison table + rationale paragraph** (from advisor_research step)
523
+
524
+ 2. **Use AskUserQuestion:**
525
+ - header: "{area_name}"
526
+ - question: "Which approach for {area_name}?"
527
+ - options: Extract from the table's Option column (AskUserQuestion adds "Other" automatically)
528
+
529
+ 3. **Record the user's selection:**
530
+ - If user picks from table options → record as locked decision for that area
531
+ - If user picks "Other" → receive their input, reflect it back for confirmation, record
532
+
533
+ 4. **After recording pick, Claude decides whether follow-up questions are needed:**
534
+ - If the pick has ambiguity that would affect downstream planning → ask 1-2 targeted follow-up questions using AskUserQuestion
535
+ - If the pick is clear and self-contained → move to next area
536
+ - Do NOT ask the standard 4 questions — the table already provided the context
537
+
538
+ 5. **After all areas processed:**
539
+ - header: "Done"
540
+ - question: "That covers [list areas]. Ready to create context?"
541
+ - options: "Create context" / "Revisit an area"
542
+
543
+ **Scope creep handling (advisor mode):**
544
+ If user mentions something outside the phase domain:
545
+ ```
546
+ "[Feature] sounds like a new capability — that belongs in its own phase.
547
+ I'll note it as a deferred idea.
548
+
549
+ Back to [current area]: [return to current question]"
550
+ ```
551
+
552
+ Track deferred ideas internally.
553
+
554
+ ---
555
+
556
+ **If ADVISOR_MODE is false:**
557
+
375
558
  For each selected area, conduct a focused discussion loop.
376
559
 
377
- **Philosophy: 4 questions, then check.**
560
+ **Research-before-questions mode:** Check if `workflow.research_before_questions` is enabled in config (from init context or `.planning/config.json`). When enabled, before presenting questions for each area:
561
+ 1. Do a brief web search for best practices related to the area topic
562
+ 2. Summarize the top findings in 2-3 bullet points
563
+ 3. Present the research alongside the question so the user can make a more informed decision
564
+
565
+ Example with research enabled:
566
+ ```
567
+ Let's talk about [Authentication Strategy].
568
+
569
+ Best practices research:
570
+ - OAuth 2.0 + PKCE is the current standard for SPAs (replaces implicit flow)
571
+ - Session tokens with httpOnly cookies preferred over localStorage for XSS protection
572
+ - Consider passkey/WebAuthn support — adoption is accelerating
573
+
574
+ With that context: How should users authenticate?
575
+ ```
576
+
577
+ When disabled (default), skip the research and present questions directly as before.
578
+
579
+ **Text mode support:** Parse optional `--text` from `$ARGUMENTS`.
580
+ - Accept `--text` flag OR read `workflow.text_mode` from config (from init context)
581
+ - When active, replace ALL `AskUserQuestion` calls with plain-text numbered lists
582
+ - User types a number to select, or types free text for "Other"
583
+ - This is required for Claude Code remote sessions (`/rc` mode) where TUI menus
584
+ don't work through the Claude App
585
+
586
+ **Batch mode support:** Parse optional `--batch` from `$ARGUMENTS`.
587
+ - Accept `--batch`, `--batch=N`, or `--batch N`
588
+
589
+ **Analyze mode support:** Parse optional `--analyze` from `$ARGUMENTS`.
590
+ When `--analyze` is active, before presenting each question (or question group in batch mode), provide a brief **trade-off analysis** for the decision:
591
+ - 2-3 options with pros/cons based on codebase context and common patterns
592
+ - A recommended approach with reasoning
593
+ - Known pitfalls or constraints from prior phases
594
+
595
+ Example with `--analyze`:
596
+ ```
597
+ **Trade-off analysis: Authentication strategy**
598
+
599
+ | Approach | Pros | Cons |
600
+ |----------|------|------|
601
+ | Session cookies | Simple, httpOnly prevents XSS | Requires CSRF protection, sticky sessions |
602
+ | JWT (stateless) | Scalable, no server state | Token size, revocation complexity |
603
+ | OAuth 2.0 + PKCE | Industry standard for SPAs | More setup, redirect flow UX |
604
+
605
+ Recommended: OAuth 2.0 + PKCE — your app has social login in requirements (REQ-04) and this aligns with the existing NextAuth setup in `src/lib/auth.ts`.
606
+
607
+ How should users authenticate?
608
+ ```
378
609
 
379
- Ask 4 questions per area before offering to continue or move on. Each answer often reveals the next question.
610
+ This gives the user context to make informed decisions without extra prompting. When `--analyze` is absent, present questions directly as before.
611
+ - Accept `--batch`, `--batch=N`, or `--batch N`
612
+ - Default to 4 questions per batch when no number is provided
613
+ - Clamp explicit sizes to 2-5 so a batch stays answerable
614
+ - If `--batch` is absent, keep the existing one-question-at-a-time flow
615
+
616
+ **Philosophy:** stay adaptive, but let the user choose the pacing.
617
+ - Default mode: 4 single-question turns, then check whether to continue
618
+ - `--batch` mode: 1 grouped turn with 2-5 numbered questions, then check whether to continue
619
+
620
+ Each answer (or answer set, in batch mode) should reveal the next question or next batch.
621
+
622
+ **Auto mode (`--auto`):** For each area, Claude selects the recommended option (first option, or the one explicitly marked "recommended") for every question without using AskUserQuestion. Log each auto-selected choice:
623
+ ```
624
+ [auto] [Area] — Q: "[question text]" → Selected: "[chosen option]" (recommended default)
625
+ ```
626
+ After all areas are auto-resolved, skip the "Explore more gray areas" prompt and proceed directly to write_context.
627
+
628
+ **Interactive mode (no `--auto`):**
380
629
 
381
630
  **For each area:**
382
631
 
@@ -385,7 +634,9 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
385
634
  Let's talk about [Area].
386
635
  ```
387
636
 
388
- 2. **Ask 4 questions using AskUserQuestion:**
637
+ 2. **Ask questions using the selected pacing:**
638
+
639
+ **Default (no `--batch`): Ask 4 questions using AskUserQuestion**
389
640
  - header: "[Area]" (max 12 chars — abbreviate if needed)
390
641
  - question: Specific decision for this area
391
642
  - options: 2-3 concrete choices (AskUserQuestion adds "Other" automatically), with the recommended choice highlighted and brief explanation why
@@ -399,12 +650,21 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
399
650
  - Include "You decide" as an option when reasonable — captures Claude discretion
400
651
  - **Context7 for library choices:** When a gray area involves library selection (e.g., "magic links" → query next-auth docs) or API approach decisions, use `mcp__context7__*` tools to fetch current documentation and inform the options. Don't use Context7 for every question — only when library-specific knowledge improves the options.
401
652
 
402
- 3. **After 4 questions, check:**
653
+ **Batch mode (`--batch`): Ask 2-5 numbered questions in one plain-text turn**
654
+ - Group closely related questions for the current area into a single message
655
+ - Keep each question concrete and answerable in one reply
656
+ - When options are helpful, include short inline choices per question rather than a separate AskUserQuestion for every item
657
+ - After the user replies, reflect back the captured decisions, note any unanswered items, and ask only the minimum follow-up needed before moving on
658
+ - Preserve adaptiveness between batches: use the full set of answers to decide the next batch or whether the area is sufficiently clear
659
+
660
+ 3. **After the current set of questions, check:**
403
661
  - header: "[Area]" (max 12 chars)
404
- - question: "More questions about [area], or move to next?"
662
+ - question: "More questions about [area], or move to next? (Remaining: [list other unvisited areas])"
405
663
  - options: "More questions" / "Next area"
406
664
 
407
- If "More questions" ask 4 more, then check again
665
+ When building the question text, list the remaining unvisited areas so the user knows what's ahead. For example: "More questions about Layout, or move to next? (Remaining: Loading behavior, Content ordering)"
666
+
667
+ If "More questions" → ask another 4 single questions, or another 2-5 question batch when `--batch` is active, then check again
408
668
  If "Next area" → proceed to next selected area
409
669
  If "Other" (free text) → interpret intent: continuation phrases ("chat more", "keep going", "yes", "more") map to "More questions"; advancement phrases ("done", "move on", "next", "skip") map to "Next area". If ambiguous, ask: "Continue with more questions about [area], or move to the next area?"
410
670
 
@@ -420,10 +680,18 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
420
680
  - Loop: discuss new areas, then prompt again
421
681
  - If "I'm ready for context": Proceed to write_context
422
682
 
683
+ **Canonical ref accumulation during discussion:**
684
+ When the user references a doc, spec, or ADR during any answer — e.g., "read adr-014", "check the MCP spec", "per browse-spec.md" — immediately:
685
+ 1. Read the referenced doc (or confirm it exists)
686
+ 2. Add it to the canonical refs accumulator with full relative path
687
+ 3. Use what you learned from the doc to inform subsequent questions
688
+
689
+ These user-referenced docs are often MORE important than ROADMAP.md refs because they represent docs the user specifically wants downstream agents to follow. Never drop them.
690
+
423
691
  **Question design:**
424
692
  - Options should be concrete, not abstract ("Cards" not "Option A")
425
- - Each answer should inform the next question
426
- - If user picks "Other" to provide freeform input (e.g., "let me describe it", "something else", or an open-ended reply), ask your follow-up as plain text — NOT another AskUserQuestion. Wait for them to type at the normal prompt, then reflect their input back and confirm before resuming AskUserQuestion for the next question.
693
+ - Each answer should inform the next question or next batch
694
+ - If user picks "Other" to provide freeform input (e.g., "let me describe it", "something else", or an open-ended reply), ask your follow-up as plain text — NOT another AskUserQuestion. Wait for them to type at the normal prompt, then reflect their input back and confirm before resuming AskUserQuestion or the next numbered batch.
427
695
 
428
696
  **Scope creep handling:**
429
697
  If user mentions something outside the phase domain:
@@ -435,11 +703,23 @@ Back to [current area]: [return to current question]"
435
703
  ```
436
704
 
437
705
  Track deferred ideas internally.
706
+
707
+ **Track discussion log data internally:**
708
+ For each question asked, accumulate:
709
+ - Area name
710
+ - All options presented (label + description)
711
+ - Which option the user selected (or their free-text response)
712
+ - Any follow-up notes or clarifications the user provided
713
+ This data is used to generate DISCUSSION-LOG.md in the `write_context` step.
438
714
  </step>
439
715
 
440
716
  <step name="write_context">
441
717
  Create CONTEXT.md capturing decisions made.
442
718
 
719
+ **Also generate DISCUSSION-LOG.md** — a full audit trail of the discuss-phase Q&A.
720
+ This file is for human reference only (software audits, compliance reviews). It is NOT
721
+ consumed by downstream agents (researcher, planner, executor).
722
+
443
723
  **Find or create phase directory:**
444
724
 
445
725
  Use values from init: `phase_dir`, `phase_slug`, `padded_phase`.
@@ -470,17 +750,43 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
470
750
  ## Implementation Decisions
471
751
 
472
752
  ### [Category 1 that was discussed]
473
- - [Decision or preference captured]
474
- - [Another decision if applicable]
753
+ - **D-01:** [Decision or preference captured]
754
+ - **D-02:** [Another decision if applicable]
475
755
 
476
756
  ### [Category 2 that was discussed]
477
- - [Decision or preference captured]
757
+ - **D-03:** [Decision or preference captured]
478
758
 
479
759
  ### Claude's Discretion
480
760
  [Areas where user said "you decide" — note that Claude has flexibility here]
481
761
 
762
+ ### Folded Todos
763
+ [If any todos were folded into scope from the cross_reference_todos step, list them here.
764
+ Each entry should include the todo title, original problem, and how it fits this phase's scope.
765
+ If no todos were folded: omit this subsection entirely.]
766
+
482
767
  </decisions>
483
768
 
769
+ <canonical_refs>
770
+ ## Canonical References
771
+
772
+ **Downstream agents MUST read these before planning or implementing.**
773
+
774
+ [MANDATORY section. Write the FULL accumulated canonical refs list here.
775
+ Sources: ROADMAP.md refs + REQUIREMENTS.md refs + user-referenced docs during
776
+ discussion + any docs discovered during codebase scout. Group by topic area.
777
+ Every entry needs a full relative path — not just a name.]
778
+
779
+ ### [Topic area 1]
780
+ - `path/to/adr-or-spec.md` — [What it decides/defines that's relevant]
781
+ - `path/to/doc.md` §N — [Specific section reference]
782
+
783
+ ### [Topic area 2]
784
+ - `path/to/feature-doc.md` — [What this doc defines]
785
+
786
+ [If no external specs: "No external specs — requirements fully captured in decisions above"]
787
+
788
+ </canonical_refs>
789
+
484
790
  <code_context>
485
791
  ## Existing Code Insights
486
792
 
@@ -509,6 +815,12 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
509
815
 
510
816
  [Ideas that came up but belong in other phases. Don't lose them.]
511
817
 
818
+ ### Reviewed Todos (not folded)
819
+ [If any todos were reviewed in cross_reference_todos but not folded into scope,
820
+ list them here so future phases know they were considered.
821
+ Each entry: todo title + reason it was deferred (out of scope, belongs in Phase Y, etc.)
822
+ If no reviewed-but-deferred todos: omit this subsection entirely.]
823
+
512
824
  [If none: "None — discussion stayed within phase scope"]
513
825
 
514
826
  </deferred>
@@ -542,18 +854,19 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
542
854
 
543
855
  ---
544
856
 
545
- ## Next Up
857
+ ## Next Up
546
858
 
547
859
  **Phase ${PHASE}: [Name]** — [Goal from ROADMAP.md]
548
860
 
549
- `/gsd:plan-phase ${PHASE}`
861
+ `/ccp:plan-phase ${PHASE}`
550
862
 
551
863
  <sub>`/clear` first → fresh context window</sub>
552
864
 
553
865
  ---
554
866
 
555
867
  **Also available:**
556
- - `/gsd:plan-phase ${PHASE} --skip-research` — plan without research
868
+ - `/ccp:plan-phase ${PHASE} --skip-research` — plan without research
869
+ - `/ccp:ui-phase ${PHASE}` — generate UI design contract before planning (if phase has frontend work)
557
870
  - Review/edit CONTEXT.md before continuing
558
871
 
559
872
  ---
@@ -561,10 +874,54 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
561
874
  </step>
562
875
 
563
876
  <step name="git_commit">
564
- Commit phase context (uses `commit_docs` from init internally):
877
+ **Write DISCUSSION-LOG.md before committing:**
878
+
879
+ **File location:** `${phase_dir}/${padded_phase}-DISCUSSION-LOG.md`
880
+
881
+ ```markdown
882
+ # Phase [X]: [Name] - Discussion Log
883
+
884
+ > **Audit trail only.** Do not use as input to planning, research, or execution agents.
885
+ > Decisions are captured in CONTEXT.md — this log preserves the alternatives considered.
886
+
887
+ **Date:** [ISO date]
888
+ **Phase:** [phase number]-[phase name]
889
+ **Areas discussed:** [comma-separated list]
890
+
891
+ ---
892
+
893
+ [For each gray area discussed:]
894
+
895
+ ## [Area Name]
896
+
897
+ | Option | Description | Selected |
898
+ |--------|-------------|----------|
899
+ | [Option 1] | [Description from AskUserQuestion] | |
900
+ | [Option 2] | [Description] | ✓ |
901
+ | [Option 3] | [Description] | |
902
+
903
+ **User's choice:** [Selected option or free-text response]
904
+ **Notes:** [Any clarifications, follow-up context, or rationale the user provided]
905
+
906
+ ---
907
+
908
+ [Repeat for each area]
909
+
910
+ ## Claude's Discretion
911
+
912
+ [List areas where user said "you decide" or deferred to Claude]
913
+
914
+ ## Deferred Ideas
915
+
916
+ [Ideas mentioned during discussion that were noted for future phases]
917
+ ```
918
+
919
+ Write file.
920
+
921
+ Commit phase context and discussion log:
565
922
 
566
923
  ```bash
567
- node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs(${padded_phase}): capture phase context" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
924
+ node "$HOME/.claude/pilot/bin/ccp-tools.cjs" commit "docs(${padded_phase}): capture phase context" --files "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
568
925
  ```
569
926
 
570
927
  Confirm: "Committed: docs(${padded_phase}): capture phase context"
@@ -574,7 +931,7 @@ Confirm: "Committed: docs(${padded_phase}): capture phase context"
574
931
  Update STATE.md with session info:
575
932
 
576
933
  ```bash
577
- node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state record-session \
934
+ node "$HOME/.claude/pilot/bin/ccp-tools.cjs" state record-session \
578
935
  --stopped-at "Phase ${PHASE} context gathered" \
579
936
  --resume-file "${phase_dir}/${padded_phase}-CONTEXT.md"
580
937
  ```
@@ -582,7 +939,7 @@ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state record-session \
582
939
  Commit STATE.md:
583
940
 
584
941
  ```bash
585
- node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
942
+ node "$HOME/.claude/pilot/bin/ccp-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
586
943
  ```
587
944
  </step>
588
945
 
@@ -593,18 +950,18 @@ Check for auto-advance trigger:
593
950
  2. **Sync chain flag with intent** — if user invoked manually (no `--auto`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
594
951
  ```bash
595
952
  if [[ ! "$ARGUMENTS" =~ --auto ]]; then
596
- node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
953
+ node "$HOME/.claude/pilot/bin/ccp-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
597
954
  fi
598
955
  ```
599
956
  3. Read both the chain flag and user preference:
600
957
  ```bash
601
- AUTO_CHAIN=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
602
- AUTO_CFG=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
958
+ AUTO_CHAIN=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
959
+ AUTO_CFG=$(node "$HOME/.claude/pilot/bin/ccp-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
603
960
  ```
604
961
 
605
962
  **If `--auto` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct `--auto` usage without new-project):
606
963
  ```bash
607
- node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
964
+ node "$HOME/.claude/pilot/bin/ccp-tools.cjs" config-set workflow._auto_chain_active true
608
965
  ```
609
966
 
610
967
  **If `--auto` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**
@@ -612,7 +969,7 @@ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_c
612
969
  Display banner:
613
970
  ```
614
971
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
615
- GSD ► AUTO-ADVANCING TO PLAN
972
+ Pilot ► AUTO-ADVANCING TO PLAN
616
973
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
617
974
 
618
975
  Context captured. Launching plan-phase...
@@ -620,7 +977,7 @@ Context captured. Launching plan-phase...
620
977
 
621
978
  Launch plan-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting — see #686):
622
979
  ```
623
- Skill(skill="gsd:plan-phase", args="${PHASE} --auto")
980
+ Skill(skill="ccp:plan-phase", args="${PHASE} --auto")
624
981
  ```
625
982
 
626
983
  This keeps the auto-advance chain flat — discuss, plan, and execute all run at the same nesting level rather than spawning increasingly deep Task agents.
@@ -629,28 +986,28 @@ This keeps the auto-advance chain flat — discuss, plan, and execute all run at
629
986
  - **PHASE COMPLETE** → Full chain succeeded. Display:
630
987
  ```
631
988
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
632
- GSD ► PHASE ${PHASE} COMPLETE
989
+ Pilot ► PHASE ${PHASE} COMPLETE
633
990
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
634
991
 
635
992
  Auto-advance pipeline finished: discuss → plan → execute
636
993
 
637
- Next: /gsd:discuss-phase ${NEXT_PHASE} --auto
994
+ Next: /ccp:discuss-phase ${NEXT_PHASE} --auto
638
995
  <sub>/clear first → fresh context window</sub>
639
996
  ```
640
997
  - **PLANNING COMPLETE** → Planning done, execution didn't complete:
641
998
  ```
642
999
  Auto-advance partial: Planning complete, execution did not finish.
643
- Continue: /gsd:execute-phase ${PHASE}
1000
+ Continue: /ccp:execute-phase ${PHASE}
644
1001
  ```
645
1002
  - **PLANNING INCONCLUSIVE / CHECKPOINT** → Stop chain:
646
1003
  ```
647
1004
  Auto-advance stopped: Planning needs input.
648
- Continue: /gsd:plan-phase ${PHASE}
1005
+ Continue: /ccp:plan-phase ${PHASE}
649
1006
  ```
650
1007
  - **GAPS FOUND** → Stop chain:
651
1008
  ```
652
1009
  Auto-advance stopped: Gaps found during execution.
653
- Continue: /gsd:plan-phase ${PHASE} --gaps
1010
+ Continue: /ccp:plan-phase ${PHASE} --gaps
654
1011
  ```
655
1012
 
656
1013
  **If neither `--auto` nor config enabled:**
@@ -669,6 +1026,7 @@ Route to `confirm_creation` step (existing behavior — show manual next steps).
669
1026
  - Each selected area explored until user satisfied (with code-informed and prior-decision-informed options)
670
1027
  - Scope creep redirected to deferred ideas
671
1028
  - CONTEXT.md captures actual decisions, not vague vision
1029
+ - CONTEXT.md includes canonical_refs section with full file paths to every spec/ADR/doc downstream agents need (MANDATORY — never omit)
672
1030
  - CONTEXT.md includes code_context section with reusable assets and patterns
673
1031
  - Deferred ideas preserved for future phases
674
1032
  - STATE.md updated with session info