@arthai/agents 1.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/README.md +123 -0
- package/VERSION +1 -0
- package/agents/ai-consultant.md +999 -0
- package/agents/architect.md +174 -0
- package/agents/code-reviewer.md +115 -0
- package/agents/competitive-analyst.md +688 -0
- package/agents/content-strategist.md +607 -0
- package/agents/design-studio-create.md +304 -0
- package/agents/design-studio-critique.md +258 -0
- package/agents/design-studio-think.md +79 -0
- package/agents/domain-hunter.md +519 -0
- package/agents/explore-light.md +52 -0
- package/agents/frontend.md +261 -0
- package/agents/gtm-expert.md +811 -0
- package/agents/meeting-prep.md +318 -0
- package/agents/ops.md +149 -0
- package/agents/product-manager.md +563 -0
- package/agents/python-backend.md +286 -0
- package/agents/qa-baseline-updater.md +45 -0
- package/agents/qa-challenger.md +97 -0
- package/agents/qa-domain.md +145 -0
- package/agents/qa-e2e.md +184 -0
- package/agents/qa-test-promoter.md +97 -0
- package/agents/qa.md +226 -0
- package/agents/setup.md +134 -0
- package/agents/sre.md +165 -0
- package/agents/stakeholder-reporter.md +94 -0
- package/agents/user-researcher.md +602 -0
- package/bin/cli.js +322 -0
- package/bundles/canvas.json +16 -0
- package/bundles/compass.json +16 -0
- package/bundles/counsel.json +31 -0
- package/bundles/cruise.json +11 -0
- package/bundles/forge.json +26 -0
- package/bundles/prime.json +10 -0
- package/bundles/prism.json +23 -0
- package/bundles/scalpel.json +17 -0
- package/bundles/sentinel.json +19 -0
- package/bundles/shield.json +14 -0
- package/bundles/spark.json +19 -0
- package/compiler.sh +305 -0
- package/dist/plugins/canvas/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/canvas/agents/design-studio-create.md +304 -0
- package/dist/plugins/canvas/agents/design-studio-critique.md +258 -0
- package/dist/plugins/canvas/agents/design-studio-think.md +79 -0
- package/dist/plugins/canvas/agents/frontend.md +261 -0
- package/dist/plugins/canvas/skills/planning/SKILL.md +436 -0
- package/dist/plugins/compass/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/compass/agents/content-strategist.md +607 -0
- package/dist/plugins/compass/agents/gtm-expert.md +811 -0
- package/dist/plugins/compass/agents/product-manager.md +563 -0
- package/dist/plugins/compass/agents/user-researcher.md +602 -0
- package/dist/plugins/compass/skills/planning/SKILL.md +436 -0
- package/dist/plugins/counsel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/counsel/agents/ai-consultant.md +999 -0
- package/dist/plugins/counsel/agents/competitive-analyst.md +688 -0
- package/dist/plugins/counsel/agents/meeting-prep.md +318 -0
- package/dist/plugins/counsel/agents/stakeholder-reporter.md +94 -0
- package/dist/plugins/counsel/hooks/check-deliverable.sh +65 -0
- package/dist/plugins/counsel/hooks/ensure-client-dir.sh +59 -0
- package/dist/plugins/counsel/hooks/hooks.json +28 -0
- package/dist/plugins/counsel/skills/client-discovery/SKILL.md +266 -0
- package/dist/plugins/counsel/skills/consulting/SKILL.md +282 -0
- package/dist/plugins/counsel/skills/deliverable-builder/SKILL.md +928 -0
- package/dist/plugins/counsel/skills/engagement-tracker/SKILL.md +380 -0
- package/dist/plugins/counsel/skills/market-research/SKILL.md +300 -0
- package/dist/plugins/counsel/skills/opportunity-map/SKILL.md +307 -0
- package/dist/plugins/counsel/skills/pitch-generator/SKILL.md +378 -0
- package/dist/plugins/counsel/skills/roi-calculator/SKILL.md +469 -0
- package/dist/plugins/counsel/skills/share/SKILL.md +211 -0
- package/dist/plugins/counsel/skills/solution-architect/SKILL.md +566 -0
- package/dist/plugins/counsel/skills/templates/SKILL.md +194 -0
- package/dist/plugins/counsel/skills/welcome/SKILL.md +136 -0
- package/dist/plugins/counsel/skills/wizard/SKILL.md +411 -0
- package/dist/plugins/cruise/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/cruise/skills/autopilot/SKILL.md +425 -0
- package/dist/plugins/forge/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/forge/agents/architect.md +174 -0
- package/dist/plugins/forge/agents/code-reviewer.md +115 -0
- package/dist/plugins/forge/agents/frontend.md +261 -0
- package/dist/plugins/forge/agents/product-manager.md +563 -0
- package/dist/plugins/forge/agents/python-backend.md +286 -0
- package/dist/plugins/forge/agents/qa.md +226 -0
- package/dist/plugins/forge/hooks/hooks.json +28 -0
- package/dist/plugins/forge/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/forge/hooks/triage-router.sh +740 -0
- package/dist/plugins/forge/skills/implement/SKILL.md +532 -0
- package/dist/plugins/forge/skills/planning/SKILL.md +436 -0
- package/dist/plugins/forge/skills/pr/SKILL.md +275 -0
- package/dist/plugins/forge/skills/precheck/SKILL.md +159 -0
- package/dist/plugins/forge/skills/qa/SKILL.md +127 -0
- package/dist/plugins/forge/skills/review-pr/SKILL.md +367 -0
- package/dist/plugins/prime/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/prime/agents/ai-consultant.md +999 -0
- package/dist/plugins/prime/agents/architect.md +174 -0
- package/dist/plugins/prime/agents/code-reviewer.md +115 -0
- package/dist/plugins/prime/agents/competitive-analyst.md +688 -0
- package/dist/plugins/prime/agents/content-strategist.md +607 -0
- package/dist/plugins/prime/agents/design-studio-create.md +304 -0
- package/dist/plugins/prime/agents/design-studio-critique.md +258 -0
- package/dist/plugins/prime/agents/design-studio-think.md +79 -0
- package/dist/plugins/prime/agents/explore-light.md +52 -0
- package/dist/plugins/prime/agents/frontend.md +261 -0
- package/dist/plugins/prime/agents/gtm-expert.md +811 -0
- package/dist/plugins/prime/agents/meeting-prep.md +318 -0
- package/dist/plugins/prime/agents/ops.md +149 -0
- package/dist/plugins/prime/agents/product-manager.md +563 -0
- package/dist/plugins/prime/agents/python-backend.md +286 -0
- package/dist/plugins/prime/agents/qa-baseline-updater.md +45 -0
- package/dist/plugins/prime/agents/qa-challenger.md +97 -0
- package/dist/plugins/prime/agents/qa-domain.md +145 -0
- package/dist/plugins/prime/agents/qa-e2e.md +184 -0
- package/dist/plugins/prime/agents/qa-test-promoter.md +97 -0
- package/dist/plugins/prime/agents/qa.md +226 -0
- package/dist/plugins/prime/agents/setup.md +134 -0
- package/dist/plugins/prime/agents/sre.md +165 -0
- package/dist/plugins/prime/agents/stakeholder-reporter.md +94 -0
- package/dist/plugins/prime/agents/user-researcher.md +602 -0
- package/dist/plugins/prime/hooks/check-deliverable.sh +65 -0
- package/dist/plugins/prime/hooks/ensure-client-dir.sh +59 -0
- package/dist/plugins/prime/hooks/hooks.json +184 -0
- package/dist/plugins/prime/hooks/post-deploy-health.sh +83 -0
- package/dist/plugins/prime/hooks/post-diff-test-compare.sh +125 -0
- package/dist/plugins/prime/hooks/post-edit-lint.sh +92 -0
- package/dist/plugins/prime/hooks/post-git-state.sh +54 -0
- package/dist/plugins/prime/hooks/post-merge-cleanup.sh +101 -0
- package/dist/plugins/prime/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/prime/hooks/pre-bash-guard.sh +142 -0
- package/dist/plugins/prime/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/prime/hooks/pre-task-context.sh +113 -0
- package/dist/plugins/prime/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/prime/hooks/session-end.sh +107 -0
- package/dist/plugins/prime/hooks/session-summary.sh +97 -0
- package/dist/plugins/prime/hooks/sync-agents.sh +269 -0
- package/dist/plugins/prime/hooks/triage-router.sh +740 -0
- package/dist/plugins/prime/skills/arth/SKILL.md +165 -0
- package/dist/plugins/prime/skills/autopilot/SKILL.md +425 -0
- package/dist/plugins/prime/skills/calibrate/SKILL.md +1807 -0
- package/dist/plugins/prime/skills/ci-fix/SKILL.md +293 -0
- package/dist/plugins/prime/skills/client-discovery/SKILL.md +266 -0
- package/dist/plugins/prime/skills/consulting/SKILL.md +282 -0
- package/dist/plugins/prime/skills/custom-domain/SKILL.md +261 -0
- package/dist/plugins/prime/skills/deliverable-builder/SKILL.md +928 -0
- package/dist/plugins/prime/skills/discord-ops/SKILL.md +125 -0
- package/dist/plugins/prime/skills/engagement-tracker/SKILL.md +380 -0
- package/dist/plugins/prime/skills/explore.md +43 -0
- package/dist/plugins/prime/skills/fix/SKILL.md +1058 -0
- package/dist/plugins/prime/skills/implement/SKILL.md +532 -0
- package/dist/plugins/prime/skills/incident/SKILL.md +910 -0
- package/dist/plugins/prime/skills/issue/SKILL.md +134 -0
- package/dist/plugins/prime/skills/market-research/SKILL.md +300 -0
- package/dist/plugins/prime/skills/onboard/SKILL.md +344 -0
- package/dist/plugins/prime/skills/opportunity-map/SKILL.md +307 -0
- package/dist/plugins/prime/skills/pitch-generator/SKILL.md +378 -0
- package/dist/plugins/prime/skills/planning/SKILL.md +436 -0
- package/dist/plugins/prime/skills/pr/SKILL.md +275 -0
- package/dist/plugins/prime/skills/precheck/SKILL.md +159 -0
- package/dist/plugins/prime/skills/qa/SKILL.md +127 -0
- package/dist/plugins/prime/skills/qa-incident/SKILL.md +54 -0
- package/dist/plugins/prime/skills/qa-learn/SKILL.md +47 -0
- package/dist/plugins/prime/skills/restart/SKILL.md +70 -0
- package/dist/plugins/prime/skills/review-pr/SKILL.md +367 -0
- package/dist/plugins/prime/skills/roi-calculator/SKILL.md +469 -0
- package/dist/plugins/prime/skills/scan/SKILL.md +232 -0
- package/dist/plugins/prime/skills/setup/SKILL.md +691 -0
- package/dist/plugins/prime/skills/share/SKILL.md +211 -0
- package/dist/plugins/prime/skills/solution-architect/SKILL.md +566 -0
- package/dist/plugins/prime/skills/sre/SKILL.md +362 -0
- package/dist/plugins/prime/skills/sync/SKILL.md +188 -0
- package/dist/plugins/prime/skills/templates/SKILL.md +194 -0
- package/dist/plugins/prime/skills/welcome/SKILL.md +136 -0
- package/dist/plugins/prime/skills/wizard/SKILL.md +411 -0
- package/dist/plugins/prism/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/prism/agents/qa-baseline-updater.md +45 -0
- package/dist/plugins/prism/agents/qa-challenger.md +97 -0
- package/dist/plugins/prism/agents/qa-domain.md +145 -0
- package/dist/plugins/prism/agents/qa-e2e.md +184 -0
- package/dist/plugins/prism/agents/qa-test-promoter.md +97 -0
- package/dist/plugins/prism/agents/qa.md +226 -0
- package/dist/plugins/prism/hooks/hooks.json +26 -0
- package/dist/plugins/prism/hooks/post-diff-test-compare.sh +125 -0
- package/dist/plugins/prism/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/prism/skills/qa/SKILL.md +127 -0
- package/dist/plugins/prism/skills/qa-incident/SKILL.md +54 -0
- package/dist/plugins/prism/skills/qa-learn/SKILL.md +47 -0
- package/dist/plugins/scalpel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/scalpel/agents/code-reviewer.md +115 -0
- package/dist/plugins/scalpel/hooks/hooks.json +26 -0
- package/dist/plugins/scalpel/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/scalpel/skills/ci-fix/SKILL.md +293 -0
- package/dist/plugins/scalpel/skills/fix/SKILL.md +1058 -0
- package/dist/plugins/scalpel/skills/issue/SKILL.md +134 -0
- package/dist/plugins/sentinel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/sentinel/agents/ops.md +149 -0
- package/dist/plugins/sentinel/agents/sre.md +165 -0
- package/dist/plugins/sentinel/hooks/hooks.json +26 -0
- package/dist/plugins/sentinel/hooks/post-deploy-health.sh +83 -0
- package/dist/plugins/sentinel/hooks/post-git-state.sh +54 -0
- package/dist/plugins/sentinel/skills/incident/SKILL.md +910 -0
- package/dist/plugins/sentinel/skills/restart/SKILL.md +70 -0
- package/dist/plugins/sentinel/skills/sre/SKILL.md +362 -0
- package/dist/plugins/shield/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/shield/hooks/hooks.json +60 -0
- package/dist/plugins/shield/hooks/pre-bash-guard.sh +142 -0
- package/dist/plugins/shield/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/shield/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/shield/hooks/triage-router.sh +740 -0
- package/dist/plugins/spark/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/spark/agents/explore-light.md +52 -0
- package/dist/plugins/spark/agents/setup.md +134 -0
- package/dist/plugins/spark/hooks/hooks.json +16 -0
- package/dist/plugins/spark/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/spark/skills/calibrate/SKILL.md +1807 -0
- package/dist/plugins/spark/skills/onboard/SKILL.md +344 -0
- package/dist/plugins/spark/skills/scan/SKILL.md +232 -0
- package/dist/plugins/spark/skills/setup/SKILL.md +691 -0
- package/hook-defs.json +104 -0
- package/hooks/check-deliverable.sh +65 -0
- package/hooks/ensure-client-dir.sh +59 -0
- package/hooks/hooks.json +16 -0
- package/hooks/post-deploy-health.sh +83 -0
- package/hooks/post-diff-test-compare.sh +125 -0
- package/hooks/post-edit-lint.sh +92 -0
- package/hooks/post-git-state.sh +54 -0
- package/hooks/post-merge-cleanup.sh +101 -0
- package/hooks/post-test-summary.sh +115 -0
- package/hooks/pre-bash-guard.sh +142 -0
- package/hooks/pre-edit-guard.sh +121 -0
- package/hooks/pre-task-context.sh +113 -0
- package/hooks/session-bootstrap.sh +379 -0
- package/hooks/session-end.sh +107 -0
- package/hooks/session-start.sh +46 -0
- package/hooks/session-summary.sh +97 -0
- package/hooks/sync-agents.sh +269 -0
- package/hooks/triage-router.sh +740 -0
- package/install.sh +3185 -0
- package/package.json +40 -0
- package/portable.manifest +112 -0
- package/skills/arth/SKILL.md +165 -0
- package/skills/autopilot/SKILL.md +425 -0
- package/skills/calibrate/SKILL.md +1807 -0
- package/skills/ci-fix/SKILL.md +293 -0
- package/skills/client-discovery/SKILL.md +266 -0
- package/skills/consulting/SKILL.md +282 -0
- package/skills/continue/SKILL.md +174 -0
- package/skills/custom-domain/SKILL.md +261 -0
- package/skills/deliverable-builder/SKILL.md +928 -0
- package/skills/discord-ops/SKILL.md +125 -0
- package/skills/engagement-tracker/SKILL.md +380 -0
- package/skills/explore.md +43 -0
- package/skills/fix/SKILL.md +1058 -0
- package/skills/implement/SKILL.md +532 -0
- package/skills/incident/SKILL.md +910 -0
- package/skills/issue/SKILL.md +134 -0
- package/skills/market-research/SKILL.md +300 -0
- package/skills/onboard/SKILL.md +344 -0
- package/skills/opportunity-map/SKILL.md +307 -0
- package/skills/pitch-generator/SKILL.md +378 -0
- package/skills/planning/SKILL.md +436 -0
- package/skills/pr/SKILL.md +275 -0
- package/skills/precheck/SKILL.md +159 -0
- package/skills/qa/SKILL.md +127 -0
- package/skills/qa-incident/SKILL.md +54 -0
- package/skills/qa-learn/SKILL.md +47 -0
- package/skills/railway/central-station/SKILL.md +226 -0
- package/skills/railway/central-station/references/environment-config.md +183 -0
- package/skills/railway/central-station/references/monorepo.md +216 -0
- package/skills/railway/central-station/references/railpack.md +257 -0
- package/skills/railway/central-station/references/variables.md +170 -0
- package/skills/railway/database/SKILL.md +284 -0
- package/skills/railway/database/references/environment-config.md +183 -0
- package/skills/railway/database/references/monorepo.md +216 -0
- package/skills/railway/database/references/railpack.md +257 -0
- package/skills/railway/database/references/variables.md +170 -0
- package/skills/railway/database/scripts/railway-api.sh +41 -0
- package/skills/railway/deploy/SKILL.md +128 -0
- package/skills/railway/deploy/references/environment-config.md +183 -0
- package/skills/railway/deploy/references/monorepo.md +216 -0
- package/skills/railway/deploy/references/railpack.md +257 -0
- package/skills/railway/deploy/references/variables.md +170 -0
- package/skills/railway/deployment/SKILL.md +222 -0
- package/skills/railway/deployment/references/environment-config.md +183 -0
- package/skills/railway/deployment/references/monorepo.md +216 -0
- package/skills/railway/deployment/references/railpack.md +257 -0
- package/skills/railway/deployment/references/variables.md +170 -0
- package/skills/railway/domain/SKILL.md +137 -0
- package/skills/railway/domain/references/environment-config.md +183 -0
- package/skills/railway/domain/references/monorepo.md +216 -0
- package/skills/railway/domain/references/railpack.md +257 -0
- package/skills/railway/domain/references/variables.md +170 -0
- package/skills/railway/environment/SKILL.md +266 -0
- package/skills/railway/environment/references/environment-config.md +183 -0
- package/skills/railway/environment/references/monorepo.md +216 -0
- package/skills/railway/environment/references/railpack.md +257 -0
- package/skills/railway/environment/references/variables.md +170 -0
- package/skills/railway/metrics/SKILL.md +211 -0
- package/skills/railway/metrics/references/environment-config.md +183 -0
- package/skills/railway/metrics/references/monorepo.md +216 -0
- package/skills/railway/metrics/references/railpack.md +257 -0
- package/skills/railway/metrics/references/variables.md +170 -0
- package/skills/railway/metrics/scripts/railway-api.sh +41 -0
- package/skills/railway/new/SKILL.md +489 -0
- package/skills/railway/new/references/environment-config.md +183 -0
- package/skills/railway/new/references/monorepo.md +216 -0
- package/skills/railway/new/references/railpack.md +257 -0
- package/skills/railway/new/references/variables.md +170 -0
- package/skills/railway/projects/SKILL.md +142 -0
- package/skills/railway/projects/references/environment-config.md +183 -0
- package/skills/railway/projects/references/monorepo.md +216 -0
- package/skills/railway/projects/references/railpack.md +257 -0
- package/skills/railway/projects/references/variables.md +170 -0
- package/skills/railway/projects/scripts/railway-api.sh +41 -0
- package/skills/railway/railway-docs/SKILL.md +47 -0
- package/skills/railway/railway-docs/references/environment-config.md +183 -0
- package/skills/railway/railway-docs/references/monorepo.md +216 -0
- package/skills/railway/railway-docs/references/railpack.md +257 -0
- package/skills/railway/railway-docs/references/variables.md +170 -0
- package/skills/railway/service/SKILL.md +249 -0
- package/skills/railway/service/references/environment-config.md +183 -0
- package/skills/railway/service/references/monorepo.md +216 -0
- package/skills/railway/service/references/railpack.md +257 -0
- package/skills/railway/service/references/variables.md +170 -0
- package/skills/railway/service/scripts/railway-api.sh +41 -0
- package/skills/railway/status/SKILL.md +91 -0
- package/skills/railway/status/references/environment-config.md +183 -0
- package/skills/railway/status/references/monorepo.md +216 -0
- package/skills/railway/status/references/railpack.md +257 -0
- package/skills/railway/status/references/variables.md +170 -0
- package/skills/railway/templates/SKILL.md +275 -0
- package/skills/railway/templates/references/environment-config.md +183 -0
- package/skills/railway/templates/references/monorepo.md +216 -0
- package/skills/railway/templates/references/railpack.md +257 -0
- package/skills/railway/templates/references/variables.md +170 -0
- package/skills/railway/templates/scripts/railway-api.sh +41 -0
- package/skills/restart/SKILL.md +70 -0
- package/skills/review-pr/SKILL.md +367 -0
- package/skills/roi-calculator/SKILL.md +469 -0
- package/skills/scan/SKILL.md +232 -0
- package/skills/setup/SKILL.md +691 -0
- package/skills/share/SKILL.md +211 -0
- package/skills/solution-architect/SKILL.md +566 -0
- package/skills/sre/SKILL.md +362 -0
- package/skills/superpowers/brainstorming/SKILL.md +96 -0
- package/skills/superpowers/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/superpowers/executing-plans/SKILL.md +84 -0
- package/skills/superpowers/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/superpowers/receiving-code-review/SKILL.md +213 -0
- package/skills/superpowers/requesting-code-review/SKILL.md +105 -0
- package/skills/superpowers/requesting-code-review/code-reviewer.md +146 -0
- package/skills/superpowers/subagent-driven-development/SKILL.md +242 -0
- package/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/superpowers/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/superpowers/systematic-debugging/SKILL.md +296 -0
- package/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/superpowers/test-driven-development/SKILL.md +371 -0
- package/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/superpowers/using-git-worktrees/SKILL.md +218 -0
- package/skills/superpowers/using-superpowers/SKILL.md +95 -0
- package/skills/superpowers/verification-before-completion/SKILL.md +139 -0
- package/skills/superpowers/writing-plans/SKILL.md +116 -0
- package/skills/superpowers/writing-skills/SKILL.md +655 -0
- package/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/sync/SKILL.md +188 -0
- package/skills/templates/SKILL.md +194 -0
- package/skills/welcome/SKILL.md +136 -0
- package/skills/wizard/SKILL.md +411 -0
- package/templates/CLAUDE.md.managed-block +123 -0
- package/templates/CLAUDE.md.template +111 -0
- package/templates/consulting/engagement-tracker-template.md +181 -0
- package/templates/consulting/executive-summary-template.md +83 -0
- package/templates/consulting/maturity-assessment-template.md +182 -0
- package/templates/consulting/proposal-template.md +209 -0
- package/templates/consulting/roi-model-template.md +139 -0
- package/templates/consulting/solution-architecture-template.md +313 -0
- package/templates/settings.json +130 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SessionStart hook: Gather project context and inject a compact briefing.
|
|
3
|
+
# Runs once when Claude Code opens. Outputs 2-5 lines of context.
|
|
4
|
+
# Non-blocking — degrades gracefully if tools are missing.
|
|
5
|
+
#
|
|
6
|
+
# stdout is injected as context into the conversation.
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
11
|
+
|
|
12
|
+
# ---------------------------------------------------------------------------
|
|
13
|
+
# Clear triage marker — forces full routing table on first message
|
|
14
|
+
# ---------------------------------------------------------------------------
|
|
15
|
+
rm -f "$PROJECT_DIR/.claude/.triage-full-emitted" 2>/dev/null || true
|
|
16
|
+
|
|
17
|
+
# ---------------------------------------------------------------------------
|
|
18
|
+
# Helpers
|
|
19
|
+
# ---------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
# Check if a command exists silently
|
|
22
|
+
has_cmd() { command -v "$1" &>/dev/null; }
|
|
23
|
+
|
|
24
|
+
# Run a command with timeout, return empty on failure
|
|
25
|
+
# Uses perl fallback on macOS where GNU timeout doesn't exist
|
|
26
|
+
safe_run() {
|
|
27
|
+
local timeout_s="${1:-3}"
|
|
28
|
+
shift
|
|
29
|
+
if command -v timeout &>/dev/null; then
|
|
30
|
+
timeout "$timeout_s" "$@" 2>/dev/null || true
|
|
31
|
+
else
|
|
32
|
+
# macOS fallback: run directly (no timeout protection, but at least it works)
|
|
33
|
+
"$@" 2>/dev/null || true
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# ---------------------------------------------------------------------------
|
|
38
|
+
# 1. Project detection
|
|
39
|
+
# ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
project_name=$(basename "$PROJECT_DIR")
|
|
42
|
+
claude_md_exists=false
|
|
43
|
+
[ -f "$PROJECT_DIR/CLAUDE.md" ] && claude_md_exists=true
|
|
44
|
+
|
|
45
|
+
# Detect greenfield vs brownfield
|
|
46
|
+
is_greenfield=true
|
|
47
|
+
if $claude_md_exists; then
|
|
48
|
+
is_greenfield=false
|
|
49
|
+
elif [ -f "$PROJECT_DIR/package.json" ] || [ -f "$PROJECT_DIR/requirements.txt" ] || \
|
|
50
|
+
[ -f "$PROJECT_DIR/go.mod" ] || [ -f "$PROJECT_DIR/Cargo.toml" ] || \
|
|
51
|
+
[ -d "$PROJECT_DIR/src" ] || [ -d "$PROJECT_DIR/app" ]; then
|
|
52
|
+
is_greenfield=false
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# ---------------------------------------------------------------------------
|
|
56
|
+
# 2. Git context (fast — local only)
|
|
57
|
+
# ---------------------------------------------------------------------------
|
|
58
|
+
|
|
59
|
+
branch=""
|
|
60
|
+
uncommitted=0
|
|
61
|
+
ahead_behind=""
|
|
62
|
+
last_commit=""
|
|
63
|
+
stash_count=0
|
|
64
|
+
has_git=false
|
|
65
|
+
|
|
66
|
+
if [ -d "$PROJECT_DIR/.git" ]; then
|
|
67
|
+
has_git=true
|
|
68
|
+
cd "$PROJECT_DIR"
|
|
69
|
+
|
|
70
|
+
branch=$(safe_run 2 git rev-parse --abbrev-ref HEAD)
|
|
71
|
+
uncommitted=$(safe_run 2 git status --short | wc -l | tr -d ' ')
|
|
72
|
+
|
|
73
|
+
# Ahead/behind remote
|
|
74
|
+
upstream=$(safe_run 2 git rev-parse --abbrev-ref '@{upstream}') || true
|
|
75
|
+
if [ -n "$upstream" ]; then
|
|
76
|
+
local_rev=$(safe_run 2 git rev-parse HEAD)
|
|
77
|
+
remote_rev=$(safe_run 2 git rev-parse "$upstream")
|
|
78
|
+
if [ "$local_rev" != "$remote_rev" ]; then
|
|
79
|
+
ahead=$(safe_run 2 git rev-list --count "$upstream..HEAD")
|
|
80
|
+
behind=$(safe_run 2 git rev-list --count "HEAD..$upstream")
|
|
81
|
+
parts=()
|
|
82
|
+
[ "${ahead:-0}" -gt 0 ] && parts+=("${ahead} ahead")
|
|
83
|
+
[ "${behind:-0}" -gt 0 ] && parts+=("${behind} behind")
|
|
84
|
+
if [ ${#parts[@]} -gt 0 ]; then
|
|
85
|
+
ahead_behind=$(IFS=', '; echo "${parts[*]}")
|
|
86
|
+
fi
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
# Last commit (short)
|
|
91
|
+
last_commit=$(safe_run 2 git log -1 --format='%s (%cr)' 2>/dev/null) || true
|
|
92
|
+
|
|
93
|
+
# Stash count
|
|
94
|
+
stash_count=$(safe_run 2 git stash list | wc -l | tr -d ' ')
|
|
95
|
+
|
|
96
|
+
cd - >/dev/null 2>&1 || true
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# ---------------------------------------------------------------------------
|
|
100
|
+
# 3. Environment health (from CLAUDE.md + docker + alembic)
|
|
101
|
+
# ---------------------------------------------------------------------------
|
|
102
|
+
|
|
103
|
+
docker_status=""
|
|
104
|
+
alembic_status=""
|
|
105
|
+
mcp_status=""
|
|
106
|
+
|
|
107
|
+
# Docker container health (if docker is available and CLAUDE.md mentions docker)
|
|
108
|
+
if has_cmd docker && docker info &>/dev/null 2>&1; then
|
|
109
|
+
running_containers=$(safe_run 3 docker ps --format '{{.Names}}' | tr '\n' ' ')
|
|
110
|
+
# Check common DB containers
|
|
111
|
+
for svc in postgres redis mysql mongo; do
|
|
112
|
+
if echo "$running_containers" | grep -qi "$svc"; then
|
|
113
|
+
docker_status="${docker_status}${svc} ✓ "
|
|
114
|
+
else
|
|
115
|
+
# Only flag if the project likely uses this service
|
|
116
|
+
if [ -f "$PROJECT_DIR/docker-compose.yml" ] && grep -qi "$svc" "$PROJECT_DIR/docker-compose.yml" 2>/dev/null; then
|
|
117
|
+
docker_status="${docker_status}${svc} ✗ "
|
|
118
|
+
fi
|
|
119
|
+
fi
|
|
120
|
+
done
|
|
121
|
+
docker_status=$(echo "$docker_status" | sed 's/ $//')
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
# Alembic migration status (if alembic dir exists)
|
|
125
|
+
if [ -d "$PROJECT_DIR/backend/migrations" ] || [ -d "$PROJECT_DIR/migrations" ] || [ -d "$PROJECT_DIR/alembic" ]; then
|
|
126
|
+
# Find the venv
|
|
127
|
+
venv_activate=""
|
|
128
|
+
for v in "$PROJECT_DIR/backend/.venv/bin/activate" "$PROJECT_DIR/.venv/bin/activate" "$PROJECT_DIR/venv/bin/activate"; do
|
|
129
|
+
if [ -f "$v" ]; then
|
|
130
|
+
venv_activate="$v"
|
|
131
|
+
break
|
|
132
|
+
fi
|
|
133
|
+
done
|
|
134
|
+
|
|
135
|
+
if [ -n "$venv_activate" ]; then
|
|
136
|
+
alembic_dir=""
|
|
137
|
+
for d in "$PROJECT_DIR/backend" "$PROJECT_DIR"; do
|
|
138
|
+
if [ -f "$d/alembic.ini" ]; then
|
|
139
|
+
alembic_dir="$d"
|
|
140
|
+
break
|
|
141
|
+
fi
|
|
142
|
+
done
|
|
143
|
+
|
|
144
|
+
if [ -n "$alembic_dir" ]; then
|
|
145
|
+
current=$(cd "$alembic_dir" && source "$venv_activate" && safe_run 3 alembic current 2>/dev/null | head -1 | awk '{print $1}') || true
|
|
146
|
+
head_rev=$(cd "$alembic_dir" && source "$venv_activate" && safe_run 3 alembic heads 2>/dev/null | head -1 | awk '{print $1}') || true
|
|
147
|
+
if [ -n "$current" ] && [ -n "$head_rev" ]; then
|
|
148
|
+
if [ "$current" = "$head_rev" ]; then
|
|
149
|
+
alembic_status="✓"
|
|
150
|
+
else
|
|
151
|
+
alembic_status="⚠ pending migrations"
|
|
152
|
+
fi
|
|
153
|
+
fi
|
|
154
|
+
fi
|
|
155
|
+
fi
|
|
156
|
+
fi
|
|
157
|
+
|
|
158
|
+
# Railway MCP check (if configured)
|
|
159
|
+
if has_cmd railway; then
|
|
160
|
+
railway_check=$(safe_run 3 railway whoami 2>&1) || true
|
|
161
|
+
if echo "$railway_check" | grep -qi "error\|not logged\|unauthenticated"; then
|
|
162
|
+
mcp_status="Railway: expired (run railway login)"
|
|
163
|
+
fi
|
|
164
|
+
fi
|
|
165
|
+
|
|
166
|
+
# ---------------------------------------------------------------------------
|
|
167
|
+
# 4. GitHub context (if gh available — PRs, issues)
|
|
168
|
+
# ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
pr_summary=""
|
|
171
|
+
issue_summary=""
|
|
172
|
+
|
|
173
|
+
if has_cmd gh && $has_git; then
|
|
174
|
+
cd "$PROJECT_DIR"
|
|
175
|
+
|
|
176
|
+
# My open PRs
|
|
177
|
+
my_prs=$(safe_run 5 gh pr list --author @me --json number,title,reviewDecision,comments --limit 5 2>/dev/null) || true
|
|
178
|
+
if [ -n "$my_prs" ] && [ "$my_prs" != "[]" ]; then
|
|
179
|
+
pr_count=$(echo "$my_prs" | python3 -c "import json,sys; print(len(json.load(sys.stdin)))" 2>/dev/null) || true
|
|
180
|
+
if [ "${pr_count:-0}" -gt 0 ]; then
|
|
181
|
+
pr_summary="${pr_count} open PR(s)"
|
|
182
|
+
# Check for unresolved review comments
|
|
183
|
+
needs_review=$(echo "$my_prs" | python3 -c "
|
|
184
|
+
import json,sys
|
|
185
|
+
prs=json.load(sys.stdin)
|
|
186
|
+
needs=sum(1 for p in prs if p.get('reviewDecision') in ('CHANGES_REQUESTED',None) and p.get('comments',0)>0)
|
|
187
|
+
if needs: print(f', {needs} need attention')
|
|
188
|
+
" 2>/dev/null) || true
|
|
189
|
+
pr_summary="${pr_summary}${needs_review}"
|
|
190
|
+
fi
|
|
191
|
+
fi
|
|
192
|
+
|
|
193
|
+
# My assigned issues
|
|
194
|
+
my_issues=$(safe_run 5 gh issue list --assignee @me --json number,title --limit 5 2>/dev/null) || true
|
|
195
|
+
if [ -n "$my_issues" ] && [ "$my_issues" != "[]" ]; then
|
|
196
|
+
issue_count=$(echo "$my_issues" | python3 -c "import json,sys; print(len(json.load(sys.stdin)))" 2>/dev/null) || true
|
|
197
|
+
if [ "${issue_count:-0}" -gt 0 ]; then
|
|
198
|
+
issue_summary="${issue_count} assigned issue(s)"
|
|
199
|
+
fi
|
|
200
|
+
fi
|
|
201
|
+
|
|
202
|
+
cd - >/dev/null 2>&1 || true
|
|
203
|
+
fi
|
|
204
|
+
|
|
205
|
+
# ---------------------------------------------------------------------------
|
|
206
|
+
# 5. Active plans
|
|
207
|
+
# ---------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
active_plan=""
|
|
210
|
+
if [ -d "$PROJECT_DIR/.claude/plans" ]; then
|
|
211
|
+
plan_files=$(find "$PROJECT_DIR/.claude/plans" -name "*.md" -newer "$PROJECT_DIR/.claude" 2>/dev/null | head -1) || true
|
|
212
|
+
if [ -n "$plan_files" ]; then
|
|
213
|
+
active_plan=$(basename "$plan_files")
|
|
214
|
+
fi
|
|
215
|
+
fi
|
|
216
|
+
|
|
217
|
+
# ---------------------------------------------------------------------------
|
|
218
|
+
# 6. Session continuity (previous session detection)
|
|
219
|
+
# ---------------------------------------------------------------------------
|
|
220
|
+
|
|
221
|
+
session_hint=""
|
|
222
|
+
|
|
223
|
+
# Check for existing session-state summary (written by /continue skill)
|
|
224
|
+
if [ -f "$PROJECT_DIR/.claude/session-state/latest.md" ]; then
|
|
225
|
+
# Check if it's less than 7 days old
|
|
226
|
+
if [ "$(uname)" = "Darwin" ]; then
|
|
227
|
+
file_age=$(( $(date +%s) - $(stat -f%m "$PROJECT_DIR/.claude/session-state/latest.md") ))
|
|
228
|
+
else
|
|
229
|
+
file_age=$(( $(date +%s) - $(stat -c%Y "$PROJECT_DIR/.claude/session-state/latest.md") ))
|
|
230
|
+
fi
|
|
231
|
+
if [ "$file_age" -lt 604800 ]; then
|
|
232
|
+
# Extract first "What Was Done" bullet for a preview
|
|
233
|
+
preview=$(grep -m1 "^- " "$PROJECT_DIR/.claude/session-state/latest.md" 2>/dev/null | head -c 80) || true
|
|
234
|
+
if [ -n "$preview" ]; then
|
|
235
|
+
session_hint="Previous session: ${preview}... — /continue for details"
|
|
236
|
+
else
|
|
237
|
+
session_hint="Previous session summary available — /continue for details"
|
|
238
|
+
fi
|
|
239
|
+
fi
|
|
240
|
+
fi
|
|
241
|
+
|
|
242
|
+
# If no session-state, check for recent transcript JSONL
|
|
243
|
+
if [ -z "$session_hint" ]; then
|
|
244
|
+
TRANSCRIPT_DIR_NAME=$(echo "$PROJECT_DIR" | sed 's|/|-|g')
|
|
245
|
+
TRANSCRIPT_DIR="$HOME/.claude/projects/${TRANSCRIPT_DIR_NAME}"
|
|
246
|
+
if [ -d "$TRANSCRIPT_DIR" ]; then
|
|
247
|
+
# Find the 2nd newest JSONL (newest is current session)
|
|
248
|
+
prev_transcript=$(ls -t "$TRANSCRIPT_DIR"/*.jsonl 2>/dev/null | sed -n '2p') || true
|
|
249
|
+
if [ -n "$prev_transcript" ]; then
|
|
250
|
+
# Check if it's less than 3 days old
|
|
251
|
+
if [ "$(uname)" = "Darwin" ]; then
|
|
252
|
+
t_age=$(( $(date +%s) - $(stat -f%m "$prev_transcript") ))
|
|
253
|
+
else
|
|
254
|
+
t_age=$(( $(date +%s) - $(stat -c%Y "$prev_transcript") ))
|
|
255
|
+
fi
|
|
256
|
+
if [ "$t_age" -lt 259200 ]; then
|
|
257
|
+
session_hint="Recent session detected — /continue to pick up where you left off"
|
|
258
|
+
fi
|
|
259
|
+
fi
|
|
260
|
+
fi
|
|
261
|
+
fi
|
|
262
|
+
|
|
263
|
+
# ---------------------------------------------------------------------------
|
|
264
|
+
# 7. Output — compact briefing (max 6 lines)
|
|
265
|
+
# ---------------------------------------------------------------------------
|
|
266
|
+
|
|
267
|
+
# Line 1: Project + branch
|
|
268
|
+
line1="📋 ${project_name}"
|
|
269
|
+
if $is_greenfield; then
|
|
270
|
+
line1="${line1} — new project (no code detected)"
|
|
271
|
+
elif $has_git && [ -n "$branch" ]; then
|
|
272
|
+
line1="${line1} — ${branch}"
|
|
273
|
+
[ -n "$ahead_behind" ] && line1="${line1} (${ahead_behind})"
|
|
274
|
+
fi
|
|
275
|
+
echo "$line1"
|
|
276
|
+
|
|
277
|
+
# Line 2: Red flags (only if there are problems)
|
|
278
|
+
flags=()
|
|
279
|
+
[ -n "$docker_status" ] && echo "$docker_status" | grep -q "✗" && flags+=("Docker: ${docker_status}")
|
|
280
|
+
[ "$alembic_status" = "⚠ pending migrations" ] && flags+=("Alembic: ${alembic_status}")
|
|
281
|
+
[ -n "$mcp_status" ] && flags+=("⚠ ${mcp_status}")
|
|
282
|
+
|
|
283
|
+
if [ ${#flags[@]} -gt 0 ]; then
|
|
284
|
+
echo " $(IFS=' · '; echo "${flags[*]}")"
|
|
285
|
+
fi
|
|
286
|
+
|
|
287
|
+
# Line 3: Context (uncommitted, plan, last commit)
|
|
288
|
+
context_parts=()
|
|
289
|
+
[ "${uncommitted:-0}" -gt 0 ] && context_parts+=("${uncommitted} uncommitted files")
|
|
290
|
+
[ -n "$active_plan" ] && context_parts+=("Plan: ${active_plan}")
|
|
291
|
+
[ "${stash_count:-0}" -gt 0 ] && context_parts+=("${stash_count} stash(es)")
|
|
292
|
+
|
|
293
|
+
if [ ${#context_parts[@]} -gt 0 ]; then
|
|
294
|
+
echo " $(IFS=' · '; echo "${context_parts[*]}")"
|
|
295
|
+
fi
|
|
296
|
+
|
|
297
|
+
# Line 4: GitHub context (PRs, issues)
|
|
298
|
+
gh_parts=()
|
|
299
|
+
[ -n "$pr_summary" ] && gh_parts+=("$pr_summary")
|
|
300
|
+
[ -n "$issue_summary" ] && gh_parts+=("$issue_summary")
|
|
301
|
+
|
|
302
|
+
if [ ${#gh_parts[@]} -gt 0 ]; then
|
|
303
|
+
echo " $(IFS=' · '; echo "${gh_parts[*]}")"
|
|
304
|
+
fi
|
|
305
|
+
|
|
306
|
+
# Line 5: Toolkit status (show what's active)
|
|
307
|
+
toolkit_parts=()
|
|
308
|
+
if [ -f "$PROJECT_DIR/.claude/hooks/triage-router.sh" ] || [ -L "$PROJECT_DIR/.claude/hooks/triage-router.sh" ]; then
|
|
309
|
+
toolkit_parts+=("Triage router: active")
|
|
310
|
+
fi
|
|
311
|
+
if [ -f "$PROJECT_DIR/.claude/hooks/pre-bash-guard.sh" ] || [ -L "$PROJECT_DIR/.claude/hooks/pre-bash-guard.sh" ]; then
|
|
312
|
+
toolkit_parts+=("Guard rails: on")
|
|
313
|
+
fi
|
|
314
|
+
if [ ${#toolkit_parts[@]} -gt 0 ]; then
|
|
315
|
+
echo " $(IFS=' · '; echo "${toolkit_parts[*]}")"
|
|
316
|
+
fi
|
|
317
|
+
|
|
318
|
+
# Session continuity hint (if not greenfield)
|
|
319
|
+
if ! $is_greenfield && [ -n "$session_hint" ]; then
|
|
320
|
+
echo " $session_hint"
|
|
321
|
+
fi
|
|
322
|
+
|
|
323
|
+
# Greenfield hint
|
|
324
|
+
if $is_greenfield; then
|
|
325
|
+
echo " Tip: describe what you're building, or type /onboard for guided setup"
|
|
326
|
+
fi
|
|
327
|
+
|
|
328
|
+
# Calibration hint — show for brownfield projects that haven't been calibrated
|
|
329
|
+
if ! $is_greenfield; then
|
|
330
|
+
if [ ! -f "$PROJECT_DIR/.claude/project-profile.md" ]; then
|
|
331
|
+
# Only show if calibrate skill is installed
|
|
332
|
+
if [ -d "$PROJECT_DIR/.claude/skills/calibrate" ] || [ -L "$PROJECT_DIR/.claude/skills/calibrate" ]; then
|
|
333
|
+
echo " Tip: run /calibrate to deep-learn your project and configure MCP servers + agents"
|
|
334
|
+
fi
|
|
335
|
+
else
|
|
336
|
+
# Check knowledge base change detection for drift
|
|
337
|
+
CHANGE_DETECT="$PROJECT_DIR/.claude/knowledge/meta/change-detection.md"
|
|
338
|
+
if [ -f "$CHANGE_DETECT" ]; then
|
|
339
|
+
drift_found=false
|
|
340
|
+
for keyfile in package.json requirements.txt pyproject.toml docker-compose.yml Podfile Package.swift build.gradle pubspec.yaml; do
|
|
341
|
+
if [ -f "$PROJECT_DIR/$keyfile" ]; then
|
|
342
|
+
current_hash=$(shasum -a 256 "$PROJECT_DIR/$keyfile" 2>/dev/null | cut -c1-8)
|
|
343
|
+
stored_hash=$(grep "$keyfile" "$CHANGE_DETECT" 2>/dev/null | awk '{print $4}' | head -1)
|
|
344
|
+
if [ -n "$stored_hash" ] && [ -n "$current_hash" ] && [ "$stored_hash" != "$current_hash" ]; then
|
|
345
|
+
drift_found=true
|
|
346
|
+
break
|
|
347
|
+
fi
|
|
348
|
+
fi
|
|
349
|
+
done
|
|
350
|
+
if $drift_found; then
|
|
351
|
+
echo " ⚠ Project files changed since last calibration — run /calibrate rescan"
|
|
352
|
+
fi
|
|
353
|
+
fi
|
|
354
|
+
fi
|
|
355
|
+
fi
|
|
356
|
+
|
|
357
|
+
# ---------------------------------------------------------------------------
|
|
358
|
+
# 8. Write project state cache (other hooks read this instead of re-computing)
|
|
359
|
+
# ---------------------------------------------------------------------------
|
|
360
|
+
|
|
361
|
+
CACHE_FILE="$PROJECT_DIR/.claude/.project-state-cache.json"
|
|
362
|
+
_cache_json=$(cat <<CACHE_EOF
|
|
363
|
+
{
|
|
364
|
+
"timestamp": $(date +%s),
|
|
365
|
+
"project_name": "$project_name",
|
|
366
|
+
"is_greenfield": $is_greenfield,
|
|
367
|
+
"has_git": $has_git,
|
|
368
|
+
"branch": "${branch:-}",
|
|
369
|
+
"uncommitted": ${uncommitted:-0},
|
|
370
|
+
"ahead_behind": "${ahead_behind:-}",
|
|
371
|
+
"stash_count": ${stash_count:-0},
|
|
372
|
+
"docker_status": "${docker_status:-}",
|
|
373
|
+
"alembic_status": "${alembic_status:-}",
|
|
374
|
+
"mcp_status": "${mcp_status:-}",
|
|
375
|
+
"active_plan": "${active_plan:-}"
|
|
376
|
+
}
|
|
377
|
+
CACHE_EOF
|
|
378
|
+
)
|
|
379
|
+
echo "$_cache_json" > "$CACHE_FILE" 2>/dev/null || true
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SessionEnd hook — saves session state to memory for next conversation
|
|
3
|
+
# Receives JSON on stdin with: session_id, transcript_path, cwd, reason
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Parse stdin
|
|
8
|
+
INPUT=$(cat)
|
|
9
|
+
TRANSCRIPT_PATH=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('transcript_path',''))" 2>/dev/null || echo "")
|
|
10
|
+
SESSION_ID=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('session_id',''))" 2>/dev/null || echo "unknown")
|
|
11
|
+
CWD=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('cwd',''))" 2>/dev/null || echo "")
|
|
12
|
+
|
|
13
|
+
# Skip if no working directory
|
|
14
|
+
if [ -z "$CWD" ]; then
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Derive project memory directory from CWD
|
|
19
|
+
# Claude Code stores project memory at ~/.claude/projects/-<path-with-dashes>/memory/
|
|
20
|
+
PROJECT_KEY=$(echo "$CWD" | sed 's|^/||' | sed 's|/|-|g')
|
|
21
|
+
MEMORY_DIR="$HOME/.claude/projects/-${PROJECT_KEY}/memory"
|
|
22
|
+
SESSION_STATE="$MEMORY_DIR/last-session.md"
|
|
23
|
+
TASK_DIR="$HOME/.claude/tasks"
|
|
24
|
+
|
|
25
|
+
mkdir -p "$MEMORY_DIR"
|
|
26
|
+
|
|
27
|
+
# Get current git state
|
|
28
|
+
BRANCH=$(cd "$CWD" 2>/dev/null && git branch --show-current 2>/dev/null || echo "unknown")
|
|
29
|
+
UNCOMMITTED=$(cd "$CWD" 2>/dev/null && git diff --name-only 2>/dev/null | head -10 || echo "none")
|
|
30
|
+
LAST_COMMIT=$(cd "$CWD" 2>/dev/null && git log --oneline -1 2>/dev/null || echo "unknown")
|
|
31
|
+
|
|
32
|
+
# Get task list state (if any active team)
|
|
33
|
+
TASKS=""
|
|
34
|
+
for team_dir in "$TASK_DIR"/*/; do
|
|
35
|
+
if [ -d "$team_dir" ]; then
|
|
36
|
+
TEAM_NAME=$(basename "$team_dir")
|
|
37
|
+
for task_file in "$team_dir"*.json; do
|
|
38
|
+
if [ -f "$task_file" ]; then
|
|
39
|
+
TASK_INFO=$(python3 -c "
|
|
40
|
+
import json, sys
|
|
41
|
+
try:
|
|
42
|
+
with open('$task_file') as f:
|
|
43
|
+
t = json.load(f)
|
|
44
|
+
status = t.get('status', 'unknown')
|
|
45
|
+
subject = t.get('subject', 'unknown')
|
|
46
|
+
if status != 'completed':
|
|
47
|
+
print(f'- [{status}] {subject}')
|
|
48
|
+
except: pass
|
|
49
|
+
" 2>/dev/null)
|
|
50
|
+
if [ -n "$TASK_INFO" ]; then
|
|
51
|
+
TASKS="$TASKS\n$TASK_INFO"
|
|
52
|
+
fi
|
|
53
|
+
fi
|
|
54
|
+
done
|
|
55
|
+
fi
|
|
56
|
+
done
|
|
57
|
+
|
|
58
|
+
# Extract last ~20 assistant messages from transcript for summary context
|
|
59
|
+
RECENT_CONTEXT=""
|
|
60
|
+
if [ -n "$TRANSCRIPT_PATH" ] && [ -f "$TRANSCRIPT_PATH" ]; then
|
|
61
|
+
RECENT_CONTEXT=$(tail -50 "$TRANSCRIPT_PATH" 2>/dev/null | python3 -c "
|
|
62
|
+
import sys, json
|
|
63
|
+
messages = []
|
|
64
|
+
for line in sys.stdin:
|
|
65
|
+
line = line.strip()
|
|
66
|
+
if not line:
|
|
67
|
+
continue
|
|
68
|
+
try:
|
|
69
|
+
msg = json.loads(line)
|
|
70
|
+
role = msg.get('role', '')
|
|
71
|
+
if role == 'assistant':
|
|
72
|
+
content = msg.get('content', '')
|
|
73
|
+
if isinstance(content, list):
|
|
74
|
+
text_parts = [p.get('text','') for p in content if isinstance(p, dict) and p.get('type') == 'text']
|
|
75
|
+
content = ' '.join(text_parts)
|
|
76
|
+
if isinstance(content, str) and len(content) > 20:
|
|
77
|
+
# Take first 200 chars of each message
|
|
78
|
+
messages.append(content[:200])
|
|
79
|
+
except: pass
|
|
80
|
+
# Show last 5 messages
|
|
81
|
+
for m in messages[-5:]:
|
|
82
|
+
print(f'- {m}')
|
|
83
|
+
" 2>/dev/null || echo "Could not parse transcript")
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Write session state
|
|
87
|
+
cat > "$SESSION_STATE" << ENDOFSTATE
|
|
88
|
+
# Last Session State
|
|
89
|
+
**Updated**: $(date -u +"%Y-%m-%d %H:%M UTC")
|
|
90
|
+
**Session**: $SESSION_ID
|
|
91
|
+
**Branch**: $BRANCH
|
|
92
|
+
**Last Commit**: $LAST_COMMIT
|
|
93
|
+
|
|
94
|
+
## Uncommitted Changes
|
|
95
|
+
$UNCOMMITTED
|
|
96
|
+
|
|
97
|
+
## Pending Tasks
|
|
98
|
+
$(echo -e "$TASKS" | grep -v '^$' || echo "None")
|
|
99
|
+
|
|
100
|
+
## Recent Activity (last 5 messages)
|
|
101
|
+
$RECENT_CONTEXT
|
|
102
|
+
|
|
103
|
+
## Next Steps
|
|
104
|
+
Check /continue for full context restoration.
|
|
105
|
+
ENDOFSTATE
|
|
106
|
+
|
|
107
|
+
exit 0
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: Stop
|
|
3
|
+
# Prints engagement session summary.
|
|
4
|
+
# Shows files modified in the last 2 hours under clients/ directory,
|
|
5
|
+
# grouped by client, with current phase from engagement.json if available.
|
|
6
|
+
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
# Find the project root — look for clients/ directory
|
|
10
|
+
PROJECT_ROOT=""
|
|
11
|
+
if [ -d "clients" ]; then
|
|
12
|
+
PROJECT_ROOT="."
|
|
13
|
+
elif [ -d "../clients" ]; then
|
|
14
|
+
PROJECT_ROOT=".."
|
|
15
|
+
else
|
|
16
|
+
# Try to find it relative to known paths
|
|
17
|
+
for candidate in /Users/pganapathy80/pitch/consulting-toolkit /Users/pganapathy80/pitch; do
|
|
18
|
+
if [ -d "${candidate}/clients" ]; then
|
|
19
|
+
PROJECT_ROOT="$candidate"
|
|
20
|
+
break
|
|
21
|
+
fi
|
|
22
|
+
done
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# If no clients directory found, exit silently
|
|
26
|
+
if [ -z "$PROJECT_ROOT" ]; then
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
CLIENTS_DIR="${PROJECT_ROOT}/clients"
|
|
31
|
+
|
|
32
|
+
# Find markdown files modified in last 2 hours under clients/
|
|
33
|
+
MODIFIED_FILES=$(find "$CLIENTS_DIR" -name '*.md' -mmin -120 -type f 2>/dev/null | sort)
|
|
34
|
+
|
|
35
|
+
# Also check for JSON files (engagement.json, etc.)
|
|
36
|
+
MODIFIED_JSON=$(find "$CLIENTS_DIR" -name '*.json' -mmin -120 -type f 2>/dev/null | sort)
|
|
37
|
+
|
|
38
|
+
ALL_MODIFIED=$(printf '%s\n%s' "$MODIFIED_FILES" "$MODIFIED_JSON" | grep -v '^$' | sort -u)
|
|
39
|
+
|
|
40
|
+
# If nothing was modified, exit silently
|
|
41
|
+
if [ -z "$ALL_MODIFIED" ]; then
|
|
42
|
+
exit 0
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Collect unique client slugs
|
|
46
|
+
CLIENT_SLUGS=$(echo "$ALL_MODIFIED" | sed -n "s|${CLIENTS_DIR}/\([^/]*\)/.*|\1|p" | sort -u)
|
|
47
|
+
|
|
48
|
+
# If no client slugs found, exit silently
|
|
49
|
+
if [ -z "$CLIENT_SLUGS" ]; then
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Count totals
|
|
54
|
+
TOTAL_FILES=$(echo "$ALL_MODIFIED" | wc -l | tr -d ' ')
|
|
55
|
+
TOTAL_CLIENTS=$(echo "$CLIENT_SLUGS" | wc -l | tr -d ' ')
|
|
56
|
+
|
|
57
|
+
# Print summary box
|
|
58
|
+
echo ""
|
|
59
|
+
echo "┌──────────────────────────────────────────────────┐"
|
|
60
|
+
echo "│ SESSION SUMMARY │"
|
|
61
|
+
echo "├──────────────────────────────────────────────────┤"
|
|
62
|
+
printf "│ Files modified: %-30s│\n" "$TOTAL_FILES"
|
|
63
|
+
printf "│ Clients touched: %-30s│\n" "$TOTAL_CLIENTS"
|
|
64
|
+
echo "├──────────────────────────────────────────────────┤"
|
|
65
|
+
|
|
66
|
+
while IFS= read -r SLUG; do
|
|
67
|
+
[ -z "$SLUG" ] && continue
|
|
68
|
+
|
|
69
|
+
# Get current phase from engagement.json if it exists
|
|
70
|
+
PHASE=""
|
|
71
|
+
ENGAGEMENT_FILE="${CLIENTS_DIR}/${SLUG}/engagement.json"
|
|
72
|
+
if [ -f "$ENGAGEMENT_FILE" ]; then
|
|
73
|
+
PHASE=$(grep -o '"currentPhase"[[:space:]]*:[[:space:]]*"[^"]*"' "$ENGAGEMENT_FILE" 2>/dev/null | sed 's/.*"currentPhase"[[:space:]]*:[[:space:]]*"//;s/"$//' | head -1)
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
if [ -n "$PHASE" ]; then
|
|
77
|
+
printf "│ CLIENT: %-20s Phase: %-10s│\n" "$SLUG" "$PHASE"
|
|
78
|
+
else
|
|
79
|
+
printf "│ CLIENT: %-40s│\n" "$SLUG"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# List files for this client
|
|
83
|
+
CLIENT_FILES=$(echo "$ALL_MODIFIED" | grep "${CLIENTS_DIR}/${SLUG}/")
|
|
84
|
+
while IFS= read -r FPATH; do
|
|
85
|
+
[ -z "$FPATH" ] && continue
|
|
86
|
+
# Show path relative to clients/<slug>/
|
|
87
|
+
REL_PATH=$(echo "$FPATH" | sed "s|${CLIENTS_DIR}/${SLUG}/||")
|
|
88
|
+
printf "│ - %-44s│\n" "$REL_PATH"
|
|
89
|
+
done <<< "$CLIENT_FILES"
|
|
90
|
+
|
|
91
|
+
echo "│ │"
|
|
92
|
+
done <<< "$CLIENT_SLUGS"
|
|
93
|
+
|
|
94
|
+
echo "└──────────────────────────────────────────────────┘"
|
|
95
|
+
echo ""
|
|
96
|
+
|
|
97
|
+
exit 0
|