@open-agent-toolkit/cli 0.0.43 → 0.0.50
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/assets/agents/oat-phase-implementer.md +230 -0
- package/assets/agents/oat-reviewer.md +3 -3
- package/assets/docs/cli-utilities/configuration.md +15 -3
- package/assets/docs/reference/cli-reference.md +17 -14
- package/assets/docs/reference/oat-directory-structure.md +17 -17
- package/assets/docs/workflows/projects/artifacts.md +34 -0
- package/assets/docs/workflows/projects/implementation-execution.md +161 -0
- package/assets/docs/workflows/projects/lifecycle.md +22 -29
- package/assets/docs/workflows/projects/reviews.md +4 -2
- package/assets/docs/workflows/skills/index.md +0 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-doctor/SKILL.md +3 -3
- package/assets/skills/oat-project-implement/SKILL.md +363 -126
- package/assets/skills/oat-project-import-plan/SKILL.md +2 -3
- package/assets/skills/oat-project-next/SKILL.md +11 -12
- package/assets/skills/oat-project-plan/SKILL.md +23 -5
- package/assets/skills/oat-project-plan-writing/SKILL.md +2 -2
- package/assets/skills/oat-project-progress/SKILL.md +29 -35
- package/assets/skills/oat-project-quick-start/SKILL.md +13 -3
- package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +2 -2
- package/assets/templates/implementation.md +8 -3
- package/assets/templates/plan.md +24 -3
- package/assets/templates/state.md +1 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +17 -4
- package/dist/commands/init/tools/index.js +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +2 -2
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +1 -1
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +3 -1
- package/dist/commands/project/set-mode/index.d.ts +0 -6
- package/dist/commands/project/set-mode/index.d.ts.map +1 -1
- package/dist/commands/project/set-mode/index.js +16 -96
- package/dist/commands/project/validate-plan/index.d.ts +3 -0
- package/dist/commands/project/validate-plan/index.d.ts.map +1 -0
- package/dist/commands/project/validate-plan/index.js +44 -0
- package/dist/commands/project/validate-plan/validate-plan.d.ts +20 -0
- package/dist/commands/project/validate-plan/validate-plan.d.ts.map +1 -0
- package/dist/commands/project/validate-plan/validate-plan.js +77 -0
- package/dist/commands/tools/update/index.d.ts +4 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +17 -1
- package/dist/commands/tools/update/update-tools.d.ts +1 -0
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +80 -1
- package/dist/config/oat-config.d.ts +1 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +3 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +9 -0
- package/package.json +2 -2
- package/assets/skills/oat-project-subagent-implement/SKILL.md +0 -549
- package/assets/skills/oat-project-subagent-implement/examples/pattern-hill-checkpoint.md +0 -110
- package/assets/skills/oat-project-subagent-implement/examples/pattern-parallel-phases.md +0 -118
- package/assets/skills/oat-project-subagent-implement/scripts/dispatch.sh +0 -133
- package/assets/skills/oat-project-subagent-implement/scripts/reconcile.sh +0 -182
- package/assets/skills/oat-project-subagent-implement/scripts/review-gate.sh +0 -187
- package/assets/skills/oat-project-subagent-implement/tests/fixtures/sample-plan.md +0 -234
- package/assets/skills/oat-project-subagent-implement/tests/test-dry-run.sh +0 -126
- package/assets/skills/oat-project-subagent-implement/tests/test-hill-checkpoint.sh +0 -127
- package/assets/skills/oat-project-subagent-implement/tests/test-reconcile.sh +0 -254
- package/assets/skills/oat-project-subagent-implement/tests/test-review-gate.sh +0 -220
|
@@ -1,549 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: oat-project-subagent-implement
|
|
3
|
-
version: 1.2.0
|
|
4
|
-
description: Use when you need parallel execution across eligible plan phases/tasks using autonomous worktrees, review gates, and deterministic merge-back.
|
|
5
|
-
argument-hint: '[--dry-run] [--merge-strategy <merge|cherry-pick>] [--retry-limit <N>]'
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
user-invocable: true
|
|
8
|
-
allowed-tools: Read, Write, Bash, Glob, Grep, Task
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Subagent Orchestration
|
|
12
|
-
|
|
13
|
-
Drive parallel, worktree-isolated execution of plan tasks with autonomous review gates and deterministic fan-in reconciliation.
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
Enable an orchestrator agent to:
|
|
18
|
-
|
|
19
|
-
1. Identify parallelizable units from a project plan.
|
|
20
|
-
2. Bootstrap isolated worktrees per unit via `oat-worktree-bootstrap-auto`.
|
|
21
|
-
3. Dispatch subagents with scoped objectives and file boundaries.
|
|
22
|
-
4. Run autonomous review gates per unit before merge-back.
|
|
23
|
-
5. Reconcile unit branches into the orchestration branch.
|
|
24
|
-
6. Log all outcomes to OAT project artifacts.
|
|
25
|
-
|
|
26
|
-
All execution is non-interactive between configured HiLL checkpoints.
|
|
27
|
-
|
|
28
|
-
## Prerequisites
|
|
29
|
-
|
|
30
|
-
- Active OAT project with a complete `plan.md`.
|
|
31
|
-
- `oat-worktree-bootstrap-auto` skill available.
|
|
32
|
-
|
|
33
|
-
## Relationship to Existing Skills
|
|
34
|
-
|
|
35
|
-
| Skill | Role in Orchestration |
|
|
36
|
-
| ----------------------------- | ------------------------------------------------------------------------ |
|
|
37
|
-
| `oat-worktree-bootstrap-auto` | Creates isolated worktrees per unit |
|
|
38
|
-
| `oat-project-implement` | Single-thread fallback; not used during orchestration |
|
|
39
|
-
| `oat-project-review-provide` | Manual review skill; autonomous gate is a parallel concept |
|
|
40
|
-
| `oat-project-review-receive` | Processes review findings; autonomous gate produces compatible artifacts |
|
|
41
|
-
|
|
42
|
-
## Progress Indicators (User-Facing)
|
|
43
|
-
|
|
44
|
-
When executing this skill, provide lightweight progress feedback so the user can tell what is happening:
|
|
45
|
-
|
|
46
|
-
- Print a phase banner once at start:
|
|
47
|
-
|
|
48
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
49
|
-
OAT ▸ SUBAGENT IMPLEMENT
|
|
50
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
51
|
-
|
|
52
|
-
- Before multi-step work, print concise indicators, for example:
|
|
53
|
-
- `[1/6] Reading plan + identifying units…`
|
|
54
|
-
- `[2/6] Bootstrapping worktrees…`
|
|
55
|
-
- `[3/6] Dispatching subagents…`
|
|
56
|
-
- `[4/6] Running autonomous review gates…`
|
|
57
|
-
- `[5/6] Reconciling merges…`
|
|
58
|
-
- `[6/6] Updating artifacts + reporting…`
|
|
59
|
-
|
|
60
|
-
## Orchestration Lifecycle
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
plan.md
|
|
64
|
-
│
|
|
65
|
-
▼
|
|
66
|
-
┌─────────────────────────────────────┐
|
|
67
|
-
│ 1. Read Plan + Identify Units │
|
|
68
|
-
│ - Parse phases/tasks │
|
|
69
|
-
│ - Check parallel-safe markers │
|
|
70
|
-
│ - Respect HiLL checkpoint gates │
|
|
71
|
-
└──────────────┬──────────────────────┘
|
|
72
|
-
│
|
|
73
|
-
▼
|
|
74
|
-
┌─────────────────────────────────────┐
|
|
75
|
-
│ 2. Bootstrap Worktrees │
|
|
76
|
-
│ - Per-unit worktree via │
|
|
77
|
-
│ oat-worktree-bootstrap-auto │
|
|
78
|
-
│ - Branch naming convention │
|
|
79
|
-
└──────────────┬──────────────────────┘
|
|
80
|
-
│
|
|
81
|
-
▼
|
|
82
|
-
┌─────────────────────────────────────┐
|
|
83
|
-
│ 3. Dispatch Subagents (parallel) │
|
|
84
|
-
│ - Scoped objectives per unit │
|
|
85
|
-
│ - File boundary constraints │
|
|
86
|
-
│ - Implementation + self-review │
|
|
87
|
-
└──────────────┬──────────────────────┘
|
|
88
|
-
│
|
|
89
|
-
▼
|
|
90
|
-
┌─────────────────────────────────────┐
|
|
91
|
-
│ 4. Autonomous Review Gate │
|
|
92
|
-
│ - Spec compliance check │
|
|
93
|
-
│ - Code quality check │
|
|
94
|
-
│ - Fix-loop retry on failure │
|
|
95
|
-
└──────────────┬──────────────────────┘
|
|
96
|
-
│
|
|
97
|
-
▼
|
|
98
|
-
┌─────────────────────────────────────┐
|
|
99
|
-
│ 5. Fan-In Reconciliation │
|
|
100
|
-
│ - Merge units in task-ID order │
|
|
101
|
-
│ - Integration verification │
|
|
102
|
-
│ - Conflict classification │
|
|
103
|
-
└──────────────┬──────────────────────┘
|
|
104
|
-
│
|
|
105
|
-
▼
|
|
106
|
-
┌─────────────────────────────────────┐
|
|
107
|
-
│ 6. Report + Artifact Update │
|
|
108
|
-
│ - Update implementation.md │
|
|
109
|
-
│ - Update plan.md review rows │
|
|
110
|
-
│ - Pause at HiLL checkpoint │
|
|
111
|
-
└─────────────────────────────────────┘
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Process
|
|
115
|
-
|
|
116
|
-
### Step 0: Resolve Active Project and Persist Subagent Defaults
|
|
117
|
-
|
|
118
|
-
Resolve active project via `oat config get activeProject` (stored in `.oat/config.local.json`) and read `state.md`.
|
|
119
|
-
|
|
120
|
-
Persist required runtime defaults in `state.md` frontmatter:
|
|
121
|
-
|
|
122
|
-
- `oat_execution_mode: subagent-driven`
|
|
123
|
-
- `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
124
|
-
- Write orchestration defaults only when keys are missing (never overwrite existing values):
|
|
125
|
-
- `oat_orchestration_merge_strategy: merge`
|
|
126
|
-
- `oat_orchestration_retry_limit: 2`
|
|
127
|
-
- `oat_orchestration_baseline_policy: strict`
|
|
128
|
-
- `oat_orchestration_unit_granularity: phase`
|
|
129
|
-
|
|
130
|
-
### Step 1: Read Plan and Identify Parallelizable Units
|
|
131
|
-
|
|
132
|
-
Read `plan.md` and classify each phase/task:
|
|
133
|
-
|
|
134
|
-
**Parallelization eligibility:**
|
|
135
|
-
|
|
136
|
-
- Only tasks/phases explicitly marked `parallel-safe` (or determined by orchestrator to have no file-level dependencies) are fanned out.
|
|
137
|
-
- Default: sequential execution (same as `oat-project-implement`).
|
|
138
|
-
- Orchestrator must verify no overlapping file modifications between parallel units.
|
|
139
|
-
|
|
140
|
-
**Unit granularity:**
|
|
141
|
-
|
|
142
|
-
- Default: phase-level (all tasks within a phase run in one unit).
|
|
143
|
-
- Optional: task-level (individual tasks as separate units).
|
|
144
|
-
|
|
145
|
-
**HiLL checkpoint gating:**
|
|
146
|
-
|
|
147
|
-
- Read `oat_plan_hill_phases` from `plan.md` frontmatter.
|
|
148
|
-
- Listed phases are where the orchestrator pauses **after completing them**, not before.
|
|
149
|
-
- Example: if `oat_plan_hill_phases: ["p04"]`, phases p01-p04 all execute, then orchestrator pauses after p04 completes. Phases p01-p03 have no checkpoint pause.
|
|
150
|
-
- Example: if `oat_plan_hill_phases: ["p02", "p04"]`, orchestrator runs p01-p02, pauses after p02 completes, then after approval runs p03-p04 and pauses after p04 completes.
|
|
151
|
-
|
|
152
|
-
### Step 2: Bootstrap Worktrees Per Unit
|
|
153
|
-
|
|
154
|
-
For each eligible unit, invoke `oat-worktree-bootstrap-auto`:
|
|
155
|
-
|
|
156
|
-
**Branch naming convention:**
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
{project-name}/{unit-id}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Example: `autonomous-orchestration/p02-t01`
|
|
163
|
-
|
|
164
|
-
**Base ref:** The orchestration branch (the branch from which the orchestrator runs).
|
|
165
|
-
|
|
166
|
-
**Baseline policy:** Configurable per run (default: `strict`).
|
|
167
|
-
|
|
168
|
-
If any bootstrap fails under `strict` policy, exclude that unit and report the failure.
|
|
169
|
-
|
|
170
|
-
### Step 3: Dispatch Subagents
|
|
171
|
-
|
|
172
|
-
For each bootstrapped unit, dispatch a subagent via the `Task` tool with:
|
|
173
|
-
|
|
174
|
-
**Scoped objective:**
|
|
175
|
-
|
|
176
|
-
- The specific plan task(s) assigned to this unit.
|
|
177
|
-
- Full task text from `plan.md` including steps, files, and verification commands.
|
|
178
|
-
|
|
179
|
-
**File boundaries:**
|
|
180
|
-
|
|
181
|
-
- Explicit list of files the subagent may create/modify (from plan task `Files:` section).
|
|
182
|
-
- Subagent must not modify files outside its boundary.
|
|
183
|
-
|
|
184
|
-
**Context provided to subagent:**
|
|
185
|
-
|
|
186
|
-
- Project name and path.
|
|
187
|
-
- Task specification from plan.
|
|
188
|
-
- Relevant design/spec context (if available).
|
|
189
|
-
- Commit convention from plan.
|
|
190
|
-
|
|
191
|
-
**Expected deliverables from subagent:**
|
|
192
|
-
|
|
193
|
-
- Implementation summary (what changed, behavior-level).
|
|
194
|
-
- Test results (pass/fail, coverage).
|
|
195
|
-
- Changed files inventory.
|
|
196
|
-
- Self-review observations.
|
|
197
|
-
- Commit SHA(s).
|
|
198
|
-
|
|
199
|
-
### Step 4: Autonomous Review Gate
|
|
200
|
-
|
|
201
|
-
After each implementer subagent completes, run a mandatory reviewer gate as a **peer subagent** and record the verdict map entry before any merge decision.
|
|
202
|
-
|
|
203
|
-
**Reviewer dispatch mechanism (required):**
|
|
204
|
-
|
|
205
|
-
1. Dispatch `oat-reviewer` as a peer subagent (`subagent_type: "oat-reviewer"`) against the same unit worktree.
|
|
206
|
-
2. Provide reviewer context:
|
|
207
|
-
- Unit scope (files changed in unit branch/worktree).
|
|
208
|
-
- Project artifacts (`plan.md`, `spec.md`, `design.md` when available).
|
|
209
|
-
- Review type: `code`.
|
|
210
|
-
3. Reviewer writes artifact to:
|
|
211
|
-
- `reviews/{unit-id}-gate-review.md`
|
|
212
|
-
4. Orchestrator reads the artifact and extracts stage verdict + finding severities.
|
|
213
|
-
|
|
214
|
-
**Stage 1: Spec compliance**
|
|
215
|
-
|
|
216
|
-
- Verify implementation matches plan task specification.
|
|
217
|
-
- Check: all planned files created/modified, verification commands pass, no scope creep.
|
|
218
|
-
- Anchor findings to code locations (file:line).
|
|
219
|
-
|
|
220
|
-
**Stage 2: Code quality**
|
|
221
|
-
|
|
222
|
-
- Only runs if spec compliance passes.
|
|
223
|
-
- Check: tests passing, lint clean, type-check clean, no Critical/Important findings.
|
|
224
|
-
- Severity classification: Critical, Important, Medium, Minor (4-tier, consistent with receive skills).
|
|
225
|
-
|
|
226
|
-
**Pass criteria:**
|
|
227
|
-
|
|
228
|
-
- No Critical or Important findings across both stages.
|
|
229
|
-
- All verification commands from plan pass.
|
|
230
|
-
|
|
231
|
-
**Fail handling — fix-loop dispatch (required):**
|
|
232
|
-
|
|
233
|
-
1. On review failure, dispatch a fix implementer subagent in the same worktree.
|
|
234
|
-
2. Provide fix input:
|
|
235
|
-
- Review artifact path (`reviews/{unit-id}-gate-review.md`)
|
|
236
|
-
- Critical/Important findings list
|
|
237
|
-
- Original unit task specification
|
|
238
|
-
3. After fix subagent completes, re-dispatch reviewer peer subagent.
|
|
239
|
-
4. Repeat until pass or retry limit (`--retry-limit`, default 2) is exhausted.
|
|
240
|
-
5. If retry limit is exhausted:
|
|
241
|
-
- mark unit as `failed`
|
|
242
|
-
- set disposition to `excluded`
|
|
243
|
-
- record unresolved findings in orchestration log
|
|
244
|
-
|
|
245
|
-
**Verdict map (source of truth for Step 5):**
|
|
246
|
-
|
|
247
|
-
```yaml
|
|
248
|
-
unit_id: '{unit-id}'
|
|
249
|
-
reviewer_stage: spec | quality
|
|
250
|
-
verdict: pass | fail
|
|
251
|
-
retry_count: N
|
|
252
|
-
review_artifact: 'reviews/{unit-id}-gate-review.md'
|
|
253
|
-
findings:
|
|
254
|
-
critical: []
|
|
255
|
-
important: []
|
|
256
|
-
medium: []
|
|
257
|
-
minor: []
|
|
258
|
-
disposition: merged | excluded | skipped
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Step 5: Fan-In Reconciliation
|
|
262
|
-
|
|
263
|
-
Merge passing units back into the orchestration branch. Before executing any merge, apply the hard pre-merge verdict gate.
|
|
264
|
-
|
|
265
|
-
**Pre-merge verdict gate (required):**
|
|
266
|
-
|
|
267
|
-
For each unit eligible for merge, check its verdict map entry:
|
|
268
|
-
|
|
269
|
-
1. **No verdict entry exists** → set disposition to `skipped`, reason `review_gate_missing`. Refuse merge. Log: "Unit {unit-id} skipped: no reviewer verdict recorded."
|
|
270
|
-
2. **Verdict is not `pass`** → set disposition to `excluded`, reason `review_gate_failed`. Refuse merge. Log: "Unit {unit-id} excluded: reviewer verdict is {verdict}, not pass."
|
|
271
|
-
3. **Verdict is `pass`** → unit may proceed to merge.
|
|
272
|
-
|
|
273
|
-
Only units with `verdict == pass` in the verdict map enter the merge loop below. All other units are reported in the orchestration run log with their disposition and reason.
|
|
274
|
-
|
|
275
|
-
**Merge ordering:** Deterministic by task ID (ascending). Example: p02-t01 before p02-t02.
|
|
276
|
-
|
|
277
|
-
**Default strategy: merge**
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
git checkout {orchestration-branch}
|
|
281
|
-
git merge --no-ff {unit-branch} -m "merge({unit-id}): {summary}"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
**Fallback strategy: cherry-pick**
|
|
285
|
-
If merge produces conflicts:
|
|
286
|
-
|
|
287
|
-
1. Abort the merge.
|
|
288
|
-
2. Attempt cherry-pick of individual unit commits.
|
|
289
|
-
3. If cherry-pick also conflicts: classify and report for manual resolution.
|
|
290
|
-
|
|
291
|
-
**Integration verification (after each merge):**
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
pnpm test
|
|
295
|
-
pnpm lint
|
|
296
|
-
pnpm type-check
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
If integration verification fails after a merge:
|
|
300
|
-
|
|
301
|
-
1. Revert the merge.
|
|
302
|
-
2. Mark the unit as `conflict` and report.
|
|
303
|
-
3. Continue with remaining units.
|
|
304
|
-
|
|
305
|
-
**Conflict classification:**
|
|
306
|
-
|
|
307
|
-
- `file-level`: Same file modified by multiple units.
|
|
308
|
-
- `semantic`: Different files but conflicting behavior.
|
|
309
|
-
- `integration`: Individual units pass but combined result fails.
|
|
310
|
-
|
|
311
|
-
### Step 6: Report and Update Artifacts
|
|
312
|
-
|
|
313
|
-
**Logging is append-only.** Each orchestration run appends a new subsection inside `implementation.md`'s `## Orchestration Runs` section (between the `<!-- orchestration-runs-start -->` and `<!-- orchestration-runs-end -->` markers). Never overwrite or reorder prior run entries.
|
|
314
|
-
|
|
315
|
-
**Template location:** `.oat/templates/implementation.md` includes the `## Orchestration Runs` section with sentinel markers. The orchestrator appends new entries before the `<!-- orchestration-runs-end -->` marker.
|
|
316
|
-
|
|
317
|
-
**Append this block for each run:**
|
|
318
|
-
|
|
319
|
-
```markdown
|
|
320
|
-
### Run {N} — {YYYY-MM-DD HH:MM}
|
|
321
|
-
|
|
322
|
-
**Branch:** {orchestration-branch}
|
|
323
|
-
**Policy:** baseline={policy}, merge={strategy}, retry-limit={N}
|
|
324
|
-
**Units:** {N} dispatched, {N} passed, {N} failed, {N} conflicts
|
|
325
|
-
|
|
326
|
-
#### Unit Outcomes
|
|
327
|
-
|
|
328
|
-
| Unit | Status | Commits | Tests | Review | Disposition |
|
|
329
|
-
| ---- | ------ | ------- | ----- | ------------------------- | ----------- |
|
|
330
|
-
| {id} | pass | {sha} | pass | pass | merged |
|
|
331
|
-
| {id} | fail | {sha} | pass | fail (quality, retry 2/2) | excluded |
|
|
332
|
-
|
|
333
|
-
#### Review Interaction Log
|
|
334
|
-
|
|
335
|
-
**{unit-id}:**
|
|
336
|
-
|
|
337
|
-
- **Reviewer dispatch:** peer subagent (`oat-reviewer`)
|
|
338
|
-
- **Review artifact:** `reviews/{unit-id}-gate-review.md`
|
|
339
|
-
- **review_gate_executed:** true
|
|
340
|
-
- **Spec compliance:** pass (0 findings)
|
|
341
|
-
- **Code quality:** fail → fix → pass (1 Important fixed, retry 1/2)
|
|
342
|
-
- **Fix-loop iterations:** 1 of 2 — fixed: [finding-ids]; unresolved: none
|
|
343
|
-
- **Verdict:** pass
|
|
344
|
-
- **Disposition:** merged
|
|
345
|
-
|
|
346
|
-
#### Merge Outcomes
|
|
347
|
-
|
|
348
|
-
| Order | Unit | Strategy | Result | Integration |
|
|
349
|
-
| ----- | ---- | ----------- | ------ | ----------- |
|
|
350
|
-
| 1 | {id} | merge | clean | tests pass |
|
|
351
|
-
| 2 | {id} | cherry-pick | clean | tests pass |
|
|
352
|
-
|
|
353
|
-
#### Outstanding Items
|
|
354
|
-
|
|
355
|
-
- {conflict descriptions or manual follow-ups, or "None"}
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
**Dispatch manifest logging:** The dispatch script outputs a `log_path` field pointing to `implementation.md` so the orchestrator knows where to append run results. This field is informational — the orchestrator reads it and handles the actual write.
|
|
359
|
-
|
|
360
|
-
**Update `plan.md` review table:**
|
|
361
|
-
|
|
362
|
-
- Autonomous review results map to the plan's review rows.
|
|
363
|
-
- Status follows existing lifecycle: `pending` → `received` → `fixes_added` → `fixes_completed` → `passed`.
|
|
364
|
-
- Autonomous reviews that pass set status to `passed` with date and artifact reference.
|
|
365
|
-
|
|
366
|
-
**Update `state.md`:**
|
|
367
|
-
|
|
368
|
-
- Advance `oat_current_task` to the next unprocessed task.
|
|
369
|
-
- Update `oat_last_commit` to the final merge commit.
|
|
370
|
-
- `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
371
|
-
|
|
372
|
-
**HiLL checkpoint pause:**
|
|
373
|
-
|
|
374
|
-
- If the phase that just completed is a configured HiLL checkpoint, pause execution.
|
|
375
|
-
- Report: what completed, what's next, and prompt for user approval to continue.
|
|
376
|
-
|
|
377
|
-
## Policy Flags
|
|
378
|
-
|
|
379
|
-
All policies have sensible defaults. Override per-run via CLI flags or persist in `state.md` when `subagent-driven` mode is selected.
|
|
380
|
-
|
|
381
|
-
### Policy Table
|
|
382
|
-
|
|
383
|
-
| Flag | Type | Default | Description |
|
|
384
|
-
| -------------------- | --------------------------- | -------- | ------------------------------------------------------------ |
|
|
385
|
-
| `--merge-strategy` | `merge` \| `cherry-pick` | `merge` | Default merge strategy for fan-in reconciliation. |
|
|
386
|
-
| `--retry-limit` | integer (0-5) | `2` | Max fix-loop retries per unit before marking failed. |
|
|
387
|
-
| `--baseline-policy` | `strict` \| `allow-failing` | `strict` | Passed to `oat-worktree-bootstrap-auto` for baseline checks. |
|
|
388
|
-
| `--dry-run` | boolean | `false` | Run plan analysis and unit identification without execution. |
|
|
389
|
-
| `--unit-granularity` | `phase` \| `task` | `phase` | Fan-out granularity: phase-level or task-level units. |
|
|
390
|
-
|
|
391
|
-
### Merge Strategy Policy
|
|
392
|
-
|
|
393
|
-
| Strategy | Behavior | When to Use |
|
|
394
|
-
| ------------- | --------------------------------------------- | --------------------------------------------------------------- |
|
|
395
|
-
| `merge` | `git merge --no-ff` per unit in task-ID order | Default; clean parallel branches with no overlapping files |
|
|
396
|
-
| `cherry-pick` | Cherry-pick individual commits per unit | Fallback when merge conflicts; finer-grained conflict isolation |
|
|
397
|
-
|
|
398
|
-
**Interaction:** If `merge` fails for a unit, automatically falls back to `cherry-pick` regardless of the configured strategy. If `cherry-pick` also fails, the unit is classified as `conflict` and reported for manual resolution.
|
|
399
|
-
|
|
400
|
-
### Retry Policy
|
|
401
|
-
|
|
402
|
-
| Retry Limit | Behavior |
|
|
403
|
-
| ----------- | ---------------------------------------------------------------------- |
|
|
404
|
-
| `0` | No retries; first review failure marks unit as failed |
|
|
405
|
-
| `1-5` | Dispatch implementer to fix, re-run failed review stage, up to N times |
|
|
406
|
-
|
|
407
|
-
**Interaction with review gate:** Each retry dispatches a fresh implementer subagent with the review findings. The same review stage (spec or quality) re-runs. If the stage that previously passed is invalidated by fixes, both stages re-run.
|
|
408
|
-
|
|
409
|
-
### Baseline Policy
|
|
410
|
-
|
|
411
|
-
Passed through to `oat-worktree-bootstrap-auto`. See that skill's policy documentation for details.
|
|
412
|
-
|
|
413
|
-
| Policy | Orchestration Behavior |
|
|
414
|
-
| --------------- | ----------------------------------------------------- |
|
|
415
|
-
| `strict` | Failed bootstrap excludes unit from dispatch |
|
|
416
|
-
| `allow-failing` | Failed bootstrap emits warning; unit still dispatched |
|
|
417
|
-
|
|
418
|
-
### HiLL Checkpoint Mapping
|
|
419
|
-
|
|
420
|
-
**Source of truth:** `oat_plan_hill_phases` in `plan.md` frontmatter.
|
|
421
|
-
|
|
422
|
-
**Behavior:**
|
|
423
|
-
|
|
424
|
-
1. Orchestrator reads `oat_plan_hill_phases` at the start of each run.
|
|
425
|
-
2. After completing all tasks in a listed checkpoint phase, orchestrator pauses.
|
|
426
|
-
3. Pause means: complete all in-flight units (including the checkpoint phase itself), reconcile, report, then wait for user approval.
|
|
427
|
-
4. If `oat_plan_hill_phases` is empty, default behavior is to pause after every phase boundary (same as `oat-project-implement`).
|
|
428
|
-
|
|
429
|
-
**Key semantic: listed phases are where you stop AFTER completing them, not before.** `["p03"]` means "complete p03, then pause" — not "pause before starting p03."
|
|
430
|
-
|
|
431
|
-
**Example:**
|
|
432
|
-
|
|
433
|
-
```yaml
|
|
434
|
-
oat_plan_hill_phases: ['p03']
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
- p01, p02, and p03: orchestrator may fan out and reconcile without pausing between them.
|
|
438
|
-
- After p03 completes: orchestrator pauses, reports progress, waits for user.
|
|
439
|
-
- If there are phases after p03, they resume after approval.
|
|
440
|
-
- If p03 is the last phase, this is equivalent to "stop only at the end of implementation."
|
|
441
|
-
|
|
442
|
-
**Interaction with parallel execution:** HiLL checkpoints partition the plan into "runs". Within each run, phases may execute in parallel if eligible. The checkpoint boundary fires after the listed phase completes — all units up to and including the checkpoint phase must complete before the pause.
|
|
443
|
-
|
|
444
|
-
### Policy Persistence
|
|
445
|
-
|
|
446
|
-
When this skill is invoked, `subagent-driven` mode and orchestration defaults can be persisted in `state.md` frontmatter:
|
|
447
|
-
|
|
448
|
-
```yaml
|
|
449
|
-
oat_execution_mode: subagent-driven
|
|
450
|
-
oat_orchestration_merge_strategy: merge
|
|
451
|
-
oat_orchestration_retry_limit: 2
|
|
452
|
-
oat_orchestration_baseline_policy: strict
|
|
453
|
-
oat_orchestration_unit_granularity: phase
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
CLI flags override persisted values for that run and also update the persisted value.
|
|
457
|
-
|
|
458
|
-
## Dry-Run Mode
|
|
459
|
-
|
|
460
|
-
When `--dry-run` is specified:
|
|
461
|
-
|
|
462
|
-
- Execute Steps 1-2 (plan read + unit identification) fully.
|
|
463
|
-
- Skip Steps 3-5 (no subagent dispatch, no merge).
|
|
464
|
-
- Report: identified units, worktree plan, estimated parallelism.
|
|
465
|
-
- No code changes, no commits, no artifact updates.
|
|
466
|
-
|
|
467
|
-
## Review Skill Compatibility
|
|
468
|
-
|
|
469
|
-
The autonomous review gate (Step 4) operates alongside — not in place of — the existing manual review skills (`oat-project-review-provide` and `oat-project-review-receive`).
|
|
470
|
-
|
|
471
|
-
### Scope Separation
|
|
472
|
-
|
|
473
|
-
| Review Skill | Scope | Trigger |
|
|
474
|
-
| ---------------------------- | ----------------------------------------- | -------------------------------------------------- |
|
|
475
|
-
| Autonomous gate (Step 4) | Per-unit (phase or task level) | Automatic after subagent completion |
|
|
476
|
-
| `oat-project-review-provide` | Per-phase, final, or range | User-invoked or `oat-project-implement` final gate |
|
|
477
|
-
| `oat-project-review-receive` | Processes review findings into plan tasks | User-invoked after review artifact exists |
|
|
478
|
-
|
|
479
|
-
### Autonomous Gate vs Manual Review
|
|
480
|
-
|
|
481
|
-
The autonomous gate is a **fast, binary quality check** (pass/fail per unit). It does not replace the richer manual review:
|
|
482
|
-
|
|
483
|
-
- **Autonomous gate findings** use the same `Critical`/`Important`/`Medium`/`Minor` 4-tier severity model as receive skills, but are limited to what automated checks and spec-diffing can detect.
|
|
484
|
-
- **Manual review findings** use the same 4-tier taxonomy with deeper semantic analysis.
|
|
485
|
-
- If a unit passes the autonomous gate and merges, it is still subject to manual review via `oat-project-review-provide`.
|
|
486
|
-
|
|
487
|
-
### plan.md Review Table Integration
|
|
488
|
-
|
|
489
|
-
Autonomous review results update the `plan.md` Reviews table using the same status lifecycle:
|
|
490
|
-
|
|
491
|
-
| Autonomous Outcome | plan.md Status |
|
|
492
|
-
| ---------------------------------- | ------------------------------------------- |
|
|
493
|
-
| All units in scope pass gate | `passed` (with date and artifact reference) |
|
|
494
|
-
| Some units fail, fixes dispatched | `fixes_added` |
|
|
495
|
-
| Fix loop exhausted, units excluded | `fixes_completed` (excluded units noted) |
|
|
496
|
-
|
|
497
|
-
**Rules:**
|
|
498
|
-
|
|
499
|
-
- Autonomous reviews write to phase-level rows (e.g., `p01`, `p02`) — not per-task rows.
|
|
500
|
-
- The `final` review row is **never** set by the autonomous gate. The `final` row is reserved for the project-wide final review gate managed by `oat-project-implement` Step 14 or manual invocation of `oat-project-review-provide code final`.
|
|
501
|
-
- If a manual review is requested after orchestration (e.g., `oat-project-review-provide code p02`), it may update the same row — the manual review takes precedence.
|
|
502
|
-
|
|
503
|
-
### Final Gate Preservation
|
|
504
|
-
|
|
505
|
-
After orchestration completes all phases:
|
|
506
|
-
|
|
507
|
-
1. Orchestrator updates `implementation.md` and `state.md` with completion status.
|
|
508
|
-
2. The `final` review in `plan.md` remains `pending`.
|
|
509
|
-
3. The user (or `oat-project-implement` Step 14) must invoke `oat-project-review-provide code final` separately.
|
|
510
|
-
4. This ensures the final review sees the fully reconciled codebase, not just individual unit outputs.
|
|
511
|
-
|
|
512
|
-
### Artifact Compatibility
|
|
513
|
-
|
|
514
|
-
Autonomous review verdicts are logged in `implementation.md` `## Orchestration Runs` sections (not as standalone review artifacts in `reviews/`). If manual follow-up review is needed:
|
|
515
|
-
|
|
516
|
-
- `oat-project-review-provide` writes its artifact to `reviews/` as usual.
|
|
517
|
-
- `oat-project-review-receive` processes that artifact into plan tasks as usual.
|
|
518
|
-
- The orchestration log in `implementation.md` provides context but does not interfere.
|
|
519
|
-
|
|
520
|
-
## Constraints
|
|
521
|
-
|
|
522
|
-
- **Never** use `AskUserQuestion` during execution between HiLL checkpoints.
|
|
523
|
-
- **Never** merge a unit without an explicit pass verdict from the reviewer gate.
|
|
524
|
-
- **Always** dispatch reviewer as a peer subagent (`oat-reviewer`), not nested or inline.
|
|
525
|
-
- **Never** silently lose work — failed units are reported, not deleted.
|
|
526
|
-
- **Never** bypass existing `plan.md` review table semantics.
|
|
527
|
-
- **Never** set the `final` review row to `passed` from the autonomous gate.
|
|
528
|
-
- **Always** use deterministic merge ordering (by task ID).
|
|
529
|
-
- **Always** run integration verification after each merge.
|
|
530
|
-
|
|
531
|
-
## Usage Patterns
|
|
532
|
-
|
|
533
|
-
See `examples/` for detailed walkthroughs with plan excerpts and expected artifact output:
|
|
534
|
-
|
|
535
|
-
| Pattern | File | Description |
|
|
536
|
-
| --------------- | ------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
537
|
-
| Simple Parallel | `examples/pattern-parallel-phases.md` | Two independent phases run in parallel and merge cleanly |
|
|
538
|
-
| HiLL Checkpoint | `examples/pattern-hill-checkpoint.md` | Phases run through a checkpoint phase, user reviews after it completes, then continues |
|
|
539
|
-
|
|
540
|
-
## Success Criteria
|
|
541
|
-
|
|
542
|
-
- All eligible units dispatched and executed in isolated worktrees.
|
|
543
|
-
- Two-stage review gate enforced per unit.
|
|
544
|
-
- Passing units merged in deterministic order with integration verification.
|
|
545
|
-
- Failed units excluded with actionable reports.
|
|
546
|
-
- All outcomes logged to `implementation.md` with full traceability.
|
|
547
|
-
- `plan.md` review table updated consistently with existing lifecycle.
|
|
548
|
-
- Final review gate preserved for separate invocation post-orchestration.
|
|
549
|
-
- Execution pauses at configured HiLL checkpoints.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Usage Pattern: Mixed Parallel with HiLL Checkpoint
|
|
2
|
-
|
|
3
|
-
Phases run up to and including a checkpoint phase, then user reviews before continuing.
|
|
4
|
-
|
|
5
|
-
## Plan Excerpt
|
|
6
|
-
|
|
7
|
-
```yaml
|
|
8
|
-
---
|
|
9
|
-
oat_plan_hill_phases: ['p02']
|
|
10
|
-
---
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```markdown
|
|
14
|
-
## Phase 1: Data Layer
|
|
15
|
-
|
|
16
|
-
### Task p01-t01: Create database schema
|
|
17
|
-
|
|
18
|
-
**Files:**
|
|
19
|
-
|
|
20
|
-
- Create: `src/db/schema.ts`
|
|
21
|
-
- Create: `src/db/migrations/001.sql`
|
|
22
|
-
|
|
23
|
-
## Phase 2: Business Logic (HiLL checkpoint)
|
|
24
|
-
|
|
25
|
-
### Task p02-t01: Create validation rules
|
|
26
|
-
|
|
27
|
-
**Files:**
|
|
28
|
-
|
|
29
|
-
- Create: `src/validation/rules.ts`
|
|
30
|
-
- Create: `src/validation/rules.test.ts`
|
|
31
|
-
|
|
32
|
-
## Phase 3: API Layer
|
|
33
|
-
|
|
34
|
-
### Task p03-t01: Create REST endpoints using schema + validation
|
|
35
|
-
|
|
36
|
-
**Files:**
|
|
37
|
-
|
|
38
|
-
- Create: `src/api/endpoints.ts`
|
|
39
|
-
- Modify: `src/db/schema.ts` (import types)
|
|
40
|
-
- Modify: `src/validation/rules.ts` (wire to endpoints)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Orchestration Flow
|
|
44
|
-
|
|
45
|
-
1. **Dispatch manifest** identifies p01 and p02 as parallel-safe.
|
|
46
|
-
2. p02 is the HiLL checkpoint — orchestrator will pause **after p02 completes**, not before.
|
|
47
|
-
3. **Parallel execution** of p01 and p02 proceeds as in the simple pattern.
|
|
48
|
-
4. **Reconciliation** merges p01 and p02.
|
|
49
|
-
5. **HiLL pause** — orchestrator reports:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
Orchestration paused at HiLL checkpoint: Phase 2
|
|
53
|
-
|
|
54
|
-
Completed:
|
|
55
|
-
- Phase 1: Data Layer (2 tasks, all passed, merged)
|
|
56
|
-
- Phase 2: Business Logic (1 task, passed, merged)
|
|
57
|
-
|
|
58
|
-
Next: Phase 3 — API Layer (1 task)
|
|
59
|
-
Note: Phase 3 modifies files from both Phase 1 and Phase 2.
|
|
60
|
-
|
|
61
|
-
Continue? (y/n)
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
6. After user approval, p03 executes (may run as single-thread since it touches files from prior phases).
|
|
65
|
-
|
|
66
|
-
## Key Behaviors
|
|
67
|
-
|
|
68
|
-
- **Checkpoint fires after the listed phase completes.** `["p02"]` means "complete p02, then pause" — not "pause before p02."
|
|
69
|
-
- **All units up to and including the checkpoint phase** must complete and reconcile before the pause fires.
|
|
70
|
-
- **Post-checkpoint phases** may resume with either parallel or sequential execution depending on file dependencies.
|
|
71
|
-
- **User approval** is interactive (`AskUserQuestion`) — this is the one allowed interaction point during orchestration.
|
|
72
|
-
- **State persistence:** If the session ends at the checkpoint, `state.md` reflects the pause state and can be resumed.
|
|
73
|
-
|
|
74
|
-
## Expected Artifact Output
|
|
75
|
-
|
|
76
|
-
In `implementation.md`, the orchestration run shows completion up to the checkpoint:
|
|
77
|
-
|
|
78
|
-
```markdown
|
|
79
|
-
### Run 1 — 2026-02-17 14:30
|
|
80
|
-
|
|
81
|
-
**Branch:** project-impl
|
|
82
|
-
**Policy:** baseline=strict, merge=merge, retry-limit=2
|
|
83
|
-
**Units:** 2 dispatched, 2 passed, 0 failed, 0 conflicts
|
|
84
|
-
|
|
85
|
-
... (unit outcomes as in simple pattern) ...
|
|
86
|
-
|
|
87
|
-
#### Outstanding Items
|
|
88
|
-
|
|
89
|
-
- HiLL checkpoint reached: Phase 3 awaiting user approval
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
After user approves and p03 executes:
|
|
93
|
-
|
|
94
|
-
```markdown
|
|
95
|
-
### Run 2 — 2026-02-17 15:00
|
|
96
|
-
|
|
97
|
-
**Branch:** project-impl
|
|
98
|
-
**Policy:** baseline=strict, merge=merge, retry-limit=2
|
|
99
|
-
**Units:** 1 dispatched, 1 passed, 0 failed, 0 conflicts
|
|
100
|
-
|
|
101
|
-
#### Unit Outcomes
|
|
102
|
-
|
|
103
|
-
| Unit | Status | Commits | Tests | Review | Disposition |
|
|
104
|
-
| ---- | ------ | ------- | ----- | ------ | ----------- |
|
|
105
|
-
| p03 | pass | ghi9012 | pass | pass | merged |
|
|
106
|
-
|
|
107
|
-
#### Outstanding Items
|
|
108
|
-
|
|
109
|
-
- None
|
|
110
|
-
```
|