@harness-engineering/cli 1.14.0 → 1.16.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/dist/agents/commands/codex/AGENTS.md +39 -0
- package/dist/agents/commands/codex/harness/add-harness-component/SKILL.md +195 -0
- package/dist/agents/commands/codex/harness/add-harness-component/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/cleanup-dead-code/SKILL.md +248 -0
- package/dist/agents/commands/codex/harness/cleanup-dead-code/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/detect-doc-drift/SKILL.md +182 -0
- package/dist/agents/commands/codex/harness/detect-doc-drift/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/enforce-architecture/SKILL.md +299 -0
- package/dist/agents/commands/codex/harness/enforce-architecture/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-architecture-advisor/SKILL.md +452 -0
- package/dist/agents/commands/codex/harness/harness-architecture-advisor/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-autopilot/SKILL.md +919 -0
- package/dist/agents/commands/codex/harness/harness-autopilot/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-brainstorming/SKILL.md +409 -0
- package/dist/agents/commands/codex/harness/harness-brainstorming/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-code-review/SKILL.md +860 -0
- package/dist/agents/commands/codex/harness/harness-code-review/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-codebase-cleanup/SKILL.md +227 -0
- package/dist/agents/commands/codex/harness/harness-codebase-cleanup/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-debugging/SKILL.md +369 -0
- package/dist/agents/commands/codex/harness/harness-debugging/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-dependency-health/SKILL.md +182 -0
- package/dist/agents/commands/codex/harness/harness-dependency-health/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-docs-pipeline/SKILL.md +463 -0
- package/dist/agents/commands/codex/harness/harness-docs-pipeline/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-execution/SKILL.md +513 -0
- package/dist/agents/commands/codex/harness/harness-execution/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-hotspot-detector/SKILL.md +164 -0
- package/dist/agents/commands/codex/harness/harness-hotspot-detector/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-impact-analysis/SKILL.md +187 -0
- package/dist/agents/commands/codex/harness/harness-impact-analysis/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-integrity/SKILL.md +170 -0
- package/dist/agents/commands/codex/harness/harness-integrity/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-onboarding/SKILL.md +291 -0
- package/dist/agents/commands/codex/harness/harness-onboarding/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-perf/SKILL.md +263 -0
- package/dist/agents/commands/codex/harness/harness-perf/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-planning/SKILL.md +582 -0
- package/dist/agents/commands/codex/harness/harness-planning/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-refactoring/SKILL.md +172 -0
- package/dist/agents/commands/codex/harness/harness-refactoring/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-release-readiness/SKILL.md +692 -0
- package/dist/agents/commands/codex/harness/harness-release-readiness/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-roadmap/SKILL.md +598 -0
- package/dist/agents/commands/codex/harness/harness-roadmap/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-security-scan/SKILL.md +157 -0
- package/dist/agents/commands/codex/harness/harness-security-scan/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-skill-authoring/SKILL.md +295 -0
- package/dist/agents/commands/codex/harness/harness-skill-authoring/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-soundness-review/SKILL.md +1270 -0
- package/dist/agents/commands/codex/harness/harness-soundness-review/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-supply-chain-audit/SKILL.md +247 -0
- package/dist/agents/commands/codex/harness/harness-supply-chain-audit/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-tdd/SKILL.md +180 -0
- package/dist/agents/commands/codex/harness/harness-tdd/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-test-advisor/SKILL.md +163 -0
- package/dist/agents/commands/codex/harness/harness-test-advisor/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-verification/SKILL.md +424 -0
- package/dist/agents/commands/codex/harness/harness-verification/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-verify/SKILL.md +162 -0
- package/dist/agents/commands/codex/harness/harness-verify/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/initialize-harness-project/SKILL.md +235 -0
- package/dist/agents/commands/codex/harness/initialize-harness-project/agents/openai.yaml +3 -0
- package/dist/agents/commands/cursor/harness/add-harness-component.mdc +200 -0
- package/dist/agents/commands/cursor/harness/cleanup-dead-code.mdc +253 -0
- package/dist/agents/commands/cursor/harness/detect-doc-drift.mdc +187 -0
- package/dist/agents/commands/cursor/harness/enforce-architecture.mdc +304 -0
- package/dist/agents/commands/cursor/harness/harness-architecture-advisor.mdc +457 -0
- package/dist/agents/commands/cursor/harness/harness-autopilot.mdc +924 -0
- package/dist/agents/commands/cursor/harness/harness-brainstorming.mdc +414 -0
- package/dist/agents/commands/cursor/harness/harness-code-review.mdc +865 -0
- package/dist/agents/commands/cursor/harness/harness-codebase-cleanup.mdc +232 -0
- package/dist/agents/commands/cursor/harness/harness-debugging.mdc +374 -0
- package/dist/agents/commands/cursor/harness/harness-dependency-health.mdc +187 -0
- package/dist/agents/commands/cursor/harness/harness-docs-pipeline.mdc +468 -0
- package/dist/agents/commands/cursor/harness/harness-execution.mdc +518 -0
- package/dist/agents/commands/cursor/harness/harness-hotspot-detector.mdc +169 -0
- package/dist/agents/commands/cursor/harness/harness-impact-analysis.mdc +192 -0
- package/dist/agents/commands/cursor/harness/harness-integrity.mdc +175 -0
- package/dist/agents/commands/cursor/harness/harness-onboarding.mdc +296 -0
- package/dist/agents/commands/cursor/harness/harness-perf.mdc +268 -0
- package/dist/agents/commands/cursor/harness/harness-planning.mdc +587 -0
- package/dist/agents/commands/cursor/harness/harness-refactoring.mdc +177 -0
- package/dist/agents/commands/cursor/harness/harness-release-readiness.mdc +697 -0
- package/dist/agents/commands/cursor/harness/harness-roadmap.mdc +603 -0
- package/dist/agents/commands/cursor/harness/harness-security-scan.mdc +162 -0
- package/dist/agents/commands/cursor/harness/harness-skill-authoring.mdc +300 -0
- package/dist/agents/commands/cursor/harness/harness-soundness-review.mdc +1275 -0
- package/dist/agents/commands/cursor/harness/harness-supply-chain-audit.mdc +252 -0
- package/dist/agents/commands/cursor/harness/harness-tdd.mdc +185 -0
- package/dist/agents/commands/cursor/harness/harness-test-advisor.mdc +168 -0
- package/dist/agents/commands/cursor/harness/harness-verification.mdc +429 -0
- package/dist/agents/commands/cursor/harness/harness-verify.mdc +167 -0
- package/dist/agents/commands/cursor/harness/initialize-harness-project.mdc +240 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-auth/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +355 -45
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +12 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +97 -3
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +6 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +2 -4
- package/dist/agents/skills/claude-code/harness-database/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +99 -3
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +6 -0
- package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +1 -1
- package/dist/agents/skills/claude-code/harness-product-spec/SKILL.md +5 -5
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +27 -7
- package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/codex/add-harness-component/SKILL.md +192 -0
- package/dist/agents/skills/codex/add-harness-component/skill.yaml +33 -0
- package/dist/agents/skills/codex/align-documentation/SKILL.md +213 -0
- package/dist/agents/skills/codex/align-documentation/skill.yaml +32 -0
- package/dist/agents/skills/codex/check-mechanical-constraints/SKILL.md +191 -0
- package/dist/agents/skills/codex/check-mechanical-constraints/skill.yaml +33 -0
- package/dist/agents/skills/codex/cleanup-dead-code/SKILL.md +245 -0
- package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +34 -0
- package/dist/agents/skills/codex/detect-doc-drift/SKILL.md +179 -0
- package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +31 -0
- package/dist/agents/skills/codex/enforce-architecture/SKILL.md +296 -0
- package/dist/agents/skills/codex/enforce-architecture/skill.yaml +35 -0
- package/dist/agents/skills/codex/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-accessibility/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-api-design/SKILL.md +356 -0
- package/dist/agents/skills/codex/harness-api-design/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +449 -0
- package/dist/agents/skills/codex/harness-architecture-advisor/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-auth/SKILL.md +331 -0
- package/dist/agents/skills/codex/harness-auth/skill.yaml +81 -0
- package/dist/agents/skills/codex/harness-autopilot/SKILL.md +916 -0
- package/dist/agents/skills/codex/harness-autopilot/skill.yaml +67 -0
- package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +406 -0
- package/dist/agents/skills/codex/harness-brainstorming/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-caching/SKILL.md +309 -0
- package/dist/agents/skills/codex/harness-caching/skill.yaml +73 -0
- package/dist/agents/skills/codex/harness-chaos/SKILL.md +295 -0
- package/dist/agents/skills/codex/harness-chaos/skill.yaml +72 -0
- package/dist/agents/skills/codex/harness-code-review/SKILL.md +857 -0
- package/dist/agents/skills/codex/harness-code-review/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-codebase-cleanup/SKILL.md +224 -0
- package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +65 -0
- package/dist/agents/skills/codex/harness-compliance/SKILL.md +303 -0
- package/dist/agents/skills/codex/harness-compliance/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-containerization/SKILL.md +284 -0
- package/dist/agents/skills/codex/harness-containerization/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-data-pipeline/SKILL.md +274 -0
- package/dist/agents/skills/codex/harness-data-pipeline/skill.yaml +81 -0
- package/dist/agents/skills/codex/harness-data-validation/SKILL.md +343 -0
- package/dist/agents/skills/codex/harness-data-validation/skill.yaml +75 -0
- package/dist/agents/skills/codex/harness-database/SKILL.md +310 -0
- package/dist/agents/skills/codex/harness-database/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-debugging/SKILL.md +366 -0
- package/dist/agents/skills/codex/harness-debugging/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-dependency-health/SKILL.md +179 -0
- package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +42 -0
- package/dist/agents/skills/codex/harness-deployment/SKILL.md +307 -0
- package/dist/agents/skills/codex/harness-deployment/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/codex/harness-design/skill.yaml +54 -0
- package/dist/agents/skills/codex/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/codex/harness-design-mobile/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/codex/harness-design-system/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/codex/harness-design-web/skill.yaml +53 -0
- package/dist/agents/skills/codex/harness-diagnostics/SKILL.md +318 -0
- package/dist/agents/skills/codex/harness-diagnostics/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/codex/harness-docs-pipeline/skill.yaml +70 -0
- package/dist/agents/skills/codex/harness-dx/SKILL.md +276 -0
- package/dist/agents/skills/codex/harness-dx/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-e2e/SKILL.md +245 -0
- package/dist/agents/skills/codex/harness-e2e/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-event-driven/SKILL.md +280 -0
- package/dist/agents/skills/codex/harness-event-driven/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-execution/SKILL.md +510 -0
- package/dist/agents/skills/codex/harness-execution/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-feature-flags/SKILL.md +287 -0
- package/dist/agents/skills/codex/harness-feature-flags/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +268 -0
- package/dist/agents/skills/codex/harness-git-workflow/skill.yaml +32 -0
- package/dist/agents/skills/codex/harness-hotspot-detector/SKILL.md +161 -0
- package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/codex/harness-i18n/skill.yaml +55 -0
- package/dist/agents/skills/codex/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/codex/harness-i18n-process/skill.yaml +44 -0
- package/dist/agents/skills/codex/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/codex/harness-i18n-workflow/skill.yaml +54 -0
- package/dist/agents/skills/codex/harness-impact-analysis/SKILL.md +184 -0
- package/dist/agents/skills/codex/harness-impact-analysis/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-incident-response/SKILL.md +223 -0
- package/dist/agents/skills/codex/harness-incident-response/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-infrastructure-as-code/SKILL.md +279 -0
- package/dist/agents/skills/codex/harness-infrastructure-as-code/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-integration-test/SKILL.md +271 -0
- package/dist/agents/skills/codex/harness-integration-test/skill.yaml +73 -0
- package/dist/agents/skills/codex/harness-integrity/SKILL.md +167 -0
- package/dist/agents/skills/codex/harness-integrity/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-knowledge-mapper/SKILL.md +195 -0
- package/dist/agents/skills/codex/harness-knowledge-mapper/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-load-testing/SKILL.md +274 -0
- package/dist/agents/skills/codex/harness-load-testing/skill.yaml +79 -0
- package/dist/agents/skills/codex/harness-ml-ops/SKILL.md +341 -0
- package/dist/agents/skills/codex/harness-ml-ops/skill.yaml +79 -0
- package/dist/agents/skills/codex/harness-mobile-patterns/SKILL.md +326 -0
- package/dist/agents/skills/codex/harness-mobile-patterns/skill.yaml +82 -0
- package/dist/agents/skills/codex/harness-mutation-test/SKILL.md +251 -0
- package/dist/agents/skills/codex/harness-mutation-test/skill.yaml +70 -0
- package/dist/agents/skills/codex/harness-observability/SKILL.md +283 -0
- package/dist/agents/skills/codex/harness-observability/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-onboarding/SKILL.md +288 -0
- package/dist/agents/skills/codex/harness-onboarding/skill.yaml +31 -0
- package/dist/agents/skills/codex/harness-parallel-agents/SKILL.md +256 -0
- package/dist/agents/skills/codex/harness-parallel-agents/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-perf/SKILL.md +260 -0
- package/dist/agents/skills/codex/harness-perf/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-perf-tdd/SKILL.md +249 -0
- package/dist/agents/skills/codex/harness-perf-tdd/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-planning/SKILL.md +579 -0
- package/dist/agents/skills/codex/harness-planning/skill.yaml +56 -0
- package/dist/agents/skills/codex/harness-pre-commit-review/SKILL.md +324 -0
- package/dist/agents/skills/codex/harness-pre-commit-review/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-product-spec/SKILL.md +285 -0
- package/dist/agents/skills/codex/harness-product-spec/skill.yaml +72 -0
- package/dist/agents/skills/codex/harness-property-test/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-property-test/skill.yaml +71 -0
- package/dist/agents/skills/codex/harness-refactoring/SKILL.md +169 -0
- package/dist/agents/skills/codex/harness-refactoring/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-release-readiness/SKILL.md +689 -0
- package/dist/agents/skills/codex/harness-release-readiness/skill.yaml +58 -0
- package/dist/agents/skills/codex/harness-resilience/SKILL.md +255 -0
- package/dist/agents/skills/codex/harness-resilience/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-roadmap/SKILL.md +595 -0
- package/dist/agents/skills/codex/harness-roadmap/skill.yaml +44 -0
- package/dist/agents/skills/codex/harness-secrets/SKILL.md +293 -0
- package/dist/agents/skills/codex/harness-secrets/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-security-review/SKILL.md +260 -0
- package/dist/agents/skills/codex/harness-security-review/skill.yaml +53 -0
- package/dist/agents/skills/codex/harness-security-scan/SKILL.md +154 -0
- package/dist/agents/skills/codex/harness-security-scan/skill.yaml +42 -0
- package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +292 -0
- package/dist/agents/skills/codex/harness-skill-authoring/skill.yaml +33 -0
- package/dist/agents/skills/codex/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-sql-review/SKILL.md +315 -0
- package/dist/agents/skills/codex/harness-sql-review/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-state-management/SKILL.md +309 -0
- package/dist/agents/skills/codex/harness-state-management/skill.yaml +33 -0
- package/dist/agents/skills/codex/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-tdd/SKILL.md +177 -0
- package/dist/agents/skills/codex/harness-tdd/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-test-advisor/SKILL.md +160 -0
- package/dist/agents/skills/codex/harness-test-advisor/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-test-data/SKILL.md +268 -0
- package/dist/agents/skills/codex/harness-test-data/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-ux-copy/SKILL.md +271 -0
- package/dist/agents/skills/codex/harness-ux-copy/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-verification/SKILL.md +421 -0
- package/dist/agents/skills/codex/harness-verification/skill.yaml +43 -0
- package/dist/agents/skills/codex/harness-verify/SKILL.md +159 -0
- package/dist/agents/skills/codex/harness-verify/skill.yaml +41 -0
- package/dist/agents/skills/codex/harness-visual-regression/SKILL.md +257 -0
- package/dist/agents/skills/codex/harness-visual-regression/skill.yaml +74 -0
- package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +232 -0
- package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +32 -0
- package/dist/agents/skills/codex/validate-context-engineering/SKILL.md +150 -0
- package/dist/agents/skills/codex/validate-context-engineering/skill.yaml +32 -0
- package/dist/agents/skills/cursor/add-harness-component/SKILL.md +192 -0
- package/dist/agents/skills/cursor/add-harness-component/skill.yaml +33 -0
- package/dist/agents/skills/cursor/align-documentation/SKILL.md +213 -0
- package/dist/agents/skills/cursor/align-documentation/skill.yaml +32 -0
- package/dist/agents/skills/cursor/check-mechanical-constraints/SKILL.md +191 -0
- package/dist/agents/skills/cursor/check-mechanical-constraints/skill.yaml +33 -0
- package/dist/agents/skills/cursor/cleanup-dead-code/SKILL.md +245 -0
- package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +34 -0
- package/dist/agents/skills/cursor/detect-doc-drift/SKILL.md +179 -0
- package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +31 -0
- package/dist/agents/skills/cursor/enforce-architecture/SKILL.md +296 -0
- package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +35 -0
- package/dist/agents/skills/cursor/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-accessibility/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-api-design/SKILL.md +356 -0
- package/dist/agents/skills/cursor/harness-api-design/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +449 -0
- package/dist/agents/skills/cursor/harness-architecture-advisor/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-auth/SKILL.md +331 -0
- package/dist/agents/skills/cursor/harness-auth/skill.yaml +81 -0
- package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +916 -0
- package/dist/agents/skills/cursor/harness-autopilot/skill.yaml +67 -0
- package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +406 -0
- package/dist/agents/skills/cursor/harness-brainstorming/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-caching/SKILL.md +309 -0
- package/dist/agents/skills/cursor/harness-caching/skill.yaml +73 -0
- package/dist/agents/skills/cursor/harness-chaos/SKILL.md +295 -0
- package/dist/agents/skills/cursor/harness-chaos/skill.yaml +72 -0
- package/dist/agents/skills/cursor/harness-code-review/SKILL.md +857 -0
- package/dist/agents/skills/cursor/harness-code-review/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-codebase-cleanup/SKILL.md +224 -0
- package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +65 -0
- package/dist/agents/skills/cursor/harness-compliance/SKILL.md +303 -0
- package/dist/agents/skills/cursor/harness-compliance/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-containerization/SKILL.md +284 -0
- package/dist/agents/skills/cursor/harness-containerization/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-data-pipeline/SKILL.md +274 -0
- package/dist/agents/skills/cursor/harness-data-pipeline/skill.yaml +81 -0
- package/dist/agents/skills/cursor/harness-data-validation/SKILL.md +343 -0
- package/dist/agents/skills/cursor/harness-data-validation/skill.yaml +75 -0
- package/dist/agents/skills/cursor/harness-database/SKILL.md +310 -0
- package/dist/agents/skills/cursor/harness-database/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-debugging/SKILL.md +366 -0
- package/dist/agents/skills/cursor/harness-debugging/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-dependency-health/SKILL.md +179 -0
- package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +42 -0
- package/dist/agents/skills/cursor/harness-deployment/SKILL.md +307 -0
- package/dist/agents/skills/cursor/harness-deployment/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/cursor/harness-design/skill.yaml +54 -0
- package/dist/agents/skills/cursor/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/cursor/harness-design-mobile/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/cursor/harness-design-system/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/cursor/harness-design-web/skill.yaml +53 -0
- package/dist/agents/skills/cursor/harness-diagnostics/SKILL.md +318 -0
- package/dist/agents/skills/cursor/harness-diagnostics/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/cursor/harness-docs-pipeline/skill.yaml +70 -0
- package/dist/agents/skills/cursor/harness-dx/SKILL.md +276 -0
- package/dist/agents/skills/cursor/harness-dx/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-e2e/SKILL.md +245 -0
- package/dist/agents/skills/cursor/harness-e2e/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-event-driven/SKILL.md +280 -0
- package/dist/agents/skills/cursor/harness-event-driven/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-execution/SKILL.md +510 -0
- package/dist/agents/skills/cursor/harness-execution/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-feature-flags/SKILL.md +287 -0
- package/dist/agents/skills/cursor/harness-feature-flags/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +268 -0
- package/dist/agents/skills/cursor/harness-git-workflow/skill.yaml +32 -0
- package/dist/agents/skills/cursor/harness-hotspot-detector/SKILL.md +161 -0
- package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/cursor/harness-i18n/skill.yaml +55 -0
- package/dist/agents/skills/cursor/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/cursor/harness-i18n-process/skill.yaml +44 -0
- package/dist/agents/skills/cursor/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/cursor/harness-i18n-workflow/skill.yaml +54 -0
- package/dist/agents/skills/cursor/harness-impact-analysis/SKILL.md +184 -0
- package/dist/agents/skills/cursor/harness-impact-analysis/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-incident-response/SKILL.md +223 -0
- package/dist/agents/skills/cursor/harness-incident-response/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-infrastructure-as-code/SKILL.md +279 -0
- package/dist/agents/skills/cursor/harness-infrastructure-as-code/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-integration-test/SKILL.md +271 -0
- package/dist/agents/skills/cursor/harness-integration-test/skill.yaml +73 -0
- package/dist/agents/skills/cursor/harness-integrity/SKILL.md +167 -0
- package/dist/agents/skills/cursor/harness-integrity/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-knowledge-mapper/SKILL.md +195 -0
- package/dist/agents/skills/cursor/harness-knowledge-mapper/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-load-testing/SKILL.md +274 -0
- package/dist/agents/skills/cursor/harness-load-testing/skill.yaml +79 -0
- package/dist/agents/skills/cursor/harness-ml-ops/SKILL.md +341 -0
- package/dist/agents/skills/cursor/harness-ml-ops/skill.yaml +79 -0
- package/dist/agents/skills/cursor/harness-mobile-patterns/SKILL.md +326 -0
- package/dist/agents/skills/cursor/harness-mobile-patterns/skill.yaml +82 -0
- package/dist/agents/skills/cursor/harness-mutation-test/SKILL.md +251 -0
- package/dist/agents/skills/cursor/harness-mutation-test/skill.yaml +70 -0
- package/dist/agents/skills/cursor/harness-observability/SKILL.md +283 -0
- package/dist/agents/skills/cursor/harness-observability/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-onboarding/SKILL.md +288 -0
- package/dist/agents/skills/cursor/harness-onboarding/skill.yaml +31 -0
- package/dist/agents/skills/cursor/harness-parallel-agents/SKILL.md +256 -0
- package/dist/agents/skills/cursor/harness-parallel-agents/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-perf/SKILL.md +260 -0
- package/dist/agents/skills/cursor/harness-perf/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-perf-tdd/SKILL.md +249 -0
- package/dist/agents/skills/cursor/harness-perf-tdd/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-planning/SKILL.md +579 -0
- package/dist/agents/skills/cursor/harness-planning/skill.yaml +56 -0
- package/dist/agents/skills/cursor/harness-pre-commit-review/SKILL.md +324 -0
- package/dist/agents/skills/cursor/harness-pre-commit-review/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-product-spec/SKILL.md +285 -0
- package/dist/agents/skills/cursor/harness-product-spec/skill.yaml +72 -0
- package/dist/agents/skills/cursor/harness-property-test/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-property-test/skill.yaml +71 -0
- package/dist/agents/skills/cursor/harness-refactoring/SKILL.md +169 -0
- package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-release-readiness/SKILL.md +689 -0
- package/dist/agents/skills/cursor/harness-release-readiness/skill.yaml +58 -0
- package/dist/agents/skills/cursor/harness-resilience/SKILL.md +255 -0
- package/dist/agents/skills/cursor/harness-resilience/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +595 -0
- package/dist/agents/skills/cursor/harness-roadmap/skill.yaml +44 -0
- package/dist/agents/skills/cursor/harness-secrets/SKILL.md +293 -0
- package/dist/agents/skills/cursor/harness-secrets/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-security-review/SKILL.md +260 -0
- package/dist/agents/skills/cursor/harness-security-review/skill.yaml +53 -0
- package/dist/agents/skills/cursor/harness-security-scan/SKILL.md +154 -0
- package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +42 -0
- package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +292 -0
- package/dist/agents/skills/cursor/harness-skill-authoring/skill.yaml +33 -0
- package/dist/agents/skills/cursor/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-sql-review/SKILL.md +315 -0
- package/dist/agents/skills/cursor/harness-sql-review/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-state-management/SKILL.md +309 -0
- package/dist/agents/skills/cursor/harness-state-management/skill.yaml +33 -0
- package/dist/agents/skills/cursor/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-tdd/SKILL.md +177 -0
- package/dist/agents/skills/cursor/harness-tdd/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-test-advisor/SKILL.md +160 -0
- package/dist/agents/skills/cursor/harness-test-advisor/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-test-data/SKILL.md +268 -0
- package/dist/agents/skills/cursor/harness-test-data/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-ux-copy/SKILL.md +271 -0
- package/dist/agents/skills/cursor/harness-ux-copy/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-verification/SKILL.md +421 -0
- package/dist/agents/skills/cursor/harness-verification/skill.yaml +43 -0
- package/dist/agents/skills/cursor/harness-verify/SKILL.md +159 -0
- package/dist/agents/skills/cursor/harness-verify/skill.yaml +41 -0
- package/dist/agents/skills/cursor/harness-visual-regression/SKILL.md +257 -0
- package/dist/agents/skills/cursor/harness-visual-regression/skill.yaml +74 -0
- package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +232 -0
- package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +32 -0
- package/dist/agents/skills/cursor/validate-context-engineering/SKILL.md +150 -0
- package/dist/agents/skills/cursor/validate-context-engineering/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +355 -45
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +12 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +97 -3
- package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +6 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +2 -4
- package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +99 -3
- package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +6 -0
- package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +1 -1
- package/dist/agents/skills/gemini-cli/harness-product-spec/SKILL.md +5 -5
- package/dist/agents/skills/gemini-cli/harness-security-review/SKILL.md +27 -7
- package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/package.json +1 -0
- package/dist/agents/skills/templates/discipline-template.md +49 -0
- package/dist/agents/skills/tests/schema.ts +1 -1
- package/dist/agents/skills/vitest.config.mts +5 -0
- package/dist/{agents-md-YTYQDA3P.js → agents-md-VYDFPIRW.js} +1 -1
- package/dist/{architecture-JQZYM4US.js → architecture-K5HSRBGB.js} +2 -2
- package/dist/bin/harness-mcp.js +13 -13
- package/dist/bin/harness.js +21 -19
- package/dist/{check-phase-gate-L3RADYWO.js → check-phase-gate-5AS6SXL6.js} +3 -3
- package/dist/{chunk-6KTUUFRN.js → chunk-5ZXHMCPL.js} +1 -1
- package/dist/{chunk-RCWZBSK5.js → chunk-6KWBH4EO.js} +1 -1
- package/dist/{chunk-ABQHQ6I5.js → chunk-ALFKNAZW.js} +2436 -233
- package/dist/{chunk-OXLLOSSR.js → chunk-AV6KMDO5.js} +2 -2
- package/dist/{chunk-7IP4JIFL.js → chunk-C7DTKLPW.js} +4 -4
- package/dist/{chunk-ZOAWBDWU.js → chunk-CJDVBBPB.js} +5 -1
- package/dist/{chunk-YPYGXRDR.js → chunk-DNDBFIZN.js} +18 -4
- package/dist/{chunk-XYLGHKG6.js → chunk-HKUX2X7O.js} +11 -2
- package/dist/{chunk-YZD2MRNQ.js → chunk-JOP2NDNB.js} +684 -142
- package/dist/{chunk-YBJ262QL.js → chunk-LRG3B43J.js} +1 -1
- package/dist/{chunk-AOZRDOIP.js → chunk-M6TIO6NF.js} +1 -1
- package/dist/{chunk-O5OJVPL6.js → chunk-OCDDCGDE.js} +9 -1
- package/dist/{chunk-OSXBPAMK.js → chunk-QDF7COPQ.js} +1 -1
- package/dist/{chunk-TPOTOBR7.js → chunk-RWZPHW4H.js} +3 -3
- package/dist/{chunk-3C2MLBPJ.js → chunk-SFRGPAK6.js} +1 -1
- package/dist/{chunk-XKECDXJS.js → chunk-SHYWICGA.js} +2184 -456
- package/dist/{chunk-S2FXOWOR.js → chunk-TF6ZLHJV.js} +2 -2
- package/dist/{chunk-NLVUVUGD.js → chunk-ZJMU7MEV.js} +1 -1
- package/dist/{ci-workflow-EQZFVX3P.js → ci-workflow-CRWU723U.js} +1 -1
- package/dist/{create-skill-XSWHMSM5.js → create-skill-NDXQSTIK.js} +2 -2
- package/dist/{dist-HWXF2C3R.js → dist-4LPXJYVZ.js} +105 -1
- package/dist/{docs-7ECGYMAV.js → docs-4JRHTLUZ.js} +3 -3
- package/dist/{engine-EG4EH4IX.js → engine-3G3VIM6L.js} +1 -1
- package/dist/{entropy-5USWKLVS.js → entropy-G6CZ2A6P.js} +2 -2
- package/dist/{feedback-UTBXZZHF.js → feedback-QYKQ65HB.js} +1 -1
- package/dist/{generate-agent-definitions-3PM5EU7V.js → generate-agent-definitions-SAAOAPT4.js} +3 -3
- package/dist/index.d.ts +25 -4
- package/dist/index.js +18 -18
- package/dist/{loader-ZPALXIVR.js → loader-VCOK3PF7.js} +1 -1
- package/dist/{mcp-362EZHF4.js → mcp-YENEPHBW.js} +13 -13
- package/dist/{performance-OQAFMJUD.js → performance-UBCFI2UP.js} +4 -2
- package/dist/{review-pipeline-C4GCFVGP.js → review-pipeline-IQAVCWAX.js} +1 -1
- package/dist/{runtime-7YLVK453.js → runtime-PYFFIESU.js} +1 -1
- package/dist/{security-PZOX7AQS.js → security-ZDADTPYW.js} +1 -1
- package/dist/{skill-executor-XZLYZYAK.js → skill-executor-XEVDGXUM.js} +2 -2
- package/dist/{validate-FD3Z6VJD.js → validate-VRTUHALQ.js} +2 -2
- package/dist/{validate-cross-check-WNJM6H2D.js → validate-cross-check-4Y6NHNK3.js} +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
<!-- Generated by harness generate-slash-commands. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Harness Supply Chain Audit
|
|
4
|
+
|
|
5
|
+
> 6-factor dependency risk evaluation adapted from Trail of Bits security skill patterns. Surfaces dependency risk flags for human review — not automated verdicts.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Before a major release to assess dependency risk
|
|
10
|
+
- After adding new dependencies
|
|
11
|
+
- During security audits or compliance reviews
|
|
12
|
+
- When `on_milestone` trigger fires (part of release gate)
|
|
13
|
+
- NOT as a replacement for `npm audit` — this complements it with risk signals beyond CVEs
|
|
14
|
+
- NOT for license compliance (separate concern)
|
|
15
|
+
|
|
16
|
+
## Iron Law
|
|
17
|
+
|
|
18
|
+
**Present findings as flags for human review, never as verdicts.** A dependency flagged as "high risk" may be entirely appropriate for a project. The skill surfaces signals; humans decide whether to act.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Process
|
|
23
|
+
|
|
24
|
+
### Phase 1: INVENTORY — Build Dependency List
|
|
25
|
+
|
|
26
|
+
1. **Resolve project root.** Use the path argument or default to the current directory.
|
|
27
|
+
|
|
28
|
+
2. **Detect lockfile.** Check for the following in order:
|
|
29
|
+
- `package-lock.json` (npm)
|
|
30
|
+
- `pnpm-lock.yaml` (pnpm)
|
|
31
|
+
- `yarn.lock` (yarn)
|
|
32
|
+
- If none found: report "No lockfile detected. Run `npm install` first." and stop.
|
|
33
|
+
|
|
34
|
+
3. **Parse direct dependencies** from `package.json`:
|
|
35
|
+
- Read `dependencies` and `devDependencies`
|
|
36
|
+
- Build a list: `{ name, version, isDev }`
|
|
37
|
+
|
|
38
|
+
4. **Parse transitive depth** from lockfile:
|
|
39
|
+
- For `package-lock.json`: read `packages` keys to extract the dependency tree. Nesting depth of `node_modules/` segments in keys indicates transitive depth.
|
|
40
|
+
- For `pnpm-lock.yaml`: read `importers` section for direct dependencies (keyed by workspace path, e.g., `.` for root). Each importer lists `dependencies` and `devDependencies` with version specifiers. Read `packages` section for resolved versions — keys are package identifiers (e.g., `/@scope/pkg@1.2.3`) with `resolution` (tarball URL + integrity hash) and `dependencies` sub-map for transitives.
|
|
41
|
+
- For `yarn.lock`: parse block-format entries. Each block header is `"pkg@version-range":` followed by indented fields: `version` (resolved), `resolved` (tarball URL), `integrity` (hash), and `dependencies` sub-block listing transitive deps as `"name" "version-range"` pairs.
|
|
42
|
+
- Assign each package a depth (0 = direct, 1 = first-level transitive, etc.)
|
|
43
|
+
- Flag packages with depth > 5 for transitive risk evaluation
|
|
44
|
+
|
|
45
|
+
5. **Build inventory table:**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
INVENTORY: <project-name>
|
|
49
|
+
Direct dependencies: N
|
|
50
|
+
Dev dependencies: N
|
|
51
|
+
Total packages (including transitives): N
|
|
52
|
+
Deep transitive packages (depth > 5): N
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6. Proceed to EVALUATE.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Phase 2: EVALUATE — Score Dependencies on 6 Factors
|
|
60
|
+
|
|
61
|
+
For each **direct dependency** (and any transitive with depth > 5), score on 6 factors:
|
|
62
|
+
|
|
63
|
+
> Network access required: npm registry (`https://registry.npmjs.org/<pkg>`) and GitHub API (`https://api.github.com/repos/<owner>/<repo>`).
|
|
64
|
+
>
|
|
65
|
+
> - If npm registry returns 404: mark as "unresolvable", flag for manual review, skip remaining factors
|
|
66
|
+
> - If GitHub API rate limits hit: score `maintenance-status` as "unknown", continue with other factors
|
|
67
|
+
> - If no GitHub repo link in package metadata: skip `maintenance-status` factor, note in report
|
|
68
|
+
|
|
69
|
+
#### Factor 1: Maintainer Concentration
|
|
70
|
+
|
|
71
|
+
- Fetch: `GET https://registry.npmjs.org/<pkg>`
|
|
72
|
+
- Check: `maintainers` array length
|
|
73
|
+
- Score:
|
|
74
|
+
- **High risk:** 1 maintainer (bus factor = 1)
|
|
75
|
+
- **Medium risk:** 2-3 maintainers
|
|
76
|
+
- **Low risk:** 4+ maintainers
|
|
77
|
+
|
|
78
|
+
#### Factor 2: Maintenance Status
|
|
79
|
+
|
|
80
|
+
- Source: npm `time` field (last publish date) + GitHub API commit activity
|
|
81
|
+
- npm: `GET https://registry.npmjs.org/<pkg>` → `time.modified`
|
|
82
|
+
- GitHub: `GET https://api.github.com/repos/<owner>/<repo>/commits?per_page=1` → latest commit date
|
|
83
|
+
- Score:
|
|
84
|
+
- **High risk:** Last publish > 12 months ago AND no GitHub commits in 6 months
|
|
85
|
+
- **Medium risk:** Last publish > 12 months ago OR no commits in 6 months (not both)
|
|
86
|
+
- **Low risk:** Active in both dimensions
|
|
87
|
+
|
|
88
|
+
#### Factor 3: Popularity Signal
|
|
89
|
+
|
|
90
|
+
- Fetch: `GET https://api.npmjs.org/downloads/point/last-week/<pkg>`
|
|
91
|
+
- Score:
|
|
92
|
+
- **High risk:** < 1,000 weekly downloads
|
|
93
|
+
- **Medium risk:** 1,000–10,000 weekly downloads
|
|
94
|
+
- **Low risk:** > 10,000 weekly downloads
|
|
95
|
+
- **Note:** Low popularity is a signal, not a verdict — internal/niche packages are expected to be low
|
|
96
|
+
|
|
97
|
+
#### Factor 4: Install Scripts
|
|
98
|
+
|
|
99
|
+
- Read: `node_modules/<pkg>/package.json` (or lockfile-resolved path) → `scripts` field
|
|
100
|
+
- Check for: `preinstall`, `postinstall`, `install`, `preuninstall`, `postuninstall`
|
|
101
|
+
- Score:
|
|
102
|
+
- **High risk:** Any install script present
|
|
103
|
+
- **Low risk:** No install scripts
|
|
104
|
+
- **Note:** Some install scripts are legitimate (native addon compilation). Flag for review.
|
|
105
|
+
|
|
106
|
+
#### Factor 5: Known CVEs
|
|
107
|
+
|
|
108
|
+
- Run: `npm audit --json` or `pnpm audit --json`
|
|
109
|
+
- Parse: map findings to their package name
|
|
110
|
+
- Score:
|
|
111
|
+
- **Critical:** Any high/critical severity CVE
|
|
112
|
+
- **Medium risk:** Moderate severity CVE
|
|
113
|
+
- **Low risk:** No CVEs or low severity only
|
|
114
|
+
|
|
115
|
+
#### Factor 6: Transitive Risk
|
|
116
|
+
|
|
117
|
+
- Source: Lockfile depth analysis from INVENTORY phase
|
|
118
|
+
- Score:
|
|
119
|
+
- **High risk:** Depth > 5 AND subtree size > 20 transitive packages
|
|
120
|
+
- **Medium risk:** Depth > 5 OR subtree size > 20
|
|
121
|
+
- **Low risk:** Depth ≤ 5 and subtree size ≤ 20
|
|
122
|
+
|
|
123
|
+
#### Risk Scoring
|
|
124
|
+
|
|
125
|
+
Combine factor scores into an overall risk level:
|
|
126
|
+
|
|
127
|
+
| Overall Risk | Condition |
|
|
128
|
+
| ------------ | -------------------------------------------------------------- |
|
|
129
|
+
| **Critical** | Factor 5 is Critical (any high/critical CVE) |
|
|
130
|
+
| **High** | 2+ factors scored High, OR Factor 1 is High + Factor 2 is High |
|
|
131
|
+
| **Medium** | 1 factor scored High, OR 3+ factors scored Medium |
|
|
132
|
+
| **Low** | All factors Low or at most 1 Medium |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Phase 3: REPORT — Generate Risk Summary
|
|
137
|
+
|
|
138
|
+
1. **Produce risk summary table** sorted by overall risk (Critical first):
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Supply Chain Audit: <project-name>
|
|
142
|
+
Date: <ISO date>
|
|
143
|
+
Packages evaluated: N direct + M deep transitives
|
|
144
|
+
|
|
145
|
+
┌─────────────────────┬──────────┬────────────┬─────────────┬────────────┬──────┬─────────────┐
|
|
146
|
+
│ Package │ Version │ Maintainers│ Last Publish│ Downloads │ CVEs │ Overall Risk│
|
|
147
|
+
├─────────────────────┼──────────┼────────────┼─────────────┼────────────┼──────┼─────────────┤
|
|
148
|
+
│ example-pkg │ 1.2.3 │ 1 (HIGH) │ 18mo (HIGH) │ 500 (MED) │ none │ HIGH │
|
|
149
|
+
│ another-pkg │ 2.0.0 │ 12 │ 2mo │ 50k │ 1 mod│ MEDIUM │
|
|
150
|
+
└─────────────────────┴──────────┴────────────┴─────────────┴────────────┴──────┴─────────────┘
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
2. **Detail section for Critical and High risk packages:**
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
HIGH RISK: example-pkg@1.2.3
|
|
157
|
+
├── Maintainer concentration: 1 maintainer (bus factor = 1)
|
|
158
|
+
├── Maintenance status: Last publish 18 months ago, no commits in 12 months
|
|
159
|
+
├── Popularity: 500 weekly downloads
|
|
160
|
+
├── Install scripts: none
|
|
161
|
+
├── Known CVEs: none
|
|
162
|
+
└── Transitive risk: depth 2, subtree 4 packages
|
|
163
|
+
Recommendation: Consider replacing with a well-maintained alternative,
|
|
164
|
+
or pin the version and monitor for abandonment.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
3. **Install script warnings** (any package with install scripts):
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
INSTALL SCRIPTS DETECTED:
|
|
171
|
+
- node-gyp@9.4.0: postinstall — native addon compilation (likely legitimate)
|
|
172
|
+
- suspicious-pkg@1.0.0: postinstall — review script contents before trusting
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
4. **Summary line:**
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
RESULT: 1 Critical, 2 High, 3 Medium, N Low — Review flagged items before release
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
5. **Output:** Print report to stdout. If `--output <file>` was passed, also write to that file.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Gates
|
|
186
|
+
|
|
187
|
+
- **Stop if no lockfile.** Do not evaluate without a lockfile — results will be unreliable.
|
|
188
|
+
- **Present as flags, not verdicts.** Never state "this package is unsafe." State "this package has signals that warrant review."
|
|
189
|
+
- **Do not block on API failures.** If npm registry or GitHub API is unavailable, note which factors were skipped and continue with available data.
|
|
190
|
+
|
|
191
|
+
## Harness Integration
|
|
192
|
+
|
|
193
|
+
- **`harness validate`** — Run after creating the skill files to verify they are properly placed.
|
|
194
|
+
- **Triggers:** `on_milestone` fires this skill as part of the milestone completion checklist.
|
|
195
|
+
- **Depends on:** `harness-security-scan` — run after mechanical scanning to complete the security picture.
|
|
196
|
+
- **Output:** Stdout report, optionally written to file via `--output`. No state files written.
|
|
197
|
+
|
|
198
|
+
## Evidence Requirements
|
|
199
|
+
|
|
200
|
+
When reporting findings, cite the source for each factor:
|
|
201
|
+
|
|
202
|
+
- Maintainer data: `registry.npmjs.org/<pkg>` → `maintainers` field
|
|
203
|
+
- Publish date: `registry.npmjs.org/<pkg>` → `time.modified`
|
|
204
|
+
- Downloads: `api.npmjs.org/downloads/point/last-week/<pkg>`
|
|
205
|
+
- Install scripts: `node_modules/<pkg>/package.json` → `scripts`
|
|
206
|
+
- CVEs: `npm audit --json` output
|
|
207
|
+
- Depth: lockfile analysis
|
|
208
|
+
|
|
209
|
+
Do not assert risk scores without citing the specific data point that generated the score.
|
|
210
|
+
|
|
211
|
+
## Success Criteria
|
|
212
|
+
|
|
213
|
+
- Running `/harness:supply-chain-audit` on a project with dependencies outputs a risk table with all 6 factors scored
|
|
214
|
+
- A dependency with a sole maintainer and no commits in 12 months scores "high risk"
|
|
215
|
+
- A dependency with a `postinstall` script is flagged in the install scripts section
|
|
216
|
+
- API failures produce "unknown" scores with a note, not errors that stop the audit
|
|
217
|
+
- All findings are framed as flags for human review, not automated verdicts
|
|
218
|
+
|
|
219
|
+
## Example Output
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
Supply Chain Audit: my-project
|
|
223
|
+
Date: 2026-03-31
|
|
224
|
+
Packages evaluated: 24 direct + 3 deep transitives (depth > 5)
|
|
225
|
+
|
|
226
|
+
CRITICAL (1):
|
|
227
|
+
lodash@4.17.20 — CVE-2021-23337 (high severity, unpatched)
|
|
228
|
+
|
|
229
|
+
HIGH (2):
|
|
230
|
+
abandoned-util@0.9.1 — sole maintainer, last publish 22 months ago
|
|
231
|
+
sketchy-helper@2.1.0 — sole maintainer, postinstall script detected
|
|
232
|
+
|
|
233
|
+
MEDIUM (3):
|
|
234
|
+
small-lib@1.0.0 — 800 weekly downloads (low popularity signal)
|
|
235
|
+
...
|
|
236
|
+
|
|
237
|
+
LOW (18): no significant risk signals
|
|
238
|
+
|
|
239
|
+
INSTALL SCRIPTS:
|
|
240
|
+
node-gyp@9.4.0 — postinstall (native compilation, likely legitimate)
|
|
241
|
+
sketchy-helper@2.1.0 — postinstall (REVIEW: contents unknown)
|
|
242
|
+
|
|
243
|
+
RESULT: 1 Critical, 2 High, 3 Medium, 18 Low
|
|
244
|
+
Next steps: Update lodash to patch CVE. Review sketchy-helper postinstall script.
|
|
245
|
+
Consider alternatives to abandoned-util.
|
|
246
|
+
```
|
|
247
|
+
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
<!-- Generated by harness generate-slash-commands. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Harness TDD
|
|
4
|
+
|
|
5
|
+
> Red-green-refactor cycle integrated with harness validation. No production code exists without a failing test first.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Implementing any new feature, function, module, or component
|
|
10
|
+
- Fixing any bug (write a test that reproduces the bug first)
|
|
11
|
+
- Adding behavior to existing code
|
|
12
|
+
- When `on_new_feature` or `on_bug_fix` triggers fire
|
|
13
|
+
- NOT when doing pure refactoring with existing test coverage (use harness-refactoring instead)
|
|
14
|
+
- NOT when writing documentation, configuration, or non-behavioral files
|
|
15
|
+
- NOT when spiking/prototyping (but convert spikes to TDD before merging)
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### Iron Law
|
|
20
|
+
|
|
21
|
+
**No production code may exist without a failing test that demanded its creation.**
|
|
22
|
+
|
|
23
|
+
If you find yourself writing production code first, STOP. Delete it. Write the test first. This is not a guideline — it is a hard constraint.
|
|
24
|
+
|
|
25
|
+
### Phase 1: RED — Write a Failing Test
|
|
26
|
+
|
|
27
|
+
1. **Identify the smallest behavior to test.** One assertion per test. One behavior per cycle. If you are testing two things, split into two cycles.
|
|
28
|
+
|
|
29
|
+
2. **Write the test file or add to the appropriate test file.** Follow the project's existing test conventions (file naming, framework, location).
|
|
30
|
+
|
|
31
|
+
3. **Write ONE minimal test** that asserts the expected behavior. The test should:
|
|
32
|
+
- Have a clear, descriptive name that states what behavior is expected
|
|
33
|
+
- Set up only the minimal fixtures needed
|
|
34
|
+
- Make a single assertion about the expected outcome
|
|
35
|
+
- NOT test implementation details — test observable behavior
|
|
36
|
+
|
|
37
|
+
4. **Run the test suite.** Use the project's test runner (e.g., `npx vitest run path/to/test`, `npm test`, `pytest`).
|
|
38
|
+
|
|
39
|
+
5. **MANDATORY: Watch the test FAIL.** Read the failure message. Confirm it fails for the RIGHT reason — the behavior is not yet implemented, not because the test is broken. If the test passes, either the behavior already exists (skip this cycle) or the test is wrong (fix the test).
|
|
40
|
+
|
|
41
|
+
6. **Record the failure.** Note the test name and failure reason. This is your contract for the GREEN phase.
|
|
42
|
+
|
|
43
|
+
### Phase 2: GREEN — Write the Simplest Code to Pass
|
|
44
|
+
|
|
45
|
+
1. **Write the MINIMUM production code** that makes the failing test pass. Do not write code for future tests. Do not add error handling you have not tested. Do not generalize.
|
|
46
|
+
|
|
47
|
+
2. **Resist the urge to write "good" code.** The GREEN phase is about correctness, not elegance. Hardcoded values are acceptable if they pass the test. Duplication is acceptable. You will clean up in REFACTOR.
|
|
48
|
+
|
|
49
|
+
3. **Run the FULL test suite** (not just the new test). All tests must pass.
|
|
50
|
+
|
|
51
|
+
4. **MANDATORY: Watch the test PASS.** Read the output. Confirm all tests are green. If any test fails, fix the production code (not the tests) until all pass.
|
|
52
|
+
|
|
53
|
+
5. **Do not proceed to REFACTOR if any test is red.** Fix first.
|
|
54
|
+
|
|
55
|
+
### Phase 3: REFACTOR — Clean Up While Green
|
|
56
|
+
|
|
57
|
+
1. **With all tests passing,** look for opportunities to improve:
|
|
58
|
+
- Remove duplication (DRY)
|
|
59
|
+
- Extract methods or functions for clarity
|
|
60
|
+
- Rename for better readability
|
|
61
|
+
- Simplify conditionals
|
|
62
|
+
- Improve structure without changing behavior
|
|
63
|
+
|
|
64
|
+
2. **Run the full test suite after EVERY change.** If a test breaks during refactoring, undo the last change immediately. Refactoring must not change behavior.
|
|
65
|
+
|
|
66
|
+
3. **Keep refactoring steps small.** One rename, one extraction, one simplification at a time. Run tests between each.
|
|
67
|
+
|
|
68
|
+
4. **If no refactoring is needed, skip this phase.** Not every cycle requires cleanup.
|
|
69
|
+
|
|
70
|
+
### Phase 4: VALIDATE — Run Harness Checks
|
|
71
|
+
|
|
72
|
+
1. **Run `harness check-deps`** to verify dependency boundaries are respected. New code must not introduce forbidden imports or layer violations.
|
|
73
|
+
|
|
74
|
+
2. **Run `harness validate`** to verify the full project health. This catches architectural drift, documentation gaps, and constraint violations.
|
|
75
|
+
|
|
76
|
+
3. **If either check fails,** fix the issue before committing. The fix may require another RED-GREEN-REFACTOR cycle if it involves behavioral changes.
|
|
77
|
+
|
|
78
|
+
4. **Commit the cycle.** Each RED-GREEN-REFACTOR-VALIDATE cycle produces one atomic commit. The commit message references what behavior was added (not "add test" — describe the behavior).
|
|
79
|
+
|
|
80
|
+
### Graph Refresh
|
|
81
|
+
|
|
82
|
+
If a knowledge graph exists at `.harness/graph/`, refresh it after code changes to keep graph queries accurate:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
harness scan [path]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Skipping this step means subsequent graph queries (impact analysis, dependency health, test advisor) may return stale results.
|
|
89
|
+
|
|
90
|
+
### Cycle Rhythm
|
|
91
|
+
|
|
92
|
+
Repeat the 4 phases for each new behavior. A typical feature requires 3-10 cycles. Each cycle should take 2-15 minutes. If a cycle takes longer than 15 minutes, the step is too large — break it down.
|
|
93
|
+
|
|
94
|
+
**Ordering within a feature:**
|
|
95
|
+
|
|
96
|
+
1. Start with the happy path (simplest success case)
|
|
97
|
+
2. Add edge cases one at a time
|
|
98
|
+
3. Add error handling cases
|
|
99
|
+
4. Add integration points last
|
|
100
|
+
|
|
101
|
+
## Harness Integration
|
|
102
|
+
|
|
103
|
+
- **`harness check-deps`** — Run in VALIDATE phase after each cycle. Catches forbidden imports and layer boundary violations introduced by new code.
|
|
104
|
+
- **`harness validate`** — Run in VALIDATE phase after each cycle. Full project health check including architecture, documentation, and constraints.
|
|
105
|
+
- **`harness cleanup`** — Run periodically (every 3-5 cycles) to detect entropy accumulation. Address any issues before they compound.
|
|
106
|
+
- **Test runner** — Use the project's configured test runner. Harness does not prescribe a test framework but the test must actually execute and report results.
|
|
107
|
+
|
|
108
|
+
## Success Criteria
|
|
109
|
+
|
|
110
|
+
- Every production function/method has at least one corresponding test
|
|
111
|
+
- Every test was observed to fail before the production code was written
|
|
112
|
+
- Every test was observed to pass after the production code was written
|
|
113
|
+
- `harness check-deps` passes after each cycle
|
|
114
|
+
- `harness validate` passes after each cycle
|
|
115
|
+
- Each cycle is an atomic commit with a descriptive message
|
|
116
|
+
- No test tests implementation details (only observable behavior)
|
|
117
|
+
- No production code exists that was not demanded by a failing test
|
|
118
|
+
|
|
119
|
+
## Examples
|
|
120
|
+
|
|
121
|
+
### Example: Adding a `calculateTotal` function
|
|
122
|
+
|
|
123
|
+
**RED:**
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
// cart.test.ts
|
|
127
|
+
it('calculates total for items with quantity and price', () => {
|
|
128
|
+
const items = [
|
|
129
|
+
{ name: 'Widget', price: 10, quantity: 2 },
|
|
130
|
+
{ name: 'Gadget', price: 25, quantity: 1 },
|
|
131
|
+
];
|
|
132
|
+
expect(calculateTotal(items)).toBe(45);
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Run tests. Observe: `ReferenceError: calculateTotal is not defined`. Correct failure — function does not exist yet.
|
|
137
|
+
|
|
138
|
+
**GREEN:**
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// cart.ts
|
|
142
|
+
export function calculateTotal(items: Array<{ price: number; quantity: number }>): number {
|
|
143
|
+
return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Run tests. Observe: all tests pass.
|
|
148
|
+
|
|
149
|
+
**REFACTOR:** No refactoring needed for this simple function. Skip.
|
|
150
|
+
|
|
151
|
+
**VALIDATE:**
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
harness check-deps # Pass
|
|
155
|
+
harness validate # Pass
|
|
156
|
+
git add cart.ts cart.test.ts
|
|
157
|
+
git commit -m "feat(cart): calculate total from item price and quantity"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Next cycle (RED):** Write a test for empty array input. Watch it fail (or pass — if it passes, the behavior is already handled). Continue.
|
|
161
|
+
|
|
162
|
+
## Gates
|
|
163
|
+
|
|
164
|
+
These are hard stops. Violating any gate means the process has broken down.
|
|
165
|
+
|
|
166
|
+
- **Code before test = delete it.** If production code is written before a failing test exists, delete the production code and start the cycle correctly.
|
|
167
|
+
- **Must watch fail.** If you did not observe the test fail with the correct failure reason, the RED phase is incomplete. Do not proceed to GREEN.
|
|
168
|
+
- **Must watch pass.** If you did not observe all tests pass after writing production code, the GREEN phase is incomplete. Do not proceed to REFACTOR.
|
|
169
|
+
- **No skipping VALIDATE.** Every cycle must end with `harness check-deps` and `harness validate`. Skipping creates architectural debt that compounds.
|
|
170
|
+
- **No multi-behavior tests.** One test, one assertion, one behavior. Tests that assert multiple unrelated things must be split.
|
|
171
|
+
- **No "I'll write tests later."** There is no later. The test comes first or the code does not get written.
|
|
172
|
+
|
|
173
|
+
## Escalation
|
|
174
|
+
|
|
175
|
+
- **After 3 failed attempts to make a test pass:** Stop coding. The design may be wrong. Re-examine the interface, the test assumptions, or the architecture. Consider whether the feature needs a different approach. Consult the plan or spec.
|
|
176
|
+
- **When a test cannot be written without complex mocking:** This is a design smell. The code under test has too many dependencies. Refactor the existing code to be more testable before proceeding, or reconsider the abstraction boundary.
|
|
177
|
+
- **When harness checks repeatedly fail:** The new code may be violating architectural constraints intentionally. Escalate to the human to decide whether to update the constraints or change the approach.
|
|
178
|
+
- **When the cycle is taking more than 15 minutes:** The step is too large. Break the current behavior into smaller sub-behaviors and test each one separately.
|
|
179
|
+
- **When you are unsure what to test next:** Review the spec or plan. If no spec exists, use the harness-brainstorming skill to clarify requirements before writing more tests.
|
|
180
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<!-- Generated by harness generate-slash-commands. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Harness Test Advisor
|
|
4
|
+
|
|
5
|
+
> Graph-based test selection. Answers: "I changed these files — what tests should I run?"
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Before pushing code — run only the tests that matter
|
|
10
|
+
- In CI — optimize test suite execution order
|
|
11
|
+
- When a test fails — understand which changes could have caused it
|
|
12
|
+
- When `on_pr` triggers fire
|
|
13
|
+
- NOT for writing tests (use harness-tdd)
|
|
14
|
+
- NOT for test quality analysis (out of scope)
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
A knowledge graph at `.harness/graph/` enables full analysis. If no graph exists,
|
|
19
|
+
the skill uses static analysis fallbacks (see Graph Availability section).
|
|
20
|
+
Run `harness scan` to enable graph-enhanced analysis.
|
|
21
|
+
|
|
22
|
+
### Graph Availability
|
|
23
|
+
|
|
24
|
+
Before starting, check if `.harness/graph/graph.json` exists.
|
|
25
|
+
|
|
26
|
+
**If graph exists:** Check staleness — compare `.harness/graph/metadata.json`
|
|
27
|
+
scanTimestamp against `git log -1 --format=%ct` (latest commit timestamp).
|
|
28
|
+
If graph is more than 10 commits behind (`git log --oneline <scanTimestamp>..HEAD | wc -l`),
|
|
29
|
+
run `harness scan` to refresh before proceeding. (Staleness sensitivity: **Medium**)
|
|
30
|
+
|
|
31
|
+
**If graph exists and is fresh (or refreshed):** Use graph tools as primary strategy.
|
|
32
|
+
|
|
33
|
+
**If no graph exists:** Output "Running without graph (run `harness scan` to
|
|
34
|
+
enable full analysis)" and use fallback strategies for all subsequent steps.
|
|
35
|
+
|
|
36
|
+
## Process
|
|
37
|
+
|
|
38
|
+
### Phase 1: PARSE — Identify Changed Files
|
|
39
|
+
|
|
40
|
+
1. **From diff**: Parse `git diff --name-only` to get changed file paths.
|
|
41
|
+
2. **From input**: Accept comma-separated file paths.
|
|
42
|
+
3. **Filter**: Only consider `.ts`, `.tsx`, `.js`, `.jsx` files (skip docs, config).
|
|
43
|
+
|
|
44
|
+
### Phase 2: DISCOVER — Find Related Tests via Graph
|
|
45
|
+
|
|
46
|
+
For each changed file, use graph traversal to find test files:
|
|
47
|
+
|
|
48
|
+
1. **Direct test coverage**: Use `get_impact` to find test files that import the changed file.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
get_impact(filePath="src/services/auth.ts")
|
|
52
|
+
→ tests: ["tests/services/auth.test.ts", "tests/integration/auth-flow.test.ts"]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. **Transitive test coverage**: Use `query_graph` with depth 2 to find tests that import files that import the changed file.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
query_graph(rootNodeIds=["file:src/services/auth.ts"], maxDepth=2, includeEdges=["imports"], bidirectional=true)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. **Co-change tests**: Check `co_changes_with` edges for test files that historically change alongside the modified files.
|
|
62
|
+
|
|
63
|
+
#### Fallback (without graph)
|
|
64
|
+
|
|
65
|
+
When no graph is available, use naming conventions, import parsing, and git history:
|
|
66
|
+
|
|
67
|
+
1. **Tier 1 — Filename convention matching**: For each changed file `foo.ts`, search for:
|
|
68
|
+
- `foo.test.ts`, `foo.spec.ts` (same directory)
|
|
69
|
+
- `__tests__/foo.ts`, `__tests__/foo.test.ts`
|
|
70
|
+
- Test files in a parallel `tests/` directory mirroring the source path
|
|
71
|
+
2. **Tier 2 — Import-linked tests**: Parse test files' import statements (grep for `import.*from` in `*.test.*` and `*.spec.*` files). If a test file imports the changed file, it belongs in Tier 2 (if not already in Tier 1).
|
|
72
|
+
3. **Tier 3 — Co-change correlated tests**: Use `git log --format="%H" --name-only` to find test files that frequently change in the same commit as the target file. Files that co-change in >2 commits are co-change correlated.
|
|
73
|
+
4. **Rank**: Tier 1 = direct filename match, Tier 2 = import-linked tests, Tier 3 = co-change correlated tests. Output the same tiered format as the graph version.
|
|
74
|
+
|
|
75
|
+
> Fallback completeness: ~80% — naming conventions and imports catch most mappings; misses dynamic imports and indirect coverage.
|
|
76
|
+
|
|
77
|
+
### Phase 3: PRIORITIZE — Rank and Generate Commands
|
|
78
|
+
|
|
79
|
+
Organize tests into three tiers:
|
|
80
|
+
|
|
81
|
+
**Tier 1 — Must Run** (direct coverage):
|
|
82
|
+
Tests that directly import or test the changed files. These are most likely to catch regressions.
|
|
83
|
+
|
|
84
|
+
**Tier 2 — Should Run** (transitive coverage):
|
|
85
|
+
Tests that cover code one hop away from the changed files. These catch indirect breakage.
|
|
86
|
+
|
|
87
|
+
**Tier 3 — Could Run** (related):
|
|
88
|
+
Tests in the same module or that co-change with the modified files. Lower probability of failure but worth running if time permits.
|
|
89
|
+
|
|
90
|
+
### Output
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## Test Advisor Report
|
|
94
|
+
|
|
95
|
+
### Changed Files
|
|
96
|
+
- src/services/auth.ts (modified)
|
|
97
|
+
- src/types/user.ts (modified)
|
|
98
|
+
|
|
99
|
+
### Tier 1 — Must Run (direct coverage)
|
|
100
|
+
1. tests/services/auth.test.ts — imports auth.ts
|
|
101
|
+
2. tests/types/user.test.ts — imports user.ts
|
|
102
|
+
|
|
103
|
+
### Tier 2 — Should Run (transitive)
|
|
104
|
+
3. tests/routes/login.test.ts — imports routes/login.ts → imports auth.ts
|
|
105
|
+
4. tests/middleware/verify.test.ts — imports middleware/verify.ts → imports auth.ts
|
|
106
|
+
|
|
107
|
+
### Tier 3 — Could Run (related)
|
|
108
|
+
5. tests/integration/auth-flow.test.ts — same module, co-changes with auth.ts
|
|
109
|
+
|
|
110
|
+
### Quick Run Command
|
|
111
|
+
npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes/login.test.ts tests/middleware/verify.test.ts
|
|
112
|
+
|
|
113
|
+
### Full Run Command (all tiers)
|
|
114
|
+
npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes/login.test.ts tests/middleware/verify.test.ts tests/integration/auth-flow.test.ts
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Harness Integration
|
|
118
|
+
|
|
119
|
+
- **`harness scan`** — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses naming convention and import parsing fallbacks.
|
|
120
|
+
- **`harness validate`** — Run after acting on findings to verify project health.
|
|
121
|
+
- **Graph tools** — This skill uses `query_graph`, `get_impact`, and `get_relationships` MCP tools.
|
|
122
|
+
|
|
123
|
+
## Success Criteria
|
|
124
|
+
|
|
125
|
+
- Tests prioritized into 3 tiers (Must Run, Should Run, Could Run)
|
|
126
|
+
- Executable run commands generated for quick and full test runs
|
|
127
|
+
- Coverage gaps flagged for changed files with no test coverage
|
|
128
|
+
- Report follows the structured output format
|
|
129
|
+
- All findings are backed by graph query evidence (with graph) or systematic static analysis (without graph)
|
|
130
|
+
|
|
131
|
+
## Examples
|
|
132
|
+
|
|
133
|
+
### Example: Selecting Tests for a Services Change
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Input: git diff shows src/services/auth.ts and src/types/user.ts modified
|
|
137
|
+
|
|
138
|
+
1. PARSE — 2 changed files identified (both .ts)
|
|
139
|
+
2. DISCOVER — get_impact(filePath="src/services/auth.ts")
|
|
140
|
+
query_graph with depth 2 for transitive tests
|
|
141
|
+
Tier 1: auth.test.ts, user.test.ts (direct imports)
|
|
142
|
+
Tier 2: login.test.ts, verify.test.ts (one hop away)
|
|
143
|
+
Tier 3: auth-flow.test.ts (co-change history)
|
|
144
|
+
3. PRIORITIZE — 5 tests across 3 tiers
|
|
145
|
+
|
|
146
|
+
Output:
|
|
147
|
+
Tier 1 (must run): 2 tests
|
|
148
|
+
Tier 2 (should run): 2 tests
|
|
149
|
+
Tier 3 (could run): 1 test
|
|
150
|
+
Quick command: npx vitest run auth.test.ts user.test.ts login.test.ts verify.test.ts
|
|
151
|
+
Coverage gaps: none
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Gates
|
|
155
|
+
|
|
156
|
+
- **Graph preferred, fallback available.** If no graph exists, use naming conventions, import parsing, and git co-change analysis to identify relevant tests. Do not stop — produce the best test selection possible.
|
|
157
|
+
- **Always include Tier 1.** Direct test coverage is non-negotiable — always recommend running these (whether found via graph or naming conventions).
|
|
158
|
+
|
|
159
|
+
## Escalation
|
|
160
|
+
|
|
161
|
+
- **When changed file has no test coverage**: Flag as a gap: "No tests found for src/services/auth.ts — consider adding tests before merging."
|
|
162
|
+
- **When Tier 1 has >20 tests**: The changed file may be a hub. Suggest running Tier 1 in parallel or splitting the file.
|
|
163
|
+
|