@open-agent-toolkit/cli 0.1.76 → 0.2.1

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.
@@ -17,7 +17,7 @@ This page covers CLI commands that manage bundled OAT tool packs and installed O
17
17
 
18
18
  - `core` - foundational diagnostics and docs access (`oat-doctor`, `oat-docs`)
19
19
  - `docs` - docs and agent-instructions governance workflows
20
- - `workflows` - project lifecycle skills, the project subagent-dispatch adapter, wrap-up reporting, reviewer agents, and core project templates
20
+ - `workflows` - project lifecycle skills, wave-program orchestration (`oat-wave-program`, `oat-wave-execute`), the project subagent-dispatch adapter, wrap-up reporting, reviewer agents, and core project templates
21
21
  - `ideas` - lightweight ideation and promotion flows
22
22
  - `utility` - review and repo-maintenance helpers plus the provider-neutral subagent-dispatch engine
23
23
  - `project-management` - file-backed backlog/reference skills plus backlog, roadmap, current-state, file-per-record decision, and AGENTS-guide templates
@@ -13,6 +13,7 @@ Use this section when you want explicit project artifacts, stable task IDs, revi
13
13
 
14
14
  - [Ideas Workflow](ideas/index.md) - Lightweight idea capture, brainstorming, and promotion into tracked projects when the work becomes concrete.
15
15
  - [Workflow & Projects](projects/index.md) - Lifecycle, artifacts, reviews, PR flow, and repository analysis.
16
+ - [Wave Workflows](wave-workflows.md) - Program-level coordination for executing a corpus of external plans as ordered wrapper projects.
16
17
  - [Skills](skills/index.md) - Workflow-oriented skill discovery and use-case routing.
17
18
 
18
19
  ## What This Section Is
@@ -27,6 +27,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
27
27
  - Turn a repo audit, maintainability review, backlog review, backlog directory, or backlog item into standalone external implementation plans: `oat-repo-improve`. Plans land under `.oat/repo/reference/external-plans/`; execute them directly or optionally pass one to `oat-project-import-plan` for tracked OAT execution.
28
28
  - Work on docs surfaces: `authoring-docs` (general documentation baseline), `oat-docs-authoring` (targeted OAT/Fumadocs authoring), `oat-docs-bootstrap` (guided bootstrap of a new docs app), `oat-docs-analyze`, `oat-docs-apply`, and `oat-project-document`
29
29
  - Generate a shipping digest or scheduled recap: `oat-wrap-up`
30
+ - Run a wave program over a corpus of external plans: `oat-wave-program` (durable program artifact: new/refresh/wave-close) and `oat-wave-execute` (one wave as a wrapper project) — see [Wave Workflows](../wave-workflows.md)
30
31
  - Research a topic in depth: `deep-research`
31
32
  - Analyze an artifact, codebase, or document: `analyze`
32
33
  - Compare options with domain-aware dimensions: `compare`
@@ -71,6 +72,8 @@ Use this section when you want to choose the right OAT skill for a task. If you
71
72
  - `oat-project-document`
72
73
  - `oat-wrap-up`
73
74
  - `oat-project-complete`
75
+ - `oat-wave-program`
76
+ - `oat-wave-execute`
74
77
 
75
78
  === "Ideas"
76
79
 
@@ -0,0 +1,77 @@
1
+ ---
2
+ title: Wave Workflows
3
+ description: How OAT coordinates a corpus of external plans into waves while preserving project-lifecycle ownership and human judgment.
4
+ ---
5
+
6
+ # Wave Workflows
7
+
8
+ A wave is a program layer above the per-project OAT lifecycle. It groups external implementation plans into an ordered delivery unit, then runs that unit as a wrapper OAT project. The wrapper uses the normal project lifecycle rather than replacing it.
9
+
10
+ Use wave workflows when a plan corpus is too large to execute as one project and needs durable sequencing across multiple projects, worktree groups, and merges.
11
+
12
+ ## The Two Wave Skills
13
+
14
+ The workflow pack provides two complementary skills:
15
+
16
+ - `oat-wave-program` 1.1.0 maintains the durable execution-program artifact over the full plan corpus. Its `new` mode inventories the corpus, verifies the coverage invariant, and records the orchestrator-composed, operator-approved first program; `refresh` adds newly landed plans to the artifact and records the orchestrator's re-composition of waves not yet started; and `wave-close` records a completed wave. Composing waves is the orchestrating agent's judgment; the skill records the result.
17
+ - `oat-wave-execute` 1.5.0 runs one wave. It owns the repeatable mechanical layer: wrapper-project scaffolding, branch conventions, worktree bootstrap, briefs, gates, merge choreography, bookkeeping cadence, and closeout order.
18
+
19
+ `oat-wave-program` records which plans belong to each wave. `oat-wave-execute` consumes that mapping and executes one wave through the project lifecycle.
20
+
21
+ ## Mechanical Work and Judgment
22
+
23
+ The ownership split is load-bearing. The skills automate mechanics, but the orchestrator retains judgment.
24
+
25
+ The skills own:
26
+
27
+ - integration and phase branch naming
28
+ - wrapper-project scaffolding
29
+ - worktree bootstrap
30
+ - merge choreography
31
+ - artifact and ledger bookkeeping
32
+ - repeatable verification and closeout sequencing
33
+
34
+ The orchestrator owns:
35
+
36
+ - wave and parallel-group composition
37
+ - review-finding dispositions
38
+ - verification of load-bearing worker claims
39
+ - merge-order decisions under live drift
40
+ - cross-lane and end-of-run synthesis
41
+ - all user checkpoints
42
+
43
+ Do not treat a generated grouping or a mechanically successful lane as a substitute for these decisions.
44
+
45
+ ## Composition With Project Implementation
46
+
47
+ Each wave is scaffolded as a quick-mode wrapper project. Its plan points to the source plans while preserving their requirements, and `oat-project-implement` remains the lifecycle owner for phase execution, independent review, bounded fixes, checkpoints, and project state.
48
+
49
+ For plan-declared parallel groups, `oat-wave-execute` invokes its bundled `scripts/bootstrap-group.sh` helper. The helper wraps the standard worktree bootstrap flow, creates phase worktrees at an explicit base, initializes each worktree, checks provider-view parity, and reports structured status. `oat-project-implement` then dispatches and verifies each phase in its assigned worktree. The wave layer owns the serialized fan-in and integration gates after those phases pass.
50
+
51
+ This composition keeps the responsibilities separate:
52
+
53
+ 1. `oat-wave-program` records the program and wave membership.
54
+ 2. `oat-wave-execute` scaffolds and coordinates one wrapper project.
55
+ 3. `oat-project-implement` executes that project's phases.
56
+ 4. `oat-wave-program wave-close` updates the durable program after the wave merges.
57
+
58
+ ## Execution-Program Artifact Format
59
+
60
+ The execution-program artifact is durable reference material under `.oat/repo/reference/external-plans/`. It is not an executable plan or an `oat-project-import-plan` target.
61
+
62
+ The current format contains:
63
+
64
+ - **Wave table:** one row per source plan, including its link, source index, assigned wave, ordering or dependency notes, and status (`pending`, `in-wave`, `done`, `deferred`, or `dropped`).
65
+ - **Coverage invariant:** every plan in every source plan index appears in exactly one row. A deferred or dropped plan includes a reason and re-entry trigger; an omitted plan is an error.
66
+ - **Wave sections:** the theme, lane list, intra-wave ordering, and cross-wave prerequisites for each wave.
67
+ - **Status ledger:** each wave advances from composed to in-progress to merged, with the wrapper-project link, PR, merge SHA, and completion-record link recorded as they become available.
68
+
69
+ > **Important:** This format is documented as a description, not a stable contract. Contract work is deferred in **BL-260718-document-execution-program — Document execution-program artifact as stable OAT contract**, grouped with **BL-260718-add-oat-wave-lifecycle-cli — Add oat wave lifecycle CLI command family**.
70
+
71
+ Until that grouped work ships, consumers should follow the bundled skill and template rather than depending on an independently versioned schema.
72
+
73
+ ## Related
74
+
75
+ - [Project lifecycle](projects/lifecycle.md)
76
+ - [Implementation execution](projects/implementation-execution.md)
77
+ - [Project artifacts](projects/artifacts.md)
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.76",
3
- "docs-config": "0.1.76",
4
- "docs-theme": "0.1.76",
5
- "docs-transforms": "0.1.76"
2
+ "cli": "0.2.1",
3
+ "docs-config": "0.2.1",
4
+ "docs-theme": "0.2.1",
5
+ "docs-transforms": "0.2.1"
6
6
  }
