@harness-engineering/cli 1.6.2 → 1.8.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/personas/documentation-maintainer.yaml +3 -1
- package/dist/agents/personas/performance-guardian.yaml +23 -0
- package/dist/agents/personas/planner.yaml +27 -0
- package/dist/agents/personas/verifier.yaml +30 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +13 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +25 -1
- package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +12 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +67 -1
- package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +76 -4
- package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +487 -234
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +15 -2
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/claude-code/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/claude-code/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +73 -8
- package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +35 -1
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +19 -1
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +57 -3
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +36 -2
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-verification/SKILL.md +66 -0
- package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-verify/SKILL.md +37 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +15 -1
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +12 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/node_modules/.bin/vitest +2 -2
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/color.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/layout.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/motion.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/typography.yaml +112 -0
- package/dist/agents/skills/shared/design-knowledge/industries/creative.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/ecommerce.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/emerging-tech.yaml +83 -0
- package/dist/agents/skills/shared/design-knowledge/industries/fintech.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/healthcare.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/lifestyle.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/saas.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/services.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/palettes/curated.yaml +234 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/android.yaml +125 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/flutter.yaml +144 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/ios.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/web.yaml +102 -0
- package/dist/agents/skills/shared/design-knowledge/typography/pairings.yaml +274 -0
- package/dist/agents/skills/shared/i18n-knowledge/accessibility/intersection.yaml +142 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/encoding.yaml +67 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/formatting.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/layout.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/pluralization.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/string-handling.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/android-resources.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/apple-strings.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/backend-patterns.yaml +50 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/flutter-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/i18next.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/react-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/vue-i18n.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/ecommerce.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/fintech.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/gaming.yaml +69 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/healthcare.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/legal.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ar.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/de.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/en.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/es.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/he.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/hi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/it.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ja.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ko.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/nl.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pl.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pt.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ru.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/sv.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/th.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/tr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hans.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hant.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/i18next-mcp.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lingo-dev.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lokalise.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/tolgee.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/locale-testing.yaml +107 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/pseudo-localization.yaml +86 -0
- package/dist/bin/harness.js +64 -4
- package/dist/{chunk-UDWGSL3T.js → chunk-3JWCBVUZ.js} +3 -3
- package/dist/{chunk-IUFFBBYV.js → chunk-LNI4T7R6.js} +179 -61
- package/dist/{chunk-USEYPS7F.js → chunk-SJECMKSS.js} +2250 -40
- package/dist/{dist-4MYPT3OE.js → dist-BDO5GFEM.js} +295 -14
- package/dist/{dist-RBZXXJHG.js → dist-NT3GXHQZ.js} +95 -1
- package/dist/index.d.ts +266 -7
- package/dist/index.js +7 -3
- package/dist/validate-cross-check-2OPGCGGU.js +7 -0
- package/package.json +7 -7
- package/dist/validate-cross-check-CPEPNLOD.js +0 -7
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: harness-accessibility
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: WCAG accessibility scanning, contrast checking, ARIA validation, and remediation
|
|
4
|
+
cognitive_mode: meticulous-verifier
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
- on_new_feature
|
|
8
|
+
- on_project_init
|
|
9
|
+
platforms:
|
|
10
|
+
- claude-code
|
|
11
|
+
- gemini-cli
|
|
12
|
+
tools:
|
|
13
|
+
- Bash
|
|
14
|
+
- Read
|
|
15
|
+
- Write
|
|
16
|
+
- Edit
|
|
17
|
+
- Glob
|
|
18
|
+
- Grep
|
|
19
|
+
cli:
|
|
20
|
+
command: harness skill run harness-accessibility
|
|
21
|
+
args:
|
|
22
|
+
- name: path
|
|
23
|
+
description: Project root path
|
|
24
|
+
required: false
|
|
25
|
+
- name: scope
|
|
26
|
+
description: Scope of scan (full, component, page)
|
|
27
|
+
required: false
|
|
28
|
+
mcp:
|
|
29
|
+
tool: run_skill
|
|
30
|
+
input:
|
|
31
|
+
skill: harness-accessibility
|
|
32
|
+
path: string
|
|
33
|
+
type: rigid
|
|
34
|
+
phases:
|
|
35
|
+
- name: scan
|
|
36
|
+
description: Scan codebase for accessibility issues (WCAG AA baseline)
|
|
37
|
+
required: true
|
|
38
|
+
- name: evaluate
|
|
39
|
+
description: Evaluate severity and categorize findings
|
|
40
|
+
required: true
|
|
41
|
+
- name: report
|
|
42
|
+
description: Generate structured accessibility report
|
|
43
|
+
required: true
|
|
44
|
+
- name: fix
|
|
45
|
+
description: Apply automated fixes for mechanical issues
|
|
46
|
+
required: false
|
|
47
|
+
state:
|
|
48
|
+
persistent: false
|
|
49
|
+
files: []
|
|
50
|
+
depends_on:
|
|
51
|
+
- harness-design-system
|
|
@@ -13,18 +13,23 @@
|
|
|
13
13
|
|
|
14
14
|
## Relationship to Other Skills
|
|
15
15
|
|
|
16
|
-
| Skill | Role in Autopilot |
|
|
17
|
-
| -------------------- | -------------------------------------------- |
|
|
18
|
-
| harness-planning | Delegated to for phase plan creation |
|
|
19
|
-
| harness-execution | Delegated to for task-by-task implementation |
|
|
20
|
-
| harness-verification | Delegated to for post-execution validation |
|
|
21
|
-
| harness-code-review | Delegated to for post-verification review |
|
|
16
|
+
| Skill | Persona Agent (`subagent_type`) | Role in Autopilot |
|
|
17
|
+
| -------------------- | ------------------------------- | -------------------------------------------- |
|
|
18
|
+
| harness-planning | `harness-planner` | Delegated to for phase plan creation |
|
|
19
|
+
| harness-execution | `harness-task-executor` | Delegated to for task-by-task implementation |
|
|
20
|
+
| harness-verification | `harness-verifier` | Delegated to for post-execution validation |
|
|
21
|
+
| harness-code-review | `harness-code-reviewer` | Delegated to for post-verification review |
|
|
22
22
|
|
|
23
|
-
Autopilot orchestrates these
|
|
23
|
+
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.
|
|
24
24
|
|
|
25
25
|
## Iron Law
|
|
26
26
|
|
|
27
|
-
**Autopilot delegates, never reimplements.** If you find yourself writing planning logic, execution logic, or review logic inside the autopilot loop, STOP. Delegate to the
|
|
27
|
+
**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.
|
|
28
|
+
|
|
29
|
+
**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.
|
|
30
|
+
|
|
31
|
+
- **Claude Code:** Use the Agent tool with `subagent_type` set to the persona name.
|
|
32
|
+
- **Gemini CLI:** Use the `run_agent` tool targeting the persona by name, or dispatch via `harness persona run <name>`.
|
|
28
33
|
|
|
29
34
|
**Human always approves plans.** No plan executes without explicit human sign-off, regardless of complexity level. The difference is whether autopilot generates the plan automatically or asks the human to drive planning interactively.
|
|
30
35
|
|
|
@@ -44,20 +49,32 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
44
49
|
|
|
45
50
|
### Phase 1: INIT — Load Spec and Restore State
|
|
46
51
|
|
|
47
|
-
1. **
|
|
52
|
+
1. **Resolve spec path.** The spec file is provided as an argument, or ask the user for the spec path.
|
|
53
|
+
|
|
54
|
+
2. **Derive session slug and directory:**
|
|
55
|
+
- Derive the session slug from the spec path:
|
|
56
|
+
1. If the path starts with `docs/`, strip the `docs/` prefix. Otherwise, use the full relative path.
|
|
57
|
+
2. Drop the trailing `.md` extension
|
|
58
|
+
3. Replace all `/` and `.` characters with `--`
|
|
59
|
+
4. Lowercase the result
|
|
60
|
+
- Set `sessionDir = .harness/sessions/<slug>/`
|
|
61
|
+
- Create the session directory if it does not exist
|
|
62
|
+
|
|
63
|
+
3. **Check for existing state.** Read `{sessionDir}/autopilot-state.json`. If it exists and `currentState` is not `DONE`:
|
|
48
64
|
- Report: "Resuming autopilot from state `{currentState}`, phase {currentPhase}: {phaseName}."
|
|
49
65
|
- Skip to the recorded `currentState` and continue from there.
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
- Read the spec file
|
|
67
|
+
4. **If no existing state (fresh start):**
|
|
68
|
+
- Read the spec file.
|
|
53
69
|
- Parse the `## Implementation Order` section to extract phases.
|
|
54
70
|
- For each phase heading (`### Phase N: Name`), extract:
|
|
55
71
|
- Phase name
|
|
56
72
|
- Complexity annotation (`<!-- complexity: low|medium|high -->`, default: `medium`)
|
|
57
|
-
- Create
|
|
73
|
+
- Create `{sessionDir}/autopilot-state.json`:
|
|
58
74
|
```json
|
|
59
75
|
{
|
|
60
|
-
"schemaVersion":
|
|
76
|
+
"schemaVersion": 2,
|
|
77
|
+
"sessionDir": ".harness/sessions/<slug>",
|
|
61
78
|
"specPath": "<path to spec>",
|
|
62
79
|
"currentState": "ASSESS",
|
|
63
80
|
"currentPhase": 0,
|
|
@@ -78,15 +95,22 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
78
95
|
}
|
|
79
96
|
```
|
|
80
97
|
|
|
81
|
-
|
|
98
|
+
5. **Load context.** Read `.harness/learnings.md` and `.harness/failures.md` (global, at `.harness/` root) if they exist. Note any relevant learnings or known dead ends for the current phase.
|
|
99
|
+
|
|
100
|
+
6. **Load roadmap context.** If `docs/roadmap.md` exists, read it to understand:
|
|
101
|
+
- Current project priorities (which features are `in-progress`)
|
|
102
|
+
- Blockers that may affect the upcoming phases
|
|
103
|
+
- Overall project status and milestone progress
|
|
104
|
+
|
|
105
|
+
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.
|
|
82
106
|
|
|
83
|
-
|
|
107
|
+
7. **Transition to ASSESS.**
|
|
84
108
|
|
|
85
109
|
---
|
|
86
110
|
|
|
87
111
|
### ASSESS — Determine Phase Approach
|
|
88
112
|
|
|
89
|
-
1. **Read the current phase** from `autopilot-state.json` at index `currentPhase`.
|
|
113
|
+
1. **Read the current phase** from `{sessionDir}/autopilot-state.json` at index `currentPhase`.
|
|
90
114
|
|
|
91
115
|
2. **Check if plan already exists.** If `planPath` is set and the file exists, skip to `APPROVE_PLAN`.
|
|
92
116
|
|
|
@@ -97,8 +121,8 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
97
121
|
|
|
98
122
|
| Effective Complexity | Action |
|
|
99
123
|
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
100
|
-
| `low` | Auto-plan via
|
|
101
|
-
| `medium` | Auto-plan via
|
|
124
|
+
| `low` | Auto-plan via `harness-planner` agent. Proceed to PLAN. |
|
|
125
|
+
| `medium` | Auto-plan via `harness-planner` agent. Proceed to PLAN. Present with extra scrutiny note. |
|
|
102
126
|
| `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`. |
|
|
103
127
|
|
|
104
128
|
4. **Update state** with `currentState: "PLAN"` and save.
|
|
@@ -109,22 +133,27 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
109
133
|
|
|
110
134
|
**If auto-planning (low/medium complexity):**
|
|
111
135
|
|
|
112
|
-
1. Dispatch a
|
|
136
|
+
1. Dispatch a planning agent using the Agent tool:
|
|
113
137
|
|
|
114
138
|
```
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
Agent tool parameters:
|
|
140
|
+
subagent_type: "harness-planner"
|
|
141
|
+
description: "Plan phase {N}: {name}"
|
|
142
|
+
prompt: |
|
|
143
|
+
You are running harness-planning for phase {N}: {name}.
|
|
144
|
+
|
|
145
|
+
Spec: {specPath}
|
|
146
|
+
Session directory: {sessionDir}
|
|
147
|
+
Phase description: {phase description from spec}
|
|
148
|
+
Previous phase learnings (global): {relevant learnings from .harness/learnings.md}
|
|
149
|
+
Known failures to avoid (global): {relevant entries from .harness/failures.md}
|
|
150
|
+
|
|
151
|
+
Follow the harness-planning skill process exactly. Write the plan to
|
|
152
|
+
docs/plans/{date}-{phase-name}-plan.md. Write {sessionDir}/handoff.json when done.
|
|
124
153
|
```
|
|
125
154
|
|
|
126
|
-
2. When the
|
|
127
|
-
- Read the generated plan path from
|
|
155
|
+
2. When the agent returns:
|
|
156
|
+
- Read the generated plan path from `{sessionDir}/handoff.json`.
|
|
128
157
|
- **Apply complexity override check:**
|
|
129
158
|
- Count tasks in the plan.
|
|
130
159
|
- Count `[checkpoint:*]` markers.
|
|
@@ -138,7 +167,7 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
138
167
|
**If awaiting interactive plan (high complexity):**
|
|
139
168
|
|
|
140
169
|
1. Check if a plan file now exists for this phase (user ran planning separately).
|
|
141
|
-
- Look for files matching `docs/plans/*{phase-name}*` or check
|
|
170
|
+
- Look for files matching `docs/plans/*{phase-name}*` or check `{sessionDir}/handoff.json` for a planning handoff.
|
|
142
171
|
2. If found: update `planPath` in state, transition to `APPROVE_PLAN`.
|
|
143
172
|
3. If not found: remind the user and wait.
|
|
144
173
|
|
|
@@ -170,27 +199,32 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
170
199
|
|
|
171
200
|
### EXECUTE — Run the Plan
|
|
172
201
|
|
|
173
|
-
1. **Dispatch execution
|
|
202
|
+
1. **Dispatch execution agent using the Agent tool:**
|
|
174
203
|
|
|
175
204
|
```
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
205
|
+
Agent tool parameters:
|
|
206
|
+
subagent_type: "harness-task-executor"
|
|
207
|
+
description: "Execute phase {N}: {name}"
|
|
208
|
+
prompt: |
|
|
209
|
+
You are running harness-execution for phase {N}: {name}.
|
|
210
|
+
|
|
211
|
+
Plan: {planPath}
|
|
212
|
+
Session directory: {sessionDir}
|
|
213
|
+
State: {sessionDir}/state.json
|
|
214
|
+
Learnings (global): .harness/learnings.md
|
|
215
|
+
Failures (global): .harness/failures.md
|
|
216
|
+
|
|
217
|
+
Follow the harness-execution skill process exactly.
|
|
218
|
+
Update {sessionDir}/state.json after each task.
|
|
219
|
+
Write {sessionDir}/handoff.json when done or when blocked.
|
|
186
220
|
```
|
|
187
221
|
|
|
188
|
-
2. **When the
|
|
222
|
+
2. **When the agent returns, check the outcome:**
|
|
189
223
|
- **All tasks complete:** Transition to VERIFY.
|
|
190
224
|
- **Checkpoint reached:** Surface the checkpoint to the user in the main conversation. Handle the checkpoint type:
|
|
191
|
-
- `[checkpoint:human-verify]` — Show output, ask for confirmation, then resume execution
|
|
192
|
-
- `[checkpoint:decision]` — Present options, record choice, resume execution
|
|
193
|
-
- `[checkpoint:human-action]` — Instruct user, wait for confirmation, resume execution
|
|
225
|
+
- `[checkpoint:human-verify]` — Show output, ask for confirmation, then resume execution agent.
|
|
226
|
+
- `[checkpoint:decision]` — Present options, record choice, resume execution agent.
|
|
227
|
+
- `[checkpoint:human-action]` — Instruct user, wait for confirmation, resume execution agent.
|
|
194
228
|
- **Task failed:** Enter retry logic (see below).
|
|
195
229
|
|
|
196
230
|
3. **Retry logic on failure:**
|
|
@@ -198,7 +232,7 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
198
232
|
- If `attemptsUsed < maxAttempts`:
|
|
199
233
|
- Increment `attemptsUsed`.
|
|
200
234
|
- Record the attempt (timestamp, error, fix attempted, result).
|
|
201
|
-
- **Attempt 1:** Read error output, apply obvious fix, re-dispatch execution
|
|
235
|
+
- **Attempt 1:** Read error output, apply obvious fix, re-dispatch execution agent for the failed task only.
|
|
202
236
|
- **Attempt 2:** Expand context — read related files, check `learnings.md` for similar failures, re-dispatch with additional context.
|
|
203
237
|
- **Attempt 3:** Full context gather — read test output, imports, plan instructions for ambiguity. Re-dispatch with maximum context.
|
|
204
238
|
- If budget exhausted:
|
|
@@ -213,16 +247,22 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
213
247
|
|
|
214
248
|
### VERIFY — Post-Execution Validation
|
|
215
249
|
|
|
216
|
-
1. **Dispatch verification
|
|
250
|
+
1. **Dispatch verification agent using the Agent tool:**
|
|
217
251
|
|
|
218
252
|
```
|
|
219
|
-
|
|
253
|
+
Agent tool parameters:
|
|
254
|
+
subagent_type: "harness-verifier"
|
|
255
|
+
description: "Verify phase {N}: {name}"
|
|
256
|
+
prompt: |
|
|
257
|
+
You are running harness-verification for phase {N}: {name}.
|
|
258
|
+
|
|
259
|
+
Session directory: {sessionDir}
|
|
220
260
|
|
|
221
|
-
|
|
222
|
-
|
|
261
|
+
Follow the harness-verification skill process exactly.
|
|
262
|
+
Report pass/fail with findings.
|
|
223
263
|
```
|
|
224
264
|
|
|
225
|
-
2. **When the
|
|
265
|
+
2. **When the agent returns:**
|
|
226
266
|
- **All checks pass:** Transition to REVIEW.
|
|
227
267
|
- **Failures found:** Surface findings to the user. Ask: "Fix these issues before review? (yes / skip verification / stop)"
|
|
228
268
|
- **yes** — Re-enter EXECUTE with targeted fixes (retry budget resets for verification fixes).
|
|
@@ -235,16 +275,22 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
235
275
|
|
|
236
276
|
### REVIEW — Code Review
|
|
237
277
|
|
|
238
|
-
1. **Dispatch review
|
|
278
|
+
1. **Dispatch review agent using the Agent tool:**
|
|
239
279
|
|
|
240
280
|
```
|
|
241
|
-
|
|
281
|
+
Agent tool parameters:
|
|
282
|
+
subagent_type: "harness-code-reviewer"
|
|
283
|
+
description: "Review phase {N}: {name}"
|
|
284
|
+
prompt: |
|
|
285
|
+
You are running harness-code-review for phase {N}: {name}.
|
|
286
|
+
|
|
287
|
+
Session directory: {sessionDir}
|
|
242
288
|
|
|
243
|
-
|
|
244
|
-
|
|
289
|
+
Follow the harness-code-review skill process exactly.
|
|
290
|
+
Report findings with severity (blocking / warning / note).
|
|
245
291
|
```
|
|
246
292
|
|
|
247
|
-
2. **When the
|
|
293
|
+
2. **When the agent returns:**
|
|
248
294
|
- **No blocking findings:** Report summary, transition to PHASE_COMPLETE.
|
|
249
295
|
- **Blocking findings:** Surface to user. Ask: "Address blocking findings before completing this phase? (yes / override / stop)"
|
|
250
296
|
- **yes** — Re-enter EXECUTE with review fixes.
|
|
@@ -303,7 +349,7 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
303
349
|
- "Create a PR? (yes / no)"
|
|
304
350
|
- If yes: assemble commit history, suggest PR title and description.
|
|
305
351
|
|
|
306
|
-
3. **Write final handoff
|
|
352
|
+
3. **Write final handoff** to `{sessionDir}/handoff.json`:
|
|
307
353
|
|
|
308
354
|
```json
|
|
309
355
|
{
|
|
@@ -326,20 +372,21 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
|
|
|
326
372
|
- [skill:harness-autopilot] [outcome:observation] {any notable patterns from the run}
|
|
327
373
|
```
|
|
328
374
|
|
|
329
|
-
5. **Clean up state:** Set `currentState: "DONE"` in `autopilot-state.json`. Do not delete the file — it serves as a record.
|
|
375
|
+
5. **Clean up state:** Set `currentState: "DONE"` in `{sessionDir}/autopilot-state.json`. Do not delete the file — it serves as a record.
|
|
330
376
|
|
|
331
377
|
## Harness Integration
|
|
332
378
|
|
|
333
379
|
- **`harness validate`** — Run during INIT to verify project health. Included in every execution task via harness-execution delegation.
|
|
334
380
|
- **`harness check-deps`** — Delegated to harness-execution (included in task steps).
|
|
335
|
-
- **State file** — `.harness/autopilot-state.json` tracks the orchestration state machine. `.harness/state.json` tracks task-level execution state (managed by harness-execution).
|
|
336
|
-
- **Handoff** — `.harness/handoff.json` is written by each delegated skill and read by the next. Autopilot writes a final handoff on DONE.
|
|
337
|
-
- **Learnings** — `.harness/learnings.md` is appended by both delegated skills and autopilot itself.
|
|
381
|
+
- **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.
|
|
382
|
+
- **Handoff** — `.harness/sessions/<slug>/handoff.json` is written by each delegated skill and read by the next. Autopilot writes a final handoff on DONE.
|
|
383
|
+
- **Learnings** — `.harness/learnings.md` (global) is appended by both delegated skills and autopilot itself.
|
|
384
|
+
- **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.
|
|
338
385
|
|
|
339
386
|
## Success Criteria
|
|
340
387
|
|
|
341
388
|
- Single `/harness:autopilot` invocation executes all phases through to completion
|
|
342
|
-
- Resume from any state after context reset via
|
|
389
|
+
- Resume from any state after context reset via session-scoped `autopilot-state.json`
|
|
343
390
|
- Low-complexity phases auto-plan; high-complexity phases pause for interactive planning
|
|
344
391
|
- Planning override bumps complexity upward when task signals disagree
|
|
345
392
|
- Retry budget (3 attempts) with escalating context before surfacing failures
|
|
@@ -360,7 +407,7 @@ Read spec — found 3 phases:
|
|
|
360
407
|
Phase 1: Core Scanner (complexity: low)
|
|
361
408
|
Phase 2: Rule Engine (complexity: high)
|
|
362
409
|
Phase 3: CLI Integration (complexity: low)
|
|
363
|
-
Created .harness/autopilot-state.json. Starting Phase 1.
|
|
410
|
+
Created .harness/sessions/specs--2026-03-19-security-scanner/autopilot-state.json. Starting Phase 1.
|
|
364
411
|
```
|
|
365
412
|
|
|
366
413
|
**Phase 1 — ASSESS:**
|
|
@@ -372,7 +419,7 @@ Phase 1: Core Scanner — complexity: low. Auto-planning.
|
|
|
372
419
|
**Phase 1 — PLAN:**
|
|
373
420
|
|
|
374
421
|
```
|
|
375
|
-
[
|
|
422
|
+
[harness-planner agent runs harness-planning]
|
|
376
423
|
Plan generated: docs/plans/2026-03-19-core-scanner-plan.md (8 tasks, ~24 min)
|
|
377
424
|
```
|
|
378
425
|
|
|
@@ -388,9 +435,9 @@ Approve this plan and begin execution? (yes / revise / skip / stop)
|
|
|
388
435
|
**Phase 1 — EXECUTE → VERIFY → REVIEW:**
|
|
389
436
|
|
|
390
437
|
```
|
|
391
|
-
[
|
|
392
|
-
[
|
|
393
|
-
[
|
|
438
|
+
[harness-task-executor agent executes 8 tasks... all pass]
|
|
439
|
+
[harness-verifier agent runs verification... pass]
|
|
440
|
+
[harness-code-reviewer agent runs code review... 0 blocking, 2 notes]
|
|
394
441
|
```
|
|
395
442
|
|
|
396
443
|
**Phase 1 — PHASE_COMPLETE:**
|
|
@@ -479,16 +526,16 @@ How should we proceed? (fix manually and continue / revise plan / stop)
|
|
|
479
526
|
|
|
480
527
|
## Gates
|
|
481
528
|
|
|
482
|
-
- **No reimplementing delegated skills.** Autopilot orchestrates. If you are writing planning logic, execution logic, verification logic, or review logic, STOP. Delegate to the appropriate
|
|
529
|
+
- **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`.
|
|
483
530
|
- **No executing without plan approval.** Every plan must be explicitly approved by the human before execution begins. No exceptions, regardless of complexity level.
|
|
484
531
|
- **No skipping VERIFY or REVIEW.** Every phase goes through verification and review. The human can override findings, but the steps cannot be skipped.
|
|
485
532
|
- **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.
|
|
486
|
-
- **No modifying
|
|
533
|
+
- **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.
|
|
487
534
|
|
|
488
535
|
## Escalation
|
|
489
536
|
|
|
490
537
|
- **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.
|
|
491
|
-
- **When a delegated skill fails to produce expected output:** Check that handoff.json was written correctly. If the
|
|
492
|
-
- **When the user wants to reorder phases mid-run:** Update the phases array in autopilot-state.json (mark skipped phases, adjust currentPhase). Do not re-run completed phases.
|
|
538
|
+
- **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.
|
|
539
|
+
- **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.
|
|
493
540
|
- **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."
|
|
494
541
|
- **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.
|
|
@@ -42,9 +42,11 @@ phases:
|
|
|
42
42
|
state:
|
|
43
43
|
persistent: true
|
|
44
44
|
files:
|
|
45
|
-
- .harness/autopilot-state.json
|
|
46
|
-
- .harness/state.json
|
|
45
|
+
- .harness/sessions/*/autopilot-state.json
|
|
46
|
+
- .harness/sessions/*/state.json
|
|
47
|
+
- .harness/sessions/*/handoff.json
|
|
47
48
|
- .harness/learnings.md
|
|
49
|
+
- .harness/failures.md
|
|
48
50
|
depends_on:
|
|
49
51
|
- harness-planning
|
|
50
52
|
- harness-execution
|
|
@@ -38,6 +38,21 @@ If you find yourself writing production code, tests, or scaffolding before the h
|
|
|
38
38
|
|
|
39
39
|
1. **Ask ONE question at a time.** Do not dump a list of 10 questions on the human. Ask the most important question first. Wait for the answer. Let the answer inform the next question.
|
|
40
40
|
|
|
41
|
+
When asking a clarifying question, use `emit_interaction` with `type: 'question'`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
emit_interaction({
|
|
45
|
+
path: "<project-root>",
|
|
46
|
+
type: "question",
|
|
47
|
+
question: {
|
|
48
|
+
text: "For auth, should we use:",
|
|
49
|
+
options: ["A) existing JWT middleware", "B) OAuth2 via provider X", "C) external service"]
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This records the question in state and returns a formatted prompt to present.
|
|
55
|
+
|
|
41
56
|
2. **Prefer multiple choice.** Instead of "How should we handle auth?", ask "For auth, should we: (A) use existing JWT middleware, (B) add OAuth2 via provider X, or (C) delegate to an external service?" Give 2-4 concrete options with brief tradeoff notes.
|
|
42
57
|
|
|
43
58
|
3. **When the human answers, acknowledge and build on it.** Do not re-ask clarified points. Track decisions as they accumulate.
|
|
@@ -67,6 +82,13 @@ These keywords flow into the `handoff.json` `contextKeywords` field when the spe
|
|
|
67
82
|
- **Estimated complexity:** Low / Medium / High, with a brief justification
|
|
68
83
|
- **Risk:** What could go wrong, what assumptions might be wrong
|
|
69
84
|
|
|
85
|
+
When presenting approach tradeoffs, use conventional markdown patterns:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
**[IMPORTANT]** Approach 1 trades simplicity for extensibility
|
|
89
|
+
**[SUGGESTION]** Consider Approach 2 if real-time requirements emerge later
|
|
90
|
+
```
|
|
91
|
+
|
|
70
92
|
2. **Be honest about tradeoffs.** Do not soft-sell a preferred approach. If approach A is simpler but less extensible, say so plainly.
|
|
71
93
|
|
|
72
94
|
3. **State your recommendation** and why, but defer to the human's decision.
|
|
@@ -84,13 +106,62 @@ These keywords flow into the `handoff.json` `contextKeywords` field when the spe
|
|
|
84
106
|
- Success criteria (observable, testable outcomes)
|
|
85
107
|
- Implementation order (high-level phases, not detailed tasks — that is harness-planning's job)
|
|
86
108
|
|
|
87
|
-
2. **After all sections are reviewed
|
|
109
|
+
2. **Run soundness review.** After all sections are reviewed and the spec is drafted, invoke `harness-soundness-review --mode spec` against the draft. Do not proceed to write the spec to `docs/` until the soundness review converges with no remaining issues.
|
|
88
110
|
|
|
89
|
-
|
|
111
|
+
3. **Write the spec to `docs/`.** Use the project's existing spec naming convention. If none exists, use `docs/specs/YYYY-MM-DD-<feature-name>.md`.
|
|
90
112
|
|
|
91
|
-
|
|
113
|
+
When the project has `docs/specs/`, write proposals to `docs/changes/<feature>/proposal.md` instead. This keeps change proposals separate from established specs. Fall back to the existing behavior (`docs/specs/`) when no `docs/specs/` directory exists yet.
|
|
92
114
|
|
|
93
|
-
4. **
|
|
115
|
+
4. **Run `harness validate`** to verify the spec file is properly placed and the project remains healthy.
|
|
116
|
+
|
|
117
|
+
5. **Request sign-off via `emit_interaction`:**
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
emit_interaction({
|
|
121
|
+
path: "<project-root>",
|
|
122
|
+
type: "confirmation",
|
|
123
|
+
confirmation: {
|
|
124
|
+
text: "Approve spec at <file-path>?",
|
|
125
|
+
context: "<one-paragraph summary of the design>"
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The human must explicitly approve before this skill is complete.
|
|
131
|
+
|
|
132
|
+
6. **Write handoff and suggest transition.** After the human approves the spec:
|
|
133
|
+
|
|
134
|
+
Write `.harness/handoff.json`:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"fromSkill": "harness-brainstorming",
|
|
139
|
+
"phase": "VALIDATE",
|
|
140
|
+
"summary": "<1-sentence spec summary>",
|
|
141
|
+
"artifacts": ["<spec file path>"],
|
|
142
|
+
"decisions": [{ "what": "<decision>", "why": "<rationale>" }],
|
|
143
|
+
"contextKeywords": ["<domain keywords from Phase 2>"]
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Call `emit_interaction`:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"type": "transition",
|
|
152
|
+
"transition": {
|
|
153
|
+
"completedPhase": "brainstorming",
|
|
154
|
+
"suggestedNext": "planning",
|
|
155
|
+
"reason": "Spec approved and written to docs/",
|
|
156
|
+
"artifacts": ["<spec file path>"],
|
|
157
|
+
"requiresConfirmation": true,
|
|
158
|
+
"summary": "<Spec title> -- <key design choices>. <N> success criteria, <N> implementation phases."
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
If the user confirms: invoke harness-planning with the spec path.
|
|
164
|
+
If the user declines: stop. The handoff is written for future invocation.
|
|
94
165
|
|
|
95
166
|
---
|
|
96
167
|
|
|
@@ -147,6 +218,7 @@ Converge on a recommendation that addresses all concerns before presenting the d
|
|
|
147
218
|
- **`harness check-docs`** — Run to verify the spec does not conflict with existing documentation.
|
|
148
219
|
- **Spec location** — Specs go to `docs/` (or `docs/specs/` if the project uses that convention). Follow existing naming patterns.
|
|
149
220
|
- **Handoff to harness-planning** — Once the spec is approved, invoke harness-planning to create the implementation plan from the spec.
|
|
221
|
+
- **`emit_interaction`** -- Call at the end of Phase 4 to suggest transitioning to harness-planning. Uses confirmed transition (waits for user approval).
|
|
150
222
|
|
|
151
223
|
#### Requirement Phrasing
|
|
152
224
|
|