@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,324 @@
|
|
|
1
|
+
# Harness Pre-Commit Review
|
|
2
|
+
|
|
3
|
+
> Lightweight pre-commit quality gate — mechanical checks first, AI review second. Fast feedback before code leaves your machine.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Before committing code (manual invocation or git pre-commit hook)
|
|
8
|
+
- As a quick sanity check before pushing to a branch
|
|
9
|
+
- When you want fast feedback without a full code review cycle
|
|
10
|
+
- NOT as a replacement for full peer review (use `harness-code-review` for that)
|
|
11
|
+
- NOT for commits that only update documentation or configuration (fast path skips AI review)
|
|
12
|
+
|
|
13
|
+
## Principle: Deterministic First
|
|
14
|
+
|
|
15
|
+
This skill follows the Deterministic-vs-LLM Responsibility Split principle. Mechanical checks run first and must pass before any AI review occurs. If a linter or type checker can catch the problem, the LLM should not be the one finding it.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### Phase 1: Mechanical Checks
|
|
20
|
+
|
|
21
|
+
Run all deterministic checks against staged changes. These are binary pass/fail — no judgment required.
|
|
22
|
+
|
|
23
|
+
#### 1. Detect Available Check Commands
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Check for project-specific commands
|
|
27
|
+
cat package.json 2>/dev/null | grep -E '"(lint|typecheck|test)"'
|
|
28
|
+
cat Makefile 2>/dev/null | grep -E '^(lint|typecheck|test):'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### 2. Run Checks in Order
|
|
32
|
+
|
|
33
|
+
Run whichever of these are available in the project:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Lint (fastest — run first)
|
|
37
|
+
pnpm lint 2>&1 || npm run lint 2>&1 || make lint 2>&1
|
|
38
|
+
|
|
39
|
+
# Type check
|
|
40
|
+
pnpm typecheck 2>&1 || npx tsc --noEmit 2>&1 || make typecheck 2>&1
|
|
41
|
+
|
|
42
|
+
# Tests (slowest — run last)
|
|
43
|
+
pnpm test 2>&1 || npm test 2>&1 || make test 2>&1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### 2b. Harness Health Check
|
|
47
|
+
|
|
48
|
+
If the project uses harness, run `assess_project` for harness-specific validation:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
assess_project({
|
|
52
|
+
path: "<project-root>",
|
|
53
|
+
checks: ["validate", "deps"],
|
|
54
|
+
mode: "summary"
|
|
55
|
+
})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If `healthy: false`, include harness check failures in the mechanical check report. This replaces manually running `harness validate` and `harness check-deps` as separate commands.
|
|
59
|
+
|
|
60
|
+
#### 3. Gate Decision
|
|
61
|
+
|
|
62
|
+
- **Any check fails:** STOP. Report the failure. Do not proceed to AI review. The author must fix mechanical issues first.
|
|
63
|
+
- **All checks pass:** Proceed to Phase 2.
|
|
64
|
+
|
|
65
|
+
**Output format for failures:**
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Pre-Commit Check: FAIL
|
|
69
|
+
|
|
70
|
+
Mechanical Checks:
|
|
71
|
+
- Lint: FAIL — 3 errors (see output above)
|
|
72
|
+
- Types: PASS
|
|
73
|
+
- Tests: NOT RUN (blocked by lint failure)
|
|
74
|
+
|
|
75
|
+
Action: Fix lint errors before committing.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Graph Freshness Check
|
|
79
|
+
|
|
80
|
+
If a knowledge graph exists at `.harness/graph/` and code files have changed since the last scan, run `harness scan` before proceeding. The AI review phase uses graph-enhanced MCP tools (impact analysis, harness checks) that return stale results with an outdated graph.
|
|
81
|
+
|
|
82
|
+
If no graph exists, skip this step — the tools fall back to non-graph behavior.
|
|
83
|
+
|
|
84
|
+
### Impact Preview
|
|
85
|
+
|
|
86
|
+
After mechanical checks pass, run `harness impact-preview` to surface the blast radius of staged changes. This is informational only — it never blocks the commit.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
harness impact-preview
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Include the output in the report between the mechanical checks section and the AI review section:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Impact Preview (3 staged files)
|
|
96
|
+
Code: 12 files (routes/login.ts, middleware/verify.ts, +10)
|
|
97
|
+
Tests: 3 tests (auth.test.ts, integration.test.ts, +1)
|
|
98
|
+
Docs: 2 docs (auth-guide.md, api-reference.md)
|
|
99
|
+
Total: 17 affected
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If no graph exists, the command prints a nudge message and returns — no action needed. If no files are staged, it says so. Neither case blocks the workflow.
|
|
103
|
+
|
|
104
|
+
### Phase 2: Classify Changes
|
|
105
|
+
|
|
106
|
+
Determine whether AI review is needed based on what changed.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Get list of staged files
|
|
110
|
+
git diff --cached --name-only
|
|
111
|
+
|
|
112
|
+
# Check if only docs/config files changed
|
|
113
|
+
git diff --cached --name-only | grep -v -E '\.(md|yml|yaml|json|toml|ini|cfg|conf|env|env\..*)$' | wc -l
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Fast Path: Skip AI Review
|
|
117
|
+
|
|
118
|
+
If ALL staged files match these patterns, skip AI review and approve:
|
|
119
|
+
|
|
120
|
+
- `*.md` (documentation)
|
|
121
|
+
- `*.yml`, `*.yaml` (configuration)
|
|
122
|
+
- `*.json` (configuration — unless in `src/`)
|
|
123
|
+
- `*.toml`, `*.ini`, `*.cfg` (configuration)
|
|
124
|
+
- `.env*` (environment — but warn about secrets)
|
|
125
|
+
- `LICENSE`, `CODEOWNERS`, `.gitignore`
|
|
126
|
+
|
|
127
|
+
**Output for fast path:**
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Pre-Commit Check: PASS (fast path)
|
|
131
|
+
|
|
132
|
+
Mechanical Checks:
|
|
133
|
+
- Lint: PASS
|
|
134
|
+
- Types: PASS
|
|
135
|
+
- Tests: PASS (12/12)
|
|
136
|
+
|
|
137
|
+
AI Review: SKIPPED (docs/config only)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
#### Standard Path: Proceed to AI Review
|
|
141
|
+
|
|
142
|
+
If any staged file contains code changes, proceed to Phase 3.
|
|
143
|
+
|
|
144
|
+
### Phase 3: Security Scan
|
|
145
|
+
|
|
146
|
+
Run the built-in security scanner against staged files. This is a mechanical check — no AI judgment involved.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Get list of staged source files
|
|
150
|
+
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|tsx|js|jsx|go|py)$'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Run `harness check-security --changed-only` on the staged files. Report any findings:
|
|
154
|
+
|
|
155
|
+
- **Error findings (blocking):** Hardcoded secrets, eval/injection, weak crypto — these block the commit just like lint failures.
|
|
156
|
+
- **Warning/info findings (advisory):** CORS wildcards, HTTP URLs, disabled TLS — reported but do not block.
|
|
157
|
+
|
|
158
|
+
Include security scan results in the report output:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Security Scan: [PASS/WARN/FAIL] (N errors, N warnings)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
If no source files are staged, skip the security scan.
|
|
165
|
+
|
|
166
|
+
### Phase 4: AI Review (Lightweight)
|
|
167
|
+
|
|
168
|
+
Perform a focused, lightweight review of staged changes. This is NOT a full code review — it catches obvious issues only.
|
|
169
|
+
|
|
170
|
+
#### 1. Quick Review via review_changes
|
|
171
|
+
|
|
172
|
+
Use the `review_changes` MCP tool with `depth: 'quick'` for fast pre-commit analysis:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
review_changes({
|
|
176
|
+
path: "<project-root>",
|
|
177
|
+
diff: "<output of git diff --cached>",
|
|
178
|
+
depth: "quick",
|
|
179
|
+
mode: "summary"
|
|
180
|
+
})
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This runs forbidden pattern checks and size analysis. For the semantic review items below, supplement with manual diff reading.
|
|
184
|
+
|
|
185
|
+
#### 2. Quick Review Checklist
|
|
186
|
+
|
|
187
|
+
Review the staged diff for these high-signal issues only:
|
|
188
|
+
|
|
189
|
+
- **Obvious bugs:** null dereference, infinite loops, off-by-one errors, resource leaks
|
|
190
|
+
- **Security issues:** hardcoded secrets, SQL injection, path traversal, unvalidated input (complements the mechanical scan with semantic analysis — e.g., tracing user input across function boundaries)
|
|
191
|
+
- **Broken imports:** references to files/modules that do not exist
|
|
192
|
+
- **Debug artifacts:** console.log, debugger statements, TODO/FIXME without issue reference
|
|
193
|
+
- **Type mismatches:** function called with wrong argument types (if visible in diff)
|
|
194
|
+
|
|
195
|
+
Do NOT review for:
|
|
196
|
+
|
|
197
|
+
- Style (that is the linter's job)
|
|
198
|
+
- Architecture (that is the full review's job)
|
|
199
|
+
- Test completeness (that is the full review's job)
|
|
200
|
+
- Naming preferences (subjective and noisy at this stage)
|
|
201
|
+
|
|
202
|
+
#### 3. Report
|
|
203
|
+
|
|
204
|
+
**If no issues found:**
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
Pre-Commit Check: PASS
|
|
208
|
+
|
|
209
|
+
Mechanical Checks:
|
|
210
|
+
- Lint: PASS
|
|
211
|
+
- Types: PASS
|
|
212
|
+
- Tests: PASS (12/12)
|
|
213
|
+
- Security Scan: PASS (0 errors, 0 warnings)
|
|
214
|
+
|
|
215
|
+
Impact Preview (3 staged files)
|
|
216
|
+
Code: 12 files (routes/login.ts, middleware/verify.ts, +10)
|
|
217
|
+
Tests: 3 tests (auth.test.ts, integration.test.ts, +1)
|
|
218
|
+
Docs: 2 docs (auth-guide.md, api-reference.md)
|
|
219
|
+
Total: 17 affected
|
|
220
|
+
|
|
221
|
+
AI Review: PASS (no issues found)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**If issues found:**
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Pre-Commit Check: WARN
|
|
228
|
+
|
|
229
|
+
Mechanical Checks:
|
|
230
|
+
- Lint: PASS
|
|
231
|
+
- Types: PASS
|
|
232
|
+
- Tests: PASS (12/12)
|
|
233
|
+
- Security Scan: WARN (0 errors, 1 warning)
|
|
234
|
+
- [SEC-NET-001] src/cors.ts:5 — CORS wildcard origin
|
|
235
|
+
|
|
236
|
+
Impact Preview (2 staged files)
|
|
237
|
+
Code: 8 files (cors.ts, server.ts, +6)
|
|
238
|
+
Tests: 2 tests (cors.test.ts, server.test.ts)
|
|
239
|
+
Total: 10 affected
|
|
240
|
+
|
|
241
|
+
AI Review: 2 observations
|
|
242
|
+
1. [file:line] Possible null dereference — `user.email` accessed without null check after `findUser()` which can return null.
|
|
243
|
+
2. [file:line] Debug artifact — `console.log('debug:', payload)` appears to be left from debugging.
|
|
244
|
+
|
|
245
|
+
Action: Review observations above. Commit anyway if intentional, or fix first.
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Git Hook Installation
|
|
249
|
+
|
|
250
|
+
To use as an automatic pre-commit hook, add to `.git/hooks/pre-commit` or configure via your git hooks manager (husky, lefthook, etc.):
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
#!/bin/bash
|
|
254
|
+
# .git/hooks/pre-commit
|
|
255
|
+
harness skill run harness-pre-commit-review
|
|
256
|
+
exit_code=$?
|
|
257
|
+
if [ $exit_code -ne 0 ]; then
|
|
258
|
+
echo "Pre-commit review failed. Fix issues before committing."
|
|
259
|
+
exit 1
|
|
260
|
+
fi
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Note:** AI review observations (WARN) do not block the commit — only mechanical check failures (FAIL) block. The author decides whether to address AI observations.
|
|
264
|
+
|
|
265
|
+
## Gates
|
|
266
|
+
|
|
267
|
+
- **Mechanical checks must pass before AI review.** Do not run AI review if lint/typecheck/tests fail.
|
|
268
|
+
- **Fast path is mandatory.** If only docs/config changed, skip AI review — do not waste tokens.
|
|
269
|
+
- **AI review is advisory only.** Observations do not block the commit. Only mechanical failures block.
|
|
270
|
+
|
|
271
|
+
## Harness Integration
|
|
272
|
+
|
|
273
|
+
- Follows Principle 7 (Deterministic-vs-LLM Split) — mechanical checks first, AI review second
|
|
274
|
+
- Reads `.harness/review-learnings.md` for calibration (if present)
|
|
275
|
+
- Complements harness-code-review (full review) — use pre-commit for quick checks, code-review for thorough analysis
|
|
276
|
+
- **`assess_project`** — Used in Phase 1 for harness-specific health checks (validate + deps) in a single call.
|
|
277
|
+
- **`review_changes`** — Used in Phase 4 with `depth: 'quick'` for fast pre-commit diff analysis.
|
|
278
|
+
- **`harness impact-preview`** — Run after mechanical checks pass to show blast radius of staged changes. Informational only — never blocks.
|
|
279
|
+
|
|
280
|
+
## Success Criteria
|
|
281
|
+
|
|
282
|
+
- [ ] Mechanical checks ran and produced clear pass/fail results
|
|
283
|
+
- [ ] Fast path correctly identified docs/config-only changes
|
|
284
|
+
- [ ] AI review focused on high-signal issues only (no style nits)
|
|
285
|
+
- [ ] Report follows the structured format exactly
|
|
286
|
+
|
|
287
|
+
## Examples
|
|
288
|
+
|
|
289
|
+
### Example: Clean Commit
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
Pre-Commit Check: PASS
|
|
293
|
+
|
|
294
|
+
Mechanical Checks:
|
|
295
|
+
- Lint: PASS
|
|
296
|
+
- Types: PASS
|
|
297
|
+
- Tests: PASS (12/12)
|
|
298
|
+
|
|
299
|
+
Impact Preview (2 staged files)
|
|
300
|
+
Code: 5 files (auth.ts, login.ts, +3)
|
|
301
|
+
Tests: 2 tests (auth.test.ts, login.test.ts)
|
|
302
|
+
Total: 7 affected
|
|
303
|
+
|
|
304
|
+
AI Review: PASS (no issues found)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Example: Docs-Only Fast Path
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
Pre-Commit Check: PASS (fast path)
|
|
311
|
+
|
|
312
|
+
Mechanical Checks:
|
|
313
|
+
- Lint: PASS
|
|
314
|
+
- Types: PASS
|
|
315
|
+
- Tests: PASS (12/12)
|
|
316
|
+
|
|
317
|
+
AI Review: SKIPPED (docs/config only)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Escalation
|
|
321
|
+
|
|
322
|
+
- **Mechanical checks fail:** Fix the issues. Do not bypass the hook.
|
|
323
|
+
- **AI review finds a potential issue you disagree with:** Commit anyway — AI review observations are advisory, not blocking. If the observation is consistently wrong, add it to `.harness/review-learnings.md` under Noise / False Positives.
|
|
324
|
+
- **Hook is too slow:** If the full test suite is slow, configure the project to run only affected tests in pre-commit. The full suite runs in CI.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: harness-pre-commit-review
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Lightweight pre-commit quality gate combining mechanical checks and AI review
|
|
4
|
+
triggers: [manual, on_commit]
|
|
5
|
+
platforms: [claude-code, gemini-cli]
|
|
6
|
+
tools: [Bash, Read, Glob, Grep]
|
|
7
|
+
cli:
|
|
8
|
+
command: harness skill run harness-pre-commit-review
|
|
9
|
+
args:
|
|
10
|
+
- name: path
|
|
11
|
+
description: Project root path
|
|
12
|
+
required: false
|
|
13
|
+
mcp:
|
|
14
|
+
tool: run_skill
|
|
15
|
+
input:
|
|
16
|
+
skill: harness-pre-commit-review
|
|
17
|
+
path: string
|
|
18
|
+
type: rigid
|
|
19
|
+
tier: 3
|
|
20
|
+
phases:
|
|
21
|
+
- name: mechanical-checks
|
|
22
|
+
description: Run deterministic checks (lint, typecheck, tests)
|
|
23
|
+
required: true
|
|
24
|
+
- name: classify-changes
|
|
25
|
+
description: Determine if AI review is needed based on change type
|
|
26
|
+
required: true
|
|
27
|
+
- name: ai-review
|
|
28
|
+
description: Lightweight AI review of staged changes (skipped for docs/config-only)
|
|
29
|
+
required: false
|
|
30
|
+
state:
|
|
31
|
+
persistent: false
|
|
32
|
+
files: []
|
|
33
|
+
depends_on:
|
|
34
|
+
- harness-code-review
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Harness Product Spec
|
|
2
|
+
|
|
3
|
+
> Generate structured product specifications from feature requests, issues, or descriptions. Produces user stories with EARS acceptance criteria, Given-When-Then scenarios, and PRD documents with traceable requirements.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- When a new feature needs formal specification before implementation begins
|
|
8
|
+
- When GitHub issues or feature requests need to be translated into actionable user stories
|
|
9
|
+
- When acceptance criteria are missing, vague, or untestable for existing stories
|
|
10
|
+
- NOT for technical architecture decisions (use harness-architecture-advisor)
|
|
11
|
+
- NOT for implementation planning with task breakdown (use harness-planning)
|
|
12
|
+
- NOT for bug triage or root cause analysis (use harness-debugging)
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### Phase 1: PARSE -- Extract Feature Intent
|
|
17
|
+
|
|
18
|
+
1. **Resolve input source.** Accept one of:
|
|
19
|
+
- GitHub issue URL: fetch via `gh issue view <number> --json title,body,labels,comments`
|
|
20
|
+
- Feature description file: read the provided file path
|
|
21
|
+
- Inline text: use the provided description directly
|
|
22
|
+
|
|
23
|
+
2. **Extract core elements.** From the input, identify:
|
|
24
|
+
- **Goal:** What is the user trying to accomplish?
|
|
25
|
+
- **Actor(s):** Who are the users or systems involved? (e.g., "admin user," "API consumer," "billing system")
|
|
26
|
+
- **Trigger:** What initiates the feature? (user action, system event, time-based)
|
|
27
|
+
- **Constraints:** What limitations exist? (performance, platform, backward compatibility)
|
|
28
|
+
- **Context:** What existing system components are involved?
|
|
29
|
+
|
|
30
|
+
3. **Identify ambiguities.** Flag any element that is missing or unclear:
|
|
31
|
+
- "This issue mentions 'notifications' but does not specify the channel (email, in-app, push)"
|
|
32
|
+
- "No success metric defined -- what does 'working correctly' mean?"
|
|
33
|
+
- "Edge case not addressed: what happens when the user has no payment method?"
|
|
34
|
+
|
|
35
|
+
4. **Resolve ambiguities.** Use `emit_interaction` to present questions when critical information is missing:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
The feature request mentions "user notifications" but does not specify:
|
|
39
|
+
1. Notification channel (email, in-app, push, SMS)
|
|
40
|
+
2. Whether notifications are configurable by the user
|
|
41
|
+
3. Retry behavior for failed deliveries
|
|
42
|
+
Please clarify before proceeding.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
5. **Load project context.** Scan the project for existing specs, user stories, or PRDs to maintain consistency in format and terminology:
|
|
46
|
+
- Check `docs/changes/`, `docs/requirements/`, `docs/prd/` for existing documents
|
|
47
|
+
- Check `.github/ISSUE_TEMPLATE/` for the project's preferred issue format
|
|
48
|
+
- Identify domain terminology used in existing specs
|
|
49
|
+
|
|
50
|
+
6. **Classify feature type.** Categorize the feature as:
|
|
51
|
+
- **New capability:** Something the system cannot do today
|
|
52
|
+
- **Enhancement:** Improvement to an existing capability
|
|
53
|
+
- **Integration:** Connecting with an external system
|
|
54
|
+
- **Migration:** Moving from one approach to another
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### Phase 2: CRAFT -- Generate User Stories and Acceptance Criteria
|
|
59
|
+
|
|
60
|
+
1. **Write user stories.** For each actor-goal pair, produce a story in standard format:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
As a [actor],
|
|
64
|
+
I want to [action],
|
|
65
|
+
so that [benefit].
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Break large features into multiple stories. Each story must be independently deliverable and testable.
|
|
69
|
+
|
|
70
|
+
2. **Write EARS acceptance criteria.** Apply the EARS (Easy Approach to Requirements Syntax) patterns:
|
|
71
|
+
- **Ubiquitous:** "The [system] shall [behavior]" -- for unconditional requirements
|
|
72
|
+
- **Event-driven:** "When [trigger], the [system] shall [behavior]" -- for responses to events
|
|
73
|
+
- **State-driven:** "While [state], the [system] shall [behavior]" -- for ongoing conditions
|
|
74
|
+
- **Optional:** "Where [feature is enabled], the [system] shall [behavior]" -- for configurable behavior
|
|
75
|
+
- **Unwanted:** "If [condition], then the [system] shall [response]" -- for error handling and edge cases
|
|
76
|
+
|
|
77
|
+
3. **Write Given-When-Then scenarios.** For each acceptance criterion, produce at least one BDD scenario:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Given [precondition],
|
|
81
|
+
When [action],
|
|
82
|
+
Then [expected outcome].
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Include:
|
|
86
|
+
- Happy path scenario
|
|
87
|
+
- At least one error/edge case scenario
|
|
88
|
+
- Boundary condition scenarios where applicable
|
|
89
|
+
|
|
90
|
+
4. **Define edge cases.** For each story, enumerate:
|
|
91
|
+
- What happens with empty input?
|
|
92
|
+
- What happens with maximum input?
|
|
93
|
+
- What happens when the user lacks permission?
|
|
94
|
+
- What happens during concurrent access?
|
|
95
|
+
- What happens when a dependency is unavailable?
|
|
96
|
+
|
|
97
|
+
5. **Assign story metadata.** For each story:
|
|
98
|
+
- **Priority:** Must-have, Should-have, Could-have, Won't-have (MoSCoW)
|
|
99
|
+
- **Size estimate:** S, M, L, XL (relative to other stories)
|
|
100
|
+
- **Dependencies:** Other stories or systems this depends on
|
|
101
|
+
- **Risk:** Low, Medium, High (with risk description)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Phase 3: GENERATE -- Produce PRD Document
|
|
106
|
+
|
|
107
|
+
1. **Structure the PRD.** Generate a document with these sections:
|
|
108
|
+
- **Title and version** (feature name, PRD version, date, author)
|
|
109
|
+
- **Problem statement** (what problem does this solve, who has it, how painful is it)
|
|
110
|
+
- **Goals and non-goals** (explicit scope boundaries)
|
|
111
|
+
- **User stories** (from Phase 2, organized by priority)
|
|
112
|
+
- **Acceptance criteria** (EARS format, traceable to stories)
|
|
113
|
+
- **Technical constraints** (performance requirements, platform constraints, backward compatibility)
|
|
114
|
+
- **Success metrics** (measurable outcomes that define "done")
|
|
115
|
+
- **Open questions** (unresolved ambiguities from Phase 1)
|
|
116
|
+
- **Out of scope** (explicitly excluded items)
|
|
117
|
+
|
|
118
|
+
2. **Write the problem statement.** Include:
|
|
119
|
+
- Who is affected (specific user segments)
|
|
120
|
+
- How the problem manifests today (current workaround or pain)
|
|
121
|
+
- Quantified impact if available (time lost, error rate, support tickets)
|
|
122
|
+
|
|
123
|
+
3. **Define success metrics.** Every metric must be:
|
|
124
|
+
- **Measurable:** Can be tracked with existing or planned instrumentation
|
|
125
|
+
- **Time-bound:** Has a target timeline for evaluation
|
|
126
|
+
- **Specific:** Not "improve user experience" but "reduce checkout abandonment by 15% within 30 days"
|
|
127
|
+
|
|
128
|
+
4. **Map requirements to stories.** Create a traceability matrix:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
REQ-001 -> US-001, US-003 (must-have)
|
|
132
|
+
REQ-002 -> US-002 (should-have)
|
|
133
|
+
REQ-003 -> US-004, US-005 (could-have)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
5. **Write the PRD to file.** Save to the project's spec directory (detected in Phase 1 or defaulting to `docs/changes/`). Use a filename pattern: `YYYY-MM-DD-feature-name-prd.md`.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Phase 4: VALIDATE -- Verify Completeness and Testability
|
|
141
|
+
|
|
142
|
+
1. **Check story independence.** Verify each user story can be delivered independently:
|
|
143
|
+
- Does the story depend on another story being completed first?
|
|
144
|
+
- If yes, is the dependency documented?
|
|
145
|
+
- Can the story be tested in isolation?
|
|
146
|
+
|
|
147
|
+
2. **Check acceptance criteria testability.** Every EARS criterion must be verifiable:
|
|
148
|
+
- Can an automated test be written for this criterion?
|
|
149
|
+
- Is the expected behavior specific enough to distinguish pass from fail?
|
|
150
|
+
- Are boundary values defined (not "handles large files" but "handles files up to 100MB")?
|
|
151
|
+
Flag untestable criteria: "Criterion AC-003 says 'the system should be fast' -- this is not testable. Recommend: 'the system shall respond within 200ms for the 95th percentile.'"
|
|
152
|
+
|
|
153
|
+
3. **Check coverage completeness.** Verify all parsed elements from Phase 1 are addressed:
|
|
154
|
+
- Every actor has at least one story
|
|
155
|
+
- Every constraint has a corresponding acceptance criterion
|
|
156
|
+
- Every ambiguity is either resolved or listed in open questions
|
|
157
|
+
- Error handling is specified for every user-facing action
|
|
158
|
+
|
|
159
|
+
4. **Check format consistency.** Verify the output matches existing project conventions:
|
|
160
|
+
- Story format matches templates in `.github/ISSUE_TEMPLATE/` if present
|
|
161
|
+
- Terminology matches existing specs (do not introduce "user" when the project uses "member")
|
|
162
|
+
- Priority scheme matches existing stories
|
|
163
|
+
|
|
164
|
+
5. **Output validation summary:**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Product Spec Validation: [COMPLETE/INCOMPLETE]
|
|
168
|
+
Stories: N generated (M must-have, K should-have)
|
|
169
|
+
Acceptance criteria: N (all testable: YES/NO)
|
|
170
|
+
BDD scenarios: N (covering N criteria)
|
|
171
|
+
Coverage: all actors covered, all constraints addressed
|
|
172
|
+
Open questions: N remaining
|
|
173
|
+
|
|
174
|
+
Generated: docs/changes/2026-03-27-notifications-prd.md
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Harness Integration
|
|
180
|
+
|
|
181
|
+
- **`harness skill run harness-product-spec`** -- Primary command for generating product specifications.
|
|
182
|
+
- **`harness validate`** -- Run after generating specs to verify project health.
|
|
183
|
+
- **`Bash`** -- Used to fetch GitHub issues via `gh` CLI and check existing spec files.
|
|
184
|
+
- **`Read`** -- Used to read input feature descriptions, existing specs, and issue templates.
|
|
185
|
+
- **`Write`** -- Used to generate PRD documents and user story files.
|
|
186
|
+
- **`Glob`** -- Used to locate existing spec directories, issue templates, and requirement documents.
|
|
187
|
+
- **`Grep`** -- Used to extract domain terminology from existing specs and find related stories.
|
|
188
|
+
- **`emit_interaction`** -- Used to present ambiguities for clarification and confirm spec structure before writing.
|
|
189
|
+
|
|
190
|
+
## Success Criteria
|
|
191
|
+
|
|
192
|
+
- Every feature input produces at least one user story with EARS acceptance criteria
|
|
193
|
+
- All acceptance criteria are testable (specific, measurable, with defined boundaries)
|
|
194
|
+
- BDD scenarios cover happy path and at least one error/edge case per criterion
|
|
195
|
+
- PRD document includes all required sections with traceable requirements
|
|
196
|
+
- Ambiguities are surfaced and either resolved or tracked as open questions
|
|
197
|
+
- Output format matches existing project conventions when they exist
|
|
198
|
+
- Generated PRD is saved to the correct directory with consistent naming
|
|
199
|
+
|
|
200
|
+
## Examples
|
|
201
|
+
|
|
202
|
+
### Example: GitHub Issue to PRD for Team Notifications
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Phase 1: PARSE
|
|
206
|
+
Source: gh issue view 234 (title: "Add team notification preferences")
|
|
207
|
+
Actor: team admin, team member
|
|
208
|
+
Goal: control which notifications team members receive
|
|
209
|
+
Ambiguities found:
|
|
210
|
+
- Channel not specified (resolved: email + in-app per comment #3)
|
|
211
|
+
- "Important notifications" undefined (flagged as open question)
|
|
212
|
+
|
|
213
|
+
Phase 2: CRAFT
|
|
214
|
+
US-001: As a team admin, I want to set default notification preferences for my team,
|
|
215
|
+
so that new members receive appropriate notifications without manual setup.
|
|
216
|
+
AC-001 (Ubiquitous): The system shall apply team-default preferences to new members on join.
|
|
217
|
+
AC-002 (Event-driven): When a team admin updates default preferences, the system shall
|
|
218
|
+
prompt whether to apply to existing members.
|
|
219
|
+
AC-003 (Unwanted): If a team member has custom preferences, then the system shall
|
|
220
|
+
preserve them when team defaults change.
|
|
221
|
+
|
|
222
|
+
US-002: As a team member, I want to override team notification defaults,
|
|
223
|
+
so that I receive only notifications relevant to my role.
|
|
224
|
+
Scenario: Given a team member with default preferences,
|
|
225
|
+
When they disable "deployment" notifications,
|
|
226
|
+
Then they shall not receive deployment notifications
|
|
227
|
+
And their other preferences remain unchanged.
|
|
228
|
+
|
|
229
|
+
Phase 3: GENERATE
|
|
230
|
+
Written: docs/changes/2026-03-27-team-notifications-prd.md
|
|
231
|
+
Sections: problem statement, 4 user stories, 12 acceptance criteria, 8 BDD scenarios
|
|
232
|
+
Traceability: REQ-001 -> US-001, US-002 | REQ-002 -> US-003, US-004
|
|
233
|
+
|
|
234
|
+
Phase 4: VALIDATE
|
|
235
|
+
Stories: 4 (2 must-have, 1 should-have, 1 could-have)
|
|
236
|
+
Acceptance criteria: 12 (all testable: YES)
|
|
237
|
+
Open questions: 1 ("important notifications" needs product definition)
|
|
238
|
+
Result: COMPLETE
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Example: Inline Feature Description for Stripe Webhook Integration
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
Phase 1: PARSE
|
|
245
|
+
Source: inline text "We need to handle Stripe webhooks for subscription changes"
|
|
246
|
+
Actor: billing system (automated), finance admin (human oversight)
|
|
247
|
+
Constraints: idempotency required, webhook signature verification, 5-second response SLA
|
|
248
|
+
Ambiguities:
|
|
249
|
+
- Which subscription events? (resolved via clarification: created, updated, canceled, past_due)
|
|
250
|
+
- Retry handling? (Stripe retries for 72 hours)
|
|
251
|
+
|
|
252
|
+
Phase 2: CRAFT
|
|
253
|
+
US-001: As the billing system, I want to process Stripe subscription.updated webhooks,
|
|
254
|
+
so that user plan changes are reflected within 60 seconds.
|
|
255
|
+
AC-001 (Event-driven): When a subscription.updated webhook arrives, the system shall
|
|
256
|
+
update the user's plan within 60 seconds.
|
|
257
|
+
AC-002 (Unwanted): If a duplicate webhook event ID is received, then the system shall
|
|
258
|
+
return 200 OK without reprocessing.
|
|
259
|
+
AC-003 (Unwanted): If webhook signature verification fails, then the system shall
|
|
260
|
+
return 400 and log a security warning.
|
|
261
|
+
|
|
262
|
+
Phase 3: GENERATE
|
|
263
|
+
Written: docs/changes/2026-03-27-stripe-webhooks-prd.md
|
|
264
|
+
Technical constraints section includes: idempotency keys, signature verification,
|
|
265
|
+
5-second response SLA, Stripe retry behavior documentation
|
|
266
|
+
|
|
267
|
+
Phase 4: VALIDATE
|
|
268
|
+
All 4 webhook event types have stories: YES
|
|
269
|
+
Idempotency criterion is testable: YES (duplicate event ID -> no side effects)
|
|
270
|
+
Result: COMPLETE
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Gates
|
|
274
|
+
|
|
275
|
+
- **No generating specs from ambiguous input without clarification.** If the input lacks a clear actor, goal, or trigger, pause and ask. Do not invent requirements that were not stated or implied.
|
|
276
|
+
- **No untestable acceptance criteria.** Every criterion must be verifiable by an automated test or a specific manual procedure. "The system should be user-friendly" is not an acceptance criterion.
|
|
277
|
+
- **No skipping edge cases for user-facing actions.** Every action that a user can trigger must have at least one unwanted-behavior criterion (EARS "If" pattern) covering the error case.
|
|
278
|
+
- **No overwriting existing specs.** If a PRD already exists for this feature, present the diff rather than replacing the file. Existing specs may have been reviewed and approved.
|
|
279
|
+
|
|
280
|
+
## Escalation
|
|
281
|
+
|
|
282
|
+
- **When the feature request is too vague to parse:** Present what was extracted and what is missing: "This issue contains a title but no description. I need at minimum: who is the user, what action they want to perform, and why. Please add details to the issue or provide them here."
|
|
283
|
+
- **When requirements conflict with existing system behavior:** Flag the conflict: "AC-003 requires real-time sync, but the existing event system uses eventual consistency with up to 30-second delay. This needs an architectural decision before the spec can be finalized."
|
|
284
|
+
- **When the feature scope is too large for a single PRD:** Recommend splitting: "This feature contains 3 independent capabilities (notifications, preferences, audit log). Recommend splitting into 3 PRDs that can be prioritized and delivered independently."
|
|
285
|
+
- **When acceptance criteria require metrics that do not exist yet:** Flag the instrumentation gap: "Success metric 'reduce checkout time by 20%' requires checkout timing instrumentation that does not currently exist. Add an instrumentation story as a prerequisite."
|