claude-code-pilot 2.0.0 → 3.0.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.
- package/bin/install.js +267 -250
- package/manifest.json +5 -18
- package/package.json +5 -7
- package/src/agents/build-error-resolver.md +114 -0
- package/src/agents/ccp-advisor-researcher.md +104 -0
- package/src/agents/ccp-assumptions-analyzer.md +105 -0
- package/{gsd/agents/gsd-codebase-mapper.md → src/agents/ccp-codebase-mapper.md} +7 -7
- package/{gsd/agents/gsd-debugger.md → src/agents/ccp-debugger.md} +125 -8
- package/{gsd/agents/gsd-executor.md → src/agents/ccp-executor.md} +31 -20
- package/{gsd/agents/gsd-integration-checker.md → src/agents/ccp-integration-checker.md} +2 -2
- package/{gsd/agents/gsd-nyquist-auditor.md → src/agents/ccp-nyquist-auditor.md} +3 -3
- package/{gsd/agents/gsd-phase-researcher.md → src/agents/ccp-phase-researcher.md} +127 -13
- package/{gsd/agents/gsd-plan-checker.md → src/agents/ccp-plan-checker.md} +57 -21
- package/{gsd/agents/gsd-planner.md → src/agents/ccp-planner.md} +61 -23
- package/{gsd/agents/gsd-project-researcher.md → src/agents/ccp-project-researcher.md} +33 -6
- package/{gsd/agents/gsd-research-synthesizer.md → src/agents/ccp-research-synthesizer.md} +11 -11
- package/{gsd/agents/gsd-roadmapper.md → src/agents/ccp-roadmapper.md} +39 -10
- package/src/agents/ccp-ui-auditor.md +439 -0
- package/src/agents/ccp-ui-checker.md +300 -0
- package/src/agents/ccp-ui-researcher.md +357 -0
- package/{gsd/agents/gsd-verifier.md → src/agents/ccp-verifier.md} +81 -15
- package/src/agents/cpp-build-resolver.md +90 -0
- package/src/agents/cpp-reviewer.md +72 -0
- package/src/agents/database-reviewer.md +91 -0
- package/src/agents/docs-lookup.md +68 -0
- package/src/agents/flutter-reviewer.md +243 -0
- package/src/agents/go-build-resolver.md +94 -0
- package/src/agents/go-reviewer.md +76 -0
- package/src/agents/java-build-resolver.md +153 -0
- package/src/agents/java-reviewer.md +92 -0
- package/src/agents/kotlin-build-resolver.md +118 -0
- package/src/agents/kotlin-reviewer.md +159 -0
- package/src/agents/planner.md +212 -0
- package/src/agents/python-reviewer.md +98 -0
- package/src/agents/pytorch-build-resolver.md +120 -0
- package/src/agents/refactor-cleaner.md +85 -0
- package/src/agents/rust-build-resolver.md +148 -0
- package/src/agents/rust-reviewer.md +94 -0
- package/src/agents/typescript-reviewer.md +112 -0
- package/src/available-rules/README.md +80 -0
- package/src/available-rules/cpp/coding-style.md +44 -0
- package/src/available-rules/cpp/hooks.md +39 -0
- package/src/available-rules/cpp/patterns.md +51 -0
- package/src/available-rules/cpp/security.md +51 -0
- package/src/available-rules/cpp/testing.md +44 -0
- package/src/available-rules/csharp/coding-style.md +72 -0
- package/src/available-rules/csharp/hooks.md +25 -0
- package/src/available-rules/csharp/patterns.md +50 -0
- package/src/available-rules/csharp/security.md +58 -0
- package/src/available-rules/csharp/testing.md +46 -0
- package/src/available-rules/java/coding-style.md +114 -0
- package/src/available-rules/java/hooks.md +18 -0
- package/src/available-rules/java/patterns.md +146 -0
- package/src/available-rules/java/security.md +100 -0
- package/src/available-rules/java/testing.md +131 -0
- package/src/available-rules/kotlin/hooks.md +17 -0
- package/src/available-rules/rust/coding-style.md +151 -0
- package/src/available-rules/rust/hooks.md +16 -0
- package/src/available-rules/rust/patterns.md +168 -0
- package/src/available-rules/rust/security.md +141 -0
- package/src/available-rules/rust/testing.md +154 -0
- package/src/commands/aside.md +164 -0
- package/src/commands/build-fix.md +62 -0
- package/src/commands/ccp/add-backlog.md +76 -0
- package/{gsd/commands-gsd → src/commands/ccp}/add-phase.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/add-tests.md +5 -5
- package/{gsd/commands-gsd → src/commands/ccp}/add-todo.md +4 -4
- package/{gsd/commands-gsd → src/commands/ccp}/audit-milestone.md +3 -3
- package/src/commands/ccp/audit-uat.md +24 -0
- package/src/commands/ccp/autonomous.md +41 -0
- package/{gsd/commands-gsd → src/commands/ccp}/check-todos.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/cleanup.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/complete-milestone.md +9 -9
- package/{gsd/commands-gsd → src/commands/ccp}/debug.md +14 -9
- package/src/commands/ccp/discuss-phase.md +64 -0
- package/src/commands/ccp/do.md +30 -0
- package/src/commands/ccp/execute-phase.md +59 -0
- package/src/commands/ccp/fast.md +30 -0
- package/src/commands/ccp/forensics.md +56 -0
- package/{gsd/commands-gsd → src/commands/ccp}/health.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/help.md +5 -5
- package/{gsd/commands-gsd → src/commands/ccp}/insert-phase.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/list-phase-assumptions.md +2 -2
- package/src/commands/ccp/manager.md +39 -0
- package/{gsd/commands-gsd → src/commands/ccp}/map-codebase.md +7 -7
- package/src/commands/ccp/milestone-summary.md +51 -0
- package/{gsd/commands-gsd → src/commands/ccp}/new-milestone.md +8 -8
- package/{gsd/commands-gsd → src/commands/ccp}/new-project.md +8 -8
- package/src/commands/ccp/next.md +24 -0
- package/src/commands/ccp/note.md +34 -0
- package/{gsd/commands-gsd → src/commands/ccp}/pause-work.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/plan-milestone-gaps.md +5 -5
- package/{gsd/commands-gsd → src/commands/ccp}/plan-phase.md +9 -7
- package/src/commands/ccp/plant-seed.md +28 -0
- package/src/commands/ccp/pr-branch.md +25 -0
- package/{gsd/commands-gsd → src/commands/ccp}/progress.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/quick.md +10 -8
- package/{gsd/commands-gsd → src/commands/ccp}/remove-phase.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/research-phase.md +17 -12
- package/{gsd/commands-gsd → src/commands/ccp}/resume-work.md +3 -3
- package/src/commands/ccp/review-backlog.md +61 -0
- package/src/commands/ccp/session-report.md +19 -0
- package/src/commands/ccp/set-profile.md +12 -0
- package/{gsd/commands-gsd → src/commands/ccp}/settings.md +5 -5
- package/src/commands/ccp/ship.md +23 -0
- package/src/commands/ccp/stats.md +18 -0
- package/src/commands/ccp/thread.md +127 -0
- package/src/commands/ccp/ui-phase.md +34 -0
- package/src/commands/ccp/ui-review.md +32 -0
- package/{gsd/commands-gsd → src/commands/ccp}/update.md +5 -5
- package/{gsd/commands-gsd → src/commands/ccp}/validate-phase.md +3 -3
- package/{gsd/commands-gsd → src/commands/ccp}/verify-work.md +5 -5
- package/src/commands/code-review.md +40 -0
- package/src/commands/context-budget.md +29 -0
- package/src/commands/cpp-build.md +173 -0
- package/src/commands/cpp-review.md +132 -0
- package/src/commands/cpp-test.md +251 -0
- package/src/commands/docs.md +31 -0
- package/src/commands/e2e.md +364 -0
- package/src/commands/eval.md +120 -0
- package/{ecc → src}/commands/evolve.md +2 -2
- package/src/commands/go-build.md +183 -0
- package/src/commands/go-review.md +148 -0
- package/src/commands/go-test.md +268 -0
- package/src/commands/gradle-build.md +70 -0
- package/src/commands/harness-audit.md +71 -0
- package/src/commands/kotlin-build.md +174 -0
- package/src/commands/kotlin-review.md +140 -0
- package/src/commands/kotlin-test.md +312 -0
- package/src/commands/orchestrate.md +231 -0
- package/src/commands/plan.md +114 -0
- package/src/commands/prompt-optimize.md +38 -0
- package/src/commands/prune.md +25 -0
- package/src/commands/python-review.md +297 -0
- package/{ecc → src}/commands/quality-gate.md +1 -1
- package/src/commands/refactor-clean.md +80 -0
- package/src/commands/rules-distill.md +11 -0
- package/src/commands/rust-build.md +187 -0
- package/src/commands/rust-review.md +142 -0
- package/src/commands/rust-test.md +308 -0
- package/{ecc → src}/commands/sessions.md +10 -10
- package/src/commands/setup-pm.md +80 -0
- package/{kit → src}/commands/setup.md +45 -19
- package/src/commands/skill-create.md +172 -0
- package/src/commands/skill-health.md +51 -0
- package/src/commands/tdd.md +328 -0
- package/src/commands/test-coverage.md +69 -0
- package/src/commands/update-codemaps.md +72 -0
- package/src/commands/update-docs.md +84 -0
- package/{gsd/hooks/gsd-context-monitor.js → src/hooks/ccp-context-monitor.js} +3 -3
- package/src/hooks/ccp-prompt-guard.js +96 -0
- package/{gsd/hooks/gsd-statusline.js → src/hooks/ccp-statusline.js} +7 -7
- package/src/hooks/ccp-workflow-guard.js +94 -0
- package/src/hooks/config-protection.js +141 -0
- package/{kit → src}/hooks/kit-check-update.js +7 -4
- package/src/hooks/mcp-health-check.js +620 -0
- package/{ecc/scripts → src}/hooks/run-with-flags-shell.sh +1 -1
- package/{ecc/scripts → src}/hooks/run-with-flags.js +74 -13
- package/src/hooks/session-end-marker.js +29 -0
- package/{ecc/scripts → src}/hooks/session-end.js +83 -40
- package/{ecc/scripts → src}/hooks/session-start.js +75 -9
- package/{ecc/scripts → src}/lib/hook-flags.js +8 -4
- package/{ecc/scripts → src}/lib/project-detect.js +2 -1
- package/{ecc/scripts → src}/lib/session-manager.d.ts +5 -1
- package/{ecc/scripts → src}/lib/session-manager.js +202 -92
- package/{ecc/scripts → src}/lib/utils.d.ts +23 -1
- package/{ecc/scripts → src}/lib/utils.js +91 -3
- package/{gsd/get-shit-done/bin/gsd-tools.cjs → src/pilot/bin/ccp-tools.cjs} +257 -86
- package/{gsd/get-shit-done → src/pilot}/bin/lib/commands.cjs +1 -1
- package/src/pilot/bin/lib/config.cjs +444 -0
- package/src/pilot/bin/lib/core.cjs +1190 -0
- package/src/pilot/bin/lib/init.cjs +1281 -0
- package/src/pilot/bin/lib/model-profiles.cjs +67 -0
- package/{gsd/get-shit-done → src/pilot}/bin/lib/phase.cjs +2 -2
- package/src/pilot/bin/lib/security.cjs +382 -0
- package/{gsd/get-shit-done → src/pilot}/bin/lib/state.cjs +1 -1
- package/src/pilot/bin/lib/uat.cjs +282 -0
- package/{gsd/get-shit-done → src/pilot}/bin/lib/verify.cjs +10 -10
- package/{gsd/get-shit-done → src/pilot}/references/continuation-format.md +16 -16
- package/{gsd/get-shit-done → src/pilot}/references/decimal-phase-calculation.md +5 -5
- package/{gsd/get-shit-done → src/pilot}/references/git-integration.md +5 -5
- package/{gsd/get-shit-done → src/pilot}/references/git-planning-commit.md +4 -4
- package/src/pilot/references/mcp-servers.json +153 -0
- package/{gsd/get-shit-done → src/pilot}/references/model-profile-resolution.md +2 -2
- package/{gsd/get-shit-done → src/pilot}/references/model-profiles.md +20 -20
- package/{gsd/get-shit-done → src/pilot}/references/phase-argument-parsing.md +4 -4
- package/{gsd/get-shit-done → src/pilot}/references/planning-config.md +15 -15
- package/{gsd/get-shit-done → src/pilot}/references/ui-brand.md +5 -5
- package/{gsd/get-shit-done → src/pilot}/references/verification-patterns.md +1 -1
- package/{gsd/get-shit-done → src/pilot}/templates/DEBUG.md +1 -1
- package/{gsd/get-shit-done → src/pilot}/templates/UAT.md +3 -3
- package/src/pilot/templates/UI-SPEC.md +100 -0
- package/{gsd/get-shit-done → src/pilot}/templates/VALIDATION.md +1 -1
- package/src/pilot/templates/claude-md.md +122 -0
- package/{gsd/get-shit-done → src/pilot}/templates/codebase/architecture.md +2 -2
- package/{gsd/get-shit-done → src/pilot}/templates/codebase/structure.md +13 -13
- package/{gsd/get-shit-done → src/pilot}/templates/context.md +4 -4
- package/src/pilot/templates/copilot-instructions.md +7 -0
- package/{gsd/get-shit-done → src/pilot}/templates/debug-subagent-prompt.md +4 -4
- package/src/pilot/templates/dev-preferences.md +21 -0
- package/{gsd/get-shit-done → src/pilot}/templates/discovery.md +2 -2
- package/src/pilot/templates/discussion-log.md +63 -0
- package/{gsd/get-shit-done → src/pilot}/templates/phase-prompt.md +12 -12
- package/{gsd/get-shit-done → src/pilot}/templates/planner-subagent-prompt.md +7 -7
- package/{gsd/get-shit-done → src/pilot}/templates/project.md +1 -1
- package/{gsd/get-shit-done → src/pilot}/templates/research.md +2 -2
- package/{gsd/get-shit-done → src/pilot}/templates/state.md +2 -2
- package/{gsd/get-shit-done → src/pilot}/templates/summary-complex.md +1 -1
- package/{gsd/get-shit-done → src/pilot}/workflows/add-phase.md +11 -11
- package/{gsd/get-shit-done → src/pilot}/workflows/add-tests.md +15 -15
- package/{gsd/get-shit-done → src/pilot}/workflows/add-todo.md +7 -7
- package/{gsd/get-shit-done → src/pilot}/workflows/audit-milestone.md +24 -16
- package/src/pilot/workflows/audit-uat.md +109 -0
- package/src/pilot/workflows/autonomous.md +891 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/check-todos.md +10 -10
- package/{gsd/get-shit-done → src/pilot}/workflows/cleanup.md +3 -3
- package/{gsd/get-shit-done → src/pilot}/workflows/complete-milestone.md +19 -16
- package/{gsd/get-shit-done → src/pilot}/workflows/diagnose-issues.md +9 -4
- package/{gsd/get-shit-done → src/pilot}/workflows/discovery-phase.md +8 -8
- package/src/pilot/workflows/discuss-phase-assumptions.md +653 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/discuss-phase.md +407 -49
- package/src/pilot/workflows/do.md +104 -0
- package/src/pilot/workflows/execute-phase.md +821 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/execute-plan.md +79 -28
- package/src/pilot/workflows/fast.md +105 -0
- package/src/pilot/workflows/forensics.md +265 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/health.md +34 -11
- package/src/pilot/workflows/help.md +775 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/insert-phase.md +10 -10
- package/{gsd/get-shit-done → src/pilot}/workflows/list-phase-assumptions.md +4 -4
- package/src/pilot/workflows/manager.md +362 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/map-codebase.md +27 -17
- package/src/pilot/workflows/milestone-summary.md +223 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/new-milestone.md +135 -33
- package/{gsd/get-shit-done → src/pilot}/workflows/new-project.md +152 -79
- package/src/pilot/workflows/next.md +97 -0
- package/src/pilot/workflows/node-repair.md +92 -0
- package/src/pilot/workflows/note.md +156 -0
- package/src/pilot/workflows/pause-work.md +177 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/plan-milestone-gaps.md +10 -11
- package/src/pilot/workflows/plan-phase.md +859 -0
- package/src/pilot/workflows/plant-seed.md +169 -0
- package/src/pilot/workflows/pr-branch.md +129 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/progress.md +95 -34
- package/{gsd/get-shit-done → src/pilot}/workflows/quick.md +33 -21
- package/{gsd/get-shit-done → src/pilot}/workflows/remove-phase.md +14 -14
- package/{gsd/get-shit-done → src/pilot}/workflows/research-phase.md +18 -10
- package/{gsd/get-shit-done → src/pilot}/workflows/resume-project.md +37 -18
- package/src/pilot/workflows/session-report.md +146 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/set-profile.md +7 -7
- package/{gsd/get-shit-done → src/pilot}/workflows/settings.md +75 -22
- package/src/pilot/workflows/ship.md +228 -0
- package/src/pilot/workflows/stats.md +60 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/transition.md +57 -17
- package/src/pilot/workflows/ui-phase.md +302 -0
- package/src/pilot/workflows/ui-review.md +165 -0
- package/{gsd/get-shit-done → src/pilot}/workflows/update.md +88 -58
- package/{gsd/get-shit-done → src/pilot}/workflows/validate-phase.md +24 -17
- package/{gsd/get-shit-done → src/pilot}/workflows/verify-phase.md +26 -15
- package/{gsd/get-shit-done → src/pilot}/workflows/verify-work.md +89 -37
- package/{ecc → src}/rules/common/agents.md +1 -0
- package/{ecc → src}/rules/common/coding-style.md +21 -0
- package/src/skills/agentic-engineering/SKILL.md +63 -0
- package/src/skills/ai-first-engineering/SKILL.md +51 -0
- package/src/skills/ai-regression-testing/SKILL.md +385 -0
- package/src/skills/api-design/SKILL.md +523 -0
- package/src/skills/architecture-decision-records/SKILL.md +179 -0
- package/src/skills/backend-patterns/SKILL.md +598 -0
- package/src/skills/benchmark/SKILL.md +87 -0
- package/src/skills/blueprint/SKILL.md +90 -0
- package/src/skills/browser-qa/SKILL.md +81 -0
- package/src/skills/claude-api/SKILL.md +337 -0
- package/src/skills/codebase-onboarding/SKILL.md +233 -0
- package/src/skills/coding-standards/SKILL.md +530 -0
- package/src/skills/context-budget/SKILL.md +135 -0
- package/{ecc → src}/skills/continuous-learning-v2/SKILL.md +2 -2
- package/{ecc → src}/skills/continuous-learning-v2/agents/observer-loop.sh +1 -1
- package/src/skills/cpp-coding-standards/SKILL.md +723 -0
- package/src/skills/cpp-testing/SKILL.md +324 -0
- package/src/skills/database-migrations/SKILL.md +429 -0
- package/src/skills/deep-research/SKILL.md +155 -0
- package/src/skills/deployment-patterns/SKILL.md +427 -0
- package/src/skills/django-patterns/SKILL.md +734 -0
- package/src/skills/django-security/SKILL.md +593 -0
- package/src/skills/django-tdd/SKILL.md +729 -0
- package/src/skills/django-verification/SKILL.md +469 -0
- package/src/skills/docker-patterns/SKILL.md +364 -0
- package/src/skills/documentation-lookup/SKILL.md +90 -0
- package/src/skills/e2e-testing/SKILL.md +326 -0
- package/src/skills/exa-search/SKILL.md +103 -0
- package/src/skills/frontend-patterns/SKILL.md +642 -0
- package/src/skills/golang-patterns/SKILL.md +674 -0
- package/src/skills/golang-testing/SKILL.md +720 -0
- package/src/skills/java-coding-standards/SKILL.md +147 -0
- package/src/skills/jpa-patterns/SKILL.md +151 -0
- package/src/skills/kotlin-coroutines-flows/SKILL.md +284 -0
- package/src/skills/kotlin-exposed-patterns/SKILL.md +719 -0
- package/src/skills/kotlin-ktor-patterns/SKILL.md +689 -0
- package/src/skills/kotlin-patterns/SKILL.md +711 -0
- package/src/skills/kotlin-testing/SKILL.md +824 -0
- package/src/skills/laravel-patterns/SKILL.md +415 -0
- package/src/skills/laravel-security/SKILL.md +285 -0
- package/src/skills/laravel-tdd/SKILL.md +283 -0
- package/src/skills/laravel-verification/SKILL.md +179 -0
- package/src/skills/mcp-server-patterns/SKILL.md +67 -0
- package/src/skills/perl-patterns/SKILL.md +504 -0
- package/src/skills/perl-testing/SKILL.md +475 -0
- package/src/skills/postgres-patterns/SKILL.md +147 -0
- package/src/skills/prompt-optimizer/SKILL.md +397 -0
- package/src/skills/python-patterns/SKILL.md +750 -0
- package/src/skills/python-testing/SKILL.md +816 -0
- package/src/skills/rust-patterns/SKILL.md +499 -0
- package/src/skills/rust-testing/SKILL.md +500 -0
- package/src/skills/safety-guard/SKILL.md +69 -0
- package/src/skills/search-first/SKILL.md +161 -0
- package/src/skills/security-review/SKILL.md +495 -0
- package/src/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/src/skills/security-scan/SKILL.md +165 -0
- package/src/skills/springboot-patterns/SKILL.md +314 -0
- package/src/skills/springboot-security/SKILL.md +272 -0
- package/src/skills/springboot-tdd/SKILL.md +158 -0
- package/src/skills/springboot-verification/SKILL.md +231 -0
- package/src/skills/tdd-workflow/SKILL.md +410 -0
- package/ecc/scripts/hooks/session-end-marker.js +0 -15
- package/gsd/LICENSE +0 -21
- package/gsd/commands-gsd/discuss-phase.md +0 -90
- package/gsd/commands-gsd/execute-phase.md +0 -41
- package/gsd/commands-gsd/join-discord.md +0 -18
- package/gsd/commands-gsd/reapply-patches.md +0 -123
- package/gsd/commands-gsd/set-profile.md +0 -34
- package/gsd/get-shit-done/bin/lib/config.cjs +0 -169
- package/gsd/get-shit-done/bin/lib/core.cjs +0 -492
- package/gsd/get-shit-done/bin/lib/init.cjs +0 -710
- package/gsd/get-shit-done/workflows/execute-phase.md +0 -459
- package/gsd/get-shit-done/workflows/help.md +0 -489
- package/gsd/get-shit-done/workflows/pause-work.md +0 -122
- package/gsd/get-shit-done/workflows/plan-phase.md +0 -560
- package/gsd/hooks/gsd-check-update.js +0 -81
- package/kit/CLAUDE.md +0 -43
- package/kit/commands/kit/update.md +0 -46
- package/kit/mcp.json +0 -10
- package/kit/rules/code-style.md +0 -24
- /package/{ecc → src}/agents/architect.md +0 -0
- /package/{ecc → src}/agents/code-reviewer.md +0 -0
- /package/{ecc → src}/agents/doc-updater.md +0 -0
- /package/{ecc → src}/agents/e2e-runner.md +0 -0
- /package/{ecc → src}/agents/security-reviewer.md +0 -0
- /package/{ecc → src}/agents/tdd-guide.md +0 -0
- /package/{ecc/rules → src/available-rules}/golang/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/golang/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/golang/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/golang/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/golang/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/kotlin/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/kotlin/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/kotlin/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/kotlin/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/perl/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/perl/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/perl/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/perl/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/perl/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/php/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/php/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/php/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/php/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/php/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/python/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/python/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/python/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/python/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/python/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/swift/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/swift/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/swift/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/swift/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/swift/testing.md +0 -0
- /package/{ecc/rules → src/available-rules}/typescript/coding-style.md +0 -0
- /package/{ecc/rules → src/available-rules}/typescript/hooks.md +0 -0
- /package/{ecc/rules → src/available-rules}/typescript/patterns.md +0 -0
- /package/{ecc/rules → src/available-rules}/typescript/security.md +0 -0
- /package/{ecc/rules → src/available-rules}/typescript/testing.md +0 -0
- /package/{ecc → src}/commands/checkpoint.md +0 -0
- /package/{ecc → src}/commands/learn.md +0 -0
- /package/{ecc → src}/commands/model-route.md +0 -0
- /package/{ecc → src}/commands/resume-session.md +0 -0
- /package/{ecc → src}/commands/save-session.md +0 -0
- /package/{kit → src}/commands/setup-refresh.md +0 -0
- /package/{kit → src}/commands/tool-guide.md +0 -0
- /package/{ecc → src}/commands/verify.md +0 -0
- /package/{ecc → src}/contexts/dev.md +0 -0
- /package/{ecc → src}/contexts/research.md +0 -0
- /package/{ecc → src}/contexts/review.md +0 -0
- /package/{ecc → src}/examples/CLAUDE.md +0 -0
- /package/{ecc → src}/examples/django-api-CLAUDE.md +0 -0
- /package/{ecc → src}/examples/go-microservice-CLAUDE.md +0 -0
- /package/{ecc → src}/examples/rust-api-CLAUDE.md +0 -0
- /package/{ecc → src}/examples/saas-nextjs-CLAUDE.md +0 -0
- /package/{ecc → src}/examples/user-CLAUDE.md +0 -0
- /package/{ecc/scripts → src}/hooks/check-hook-enabled.js +0 -0
- /package/{ecc/scripts → src}/hooks/evaluate-session.js +0 -0
- /package/{ecc/scripts → src}/hooks/pre-compact.js +0 -0
- /package/{ecc/scripts → src}/hooks/suggest-compact.js +0 -0
- /package/{ecc/scripts → src}/lib/package-manager.d.ts +0 -0
- /package/{ecc/scripts → src}/lib/package-manager.js +0 -0
- /package/{ecc/scripts → src}/lib/resolve-formatter.js +0 -0
- /package/{ecc/scripts → src}/lib/session-aliases.d.ts +0 -0
- /package/{ecc/scripts → src}/lib/session-aliases.js +0 -0
- /package/{ecc/scripts → src}/lib/shell-split.js +0 -0
- /package/{gsd/get-shit-done → src/pilot}/bin/lib/frontmatter.cjs +0 -0
- /package/{gsd/get-shit-done → src/pilot}/bin/lib/milestone.cjs +0 -0
- /package/{gsd/get-shit-done → src/pilot}/bin/lib/roadmap.cjs +0 -0
- /package/{gsd/get-shit-done → src/pilot}/bin/lib/template.cjs +0 -0
- /package/{gsd/get-shit-done → src/pilot}/references/checkpoints.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/references/questioning.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/references/tdd.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/codebase/concerns.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/codebase/conventions.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/codebase/integrations.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/codebase/stack.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/codebase/testing.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/config.json +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/continue-here.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/milestone-archive.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/milestone.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/requirements.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/research-project/ARCHITECTURE.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/research-project/FEATURES.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/research-project/PITFALLS.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/research-project/STACK.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/research-project/SUMMARY.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/retrospective.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/roadmap.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/summary-minimal.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/summary-standard.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/summary.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/user-setup.md +0 -0
- /package/{gsd/get-shit-done → src/pilot}/templates/verification-report.md +0 -0
- /package/{ecc → src}/rules/common/development-workflow.md +0 -0
- /package/{ecc → src}/rules/common/git-workflow.md +0 -0
- /package/{ecc → src}/rules/common/hooks.md +0 -0
- /package/{ecc → src}/rules/common/patterns.md +0 -0
- /package/{ecc → src}/rules/common/performance.md +0 -0
- /package/{ecc → src}/rules/common/security.md +0 -0
- /package/{ecc → src}/rules/common/testing.md +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/agents/observer.md +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/agents/start-observer.sh +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/config.json +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/hooks/observe.sh +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/scripts/detect-project.sh +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/scripts/instinct-cli.py +0 -0
- /package/{ecc → src}/skills/continuous-learning-v2/scripts/test_parse_instinct.py +0 -0
- /package/{ecc → src}/skills/strategic-compact/SKILL.md +0 -0
- /package/{ecc → src}/skills/strategic-compact/suggest-compact.sh +0 -0
- /package/{ecc/skills/verification-loop-SKILL.md → src/skills/verification-loop/SKILL.md} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* CCP Tools — CLI utility for CCP workflow operations
|
|
5
5
|
*
|
|
6
|
-
* Replaces repetitive inline bash patterns across ~50
|
|
6
|
+
* Replaces repetitive inline bash patterns across ~50 CCP command/workflow/agent files.
|
|
7
7
|
* Centralizes: config parsing, model resolution, phase lookup, git commits, summary verification.
|
|
8
8
|
*
|
|
9
|
-
* Usage: node
|
|
9
|
+
* Usage: node ccp-tools.cjs <command> [args] [--raw] [--pick <field>]
|
|
10
10
|
*
|
|
11
11
|
* Atomic Commands:
|
|
12
12
|
* state load Load project config + state
|
|
@@ -14,15 +14,21 @@
|
|
|
14
14
|
* state update <field> <value> Update a STATE.md field
|
|
15
15
|
* state get [section] Get STATE.md content or section
|
|
16
16
|
* state patch --field val ... Batch update STATE.md fields
|
|
17
|
+
* state begin-phase --phase N --name S --plans C Update STATE.md for new phase start
|
|
18
|
+
* state signal-waiting --type T --question Q --options "A|B" --phase P Write WAITING.json signal
|
|
19
|
+
* state signal-resume Remove WAITING.json signal
|
|
17
20
|
* resolve-model <agent-type> Get model for agent based on profile
|
|
18
21
|
* find-phase <phase> Find phase directory by number
|
|
19
|
-
* commit <message> [--files f1 f2] Commit planning docs
|
|
22
|
+
* commit <message> [--files f1 f2] [--no-verify] Commit planning docs
|
|
20
23
|
* verify-summary <path> Verify a SUMMARY.md file
|
|
21
24
|
* generate-slug <text> Convert text to URL-safe slug
|
|
22
25
|
* current-timestamp [format] Get timestamp (full|date|filename)
|
|
23
26
|
* list-todos [area] Count and enumerate pending todos
|
|
24
27
|
* verify-path-exists <path> Check file/directory existence
|
|
25
28
|
* config-ensure-section Initialize .planning/config.json
|
|
29
|
+
* config-new-project [choices-json] Create config.json for new project
|
|
30
|
+
* config-set-model-profile <profile> Set model profile
|
|
31
|
+
* agent-skills <agent-type> Output agent skills block
|
|
26
32
|
* history-digest Aggregate all SUMMARY.md data
|
|
27
33
|
* summary-extract <path> [--fields] Extract structured data from SUMMARY.md
|
|
28
34
|
* state-snapshot Structured parse of STATE.md
|
|
@@ -32,7 +38,7 @@
|
|
|
32
38
|
*
|
|
33
39
|
* Phase Operations:
|
|
34
40
|
* phase next-decimal <phase> Calculate next decimal phase number
|
|
35
|
-
* phase add <description>
|
|
41
|
+
* phase add <description> [--id ID] Append new phase to roadmap + create dir
|
|
36
42
|
* phase insert <after> <description> Insert decimal phase after existing
|
|
37
43
|
* phase remove <phase> [--force] Remove phase, renumber all subsequent
|
|
38
44
|
* phase complete <phase> Mark phase done, update state + roadmap
|
|
@@ -54,6 +60,7 @@
|
|
|
54
60
|
* Validation:
|
|
55
61
|
* validate consistency Check phase numbering, disk/roadmap sync
|
|
56
62
|
* validate health [--repair] Check .planning/ integrity, optionally repair
|
|
63
|
+
* validate agents Check CCP agent installation status
|
|
57
64
|
*
|
|
58
65
|
* Progress:
|
|
59
66
|
* progress [json|table|bar] Render progress in various formats
|
|
@@ -61,6 +68,10 @@
|
|
|
61
68
|
* Todos:
|
|
62
69
|
* todo complete <filename> Move todo from pending to completed
|
|
63
70
|
*
|
|
71
|
+
* UAT Audit:
|
|
72
|
+
* audit-uat Scan all phases for unresolved UAT/verification items
|
|
73
|
+
* uat render-checkpoint --file <path> Render the current UAT checkpoint block
|
|
74
|
+
*
|
|
64
75
|
* Scaffolding:
|
|
65
76
|
* scaffold context --phase <N> Create CONTEXT.md template
|
|
66
77
|
* scaffold uat --phase <N> Create UAT.md template
|
|
@@ -124,11 +135,13 @@
|
|
|
124
135
|
* init milestone-op All context for milestone operations
|
|
125
136
|
* init map-codebase All context for map-codebase workflow
|
|
126
137
|
* init progress All context for progress workflow
|
|
138
|
+
* init manager Full dashboard with phase status and actions
|
|
127
139
|
*/
|
|
128
140
|
|
|
129
141
|
const fs = require('fs');
|
|
130
142
|
const path = require('path');
|
|
131
|
-
const
|
|
143
|
+
const core = require('./lib/core.cjs');
|
|
144
|
+
const { error, findProjectRoot } = core;
|
|
132
145
|
const state = require('./lib/state.cjs');
|
|
133
146
|
const phase = require('./lib/phase.cjs');
|
|
134
147
|
const roadmap = require('./lib/roadmap.cjs');
|
|
@@ -140,6 +153,46 @@ const commands = require('./lib/commands.cjs');
|
|
|
140
153
|
const init = require('./lib/init.cjs');
|
|
141
154
|
const frontmatter = require('./lib/frontmatter.cjs');
|
|
142
155
|
|
|
156
|
+
// ─── Arg parsing helpers ──────────────────────────────────────────────────────
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Extract named --flag <value> pairs from an args array.
|
|
160
|
+
* Returns an object mapping flag names to their values (null if absent).
|
|
161
|
+
* Flags listed in `booleanFlags` are treated as boolean (no value consumed).
|
|
162
|
+
*
|
|
163
|
+
* parseNamedArgs(args, 'phase', 'plan') -> { phase: '3', plan: '1' }
|
|
164
|
+
* parseNamedArgs(args, [], ['amend', 'force']) -> { amend: true, force: false }
|
|
165
|
+
*/
|
|
166
|
+
function parseNamedArgs(args, valueFlags = [], booleanFlags = []) {
|
|
167
|
+
const result = {};
|
|
168
|
+
for (const flag of valueFlags) {
|
|
169
|
+
const idx = args.indexOf(`--${flag}`);
|
|
170
|
+
result[flag] = idx !== -1 && args[idx + 1] !== undefined && !args[idx + 1].startsWith('--')
|
|
171
|
+
? args[idx + 1]
|
|
172
|
+
: null;
|
|
173
|
+
}
|
|
174
|
+
for (const flag of booleanFlags) {
|
|
175
|
+
result[flag] = args.includes(`--${flag}`);
|
|
176
|
+
}
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Collect all tokens after --flag until the next --flag or end of args.
|
|
182
|
+
* Handles multi-word values like --name Foo Bar Version 1.
|
|
183
|
+
* Returns null if the flag is absent.
|
|
184
|
+
*/
|
|
185
|
+
function parseMultiwordArg(args, flag) {
|
|
186
|
+
const idx = args.indexOf(`--${flag}`);
|
|
187
|
+
if (idx === -1) return null;
|
|
188
|
+
const tokens = [];
|
|
189
|
+
for (let i = idx + 1; i < args.length; i++) {
|
|
190
|
+
if (args[i].startsWith('--')) break;
|
|
191
|
+
tokens.push(args[i]);
|
|
192
|
+
}
|
|
193
|
+
return tokens.length > 0 ? tokens.join(' ') : null;
|
|
194
|
+
}
|
|
195
|
+
|
|
143
196
|
// ─── CLI Router ───────────────────────────────────────────────────────────────
|
|
144
197
|
|
|
145
198
|
async function main() {
|
|
@@ -165,16 +218,110 @@ async function main() {
|
|
|
165
218
|
error(`Invalid --cwd: ${cwd}`);
|
|
166
219
|
}
|
|
167
220
|
|
|
221
|
+
// Resolve worktree root: in a linked worktree, .planning/ lives in the main worktree.
|
|
222
|
+
// However, in monorepo worktrees where the subdirectory itself owns .planning/,
|
|
223
|
+
// skip worktree resolution — the CWD is already the correct project root.
|
|
224
|
+
const { resolveWorktreeRoot } = require('./lib/core.cjs');
|
|
225
|
+
if (!fs.existsSync(path.join(cwd, '.planning'))) {
|
|
226
|
+
const worktreeRoot = resolveWorktreeRoot(cwd);
|
|
227
|
+
if (worktreeRoot !== cwd) {
|
|
228
|
+
cwd = worktreeRoot;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
168
232
|
const rawIndex = args.indexOf('--raw');
|
|
169
233
|
const raw = rawIndex !== -1;
|
|
170
234
|
if (rawIndex !== -1) args.splice(rawIndex, 1);
|
|
171
235
|
|
|
236
|
+
// --pick <name>: extract a single field from JSON output (replaces jq dependency).
|
|
237
|
+
// Supports dot-notation (e.g., --pick workflow.research) and bracket notation
|
|
238
|
+
// for arrays (e.g., --pick directories[-1]).
|
|
239
|
+
const pickIdx = args.indexOf('--pick');
|
|
240
|
+
let pickField = null;
|
|
241
|
+
if (pickIdx !== -1) {
|
|
242
|
+
pickField = args[pickIdx + 1];
|
|
243
|
+
if (!pickField || pickField.startsWith('--')) error('Missing value for --pick');
|
|
244
|
+
args.splice(pickIdx, 2);
|
|
245
|
+
}
|
|
246
|
+
|
|
172
247
|
const command = args[0];
|
|
173
248
|
|
|
174
249
|
if (!command) {
|
|
175
|
-
error('Usage:
|
|
250
|
+
error('Usage: ccp-tools <command> [args] [--raw] [--pick <field>] [--cwd <path>]\nCommands: state, resolve-model, find-phase, commit, verify-summary, verify, frontmatter, template, generate-slug, current-timestamp, list-todos, verify-path-exists, config-ensure-section, config-new-project, config-set-model-profile, agent-skills, init');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Multi-repo guard: resolve project root for commands that read/write .planning/.
|
|
254
|
+
// Skip for pure-utility commands that don't touch .planning/ to avoid unnecessary
|
|
255
|
+
// filesystem traversal on every invocation.
|
|
256
|
+
const SKIP_ROOT_RESOLUTION = new Set([
|
|
257
|
+
'generate-slug', 'current-timestamp', 'verify-path-exists',
|
|
258
|
+
'verify-summary', 'template', 'frontmatter',
|
|
259
|
+
]);
|
|
260
|
+
if (!SKIP_ROOT_RESOLUTION.has(command)) {
|
|
261
|
+
cwd = findProjectRoot(cwd);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// When --pick is active, intercept stdout to extract the requested field.
|
|
265
|
+
if (pickField) {
|
|
266
|
+
const origWriteSync = fs.writeSync;
|
|
267
|
+
const chunks = [];
|
|
268
|
+
fs.writeSync = function (fd, data, ...rest) {
|
|
269
|
+
if (fd === 1) { chunks.push(String(data)); return; }
|
|
270
|
+
return origWriteSync.call(fs, fd, data, ...rest);
|
|
271
|
+
};
|
|
272
|
+
const cleanup = () => {
|
|
273
|
+
fs.writeSync = origWriteSync;
|
|
274
|
+
const captured = chunks.join('');
|
|
275
|
+
let jsonStr = captured;
|
|
276
|
+
if (jsonStr.startsWith('@file:')) {
|
|
277
|
+
jsonStr = fs.readFileSync(jsonStr.slice(6), 'utf-8');
|
|
278
|
+
}
|
|
279
|
+
try {
|
|
280
|
+
const obj = JSON.parse(jsonStr);
|
|
281
|
+
const value = extractField(obj, pickField);
|
|
282
|
+
const result = value === null || value === undefined ? '' : String(value);
|
|
283
|
+
origWriteSync.call(fs, 1, result);
|
|
284
|
+
} catch {
|
|
285
|
+
origWriteSync.call(fs, 1, captured);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
try {
|
|
289
|
+
await runCommand(command, args, cwd, raw);
|
|
290
|
+
cleanup();
|
|
291
|
+
} catch (e) {
|
|
292
|
+
fs.writeSync = origWriteSync;
|
|
293
|
+
throw e;
|
|
294
|
+
}
|
|
295
|
+
return;
|
|
176
296
|
}
|
|
177
297
|
|
|
298
|
+
await runCommand(command, args, cwd, raw);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Extract a field from an object using dot-notation and bracket syntax.
|
|
303
|
+
* Supports: 'field', 'parent.child', 'arr[-1]', 'arr[0]'
|
|
304
|
+
*/
|
|
305
|
+
function extractField(obj, fieldPath) {
|
|
306
|
+
const parts = fieldPath.split('.');
|
|
307
|
+
let current = obj;
|
|
308
|
+
for (const part of parts) {
|
|
309
|
+
if (current === null || current === undefined) return undefined;
|
|
310
|
+
const bracketMatch = part.match(/^(.+?)\[(-?\d+)]$/);
|
|
311
|
+
if (bracketMatch) {
|
|
312
|
+
const key = bracketMatch[1];
|
|
313
|
+
const index = parseInt(bracketMatch[2], 10);
|
|
314
|
+
current = current[key];
|
|
315
|
+
if (!Array.isArray(current)) return undefined;
|
|
316
|
+
current = index < 0 ? current[current.length + index] : current[index];
|
|
317
|
+
} else {
|
|
318
|
+
current = current[part];
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return current;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
async function runCommand(command, args, cwd, raw) {
|
|
178
325
|
switch (command) {
|
|
179
326
|
case 'state': {
|
|
180
327
|
const subcommand = args[1];
|
|
@@ -197,50 +344,29 @@ async function main() {
|
|
|
197
344
|
} else if (subcommand === 'advance-plan') {
|
|
198
345
|
state.cmdStateAdvancePlan(cwd, raw);
|
|
199
346
|
} else if (subcommand === 'record-metric') {
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
const durationIdx = args.indexOf('--duration');
|
|
203
|
-
const tasksIdx = args.indexOf('--tasks');
|
|
204
|
-
const filesIdx = args.indexOf('--files');
|
|
205
|
-
state.cmdStateRecordMetric(cwd, {
|
|
206
|
-
phase: phaseIdx !== -1 ? args[phaseIdx + 1] : null,
|
|
207
|
-
plan: planIdx !== -1 ? args[planIdx + 1] : null,
|
|
208
|
-
duration: durationIdx !== -1 ? args[durationIdx + 1] : null,
|
|
209
|
-
tasks: tasksIdx !== -1 ? args[tasksIdx + 1] : null,
|
|
210
|
-
files: filesIdx !== -1 ? args[filesIdx + 1] : null,
|
|
211
|
-
}, raw);
|
|
347
|
+
const { phase: p, plan, duration, tasks, files } = parseNamedArgs(args, ['phase', 'plan', 'duration', 'tasks', 'files']);
|
|
348
|
+
state.cmdStateRecordMetric(cwd, { phase: p, plan, duration, tasks, files }, raw);
|
|
212
349
|
} else if (subcommand === 'update-progress') {
|
|
213
350
|
state.cmdStateUpdateProgress(cwd, raw);
|
|
214
351
|
} else if (subcommand === 'add-decision') {
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
const summaryFileIdx = args.indexOf('--summary-file');
|
|
218
|
-
const rationaleIdx = args.indexOf('--rationale');
|
|
219
|
-
const rationaleFileIdx = args.indexOf('--rationale-file');
|
|
220
|
-
state.cmdStateAddDecision(cwd, {
|
|
221
|
-
phase: phaseIdx !== -1 ? args[phaseIdx + 1] : null,
|
|
222
|
-
summary: summaryIdx !== -1 ? args[summaryIdx + 1] : null,
|
|
223
|
-
summary_file: summaryFileIdx !== -1 ? args[summaryFileIdx + 1] : null,
|
|
224
|
-
rationale: rationaleIdx !== -1 ? args[rationaleIdx + 1] : '',
|
|
225
|
-
rationale_file: rationaleFileIdx !== -1 ? args[rationaleFileIdx + 1] : null,
|
|
226
|
-
}, raw);
|
|
352
|
+
const { phase: p, summary, 'summary-file': summary_file, rationale, 'rationale-file': rationale_file } = parseNamedArgs(args, ['phase', 'summary', 'summary-file', 'rationale', 'rationale-file']);
|
|
353
|
+
state.cmdStateAddDecision(cwd, { phase: p, summary, summary_file, rationale: rationale || '', rationale_file }, raw);
|
|
227
354
|
} else if (subcommand === 'add-blocker') {
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
state.cmdStateAddBlocker(cwd, {
|
|
231
|
-
text: textIdx !== -1 ? args[textIdx + 1] : null,
|
|
232
|
-
text_file: textFileIdx !== -1 ? args[textFileIdx + 1] : null,
|
|
233
|
-
}, raw);
|
|
355
|
+
const { text, 'text-file': text_file } = parseNamedArgs(args, ['text', 'text-file']);
|
|
356
|
+
state.cmdStateAddBlocker(cwd, { text, text_file }, raw);
|
|
234
357
|
} else if (subcommand === 'resolve-blocker') {
|
|
235
|
-
|
|
236
|
-
state.cmdStateResolveBlocker(cwd, textIdx !== -1 ? args[textIdx + 1] : null, raw);
|
|
358
|
+
state.cmdStateResolveBlocker(cwd, parseNamedArgs(args, ['text']).text, raw);
|
|
237
359
|
} else if (subcommand === 'record-session') {
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
360
|
+
const { 'stopped-at': stopped_at, 'resume-file': resume_file } = parseNamedArgs(args, ['stopped-at', 'resume-file']);
|
|
361
|
+
state.cmdStateRecordSession(cwd, { stopped_at, resume_file: resume_file || 'None' }, raw);
|
|
362
|
+
} else if (subcommand === 'begin-phase') {
|
|
363
|
+
const { phase: p, name, plans } = parseNamedArgs(args, ['phase', 'name', 'plans']);
|
|
364
|
+
state.cmdStateBeginPhase(cwd, p, name, plans !== null ? parseInt(plans, 10) : null, raw);
|
|
365
|
+
} else if (subcommand === 'signal-waiting') {
|
|
366
|
+
const { type, question, options, phase: p } = parseNamedArgs(args, ['type', 'question', 'options', 'phase']);
|
|
367
|
+
state.cmdSignalWaiting(cwd, type, question, options, p, raw);
|
|
368
|
+
} else if (subcommand === 'signal-resume') {
|
|
369
|
+
state.cmdSignalResume(cwd, raw);
|
|
244
370
|
} else {
|
|
245
371
|
state.cmdStateLoad(cwd, raw);
|
|
246
372
|
}
|
|
@@ -259,6 +385,7 @@ async function main() {
|
|
|
259
385
|
|
|
260
386
|
case 'commit': {
|
|
261
387
|
const amend = args.includes('--amend');
|
|
388
|
+
const noVerify = args.includes('--no-verify');
|
|
262
389
|
const filesIndex = args.indexOf('--files');
|
|
263
390
|
// Collect all positional args between command name and first flag,
|
|
264
391
|
// then join them — handles both quoted ("multi word msg") and
|
|
@@ -267,7 +394,7 @@ async function main() {
|
|
|
267
394
|
const messageArgs = args.slice(1, endIndex).filter(a => !a.startsWith('--'));
|
|
268
395
|
const message = messageArgs.join(' ') || undefined;
|
|
269
396
|
const files = filesIndex !== -1 ? args.slice(filesIndex + 1).filter(a => !a.startsWith('--')) : [];
|
|
270
|
-
commands.cmdCommit(cwd, message, files, raw, amend);
|
|
397
|
+
commands.cmdCommit(cwd, message, files, raw, amend, noVerify);
|
|
271
398
|
break;
|
|
272
399
|
}
|
|
273
400
|
|
|
@@ -285,19 +412,18 @@ async function main() {
|
|
|
285
412
|
template.cmdTemplateSelect(cwd, args[2], raw);
|
|
286
413
|
} else if (subcommand === 'fill') {
|
|
287
414
|
const templateType = args[2];
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
415
|
+
const { phase: phaseArg, plan, name, type, wave, fields: fieldsRaw } = parseNamedArgs(args, ['phase', 'plan', 'name', 'type', 'wave', 'fields']);
|
|
416
|
+
let fields = {};
|
|
417
|
+
if (fieldsRaw) {
|
|
418
|
+
const { safeJsonParse } = require('./lib/security.cjs');
|
|
419
|
+
const result = safeJsonParse(fieldsRaw, { label: '--fields' });
|
|
420
|
+
if (!result.ok) error(result.error);
|
|
421
|
+
fields = result.value;
|
|
422
|
+
}
|
|
294
423
|
template.cmdTemplateFill(cwd, templateType, {
|
|
295
|
-
phase:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
type: typeIdx !== -1 ? args[typeIdx + 1] : 'execute',
|
|
299
|
-
wave: waveIdx !== -1 ? args[waveIdx + 1] : '1',
|
|
300
|
-
fields: fieldsIdx !== -1 ? JSON.parse(args[fieldsIdx + 1]) : {},
|
|
424
|
+
phase: phaseArg, plan, name, fields,
|
|
425
|
+
type: type || 'execute',
|
|
426
|
+
wave: wave || '1',
|
|
301
427
|
}, raw);
|
|
302
428
|
} else {
|
|
303
429
|
error('Unknown template subcommand. Available: select, fill');
|
|
@@ -309,18 +435,14 @@ async function main() {
|
|
|
309
435
|
const subcommand = args[1];
|
|
310
436
|
const file = args[2];
|
|
311
437
|
if (subcommand === 'get') {
|
|
312
|
-
|
|
313
|
-
frontmatter.cmdFrontmatterGet(cwd, file, fieldIdx !== -1 ? args[fieldIdx + 1] : null, raw);
|
|
438
|
+
frontmatter.cmdFrontmatterGet(cwd, file, parseNamedArgs(args, ['field']).field, raw);
|
|
314
439
|
} else if (subcommand === 'set') {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
frontmatter.cmdFrontmatterSet(cwd, file, fieldIdx !== -1 ? args[fieldIdx + 1] : null, valueIdx !== -1 ? args[valueIdx + 1] : undefined, raw);
|
|
440
|
+
const { field, value } = parseNamedArgs(args, ['field', 'value']);
|
|
441
|
+
frontmatter.cmdFrontmatterSet(cwd, file, field, value !== null ? value : undefined, raw);
|
|
318
442
|
} else if (subcommand === 'merge') {
|
|
319
|
-
|
|
320
|
-
frontmatter.cmdFrontmatterMerge(cwd, file, dataIdx !== -1 ? args[dataIdx + 1] : null, raw);
|
|
443
|
+
frontmatter.cmdFrontmatterMerge(cwd, file, parseNamedArgs(args, ['data']).data, raw);
|
|
321
444
|
} else if (subcommand === 'validate') {
|
|
322
|
-
|
|
323
|
-
frontmatter.cmdFrontmatterValidate(cwd, file, schemaIdx !== -1 ? args[schemaIdx + 1] : null, raw);
|
|
445
|
+
frontmatter.cmdFrontmatterValidate(cwd, file, parseNamedArgs(args, ['schema']).schema, raw);
|
|
324
446
|
} else {
|
|
325
447
|
error('Unknown frontmatter subcommand. Available: get, set, merge, validate');
|
|
326
448
|
}
|
|
@@ -377,11 +499,26 @@ async function main() {
|
|
|
377
499
|
break;
|
|
378
500
|
}
|
|
379
501
|
|
|
502
|
+
case 'config-set-model-profile': {
|
|
503
|
+
config.cmdConfigSetModelProfile(cwd, args[1], raw);
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
|
|
380
507
|
case 'config-get': {
|
|
381
508
|
config.cmdConfigGet(cwd, args[1], raw);
|
|
382
509
|
break;
|
|
383
510
|
}
|
|
384
511
|
|
|
512
|
+
case 'config-new-project': {
|
|
513
|
+
config.cmdConfigNewProject(cwd, args[1], raw);
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
case 'agent-skills': {
|
|
518
|
+
init.cmdAgentSkills(cwd, args[1], raw);
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
|
|
385
522
|
case 'history-digest': {
|
|
386
523
|
commands.cmdHistoryDigest(cwd, raw);
|
|
387
524
|
break;
|
|
@@ -433,7 +570,18 @@ async function main() {
|
|
|
433
570
|
if (subcommand === 'next-decimal') {
|
|
434
571
|
phase.cmdPhaseNextDecimal(cwd, args[2], raw);
|
|
435
572
|
} else if (subcommand === 'add') {
|
|
436
|
-
|
|
573
|
+
const idIdx = args.indexOf('--id');
|
|
574
|
+
let customId = null;
|
|
575
|
+
const descArgs = [];
|
|
576
|
+
for (let i = 2; i < args.length; i++) {
|
|
577
|
+
if (args[i] === '--id' && i + 1 < args.length) {
|
|
578
|
+
customId = args[i + 1];
|
|
579
|
+
i++; // skip value
|
|
580
|
+
} else {
|
|
581
|
+
descArgs.push(args[i]);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
phase.cmdPhaseAdd(cwd, descArgs.join(' '), raw, customId);
|
|
437
585
|
} else if (subcommand === 'insert') {
|
|
438
586
|
phase.cmdPhaseInsert(cwd, args[2], args.slice(3).join(' '), raw);
|
|
439
587
|
} else if (subcommand === 'remove') {
|
|
@@ -450,18 +598,8 @@ async function main() {
|
|
|
450
598
|
case 'milestone': {
|
|
451
599
|
const subcommand = args[1];
|
|
452
600
|
if (subcommand === 'complete') {
|
|
453
|
-
const
|
|
601
|
+
const milestoneName = parseMultiwordArg(args, 'name');
|
|
454
602
|
const archivePhases = args.includes('--archive-phases');
|
|
455
|
-
// Collect --name value (everything after --name until next flag or end)
|
|
456
|
-
let milestoneName = null;
|
|
457
|
-
if (nameIndex !== -1) {
|
|
458
|
-
const nameArgs = [];
|
|
459
|
-
for (let i = nameIndex + 1; i < args.length; i++) {
|
|
460
|
-
if (args[i].startsWith('--')) break;
|
|
461
|
-
nameArgs.push(args[i]);
|
|
462
|
-
}
|
|
463
|
-
milestoneName = nameArgs.join(' ') || null;
|
|
464
|
-
}
|
|
465
603
|
milestone.cmdMilestoneComplete(cwd, args[2], { name: milestoneName, archivePhases }, raw);
|
|
466
604
|
} else {
|
|
467
605
|
error('Unknown milestone subcommand. Available: complete');
|
|
@@ -476,8 +614,10 @@ async function main() {
|
|
|
476
614
|
} else if (subcommand === 'health') {
|
|
477
615
|
const repairFlag = args.includes('--repair');
|
|
478
616
|
verify.cmdValidateHealth(cwd, { repair: repairFlag }, raw);
|
|
617
|
+
} else if (subcommand === 'agents') {
|
|
618
|
+
verify.cmdValidateAgents(cwd, raw);
|
|
479
619
|
} else {
|
|
480
|
-
error('Unknown validate subcommand. Available: consistency, health');
|
|
620
|
+
error('Unknown validate subcommand. Available: consistency, health, agents');
|
|
481
621
|
}
|
|
482
622
|
break;
|
|
483
623
|
}
|
|
@@ -488,23 +628,51 @@ async function main() {
|
|
|
488
628
|
break;
|
|
489
629
|
}
|
|
490
630
|
|
|
631
|
+
case 'audit-uat': {
|
|
632
|
+
try {
|
|
633
|
+
const uat = require('./lib/uat.cjs');
|
|
634
|
+
uat.cmdAuditUat(cwd, raw);
|
|
635
|
+
} catch {
|
|
636
|
+
const { output } = require('./lib/core.cjs');
|
|
637
|
+
output({ error: 'uat module not available' }, raw, 'uat module not available');
|
|
638
|
+
}
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
case 'uat': {
|
|
643
|
+
const subcommand = args[1];
|
|
644
|
+
try {
|
|
645
|
+
const uat = require('./lib/uat.cjs');
|
|
646
|
+
if (subcommand === 'render-checkpoint') {
|
|
647
|
+
const options = parseNamedArgs(args, ['file']);
|
|
648
|
+
uat.cmdRenderCheckpoint(cwd, options, raw);
|
|
649
|
+
} else {
|
|
650
|
+
error('Unknown uat subcommand. Available: render-checkpoint');
|
|
651
|
+
}
|
|
652
|
+
} catch {
|
|
653
|
+
const { output } = require('./lib/core.cjs');
|
|
654
|
+
output({ error: 'uat module not available' }, raw, 'uat module not available');
|
|
655
|
+
}
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
|
|
491
659
|
case 'todo': {
|
|
492
660
|
const subcommand = args[1];
|
|
493
661
|
if (subcommand === 'complete') {
|
|
494
662
|
commands.cmdTodoComplete(cwd, args[2], raw);
|
|
663
|
+
} else if (subcommand === 'match-phase') {
|
|
664
|
+
commands.cmdTodoMatchPhase(cwd, args[2], raw);
|
|
495
665
|
} else {
|
|
496
|
-
error('Unknown todo subcommand. Available: complete');
|
|
666
|
+
error('Unknown todo subcommand. Available: complete, match-phase');
|
|
497
667
|
}
|
|
498
668
|
break;
|
|
499
669
|
}
|
|
500
670
|
|
|
501
671
|
case 'scaffold': {
|
|
502
672
|
const scaffoldType = args[1];
|
|
503
|
-
const phaseIndex = args.indexOf('--phase');
|
|
504
|
-
const nameIndex = args.indexOf('--name');
|
|
505
673
|
const scaffoldOptions = {
|
|
506
|
-
phase:
|
|
507
|
-
name:
|
|
674
|
+
phase: parseNamedArgs(args, ['phase']).phase,
|
|
675
|
+
name: parseMultiwordArg(args, 'name'),
|
|
508
676
|
};
|
|
509
677
|
commands.cmdScaffold(cwd, scaffoldType, scaffoldOptions, raw);
|
|
510
678
|
break;
|
|
@@ -549,8 +717,11 @@ async function main() {
|
|
|
549
717
|
case 'progress':
|
|
550
718
|
init.cmdInitProgress(cwd, raw);
|
|
551
719
|
break;
|
|
720
|
+
case 'manager':
|
|
721
|
+
init.cmdInitManager(cwd, raw);
|
|
722
|
+
break;
|
|
552
723
|
default:
|
|
553
|
-
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress`);
|
|
724
|
+
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress, manager`);
|
|
554
725
|
}
|
|
555
726
|
break;
|
|
556
727
|
}
|
|
@@ -492,7 +492,7 @@ function cmdScaffold(cwd, type, options, raw) {
|
|
|
492
492
|
switch (type) {
|
|
493
493
|
case 'context': {
|
|
494
494
|
filePath = path.join(phaseDir, `${padded}-CONTEXT.md`);
|
|
495
|
-
content = `---\nphase: "${padded}"\nname: "${name || phaseInfo?.phase_name || 'Unnamed'}"\ncreated: ${today}\n---\n\n# Phase ${phase}: ${name || phaseInfo?.phase_name || 'Unnamed'} — Context\n\n## Decisions\n\n_Decisions will be captured during /
|
|
495
|
+
content = `---\nphase: "${padded}"\nname: "${name || phaseInfo?.phase_name || 'Unnamed'}"\ncreated: ${today}\n---\n\n# Phase ${phase}: ${name || phaseInfo?.phase_name || 'Unnamed'} — Context\n\n## Decisions\n\n_Decisions will be captured during /ccp:discuss-phase ${phase}_\n\n## Discretion Areas\n\n_Areas where the executor can use judgment_\n\n## Deferred Ideas\n\n_Ideas to consider later_\n`;
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
498
498
|
case 'uat': {
|