@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
package/hook-defs.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sync-agents": {
|
|
3
|
+
"script": "sync-agents.sh",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"event": "SessionStart",
|
|
7
|
+
"matcher": "",
|
|
8
|
+
"timeout": 30,
|
|
9
|
+
"command_override": "bash -c 'export HOME=$(eval echo ~$(id -un)); [ -x \"$HOME/.claude-agents/hooks/sync-agents.sh\" ] && \"$HOME/.claude-agents/hooks/sync-agents.sh\" || true'"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"triage-router": {
|
|
14
|
+
"script": "triage-router.sh",
|
|
15
|
+
"entries": [
|
|
16
|
+
{"event": "UserPromptSubmit", "matcher": "", "timeout": 5}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"session-bootstrap": {
|
|
20
|
+
"script": "session-bootstrap.sh",
|
|
21
|
+
"entries": [
|
|
22
|
+
{"event": "SessionStart", "matcher": "", "timeout": 15}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"pre-bash-guard": {
|
|
26
|
+
"script": "pre-bash-guard.sh",
|
|
27
|
+
"entries": [
|
|
28
|
+
{"event": "PreToolUse", "matcher": "Bash", "timeout": 5}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"pre-task-context": {
|
|
32
|
+
"script": "pre-task-context.sh",
|
|
33
|
+
"entries": [
|
|
34
|
+
{"event": "PreToolUse", "matcher": "Task", "timeout": 5}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"pre-edit-guard": {
|
|
38
|
+
"script": "pre-edit-guard.sh",
|
|
39
|
+
"entries": [
|
|
40
|
+
{"event": "PreToolUse", "matcher": "Edit", "timeout": 5},
|
|
41
|
+
{"event": "PreToolUse", "matcher": "Write", "timeout": 5}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"post-test-summary": {
|
|
45
|
+
"script": "post-test-summary.sh",
|
|
46
|
+
"entries": [
|
|
47
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 5}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"post-edit-lint": {
|
|
51
|
+
"script": "post-edit-lint.sh",
|
|
52
|
+
"entries": [
|
|
53
|
+
{"event": "PostToolUse", "matcher": "Edit", "timeout": 10}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"post-deploy-health": {
|
|
57
|
+
"script": "post-deploy-health.sh",
|
|
58
|
+
"entries": [
|
|
59
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 15}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"post-diff-test-compare": {
|
|
63
|
+
"script": "post-diff-test-compare.sh",
|
|
64
|
+
"entries": [
|
|
65
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 10}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"post-git-state": {
|
|
69
|
+
"script": "post-git-state.sh",
|
|
70
|
+
"entries": [
|
|
71
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 5}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"post-merge-cleanup": {
|
|
75
|
+
"script": "post-merge-cleanup.sh",
|
|
76
|
+
"entries": [
|
|
77
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 5}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"session-end": {
|
|
81
|
+
"script": "session-end.sh",
|
|
82
|
+
"entries": [
|
|
83
|
+
{"event": "SessionEnd", "matcher": "", "timeout": 15}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"session-summary": {
|
|
87
|
+
"script": "session-summary.sh",
|
|
88
|
+
"entries": [
|
|
89
|
+
{"event": "SessionEnd", "matcher": "", "timeout": 15}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"ensure-client-dir": {
|
|
93
|
+
"script": "ensure-client-dir.sh",
|
|
94
|
+
"entries": [
|
|
95
|
+
{"event": "SessionStart", "matcher": "", "timeout": 5}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"check-deliverable": {
|
|
99
|
+
"script": "check-deliverable.sh",
|
|
100
|
+
"entries": [
|
|
101
|
+
{"event": "PostToolUse", "matcher": "Bash", "timeout": 5}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: PostToolUse (Write)
|
|
3
|
+
# Validates deliverable format after writing.
|
|
4
|
+
# Prints warnings for missing version headers, dates, or executive summaries.
|
|
5
|
+
# Always exits 0 — warnings only, never blocks.
|
|
6
|
+
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
# Extract file_path from CLAUDE_TOOL_INPUT (JSON)
|
|
10
|
+
FILE_PATH=""
|
|
11
|
+
if [ -n "${CLAUDE_TOOL_INPUT:-}" ]; then
|
|
12
|
+
FILE_PATH=$(echo "$CLAUDE_TOOL_INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"//;s/"$//')
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Fall back to first argument
|
|
16
|
+
if [ -z "$FILE_PATH" ] && [ $# -gt 0 ]; then
|
|
17
|
+
FILE_PATH="$1"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Nothing to check if we couldn't determine the file path
|
|
21
|
+
if [ -z "$FILE_PATH" ]; then
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Only check deliverables and proposals
|
|
26
|
+
if ! echo "$FILE_PATH" | grep -qE 'clients/[^/]+/(deliverables|proposals)/'; then
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Resolve the actual file to check
|
|
31
|
+
ACTUAL_FILE="$FILE_PATH"
|
|
32
|
+
if [ ! -f "$ACTUAL_FILE" ]; then
|
|
33
|
+
# File might not exist yet or path might be relative
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
FILENAME=$(basename "$FILE_PATH")
|
|
38
|
+
WARNINGS=0
|
|
39
|
+
|
|
40
|
+
# Check for version header (vX.Y pattern) in first 5 lines
|
|
41
|
+
if ! head -n 5 "$ACTUAL_FILE" | grep -qiE 'v[0-9]+\.[0-9]+'; then
|
|
42
|
+
echo "⚠️ Missing version header (vX.Y) in ${FILENAME}"
|
|
43
|
+
WARNINGS=$((WARNINGS + 1))
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Check for date (YYYY-MM-DD pattern) in first 10 lines
|
|
47
|
+
if ! head -n 10 "$ACTUAL_FILE" | grep -qE '[0-9]{4}-[0-9]{2}-[0-9]{2}'; then
|
|
48
|
+
echo "⚠️ Missing date (YYYY-MM-DD) in ${FILENAME}"
|
|
49
|
+
WARNINGS=$((WARNINGS + 1))
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Check for executive summary if file has more than 50 lines
|
|
53
|
+
LINE_COUNT=$(wc -l < "$ACTUAL_FILE" | tr -d ' ')
|
|
54
|
+
if [ "$LINE_COUNT" -gt 50 ]; then
|
|
55
|
+
if ! grep -qiE '(executive summary|## summary)' "$ACTUAL_FILE"; then
|
|
56
|
+
echo "⚠️ Missing Executive Summary section in ${FILENAME} (${LINE_COUNT} lines)"
|
|
57
|
+
WARNINGS=$((WARNINGS + 1))
|
|
58
|
+
fi
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
if [ "$WARNINGS" -gt 0 ]; then
|
|
62
|
+
echo " ${WARNINGS} format warning(s) for ${FILENAME}"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
exit 0
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Hook: PreToolUse (Write)
|
|
3
|
+
# Blocks writes to client deliverable directories without profile.md
|
|
4
|
+
# Ensures /client-discovery has been run before any deliverables are created.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Extract file_path from CLAUDE_TOOL_INPUT (JSON)
|
|
9
|
+
FILE_PATH=""
|
|
10
|
+
if [ -n "${CLAUDE_TOOL_INPUT:-}" ]; then
|
|
11
|
+
FILE_PATH=$(echo "$CLAUDE_TOOL_INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"//;s/"$//')
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Fall back to first argument if CLAUDE_TOOL_INPUT didn't yield a path
|
|
15
|
+
if [ -z "$FILE_PATH" ] && [ $# -gt 0 ]; then
|
|
16
|
+
FILE_PATH="$1"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Nothing to check if we couldn't determine the file path
|
|
20
|
+
if [ -z "$FILE_PATH" ]; then
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Check if the path matches a client deliverable directory
|
|
25
|
+
# Patterns: clients/<slug>/deliverables/*, clients/<slug>/assessment/*,
|
|
26
|
+
# clients/<slug>/proposals/*, clients/<slug>/architecture/*
|
|
27
|
+
if echo "$FILE_PATH" | grep -qE 'clients/[^/]+/(deliverables|assessment|proposals|architecture)/'; then
|
|
28
|
+
# Extract the client slug (second path component after clients/)
|
|
29
|
+
CLIENT_SLUG=$(echo "$FILE_PATH" | sed -n 's|.*clients/\([^/]*\)/.*|\1|p')
|
|
30
|
+
|
|
31
|
+
if [ -z "$CLIENT_SLUG" ]; then
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Determine the project root by looking for clients/ relative to the file path
|
|
36
|
+
# Try common locations: working directory first, then walk up from the file path
|
|
37
|
+
PROFILE_FOUND=false
|
|
38
|
+
|
|
39
|
+
# Check relative to current working directory
|
|
40
|
+
if [ -f "clients/${CLIENT_SLUG}/profile.md" ]; then
|
|
41
|
+
PROFILE_FOUND=true
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# Check if FILE_PATH is absolute and derive project root
|
|
45
|
+
if [ "$PROFILE_FOUND" = false ] && echo "$FILE_PATH" | grep -q '^/'; then
|
|
46
|
+
PROJECT_ROOT=$(echo "$FILE_PATH" | sed "s|/clients/${CLIENT_SLUG}/.*||")
|
|
47
|
+
if [ -f "${PROJECT_ROOT}/clients/${CLIENT_SLUG}/profile.md" ]; then
|
|
48
|
+
PROFILE_FOUND=true
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if [ "$PROFILE_FOUND" = false ]; then
|
|
53
|
+
echo "❌ Cannot write to ${FILE_PATH} — client profile not found."
|
|
54
|
+
echo " Run /client-discovery ${CLIENT_SLUG} first to create the client profile."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
exit 0
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# PostToolUse hook (Bash): Auto-check health after deploy commands.
|
|
3
|
+
# Detects deploy-related commands and hits health endpoints from CLAUDE.md.
|
|
4
|
+
#
|
|
5
|
+
# stdout is injected as context.
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
10
|
+
|
|
11
|
+
# Extract the command
|
|
12
|
+
COMMAND="${CLAUDE_TOOL_INPUT_COMMAND:-}"
|
|
13
|
+
if [ -z "$COMMAND" ] && [ -n "${CLAUDE_TOOL_INPUT:-}" ]; then
|
|
14
|
+
COMMAND=$(echo "$CLAUDE_TOOL_INPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('command',''))" 2>/dev/null) || true
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
[ -z "$COMMAND" ] && exit 0
|
|
18
|
+
|
|
19
|
+
# ---------------------------------------------------------------------------
|
|
20
|
+
# Detect deploy-related commands
|
|
21
|
+
# ---------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
is_deploy=false
|
|
24
|
+
|
|
25
|
+
# Railway deploys
|
|
26
|
+
echo "$COMMAND" | grep -qE '\brailway\s+(deploy|redeploy)\b' && is_deploy=true
|
|
27
|
+
|
|
28
|
+
# Vercel deploys
|
|
29
|
+
echo "$COMMAND" | grep -qE '\bvercel\s+(deploy|--prod)\b' && is_deploy=true
|
|
30
|
+
|
|
31
|
+
# Fly.io deploys
|
|
32
|
+
echo "$COMMAND" | grep -qE '\bflyctl\s+deploy\b' && is_deploy=true
|
|
33
|
+
|
|
34
|
+
# kubectl apply/rollout
|
|
35
|
+
echo "$COMMAND" | grep -qE '\bkubectl\s+(apply|rollout)\b' && is_deploy=true
|
|
36
|
+
|
|
37
|
+
# Git push to main (triggers auto-deploy on Railway/Vercel/etc.)
|
|
38
|
+
echo "$COMMAND" | grep -qE 'git\s+push.*\b(main|master)\b' && is_deploy=true
|
|
39
|
+
|
|
40
|
+
$is_deploy || exit 0
|
|
41
|
+
|
|
42
|
+
# ---------------------------------------------------------------------------
|
|
43
|
+
# Find health endpoints from CLAUDE.md
|
|
44
|
+
# ---------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
[ ! -f "$PROJECT_DIR/CLAUDE.md" ] && exit 0
|
|
47
|
+
|
|
48
|
+
# Extract URLs that look like health endpoints
|
|
49
|
+
health_urls=$(grep -oE 'https?://[^ ]+/health[^ ]*' "$PROJECT_DIR/CLAUDE.md" 2>/dev/null | head -3) || true
|
|
50
|
+
|
|
51
|
+
if [ -z "$health_urls" ]; then
|
|
52
|
+
# Try to find any domain + /health pattern
|
|
53
|
+
health_urls=$(grep -oE 'https?://[a-zA-Z0-9._-]+\.(app|dev|io|com)[^ ]*/health' "$PROJECT_DIR/CLAUDE.md" 2>/dev/null | head -3) || true
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
[ -z "$health_urls" ] && exit 0
|
|
57
|
+
|
|
58
|
+
# ---------------------------------------------------------------------------
|
|
59
|
+
# Wait briefly then check health
|
|
60
|
+
# ---------------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
# Read deploy wait time from CLAUDE.md, default 30s for cloud deploys
|
|
63
|
+
DEPLOY_WAIT=30
|
|
64
|
+
if [ -f "$PROJECT_DIR/CLAUDE.md" ]; then
|
|
65
|
+
custom_wait=$(grep -oE 'deploy_health_wait:\s*([0-9]+)' "$PROJECT_DIR/CLAUDE.md" 2>/dev/null | head -1 | grep -oE '[0-9]+') || true
|
|
66
|
+
[ -n "$custom_wait" ] && DEPLOY_WAIT="$custom_wait"
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
echo "DEPLOY DETECTED — checking health endpoints (waiting ${DEPLOY_WAIT}s for deploy to propagate)..."
|
|
70
|
+
sleep "$DEPLOY_WAIT"
|
|
71
|
+
|
|
72
|
+
while IFS= read -r url; do
|
|
73
|
+
[ -z "$url" ] && continue
|
|
74
|
+
status=$(timeout 10 curl -sf -o /dev/null -w "%{http_code}" "$url" 2>/dev/null) || status="timeout"
|
|
75
|
+
|
|
76
|
+
if [ "$status" = "200" ]; then
|
|
77
|
+
echo " ✓ ${url} → ${status}"
|
|
78
|
+
else
|
|
79
|
+
echo " ✗ ${url} → ${status}"
|
|
80
|
+
fi
|
|
81
|
+
done <<< "$health_urls"
|
|
82
|
+
|
|
83
|
+
exit 0
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# PostToolUse hook (Bash): Auto-compare test results against /fix baseline.
|
|
3
|
+
# When a /fix is in progress (baseline files exist), any test run is automatically
|
|
4
|
+
# compared against the pre-fix baseline to detect regressions.
|
|
5
|
+
#
|
|
6
|
+
# Detects: pytest, jest, vitest, go test, cargo test, npm test
|
|
7
|
+
# Compares: pass/fail counts + specific test name changes
|
|
8
|
+
#
|
|
9
|
+
# stdout is injected as context — flags PASS→FAIL regressions immediately.
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
COMMAND="${CLAUDE_TOOL_INPUT_COMMAND:-}"
|
|
14
|
+
if [ -z "$COMMAND" ] && [ -n "${CLAUDE_TOOL_INPUT:-}" ]; then
|
|
15
|
+
COMMAND=$(echo "$CLAUDE_TOOL_INPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('command',''))" 2>/dev/null) || true
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
OUTPUT="${CLAUDE_TOOL_OUTPUT:-}"
|
|
19
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
20
|
+
|
|
21
|
+
[ -z "$COMMAND" ] && exit 0
|
|
22
|
+
[ -z "$OUTPUT" ] && exit 0
|
|
23
|
+
|
|
24
|
+
# ---------------------------------------------------------------------------
|
|
25
|
+
# Only run if a /fix baseline exists
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
BASELINE_BACKEND="$PROJECT_DIR/.claude/.fix-baseline-backend.txt"
|
|
29
|
+
BASELINE_FRONTEND="$PROJECT_DIR/.claude/.fix-baseline-frontend.txt"
|
|
30
|
+
|
|
31
|
+
# No baselines = no /fix in progress = nothing to compare
|
|
32
|
+
[ -f "$BASELINE_BACKEND" ] || [ -f "$BASELINE_FRONTEND" ] || exit 0
|
|
33
|
+
|
|
34
|
+
# ---------------------------------------------------------------------------
|
|
35
|
+
# Detect test runner
|
|
36
|
+
# ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
IS_TEST=false
|
|
39
|
+
BASELINE_FILE=""
|
|
40
|
+
|
|
41
|
+
# Python (pytest)
|
|
42
|
+
if echo "$COMMAND" | grep -qE '\bpytest\b|python\s+-m\s+pytest'; then
|
|
43
|
+
IS_TEST=true
|
|
44
|
+
BASELINE_FILE="$BASELINE_BACKEND"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Node (jest, vitest, npm test)
|
|
48
|
+
if echo "$COMMAND" | grep -qE '\bjest\b|\bvitest\b|npm\s+test|npx\s+(jest|vitest)'; then
|
|
49
|
+
IS_TEST=true
|
|
50
|
+
BASELINE_FILE="$BASELINE_FRONTEND"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Go
|
|
54
|
+
if echo "$COMMAND" | grep -qE '\bgo\s+test\b'; then
|
|
55
|
+
IS_TEST=true
|
|
56
|
+
BASELINE_FILE="$BASELINE_BACKEND"
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Rust
|
|
60
|
+
if echo "$COMMAND" | grep -qE '\bcargo\s+test\b'; then
|
|
61
|
+
IS_TEST=true
|
|
62
|
+
BASELINE_FILE="$BASELINE_BACKEND"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
$IS_TEST || exit 0
|
|
66
|
+
[ -f "$BASELINE_FILE" ] || exit 0
|
|
67
|
+
|
|
68
|
+
# ---------------------------------------------------------------------------
|
|
69
|
+
# Extract pass/fail from current run
|
|
70
|
+
# ---------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
extract_counts() {
|
|
73
|
+
local text="$1"
|
|
74
|
+
local passed=0 failed=0
|
|
75
|
+
|
|
76
|
+
# pytest: "X passed, Y failed"
|
|
77
|
+
passed=$(echo "$text" | grep -oE '[0-9]+ passed' | grep -oE '[0-9]+' | head -1) || true
|
|
78
|
+
failed=$(echo "$text" | grep -oE '[0-9]+ failed' | grep -oE '[0-9]+' | head -1) || true
|
|
79
|
+
|
|
80
|
+
# jest/vitest: "Tests: X passed, Y failed"
|
|
81
|
+
if [ -z "$passed" ]; then
|
|
82
|
+
passed=$(echo "$text" | grep -oE 'Tests:.*[0-9]+ passed' | grep -oE '[0-9]+ passed' | grep -oE '[0-9]+') || true
|
|
83
|
+
failed=$(echo "$text" | grep -oE 'Tests:.*[0-9]+ failed' | grep -oE '[0-9]+ failed' | grep -oE '[0-9]+') || true
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# go test: "ok" lines = passed, "FAIL" lines = failed
|
|
87
|
+
if [ -z "$passed" ]; then
|
|
88
|
+
passed=$(echo "$text" | grep -c "^ok" 2>/dev/null) || true
|
|
89
|
+
failed=$(echo "$text" | grep -c "^FAIL" 2>/dev/null) || true
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
echo "${passed:-0} ${failed:-0}"
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Extract from baseline
|
|
96
|
+
read BASELINE_PASSED BASELINE_FAILED <<< "$(extract_counts "$(cat "$BASELINE_FILE")")"
|
|
97
|
+
|
|
98
|
+
# Extract from current run
|
|
99
|
+
read CURRENT_PASSED CURRENT_FAILED <<< "$(extract_counts "$OUTPUT")"
|
|
100
|
+
|
|
101
|
+
# ---------------------------------------------------------------------------
|
|
102
|
+
# Compare and report
|
|
103
|
+
# ---------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
# Calculate changes
|
|
106
|
+
NEW_FAILURES=$((${CURRENT_FAILED:-0} - ${BASELINE_FAILED:-0}))
|
|
107
|
+
NEW_PASSES=$((${CURRENT_PASSED:-0} - ${BASELINE_PASSED:-0}))
|
|
108
|
+
|
|
109
|
+
if [ "${NEW_FAILURES:-0}" -gt 0 ]; then
|
|
110
|
+
echo "⚠️ DIFFERENTIAL TEST WARNING: ${NEW_FAILURES} new failure(s) detected vs pre-fix baseline"
|
|
111
|
+
echo " Baseline: ${BASELINE_PASSED} passed, ${BASELINE_FAILED} failed"
|
|
112
|
+
echo " Current: ${CURRENT_PASSED} passed, ${CURRENT_FAILED} failed"
|
|
113
|
+
echo " → ${NEW_FAILURES} test(s) went from PASS → FAIL — fix may have side effects"
|
|
114
|
+
echo " Check the behavior contract: are these expected changes or regressions?"
|
|
115
|
+
elif [ "${NEW_PASSES:-0}" -gt 0 ] && [ "${NEW_FAILURES:-0}" -le 0 ]; then
|
|
116
|
+
echo "✓ Differential test: ${NEW_PASSES} new pass(es), 0 new failures (fix looks clean)"
|
|
117
|
+
echo " Baseline: ${BASELINE_PASSED} passed, ${BASELINE_FAILED} failed"
|
|
118
|
+
echo " Current: ${CURRENT_PASSED} passed, ${CURRENT_FAILED} failed"
|
|
119
|
+
elif [ "${CURRENT_PASSED:-0}" -eq "${BASELINE_PASSED:-0}" ] && [ "${CURRENT_FAILED:-0}" -eq "${BASELINE_FAILED:-0}" ]; then
|
|
120
|
+
echo "ℹ️ Differential test: no change from baseline (${CURRENT_PASSED} passed, ${CURRENT_FAILED} failed)"
|
|
121
|
+
echo " If this is after applying the fix, the bug-related tests should have changed."
|
|
122
|
+
echo " Check: did the fix actually change the test outcomes?"
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
exit 0
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# PostToolUse hook (Edit): Run linter on edited file and inject results.
|
|
3
|
+
# Catches lint errors at the point of introduction.
|
|
4
|
+
#
|
|
5
|
+
# stdout is injected as context.
|
|
6
|
+
# Only runs for known file types. Skips if linter not available.
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
11
|
+
|
|
12
|
+
# Extract file path
|
|
13
|
+
FILE_PATH="${CLAUDE_TOOL_INPUT_FILE_PATH:-}"
|
|
14
|
+
if [ -z "$FILE_PATH" ] && [ -n "${CLAUDE_TOOL_INPUT:-}" ]; then
|
|
15
|
+
FILE_PATH=$(echo "$CLAUDE_TOOL_INPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('file_path',''))" 2>/dev/null) || true
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
[ -z "$FILE_PATH" ] && exit 0
|
|
19
|
+
[ ! -f "$FILE_PATH" ] && exit 0
|
|
20
|
+
|
|
21
|
+
# ---------------------------------------------------------------------------
|
|
22
|
+
# Python files — ruff check
|
|
23
|
+
# ---------------------------------------------------------------------------
|
|
24
|
+
if echo "$FILE_PATH" | grep -qE '\.py$'; then
|
|
25
|
+
# Find ruff — check project venv first, then global
|
|
26
|
+
RUFF=""
|
|
27
|
+
for candidate in \
|
|
28
|
+
"$PROJECT_DIR/backend/.venv/bin/ruff" \
|
|
29
|
+
"$PROJECT_DIR/.venv/bin/ruff" \
|
|
30
|
+
"$PROJECT_DIR/venv/bin/ruff"; do
|
|
31
|
+
if [ -x "$candidate" ]; then
|
|
32
|
+
RUFF="$candidate"
|
|
33
|
+
break
|
|
34
|
+
fi
|
|
35
|
+
done
|
|
36
|
+
[ -z "$RUFF" ] && command -v ruff &>/dev/null && RUFF="ruff"
|
|
37
|
+
[ -z "$RUFF" ] && exit 0
|
|
38
|
+
|
|
39
|
+
errors=$($RUFF check "$FILE_PATH" --no-fix 2>&1) || true
|
|
40
|
+
error_count=$(echo "$errors" | grep -cE '^\S+:\d+:\d+:' 2>/dev/null) || true
|
|
41
|
+
|
|
42
|
+
if [ "${error_count:-0}" -gt 0 ]; then
|
|
43
|
+
echo "LINT (ruff): ${error_count} issue(s) in $(basename "$FILE_PATH")"
|
|
44
|
+
echo "$errors" | grep -E '^\S+:\d+:\d+:' | head -5
|
|
45
|
+
fi
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# ---------------------------------------------------------------------------
|
|
50
|
+
# TypeScript/JavaScript — eslint (only if fast, single file)
|
|
51
|
+
# ---------------------------------------------------------------------------
|
|
52
|
+
if echo "$FILE_PATH" | grep -qE '\.(ts|tsx|js|jsx)$'; then
|
|
53
|
+
# Only run if eslint config exists nearby
|
|
54
|
+
eslint_config=""
|
|
55
|
+
for dir in "$(dirname "$FILE_PATH")" "$PROJECT_DIR" "$PROJECT_DIR/frontend"; do
|
|
56
|
+
for cfg in ".eslintrc" ".eslintrc.js" ".eslintrc.json" ".eslintrc.yml" "eslint.config.js" "eslint.config.mjs"; do
|
|
57
|
+
if [ -f "$dir/$cfg" ]; then
|
|
58
|
+
eslint_config="$dir/$cfg"
|
|
59
|
+
break 2
|
|
60
|
+
fi
|
|
61
|
+
done
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
# Also check package.json for eslintConfig
|
|
65
|
+
if [ -z "$eslint_config" ]; then
|
|
66
|
+
for dir in "$(dirname "$FILE_PATH")" "$PROJECT_DIR" "$PROJECT_DIR/frontend"; do
|
|
67
|
+
if [ -f "$dir/package.json" ] && grep -q '"eslintConfig"' "$dir/package.json" 2>/dev/null; then
|
|
68
|
+
eslint_config="$dir/package.json"
|
|
69
|
+
break
|
|
70
|
+
fi
|
|
71
|
+
done
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
[ -z "$eslint_config" ] && exit 0
|
|
75
|
+
|
|
76
|
+
# Find npx
|
|
77
|
+
NPX=""
|
|
78
|
+
command -v npx &>/dev/null && NPX="npx"
|
|
79
|
+
[ -z "$NPX" ] && exit 0
|
|
80
|
+
|
|
81
|
+
# Run eslint on single file (with timeout to keep it fast)
|
|
82
|
+
errors=$(timeout 10 $NPX eslint "$FILE_PATH" --no-warn-ignored --format compact 2>&1) || true
|
|
83
|
+
error_count=$(echo "$errors" | grep -cE 'Error|Warning' 2>/dev/null) || true
|
|
84
|
+
|
|
85
|
+
if [ "${error_count:-0}" -gt 0 ]; then
|
|
86
|
+
echo "LINT (eslint): issues in $(basename "$FILE_PATH")"
|
|
87
|
+
echo "$errors" | grep -E 'Error|Warning' | head -5
|
|
88
|
+
fi
|
|
89
|
+
exit 0
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
exit 0
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# PostToolUse hook (Bash): Detect git merge/push events and update autopilot state.
|
|
3
|
+
# When autopilot is active and a PR is merged or code is pushed, reset the workflow
|
|
4
|
+
# phase to "assess" so the autopilot loop picks up the next work item.
|
|
5
|
+
#
|
|
6
|
+
# Also detects branch switches and stash operations that change project state.
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
11
|
+
WORKFLOW_STATE="$PROJECT_DIR/.claude/.workflow-state.json"
|
|
12
|
+
|
|
13
|
+
# Only run if autopilot state file exists
|
|
14
|
+
[ -f "$WORKFLOW_STATE" ] || exit 0
|
|
15
|
+
|
|
16
|
+
# Read the tool input (the command that was executed)
|
|
17
|
+
TOOL_INPUT="${CLAUDE_TOOL_INPUT:-}"
|
|
18
|
+
|
|
19
|
+
# Detect state-changing git operations
|
|
20
|
+
if echo "$TOOL_INPUT" | grep -qE 'gh pr merge|git push|git merge (main|master)'; then
|
|
21
|
+
# Check if autopilot is active
|
|
22
|
+
MODE=$(python3 -c "import json; print(json.load(open('$WORKFLOW_STATE')).get('mode',''))" 2>/dev/null || echo "")
|
|
23
|
+
|
|
24
|
+
if [ "$MODE" = "autopilot" ] || [ "$MODE" = "paused" ]; then
|
|
25
|
+
# Update state: signal re-assessment needed
|
|
26
|
+
python3 -c "
|
|
27
|
+
import json, datetime
|
|
28
|
+
with open('$WORKFLOW_STATE', 'r+') as f:
|
|
29
|
+
state = json.load(f)
|
|
30
|
+
# Move completed item to session summary
|
|
31
|
+
if state.get('current_item') and state.get('phase') == 'awaiting_merge':
|
|
32
|
+
item = state['current_item']
|
|
33
|
+
completed_entry = {
|
|
34
|
+
'item': f'#{item.get(\"number\", \"?\")}',
|
|
35
|
+
'title': item.get('title', ''),
|
|
36
|
+
'pr': state.get('pr_number')
|
|
37
|
+
}
|
|
38
|
+
state.setdefault('session_summary', {}).setdefault('completed', []).append(completed_entry)
|
|
39
|
+
# Reset for next iteration
|
|
40
|
+
state['phase'] = 'assess'
|
|
41
|
+
state['current_item'] = None
|
|
42
|
+
state['pr_number'] = None
|
|
43
|
+
state['planned_scope'] = None
|
|
44
|
+
state['actual_scope'] = {'files_changed': [], 'layers_touched': []}
|
|
45
|
+
state['attempts'] = {'qa_fixes': 0, 'stuck_turns': 0}
|
|
46
|
+
state['last_state_change'] = datetime.datetime.utcnow().isoformat() + 'Z'
|
|
47
|
+
f.seek(0)
|
|
48
|
+
json.dump(state, f, indent=2)
|
|
49
|
+
f.truncate()
|
|
50
|
+
" 2>/dev/null
|
|
51
|
+
|
|
52
|
+
echo "AUTOPILOT: PR merged. Re-assessing priorities for next work item."
|
|
53
|
+
fi
|
|
54
|
+
fi
|