@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,924 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Autonomous phase execution loop — chains planning, execution, verification, and review, pausing only at human decision points
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by harness generate-slash-commands. Do not edit. -->
|
|
7
|
+
|
|
8
|
+
# Harness Autopilot
|
|
9
|
+
|
|
10
|
+
> Autonomous phase execution loop — chains planning, execution, verification, and review across multi-phase projects, pausing only at human decision points.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- After a multi-phase spec is approved and you want automated execution across all phases
|
|
15
|
+
- When a project has 2+ implementation phases that would require repeated manual skill invocations
|
|
16
|
+
- When you want the Ralph Loop pattern (fresh context per iteration, append-only learnings) applied at the phase level
|
|
17
|
+
- NOT for single-phase work (use harness-execution directly)
|
|
18
|
+
- NOT when the spec is not yet approved (use harness-brainstorming first)
|
|
19
|
+
- NOT for CI/headless execution (this is a conversational skill)
|
|
20
|
+
|
|
21
|
+
## Relationship to Other Skills
|
|
22
|
+
|
|
23
|
+
| Skill | Persona Agent (`subagent_type`) | Role in Autopilot |
|
|
24
|
+
| -------------------- | ------------------------------- | -------------------------------------------- |
|
|
25
|
+
| harness-planning | `harness-planner` | Delegated to for phase plan creation |
|
|
26
|
+
| harness-execution | `harness-task-executor` | Delegated to for task-by-task implementation |
|
|
27
|
+
| harness-verification | `harness-verifier` | Delegated to for post-execution validation |
|
|
28
|
+
| harness-code-review | `harness-code-reviewer` | Delegated to for post-verification review |
|
|
29
|
+
|
|
30
|
+
Autopilot orchestrates these persona agents — it never reimplements their logic. Each agent is dispatched via the Agent tool with the corresponding `subagent_type`, which isolates it to the harness methodology and prevents it from using unrelated skills.
|
|
31
|
+
|
|
32
|
+
## Iron Law
|
|
33
|
+
|
|
34
|
+
**Autopilot delegates, never reimplements.** If you find yourself writing planning logic, execution logic, or review logic inside the autopilot loop, STOP. Delegate to the dedicated persona agent.
|
|
35
|
+
|
|
36
|
+
**Always use dedicated persona agents, never general-purpose agents.** Every dispatch MUST target the specific harness persona (`harness-planner`, `harness-task-executor`, `harness-verifier`, `harness-code-reviewer`). General-purpose agents see all globally registered skills and may use unrelated workflows instead of the harness methodology.
|
|
37
|
+
|
|
38
|
+
- **Claude Code:** Use the Agent tool with `subagent_type` set to the persona name.
|
|
39
|
+
- **Gemini CLI:** Use the `run_agent` tool targeting the persona by name, or dispatch via `harness persona run <name>`.
|
|
40
|
+
|
|
41
|
+
**Plans are gated by concern signals.** When no concern signals fire (low complexity, no planner concerns, task count within threshold), plans are auto-approved with a structured report and execution proceeds immediately. When any signal fires, the plan pauses for human review with the standard yes/revise/skip/stop flow. The `--review-plans` session flag forces all plans to pause regardless of signals.
|
|
42
|
+
|
|
43
|
+
## Rigor Levels
|
|
44
|
+
|
|
45
|
+
The `rigorLevel` is set during INIT via `--fast` or `--thorough` flags and persists for the entire session. Default is `standard`.
|
|
46
|
+
|
|
47
|
+
| State | `fast` | `standard` (default) | `thorough` |
|
|
48
|
+
| -------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| PLAN | Pass `rigorLevel: fast` to planner. Planner skips skeleton pass. | Default planner behavior. | Pass `rigorLevel: thorough` to planner. Planner always produces skeleton for approval. |
|
|
50
|
+
| APPROVE_PLAN | Auto-approve all plans regardless of concern signals. Skip human review. | Default signal-based approval logic. | Force human review of all plans (equivalent to `--review-plans`). |
|
|
51
|
+
| EXECUTE | Skip scratchpad — agents keep research in conversation. Checkpoint commits still fire. | Agents use scratchpad for research >500 words. Checkpoint commits fire. | Verbose scratchpad — agents write all research, reasoning, and intermediate output to scratchpad. Checkpoint commits fire. |
|
|
52
|
+
| VERIFY | Minimal verification — run `harness validate` only. Skip detailed verification agent. | Default verification pipeline. | Full verification — run verification agent with expanded checks. |
|
|
53
|
+
| PHASE_COMPLETE | Scratchpad clear is a no-op (nothing written). | Clear scratchpad for completed phase. | Clear scratchpad for completed phase. |
|
|
54
|
+
|
|
55
|
+
When `rigorLevel` is `fast`, the APPROVE_PLAN concern signal evaluation is bypassed entirely — plans always auto-approve. When `rigorLevel` is `thorough`, it implicitly sets `reviewPlans: true` for the APPROVE_PLAN gate.
|
|
56
|
+
|
|
57
|
+
## Process
|
|
58
|
+
|
|
59
|
+
### State Machine
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW → PHASE_COMPLETE
|
|
63
|
+
↓
|
|
64
|
+
[next phase?]
|
|
65
|
+
↓ ↓
|
|
66
|
+
ASSESS FINAL_REVIEW → DONE
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### Phase 1: INIT — Load Spec and Restore State
|
|
72
|
+
|
|
73
|
+
1. **Resolve spec path.** The spec file is provided as an argument, or ask the user for the spec path.
|
|
74
|
+
|
|
75
|
+
2. **Derive session slug and directory:**
|
|
76
|
+
- Derive the session slug from the spec path:
|
|
77
|
+
1. If the path starts with `docs/`, strip the `docs/` prefix. Otherwise, use the full relative path.
|
|
78
|
+
2. Drop the trailing `.md` extension
|
|
79
|
+
3. Replace all `/` and `.` characters with `--`
|
|
80
|
+
4. Lowercase the result
|
|
81
|
+
- Set `sessionDir = .harness/sessions/<slug>/`
|
|
82
|
+
- Create the session directory if it does not exist
|
|
83
|
+
|
|
84
|
+
3. **Check for existing state.** Read `{sessionDir}/autopilot-state.json`. If it exists and `currentState` is not `DONE`:
|
|
85
|
+
- **Schema migration:** If `schemaVersion < 3`, backfill missing fields: set `startingCommit` to the earliest commit in `history` (or current HEAD if no history), set `decisions` to `[]`, set `finalReview` to `{ "status": "pending", "findings": [], "retryCount": 0 }`. If `schemaVersion < 4`, set `reviewPlans` to `false`. Update `schemaVersion` to `4` and save. If `schemaVersion < 5`, set `rigorLevel` to `"standard"`. Update `schemaVersion` to `5` and save.
|
|
86
|
+
- Report: "Resuming autopilot from state `{currentState}`, phase {currentPhase}: {phaseName}."
|
|
87
|
+
- Skip steps 4 and 5 (initial state creation and flag parsing) — these only apply to fresh starts.
|
|
88
|
+
- Skip to the recorded `currentState` and continue from there.
|
|
89
|
+
|
|
90
|
+
4. **If no existing state (fresh start):**
|
|
91
|
+
- Read the spec file.
|
|
92
|
+
- Parse the `## Implementation Order` section to extract phases.
|
|
93
|
+
- For each phase heading (`### Phase N: Name`), extract:
|
|
94
|
+
- Phase name
|
|
95
|
+
- Complexity annotation (`<!-- complexity: low|medium|high -->`, default: `medium`)
|
|
96
|
+
- Capture the starting commit: run `git rev-parse HEAD` and store the result as `startingCommit`.
|
|
97
|
+
- Create `{sessionDir}/autopilot-state.json`:
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"schemaVersion": 5,
|
|
101
|
+
"sessionDir": ".harness/sessions/<slug>",
|
|
102
|
+
"specPath": "<path to spec>",
|
|
103
|
+
"startingCommit": "<git rev-parse HEAD output>",
|
|
104
|
+
"reviewPlans": false,
|
|
105
|
+
"rigorLevel": "standard",
|
|
106
|
+
"currentState": "ASSESS",
|
|
107
|
+
"currentPhase": 0,
|
|
108
|
+
"phases": [
|
|
109
|
+
{
|
|
110
|
+
"name": "<phase name>",
|
|
111
|
+
"complexity": "<low|medium|high>",
|
|
112
|
+
"complexityOverride": null,
|
|
113
|
+
"planPath": null,
|
|
114
|
+
"status": "pending"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"retryBudget": {
|
|
118
|
+
"maxAttempts": 3,
|
|
119
|
+
"currentTask": null
|
|
120
|
+
},
|
|
121
|
+
"history": [],
|
|
122
|
+
"decisions": [],
|
|
123
|
+
"finalReview": {
|
|
124
|
+
"status": "pending",
|
|
125
|
+
"findings": [],
|
|
126
|
+
"retryCount": 0
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
5. **Parse session flags.** Check CLI arguments for session-level flags. These persist for the entire session -- resuming a session preserves the settings from when it was started (flags are only read on fresh start, not on resume).
|
|
132
|
+
- `--review-plans`: Set `state.reviewPlans: true`.
|
|
133
|
+
- `--fast`: Set `state.rigorLevel: "fast"`. Reduces rigor across all phases: skip skeleton approval, skip scratchpad, minimal verification.
|
|
134
|
+
- `--thorough`: Set `state.rigorLevel: "thorough"`. Increases rigor across all phases: require skeleton approval, verbose scratchpad, full verification.
|
|
135
|
+
- If neither `--fast` nor `--thorough` is passed, `rigorLevel` defaults to `"standard"`.
|
|
136
|
+
- If both `--fast` and `--thorough` are passed, reject with error: "Cannot use --fast and --thorough together. Choose one."
|
|
137
|
+
|
|
138
|
+
6. **Load context via gather_context.** Use the `gather_context` MCP tool to load all working context efficiently:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
gather_context({
|
|
142
|
+
path: "<project-root>",
|
|
143
|
+
intent: "Autopilot phase execution for <spec name>",
|
|
144
|
+
skill: "harness-autopilot",
|
|
145
|
+
session: "<session-slug>",
|
|
146
|
+
include: ["state", "learnings", "handoff", "validation"]
|
|
147
|
+
})
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
This loads session-scoped learnings, handoff, state, and validation results in a single call. The `session` parameter ensures all reads come from the session directory (`.harness/sessions/<slug>/`), isolating this workstream from others. Note any relevant learnings or known dead ends for the current phase from the returned `learnings` array.
|
|
151
|
+
|
|
152
|
+
7. **Load session summary for cold start.** If resuming (existing `autopilot-state.json` found):
|
|
153
|
+
- Call `loadSessionSummary()` for the session slug to get quick orientation context (~200 tokens).
|
|
154
|
+
- The summary provides the last skill, phase, status, and next step — enough to understand where the autopilot left off without re-reading the full state machine.
|
|
155
|
+
- If no summary exists (first run), skip — the full INIT handles context loading.
|
|
156
|
+
|
|
157
|
+
8. **Load roadmap context.** If `docs/roadmap.md` exists, read it to understand:
|
|
158
|
+
- Current project priorities (which features are `in-progress`)
|
|
159
|
+
- Blockers that may affect the upcoming phases
|
|
160
|
+
- Overall project status and milestone progress
|
|
161
|
+
|
|
162
|
+
This provides the autopilot with project-level context beyond the individual spec being executed. If the roadmap does not exist, skip this step — the autopilot operates normally without it.
|
|
163
|
+
|
|
164
|
+
9. **Transition to ASSESS.**
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### ASSESS — Determine Phase Approach
|
|
169
|
+
|
|
170
|
+
1. **Read the current phase** from `{sessionDir}/autopilot-state.json` at index `currentPhase`.
|
|
171
|
+
|
|
172
|
+
2. **Check if plan already exists.** If `planPath` is set and the file exists, skip to `APPROVE_PLAN`.
|
|
173
|
+
|
|
174
|
+
3. **Evaluate complexity:**
|
|
175
|
+
- Read the phase's `complexity` field from state.
|
|
176
|
+
- If `complexityOverride` is set, use it instead.
|
|
177
|
+
- Decision matrix:
|
|
178
|
+
|
|
179
|
+
| Effective Complexity | Action |
|
|
180
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
181
|
+
| `low` | Auto-plan via `harness-planner` agent. Proceed to PLAN. |
|
|
182
|
+
| `medium` | Auto-plan via `harness-planner` agent. Proceed to PLAN. Present with extra scrutiny note. |
|
|
183
|
+
| `high` | Pause. Tell the user: "Phase {N}: {name} is marked high-complexity. Run `/harness:planning` interactively for this phase, then re-invoke `/harness:autopilot` to continue." Transition to PLAN with `awaitingInteractivePlan: true`. |
|
|
184
|
+
|
|
185
|
+
4. **Update state** with `currentState: "PLAN"` and save.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### PLAN — Generate or Await Plan
|
|
190
|
+
|
|
191
|
+
**If auto-planning (low/medium complexity):**
|
|
192
|
+
|
|
193
|
+
1. Dispatch a planning agent using the Agent tool:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Agent tool parameters:
|
|
197
|
+
subagent_type: "harness-planner"
|
|
198
|
+
description: "Plan phase {N}: {name}"
|
|
199
|
+
prompt: |
|
|
200
|
+
You are running harness-planning for phase {N}: {name}.
|
|
201
|
+
|
|
202
|
+
Spec: {specPath}
|
|
203
|
+
Session directory: {sessionDir}
|
|
204
|
+
Session slug: {sessionSlug}
|
|
205
|
+
Phase description: {phase description from spec}
|
|
206
|
+
Rigor level: {rigorLevel}
|
|
207
|
+
|
|
208
|
+
On startup, call gather_context({ session: "{sessionSlug}" }) to load
|
|
209
|
+
session-scoped learnings, state, and validation context.
|
|
210
|
+
|
|
211
|
+
## Scratchpad (if rigorLevel is not "fast")
|
|
212
|
+
|
|
213
|
+
For bulky research output (spec analysis, codebase exploration notes,
|
|
214
|
+
dependency analysis — anything >500 words), write to scratchpad instead
|
|
215
|
+
of keeping in conversation:
|
|
216
|
+
|
|
217
|
+
writeScratchpad({ session: "{sessionSlug}", phase: "{phaseName}", projectPath: "{projectPath}" }, "research-{topic}.md", content)
|
|
218
|
+
|
|
219
|
+
Reference the scratchpad file path in your conversation instead of
|
|
220
|
+
inlining the content. This keeps the planning context focused on
|
|
221
|
+
decisions and task structure.
|
|
222
|
+
|
|
223
|
+
Follow the harness-planning skill process exactly. Write the plan to
|
|
224
|
+
docs/plans/{date}-{phase-name}-plan.md. Write {sessionDir}/handoff.json when done.
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
2. When the agent returns:
|
|
228
|
+
- Read the generated plan path from `{sessionDir}/handoff.json`.
|
|
229
|
+
- **Apply complexity override check:**
|
|
230
|
+
- Count tasks in the plan.
|
|
231
|
+
- Count `[checkpoint:*]` markers.
|
|
232
|
+
- If `spec_complexity == "low"` AND (`task_count > 10` OR `checkpoint_count > 3`):
|
|
233
|
+
Set `complexityOverride: "medium"` in state. Note to user: "Planning produced {N} tasks — more than expected for low complexity. Reviewing with extra scrutiny."
|
|
234
|
+
- If `spec_complexity == "low"` AND (`task_count > 20` OR `checkpoint_count > 6`):
|
|
235
|
+
Set `complexityOverride: "high"` in state. Note to user: "This phase is significantly larger than expected. Consider breaking it down."
|
|
236
|
+
- Update state: set `planPath` for the current phase.
|
|
237
|
+
- Transition to `APPROVE_PLAN`.
|
|
238
|
+
|
|
239
|
+
**If awaiting interactive plan (high complexity):**
|
|
240
|
+
|
|
241
|
+
1. Check if a plan file now exists for this phase (user ran planning separately).
|
|
242
|
+
- Look for files matching `docs/plans/*{phase-name}*` or check `{sessionDir}/handoff.json` for a planning handoff.
|
|
243
|
+
2. If found: update `planPath` in state, transition to `APPROVE_PLAN`.
|
|
244
|
+
3. If not found: remind the user and wait.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### APPROVE_PLAN — Conditional Review Gate
|
|
249
|
+
|
|
250
|
+
1. **Gather plan metadata:**
|
|
251
|
+
- Phase name and number
|
|
252
|
+
- Task count (from the plan file)
|
|
253
|
+
- Checkpoint count
|
|
254
|
+
- Estimated time (task count x 3 minutes)
|
|
255
|
+
- Effective complexity (original + any override)
|
|
256
|
+
- Concerns array from the planning handoff (`{sessionDir}/handoff.json` field `concerns`, default: `[]` if field is absent)
|
|
257
|
+
|
|
258
|
+
2. **Rigor-level override:**
|
|
259
|
+
- If `rigorLevel` is `"fast"`: Skip the signal evaluation entirely. Auto-approve the plan. Record decision as `"auto_approved_plan_fast"`. Transition directly to EXECUTE.
|
|
260
|
+
- If `rigorLevel` is `"thorough"`: Force `shouldPauseForReview = true` regardless of other signals (equivalent to `--review-plans`).
|
|
261
|
+
- If `rigorLevel` is `"standard"`: Proceed with normal signal evaluation below.
|
|
262
|
+
|
|
263
|
+
3. **Evaluate `shouldPauseForReview`.** Check the following signals in order. If **any** signal is true, pause for human review. If **all** are false, auto-approve.
|
|
264
|
+
|
|
265
|
+
| # | Signal | Condition | Description |
|
|
266
|
+
| --- | -------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
267
|
+
| 1 | `reviewPlans` | `state.reviewPlans === true` | Session-level flag set by `--review-plans` CLI arg |
|
|
268
|
+
| 2 | `highComplexity` | `phase.complexity === "high"` | Phase is marked as high complexity in the spec (reachable when resuming after interactive planning; confirms the plan is ready for automated execution even though the human drove planning) |
|
|
269
|
+
| 3 | `complexityOverride` | `phase.complexityOverride !== null` | Planner produced more tasks than expected for the spec complexity |
|
|
270
|
+
| 4 | `plannerConcerns` | Handoff `concerns` array is non-empty | Planner flagged specific risks or uncertainties |
|
|
271
|
+
| 5 | `taskCount` | Plan contains > 15 tasks (i.e., 16+) | Plan is large enough to warrant human review |
|
|
272
|
+
|
|
273
|
+
4. **Build the signal evaluation result** for reporting and recording:
|
|
274
|
+
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"reviewPlans": false,
|
|
278
|
+
"highComplexity": "low",
|
|
279
|
+
"complexityOverride": null,
|
|
280
|
+
"plannerConcerns": [],
|
|
281
|
+
"taskCount": 8,
|
|
282
|
+
"taskThreshold": 15
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
5. **If auto-approving (no signals fired):**
|
|
287
|
+
|
|
288
|
+
a. **Emit structured auto-approve report:**
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
Auto-approved Phase 1: Setup Infrastructure
|
|
292
|
+
Review mode: auto
|
|
293
|
+
Complexity: low (no override)
|
|
294
|
+
Planner concerns: none
|
|
295
|
+
Tasks: 8 (threshold: 15)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
b. **Record the decision** in state `decisions` array:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"phase": 0,
|
|
303
|
+
"decision": "auto_approved_plan",
|
|
304
|
+
"timestamp": "ISO-8601",
|
|
305
|
+
"signals": {
|
|
306
|
+
"reviewPlans": false,
|
|
307
|
+
"highComplexity": "low",
|
|
308
|
+
"complexityOverride": null,
|
|
309
|
+
"plannerConcerns": [],
|
|
310
|
+
"taskCount": 8,
|
|
311
|
+
"taskThreshold": 15
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
c. **Transition to EXECUTE** — no human interaction needed.
|
|
317
|
+
|
|
318
|
+
6. **If pausing for review (one or more signals fired):**
|
|
319
|
+
|
|
320
|
+
a. **Emit structured pause report** showing which signal(s) triggered:
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Pausing for review -- Phase 2: Auth Middleware
|
|
324
|
+
Review mode: manual (--review-plans flag set)
|
|
325
|
+
Complexity override: low -> medium (triggered)
|
|
326
|
+
Planner concerns: 2 concern(s)
|
|
327
|
+
Tasks: 12 (threshold: 15)
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Mark triggered signals explicitly. Non-triggered signals display their normal value without "(triggered)".
|
|
331
|
+
|
|
332
|
+
b. **Present the plan summary:** task count, checkpoint count, estimated time, effective complexity, and any concerns from the planning handoff.
|
|
333
|
+
|
|
334
|
+
c. **Ask:** "Approve this plan and begin execution? (yes / revise / skip phase / stop)"
|
|
335
|
+
- **yes** — Transition to EXECUTE.
|
|
336
|
+
- **revise** — Tell user to edit the plan file directly, then re-present from step 1.
|
|
337
|
+
- **skip phase** — Mark phase as `skipped` in state, transition to PHASE_COMPLETE.
|
|
338
|
+
- **stop** — Save state and exit. User can resume later.
|
|
339
|
+
|
|
340
|
+
d. **Record the decision** in state `decisions` array:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"phase": 0,
|
|
345
|
+
"decision": "approved_plan",
|
|
346
|
+
"timestamp": "ISO-8601",
|
|
347
|
+
"signals": {
|
|
348
|
+
"reviewPlans": true,
|
|
349
|
+
"highComplexity": "low",
|
|
350
|
+
"complexityOverride": "medium",
|
|
351
|
+
"plannerConcerns": ["concern text"],
|
|
352
|
+
"taskCount": 12,
|
|
353
|
+
"taskThreshold": 15
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Use the actual decision value: `approved_plan`, `revised_plan`, `skipped_phase`, or `stopped`.
|
|
359
|
+
|
|
360
|
+
7. **Update state** with `currentState: "EXECUTE"` (or appropriate state for skip/stop) and save.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
### EXECUTE — Run the Plan
|
|
365
|
+
|
|
366
|
+
1. **Dispatch execution agent using the Agent tool:**
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
Agent tool parameters:
|
|
370
|
+
subagent_type: "harness-task-executor"
|
|
371
|
+
description: "Execute phase {N}: {name}"
|
|
372
|
+
prompt: |
|
|
373
|
+
You are running harness-execution for phase {N}: {name}.
|
|
374
|
+
|
|
375
|
+
Plan: {planPath}
|
|
376
|
+
Session directory: {sessionDir}
|
|
377
|
+
Session slug: {sessionSlug}
|
|
378
|
+
State: {sessionDir}/state.json
|
|
379
|
+
Rigor level: {rigorLevel}
|
|
380
|
+
|
|
381
|
+
On startup, call gather_context({ session: "{sessionSlug}" }) to load
|
|
382
|
+
session-scoped learnings, state, and validation context.
|
|
383
|
+
|
|
384
|
+
## Scratchpad (if rigorLevel is not "fast")
|
|
385
|
+
|
|
386
|
+
For bulky intermediate output (test output analysis, error investigation
|
|
387
|
+
notes, dependency trees — anything >500 words), write to scratchpad:
|
|
388
|
+
|
|
389
|
+
writeScratchpad({ session: "{sessionSlug}", phase: "{phaseName}", projectPath: "{projectPath}" }, "task-{N}-{topic}.md", content)
|
|
390
|
+
|
|
391
|
+
Reference the scratchpad file path instead of inlining the content.
|
|
392
|
+
|
|
393
|
+
Follow the harness-execution skill process exactly.
|
|
394
|
+
Update {sessionDir}/state.json after each task.
|
|
395
|
+
Write {sessionDir}/handoff.json when done or when blocked.
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
2. **When the agent returns, check the outcome:**
|
|
399
|
+
- **After each checkpoint verification passes**, commit the work:
|
|
400
|
+
```
|
|
401
|
+
commitAtCheckpoint({
|
|
402
|
+
projectPath: "{projectPath}",
|
|
403
|
+
session: "{sessionSlug}",
|
|
404
|
+
checkpointLabel: "Checkpoint {N}: {checkpoint description}"
|
|
405
|
+
})
|
|
406
|
+
```
|
|
407
|
+
If the commit result shows `committed: false`, no changes existed — continue silently.
|
|
408
|
+
- **All tasks complete:** Transition to VERIFY.
|
|
409
|
+
- **Checkpoint reached:** Surface the checkpoint to the user in the main conversation. Handle the checkpoint type:
|
|
410
|
+
- `[checkpoint:human-verify]` — Show output, ask for confirmation, then resume execution agent.
|
|
411
|
+
- `[checkpoint:decision]` — Present options, record choice, resume execution agent.
|
|
412
|
+
- `[checkpoint:human-action]` — Instruct user, wait for confirmation, resume execution agent.
|
|
413
|
+
- **Task failed:** Enter retry logic (see below).
|
|
414
|
+
|
|
415
|
+
3. **Retry logic on failure:**
|
|
416
|
+
- Read `retryBudget` from state.
|
|
417
|
+
- If `attemptsUsed < maxAttempts`:
|
|
418
|
+
- Increment `attemptsUsed`.
|
|
419
|
+
- Record the attempt (timestamp, error, fix attempted, result).
|
|
420
|
+
- **Attempt 1:** Read error output, apply obvious fix, re-dispatch execution agent for the failed task only.
|
|
421
|
+
- **Attempt 2:** Expand context — read related files, check `learnings.md` for similar failures, re-dispatch with additional context.
|
|
422
|
+
- **Attempt 3:** Full context gather — read test output, imports, plan instructions for ambiguity. Re-dispatch with maximum context.
|
|
423
|
+
- If budget exhausted:
|
|
424
|
+
- **Recovery commit:** Before stopping, commit any passing work:
|
|
425
|
+
```
|
|
426
|
+
commitAtCheckpoint({
|
|
427
|
+
projectPath: "{projectPath}",
|
|
428
|
+
session: "{sessionSlug}",
|
|
429
|
+
checkpointLabel: "Phase {N}: {name} — recovery at task {taskNumber}",
|
|
430
|
+
isRecovery: true
|
|
431
|
+
})
|
|
432
|
+
```
|
|
433
|
+
This preserves all work completed before the failure. The `[autopilot][recovery]` prefix in the commit message distinguishes recovery commits from normal checkpoint commits.
|
|
434
|
+
- **Stop.** Present all 3 attempts with full context to the user.
|
|
435
|
+
- Record failure in `.harness/failures.md`.
|
|
436
|
+
- Ask: "How should we proceed? (fix manually and continue / revise plan / stop)"
|
|
437
|
+
- Save state. User's choice determines next transition.
|
|
438
|
+
|
|
439
|
+
4. **Update state** after each execution cycle and save.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### VERIFY — Post-Execution Validation
|
|
444
|
+
|
|
445
|
+
1. **Rigor-level branching:**
|
|
446
|
+
- If `rigorLevel` is `"fast"`: Skip the verification agent entirely. Run only `harness validate`. If it passes, transition to REVIEW. If it fails, surface to user.
|
|
447
|
+
- If `rigorLevel` is `"thorough"` or `"standard"`: Dispatch the verification agent as below.
|
|
448
|
+
|
|
449
|
+
2. **Dispatch verification agent using the Agent tool:**
|
|
450
|
+
|
|
451
|
+
```
|
|
452
|
+
Agent tool parameters:
|
|
453
|
+
subagent_type: "harness-verifier"
|
|
454
|
+
description: "Verify phase {N}: {name}"
|
|
455
|
+
prompt: |
|
|
456
|
+
You are running harness-verification for phase {N}: {name}.
|
|
457
|
+
|
|
458
|
+
Session directory: {sessionDir}
|
|
459
|
+
Session slug: {sessionSlug}
|
|
460
|
+
|
|
461
|
+
On startup, call gather_context({ session: "{sessionSlug}" }) to load
|
|
462
|
+
session-scoped learnings, state, and validation context.
|
|
463
|
+
|
|
464
|
+
Follow the harness-verification skill process exactly.
|
|
465
|
+
Report pass/fail with findings.
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
3. **When the agent returns:**
|
|
469
|
+
- **All checks pass:** Transition to REVIEW.
|
|
470
|
+
- **Failures found:** Surface findings to the user. Ask: "Fix these issues before review? (fix / skip verification / stop)"
|
|
471
|
+
- **fix** — Re-enter EXECUTE with targeted fixes (retry budget resets for verification fixes).
|
|
472
|
+
- **skip** — Record skip decision in `decisions` array. Proceed to REVIEW with verification warnings noted.
|
|
473
|
+
- **stop** — Save state and exit.
|
|
474
|
+
|
|
475
|
+
4. **Update state** with `currentState: "REVIEW"` and save.
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
### REVIEW — Code Review
|
|
480
|
+
|
|
481
|
+
1. **Dispatch review agent using the Agent tool:**
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
Agent tool parameters:
|
|
485
|
+
subagent_type: "harness-code-reviewer"
|
|
486
|
+
description: "Review phase {N}: {name}"
|
|
487
|
+
prompt: |
|
|
488
|
+
You are running harness-code-review for phase {N}: {name}.
|
|
489
|
+
|
|
490
|
+
Session directory: {sessionDir}
|
|
491
|
+
Session slug: {sessionSlug}
|
|
492
|
+
|
|
493
|
+
On startup, call gather_context({ session: "{sessionSlug}" }) to load
|
|
494
|
+
session-scoped learnings, state, and validation context.
|
|
495
|
+
|
|
496
|
+
Follow the harness-code-review skill process exactly.
|
|
497
|
+
Report findings with severity (blocking / warning / note).
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
2. **When the agent returns:**
|
|
501
|
+
- **Persist review findings:** Write the review findings to `{sessionDir}/phase-{N}-review.json` (array of findings with severity, file, line, title). This file is consumed by FINAL_REVIEW step 3.
|
|
502
|
+
- **No blocking findings:** Report summary, transition to PHASE_COMPLETE.
|
|
503
|
+
- **Blocking findings:** Surface to user. Ask: "Address blocking findings before completing this phase? (fix / override / stop)"
|
|
504
|
+
- **fix** — Re-enter EXECUTE with review fixes.
|
|
505
|
+
- **override** — Record override decision, transition to PHASE_COMPLETE.
|
|
506
|
+
- **stop** — Save state and exit.
|
|
507
|
+
|
|
508
|
+
3. **Update state** with `currentState: "PHASE_COMPLETE"` and save.
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
### PHASE_COMPLETE — Summary and Transition
|
|
513
|
+
|
|
514
|
+
1. **Present phase summary:**
|
|
515
|
+
- Phase name and number
|
|
516
|
+
- Tasks completed
|
|
517
|
+
- Retries used
|
|
518
|
+
- Verification result (pass/fail/skipped)
|
|
519
|
+
- Review findings count (blocking/warning/note)
|
|
520
|
+
- Time from phase start to completion (from history timestamps)
|
|
521
|
+
|
|
522
|
+
2. **Record phase in history:**
|
|
523
|
+
|
|
524
|
+
```json
|
|
525
|
+
{
|
|
526
|
+
"phase": 0,
|
|
527
|
+
"name": "<phase name>",
|
|
528
|
+
"startedAt": "<timestamp>",
|
|
529
|
+
"completedAt": "<now>",
|
|
530
|
+
"tasksCompleted": 8,
|
|
531
|
+
"retriesUsed": 1,
|
|
532
|
+
"verificationPassed": true,
|
|
533
|
+
"reviewFindings": { "blocking": 0, "warning": 1, "note": 3 }
|
|
534
|
+
}
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
3. **Mark phase as `complete`** in state.
|
|
538
|
+
|
|
539
|
+
4. **Clear scratchpad for this phase.** Call `clearScratchpad({ session: sessionSlug, phase: phaseName, projectPath: projectPath })` to delete ephemeral research files for the completed phase. This frees disk space and prevents stale scratchpad data from leaking into future phases.
|
|
540
|
+
|
|
541
|
+
5. **Sync roadmap.** If `docs/roadmap.md` exists, call `manage_roadmap` with action `sync` and `apply: true`. This reflects the just-completed phase in the roadmap (e.g., updating the feature from `planned` to `in-progress`). If `manage_roadmap` is unavailable, fall back to direct file manipulation using `syncRoadmap()` from core. Skip silently if no roadmap exists. Do not use `force_sync: true` — the human-always-wins rule applies.
|
|
542
|
+
|
|
543
|
+
6. **Write session summary.** Update the session summary to reflect the completed phase:
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
writeSessionSummary(projectPath, sessionSlug, {
|
|
547
|
+
session: "<session-slug>",
|
|
548
|
+
lastActive: "<ISO timestamp>",
|
|
549
|
+
skill: "harness-autopilot",
|
|
550
|
+
phase: "<completed phase number> of <total phases>",
|
|
551
|
+
status: "Phase <N> complete. <tasks completed>/<total> tasks.",
|
|
552
|
+
spec: "<spec path>",
|
|
553
|
+
plan: "<current plan path>",
|
|
554
|
+
keyContext: "<1-2 sentences: what this phase accomplished, key decisions>",
|
|
555
|
+
nextStep: "<e.g., Continue to Phase N+1: <name>, or DONE>"
|
|
556
|
+
})
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
7. **Check for next phase:**
|
|
560
|
+
- If more phases remain: "Phase {N} complete. Next: Phase {N+1}: {name} (complexity: {level}). Continue? (yes / stop)"
|
|
561
|
+
- **yes** — Increment `currentPhase`, reset `retryBudget`, transition to ASSESS.
|
|
562
|
+
- **stop** — Save state and exit.
|
|
563
|
+
- If no more phases: Transition to FINAL_REVIEW.
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
### FINAL_REVIEW — Project-Wide Code Review
|
|
568
|
+
|
|
569
|
+
> Runs automatically after the last phase completes. Reviews the cumulative diff (`startingCommit..HEAD`) across all phases to catch cross-phase issues before the PR offer.
|
|
570
|
+
|
|
571
|
+
1. **Update state** with `currentState: "FINAL_REVIEW"` and save.
|
|
572
|
+
|
|
573
|
+
2. **Update `finalReview` tracking** in `autopilot-state.json`: set `finalReview.status` to `"in_progress"`.
|
|
574
|
+
|
|
575
|
+
3. **Gather per-phase review findings.** Read from `{sessionDir}/` — each phase's review output is stored alongside the phase handoff. Collect all review findings across phases into a single context block.
|
|
576
|
+
|
|
577
|
+
4. **Dispatch review agent using the Agent tool:**
|
|
578
|
+
|
|
579
|
+
```
|
|
580
|
+
Agent tool parameters:
|
|
581
|
+
subagent_type: "harness-code-reviewer"
|
|
582
|
+
description: "Final review: cross-phase coherence check"
|
|
583
|
+
prompt: |
|
|
584
|
+
You are running harness-code-review as a final project-wide review.
|
|
585
|
+
|
|
586
|
+
Diff scope: startingCommit..HEAD (use `git diff {startingCommit}..HEAD`)
|
|
587
|
+
Starting commit: {startingCommit}
|
|
588
|
+
Session directory: {sessionDir}
|
|
589
|
+
Session slug: {sessionSlug}
|
|
590
|
+
|
|
591
|
+
On startup, call gather_context({ session: "{sessionSlug}" }) to load
|
|
592
|
+
session-scoped learnings, state, and validation context.
|
|
593
|
+
|
|
594
|
+
## Per-Phase Review Findings
|
|
595
|
+
|
|
596
|
+
{collected per-phase findings}
|
|
597
|
+
|
|
598
|
+
These were found and addressed during per-phase reviews. Don't assume
|
|
599
|
+
they're resolved — verify. Focus extra attention on cross-phase coherence:
|
|
600
|
+
naming consistency, duplicated utilities, architectural drift across phases.
|
|
601
|
+
|
|
602
|
+
Review the FULL diff (startingCommit..HEAD), not just the last phase.
|
|
603
|
+
Report findings with severity (blocking / warning / note).
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
5. **When the agent returns:**
|
|
607
|
+
- **No blocking findings:** Store all findings (blocking, warning, note) in `finalReview.findings`. Update `finalReview.status` to `"passed"`, report summary, transition to DONE.
|
|
608
|
+
- **Blocking findings:** Store all findings (blocking, warning, note) in `finalReview.findings`. Surface blocking findings to user. Ask: "Address blocking findings before completing? (fix / override / stop)"
|
|
609
|
+
- **fix** — Increment `finalReview.retryCount`. If `retryCount <= 3`: dispatch fixes using the Agent tool, then run `harness validate` to verify the fix, then re-run FINAL_REVIEW from step 2 (re-sets status to `in_progress`, re-gathers per-phase findings for fresh context). If `retryCount > 3`: stop — present all attempts to user, record in `.harness/failures.md`, ask: "How should we proceed? (fix manually and continue / stop)"
|
|
610
|
+
|
|
611
|
+
Fix dispatch:
|
|
612
|
+
|
|
613
|
+
```
|
|
614
|
+
Agent tool parameters:
|
|
615
|
+
subagent_type: "harness-task-executor"
|
|
616
|
+
description: "Fix final review findings"
|
|
617
|
+
prompt: |
|
|
618
|
+
Fix the following blocking review findings. One task per finding.
|
|
619
|
+
|
|
620
|
+
{blocking findings with file, line, title, and rationale}
|
|
621
|
+
|
|
622
|
+
Session directory: {sessionDir}
|
|
623
|
+
Session slug: {sessionSlug}
|
|
624
|
+
|
|
625
|
+
Follow the harness-execution skill process. Commit each fix atomically.
|
|
626
|
+
Write {sessionDir}/handoff.json when done.
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
- **override** — Record override decision (rationale from user) in state `decisions` array. Update `finalReview.status` to `"overridden"`. Transition to DONE.
|
|
630
|
+
- **stop** — Save state and exit. Resumable from FINAL_REVIEW.
|
|
631
|
+
|
|
632
|
+
6. **Update state** and save after each step.
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
### DONE — Final Summary
|
|
637
|
+
|
|
638
|
+
1. **Present project summary:**
|
|
639
|
+
- Total phases completed
|
|
640
|
+
- Total tasks across all phases
|
|
641
|
+
- Total retries used
|
|
642
|
+
- Total time (first phase start to last phase completion)
|
|
643
|
+
- Final review result: `finalReview.status` (passed / overridden) and total findings count from `finalReview.findings`
|
|
644
|
+
- Any overridden review findings (per-phase and final)
|
|
645
|
+
|
|
646
|
+
2. **Offer next steps:**
|
|
647
|
+
- "Create a PR? (yes / no)"
|
|
648
|
+
- If yes: assemble commit history, suggest PR title and description.
|
|
649
|
+
|
|
650
|
+
3. **Write final handoff** to `{sessionDir}/handoff.json`:
|
|
651
|
+
|
|
652
|
+
```json
|
|
653
|
+
{
|
|
654
|
+
"fromSkill": "harness-autopilot",
|
|
655
|
+
"phase": "DONE",
|
|
656
|
+
"summary": "Completed {N} phases with {M} total tasks",
|
|
657
|
+
"completed": ["Phase 1: ...", "Phase 2: ..."],
|
|
658
|
+
"pending": [],
|
|
659
|
+
"concerns": [],
|
|
660
|
+
"decisions": ["<all decisions from all phases>"],
|
|
661
|
+
"contextKeywords": ["<merged from spec>"],
|
|
662
|
+
"finalReview": {
|
|
663
|
+
"status": "<passed | overridden>",
|
|
664
|
+
"findingsCount": "<number of findings from final review>"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
4. **Append learnings** to `.harness/learnings.md`:
|
|
670
|
+
|
|
671
|
+
```
|
|
672
|
+
## {date} — Autopilot: {spec name}
|
|
673
|
+
- [skill:harness-autopilot] [outcome:complete] Executed {N} phases, {M} tasks, {R} retries
|
|
674
|
+
- [skill:harness-autopilot] [outcome:observation] {any notable patterns from the run}
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
5. **Promote session learnings to global.** Call `promoteSessionLearnings(projectPath, sessionSlug)` to move generalizable session learnings (tagged `[outcome:gotcha]`, `[outcome:decision]`, `[outcome:observation]`) to the global `learnings.md`. Report: "Promoted {N} learnings to global, {M} session-specific entries kept in session."
|
|
678
|
+
|
|
679
|
+
6. **Check if pruning is needed.** Call `countLearningEntries(projectPath)`. If the count exceeds 30, suggest: "Global learnings.md has {count} entries (threshold: 30). Run `harness learnings prune` to analyze patterns and archive old entries."
|
|
680
|
+
|
|
681
|
+
7. **Update roadmap to done.** If `docs/roadmap.md` exists and the current spec maps to a roadmap feature, call `manage_roadmap` with action `update` to set the feature status to `done`. Derive the feature name from the spec title (H1 heading) or the session's `handoff.json` `summary` field. If `manage_roadmap` is unavailable, fall back to direct file manipulation using `updateFeature()` from core. Skip silently if no roadmap exists or if the feature is not found. Do not use `force_sync: true`.
|
|
682
|
+
|
|
683
|
+
8. **Write final session summary.** Update the session summary to reflect completion:
|
|
684
|
+
|
|
685
|
+
```json
|
|
686
|
+
writeSessionSummary(projectPath, sessionSlug, {
|
|
687
|
+
session: "<session-slug>",
|
|
688
|
+
lastActive: "<ISO timestamp>",
|
|
689
|
+
skill: "harness-autopilot",
|
|
690
|
+
status: "DONE. <total phases> phases, <total tasks> tasks complete.",
|
|
691
|
+
spec: "<spec path>",
|
|
692
|
+
keyContext: "<1-2 sentences: overall summary of what was built>",
|
|
693
|
+
nextStep: "All phases complete. Create PR or close session."
|
|
694
|
+
})
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
9. **Clean up state:** Set `currentState: "DONE"` in `{sessionDir}/autopilot-state.json`. Do not delete the file — it serves as a record.
|
|
698
|
+
|
|
699
|
+
## Harness Integration
|
|
700
|
+
|
|
701
|
+
- **`harness validate`** — Run during INIT to verify project health. Included in every execution task via harness-execution delegation.
|
|
702
|
+
- **`gather_context`** — Used in INIT phase to load learnings, state, handoff, and validation in a single call instead of reading files individually.
|
|
703
|
+
- **`harness check-deps`** — Delegated to harness-execution (included in task steps).
|
|
704
|
+
- **State file** — `.harness/sessions/<slug>/autopilot-state.json` tracks the orchestration state machine. `.harness/sessions/<slug>/state.json` tracks task-level execution state (managed by harness-execution). The slug is derived from the spec path during INIT.
|
|
705
|
+
- **Handoff** — `.harness/sessions/<slug>/handoff.json` is written by each delegated skill and read by the next. Autopilot writes a final handoff on DONE.
|
|
706
|
+
- **Learnings** — `.harness/learnings.md` (global) is appended by both delegated skills and autopilot itself. On DONE, session learnings with generalizable outcomes are promoted to global via `promoteSessionLearnings`. If global count exceeds 30, autopilot suggests running `harness learnings prune`.
|
|
707
|
+
- **Roadmap context** — During INIT, reads `docs/roadmap.md` (if present) for project-level priorities, blockers, and milestone status. Provides broader context for phase execution decisions.
|
|
708
|
+
- **Roadmap sync** — During PHASE_COMPLETE, calls `manage_roadmap` with `sync` and `apply: true` to reflect phase progress. During DONE, calls `manage_roadmap` with `update` to set feature status to `done`. Both skip silently when no roadmap exists. Neither uses `force_sync: true`.
|
|
709
|
+
- **Scratchpad** — Agents write bulky research output (>500 words) to `.harness/sessions/<slug>/scratchpad/<phase>/` via `writeScratchpad()` instead of keeping it in conversation context. Cleared automatically at phase transitions via `clearScratchpad()` in PHASE_COMPLETE. Skipped entirely when `rigorLevel` is `"fast"`.
|
|
710
|
+
- **Checkpoint commits** — After each checkpoint verification passes in EXECUTE, `commitAtCheckpoint()` creates a commit with message `[autopilot] <label>`. On failure with retry budget exhausted, a recovery commit is created with `[autopilot][recovery] <label>`. Skipped silently when no changes exist.
|
|
711
|
+
- **Rigor levels** — `--fast` / `--thorough` flags set `rigorLevel` in state during INIT. Persists for the entire session. Affects PLAN (skeleton skip/require), APPROVE_PLAN (auto-approve/force-review), EXECUTE (scratchpad usage), and VERIFY (minimal/full). See the Rigor Behavior Table for details.
|
|
712
|
+
|
|
713
|
+
## Success Criteria
|
|
714
|
+
|
|
715
|
+
- Single `/harness:autopilot` invocation executes all phases through to completion
|
|
716
|
+
- Resume from any state after context reset via session-scoped `autopilot-state.json`
|
|
717
|
+
- Low-complexity phases auto-plan; high-complexity phases pause for interactive planning
|
|
718
|
+
- Planning override bumps complexity upward when task signals disagree
|
|
719
|
+
- Retry budget (3 attempts) with escalating context before surfacing failures
|
|
720
|
+
- Existing skills (planning, execution, verification, review) are unchanged
|
|
721
|
+
- Plans auto-approve when no concern signals fire; plans pause for human review when any signal fires
|
|
722
|
+
- `--review-plans` flag forces human review for all plans in a session
|
|
723
|
+
- Phase completion summary shown between every phase
|
|
724
|
+
- `--fast` skips skeleton approval, skips scratchpad, auto-approves plans, and runs minimal verification
|
|
725
|
+
- `--thorough` requires skeleton approval, uses verbose scratchpad, forces plan review, and runs full verification
|
|
726
|
+
- Scratchpad is cleared automatically at every phase transition (PHASE_COMPLETE)
|
|
727
|
+
- Checkpoint commits fire after every passing checkpoint; recovery commits fire on retry budget exhaustion
|
|
728
|
+
- Rigor level persists across session resume — set once during INIT, never changed mid-session
|
|
729
|
+
|
|
730
|
+
## Examples
|
|
731
|
+
|
|
732
|
+
### Example: 3-Phase Security Scanner
|
|
733
|
+
|
|
734
|
+
**User invokes:** `/harness:autopilot docs/changes/security-scanner/proposal.md`
|
|
735
|
+
|
|
736
|
+
**Or with rigor flag:** `/harness:autopilot docs/changes/security-scanner/proposal.md --fast`
|
|
737
|
+
|
|
738
|
+
**INIT (with --fast):**
|
|
739
|
+
|
|
740
|
+
```
|
|
741
|
+
Read spec — found 3 phases:
|
|
742
|
+
Phase 1: Core Scanner (complexity: low)
|
|
743
|
+
Phase 2: Rule Engine (complexity: high)
|
|
744
|
+
Phase 3: CLI Integration (complexity: low)
|
|
745
|
+
Rigor level: fast
|
|
746
|
+
Created .harness/sessions/changes--security-scanner--proposal/autopilot-state.json. Starting Phase 1.
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
**Phase 1 — APPROVE_PLAN (fast mode):**
|
|
750
|
+
|
|
751
|
+
```
|
|
752
|
+
Auto-approved Phase 1: Core Scanner (fast mode — signal evaluation skipped)
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
**Phase 1 — EXECUTE (checkpoint commit):**
|
|
756
|
+
|
|
757
|
+
```
|
|
758
|
+
[harness-task-executor executes 8 tasks]
|
|
759
|
+
Checkpoint 1: types and interfaces — committed (abc1234)
|
|
760
|
+
Checkpoint 2: core implementation — committed (def5678)
|
|
761
|
+
Checkpoint 3: tests and validation — nothing to commit (skipped)
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
**INIT:**
|
|
765
|
+
|
|
766
|
+
```
|
|
767
|
+
Read spec — found 3 phases:
|
|
768
|
+
Phase 1: Core Scanner (complexity: low)
|
|
769
|
+
Phase 2: Rule Engine (complexity: high)
|
|
770
|
+
Phase 3: CLI Integration (complexity: low)
|
|
771
|
+
Created .harness/sessions/changes--security-scanner--proposal/autopilot-state.json. Starting Phase 1.
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
**Phase 1 — ASSESS:**
|
|
775
|
+
|
|
776
|
+
```
|
|
777
|
+
Phase 1: Core Scanner — complexity: low. Auto-planning.
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
**Phase 1 — PLAN:**
|
|
781
|
+
|
|
782
|
+
```
|
|
783
|
+
[harness-planner agent runs harness-planning]
|
|
784
|
+
Plan generated: docs/plans/2026-03-19-core-scanner-plan.md (8 tasks, ~24 min)
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
**Phase 1 — APPROVE_PLAN:**
|
|
788
|
+
|
|
789
|
+
```
|
|
790
|
+
Auto-approved Phase 1: Core Scanner
|
|
791
|
+
Review mode: auto
|
|
792
|
+
Complexity: low (no override)
|
|
793
|
+
Planner concerns: none
|
|
794
|
+
Tasks: 8 (threshold: 15)
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
**Phase 1 — EXECUTE → VERIFY → REVIEW:**
|
|
798
|
+
|
|
799
|
+
```
|
|
800
|
+
[harness-task-executor agent executes 8 tasks... all pass]
|
|
801
|
+
[harness-verifier agent runs verification... pass]
|
|
802
|
+
[harness-code-reviewer agent runs code review... 0 blocking, 2 notes]
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
**Phase 1 — PHASE_COMPLETE:**
|
|
806
|
+
|
|
807
|
+
```
|
|
808
|
+
Phase 1: Core Scanner — COMPLETE
|
|
809
|
+
Tasks: 8/8 | Retries: 0 | Verification: pass | Review: 0 blocking
|
|
810
|
+
Next: Phase 2: Rule Engine (complexity: high). Continue? (yes / stop)
|
|
811
|
+
→ User: "yes"
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
**Phase 2 — ASSESS:**
|
|
815
|
+
|
|
816
|
+
```
|
|
817
|
+
Phase 2: Rule Engine — complexity: high.
|
|
818
|
+
This phase requires interactive planning. Run /harness:planning with the
|
|
819
|
+
Rule Engine section of the spec, then re-invoke /harness:autopilot to continue.
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
**[User runs /harness:planning interactively, produces plan]**
|
|
823
|
+
|
|
824
|
+
**User re-invokes:** `/harness:autopilot`
|
|
825
|
+
|
|
826
|
+
**INIT (resume):**
|
|
827
|
+
|
|
828
|
+
```
|
|
829
|
+
Resuming autopilot from state PLAN, phase 2: Rule Engine.
|
|
830
|
+
Found plan: docs/plans/2026-03-19-rule-engine-plan.md
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
**Phase 2 — APPROVE_PLAN:**
|
|
834
|
+
|
|
835
|
+
```
|
|
836
|
+
Pausing for review -- Phase 2: Rule Engine
|
|
837
|
+
Review mode: auto
|
|
838
|
+
Complexity: high (triggered)
|
|
839
|
+
Planner concerns: none
|
|
840
|
+
Tasks: 14 (threshold: 15)
|
|
841
|
+
Approve this plan and begin execution? (yes / revise / skip / stop)
|
|
842
|
+
→ User: "yes"
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
**Phase 2 — EXECUTE → VERIFY → REVIEW → PHASE_COMPLETE**
|
|
846
|
+
|
|
847
|
+
```
|
|
848
|
+
[Execution with checkpoint pauses as needed]
|
|
849
|
+
Phase 2: Rule Engine — COMPLETE
|
|
850
|
+
Tasks: 14/14 | Retries: 1 | Verification: pass | Review: 0 blocking
|
|
851
|
+
Next: Phase 3: CLI Integration (complexity: low). Continue? (yes / stop)
|
|
852
|
+
→ User: "yes"
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
**Phase 3 — [auto-plans, executes, completes]**
|
|
856
|
+
|
|
857
|
+
**FINAL_REVIEW:**
|
|
858
|
+
|
|
859
|
+
```
|
|
860
|
+
[harness-code-reviewer runs cross-phase review on startingCommit..HEAD]
|
|
861
|
+
Final review: 0 blocking, 1 warning. Passed.
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
**DONE:**
|
|
865
|
+
|
|
866
|
+
```
|
|
867
|
+
All phases complete.
|
|
868
|
+
Total: 3 phases, 30 tasks, 1 retry
|
|
869
|
+
Final review: passed (0 blocking, 1 warning)
|
|
870
|
+
Create a PR? (yes / no)
|
|
871
|
+
→ User: "yes"
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
### Example: Retry Budget Exhaustion
|
|
875
|
+
|
|
876
|
+
**During Phase 1 — EXECUTE:**
|
|
877
|
+
|
|
878
|
+
```
|
|
879
|
+
Task 4: wire parser — FAILED
|
|
880
|
+
Error: Type error in parser.ts:42 — missing generic parameter
|
|
881
|
+
|
|
882
|
+
Retry 1/3: Added generic parameter to parseRule<T>. Re-running...
|
|
883
|
+
Task 4: wire parser — FAILED
|
|
884
|
+
Error: Test assertion failure — expected 3 rules, got 0
|
|
885
|
+
|
|
886
|
+
Retry 2/3: Expanded context — read rule-loader.ts, checked learnings. Fixed import path. Re-running...
|
|
887
|
+
Task 4: wire parser — FAILED
|
|
888
|
+
Error: Test timeout after 5000ms
|
|
889
|
+
|
|
890
|
+
Retry 3/3: Full context — re-read plan instructions, checked for ambiguity. Found test was missing async/await. Re-running...
|
|
891
|
+
Task 4: wire parser — PASSED
|
|
892
|
+
|
|
893
|
+
Continuing execution...
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
**If all 3 retries fail:**
|
|
897
|
+
|
|
898
|
+
```
|
|
899
|
+
Task 4: wire parser — FAILED (budget exhausted)
|
|
900
|
+
|
|
901
|
+
Attempt 1: Added generic parameter → Type error persists
|
|
902
|
+
Attempt 2: Fixed import path → Tests still timeout
|
|
903
|
+
Attempt 3: Added async/await → New error: connection refused
|
|
904
|
+
|
|
905
|
+
Recorded in .harness/failures.md.
|
|
906
|
+
How should we proceed? (fix manually and continue / revise plan / stop)
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
## Gates
|
|
910
|
+
|
|
911
|
+
- **No reimplementing delegated skills.** Autopilot orchestrates. If you are writing planning logic, execution logic, verification logic, or review logic, STOP. Delegate to the appropriate persona agent via `subagent_type`.
|
|
912
|
+
- **No executing without plan approval.** Every plan passes through the APPROVE_PLAN gate. When no concern signals fire, the plan is auto-approved with a structured report. When any signal fires, the plan pauses for human review. The `--review-plans` flag forces all plans to pause. No plan reaches EXECUTE without passing this gate.
|
|
913
|
+
- **No skipping VERIFY or REVIEW.** Every phase goes through verification and review. The human can override findings, but the steps cannot be skipped.
|
|
914
|
+
- **No infinite retries.** The retry budget is 3 attempts. If exhausted, STOP and surface to the human. Do not extend the budget without explicit human instruction.
|
|
915
|
+
- **No modifying session state files manually.** The session state files are managed by the skill. If the state appears corrupted, start fresh rather than patching it.
|
|
916
|
+
|
|
917
|
+
## Escalation
|
|
918
|
+
|
|
919
|
+
- **When the spec has no Implementation Order section:** Cannot identify phases. Ask the user to add phase annotations to the spec or provide a roadmap file.
|
|
920
|
+
- **When a delegated skill fails to produce expected output:** Check that `{sessionDir}/handoff.json` was written correctly. If the agent failed, report the failure and ask the user whether to retry the entire phase step or stop.
|
|
921
|
+
- **When the user wants to reorder phases mid-run:** Update the phases array in the session-scoped `autopilot-state.json` (mark skipped phases, adjust currentPhase). Do not re-run completed phases.
|
|
922
|
+
- **When context limits are approaching:** Persist state immediately and inform the user: "Context limit approaching. State saved. Re-invoke /harness:autopilot to continue from this point."
|
|
923
|
+
- **When multiple phases fail in sequence:** After 2 consecutive phase failures (retry budget exhausted in both), suggest the user review the spec for systemic issues rather than continuing.
|
|
924
|
+
|