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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-create
|
|
3
|
+
description: Analyze local git history to extract coding patterns and generate SKILL.md files. Local version of the Skill Creator GitHub App.
|
|
4
|
+
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /skill-create - Local Skill Generation
|
|
8
|
+
|
|
9
|
+
Analyze your repository's git history to extract coding patterns and generate SKILL.md files that teach Claude your team's practices.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/skill-create # Analyze current repo
|
|
15
|
+
/skill-create --commits 100 # Analyze last 100 commits
|
|
16
|
+
/skill-create --output ./skills # Custom output directory
|
|
17
|
+
/skill-create --instincts # Also generate instincts for continuous-learning-v2
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What It Does
|
|
21
|
+
|
|
22
|
+
1. **Parses Git History** - Analyzes commits, file changes, and patterns
|
|
23
|
+
2. **Detects Patterns** - Identifies recurring workflows and conventions
|
|
24
|
+
3. **Generates SKILL.md** - Creates valid Claude Code skill files
|
|
25
|
+
4. **Optionally Creates Instincts** - For the continuous-learning-v2 system
|
|
26
|
+
|
|
27
|
+
## Analysis Steps
|
|
28
|
+
|
|
29
|
+
### Step 1: Gather Git Data
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Get recent commits with file changes
|
|
33
|
+
git log --oneline -n ${COMMITS:-200} --name-only --pretty=format:"%H|%s|%ad" --date=short
|
|
34
|
+
|
|
35
|
+
# Get commit frequency by file
|
|
36
|
+
git log --oneline -n 200 --name-only | grep -v "^$" | grep -v "^[a-f0-9]" | sort | uniq -c | sort -rn | head -20
|
|
37
|
+
|
|
38
|
+
# Get commit message patterns
|
|
39
|
+
git log --oneline -n 200 | cut -d' ' -f2- | head -50
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 2: Detect Patterns
|
|
43
|
+
|
|
44
|
+
Look for these pattern types:
|
|
45
|
+
|
|
46
|
+
| Pattern | Detection Method |
|
|
47
|
+
|---------|-----------------|
|
|
48
|
+
| **Commit conventions** | Regex on commit messages (feat:, fix:, chore:) |
|
|
49
|
+
| **File co-changes** | Files that always change together |
|
|
50
|
+
| **Workflow sequences** | Repeated file change patterns |
|
|
51
|
+
| **Architecture** | Folder structure and naming conventions |
|
|
52
|
+
| **Testing patterns** | Test file locations, naming, coverage |
|
|
53
|
+
|
|
54
|
+
### Step 3: Generate SKILL.md
|
|
55
|
+
|
|
56
|
+
Output format:
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
---
|
|
60
|
+
name: {repo-name}-patterns
|
|
61
|
+
description: Coding patterns extracted from {repo-name}
|
|
62
|
+
version: 1.0.0
|
|
63
|
+
source: local-git-analysis
|
|
64
|
+
analyzed_commits: {count}
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
# {Repo Name} Patterns
|
|
68
|
+
|
|
69
|
+
## Commit Conventions
|
|
70
|
+
{detected commit message patterns}
|
|
71
|
+
|
|
72
|
+
## Code Architecture
|
|
73
|
+
{detected folder structure and organization}
|
|
74
|
+
|
|
75
|
+
## Workflows
|
|
76
|
+
{detected repeating file change patterns}
|
|
77
|
+
|
|
78
|
+
## Testing Patterns
|
|
79
|
+
{detected test conventions}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 4: Generate Instincts (if --instincts)
|
|
83
|
+
|
|
84
|
+
For continuous-learning-v2 integration:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
---
|
|
88
|
+
id: {repo}-commit-convention
|
|
89
|
+
trigger: "when writing a commit message"
|
|
90
|
+
confidence: 0.8
|
|
91
|
+
domain: git
|
|
92
|
+
source: local-repo-analysis
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
# Use Conventional Commits
|
|
96
|
+
|
|
97
|
+
## Action
|
|
98
|
+
Prefix commits with: feat:, fix:, chore:, docs:, test:, refactor:
|
|
99
|
+
|
|
100
|
+
## Evidence
|
|
101
|
+
- Analyzed {n} commits
|
|
102
|
+
- {percentage}% follow conventional commit format
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Example Output
|
|
106
|
+
|
|
107
|
+
Running `/skill-create` on a TypeScript project might produce:
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
---
|
|
111
|
+
name: my-app-patterns
|
|
112
|
+
description: Coding patterns from my-app repository
|
|
113
|
+
version: 1.0.0
|
|
114
|
+
source: local-git-analysis
|
|
115
|
+
analyzed_commits: 150
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# My App Patterns
|
|
119
|
+
|
|
120
|
+
## Commit Conventions
|
|
121
|
+
|
|
122
|
+
This project uses **conventional commits**:
|
|
123
|
+
- `feat:` - New features
|
|
124
|
+
- `fix:` - Bug fixes
|
|
125
|
+
- `chore:` - Maintenance tasks
|
|
126
|
+
- `docs:` - Documentation updates
|
|
127
|
+
|
|
128
|
+
## Code Architecture
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
src/
|
|
132
|
+
├── components/ # React components (PascalCase.tsx)
|
|
133
|
+
├── hooks/ # Custom hooks (use*.ts)
|
|
134
|
+
├── utils/ # Utility functions
|
|
135
|
+
├── types/ # TypeScript type definitions
|
|
136
|
+
└── services/ # API and external services
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Workflows
|
|
140
|
+
|
|
141
|
+
### Adding a New Component
|
|
142
|
+
1. Create `src/components/ComponentName.tsx`
|
|
143
|
+
2. Add tests in `src/components/__tests__/ComponentName.test.tsx`
|
|
144
|
+
3. Export from `src/components/index.ts`
|
|
145
|
+
|
|
146
|
+
### Database Migration
|
|
147
|
+
1. Modify `src/db/schema.ts`
|
|
148
|
+
2. Run `pnpm db:generate`
|
|
149
|
+
3. Run `pnpm db:migrate`
|
|
150
|
+
|
|
151
|
+
## Testing Patterns
|
|
152
|
+
|
|
153
|
+
- Test files: `__tests__/` directories or `.test.ts` suffix
|
|
154
|
+
- Coverage target: 80%+
|
|
155
|
+
- Framework: Vitest
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## GitHub App Integration
|
|
159
|
+
|
|
160
|
+
For advanced features (10k+ commits, team sharing, auto-PRs), use the [Skill Creator GitHub App](https://github.com/apps/skill-creator):
|
|
161
|
+
|
|
162
|
+
- Install: [github.com/apps/skill-creator](https://github.com/apps/skill-creator)
|
|
163
|
+
- Comment `/skill-creator analyze` on any issue
|
|
164
|
+
- Receives PR with generated skills
|
|
165
|
+
|
|
166
|
+
## Related Commands
|
|
167
|
+
|
|
168
|
+
- `/instinct-import` - Import generated instincts
|
|
169
|
+
- `/instinct-status` - View learned instincts
|
|
170
|
+
- `/evolve` - Cluster instincts into skills/agents
|
|
171
|
+
|
|
172
|
+
---
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-health
|
|
3
|
+
description: Show skill portfolio health dashboard with charts and analytics
|
|
4
|
+
command: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Health Dashboard
|
|
8
|
+
|
|
9
|
+
Shows a comprehensive health dashboard for all skills in the portfolio with success rate sparklines, failure pattern clustering, pending amendments, and version history.
|
|
10
|
+
|
|
11
|
+
## Implementation
|
|
12
|
+
|
|
13
|
+
Run the skill health CLI in dashboard mode:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node ~/.claude/scripts/skills-health.js --dashboard
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For a specific panel only:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
node ~/.claude/scripts/skills-health.js --dashboard --panel failures
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For machine-readable output:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node ~/.claude/scripts/skills-health.js --dashboard --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
/skill-health # Full dashboard view
|
|
35
|
+
/skill-health --panel failures # Only failure clustering panel
|
|
36
|
+
/skill-health --json # Machine-readable JSON output
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## What to Do
|
|
40
|
+
|
|
41
|
+
1. Run the skills-health.js script with --dashboard flag
|
|
42
|
+
2. Display the output to the user
|
|
43
|
+
3. If any skills are declining, highlight them and suggest running /evolve
|
|
44
|
+
4. If there are pending amendments, suggest reviewing them
|
|
45
|
+
|
|
46
|
+
## Panels
|
|
47
|
+
|
|
48
|
+
- **Success Rate (30d)** -- Sparkline charts showing daily success rates per skill
|
|
49
|
+
- **Failure Patterns** -- Clustered failure reasons with horizontal bar chart
|
|
50
|
+
- **Pending Amendments** -- Amendment proposals awaiting review
|
|
51
|
+
- **Version History** -- Timeline of version snapshots per skill
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce test-driven development workflow. Scaffold interfaces, generate tests FIRST, then implement minimal code to pass. Ensure 80%+ coverage.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# TDD Command
|
|
6
|
+
|
|
7
|
+
This command invokes the **tdd-guide** agent to enforce test-driven development methodology.
|
|
8
|
+
|
|
9
|
+
## What This Command Does
|
|
10
|
+
|
|
11
|
+
1. **Scaffold Interfaces** - Define types/interfaces first
|
|
12
|
+
2. **Generate Tests First** - Write failing tests (RED)
|
|
13
|
+
3. **Implement Minimal Code** - Write just enough to pass (GREEN)
|
|
14
|
+
4. **Refactor** - Improve code while keeping tests green (REFACTOR)
|
|
15
|
+
5. **Verify Coverage** - Ensure 80%+ test coverage
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
Use `/tdd` when:
|
|
20
|
+
- Implementing new features
|
|
21
|
+
- Adding new functions/components
|
|
22
|
+
- Fixing bugs (write test that reproduces bug first)
|
|
23
|
+
- Refactoring existing code
|
|
24
|
+
- Building critical business logic
|
|
25
|
+
|
|
26
|
+
## How It Works
|
|
27
|
+
|
|
28
|
+
The tdd-guide agent will:
|
|
29
|
+
|
|
30
|
+
1. **Define interfaces** for inputs/outputs
|
|
31
|
+
2. **Write tests that will FAIL** (because code doesn't exist yet)
|
|
32
|
+
3. **Run tests** and verify they fail for the right reason
|
|
33
|
+
4. **Write minimal implementation** to make tests pass
|
|
34
|
+
5. **Run tests** and verify they pass
|
|
35
|
+
6. **Refactor** code while keeping tests green
|
|
36
|
+
7. **Check coverage** and add more tests if below 80%
|
|
37
|
+
|
|
38
|
+
## TDD Cycle
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
RED → GREEN → REFACTOR → REPEAT
|
|
42
|
+
|
|
43
|
+
RED: Write a failing test
|
|
44
|
+
GREEN: Write minimal code to pass
|
|
45
|
+
REFACTOR: Improve code, keep tests passing
|
|
46
|
+
REPEAT: Next feature/scenario
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Example Usage
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
User: /tdd I need a function to calculate market liquidity score
|
|
53
|
+
|
|
54
|
+
Agent (tdd-guide):
|
|
55
|
+
# TDD Session: Market Liquidity Score Calculator
|
|
56
|
+
|
|
57
|
+
## Step 1: Define Interface (SCAFFOLD)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// lib/liquidity.ts
|
|
61
|
+
export interface MarketData {
|
|
62
|
+
totalVolume: number
|
|
63
|
+
bidAskSpread: number
|
|
64
|
+
activeTraders: number
|
|
65
|
+
lastTradeTime: Date
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function calculateLiquidityScore(market: MarketData): number {
|
|
69
|
+
// TODO: Implementation
|
|
70
|
+
throw new Error('Not implemented')
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Step 2: Write Failing Test (RED)
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// lib/liquidity.test.ts
|
|
78
|
+
import { calculateLiquidityScore } from './liquidity'
|
|
79
|
+
|
|
80
|
+
describe('calculateLiquidityScore', () => {
|
|
81
|
+
it('should return high score for liquid market', () => {
|
|
82
|
+
const market = {
|
|
83
|
+
totalVolume: 100000,
|
|
84
|
+
bidAskSpread: 0.01,
|
|
85
|
+
activeTraders: 500,
|
|
86
|
+
lastTradeTime: new Date()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const score = calculateLiquidityScore(market)
|
|
90
|
+
|
|
91
|
+
expect(score).toBeGreaterThan(80)
|
|
92
|
+
expect(score).toBeLessThanOrEqual(100)
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
it('should return low score for illiquid market', () => {
|
|
96
|
+
const market = {
|
|
97
|
+
totalVolume: 100,
|
|
98
|
+
bidAskSpread: 0.5,
|
|
99
|
+
activeTraders: 2,
|
|
100
|
+
lastTradeTime: new Date(Date.now() - 86400000) // 1 day ago
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const score = calculateLiquidityScore(market)
|
|
104
|
+
|
|
105
|
+
expect(score).toBeLessThan(30)
|
|
106
|
+
expect(score).toBeGreaterThanOrEqual(0)
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
it('should handle edge case: zero volume', () => {
|
|
110
|
+
const market = {
|
|
111
|
+
totalVolume: 0,
|
|
112
|
+
bidAskSpread: 0,
|
|
113
|
+
activeTraders: 0,
|
|
114
|
+
lastTradeTime: new Date()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const score = calculateLiquidityScore(market)
|
|
118
|
+
|
|
119
|
+
expect(score).toBe(0)
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Step 3: Run Tests - Verify FAIL
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm test lib/liquidity.test.ts
|
|
128
|
+
|
|
129
|
+
FAIL lib/liquidity.test.ts
|
|
130
|
+
✕ should return high score for liquid market (2 ms)
|
|
131
|
+
Error: Not implemented
|
|
132
|
+
|
|
133
|
+
1 test failed, 0 passed
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
✅ Tests fail as expected. Ready to implement.
|
|
137
|
+
|
|
138
|
+
## Step 4: Implement Minimal Code (GREEN)
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// lib/liquidity.ts
|
|
142
|
+
export function calculateLiquidityScore(market: MarketData): number {
|
|
143
|
+
// Handle zero volume edge case
|
|
144
|
+
if (market.totalVolume === 0) {
|
|
145
|
+
return 0
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Calculate component scores (0-100 scale)
|
|
149
|
+
const volumeScore = Math.min(market.totalVolume / 1000, 100)
|
|
150
|
+
const spreadScore = Math.max(100 - (market.bidAskSpread * 1000), 0)
|
|
151
|
+
const traderScore = Math.min(market.activeTraders / 10, 100)
|
|
152
|
+
|
|
153
|
+
// Recent activity bonus
|
|
154
|
+
const hoursSinceLastTrade = (Date.now() - market.lastTradeTime.getTime()) / (1000 * 60 * 60)
|
|
155
|
+
const recencyScore = Math.max(100 - (hoursSinceLastTrade * 10), 0)
|
|
156
|
+
|
|
157
|
+
// Weighted average
|
|
158
|
+
const score = (
|
|
159
|
+
volumeScore * 0.4 +
|
|
160
|
+
spreadScore * 0.3 +
|
|
161
|
+
traderScore * 0.2 +
|
|
162
|
+
recencyScore * 0.1
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
return Math.min(Math.max(score, 0), 100) // Clamp to 0-100
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Step 5: Run Tests - Verify PASS
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm test lib/liquidity.test.ts
|
|
173
|
+
|
|
174
|
+
PASS lib/liquidity.test.ts
|
|
175
|
+
✓ should return high score for liquid market (3 ms)
|
|
176
|
+
✓ should return low score for illiquid market (2 ms)
|
|
177
|
+
✓ should handle edge case: zero volume (1 ms)
|
|
178
|
+
|
|
179
|
+
3 tests passed
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
✅ All tests passing!
|
|
183
|
+
|
|
184
|
+
## Step 6: Refactor (IMPROVE)
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// lib/liquidity.ts - Refactored with constants and better readability
|
|
188
|
+
const WEIGHTS = {
|
|
189
|
+
VOLUME: 0.4,
|
|
190
|
+
SPREAD: 0.3,
|
|
191
|
+
TRADERS: 0.2,
|
|
192
|
+
RECENCY: 0.1,
|
|
193
|
+
} as const
|
|
194
|
+
|
|
195
|
+
const SCALE_FACTORS = {
|
|
196
|
+
VOLUME: 1000,
|
|
197
|
+
SPREAD: 1000,
|
|
198
|
+
TRADERS: 10,
|
|
199
|
+
RECENCY_PENALTY: 10,
|
|
200
|
+
} as const
|
|
201
|
+
|
|
202
|
+
function clamp(value: number, min: number, max: number): number {
|
|
203
|
+
return Math.min(Math.max(value, min), max)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function calculateLiquidityScore(market: MarketData): number {
|
|
207
|
+
if (market.totalVolume === 0) return 0
|
|
208
|
+
|
|
209
|
+
const volumeScore = Math.min(market.totalVolume / SCALE_FACTORS.VOLUME, 100)
|
|
210
|
+
const spreadScore = clamp(100 - (market.bidAskSpread * SCALE_FACTORS.SPREAD), 0, 100)
|
|
211
|
+
const traderScore = Math.min(market.activeTraders / SCALE_FACTORS.TRADERS, 100)
|
|
212
|
+
|
|
213
|
+
const hoursSinceLastTrade = (Date.now() - market.lastTradeTime.getTime()) / (1000 * 60 * 60)
|
|
214
|
+
const recencyScore = clamp(100 - (hoursSinceLastTrade * SCALE_FACTORS.RECENCY_PENALTY), 0, 100)
|
|
215
|
+
|
|
216
|
+
const weightedScore =
|
|
217
|
+
volumeScore * WEIGHTS.VOLUME +
|
|
218
|
+
spreadScore * WEIGHTS.SPREAD +
|
|
219
|
+
traderScore * WEIGHTS.TRADERS +
|
|
220
|
+
recencyScore * WEIGHTS.RECENCY
|
|
221
|
+
|
|
222
|
+
return clamp(weightedScore, 0, 100)
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Step 7: Verify Tests Still Pass
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npm test lib/liquidity.test.ts
|
|
230
|
+
|
|
231
|
+
PASS lib/liquidity.test.ts
|
|
232
|
+
✓ should return high score for liquid market (3 ms)
|
|
233
|
+
✓ should return low score for illiquid market (2 ms)
|
|
234
|
+
✓ should handle edge case: zero volume (1 ms)
|
|
235
|
+
|
|
236
|
+
3 tests passed
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
✅ Refactoring complete, tests still passing!
|
|
240
|
+
|
|
241
|
+
## Step 8: Check Coverage
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
npm test -- --coverage lib/liquidity.test.ts
|
|
245
|
+
|
|
246
|
+
File | % Stmts | % Branch | % Funcs | % Lines
|
|
247
|
+
---------------|---------|----------|---------|--------
|
|
248
|
+
liquidity.ts | 100 | 100 | 100 | 100
|
|
249
|
+
|
|
250
|
+
Coverage: 100% ✅ (Target: 80%)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
✅ TDD session complete!
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## TDD Best Practices
|
|
257
|
+
|
|
258
|
+
**DO:**
|
|
259
|
+
- ✅ Write the test FIRST, before any implementation
|
|
260
|
+
- ✅ Run tests and verify they FAIL before implementing
|
|
261
|
+
- ✅ Write minimal code to make tests pass
|
|
262
|
+
- ✅ Refactor only after tests are green
|
|
263
|
+
- ✅ Add edge cases and error scenarios
|
|
264
|
+
- ✅ Aim for 80%+ coverage (100% for critical code)
|
|
265
|
+
|
|
266
|
+
**DON'T:**
|
|
267
|
+
- ❌ Write implementation before tests
|
|
268
|
+
- ❌ Skip running tests after each change
|
|
269
|
+
- ❌ Write too much code at once
|
|
270
|
+
- ❌ Ignore failing tests
|
|
271
|
+
- ❌ Test implementation details (test behavior)
|
|
272
|
+
- ❌ Mock everything (prefer integration tests)
|
|
273
|
+
|
|
274
|
+
## Test Types to Include
|
|
275
|
+
|
|
276
|
+
**Unit Tests** (Function-level):
|
|
277
|
+
- Happy path scenarios
|
|
278
|
+
- Edge cases (empty, null, max values)
|
|
279
|
+
- Error conditions
|
|
280
|
+
- Boundary values
|
|
281
|
+
|
|
282
|
+
**Integration Tests** (Component-level):
|
|
283
|
+
- API endpoints
|
|
284
|
+
- Database operations
|
|
285
|
+
- External service calls
|
|
286
|
+
- React components with hooks
|
|
287
|
+
|
|
288
|
+
**E2E Tests** (use `/e2e` command):
|
|
289
|
+
- Critical user flows
|
|
290
|
+
- Multi-step processes
|
|
291
|
+
- Full stack integration
|
|
292
|
+
|
|
293
|
+
## Coverage Requirements
|
|
294
|
+
|
|
295
|
+
- **80% minimum** for all code
|
|
296
|
+
- **100% required** for:
|
|
297
|
+
- Financial calculations
|
|
298
|
+
- Authentication logic
|
|
299
|
+
- Security-critical code
|
|
300
|
+
- Core business logic
|
|
301
|
+
|
|
302
|
+
## Important Notes
|
|
303
|
+
|
|
304
|
+
**MANDATORY**: Tests must be written BEFORE implementation. The TDD cycle is:
|
|
305
|
+
|
|
306
|
+
1. **RED** - Write failing test
|
|
307
|
+
2. **GREEN** - Implement to pass
|
|
308
|
+
3. **REFACTOR** - Improve code
|
|
309
|
+
|
|
310
|
+
Never skip the RED phase. Never write code before tests.
|
|
311
|
+
|
|
312
|
+
## Integration with Other Commands
|
|
313
|
+
|
|
314
|
+
- Use `/plan` first to understand what to build
|
|
315
|
+
- Use `/tdd` to implement with tests
|
|
316
|
+
- Use `/build-fix` if build errors occur
|
|
317
|
+
- Use `/code-review` to review implementation
|
|
318
|
+
- Use `/test-coverage` to verify coverage
|
|
319
|
+
|
|
320
|
+
## Related Agents
|
|
321
|
+
|
|
322
|
+
This command invokes the `tdd-guide` agent.
|
|
323
|
+
|
|
324
|
+
The related `tdd-workflow` skill is also bundled.
|
|
325
|
+
|
|
326
|
+
Source files:
|
|
327
|
+
- `~/.claude/agents/tdd-guide.md`
|
|
328
|
+
- `~/.claude/skills/tdd-workflow/SKILL.md`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Test Coverage
|
|
2
|
+
|
|
3
|
+
Analyze test coverage, identify gaps, and generate missing tests to reach 80%+ coverage.
|
|
4
|
+
|
|
5
|
+
## Step 1: Detect Test Framework
|
|
6
|
+
|
|
7
|
+
| Indicator | Coverage Command |
|
|
8
|
+
|-----------|-----------------|
|
|
9
|
+
| `jest.config.*` or `package.json` jest | `npx jest --coverage --coverageReporters=json-summary` |
|
|
10
|
+
| `vitest.config.*` | `npx vitest run --coverage` |
|
|
11
|
+
| `pytest.ini` / `pyproject.toml` pytest | `pytest --cov=src --cov-report=json` |
|
|
12
|
+
| `Cargo.toml` | `cargo llvm-cov --json` |
|
|
13
|
+
| `pom.xml` with JaCoCo | `mvn test jacoco:report` |
|
|
14
|
+
| `go.mod` | `go test -coverprofile=coverage.out ./...` |
|
|
15
|
+
|
|
16
|
+
## Step 2: Analyze Coverage Report
|
|
17
|
+
|
|
18
|
+
1. Run the coverage command
|
|
19
|
+
2. Parse the output (JSON summary or terminal output)
|
|
20
|
+
3. List files **below 80% coverage**, sorted worst-first
|
|
21
|
+
4. For each under-covered file, identify:
|
|
22
|
+
- Untested functions or methods
|
|
23
|
+
- Missing branch coverage (if/else, switch, error paths)
|
|
24
|
+
- Dead code that inflates the denominator
|
|
25
|
+
|
|
26
|
+
## Step 3: Generate Missing Tests
|
|
27
|
+
|
|
28
|
+
For each under-covered file, generate tests following this priority:
|
|
29
|
+
|
|
30
|
+
1. **Happy path** — Core functionality with valid inputs
|
|
31
|
+
2. **Error handling** — Invalid inputs, missing data, network failures
|
|
32
|
+
3. **Edge cases** — Empty arrays, null/undefined, boundary values (0, -1, MAX_INT)
|
|
33
|
+
4. **Branch coverage** — Each if/else, switch case, ternary
|
|
34
|
+
|
|
35
|
+
### Test Generation Rules
|
|
36
|
+
|
|
37
|
+
- Place tests adjacent to source: `foo.ts` → `foo.test.ts` (or project convention)
|
|
38
|
+
- Use existing test patterns from the project (import style, assertion library, mocking approach)
|
|
39
|
+
- Mock external dependencies (database, APIs, file system)
|
|
40
|
+
- Each test should be independent — no shared mutable state between tests
|
|
41
|
+
- Name tests descriptively: `test_create_user_with_duplicate_email_returns_409`
|
|
42
|
+
|
|
43
|
+
## Step 4: Verify
|
|
44
|
+
|
|
45
|
+
1. Run the full test suite — all tests must pass
|
|
46
|
+
2. Re-run coverage — verify improvement
|
|
47
|
+
3. If still below 80%, repeat Step 3 for remaining gaps
|
|
48
|
+
|
|
49
|
+
## Step 5: Report
|
|
50
|
+
|
|
51
|
+
Show before/after comparison:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Coverage Report
|
|
55
|
+
──────────────────────────────
|
|
56
|
+
File Before After
|
|
57
|
+
src/services/auth.ts 45% 88%
|
|
58
|
+
src/utils/validation.ts 32% 82%
|
|
59
|
+
──────────────────────────────
|
|
60
|
+
Overall: 67% 84% ✅
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Focus Areas
|
|
64
|
+
|
|
65
|
+
- Functions with complex branching (high cyclomatic complexity)
|
|
66
|
+
- Error handlers and catch blocks
|
|
67
|
+
- Utility functions used across the codebase
|
|
68
|
+
- API endpoint handlers (request → response flow)
|
|
69
|
+
- Edge cases: null, undefined, empty string, empty array, zero, negative numbers
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Update Codemaps
|
|
2
|
+
|
|
3
|
+
Analyze the codebase structure and generate token-lean architecture documentation.
|
|
4
|
+
|
|
5
|
+
## Step 1: Scan Project Structure
|
|
6
|
+
|
|
7
|
+
1. Identify the project type (monorepo, single app, library, microservice)
|
|
8
|
+
2. Find all source directories (src/, lib/, app/, packages/)
|
|
9
|
+
3. Map entry points (main.ts, index.ts, app.py, main.go, etc.)
|
|
10
|
+
|
|
11
|
+
## Step 2: Generate Codemaps
|
|
12
|
+
|
|
13
|
+
Create or update codemaps in `docs/CODEMAPS/` (or `.reports/codemaps/`):
|
|
14
|
+
|
|
15
|
+
| File | Contents |
|
|
16
|
+
|------|----------|
|
|
17
|
+
| `architecture.md` | High-level system diagram, service boundaries, data flow |
|
|
18
|
+
| `backend.md` | API routes, middleware chain, service → repository mapping |
|
|
19
|
+
| `frontend.md` | Page tree, component hierarchy, state management flow |
|
|
20
|
+
| `data.md` | Database tables, relationships, migration history |
|
|
21
|
+
| `dependencies.md` | External services, third-party integrations, shared libraries |
|
|
22
|
+
|
|
23
|
+
### Codemap Format
|
|
24
|
+
|
|
25
|
+
Each codemap should be token-lean — optimized for AI context consumption:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Backend Architecture
|
|
29
|
+
|
|
30
|
+
## Routes
|
|
31
|
+
POST /api/users → UserController.create → UserService.create → UserRepo.insert
|
|
32
|
+
GET /api/users/:id → UserController.get → UserService.findById → UserRepo.findById
|
|
33
|
+
|
|
34
|
+
## Key Files
|
|
35
|
+
src/services/user.ts (business logic, 120 lines)
|
|
36
|
+
src/repos/user.ts (database access, 80 lines)
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
- PostgreSQL (primary data store)
|
|
40
|
+
- Redis (session cache, rate limiting)
|
|
41
|
+
- Stripe (payment processing)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Step 3: Diff Detection
|
|
45
|
+
|
|
46
|
+
1. If previous codemaps exist, calculate the diff percentage
|
|
47
|
+
2. If changes > 30%, show the diff and request user approval before overwriting
|
|
48
|
+
3. If changes <= 30%, update in place
|
|
49
|
+
|
|
50
|
+
## Step 4: Add Metadata
|
|
51
|
+
|
|
52
|
+
Add a freshness header to each codemap:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
<!-- Generated: 2026-02-11 | Files scanned: 142 | Token estimate: ~800 -->
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Step 5: Save Analysis Report
|
|
59
|
+
|
|
60
|
+
Write a summary to `.reports/codemap-diff.txt`:
|
|
61
|
+
- Files added/removed/modified since last scan
|
|
62
|
+
- New dependencies detected
|
|
63
|
+
- Architecture changes (new routes, new services, etc.)
|
|
64
|
+
- Staleness warnings for docs not updated in 90+ days
|
|
65
|
+
|
|
66
|
+
## Tips
|
|
67
|
+
|
|
68
|
+
- Focus on **high-level structure**, not implementation details
|
|
69
|
+
- Prefer **file paths and function signatures** over full code blocks
|
|
70
|
+
- Keep each codemap under **1000 tokens** for efficient context loading
|
|
71
|
+
- Use ASCII diagrams for data flow instead of verbose descriptions
|
|
72
|
+
- Run after major feature additions or refactoring sessions
|