@baselane/packs 0.1.5 → 0.1.7
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/package.json +2 -2
- package/packs/full-harness/pack.json +3093 -0
- package/packs/full-harness/rendered/.claude/agents/a11y-architect.md +138 -0
- package/packs/full-harness/rendered/.claude/agents/agent-evaluator.md +206 -0
- package/packs/full-harness/rendered/.claude/agents/architect.md +209 -0
- package/packs/full-harness/rendered/.claude/agents/build-error-resolver.md +114 -0
- package/packs/full-harness/rendered/.claude/agents/chief-of-staff.md +149 -0
- package/packs/full-harness/rendered/.claude/agents/code-architect.md +71 -0
- package/packs/full-harness/rendered/.claude/agents/code-explorer.md +69 -0
- package/packs/full-harness/rendered/.claude/agents/code-reviewer.md +312 -0
- package/packs/full-harness/rendered/.claude/agents/code-simplifier.md +47 -0
- package/packs/full-harness/rendered/.claude/agents/comment-analyzer.md +45 -0
- package/packs/full-harness/rendered/.claude/agents/conversation-analyzer.md +52 -0
- package/packs/full-harness/rendered/.claude/agents/cpp-build-resolver.md +90 -0
- package/packs/full-harness/rendered/.claude/agents/cpp-reviewer.md +64 -0
- package/packs/full-harness/rendered/.claude/agents/csharp-reviewer.md +93 -0
- package/packs/full-harness/rendered/.claude/agents/dart-build-resolver.md +201 -0
- package/packs/full-harness/rendered/.claude/agents/database-reviewer.md +91 -0
- package/packs/full-harness/rendered/.claude/agents/django-build-resolver.md +243 -0
- package/packs/full-harness/rendered/.claude/agents/django-reviewer.md +149 -0
- package/packs/full-harness/rendered/.claude/agents/doc-updater.md +107 -0
- package/packs/full-harness/rendered/.claude/agents/docs-lookup.md +64 -0
- package/packs/full-harness/rendered/.claude/agents/e2e-runner.md +107 -0
- package/packs/full-harness/rendered/.claude/agents/fastapi-reviewer.md +68 -0
- package/packs/full-harness/rendered/.claude/agents/flutter-reviewer.md +241 -0
- package/packs/full-harness/rendered/.claude/agents/fsharp-reviewer.md +92 -0
- package/packs/full-harness/rendered/.claude/agents/gan-evaluator.md +206 -0
- package/packs/full-harness/rendered/.claude/agents/gan-generator.md +128 -0
- package/packs/full-harness/rendered/.claude/agents/gan-planner.md +96 -0
- package/packs/full-harness/rendered/.claude/agents/go-build-resolver.md +94 -0
- package/packs/full-harness/rendered/.claude/agents/go-reviewer.md +68 -0
- package/packs/full-harness/rendered/.claude/agents/harmonyos-app-resolver.md +173 -0
- package/packs/full-harness/rendered/.claude/agents/harness-optimizer.md +32 -0
- package/packs/full-harness/rendered/.claude/agents/healthcare-reviewer.md +83 -0
- package/packs/full-harness/rendered/.claude/agents/homelab-architect.md +94 -0
- package/packs/full-harness/rendered/.claude/agents/java-build-resolver.md +266 -0
- package/packs/full-harness/rendered/.claude/agents/java-reviewer.md +179 -0
- package/packs/full-harness/rendered/.claude/agents/kotlin-build-resolver.md +118 -0
- package/packs/full-harness/rendered/.claude/agents/kotlin-reviewer.md +157 -0
- package/packs/full-harness/rendered/.claude/agents/loop-operator.md +33 -0
- package/packs/full-harness/rendered/.claude/agents/marketing-agent.md +141 -0
- package/packs/full-harness/rendered/.claude/agents/mle-reviewer.md +153 -0
- package/packs/full-harness/rendered/.claude/agents/network-architect.md +92 -0
- package/packs/full-harness/rendered/.claude/agents/network-config-reviewer.md +94 -0
- package/packs/full-harness/rendered/.claude/agents/network-troubleshooter.md +116 -0
- package/packs/full-harness/rendered/.claude/agents/opensource-forker.md +198 -0
- package/packs/full-harness/rendered/.claude/agents/opensource-packager.md +249 -0
- package/packs/full-harness/rendered/.claude/agents/opensource-sanitizer.md +188 -0
- package/packs/full-harness/rendered/.claude/agents/performance-optimizer.md +446 -0
- package/packs/full-harness/rendered/.claude/agents/php-reviewer.md +92 -0
- package/packs/full-harness/rendered/.claude/agents/planner.md +210 -0
- package/packs/full-harness/rendered/.claude/agents/pr-test-analyzer.md +45 -0
- package/packs/full-harness/rendered/.claude/agents/python-reviewer.md +90 -0
- package/packs/full-harness/rendered/.claude/agents/pytorch-build-resolver.md +120 -0
- package/packs/full-harness/rendered/.claude/agents/react-build-resolver.md +206 -0
- package/packs/full-harness/rendered/.claude/agents/react-reviewer.md +156 -0
- package/packs/full-harness/rendered/.claude/agents/refactor-cleaner.md +85 -0
- package/packs/full-harness/rendered/.claude/agents/rust-build-resolver.md +148 -0
- package/packs/full-harness/rendered/.claude/agents/rust-reviewer.md +85 -0
- package/packs/full-harness/rendered/.claude/agents/security-reviewer.md +108 -0
- package/packs/full-harness/rendered/.claude/agents/seo-specialist.md +54 -0
- package/packs/full-harness/rendered/.claude/agents/silent-failure-hunter.md +50 -0
- package/packs/full-harness/rendered/.claude/agents/spec-miner.md +207 -0
- package/packs/full-harness/rendered/.claude/agents/swift-build-resolver.md +161 -0
- package/packs/full-harness/rendered/.claude/agents/swift-reviewer.md +98 -0
- package/packs/full-harness/rendered/.claude/agents/tdd-guide.md +89 -0
- package/packs/full-harness/rendered/.claude/agents/type-design-analyzer.md +41 -0
- package/packs/full-harness/rendered/.claude/agents/typescript-reviewer.md +96 -0
- package/packs/full-harness/rendered/.claude/agents/vue-reviewer.md +195 -0
- package/packs/full-harness/rendered/.claude/commands/aside.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/auto-update.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/build-fix.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/checkpoint.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/code-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/cost-report.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/cpp-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/cpp-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/cpp-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/ecc-guide.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-claim.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-decompose.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-publish.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-sync.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-unblock.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/epic-validate.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/evolve.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/fastapi-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/feature-dev.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/flutter-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/flutter-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/flutter-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/gan-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/gan-design.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/go-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/go-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/go-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/gradle-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/harness-audit.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/hookify-configure.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/hookify-help.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/hookify-list.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/hookify.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/instinct-export.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/instinct-import.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/instinct-status.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/jira.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/kotlin-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/kotlin-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/kotlin-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/learn-eval.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/learn.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/loop-start.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/loop-status.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/marketing-campaign.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/model-route.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/multi-backend.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/multi-execute.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/multi-frontend.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/multi-plan.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/multi-workflow.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-add-feature.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-build-mvp.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-change-feature.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-fix-defect.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-refine-code.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/orch-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/plan-canvas.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/plan-prd.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/plan.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/pm2.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/pr.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/project-init.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/projects.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/promote.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prp-commit.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prp-implement.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prp-plan.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prp-pr.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prp-prd.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/prune.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/python-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/quality-gate.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/react-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/react-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/react-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/refactor-clean.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/resume-session.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/review-pr.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/rust-build.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/rust-review.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/rust-test.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/santa-loop.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/save-session.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/security-scan.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/sessions.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/setup-pm.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/skill-create.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/skill-health.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/test-coverage.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/update-codemaps.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/update-docs.md +6 -0
- package/packs/full-harness/rendered/.claude/commands/vue-review.md +6 -0
- package/packs/full-harness/rendered/.claude/skills/accessibility/SKILL.md +144 -0
- package/packs/full-harness/rendered/.claude/skills/agent-architecture-audit/SKILL.md +254 -0
- package/packs/full-harness/rendered/.claude/skills/agent-eval/SKILL.md +143 -0
- package/packs/full-harness/rendered/.claude/skills/agent-harness-construction/SKILL.md +72 -0
- package/packs/full-harness/rendered/.claude/skills/agent-introspection-debugging/SKILL.md +152 -0
- package/packs/full-harness/rendered/.claude/skills/agent-payment-x402/SKILL.md +223 -0
- package/packs/full-harness/rendered/.claude/skills/agent-self-evaluation/SKILL.md +181 -0
- package/packs/full-harness/rendered/.claude/skills/agent-sort/SKILL.md +214 -0
- package/packs/full-harness/rendered/.claude/skills/agentic-engineering/SKILL.md +62 -0
- package/packs/full-harness/rendered/.claude/skills/agentic-os/SKILL.md +386 -0
- package/packs/full-harness/rendered/.claude/skills/ai-first-engineering/SKILL.md +50 -0
- package/packs/full-harness/rendered/.claude/skills/ai-regression-testing/SKILL.md +384 -0
- package/packs/full-harness/rendered/.claude/skills/android-clean-architecture/SKILL.md +338 -0
- package/packs/full-harness/rendered/.claude/skills/angular-developer/SKILL.md +153 -0
- package/packs/full-harness/rendered/.claude/skills/api-connector-builder/SKILL.md +118 -0
- package/packs/full-harness/rendered/.claude/skills/api-design/SKILL.md +522 -0
- package/packs/full-harness/rendered/.claude/skills/architecture-decision-records/SKILL.md +178 -0
- package/packs/full-harness/rendered/.claude/skills/article-writing/SKILL.md +78 -0
- package/packs/full-harness/rendered/.claude/skills/automation-audit-ops/SKILL.md +141 -0
- package/packs/full-harness/rendered/.claude/skills/autonomous-agent-harness/SKILL.md +272 -0
- package/packs/full-harness/rendered/.claude/skills/autonomous-loops/SKILL.md +609 -0
- package/packs/full-harness/rendered/.claude/skills/backend-patterns/SKILL.md +560 -0
- package/packs/full-harness/rendered/.claude/skills/benchmark/SKILL.md +92 -0
- package/packs/full-harness/rendered/.claude/skills/benchmark-methodology/SKILL.md +185 -0
- package/packs/full-harness/rendered/.claude/skills/benchmark-optimization-loop/SKILL.md +67 -0
- package/packs/full-harness/rendered/.claude/skills/blender-motion-state-inspection/SKILL.md +162 -0
- package/packs/full-harness/rendered/.claude/skills/blueprint/SKILL.md +95 -0
- package/packs/full-harness/rendered/.claude/skills/brand-discovery/SKILL.md +140 -0
- package/packs/full-harness/rendered/.claude/skills/brand-voice/SKILL.md +96 -0
- package/packs/full-harness/rendered/.claude/skills/browser-qa/SKILL.md +103 -0
- package/packs/full-harness/rendered/.claude/skills/bun-runtime/SKILL.md +83 -0
- package/packs/full-harness/rendered/.claude/skills/canary-watch/SKILL.md +106 -0
- package/packs/full-harness/rendered/.claude/skills/carrier-relationship-management/SKILL.md +198 -0
- package/packs/full-harness/rendered/.claude/skills/cisco-ios-patterns/SKILL.md +162 -0
- package/packs/full-harness/rendered/.claude/skills/ck/SKILL.md +143 -0
- package/packs/full-harness/rendered/.claude/skills/claude-devfleet/SKILL.md +110 -0
- package/packs/full-harness/rendered/.claude/skills/click-path-audit/SKILL.md +243 -0
- package/packs/full-harness/rendered/.claude/skills/clickhouse-io/SKILL.md +443 -0
- package/packs/full-harness/rendered/.claude/skills/code-tour/SKILL.md +252 -0
- package/packs/full-harness/rendered/.claude/skills/codebase-onboarding/SKILL.md +232 -0
- package/packs/full-harness/rendered/.claude/skills/codehealth-mcp/SKILL.md +165 -0
- package/packs/full-harness/rendered/.claude/skills/coding-standards/SKILL.md +549 -0
- package/packs/full-harness/rendered/.claude/skills/competitive-platform-analysis/SKILL.md +209 -0
- package/packs/full-harness/rendered/.claude/skills/competitive-report-structure/SKILL.md +157 -0
- package/packs/full-harness/rendered/.claude/skills/compose-multiplatform-patterns/SKILL.md +298 -0
- package/packs/full-harness/rendered/.claude/skills/config-gc/SKILL.md +118 -0
- package/packs/full-harness/rendered/.claude/skills/configure-ecc/SKILL.md +383 -0
- package/packs/full-harness/rendered/.claude/skills/connections-optimizer/SKILL.md +188 -0
- package/packs/full-harness/rendered/.claude/skills/content-engine/SKILL.md +130 -0
- package/packs/full-harness/rendered/.claude/skills/content-hash-cache-pattern/SKILL.md +160 -0
- package/packs/full-harness/rendered/.claude/skills/context-budget/SKILL.md +134 -0
- package/packs/full-harness/rendered/.claude/skills/continuous-agent-loop/SKILL.md +44 -0
- package/packs/full-harness/rendered/.claude/skills/continuous-learning/SKILL.md +130 -0
- package/packs/full-harness/rendered/.claude/skills/continuous-learning-v2/SKILL.md +358 -0
- package/packs/full-harness/rendered/.claude/skills/cost-aware-llm-pipeline/SKILL.md +182 -0
- package/packs/full-harness/rendered/.claude/skills/cost-tracking/SKILL.md +95 -0
- package/packs/full-harness/rendered/.claude/skills/council/SKILL.md +202 -0
- package/packs/full-harness/rendered/.claude/skills/cpp-coding-standards/SKILL.md +722 -0
- package/packs/full-harness/rendered/.claude/skills/cpp-testing/SKILL.md +323 -0
- package/packs/full-harness/rendered/.claude/skills/crosspost/SKILL.md +110 -0
- package/packs/full-harness/rendered/.claude/skills/csharp-testing/SKILL.md +320 -0
- package/packs/full-harness/rendered/.claude/skills/customer-billing-ops/SKILL.md +139 -0
- package/packs/full-harness/rendered/.claude/skills/customs-trade-compliance/SKILL.md +248 -0
- package/packs/full-harness/rendered/.claude/skills/dart-flutter-patterns/SKILL.md +562 -0
- package/packs/full-harness/rendered/.claude/skills/dashboard-builder/SKILL.md +106 -0
- package/packs/full-harness/rendered/.claude/skills/data-scraper-agent/SKILL.md +763 -0
- package/packs/full-harness/rendered/.claude/skills/data-throughput-accelerator/SKILL.md +70 -0
- package/packs/full-harness/rendered/.claude/skills/database-migrations/SKILL.md +428 -0
- package/packs/full-harness/rendered/.claude/skills/deep-research/SKILL.md +158 -0
- package/packs/full-harness/rendered/.claude/skills/defi-amm-security/SKILL.md +164 -0
- package/packs/full-harness/rendered/.claude/skills/delivery-gate/SKILL.md +123 -0
- package/packs/full-harness/rendered/.claude/skills/deployment-patterns/SKILL.md +426 -0
- package/packs/full-harness/rendered/.claude/skills/design-system/SKILL.md +81 -0
- package/packs/full-harness/rendered/.claude/skills/django-celery/SKILL.md +456 -0
- package/packs/full-harness/rendered/.claude/skills/django-patterns/SKILL.md +733 -0
- package/packs/full-harness/rendered/.claude/skills/django-security/SKILL.md +642 -0
- package/packs/full-harness/rendered/.claude/skills/django-tdd/SKILL.md +728 -0
- package/packs/full-harness/rendered/.claude/skills/django-verification/SKILL.md +468 -0
- package/packs/full-harness/rendered/.claude/skills/dmux-workflows/SKILL.md +190 -0
- package/packs/full-harness/rendered/.claude/skills/docker-patterns/SKILL.md +363 -0
- package/packs/full-harness/rendered/.claude/skills/documentation-lookup/SKILL.md +89 -0
- package/packs/full-harness/rendered/.claude/skills/dotnet-patterns/SKILL.md +320 -0
- package/packs/full-harness/rendered/.claude/skills/dynamic-workflow-mode/SKILL.md +122 -0
- package/packs/full-harness/rendered/.claude/skills/e2e-testing/SKILL.md +325 -0
- package/packs/full-harness/rendered/.claude/skills/ecc-guide/SKILL.md +188 -0
- package/packs/full-harness/rendered/.claude/skills/ecc-recipes/SKILL.md +145 -0
- package/packs/full-harness/rendered/.claude/skills/ecc-tools-cost-audit/SKILL.md +159 -0
- package/packs/full-harness/rendered/.claude/skills/email-ops/SKILL.md +120 -0
- package/packs/full-harness/rendered/.claude/skills/energy-procurement/SKILL.md +213 -0
- package/packs/full-harness/rendered/.claude/skills/enterprise-agent-ops/SKILL.md +49 -0
- package/packs/full-harness/rendered/.claude/skills/error-handling/SKILL.md +375 -0
- package/packs/full-harness/rendered/.claude/skills/eval-harness/SKILL.md +268 -0
- package/packs/full-harness/rendered/.claude/skills/evm-token-decimals/SKILL.md +128 -0
- package/packs/full-harness/rendered/.claude/skills/exa-search/SKILL.md +106 -0
- package/packs/full-harness/rendered/.claude/skills/fal-ai-media/SKILL.md +287 -0
- package/packs/full-harness/rendered/.claude/skills/fastapi-patterns/SKILL.md +512 -0
- package/packs/full-harness/rendered/.claude/skills/finance-billing-ops/SKILL.md +126 -0
- package/packs/full-harness/rendered/.claude/skills/flox-environments/SKILL.md +495 -0
- package/packs/full-harness/rendered/.claude/skills/flutter-dart-code-review/SKILL.md +434 -0
- package/packs/full-harness/rendered/.claude/skills/foundation-models-on-device/SKILL.md +243 -0
- package/packs/full-harness/rendered/.claude/skills/frontend-a11y/SKILL.md +441 -0
- package/packs/full-harness/rendered/.claude/skills/frontend-design-direction/SKILL.md +91 -0
- package/packs/full-harness/rendered/.claude/skills/frontend-patterns/SKILL.md +655 -0
- package/packs/full-harness/rendered/.claude/skills/frontend-slides/SKILL.md +183 -0
- package/packs/full-harness/rendered/.claude/skills/fsharp-testing/SKILL.md +279 -0
- package/packs/full-harness/rendered/.claude/skills/gan-style-harness/SKILL.md +276 -0
- package/packs/full-harness/rendered/.claude/skills/gateguard/SKILL.md +131 -0
- package/packs/full-harness/rendered/.claude/skills/generating-python-installer/SKILL.md +820 -0
- package/packs/full-harness/rendered/.claude/skills/gget/SKILL.md +165 -0
- package/packs/full-harness/rendered/.claude/skills/git-workflow/SKILL.md +714 -0
- package/packs/full-harness/rendered/.claude/skills/github-ops/SKILL.md +143 -0
- package/packs/full-harness/rendered/.claude/skills/golang-patterns/SKILL.md +674 -0
- package/packs/full-harness/rendered/.claude/skills/golang-testing/SKILL.md +719 -0
- package/packs/full-harness/rendered/.claude/skills/google-workspace-ops/SKILL.md +94 -0
- package/packs/full-harness/rendered/.claude/skills/growth-log/SKILL.md +125 -0
- package/packs/full-harness/rendered/.claude/skills/healthcare-cdss-patterns/SKILL.md +243 -0
- package/packs/full-harness/rendered/.claude/skills/healthcare-emr-patterns/SKILL.md +157 -0
- package/packs/full-harness/rendered/.claude/skills/healthcare-eval-harness/SKILL.md +205 -0
- package/packs/full-harness/rendered/.claude/skills/healthcare-phi-compliance/SKILL.md +143 -0
- package/packs/full-harness/rendered/.claude/skills/hermes-imports/SKILL.md +87 -0
- package/packs/full-harness/rendered/.claude/skills/hexagonal-architecture/SKILL.md +275 -0
- package/packs/full-harness/rendered/.claude/skills/hipaa-compliance/SKILL.md +76 -0
- package/packs/full-harness/rendered/.claude/skills/homelab-network-readiness/SKILL.md +168 -0
- package/packs/full-harness/rendered/.claude/skills/homelab-network-setup/SKILL.md +128 -0
- package/packs/full-harness/rendered/.claude/skills/homelab-pihole-dns/SKILL.md +273 -0
- package/packs/full-harness/rendered/.claude/skills/homelab-vlan-segmentation/SKILL.md +310 -0
- package/packs/full-harness/rendered/.claude/skills/homelab-wireguard-vpn/SKILL.md +304 -0
- package/packs/full-harness/rendered/.claude/skills/hookify-rules/SKILL.md +128 -0
- package/packs/full-harness/rendered/.claude/skills/inherit-legacy-style/SKILL.md +154 -0
- package/packs/full-harness/rendered/.claude/skills/intent-driven-development/SKILL.md +360 -0
- package/packs/full-harness/rendered/.claude/skills/inventory-demand-planning/SKILL.md +232 -0
- package/packs/full-harness/rendered/.claude/skills/investor-materials/SKILL.md +95 -0
- package/packs/full-harness/rendered/.claude/skills/investor-outreach/SKILL.md +90 -0
- package/packs/full-harness/rendered/.claude/skills/ios-icon-gen/SKILL.md +156 -0
- package/packs/full-harness/rendered/.claude/skills/iterative-retrieval/SKILL.md +210 -0
- package/packs/full-harness/rendered/.claude/skills/ito-basket-compare/SKILL.md +62 -0
- package/packs/full-harness/rendered/.claude/skills/ito-data-atlas-agent/SKILL.md +62 -0
- package/packs/full-harness/rendered/.claude/skills/ito-market-intelligence/SKILL.md +59 -0
- package/packs/full-harness/rendered/.claude/skills/ito-trade-planner/SKILL.md +66 -0
- package/packs/full-harness/rendered/.claude/skills/java-coding-standards/SKILL.md +382 -0
- package/packs/full-harness/rendered/.claude/skills/jira-integration/SKILL.md +301 -0
- package/packs/full-harness/rendered/.claude/skills/jpa-patterns/SKILL.md +150 -0
- package/packs/full-harness/rendered/.claude/skills/knowledge-ops/SKILL.md +153 -0
- package/packs/full-harness/rendered/.claude/skills/kotlin-coroutines-flows/SKILL.md +283 -0
- package/packs/full-harness/rendered/.claude/skills/kotlin-exposed-patterns/SKILL.md +718 -0
- package/packs/full-harness/rendered/.claude/skills/kotlin-ktor-patterns/SKILL.md +688 -0
- package/packs/full-harness/rendered/.claude/skills/kotlin-patterns/SKILL.md +710 -0
- package/packs/full-harness/rendered/.claude/skills/kotlin-testing/SKILL.md +823 -0
- package/packs/full-harness/rendered/.claude/skills/kubernetes-patterns/SKILL.md +754 -0
- package/packs/full-harness/rendered/.claude/skills/laravel-patterns/SKILL.md +414 -0
- package/packs/full-harness/rendered/.claude/skills/laravel-plugin-discovery/SKILL.md +228 -0
- package/packs/full-harness/rendered/.claude/skills/laravel-security/SKILL.md +946 -0
- package/packs/full-harness/rendered/.claude/skills/laravel-tdd/SKILL.md +673 -0
- package/packs/full-harness/rendered/.claude/skills/laravel-verification/SKILL.md +178 -0
- package/packs/full-harness/rendered/.claude/skills/latency-critical-systems/SKILL.md +71 -0
- package/packs/full-harness/rendered/.claude/skills/lead-intelligence/SKILL.md +320 -0
- package/packs/full-harness/rendered/.claude/skills/liquid-glass-design/SKILL.md +279 -0
- package/packs/full-harness/rendered/.claude/skills/literature-review/SKILL.md +191 -0
- package/packs/full-harness/rendered/.claude/skills/llm-trading-agent-security/SKILL.md +144 -0
- package/packs/full-harness/rendered/.claude/skills/logistics-exception-management/SKILL.md +208 -0
- package/packs/full-harness/rendered/.claude/skills/loop-design-check/SKILL.md +141 -0
- package/packs/full-harness/rendered/.claude/skills/mailtrap-email-integration/SKILL.md +76 -0
- package/packs/full-harness/rendered/.claude/skills/make-interfaces-feel-better/SKILL.md +150 -0
- package/packs/full-harness/rendered/.claude/skills/manim-video/SKILL.md +88 -0
- package/packs/full-harness/rendered/.claude/skills/market-research/SKILL.md +74 -0
- package/packs/full-harness/rendered/.claude/skills/marketing-campaign/SKILL.md +112 -0
- package/packs/full-harness/rendered/.claude/skills/mcp-server-patterns/SKILL.md +68 -0
- package/packs/full-harness/rendered/.claude/skills/messages-ops/SKILL.md +103 -0
- package/packs/full-harness/rendered/.claude/skills/ml-adoption-playbook/SKILL.md +56 -0
- package/packs/full-harness/rendered/.claude/skills/mle-workflow/SKILL.md +345 -0
- package/packs/full-harness/rendered/.claude/skills/motion-advanced/SKILL.md +592 -0
- package/packs/full-harness/rendered/.claude/skills/motion-foundations/SKILL.md +295 -0
- package/packs/full-harness/rendered/.claude/skills/motion-patterns/SKILL.md +430 -0
- package/packs/full-harness/rendered/.claude/skills/motion-ui/SKILL.md +574 -0
- package/packs/full-harness/rendered/.claude/skills/mysql-patterns/SKILL.md +411 -0
- package/packs/full-harness/rendered/.claude/skills/nanoclaw-repl/SKILL.md +32 -0
- package/packs/full-harness/rendered/.claude/skills/nestjs-patterns/SKILL.md +229 -0
- package/packs/full-harness/rendered/.claude/skills/netmiko-ssh-automation/SKILL.md +172 -0
- package/packs/full-harness/rendered/.claude/skills/network-bgp-diagnostics/SKILL.md +166 -0
- package/packs/full-harness/rendered/.claude/skills/network-config-validation/SKILL.md +209 -0
- package/packs/full-harness/rendered/.claude/skills/network-interface-health/SKILL.md +151 -0
- package/packs/full-harness/rendered/.claude/skills/nextjs-turbopack/SKILL.md +56 -0
- package/packs/full-harness/rendered/.claude/skills/nodejs-keccak256/SKILL.md +100 -0
- package/packs/full-harness/rendered/.claude/skills/nutrient-document-processing/SKILL.md +166 -0
- package/packs/full-harness/rendered/.claude/skills/nuxt4-patterns/SKILL.md +99 -0
- package/packs/full-harness/rendered/.claude/skills/openclaw-persona-forge/SKILL.md +287 -0
- package/packs/full-harness/rendered/.claude/skills/opensource-pipeline/SKILL.md +254 -0
- package/packs/full-harness/rendered/.claude/skills/orch-add-feature/SKILL.md +43 -0
- package/packs/full-harness/rendered/.claude/skills/orch-build-mvp/SKILL.md +47 -0
- package/packs/full-harness/rendered/.claude/skills/orch-change-feature/SKILL.md +41 -0
- package/packs/full-harness/rendered/.claude/skills/orch-fix-defect/SKILL.md +41 -0
- package/packs/full-harness/rendered/.claude/skills/orch-pipeline/SKILL.md +119 -0
- package/packs/full-harness/rendered/.claude/skills/orch-refine-code/SKILL.md +42 -0
- package/packs/full-harness/rendered/.claude/skills/parallel-execution-optimizer/SKILL.md +70 -0
- package/packs/full-harness/rendered/.claude/skills/perl-patterns/SKILL.md +503 -0
- package/packs/full-harness/rendered/.claude/skills/perl-security/SKILL.md +502 -0
- package/packs/full-harness/rendered/.claude/skills/perl-testing/SKILL.md +474 -0
- package/packs/full-harness/rendered/.claude/skills/plan-canvas/SKILL.md +150 -0
- package/packs/full-harness/rendered/.claude/skills/plan-orchestrate/SKILL.md +261 -0
- package/packs/full-harness/rendered/.claude/skills/plankton-code-quality/SKILL.md +235 -0
- package/packs/full-harness/rendered/.claude/skills/postgres-patterns/SKILL.md +146 -0
- package/packs/full-harness/rendered/.claude/skills/prediction-market-oracle-research/SKILL.md +62 -0
- package/packs/full-harness/rendered/.claude/skills/prediction-market-risk-review/SKILL.md +59 -0
- package/packs/full-harness/rendered/.claude/skills/prisma-patterns/SKILL.md +399 -0
- package/packs/full-harness/rendered/.claude/skills/product-capability/SKILL.md +140 -0
- package/packs/full-harness/rendered/.claude/skills/product-lens/SKILL.md +91 -0
- package/packs/full-harness/rendered/.claude/skills/production-audit/SKILL.md +205 -0
- package/packs/full-harness/rendered/.claude/skills/production-scheduling/SKILL.md +223 -0
- package/packs/full-harness/rendered/.claude/skills/project-flow-ops/SKILL.md +110 -0
- package/packs/full-harness/rendered/.claude/skills/prompt-optimizer/SKILL.md +383 -0
- package/packs/full-harness/rendered/.claude/skills/pubmed-database/SKILL.md +174 -0
- package/packs/full-harness/rendered/.claude/skills/python-patterns/SKILL.md +749 -0
- package/packs/full-harness/rendered/.claude/skills/python-testing/SKILL.md +815 -0
- package/packs/full-harness/rendered/.claude/skills/pytorch-patterns/SKILL.md +395 -0
- package/packs/full-harness/rendered/.claude/skills/quality-nonconformance/SKILL.md +245 -0
- package/packs/full-harness/rendered/.claude/skills/quarkus-patterns/SKILL.md +721 -0
- package/packs/full-harness/rendered/.claude/skills/quarkus-security/SKILL.md +466 -0
- package/packs/full-harness/rendered/.claude/skills/quarkus-tdd/SKILL.md +810 -0
- package/packs/full-harness/rendered/.claude/skills/quarkus-verification/SKILL.md +478 -0
- package/packs/full-harness/rendered/.claude/skills/ralphinho-rfc-pipeline/SKILL.md +66 -0
- package/packs/full-harness/rendered/.claude/skills/react-native-patterns/SKILL.md +325 -0
- package/packs/full-harness/rendered/.claude/skills/react-patterns/SKILL.md +340 -0
- package/packs/full-harness/rendered/.claude/skills/react-performance/SKILL.md +573 -0
- package/packs/full-harness/rendered/.claude/skills/react-testing/SKILL.md +422 -0
- package/packs/full-harness/rendered/.claude/skills/recsys-pipeline-architect/SKILL.md +113 -0
- package/packs/full-harness/rendered/.claude/skills/recursive-decision-ledger/SKILL.md +77 -0
- package/packs/full-harness/rendered/.claude/skills/redis-patterns/SKILL.md +402 -0
- package/packs/full-harness/rendered/.claude/skills/regex-vs-llm-structured-text/SKILL.md +219 -0
- package/packs/full-harness/rendered/.claude/skills/remotion-video-creation/SKILL.md +41 -0
- package/packs/full-harness/rendered/.claude/skills/repo-scan/SKILL.md +77 -0
- package/packs/full-harness/rendered/.claude/skills/research-ops/SKILL.md +111 -0
- package/packs/full-harness/rendered/.claude/skills/returns-reverse-logistics/SKILL.md +225 -0
- package/packs/full-harness/rendered/.claude/skills/rules-distill/SKILL.md +263 -0
- package/packs/full-harness/rendered/.claude/skills/rust-patterns/SKILL.md +498 -0
- package/packs/full-harness/rendered/.claude/skills/rust-testing/SKILL.md +499 -0
- package/packs/full-harness/rendered/.claude/skills/safety-guard/SKILL.md +74 -0
- package/packs/full-harness/rendered/.claude/skills/santa-method/SKILL.md +305 -0
- package/packs/full-harness/rendered/.claude/skills/scholar-evaluation/SKILL.md +159 -0
- package/packs/full-harness/rendered/.claude/skills/search-first/SKILL.md +181 -0
- package/packs/full-harness/rendered/.claude/skills/security-bounty-hunter/SKILL.md +97 -0
- package/packs/full-harness/rendered/.claude/skills/security-review/SKILL.md +502 -0
- package/packs/full-harness/rendered/.claude/skills/security-scan/SKILL.md +164 -0
- package/packs/full-harness/rendered/.claude/skills/seo/SKILL.md +153 -0
- package/packs/full-harness/rendered/.claude/skills/skill-comply/SKILL.md +56 -0
- package/packs/full-harness/rendered/.claude/skills/skill-scout/SKILL.md +139 -0
- package/packs/full-harness/rendered/.claude/skills/skill-stocktake/SKILL.md +193 -0
- package/packs/full-harness/rendered/.claude/skills/social-graph-ranker/SKILL.md +153 -0
- package/packs/full-harness/rendered/.claude/skills/social-publisher/SKILL.md +128 -0
- package/packs/full-harness/rendered/.claude/skills/springboot-patterns/SKILL.md +313 -0
- package/packs/full-harness/rendered/.claude/skills/springboot-security/SKILL.md +271 -0
- package/packs/full-harness/rendered/.claude/skills/springboot-tdd/SKILL.md +157 -0
- package/packs/full-harness/rendered/.claude/skills/springboot-verification/SKILL.md +230 -0
- package/packs/full-harness/rendered/.claude/skills/strategic-compact/SKILL.md +136 -0
- package/packs/full-harness/rendered/.claude/skills/swift-actor-persistence/SKILL.md +142 -0
- package/packs/full-harness/rendered/.claude/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/packs/full-harness/rendered/.claude/skills/swift-protocol-di-testing/SKILL.md +189 -0
- package/packs/full-harness/rendered/.claude/skills/swiftui-patterns/SKILL.md +259 -0
- package/packs/full-harness/rendered/.claude/skills/taste/SKILL.md +263 -0
- package/packs/full-harness/rendered/.claude/skills/tdd-workflow/SKILL.md +580 -0
- package/packs/full-harness/rendered/.claude/skills/team-agent-orchestration/SKILL.md +109 -0
- package/packs/full-harness/rendered/.claude/skills/team-builder/SKILL.md +167 -0
- package/packs/full-harness/rendered/.claude/skills/terminal-ops/SKILL.md +108 -0
- package/packs/full-harness/rendered/.claude/skills/tinystruct-patterns/SKILL.md +277 -0
- package/packs/full-harness/rendered/.claude/skills/token-budget-advisor/SKILL.md +120 -0
- package/packs/full-harness/rendered/.claude/skills/ui-demo/SKILL.md +464 -0
- package/packs/full-harness/rendered/.claude/skills/ui-to-vue/SKILL.md +133 -0
- package/packs/full-harness/rendered/.claude/skills/uncloud/SKILL.md +342 -0
- package/packs/full-harness/rendered/.claude/skills/unified-notifications-ops/SKILL.md +186 -0
- package/packs/full-harness/rendered/.claude/skills/uspto-database/SKILL.md +176 -0
- package/packs/full-harness/rendered/.claude/skills/verification-loop/SKILL.md +126 -0
- package/packs/full-harness/rendered/.claude/skills/video-editing/SKILL.md +309 -0
- package/packs/full-harness/rendered/.claude/skills/videodb/SKILL.md +371 -0
- package/packs/full-harness/rendered/.claude/skills/visa-doc-translate/SKILL.md +117 -0
- package/packs/full-harness/rendered/.claude/skills/vite-patterns/SKILL.md +448 -0
- package/packs/full-harness/rendered/.claude/skills/vue-patterns/SKILL.md +470 -0
- package/packs/full-harness/rendered/.claude/skills/windows-desktop-e2e/SKILL.md +886 -0
- package/packs/full-harness/rendered/.claude/skills/workspace-surface-audit/SKILL.md +124 -0
- package/packs/full-harness/rendered/.claude/skills/x-api/SKILL.md +233 -0
- package/packs/full-harness/rendered/.github/copilot-instructions.md +89529 -0
- package/packs/full-harness/rendered/AGENTS.md +9663 -0
- package/packs/full-harness/rendered/CLAUDE.md +444 -0
- package/packs/full-harness/rendered/GEMINI.md +71959 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: continuous-learning-v2
|
|
3
|
+
description: Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Continuous Learning v2.1 - Instinct
|
|
7
|
+
-Based Architecture
|
|
8
|
+
|
|
9
|
+
An advanced learning system that turns your Claude Code sessions into reusable knowledge through atomic "instincts" - small learned behaviors with confidence scoring.
|
|
10
|
+
|
|
11
|
+
**v2.1** adds **project-scoped instincts** — React patterns stay in your React project, Python conventions stay in your Python project, and universal patterns (like "always validate input") are shared globally.
|
|
12
|
+
|
|
13
|
+
## When to Activate
|
|
14
|
+
|
|
15
|
+
- Setting up automatic learning from Claude Code sessions
|
|
16
|
+
- Configuring instinct-based behavior extraction via hooks
|
|
17
|
+
- Tuning confidence thresholds for learned behaviors
|
|
18
|
+
- Reviewing, exporting, or importing instinct libraries
|
|
19
|
+
- Evolving instincts into full skills, commands, or agents
|
|
20
|
+
- Managing project-scoped vs global instincts
|
|
21
|
+
- Promoting instincts from project to global scope
|
|
22
|
+
|
|
23
|
+
## What's New in v2.1
|
|
24
|
+
|
|
25
|
+
| Feature | v2.0 | v2.1 |
|
|
26
|
+
|---------|------|------|
|
|
27
|
+
| Storage | Global (`~/.claude/homunculus/`) | Project-scoped (`${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects/<hash>/`) |
|
|
28
|
+
| Scope | All instincts apply everywhere | Project-scoped + global |
|
|
29
|
+
| Detection | None | git remote URL / repo path |
|
|
30
|
+
| Promotion | N/A | Project → global when seen in 2+ projects |
|
|
31
|
+
| Commands | 4 (status/evolve/export/import) | 6 (+promote/projects) |
|
|
32
|
+
| Cross-project | Contamination risk | Isolated by default |
|
|
33
|
+
|
|
34
|
+
## What's New in v2 (vs v1)
|
|
35
|
+
|
|
36
|
+
| Feature | v1 | v2 |
|
|
37
|
+
|---------|----|----|
|
|
38
|
+
| Observation | Stop hook (session end) | PreToolUse/PostToolUse (100% reliable) |
|
|
39
|
+
| Analysis | Main context | Background agent (Haiku) |
|
|
40
|
+
| Granularity | Full skills | Atomic "instincts" |
|
|
41
|
+
| Confidence | None | 0.3-0.9 weighted |
|
|
42
|
+
| Evolution | Direct to skill | Instincts -> cluster -> skill/command/agent |
|
|
43
|
+
| Sharing | None | Export/import instincts |
|
|
44
|
+
|
|
45
|
+
## The Instinct Model
|
|
46
|
+
|
|
47
|
+
An instinct is a small learned behavior:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
---
|
|
51
|
+
id: prefer-functional-style
|
|
52
|
+
trigger: "when writing new functions"
|
|
53
|
+
confidence: 0.7
|
|
54
|
+
domain: "code-style"
|
|
55
|
+
source: "session-observation"
|
|
56
|
+
scope: project
|
|
57
|
+
project_id: "a1b2c3d4e5f6"
|
|
58
|
+
project_name: "my-react-app"
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Prefer Functional Style
|
|
62
|
+
|
|
63
|
+
## Action
|
|
64
|
+
Use functional patterns over classes when appropriate.
|
|
65
|
+
|
|
66
|
+
## Evidence
|
|
67
|
+
- Observed 5 instances of functional pattern preference
|
|
68
|
+
- User corrected class-based approach to functional on 2025-01-15
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Properties:**
|
|
72
|
+
- **Atomic** -- one trigger, one action
|
|
73
|
+
- **Confidence-weighted** -- 0.3 = tentative, 0.9 = near certain
|
|
74
|
+
- **Domain-tagged** -- code-style, testing, git, debugging, workflow, etc.
|
|
75
|
+
- **Evidence-backed** -- tracks what observations created it
|
|
76
|
+
- **Scope-aware** -- `project` (default) or `global`
|
|
77
|
+
|
|
78
|
+
## How It Works
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Session Activity (in a git repo)
|
|
82
|
+
|
|
|
83
|
+
| Hooks capture prompts + tool use (100% reliable)
|
|
84
|
+
| + detect project context (git remote / repo path)
|
|
85
|
+
v
|
|
86
|
+
+---------------------------------------------+
|
|
87
|
+
| projects/<project-hash>/observations.jsonl |
|
|
88
|
+
| (prompts, tool calls, outcomes, project) |
|
|
89
|
+
+---------------------------------------------+
|
|
90
|
+
|
|
|
91
|
+
| Observer agent reads (background, Haiku)
|
|
92
|
+
v
|
|
93
|
+
+---------------------------------------------+
|
|
94
|
+
| PATTERN DETECTION |
|
|
95
|
+
| * User corrections -> instinct |
|
|
96
|
+
| * Error resolutions -> instinct |
|
|
97
|
+
| * Repeated workflows -> instinct |
|
|
98
|
+
| * Scope decision: project or global? |
|
|
99
|
+
+---------------------------------------------+
|
|
100
|
+
|
|
|
101
|
+
| Creates/updates
|
|
102
|
+
v
|
|
103
|
+
+---------------------------------------------+
|
|
104
|
+
| projects/<project-hash>/instincts/personal/ |
|
|
105
|
+
| * prefer-functional.yaml (0.7) [project] |
|
|
106
|
+
| * use-react-hooks.yaml (0.9) [project] |
|
|
107
|
+
+---------------------------------------------+
|
|
108
|
+
| instincts/personal/ (GLOBAL) |
|
|
109
|
+
| * always-validate-input.yaml (0.85) [global]|
|
|
110
|
+
| * grep-before-edit.yaml (0.6) [global] |
|
|
111
|
+
+---------------------------------------------+
|
|
112
|
+
|
|
|
113
|
+
| /evolve clusters + /promote
|
|
114
|
+
v
|
|
115
|
+
+---------------------------------------------+
|
|
116
|
+
| projects/<hash>/evolved/ (project-scoped) |
|
|
117
|
+
| evolved/ (global) |
|
|
118
|
+
| * commands/new-feature.md |
|
|
119
|
+
| * skills/testing-workflow.md |
|
|
120
|
+
| * agents/refactor-specialist.md |
|
|
121
|
+
+---------------------------------------------+
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Project Detection
|
|
125
|
+
|
|
126
|
+
The system automatically detects your current project:
|
|
127
|
+
|
|
128
|
+
1. **`CLAUDE_PROJECT_DIR` env var** (highest priority)
|
|
129
|
+
2. **`git remote get-url origin`** -- hashed to create a portable project ID (same repo on different machines gets the same ID)
|
|
130
|
+
3. **`git rev-parse --show-toplevel`** -- fallback using repo path (machine-specific)
|
|
131
|
+
4. **Global fallback** -- if no project is detected, instincts go to global scope
|
|
132
|
+
|
|
133
|
+
Each project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file at `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects.json` maps IDs to human-readable names.
|
|
134
|
+
|
|
135
|
+
### Data Directory
|
|
136
|
+
|
|
137
|
+
Continuous-learning-v2 stores observer data outside `~/.claude` so Claude Code's sensitive-path guard does not block background instinct writes:
|
|
138
|
+
|
|
139
|
+
1. `CLV2_HOMUNCULUS_DIR` when set to an absolute path
|
|
140
|
+
2. `$XDG_DATA_HOME/ecc-homunculus`
|
|
141
|
+
3. `$HOME/.local/share/ecc-homunculus`
|
|
142
|
+
|
|
143
|
+
Existing users with data at `~/.claude/homunculus` can migrate once:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
bash skills/continuous-learning-v2/scripts/migrate-homunculus.sh
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Quick Start
|
|
150
|
+
|
|
151
|
+
### 1. Enable Observation Hooks
|
|
152
|
+
|
|
153
|
+
**If installed as a plugin** (recommended):
|
|
154
|
+
|
|
155
|
+
No extra `settings.json` hook block is required. Claude Code v2.1+ auto-loads the plugin `hooks/hooks.json`, and `observe.sh` is already registered there.
|
|
156
|
+
|
|
157
|
+
If you previously copied `observe.sh` into `~/.claude/settings.json`, remove that duplicate `PreToolUse` / `PostToolUse` block. Duplicating the plugin hook causes double execution and `${CLAUDE_PLUGIN_ROOT}` resolution errors because that variable is only available inside plugin-managed `hooks/hooks.json` entries.
|
|
158
|
+
|
|
159
|
+
**If installed manually** to `~/.claude/skills`, add this to your `~/.claude/settings.json`:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"hooks": {
|
|
164
|
+
"PreToolUse": [{
|
|
165
|
+
"matcher": "*",
|
|
166
|
+
"hooks": [{
|
|
167
|
+
"type": "command",
|
|
168
|
+
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh"
|
|
169
|
+
}]
|
|
170
|
+
}],
|
|
171
|
+
"PostToolUse": [{
|
|
172
|
+
"matcher": "*",
|
|
173
|
+
"hooks": [{
|
|
174
|
+
"type": "command",
|
|
175
|
+
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh"
|
|
176
|
+
}]
|
|
177
|
+
}]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 2. Initialize Directory Structure
|
|
183
|
+
|
|
184
|
+
The system creates directories automatically on first use, but you can also create them manually:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Global directories
|
|
188
|
+
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/ecc-homunculus"/{instincts/{personal,inherited},evolved/{agents,skills,commands},projects}
|
|
189
|
+
|
|
190
|
+
# Project directories are auto-created when the hook first runs in a git repo
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### 3. Use the Instinct Commands
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
/instinct-status # Show learned instincts (project + global)
|
|
197
|
+
/evolve # Cluster related instincts into skills/commands
|
|
198
|
+
/instinct-export # Export instincts to file
|
|
199
|
+
/instinct-import # Import instincts from others
|
|
200
|
+
/promote # Promote project instincts to global scope
|
|
201
|
+
/projects # List all known projects and their instinct counts
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Commands
|
|
205
|
+
|
|
206
|
+
| Command | Description |
|
|
207
|
+
|---------|-------------|
|
|
208
|
+
| `/instinct-status` | Show all instincts (project-scoped + global) with confidence |
|
|
209
|
+
| `/evolve` | Cluster related instincts into skills/commands, suggest promotions |
|
|
210
|
+
| `/instinct-export` | Export instincts (filterable by scope/domain) |
|
|
211
|
+
| `/instinct-import <file>` | Import instincts with scope control |
|
|
212
|
+
| `/promote [id]` | Promote project instincts to global scope |
|
|
213
|
+
| `/projects` | List all known projects and their instinct counts |
|
|
214
|
+
|
|
215
|
+
## Configuration
|
|
216
|
+
|
|
217
|
+
Edit `config.json` to control the background observer:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"version": "2.1",
|
|
222
|
+
"observer": {
|
|
223
|
+
"enabled": false,
|
|
224
|
+
"run_interval_minutes": 5,
|
|
225
|
+
"min_observations_to_analyze": 20
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
| Key | Default | Description |
|
|
231
|
+
|-----|---------|-------------|
|
|
232
|
+
| `observer.enabled` | `false` | Enable the background observer agent |
|
|
233
|
+
| `observer.run_interval_minutes` | `5` | How often the observer analyzes observations |
|
|
234
|
+
| `observer.min_observations_to_analyze` | `20` | Minimum observations before analysis runs |
|
|
235
|
+
|
|
236
|
+
Other behavior (observation capture, instinct thresholds, project scoping, promotion criteria) is configured via code defaults in `instinct-cli.py` and `observe.sh`.
|
|
237
|
+
|
|
238
|
+
## File Structure
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/
|
|
242
|
+
+-- identity.json # Your profile, technical level
|
|
243
|
+
+-- projects.json # Registry: project hash -> name/path/remote
|
|
244
|
+
+-- observations.jsonl # Global observations (fallback)
|
|
245
|
+
+-- instincts/
|
|
246
|
+
| +-- personal/ # Global auto-learned instincts
|
|
247
|
+
| +-- inherited/ # Global imported instincts
|
|
248
|
+
+-- evolved/
|
|
249
|
+
| +-- agents/ # Global generated agents
|
|
250
|
+
| +-- skills/ # Global generated skills
|
|
251
|
+
| +-- commands/ # Global generated commands
|
|
252
|
+
+-- projects/
|
|
253
|
+
+-- a1b2c3d4e5f6/ # Project hash (from git remote URL)
|
|
254
|
+
| +-- project.json # Per-project metadata mirror (id/name/root/remote)
|
|
255
|
+
| +-- observations.jsonl
|
|
256
|
+
| +-- observations.archive/
|
|
257
|
+
| +-- instincts/
|
|
258
|
+
| | +-- personal/ # Project-specific auto-learned
|
|
259
|
+
| | +-- inherited/ # Project-specific imported
|
|
260
|
+
| +-- evolved/
|
|
261
|
+
| +-- skills/
|
|
262
|
+
| +-- commands/
|
|
263
|
+
| +-- agents/
|
|
264
|
+
+-- f6e5d4c3b2a1/ # Another project
|
|
265
|
+
+-- ...
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Scope Decision Guide
|
|
269
|
+
|
|
270
|
+
| Pattern Type | Scope | Examples |
|
|
271
|
+
|-------------|-------|---------|
|
|
272
|
+
| Language/framework conventions | **project** | "Use React hooks", "Follow Django REST patterns" |
|
|
273
|
+
| File structure preferences | **project** | "Tests in `__tests__`/", "Components in src/components/" |
|
|
274
|
+
| Code style | **project** | "Use functional style", "Prefer dataclasses" |
|
|
275
|
+
| Error handling strategies | **project** | "Use Result type for errors" |
|
|
276
|
+
| Security practices | **global** | "Validate user input", "Sanitize SQL" |
|
|
277
|
+
| General best practices | **global** | "Write tests first", "Always handle errors" |
|
|
278
|
+
| Tool workflow preferences | **global** | "Grep before Edit", "Read before Write" |
|
|
279
|
+
| Git practices | **global** | "Conventional commits", "Small focused commits" |
|
|
280
|
+
|
|
281
|
+
## Instinct Promotion (Project -> Global)
|
|
282
|
+
|
|
283
|
+
When the same instinct appears in multiple projects with high confidence, it's a candidate for promotion to global scope.
|
|
284
|
+
|
|
285
|
+
**Auto-promotion criteria:**
|
|
286
|
+
- Same instinct ID in 2+ projects
|
|
287
|
+
- Average confidence >= 0.8
|
|
288
|
+
|
|
289
|
+
**How to promote:**
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Promote a specific instinct
|
|
293
|
+
python3 instinct-cli.py promote prefer-explicit-errors
|
|
294
|
+
|
|
295
|
+
# Auto-promote all qualifying instincts
|
|
296
|
+
python3 instinct-cli.py promote
|
|
297
|
+
|
|
298
|
+
# Preview without changes
|
|
299
|
+
python3 instinct-cli.py promote --dry-run
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The `/evolve` command also suggests promotion candidates.
|
|
303
|
+
|
|
304
|
+
## Confidence Scoring
|
|
305
|
+
|
|
306
|
+
Confidence evolves over time:
|
|
307
|
+
|
|
308
|
+
| Score | Meaning | Behavior |
|
|
309
|
+
|-------|---------|----------|
|
|
310
|
+
| 0.3 | Tentative | Suggested but not enforced |
|
|
311
|
+
| 0.5 | Moderate | Applied when relevant |
|
|
312
|
+
| 0.7 | Strong | Auto-approved for application |
|
|
313
|
+
| 0.9 | Near-certain | Core behavior |
|
|
314
|
+
|
|
315
|
+
**Confidence increases** when:
|
|
316
|
+
- Pattern is repeatedly observed
|
|
317
|
+
- User doesn't correct the suggested behavior
|
|
318
|
+
- Similar instincts from other sources agree
|
|
319
|
+
|
|
320
|
+
**Confidence decreases** when:
|
|
321
|
+
- User explicitly corrects the behavior
|
|
322
|
+
- Pattern isn't observed for extended periods
|
|
323
|
+
- Contradicting evidence appears
|
|
324
|
+
|
|
325
|
+
## Why Hooks vs Skills for Observation?
|
|
326
|
+
|
|
327
|
+
> "v1 relied on skills to observe. Skills are probabilistic -- they fire ~50-80% of the time based on Claude's judgment."
|
|
328
|
+
|
|
329
|
+
Hooks fire **100% of the time**, deterministically. This means:
|
|
330
|
+
- Every tool call is observed
|
|
331
|
+
- No patterns are missed
|
|
332
|
+
- Learning is comprehensive
|
|
333
|
+
|
|
334
|
+
## Backward Compatibility
|
|
335
|
+
|
|
336
|
+
v2.1 is fully compatible with v2.0 and v1:
|
|
337
|
+
- Existing global instincts can be migrated from `~/.claude/homunculus/instincts/` with `scripts/migrate-homunculus.sh`
|
|
338
|
+
- Existing `~/.claude/skills/learned/` skills from v1 still work
|
|
339
|
+
- Stop hook still runs (but now also feeds into v2)
|
|
340
|
+
- Gradual migration: run both in parallel
|
|
341
|
+
|
|
342
|
+
## Privacy
|
|
343
|
+
|
|
344
|
+
- Observations stay **local** on your machine
|
|
345
|
+
- Project-scoped instincts are isolated per project
|
|
346
|
+
- Only **instincts** (patterns) can be exported — not raw observations
|
|
347
|
+
- No actual code or conversation content is shared
|
|
348
|
+
- You control what gets exported and promoted
|
|
349
|
+
|
|
350
|
+
## Related
|
|
351
|
+
|
|
352
|
+
- [ECC-Tools GitHub App](https://github.com/apps/ecc-tools) - Generate instincts from repo history
|
|
353
|
+
- Homunculus - Community project that inspired the v2 instinct-based architecture (atomic observations, confidence scoring, instinct evolution pipeline)
|
|
354
|
+
- [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Continuous learning section
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
*Instinct-based learning: teaching Claude your patterns, one project at a time.*
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost-aware-llm-pipeline
|
|
3
|
+
description: Cost optimization patterns for LLM API usage — model routing by task complexity, budget tracking, retry logic, and prompt caching.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cost-Aware LLM Pipeline
|
|
7
|
+
|
|
8
|
+
Patterns for controlling LLM API costs while maintaining quality. Combines model routing, budget tracking, retry logic, and prompt caching into a composable pipeline.
|
|
9
|
+
|
|
10
|
+
## When to Activate
|
|
11
|
+
|
|
12
|
+
- Building applications that call LLM APIs (Claude, GPT, etc.)
|
|
13
|
+
- Processing batches of items with varying complexity
|
|
14
|
+
- Need to stay within a budget for API spend
|
|
15
|
+
- Optimizing cost without sacrificing quality on complex tasks
|
|
16
|
+
|
|
17
|
+
## Core Concepts
|
|
18
|
+
|
|
19
|
+
### 1. Model Routing by Task Complexity
|
|
20
|
+
|
|
21
|
+
Automatically select cheaper models for simple tasks, reserving expensive models for complex ones.
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
MODEL_SONNET = "claude-sonnet-4-6"
|
|
25
|
+
MODEL_HAIKU = "claude-haiku-4-5-20251001"
|
|
26
|
+
|
|
27
|
+
_SONNET_TEXT_THRESHOLD = 10_000 # chars
|
|
28
|
+
_SONNET_ITEM_THRESHOLD = 30 # items
|
|
29
|
+
|
|
30
|
+
def select_model(
|
|
31
|
+
text_length: int,
|
|
32
|
+
item_count: int,
|
|
33
|
+
force_model: str | None = None,
|
|
34
|
+
) -> str:
|
|
35
|
+
"""Select model based on task complexity."""
|
|
36
|
+
if force_model is not None:
|
|
37
|
+
return force_model
|
|
38
|
+
if text_length >= _SONNET_TEXT_THRESHOLD or item_count >= _SONNET_ITEM_THRESHOLD:
|
|
39
|
+
return MODEL_SONNET # Complex task
|
|
40
|
+
return MODEL_HAIKU # Simple task (3-4x cheaper)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Immutable Cost Tracking
|
|
44
|
+
|
|
45
|
+
Track cumulative spend with frozen dataclasses. Each API call returns a new tracker — never mutates state.
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from dataclasses import dataclass
|
|
49
|
+
|
|
50
|
+
@dataclass(frozen=True, slots=True)
|
|
51
|
+
class CostRecord:
|
|
52
|
+
model: str
|
|
53
|
+
input_tokens: int
|
|
54
|
+
output_tokens: int
|
|
55
|
+
cost_usd: float
|
|
56
|
+
|
|
57
|
+
@dataclass(frozen=True, slots=True)
|
|
58
|
+
class CostTracker:
|
|
59
|
+
budget_limit: float = 1.00
|
|
60
|
+
records: tuple[CostRecord, ...] = ()
|
|
61
|
+
|
|
62
|
+
def add(self, record: CostRecord) -> "CostTracker":
|
|
63
|
+
"""Return new tracker with added record (never mutates self)."""
|
|
64
|
+
return CostTracker(
|
|
65
|
+
budget_limit=self.budget_limit,
|
|
66
|
+
records=(*self.records, record),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def total_cost(self) -> float:
|
|
71
|
+
return sum(r.cost_usd for r in self.records)
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def over_budget(self) -> bool:
|
|
75
|
+
return self.total_cost > self.budget_limit
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 3. Narrow Retry Logic
|
|
79
|
+
|
|
80
|
+
Retry only on transient errors. Fail fast on authentication or bad request errors.
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from anthropic import (
|
|
84
|
+
APIConnectionError,
|
|
85
|
+
InternalServerError,
|
|
86
|
+
RateLimitError,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
_RETRYABLE_ERRORS = (APIConnectionError, RateLimitError, InternalServerError)
|
|
90
|
+
_MAX_RETRIES = 3
|
|
91
|
+
|
|
92
|
+
def call_with_retry(func, *, max_retries: int = _MAX_RETRIES):
|
|
93
|
+
"""Retry only on transient errors, fail fast on others."""
|
|
94
|
+
for attempt in range(max_retries):
|
|
95
|
+
try:
|
|
96
|
+
return func()
|
|
97
|
+
except _RETRYABLE_ERRORS:
|
|
98
|
+
if attempt == max_retries - 1:
|
|
99
|
+
raise
|
|
100
|
+
time.sleep(2 ** attempt) # Exponential backoff
|
|
101
|
+
# AuthenticationError, BadRequestError etc. → raise immediately
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 4. Prompt Caching
|
|
105
|
+
|
|
106
|
+
Cache long system prompts to avoid resending them on every request.
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
messages = [
|
|
110
|
+
{
|
|
111
|
+
"role": "user",
|
|
112
|
+
"content": [
|
|
113
|
+
{
|
|
114
|
+
"type": "text",
|
|
115
|
+
"text": system_prompt,
|
|
116
|
+
"cache_control": {"type": "ephemeral"}, # Cache this
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "text",
|
|
120
|
+
"text": user_input, # Variable part
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Composition
|
|
128
|
+
|
|
129
|
+
Combine all four techniques in a single pipeline function:
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
def process(text: str, config: Config, tracker: CostTracker) -> tuple[Result, CostTracker]:
|
|
133
|
+
# 1. Route model
|
|
134
|
+
model = select_model(len(text), estimated_items, config.force_model)
|
|
135
|
+
|
|
136
|
+
# 2. Check budget
|
|
137
|
+
if tracker.over_budget:
|
|
138
|
+
raise BudgetExceededError(tracker.total_cost, tracker.budget_limit)
|
|
139
|
+
|
|
140
|
+
# 3. Call with retry + caching
|
|
141
|
+
response = call_with_retry(lambda: client.messages.create(
|
|
142
|
+
model=model,
|
|
143
|
+
messages=build_cached_messages(system_prompt, text),
|
|
144
|
+
))
|
|
145
|
+
|
|
146
|
+
# 4. Track cost (immutable)
|
|
147
|
+
record = CostRecord(model=model, input_tokens=..., output_tokens=..., cost_usd=...)
|
|
148
|
+
tracker = tracker.add(record)
|
|
149
|
+
|
|
150
|
+
return parse_result(response), tracker
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Pricing Reference (2025-2026)
|
|
154
|
+
|
|
155
|
+
| Model | Input ($/1M tokens) | Output ($/1M tokens) | Relative Cost |
|
|
156
|
+
|-------|---------------------|----------------------|---------------|
|
|
157
|
+
| Haiku 4.5 | $0.80 | $4.00 | 1x |
|
|
158
|
+
| Sonnet 4.6 | $3.00 | $15.00 | ~4x |
|
|
159
|
+
| Opus 4.5 | $15.00 | $75.00 | ~19x |
|
|
160
|
+
|
|
161
|
+
## Best Practices
|
|
162
|
+
|
|
163
|
+
- **Start with the cheapest model** and only route to expensive models when complexity thresholds are met
|
|
164
|
+
- **Set explicit budget limits** before processing batches — fail early rather than overspend
|
|
165
|
+
- **Log model selection decisions** so you can tune thresholds based on real data
|
|
166
|
+
- **Use prompt caching** for system prompts over 1024 tokens — saves both cost and latency
|
|
167
|
+
- **Never retry on authentication or validation errors** — only transient failures (network, rate limit, server error)
|
|
168
|
+
|
|
169
|
+
## Anti-Patterns to Avoid
|
|
170
|
+
|
|
171
|
+
- Using the most expensive model for all requests regardless of complexity
|
|
172
|
+
- Retrying on all errors (wastes budget on permanent failures)
|
|
173
|
+
- Mutating cost tracking state (makes debugging and auditing difficult)
|
|
174
|
+
- Hardcoding model names throughout the codebase (use constants or config)
|
|
175
|
+
- Ignoring prompt caching for repetitive system prompts
|
|
176
|
+
|
|
177
|
+
## When to Use
|
|
178
|
+
|
|
179
|
+
- Any application calling Claude, OpenAI, or similar LLM APIs
|
|
180
|
+
- Batch processing pipelines where cost adds up quickly
|
|
181
|
+
- Multi-model architectures that need intelligent routing
|
|
182
|
+
- Production systems that need budget guardrails
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost-tracking
|
|
3
|
+
description: Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cost Tracking
|
|
7
|
+
|
|
8
|
+
Use this skill to analyze Claude Code cost and usage history from the metrics log
|
|
9
|
+
that ECC's `stop:cost-tracker` hook writes.
|
|
10
|
+
|
|
11
|
+
## Where the data lives
|
|
12
|
+
|
|
13
|
+
The tracker appends one JSON object per session-stop to
|
|
14
|
+
`~/.claude/metrics/costs.jsonl`. Each row is a **cumulative snapshot for that
|
|
15
|
+
session**, so to total spend you take the **latest row per `session_id`** and
|
|
16
|
+
sum across sessions — summing every row multiply-counts.
|
|
17
|
+
|
|
18
|
+
Row schema:
|
|
19
|
+
|
|
20
|
+
| Field | Meaning |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `timestamp` | ISO timestamp of the snapshot |
|
|
23
|
+
| `session_id` | Claude Code session identifier |
|
|
24
|
+
| `transcript_path` | Path to the session transcript |
|
|
25
|
+
| `model` | Model used |
|
|
26
|
+
| `input_tokens` / `output_tokens` | Token counts |
|
|
27
|
+
| `cache_write_tokens` / `cache_read_tokens` | Prompt-cache token counts |
|
|
28
|
+
| `estimated_cost_usd` | Precomputed cumulative cost in USD for the session |
|
|
29
|
+
|
|
30
|
+
Prefer `estimated_cost_usd` over hand-calculating pricing — model and cache
|
|
31
|
+
prices change, and the tracker is the source of truth.
|
|
32
|
+
|
|
33
|
+
## When to Use
|
|
34
|
+
|
|
35
|
+
- The user asks "how much have I spent?", "what did this session cost?", or
|
|
36
|
+
"what is my token usage?"
|
|
37
|
+
- The user mentions budgets, spending limits, overruns, or cost controls.
|
|
38
|
+
- The user wants a cost breakdown by model, session, or date, or a CSV export.
|
|
39
|
+
|
|
40
|
+
## How It Works
|
|
41
|
+
|
|
42
|
+
First verify the log exists (use `node`, not `sqlite3` — the tracker writes
|
|
43
|
+
JSONL, and `node` is cross-platform):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node -e 'const fs=require("fs"),os=require("os"),p=require("path");const f=p.join(os.homedir(),".claude","metrics","costs.jsonl");console.log(fs.existsSync(f)?"cost log found":"cost log not found: "+f)'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If the log is missing, do not fabricate usage data. Tell the user that cost
|
|
50
|
+
tracking populates after the first session ends with the `stop:cost-tracker`
|
|
51
|
+
hook enabled.
|
|
52
|
+
|
|
53
|
+
## Example — summary, by model, last 7 days
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
node -e '
|
|
57
|
+
const fs=require("fs"),os=require("os"),path=require("path");
|
|
58
|
+
const f=path.join(os.homedir(),".claude","metrics","costs.jsonl");
|
|
59
|
+
if(!fs.existsSync(f)){console.log("cost log not found: "+f);process.exit(0);}
|
|
60
|
+
const rows=fs.readFileSync(f,"utf8").split(/\r?\n/).filter(Boolean).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(Boolean);
|
|
61
|
+
const bySession=new Map();
|
|
62
|
+
for(const r of rows){const k=r.session_id||r.transcript_path||r.timestamp;const p=bySession.get(k);if(!p||String(r.timestamp)>String(p.timestamp))bySession.set(k,r);}
|
|
63
|
+
const latest=[...bySession.values()];
|
|
64
|
+
const cost=r=>Number(r.estimated_cost_usd)||0, day=r=>String(r.timestamp||"").slice(0,10), sum=a=>a.reduce((s,r)=>s+cost(r),0), f4=n=>"$"+n.toFixed(4);
|
|
65
|
+
const today=new Date().toISOString().slice(0,10), yest=new Date(Date.now()-864e5).toISOString().slice(0,10);
|
|
66
|
+
console.log("today: "+f4(sum(latest.filter(r=>day(r)===today)))+" | yesterday: "+f4(sum(latest.filter(r=>day(r)===yest)))+" | total: "+f4(sum(latest))+" ("+latest.length+" sessions)");
|
|
67
|
+
const m=new Map();for(const r of latest){const k=r.model||"(unknown)";m.set(k,(m.get(k)||0)+cost(r));}
|
|
68
|
+
console.log("by model:");[...m.entries()].sort((a,b)=>b[1]-a[1]).forEach(([k,v])=>console.log(" "+f4(v)+" "+k));
|
|
69
|
+
'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For a session drilldown or CSV export, iterate the same `latest` set (or the raw
|
|
73
|
+
rows for CSV) and print the fields you need.
|
|
74
|
+
|
|
75
|
+
## Reporting Guidance
|
|
76
|
+
|
|
77
|
+
When presenting cost data, include today's spend vs yesterday, total across all
|
|
78
|
+
sessions, a by-model breakdown, and session count. Format sub-dollar amounts
|
|
79
|
+
with four decimals, larger amounts with two.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns
|
|
82
|
+
|
|
83
|
+
- Do not sum every row — they are cumulative per session; reduce to the latest
|
|
84
|
+
row per `session_id` first.
|
|
85
|
+
- Do not estimate costs from raw token counts when `estimated_cost_usd` is present.
|
|
86
|
+
- Do not assume the log exists without checking.
|
|
87
|
+
- Do not hard-code current model pricing in user-facing answers.
|
|
88
|
+
- Do not recommend installing unreviewed hooks or plugins that execute arbitrary code.
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- `/cost-report` - Command-form report over the same metrics log.
|
|
93
|
+
- `cost-aware-llm-pipeline` - Model-routing and budget-design patterns.
|
|
94
|
+
- `token-budget-advisor` - Context and token-budget planning.
|
|
95
|
+
- `strategic-compact` - Context compaction to reduce repeated token spend.
|