@@ -0,0 +1,317 @@
1
+ ---
2
+ name: oat-wave-execute
3
+ version: 1.5.0
4
+ description: Use when executing a wave of external implementation plans as a wrapper OAT project — scaffolding, drift refresh, parallel worktree groups, briefs, gates, merge choreography, and closeout.
5
+ argument-hint: '<wave-id> [plan-names...] (e.g. wave-2 http-listener-before-indexing ...)'
6
+ disable-model-invocation: false
7
+ user-invocable: true
8
+ allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
9
+ ---
10
+
11
+ # Execute a Wave of External Plans
12
+
13
+ Run one **wave** of the external-plan program as a wrapper OAT project. This skill
14
+ owns the **mechanical layer** — everything that waves 0–1 proved stable and that
15
+ hand-re-derivation repeatedly broke. It deliberately does NOT own judgment.
16
+
17
+ Provenance: extracted per `DR-260713-extract-oat-wave-execute` after the source
18
+ program's waves 0–1 and hardened across its waves 2–5.
19
+
20
+ Log every friction/deviation to the project's `orchestration-log.md` so later
21
+ waves inherit evidence, not anecdotes.
22
+
23
+ Historical `DR-*` and `BL-*` slugs in this skill (including the provenance
24
+ record above) are evidence citations in the source program's repository; they
25
+ are not required artifacts in the consuming repo.
26
+
27
+ ## Ownership Boundary
28
+
29
+ **This skill owns (mechanical):** integration/phase branch naming, worktree
30
+ bootstrap, wave-boundary drift refresh, wrapper-project scaffold (from the bundled
31
+ templates), brief templates, gate-prompt template + scaling, merge choreography,
32
+ bookkeeping cadence, closeout sequence.
33
+
34
+ **The orchestrator owns (judgment — never delegate to this skill or to workers):**
35
+ parallel-group composition from live recon evidence, review-finding dispositions,
36
+ verification of load-bearing worker claims, merge-order decisions under live drift,
37
+ cross-lane synthesis, the end-of-run synthesis, and all user checkpoints.
38
+
39
+ ## Standing Rules (violations caused every wave-1 incident)
40
+
41
+ 1. **Branch naming:** integration branch `wave-N-execution`; phase branches
42
+ `wave-N/pNN`. Phase branches MUST NOT nest under the integration branch name
43
+ (git refs cannot be both leaf and directory).
44
+ 2. **Merge commits use a conventional type:** `chore(pNN): merge wave-N/pNN — <lane> (review passed)`.
45
+ Bare `merge(...)` fails commitlint. Keep headers ≤ 100 chars.
46
+ 3. **Clean orchestrator tree before group merges** — a dirty unrelated file leaves
47
+ `git merge --no-ff` uncommitted and drags the full hook chain into recovery.
48
+ Gate reviewers now COMMIT their own artifacts (waves 2–3 evidence): keep the
49
+ tree clean around gate runs and expect a gate-authored commit on return.
50
+ 4. **Pre-declare CUMULATIVE churn in every brief:** declarations cover everything
51
+ landed since each source plan's AUTHORED COMMIT (drift checks compare against
52
+ that commit, not the group base), naming files + rough regions. Zero false
53
+ drift-STOPs across 32 consecutive briefed lanes through wave 4
54
+ (DR-260715-cumulative-churn-manifests).
55
+ 5. **Resolve full SHAs with `git rev-parse`** — never hand-expand short SHAs.
56
+ 6. **Gate scope must fit the timeout:** bound wrapper-plan gate reviewers to the
57
+ wrapper artifacts + the drift-refresh record (not all N source plans), or raise
58
+ the gate timeout. On a gate timeout, check the project `reviews/` directory for
59
+ a completed artifact carrying the gate `runId` BEFORE re-running. For larger
60
+ waves (~6+ lanes), prefer per-phase gates over one monolithic final gate; if a
61
+ final gate must cover the whole wave, scope its prompt to the integration
62
+ diff plus the review-chain artifacts, not a re-review of every lane.
63
+ 7. **Guard every formatter-ignored-file × staged-glob interaction:** a
64
+ single-glob staged-file task can fail when every matched file is ignored by
65
+ the repo's formatter. Audit every glob task and pair canonical-file
66
+ exclusions with the staged-task's matching ignore filter (source-program
67
+ example: oxfmt exited non-zero for ignored `*.md`/`*.json`, requiring both
68
+ `.oxfmtrc.json` `ignorePatterns` and `.lintstagedrc.mjs` filtering).
69
+ 8. **Gate timeout diagnostics** (the upstream stdin-hang fix landed in oat
70
+ 0.1.65 — gate children now get `stdin: 'ignore'`; the historical
71
+ `< /dev/null` workaround is retired and harmless if still present):
72
+ timeout + ZERO output bytes = launch defect (do not spend remediation
73
+ attempts re-running unchanged); timeout + a complete artifact = late
74
+ completion (recover the artifact by `runId` per rule 6). Verify the CLI is
75
+ ≥0.1.65 (`oat --version`) before dropping the workaround on a new host.
76
+ 9. **Verified bookkeeping edits** (`DR-260713-bookkeeping-table-mutations`):
77
+ never mutate plan/implementation status tables with exact-string replacement —
78
+ oxfmt re-padding makes it silently no-op. Use anchored regex + a substitution
79
+ count assertion + a post-state grep, every time. This discipline caught its
80
+ own subsequent no-ops twice in wave 2; treat an assert failure as normal
81
+ operation, not an incident.
82
+ 10. **Integration gates after every fan-in:** they are the only detector for
83
+ cumulative-timing defect classes. Never skip them because every lane passed
84
+ independently; the wave-5 embed-teardown defect was caught only after fan-in.
85
+
86
+ Plus inherited invariants: commit-verification via `git log` before retrying after
87
+ any ambiguous hook outcome; every agent runs the repo's formatter on markdown it
88
+ writes; follow the repo's runtime/environment setup before package commands;
89
+ repair native-dependency ABI mismatches using the repo's documented rebuild
90
+ procedure; rebuild edited workspace-package output before running consumer tests
91
+ (stale output mimics real failures). Source-program examples were `pnpm
92
+ format:fix`, `nvm use`, and `pnpm rebuild -r better-sqlite3` on
93
+ `NODE_MODULE_VERSION` errors.
94
+
95
+ ## Inputs
96
+
97
+ - `<wave-id>` — e.g. `wave-2`. Derives project `wave-N-execution`, branches per
98
+ rule 1.
99
+ - Lane list: resolve from the live execution-program artifact
100
+ (`.oat/repo/reference/external-plans/*-execution-program.md`, owned by
101
+ `oat-wave-program`); fall back to the plan indexes' wave hints only when no
102
+ program artifact exists. Verify every named plan file exists before
103
+ scaffolding; a missing file is a STOP (report, don't guess).
104
+ - Concurrency ceiling: default **3** worktrees (operator-set; revisit per wave).
105
+
106
+ ## Process
107
+
108
+ ### Step 1: Preflight
109
+
110
+ 1. From the repo root on up-to-date `main`: `git checkout -b wave-N-execution`.
111
+ 2. Follow the repo's runtime/environment setup, install dependencies, and run
112
+ its build/type baseline gates (source-program example: `nvm use && pnpm
113
+ install --frozen-lockfile`, rebuild `better-sqlite3` if Node changed, then
114
+ `pnpm build && pnpm type-check`).
115
+ 3. Record `BASE_SHA=$(git rev-parse HEAD)`.
116
+
117
+ ### Step 2: Wave-boundary drift refresh (recon dispatch)
118
+
119
+ Dispatch ONE economical recon subagent (read-only) over all wave plans:
120
+
121
+ - Re-run each plan's `## Drift check` against `BASE_SHA`; classify
122
+ PASS / MINOR-DRIFT (describe) / STOP (quote the plan's own condition + evidence).
123
+ - AUDIT each plan's drift-check FILE COVERAGE against its stated scope: a plan
124
+ whose implementation surface includes files its drift-check command omits gets
125
+ a wrapper rule-1 addendum (wave-2 p07 precedent — the gap became a mandatory
126
+ in-worktree extension and the anticipated conflict never materialized).
127
+ - Extract each plan's COMPLETE write-surface list and mechanically intersect
128
+ every pair — flag every file written by 2+ plans, however minor (this feeds
129
+ group composition; include generated files like `apps/documentation/index.md`
130
+ when plans run docs gates, and CLI/help/parity files that many lanes touch).
131
+ - Return a compact per-plan table + shared-surfaces section. Conclusions only.
132
+
133
+ A tripped STOP parks that lane at plan time (recorded in the wrapper plan; lane
134
+ excluded from groups) — never mid-run. **Reconciliation contract:** when recon
135
+ reveals a stale plan premise, the reconciliation must be NON-NARROWING (WHERE
136
+ the work happens may change; WHAT must be true may not), recorded exactly once
137
+ in the Drift Refresh Record with pointer-only references elsewhere — a
138
+ reconciliation that waives a source-plan requirement is a plan-gate Important
139
+ (wave-4 evidence).
140
+
141
+ ### Step 3: Scaffold the wrapper project
142
+
143
+ 1. `oat project new wave-N-execution --mode quick --no-commit`.
144
+ 2. **Verify scaffold substitution AND advance the lifecycle** in `state.md`.
145
+ On oat ≥0.1.65, verify that the basic scaffold placeholders
146
+ (`{ OAT_HILL_CHECKPOINTS }`, `{ OAT_PHASE }`, `{ OAT_WORKFLOW_MODE }`) were
147
+ already substituted; fix them only if unexpected survivors remain. The
148
+ lifecycle advance and wave-specific values remain orchestrator-owned:
149
+ `oat_dispatch_policy` (managed/high unless the operator says otherwise),
150
+ `associated_issues` (the wave's backlog items),
151
+ **`oat_parallel_execution: true`**, and — once plan.md is written —
152
+ **`oat_phase: plan` + `oat_phase_status: complete`**. Also refresh the
153
+ state.md BODY prose (Status/Current Phase/Artifacts/Progress/Next Milestone)
154
+ — frontmatter alone is not enough; two waves hit body-drift findings.
155
+ 3. Write `plan.md` from `assets/wrapper-plan-template.md` — pointer-only tasks,
156
+ the wrapper execution contract verbatim, drift-refresh record marked
157
+ **non-authoritative recon evidence**, HiLL at the final phase (confirm against
158
+ `workflow.hillCheckpointDefault`). **Template directive hygiene:** the
159
+ templates' `{ curly-brace }` placeholders AND their authoring directives
160
+ (e.g. "Keep both code + artifact rows below") are instantiation instructions —
161
+ substitute/apply them and REMOVE them from the instantiated artifact; a
162
+ surviving directive is reviewer-visible noise (sol wave-2 finding class).
163
+ 4. Write `discovery.md` (inherited contract + this wave's decisions) and
164
+ `orchestration-log.md` from `assets/orchestration-log-template.md` (day one).
165
+ 5. **[JUDGMENT] Compose parallel groups** from the recon write surfaces: groups of
166
+ ≤ ceiling, write-disjoint within a group; shared-file plans in different groups.
167
+ A lane that must run alone (merges-first, or a solo finale) stays UNGROUPED —
168
+ ungrouped phases execute sequentially in plan order, and `validate-plan`
169
+ REJECTS singleton groups. Cross-model review steps on
170
+ locking/security/containment/dependency lanes. Recon must intersect ALL
171
+ per-plan write surfaces mechanically, not just headline files (wave-3 g1
172
+ missed a two-lane CLI-file overlap that merged conflict-free only by region
173
+ luck).
174
+ 6. `oat project validate-plan --project-path <path>`, run the repo's formatter
175
+ over the project dir (source-program example: `pnpm format:fix`), and commit
176
+ the scaffold.
177
+
178
+ ### Step 4: Plan gate
179
+
180
+ Run the cross-runtime artifact gate with a **bounded** prompt (rule 6): review the
181
+ wrapper artifacts for plan invariants, contract consistency, frontmatter validity,
182
+ and whether any task restates/narrows its source plan — the external plans are
183
+ immutable inputs, NOT review targets. Disposition findings in-artifact
184
+ (gate-invoked artifact review), commit, and proceed at `fixes_completed` per
185
+ wave-0/1 precedent.
186
+
187
+ ### Step 5: Execute via `oat-project-implement`
188
+
189
+ The lifecycle skill owns execution. This skill contributes the templates it uses:
190
+
191
+ - **Worktree bootstrap:** run
192
+ `scripts/bootstrap-group.sh <wave-prefix> <BASE_SHA> pNN...` — e.g.
193
+ `scripts/bootstrap-group.sh wave-2 $(git rev-parse HEAD) p01 p02 p03`
194
+ (wraps the `oat-worktree-bootstrap-auto` contract: create at explicit base,
195
+ propagate local config, verify base ancestry, repo bootstrap and
196
+ proportionate baseline via the `OAT_WAVE_BOOTSTRAP_CMD` /
197
+ `OAT_WAVE_BASELINE_CMD` env hooks — a pnpm-shaped repo defaults to
198
+ `pnpm run worktree:init` / `pnpm type-check`, any other repo skips the step
199
+ with a STATUS line — verify provider-view parity with the root checkout,
200
+ structured STATUS lines; as of 1.3.0 the script relocates its
201
+ `.bootstrap-*.log` files into `$TMPDIR` itself).
202
+ When lanes carry provider review steps that require worktree trust, pre-trust
203
+ the new paths using that provider's configuration (for Codex, the
204
+ source-program example is `~/.codex/config.toml`).
205
+ - **Implementer briefs:** self-contained Phase Scope (resolver-stamped dispatch
206
+ fields), the contract pointer ("your ENTIRE contract is <external plan>; nothing
207
+ in the wrapper narrows it"), **region-level expected-churn pre-declaration**
208
+ (rule 4: name the churned file AND the region vs the lane's target region —
209
+ three-for-three effective in wave-2 group 2), env rules, DoD gates before
210
+ commit, one commit per task with the plan's message, bundle STOP semantics
211
+ where applicable (`DR-260713-bundle-stop-semantics-park`), the bookkeeping
212
+ boundary (workers never touch `.oat/projects/`), and the structured PHASE
213
+ REPORT format. Cross-model review steps in briefs name the RUNTIME-RESOLVED
214
+ reviewer (the plan stays provider-neutral; dispatch resolves — currently
215
+ Codex per the source repo's config). Adapt lane-type addenda to the consuming
216
+ repo. Worked source-program examples: "background a previously-inline step"
217
+ lanes budget a full direct-caller audit; new shell scripts honor the repo's
218
+ oldest supported shell; disposal/wiring prefers the framework teardown seam
219
+ (Fastify `onClose` in one lane) over a concurrently restructured file; a
220
+ defaulted schema field (Zod in one lane) budgets type-surface consumer fixes;
221
+ an MCP tool rename moves its expected-tool list, additive snapshot, tool-list
222
+ tests, and version-pin tests together; and time-driven HTTP tests avoid a fake
223
+ clock that freezes the request event loop. These are briefing patterns, not
224
+ requirements for Fastify, vitest, Zod, or MCP.
225
+ - **Reviewer briefs:** read-only, per-phase; checklist = source plan
226
+ `## Review focus`; implementer claims are inputs to VERIFY, not trust.
227
+ Lanes with embedded cross-model reviews get DISPOSITION-VERIFICATION briefs:
228
+ verify each fix and each rejection's parity claim against the cited siblings
229
+ instead of re-reviewing (wave-3 caught a partially-false rejection claim this
230
+ way). Every fix disposition, including a root-verified bounded fix, must
231
+ produce a minimal stored verification record stating what was verified, how
232
+ it was verified, and where the evidence is recorded; the wave-5 final gate
233
+ blocked on exactly this audit gap. For a fix continuation, prefer resuming the
234
+ original implementer handle while it is alive: this is cheaper and retains
235
+ design context. Launch a fresh same-target agent only when that handle is
236
+ gone. Rename/refactor-class revision reviews get a PURITY BAR: diff the
237
+ changed handler bodies against the ORIGINAL at base — tests alone are silent
238
+ on migrated-behavior drift (wave-3 p-rev1 Critical was caught only by this).
239
+ LOGIC-BEARING lanes' reviewers must design ≥1 adversarial probe of their own
240
+ beyond the implementer's pins (DR-260715-adversarial-probe-reviewer: the
241
+ wave-4 overlap-corruption Critical was found ONLY by a reviewer probe —
242
+ every gate and pinned test was green); runtime-
243
+ probe ambiguous behavioral claims; on containment/security surfaces require a
244
+ weaker-anywhere analysis (any input previously rejected that is now accepted is
245
+ Critical). Adapt contract-propagation checks to the lane type; the
246
+ source-program example required a new `DoctorJsonResponse` field to travel with
247
+ diagnostics docs and exact-match doctor JSON tests. Write the artifact to the
248
+ ROOT checkout `reviews/` and run the repo's formatter over it (source-program
249
+ example: `pnpm format:fix`).
250
+ - **Merge choreography:** after all group verdicts — serialized `git merge
251
+ --no-ff` in plan order, rebasing each phase branch on the updated tip first
252
+ (rules 2–3). Immediately before EVERY `git merge`, run `pwd` and
253
+ `git branch --show-current` and assert that they identify the intended repo
254
+ root and integration branch; stop on either mismatch. This closes the
255
+ cwd-persistence wrong-branch failure observed in wave 5. Integration DoD gates
256
+ after fan-in run TO COMPLETION BEFORE any group bookkeeping edits start
257
+ (DR-260714-integration-gates-run-before);
258
+ then the group bookkeeping commit. Before dispatch, inspect every worktree's
259
+ sync commit content and stop on provider-view deletions or unrelated managed
260
+ path churn. This is a **regression guard for the named stale-local-binary
261
+ failure class**: a stale locally resolved `node_modules/.bin/oat` can shadow
262
+ the global CLI and make two desired-state sync versions thrash managed files.
263
+ On any parity mismatch, compare `node_modules/.bin/oat --version` with
264
+ `oat --version`; do not treat it as unexplained toolkit corruption.
265
+ **Conflict-resolution contract
266
+ (DR-260715-conflict-resolution-contract):** on rebase/merge conflicts —
267
+ keep-both where lanes appended to shared surfaces; then in-worktree BUILD +
268
+ touched-package suites BEFORE amending (mechanical splices break seams:
269
+ braces, stacked branches, duplicated keys — wave-4 evidence); then inspect
270
+ the amended commit's file stat against the expected list; NEVER `git add -A`
271
+ in a worktree (stale synced local state gets swept). At every
272
+ merge/bookkeeping boundary, run a standing config-integrity check that tracked
273
+ `.oat/config.json` keys remain present; this check originated with
274
+ `BL-260715-investigate-oat-config-json` in the source program's repo. Update
275
+ canonical sections in place, the run-entry table, review rows, and state;
276
+ remove worktrees + branches after merge.
277
+
278
+ ### Step 6: Closeout
279
+
280
+ Follow `oat-project-implement`'s completion route, plus the wave-specific order.
281
+ Run these steps strictly in this numbered sequence. The load-bearing constraint:
282
+ the end-of-run synthesis and its `summary.md` roll-up MUST come before backlog
283
+ archival and before the project-archive seal (`oat-project-complete`) — never
284
+ archive anything first.
285
+
286
+ 1. **Final verification** — integration DoD gates green on the integration branch.
287
+ 2. **End-of-run synthesis in `orchestration-log.md`, then roll it up into
288
+ `summary.md`** (this is the "before any archive step" gate): convention
289
+ verdicts with evidence, adjustments-as-rules for later waves, graduated-entries
290
+ ledger, rolled into `summary.md` `## Workflow Observations`.
291
+ 3. **Serialized backlog archival** — `oat backlog archive` with real summaries,
292
+ one commit.
293
+ 4. **Root final review.**
294
+ 5. **Cross-runtime final gate** — judgment-sweep dispositions; watch for the known
295
+ gate row-stomp on the final Reviews row (restore `passed` if regressed).
296
+ 6. **Pre-approval sequence** per `workflow.postImplementSequence`, then a single
297
+ HiLL. File follow-up-ledger backlog items at closeout (on main post-merge, or
298
+ pre-gate if the operator prefers them in the PR).
299
+ 7. **`oat-project-complete` BEFORE merge** (standing order: review → complete →
300
+ merge; an open PR is expected, not a blocker — the archive-aware PR body sync
301
+ handles it).
302
+ 8. **After the operator merges:** reconcile (squash-merge means content-diff the
303
+ branch vs main; cherry-pick stragglers), reset the working branch, clean stale
304
+ phase branches, and run `oat-wave-program` `wave-close <wave-id>` so the
305
+ program ledger records the merge (PR, SHA, completion-record link) and flips
306
+ the wave's plan rows to `done`.
307
+
308
+ ## Success Criteria
309
+
310
+ - Zero convention re-derivation errors (branch naming, merge types, SHAs, gate
311
+ scoping — the wave-1 incident class).
312
+ - Every lane: drift check honored, one verified commit per task, review round
313
+ dispositioned, DoD + integration gates green.
314
+ - Orchestration log current at every group boundary; synthesis written before
315
+ archive; follow-up ledger graduated.
316
+ - Deviations from THIS skill logged with a skill-abstraction tag — that is the
317
+ evidence signal for future skill revisions.
@@ -0,0 +1,54 @@
1
+ ---
2
+ oat_generated: false
3
+ purpose: orchestration-observations
4
+ oat_last_updated: { YYYY-MM-DD }
5
+ ---
6
+
7
+ # Orchestration Log: wave-N-execution
8
+
9
+ Running log of orchestration and subagent observations for this project. Two
10
+ audiences: (1) evaluating this wave's execution specifically, and (2) collecting
11
+ general feedback on OAT orchestration/tooling and on the `oat-wave-execute` skill
12
+ itself — bugs, friction, and things that worked well.
13
+
14
+ **Logging contract (for the orchestrator and any lifecycle skill touching this
15
+ project):** append an entry whenever something breaks, surprises, requires a
16
+ workaround, or works notably well. Structural entries (dispatch stamps, gate
17
+ results, STOP/park events, bootstrap statuses, disposition maps) are appended as
18
+ one-liners referencing artifacts by path; judgment entries are agent-authored.
19
+ Never delete entries; strike through with a correction note if one turns out
20
+ wrong. Version-stamp tool-related observations. Keep entries short and factual.
21
+ Run { repo formatter write command } (source-program example: `pnpm format:fix`)
22
+ on this file after writing. Tag entries that bear on the
23
+ wave-skill's design with a **Skill signal (strengthens/contradicts/gap):** line —
24
+ those drive the upstream implementation.
25
+
26
+ **Entry format:**
27
+
28
+ ### YYYY-MM-DD · [project | general] · [bug | friction | worked-well | feedback] · <area>
29
+ What happened (1-3 sentences). Impact/workaround. Follow-up (backlog / upstream / none).
30
+
31
+ **Structural entry format (skill-appended):**
32
+
33
+ ### YYYY-MM-DD · structural · <skill> · <scope>
34
+ One-line mirror of the skill's structured output. Reference artifacts by path.
35
+
36
+ ---
37
+
38
+ ## Entries
39
+
40
+ { appended chronologically, append-only }
41
+
42
+ ---
43
+
44
+ ## End-of-run synthesis (pending — do not skip at project completion)
45
+
46
+ At project completion, BEFORE any archive step, the orchestrator writes:
47
+ (1) verdicts on the conventions this wave exercised, with evidence entries cited;
48
+ (2) a ruling on every "Skill signal"-tagged entry — what the `oat-wave-execute`
49
+ skill should change; (3) adjustments adopted for later waves, stated as rules;
50
+ (4) a graduated-entries ledger (backlog IDs / upstream refs / closed-with-evidence
51
+ / open-with-owner).
52
+
53
+ Roll-up ordering (critical): `summary.md` `## Workflow Observations` and any
54
+ repo-level ledger updates happen BEFORE `oat-project-complete` archives this file.
@@ -0,0 +1,157 @@
1
+ ---
2
+ oat_status: complete
3
+ oat_ready_for: oat-project-implement
4
+ oat_blockers: []
5
+ oat_last_updated: { YYYY-MM-DD }
6
+ oat_phase: plan
7
+ oat_phase_status: complete
8
+ oat_plan_hill_phases: ['{ final-phase-id }']
9
+ oat_auto_review_at_hill_checkpoints: true
10
+ oat_plan_parallel_groups: [{ groups of <= ceiling, write-disjoint, from recon }]
11
+ oat_plan_source: quick
12
+ oat_import_reference: null
13
+ oat_import_source_path: null
14
+ oat_import_provider: null
15
+ oat_generated: false
16
+ oat_template: false
17
+ ---
18
+
19
+ # Implementation Plan: wave-N-execution (Wave N external-plan wrapper)
20
+
21
+ > Execute this plan using `oat-project-implement` — groups per
22
+ > `oat_plan_parallel_groups`. Concurrency ceiling: { N } worktrees (operator
23
+ > decision).
24
+
25
+ **Goal:** Execute the { count } Wave N external plans ({ short lane list }) through
26
+ the wave→project wrapper pattern (DR-260713-wave-project-wrapper-over).
27
+
28
+ **Architecture:** Thin wrapper. Each task's **entire and only implementation
29
+ contract** is its external plan under `.oat/repo/reference/external-plans/`. Tasks
30
+ below carry wrapper-owned metadata exclusively: the source-plan path,
31
+ ordering/dependencies, wrapper-level verification gates, the commit convention, and
32
+ review mapping. Nothing in this file restates, narrows, or overrides a source plan.
33
+
34
+ **Commit Convention:** `{type}(p{NN}-t{NN}): {description}` — the external plan
35
+ governs commit content and granularity; the wrapper adds the `pNN-tNN` scope.
36
+
37
+ **Wrapper execution contract (applies to every task):**
38
+
39
+ 1. **Drift check first.** Run the source plan's `## Drift check` against current
40
+ HEAD. A material mismatch (per that plan's own definition) is a STOP. The
41
+ wave-boundary drift refresh (see record below) does not replace the in-worktree
42
+ re-check — the integration tip advances as groups merge.
43
+ 2. **Execute the source plan's `## Implementation steps`** in order with each
44
+ step's embedded Verify gate; honor its `## STOP conditions` verbatim.
45
+ 3. **Confirm the source plan's `## Done criteria`**, then run the full DoD gates:
46
+ { repo env setup commands, then repo test/lint/format/type gates }
47
+ (source-program example: `nvm use` first; `pnpm rebuild -r better-sqlite3` if
48
+ Node changed; `pnpm test && pnpm lint && pnpm format && pnpm type-check`).
49
+ 4. **STOP → BLOCKED at phase level (bundle exception).** A source-plan STOP parks
50
+ the phase (record in `state.md` `oat_blockers` + `implementation.md`); sibling
51
+ phases continue. **Bundle phases:** a STOP parks only the stopped task; the
52
+ implementer records the blocker and continues remaining independent tasks; the
53
+ phase is terminal when every task is completed or parked
54
+ (DR-260713-bundle-stop-semantics-park).
55
+ 5. **Group-dependency rule:** a group starts when every phase of the previous
56
+ group is terminal — merged, or parked with completed commits merged. A park
57
+ never blocks the next group.
58
+ 6. **Merge serialization:** within a group, merge phase branches one at a time in
59
+ plan order, rebasing each on the updated tip first. Name the deliberately
60
+ sequenced shared files here: { shared-file list from recon }.
61
+ 7. **Backlog archival is NOT part of any task** — once, serialized on the
62
+ integration branch after all merges (DR-260713-shared-tracked-surfaces).
63
+ 8. **Phase review checklist = the source plan's `## Review focus`.**
64
+ 9. **Artifact hygiene:** every agent runs { repo formatter write command }
65
+ (source-program example: `pnpm format:fix`) on markdown it writes and reports
66
+ observations for `orchestration-log.md` (workers report; the root appends).
67
+ 10. **Commit verification after ambiguous results:** inspect `git log`/HEAD before
68
+ retrying; record the SHA in `implementation.md`.
69
+
70
+ ## Parallelism
71
+
72
+ { Group composition + rationale. Prefix the recon observations with: }
73
+
74
+ > The recon observations below are **non-authoritative grouping evidence only** —
75
+ > they justify group composition but never constrain a source plan: each source
76
+ > plan's own live location/condition checks govern at execution time.
77
+
78
+ ## Dispatch Profile
79
+
80
+ _No per-phase overrides. Runtime selection applies, capped by the project's named
81
+ dispatch policy in `state.md`; provider-specific model/effort selection is owned by
82
+ runtime resolution, not this plan. Cross-model review requirements are embedded in
83
+ { lanes touching locking/security/containment/dependency surfaces }._
84
+
85
+ ## Drift Refresh Record ({ date }, vs `{ BASE_SHA }`)
86
+
87
+ { Recon results: N PASS / N MINOR-DRIFT / N STOP + one line each. State explicitly
88
+ that this record is non-authoritative recon evidence. }
89
+
90
+ ---
91
+
92
+ ## Phase { NN }: { lane-name } (group { G })
93
+
94
+ **Milestone:** the source plan's `## Done criteria` fully satisfied.
95
+
96
+ ### Task p{NN}-t01: Execute external plan — { lane title }
97
+
98
+ **Source plan (the contract):**
99
+ `.oat/repo/reference/external-plans/{ plan-file }.md`
100
+
101
+ **Ordering:** group { G }; own worktree, parallel with { siblings }. { Grouping
102
+ notes, marked non-authoritative where recon-derived. }
103
+
104
+ **Step 1: Drift check** — per the source plan's `## Drift check`.
105
+
106
+ **Step 2: Execute** the source plan in full.
107
+
108
+ **Step 3: Verify (wrapper gate)**
109
+
110
+ Run: the source plan's `## Done criteria` checks, then the full DoD gates from
111
+ the wrapper execution contract
112
+ Expected: all green.
113
+
114
+ { **Step 4: Cross-model review** — include for locking/security/containment/
115
+ dependency/lifecycle surfaces: before committing, obtain an independent
116
+ cross-model review of the uncommitted diff via the runtime-configured reviewer
117
+ (provider/model/effort owned by dispatch configuration, not this plan);
118
+ disposition every finding in the phase report. }
119
+
120
+ **Step { N }: Commit**
121
+
122
+ ```bash
123
+ git commit -m "{type}(p{NN}-t01): { description }"
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Reviews
129
+
130
+ {Keep both code + artifact rows below. Add additional code rows as needed, but do not delete `spec`/`design`.}
131
+
132
+ | Scope | Type | Status | Date | Artifact |
133
+ | ------ | -------- | ------- | ---- | -------- |
134
+ | p01 | code | pending | - | - |
135
+ | final | code | pending | - | - |
136
+ | plan | artifact | pending | - | - |
137
+ | spec | artifact | pending | - | - |
138
+ | design | artifact | pending | - | - |
139
+
140
+ **Status values:** `pending` → `received` → `fixes_added` → `fixes_completed` → `passed`
141
+
142
+ ## Implementation Complete
143
+
144
+ - [ ] { N }/{ N } phases, { M }/{ M } tasks complete
145
+ - [ ] Every source plan's `## Done criteria` confirmed (recorded in `implementation.md`)
146
+ - [ ] **Serialized backlog bookkeeping** (integration branch, after all merges):
147
+ `oat backlog archive` with real outcome summaries for { backlog IDs }, one commit
148
+ - [ ] Orchestration-log end-of-run synthesis written; roll-up into `summary.md`
149
+ before any archive step
150
+ - [ ] Full DoD gates green on the integration branch
151
+
152
+ ## References
153
+
154
+ - Source plans: the { N } `.oat/repo/reference/external-plans/*.md` files named above
155
+ - Program indexes: `.oat/repo/reference/external-plans/*-plan-index.md`
156
+ - Pattern: `DR-260713-wave-project-wrapper-over`, prior wave summaries in
157
+ `.oat/repo/reference/project-summaries/`
@@ -0,0 +1,195 @@
1
+ #!/bin/bash
2
+ # oat-wave-execute: parallel-group worktree bootstrap.
3
+ # Wraps the oat-worktree-bootstrap-auto contract (normal mode, strict policy).
4
+ # Usage: bootstrap-group.sh <wave-prefix> <base-sha> <phase>...
5
+ # e.g. bootstrap-group.sh wave-2 <full-sha> p01 p02 p03
6
+ # Emits one terminal "STATUS <phase>: status=..." line per phase (plus optional
7
+ # "STATUS <phase>: <step>=skipped ..." informational lines); caller parses those.
8
+ # Repo hooks (repo-neutral): OAT_WAVE_BOOTSTRAP_CMD runs repository bootstrap in
9
+ # each worktree; OAT_WAVE_BASELINE_CMD runs the proportionate baseline check.
10
+ # When unset, a pnpm-shaped repo (pnpm-lock.yaml + matching package.json script)
11
+ # defaults to `pnpm run worktree:init` / `pnpm type-check`; otherwise the step
12
+ # is skipped with a STATUS line.
13
+ set -u
14
+
15
+ usage() {
16
+ echo "Usage: bootstrap-group.sh <wave-prefix> <base-sha> <phase>..." >&2
17
+ echo " e.g. bootstrap-group.sh wave-2 <full-40-hex-sha> p01 p02 p03" >&2
18
+ }
19
+
20
+ provider_view_list() {
21
+ local checkout="$1"
22
+ node - "$checkout/.oat/sync/manifest.json" <<'NODE'
23
+ const fs = require("fs");
24
+ const manifestPath = process.argv[2];
25
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
26
+ const paths = manifest.entries.map((entry) => entry.providerPath).sort();
27
+ process.stdout.write(`${paths.join("\n")}\n`);
28
+ NODE
29
+ }
30
+
31
+ verify_view_parity() {
32
+ local root_checkout="$1"
33
+ local worktree_checkout="$2"
34
+ local root_list
35
+ local worktree_list
36
+ local local_version
37
+ local global_version
38
+
39
+ root_list="$(mktemp "${TMPDIR:-/tmp}/oat-root-views.XXXXXX")" || return 1
40
+ worktree_list="$(mktemp "${TMPDIR:-/tmp}/oat-worktree-views.XXXXXX")" || {
41
+ rm -f "$root_list"
42
+ return 1
43
+ }
44
+
45
+ if ! provider_view_list "$root_checkout" >"$root_list" ||
46
+ ! provider_view_list "$worktree_checkout" >"$worktree_list"; then
47
+ echo "STATUS view-parity=MISMATCH"
48
+ echo " diagnostic: unable to read provider-view lists from sync manifests"
49
+ rm -f "$root_list" "$worktree_list"
50
+ return 1
51
+ fi
52
+
53
+ if cmp -s "$root_list" "$worktree_list"; then
54
+ echo "STATUS view-parity=ok"
55
+ rm -f "$root_list" "$worktree_list"
56
+ return 0
57
+ fi
58
+
59
+ echo "STATUS view-parity=MISMATCH"
60
+ echo " root-only provider views:"
61
+ comm -23 "$root_list" "$worktree_list"
62
+ echo " worktree-only provider views:"
63
+ comm -13 "$root_list" "$worktree_list"
64
+ if [[ -x "$worktree_checkout/node_modules/.bin/oat" ]]; then
65
+ local_version="$("$worktree_checkout/node_modules/.bin/oat" --version 2>&1)"
66
+ else
67
+ local_version="missing"
68
+ fi
69
+ global_version="$(cd "$worktree_checkout" && oat --version 2>&1)"
70
+ echo " node_modules/.bin/oat --version: $local_version"
71
+ echo " oat --version: $global_version"
72
+ rm -f "$root_list" "$worktree_list"
73
+ return 1
74
+ }
75
+
76
+ # Guard: require wave-prefix, base-sha, and at least one phase (3+ args)
77
+ if [[ $# -lt 3 ]]; then
78
+ echo "FATAL: expected <wave-prefix> <base-sha> <phase>... (got $# arg(s))" >&2
79
+ usage
80
+ exit 2
81
+ fi
82
+
83
+ WAVE_PREFIX="$1"; shift
84
+ BASE_SHA="$1"; shift
85
+ PHASES=("$@")
86
+
87
+ # Guard: base must be a full 40-hex commit ID (standing rule 5 — no short SHAs)
88
+ if [[ ! "$BASE_SHA" =~ ^[0-9a-f]{40}$ ]]; then
89
+ echo "FATAL: base '$BASE_SHA' is not a full 40-hex commit ID (use git rev-parse HEAD)" >&2
90
+ usage
91
+ exit 1
92
+ fi
93
+ REPO="$(git rev-parse --show-toplevel)"
94
+ ROOT_CFG="$(cd "$REPO" && oat config get worktrees.root 2>/dev/null || true)"
95
+ ROOT="$REPO/${ROOT_CFG:-.worktrees}"
96
+ # Optional node env setup: source nvm only when present; otherwise honor the
97
+ # already-configured node environment (nvm is a repo convention, not required).
98
+ if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
99
+ source "$HOME/.nvm/nvm.sh" >/dev/null 2>&1
100
+ cd "$REPO" && nvm use >/dev/null 2>&1
101
+ fi
102
+
103
+ # Repo-hook resolution: explicit env hooks win; a pnpm-shaped repo (lockfile +
104
+ # matching package.json script) falls back to its conventional commands;
105
+ # anything else skips the step with a STATUS line.
106
+ has_pnpm_script() {
107
+ [[ -f "$REPO/pnpm-lock.yaml" ]] || return 1
108
+ grep -q "\"$1\"" "$REPO/package.json" 2>/dev/null
109
+ }
110
+ BOOTSTRAP_CMD="${OAT_WAVE_BOOTSTRAP_CMD:-}"
111
+ if [[ -z "$BOOTSTRAP_CMD" ]] && has_pnpm_script "worktree:init"; then
112
+ BOOTSTRAP_CMD="pnpm run worktree:init"
113
+ fi
114
+ BASELINE_CMD="${OAT_WAVE_BASELINE_CMD:-}"
115
+ if [[ -z "$BASELINE_CMD" ]] && has_pnpm_script "type-check"; then
116
+ BASELINE_CMD="pnpm type-check"
117
+ fi
118
+ GROUP_STATUS=0
119
+
120
+ # Guard: the full SHA must resolve to an actual commit in this repo
121
+ if ! git -C "$REPO" cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null; then
122
+ echo "FATAL: base '$BASE_SHA' does not resolve to a commit (use git rev-parse HEAD)"; exit 1
123
+ fi
124
+ # Guard: phase branches must not nest under an existing leaf ref (standing rule 1)
125
+ if git -C "$REPO" show-ref --verify --quiet "refs/heads/$WAVE_PREFIX"; then
126
+ echo "FATAL: branch '$WAVE_PREFIX' exists as a leaf ref; phase branches '$WAVE_PREFIX/pNN' cannot be created"; exit 1
127
+ fi
128
+ # Smoke detection (bootstrap-auto step 1.5)
129
+ if [[ -n "$(git -C "$REPO" ls-tree "$BASE_SHA" -- .oat/smoke-bootstrap.json)" ]]; then
130
+ echo "FATAL: smoke marker present at base; refusing normal bootstrap"; exit 1
131
+ fi
132
+
133
+ for P in "${PHASES[@]}"; do
134
+ BR="$WAVE_PREFIX/$P"
135
+ TP="$ROOT/$BR"
136
+ echo "=== [$P] bootstrap → $TP (base $BASE_SHA) ==="
137
+ if ! git -C "$REPO" worktree add "$TP" -b "$BR" "$BASE_SHA" >/dev/null 2>&1; then
138
+ echo "STATUS $P: status=error reason=worktree-create-failed"; continue
139
+ fi
140
+ # Local-only config propagation (bootstrap-auto step 2.5; the bootstrap hook
141
+ # may also cover these, but propagate first so its tooling sees them). Other
142
+ # repo-local files belong in a consuming repo's own wrapper around this script.
143
+ [[ -f "$REPO/.oat/config.local.json" && ! -f "$TP/.oat/config.local.json" ]] && cp "$REPO/.oat/config.local.json" "$TP/.oat/config.local.json"
144
+ (cd "$TP" && oat local sync "$TP" >/dev/null 2>&1) || true
145
+ # Base verification (bootstrap-auto step 2.7)
146
+ OBS=$(git -C "$TP" rev-parse HEAD)
147
+ if ! git -C "$TP" merge-base --is-ancestor "$BASE_SHA" "$OBS"; then
148
+ echo "STATUS $P: status=failed reason=base-mismatch expected=$BASE_SHA observed=$OBS"; continue
149
+ fi
150
+ # Repository bootstrap (hook-resolved) + proportionate baseline
151
+ if [[ -n "$BOOTSTRAP_CMD" ]]; then
152
+ if ! (cd "$TP" && /bin/bash -c "$BOOTSTRAP_CMD" >"$TP/.bootstrap-init.log" 2>&1); then
153
+ echo "STATUS $P: status=error reason=repository-bootstrap-failed (see $TP/.bootstrap-init.log)"; tail -5 "$TP/.bootstrap-init.log"; continue
154
+ fi
155
+ else
156
+ echo "STATUS $P: bootstrap=skipped reason=no-bootstrap-hook (set OAT_WAVE_BOOTSTRAP_CMD)"
157
+ fi
158
+ if ! verify_view_parity "$REPO" "$TP"; then
159
+ echo "STATUS $P: status=error reason=provider-view-parity-mismatch"; continue
160
+ fi
161
+ if [[ -n "$BASELINE_CMD" ]]; then
162
+ if ! (cd "$TP" && /bin/bash -c "$BASELINE_CMD" >"$TP/.bootstrap-baseline.log" 2>&1); then
163
+ echo "STATUS $P: status=error reason=baseline-verification-failed (see $TP/.bootstrap-baseline.log)"; continue
164
+ fi
165
+ else
166
+ echo "STATUS $P: baseline=skipped reason=no-baseline-hook (set OAT_WAVE_BASELINE_CMD)"
167
+ fi
168
+ # Sync-commit if scoped paths dirty (bootstrap-auto step 4)
169
+ if ! (
170
+ cd "$TP" && git add -A -- .oat/sync/manifest.json .claude .cursor .codex 2>/dev/null
171
+ if ! git diff --cached --quiet 2>/dev/null; then
172
+ if git -c core.hooksPath=/dev/null commit -q -m "chore: run sync"; then
173
+ echo " sync_commit: committed"
174
+ else
175
+ echo " sync_commit: FAILED"
176
+ exit 1
177
+ fi
178
+ else
179
+ echo " sync_commit: skip"
180
+ fi
181
+ ); then
182
+ echo "STATUS $P: status=failed reason=sync-commit"
183
+ GROUP_STATUS=1
184
+ continue
185
+ fi
186
+ # Relocate bootstrap logs out of the worktree (1.3.0: script-owned; callers
187
+ # previously forgot this step)
188
+ LOGDIR="${TMPDIR:-/tmp}/oat-bootstrap-logs/$WAVE_PREFIX-$P"
189
+ mkdir -p "$LOGDIR" && mv "$TP"/.bootstrap-*.log "$LOGDIR"/ 2>/dev/null
190
+ echo " bootstrap_logs: $LOGDIR"
191
+ DIRTY=$(cd "$TP" && git status --porcelain | wc -l | tr -d ' ')
192
+ echo "STATUS $P: status=success worktree=$TP branch=$BR base=$BASE_SHA observed=$OBS git_clean=$([[ $DIRTY == 0 ]] && echo pass || echo "fail($DIRTY)")"
193
+ done
194
+ echo "=== group bootstrap done ==="
195
+ exit "$GROUP_STATUS"
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: oat-wave-program
3
+ version: 1.1.0
4
+ description: Use when decomposing a corpus of external implementation plans into an ordered wave program — coverage inventory, dependency mapping, wave composition, and the durable execution-program artifact that oat-wave-execute consumes and updates.
5
+ argument-hint: '[new|refresh|wave-close <wave-id>] (default: refresh against the current artifact)'
6
+ disable-model-invocation: false
7
+ user-invocable: true
8
+ allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
9
+ ---
10
+
11
+ # Program a Corpus of External Plans into Waves
12
+
13
+ Maintain the **program layer** above `oat-wave-execute`: record how N external
14
+ plans (from one or more plan-generation runs) map into an ordered sequence of
15
+ waves, and keep that mapping durable and current as waves complete.
16
+ `oat-wave-execute` runs ONE wave; this skill records and maintains the
17
+ orchestrator-composed, operator-approved mapping of WHICH plans form each wave.
18
+
19
+ ## Ownership Boundary
20
+
21
+ **This skill owns (mechanical):** the execution-program artifact contract and its
22
+ durable home, the plan-coverage inventory (every plan mapped exactly once or
23
+ explicitly deferred), the wave-status ledger and its update procedure at wave
24
+ boundaries, and the refresh procedure when a new plan batch lands.
25
+
26
+ **The orchestrator owns (judgment — never delegate to this skill or to workers):**
27
+ wave composition itself — theme coherence, dependency ordering, risk balancing
28
+ (don't stack all high-churn lanes in one wave), wave sizing against the operator's
29
+ concurrency ceiling, and the call on when a deferred plan re-enters the program.
30
+
31
+ ## The Artifact
32
+
33
+ **Home:** `.oat/repo/reference/external-plans/<YYYY-MM-DD>-execution-program.md`
34
+ (created from `assets/execution-program-template.md`). One live program artifact
35
+ at a time; a superseding program links its predecessor. It is index-adjacent
36
+ reference material — NOT an executable plan and NOT an `oat-project-import-plan`
37
+ target (same disclaimer as the plan indexes).
38
+
39
+ **Contract:**
40
+
41
+ - **Wave table:** one row per plan — plan link, source index, wave, ordering
42
+ notes (merge-first/solo, hard/soft dependencies), status
43
+ (`pending | in-wave | done | deferred | dropped`).
44
+ - **Coverage invariant (load-bearing):** every plan listed in every
45
+ `*-plan-index.md` appears in exactly one row. Plans deliberately not scheduled
46
+ get `deferred`/`dropped` WITH the reason and re-entry trigger — silence is a
47
+ bug. Verify mechanically (count plans in indexes vs rows) before committing.
48
+ - **Wave sections:** per wave — theme, lane list, intra-wave dependency notes
49
+ (which lane merges first and why), and cross-wave prerequisites ("W4
50
+ token-cost requires W3 permission-policy").
51
+ - **Status ledger:** per wave — composed → in-progress (project link) → merged
52
+ (PR + merge SHA + completion record link). Updated by this skill's
53
+ `wave-close` mode, invoked from `oat-wave-execute` closeout step 8.
54
+
55
+ ## Process
56
+
57
+ ### Mode: `new` (first program for a plan corpus)
58
+
59
+ 1. **Inventory:** read every `*-plan-index.md` under
60
+ `.oat/repo/reference/external-plans/`; extract each plan, its dependency
61
+ notes, and any wave hints the index already records. Verify each plan file
62
+ exists (a dangling index row is a STOP — report, don't guess).
63
+ 2. **Shared-surface scan:** from the indexes' dependency notes (NOT fresh recon —
64
+ the wave-boundary drift refresh in `oat-wave-execute` owns live evidence),
65
+ collect hard orderings (e.g. a tool-family chain), soft orderings (same-file
66
+ churn), and cross-batch seams (shared new modules; first-executed builds).
67
+ 3. **[JUDGMENT] Compose waves:** group by theme + dependency layer, sized so a
68
+ wave's write-disjoint groups fit the operator's concurrency ceiling in 2–3
69
+ dispatch groups. Honor index wave hints unless evidence contradicts them —
70
+ and record the contradiction when it does.
71
+ 4. **Write the artifact** from the template; run the coverage check; present the
72
+ wave map to the operator for approval BEFORE the first wave kicks off
73
+ (program composition is an operator checkpoint, not a silent default).
74
+ 5. Run the repo's formatter over the artifact and commit it (source-program
75
+ examples: `pnpm format:fix`; `docs(pjm): add execution program <date>`).
76
+
77
+ ### Mode: `refresh` (new plan batch, or drift in a pending wave)
78
+
79
+ 1. Diff current indexes against the artifact's rows; add new plans as rows
80
+ (initially `pending`, wave `TBD` unless an index hints placement).
81
+ 2. [JUDGMENT] Re-compose only waves not yet started. Never reshuffle a wave
82
+ that is `in-progress`; a merged wave's row set is frozen history.
83
+ 3. Re-run the coverage check; commit.
84
+
85
+ ### Mode: `wave-close <wave-id>` (called at wave closeout)
86
+
87
+ 1. Flip the wave's plan rows to `done` (or back to `deferred` with reason, for
88
+ lanes parked by a STOP — a parked lane re-enters a later wave explicitly).
89
+ 2. Update the status ledger row: PR, merge SHA, completion-record link.
90
+ 3. Note next-wave unblocks ("W3 merged → W4 token-cost unblocked").
91
+ 4. Commit with the wave's closeout bookkeeping.
92
+
93
+ ## Integration with `oat-wave-execute`
94
+
95
+ - `oat-wave-execute` **Inputs** resolves its lane list from this artifact (falling
96
+ back to index wave hints only when no program artifact exists).
97
+ - `oat-wave-execute` closeout step 8 invokes `wave-close` here.
98
+ - A lane parked mid-wave (source-plan STOP) surfaces in BOTH artifacts: the
99
+ wave project's blocker record and this ledger's `deferred` row.
100
+
101
+ ## Success Criteria
102
+
103
+ - Coverage invariant holds on every commit of the artifact (no silently
104
+ unmapped plan).
105
+ - The program survives session loss: a fresh session can resume wave kickoff
106
+ from the artifact alone, without reconstructing composition from index notes.
107
+ - Wave status ledger is current within one commit of each wave's closeout.
108
+ - Composition changes are recorded with reasons — the artifact shows why a plan
109
+ moved waves, not just that it did.
@@ -0,0 +1,40 @@
1
+ ---
2
+ oat_generated: true
3
+ oat_external_plan_index: false
4
+ oat_execution_program: true
5
+ oat_program_supersedes: { null | path to predecessor program artifact }
6
+ oat_program_indexes:
7
+ - { '.oat/repo/reference/external-plans/<index-file>.md' }
8
+ created: '{ ISO timestamp }'
9
+ ---
10
+
11
+ # Execution Program: { date } ({ corpus description })
12
+
13
+ This artifact is the durable program map for the external-plan corpus listed in
14
+ `oat_program_indexes`. It records wave composition and status. It is not an
15
+ executable plan and is not an `oat-project-import-plan` target — each wave runs
16
+ as a wrapper OAT project via `oat-wave-execute`, and each plan's implementation
17
+ contract remains its immutable plan file.
18
+
19
+ ## Status Ledger
20
+
21
+ | Wave | Theme | Lanes | Status | Record |
22
+ | ---- | --------- | ----- | ----------------------------------- | ------------------------------------- |
23
+ | W{N} | { theme } | { n } | { composed / in-progress / merged } | { project / PR + SHA / summary link } |
24
+
25
+ ## Wave Table (coverage: { N } plans = { N } index rows; verified { date })
26
+
27
+ | Plan | Index | Wave | Ordering notes | Status |
28
+ | ------------------------- | ---------- | ---- | ----------------------------- | ------------------------------------------------- |
29
+ | [{ plan }](./{ file }.md) | { source } | W{N} | { merge-first / after X / — } | { pending / in-wave / done / deferred / dropped } |
30
+
31
+ { Deferred/dropped rows MUST carry reason + re-entry trigger in the notes column. }
32
+
33
+ ## Wave { N }: { theme }
34
+
35
+ - **Lanes:** { list }
36
+ - **Intra-wave ordering:** { which lane merges first/solo and why }
37
+ - **Cross-wave prerequisites:** { what this wave needed from earlier waves; what
38
+ it unblocks later }
39
+ - **Composition rationale:** { theme/risk/sizing judgment, including any index
40
+ wave-hint overridden and why }
@@ -1 +1 @@
1
- {"version":3,"file":"copy-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/copy-helpers.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAuBrB"}
1
+ {"version":3,"file":"copy-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/copy-helpers.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAwBD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAiBrB;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAyBrB"}
@@ -1,7 +1,26 @@
1
- import { rm } from 'node:fs/promises';
1
+ import { chmod, readdir, rm } from 'node:fs/promises';
2
+ import { join } from 'node:path';
2
3
  import { compareVersions } from '../../../init/tools/shared/version.js';
3
4
  import { getSkillVersion } from '../../../shared/frontmatter.js';
4
5
  import { copyDirectory, copySingleFile, dirExists, fileExists } from '../../../../fs/io.js';
6
+ async function chmodFilesExecutable(directory) {
7
+ const entries = await readdir(directory, { withFileTypes: true });
8
+ for (const entry of entries) {
9
+ const path = join(directory, entry.name);
10
+ if (entry.isDirectory()) {
11
+ await chmodFilesExecutable(path);
12
+ }
13
+ else if (entry.isFile()) {
14
+ await chmod(path, 0o755);
15
+ }
16
+ }
17
+ }
18
+ async function ensureNestedScriptsExecutable(destination) {
19
+ const scriptsDirectory = join(destination, 'scripts');
20
+ if (await dirExists(scriptsDirectory)) {
21
+ await chmodFilesExecutable(scriptsDirectory);
22
+ }
23
+ }
5
24
  export async function pathExists(path) {
6
25
  return (await fileExists(path)) || (await dirExists(path));
7
26
  }
@@ -13,9 +32,11 @@ export async function copyDirWithStatus(source, destination, force) {
13
32
  if (exists && force) {
14
33
  await rm(destination, { recursive: true, force: true });
15
34
  await copyDirectory(source, destination);
35
+ await ensureNestedScriptsExecutable(destination);
16
36
  return 'updated';
17
37
  }
18
38
  await copyDirectory(source, destination);
39
+ await ensureNestedScriptsExecutable(destination);
19
40
  return 'copied';
20
41
  }
21
42
  export async function copyFileWithStatus(source, destination, force) {
@@ -35,11 +56,13 @@ export async function copyDirWithVersionCheck(source, destination, force) {
35
56
  const exists = await pathExists(destination);
36
57
  if (!exists) {
37
58
  await copyDirectory(source, destination);
59
+ await ensureNestedScriptsExecutable(destination);
38
60
  return { status: 'copied' };
39
61
  }
40
62
  if (force) {
41
63
  await rm(destination, { recursive: true, force: true });
42
64
  await copyDirectory(source, destination);
65
+ await ensureNestedScriptsExecutable(destination);
43
66
  return { status: 'updated' };
44
67
  }
45
68
  const bundledVersion = await getSkillVersion(source);
@@ -11,7 +11,7 @@ export interface PackMetadata {
11
11
  }
12
12
  export declare const PACK_METADATA: Record<string, PackMetadata>;
13
13
  export declare function resolvePackDefaultScope(packName: string): 'user' | 'project';
14
- export declare const WORKFLOW_SKILLS: readonly ["oat-cursor-cloud-projects", "oat-project-autonomous", "oat-project-capture", "oat-project-clear-active", "oat-project-complete", "oat-project-design", "oat-project-dispatch-subagents", "oat-project-discover", "oat-project-document", "oat-project-implement", "oat-project-import-plan", "oat-project-new", "oat-project-next", "oat-project-open", "oat-project-plan", "oat-project-plan-writing", "oat-project-pr-final", "oat-project-pr-progress", "oat-project-progress", "oat-project-promote-spec-driven", "oat-project-quick-start", "oat-project-reconcile", "oat-project-revise", "oat-project-review-provide", "oat-project-review-provide-remote", "oat-project-review-receive", "oat-project-review-receive-remote", "oat-project-spec", "oat-project-split", "oat-project-summary", "oat-repo-knowledge-index", "oat-worktree-bootstrap", "oat-worktree-bootstrap-auto", "oat-wrap-up"];
14
+ export declare const WORKFLOW_SKILLS: readonly ["oat-cursor-cloud-projects", "oat-project-autonomous", "oat-project-capture", "oat-project-clear-active", "oat-project-complete", "oat-project-design", "oat-project-dispatch-subagents", "oat-project-discover", "oat-project-document", "oat-project-implement", "oat-project-import-plan", "oat-project-new", "oat-project-next", "oat-project-open", "oat-project-plan", "oat-project-plan-writing", "oat-project-pr-final", "oat-project-pr-progress", "oat-project-progress", "oat-project-promote-spec-driven", "oat-project-quick-start", "oat-project-reconcile", "oat-project-revise", "oat-project-review-provide", "oat-project-review-provide-remote", "oat-project-review-receive", "oat-project-review-receive-remote", "oat-project-spec", "oat-project-split", "oat-project-summary", "oat-repo-knowledge-index", "oat-worktree-bootstrap", "oat-worktree-bootstrap-auto", "oat-wave-execute", "oat-wave-program", "oat-wrap-up"];
15
15
  export declare const WORKFLOW_AGENTS: readonly ["oat-codebase-mapper.md", "oat-phase-implementer.md", "oat-reviewer.md"];
16
16
  export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "spec.md", "design.md", "plan.md", "implementation.md", "summary.md", "project-log.md"];
17
17
  export declare const WORKFLOW_SCRIPTS: readonly ["generate-oat-state.sh", "generate-thin-index.sh", "resolve-tracking.sh"];
@@ -1 +1 @@
1
- {"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAKtD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAID,eAAO,MAAM,eAAe,s3BAmClB,CAAC;AAEX,eAAO,MAAM,eAAe,oFAIlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,+HASrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,iLAQd,CAAC;AAEX,eAAO,MAAM,YAAY,kCAAmC,CAAC;AAI7D,eAAO,MAAM,cAAc,2NASjB,CAAC;AAIX,eAAO,MAAM,yBAAyB,sHAK5B,CAAC;AAEX,eAAO,MAAM,4BAA4B,yIAQ/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,aAAc,CAAC;AAItD,eAAO,MAAM,iBAAiB,6BAA8B,CAAC;AAI7D,eAAO,MAAM,eAAe,2EAMlB,CAAC;AAEX,eAAO,MAAM,eAAe,qCAAsC,CAAC"}
1
+ {"version":3,"file":"skill-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/shared/skill-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAKtD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAID,eAAO,MAAM,eAAe,85BAqClB,CAAC;AAEX,eAAO,MAAM,eAAe,oFAIlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,+HASrB,CAAC;AAEX,eAAO,MAAM,gBAAgB,qFAInB,CAAC;AAIX,eAAO,MAAM,WAAW,2FAKd,CAAC;AAIX,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAI/D,eAAO,MAAM,WAAW,iLAQd,CAAC;AAEX,eAAO,MAAM,YAAY,kCAAmC,CAAC;AAI7D,eAAO,MAAM,cAAc,2NASjB,CAAC;AAIX,eAAO,MAAM,yBAAyB,sHAK5B,CAAC;AAEX,eAAO,MAAM,4BAA4B,yIAQ/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,aAAc,CAAC;AAItD,eAAO,MAAM,iBAAiB,6BAA8B,CAAC;AAI7D,eAAO,MAAM,eAAe,2EAMlB,CAAC;AAEX,eAAO,MAAM,eAAe,qCAAsC,CAAC"}
@@ -49,6 +49,8 @@ export const WORKFLOW_SKILLS = [
49
49
  'oat-repo-knowledge-index',
50
50
  'oat-worktree-bootstrap',
51
51
  'oat-worktree-bootstrap-auto',
52
+ 'oat-wave-execute',
53
+ 'oat-wave-program',
52
54
  'oat-wrap-up',
53
55
  ];
54
56
  export const WORKFLOW_AGENTS = [
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/validate-plan/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,UAAU,+BAA+B;IACvC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;CACjE;AAMD,wBAAgB,gCAAgC,CAC9C,SAAS,GAAE,OAAO,CAAC,+BAA+B,CAAM,GACvD,OAAO,CAuET"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/validate-plan/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,UAAU,+BAA+B;IACvC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;CACjE;AAMD,wBAAgB,gCAAgC,CAC9C,SAAS,GAAE,OAAO,CAAC,+BAA+B,CAAM,GACvD,OAAO,CA0ET"}
@@ -10,7 +10,8 @@ const DEFAULT_DEPENDENCIES = {
10
10
  export function createProjectValidatePlanCommand(overrides = {}) {
11
11
  const dependencies = { ...DEFAULT_DEPENDENCIES, ...overrides };
12
12
  return new Command('validate-plan')
13
- .description('Validate plan.md parallelism metadata against the plan phase list')
13
+ .description('Validate plan.md parallelism metadata against the plan phase list; singleton groups are not allowed — run a solo lane as an ungrouped phase (ungrouped phases execute sequentially in plan order)')
14
+ .summary('Validate plan.md parallelism metadata against the plan phase list')
14
15
  .option('--project-path <path>', 'project directory containing plan.md', process.cwd())
15
16
  .action((options, command) => {
16
17
  const context = dependencies.buildCommandContext(readGlobalOptions(command));
@@ -49,7 +49,7 @@ export function validateParallelGroups(groups, phaseIds) {
49
49
  continue;
50
50
  }
51
51
  if (group.length < 2) {
52
- errors.push(`group[${i}] must contain at least 2 phase IDs (singleton groups are not allowed)`);
52
+ errors.push(`group[${i}] must contain at least 2 phase IDs (singleton groups are not allowed — run a solo lane as an ungrouped phase (ungrouped phases execute sequentially in plan order))`);
53
53
  }
54
54
  for (const phaseId of group) {
55
55
  if (typeof phaseId !== 'string') {
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../src/fs/io.ts"],"names":[],"mappings":"AAYA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,YAAY,CAAC,CAuBvB;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAKf"}
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../src/fs/io.ts"],"names":[],"mappings":"AAaA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB5E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,YAAY,CAAC,CAuBvB;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAKf"}
package/dist/fs/io.js CHANGED
@@ -1,4 +1,4 @@
1
- import { mkdir, readdir, readFile, rename, rm, stat, symlink, writeFile, } from 'node:fs/promises';
1
+ import { chmod, mkdir, readdir, readFile, rename, rm, stat, symlink, writeFile, } from 'node:fs/promises';
2
2
  import { dirname, isAbsolute, join, relative } from 'node:path';
3
3
  export async function fileExists(path) {
4
4
  try {
@@ -32,8 +32,12 @@ export async function copyDirectory(src, dest) {
32
32
  continue;
33
33
  }
34
34
  if (entry.isFile()) {
35
+ const sourceStat = await stat(sourcePath);
35
36
  const content = await readFile(sourcePath);
36
- await writeFile(destPath, content);
37
+ await writeFile(destPath, content, { mode: sourceStat.mode });
38
+ // writeFile's mode applies only on creation; chmod covers
39
+ // pre-existing destination files so modes stay in sync.
40
+ await chmod(destPath, sourceStat.mode);
37
41
  }
38
42
  }
39
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.1.76",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "Open Agent Toolkit CLI",
6
6
  "homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
@@ -34,7 +34,7 @@
34
34
  "ora": "^9.0.0",
35
35
  "yaml": "2.8.2",
36
36
  "zod": "^3.25.76",
37
- "@open-agent-toolkit/control-plane": "0.1.76"
37
+ "@open-agent-toolkit/control-plane": "0.2.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.10.0",