@open-agent-toolkit/cli 0.1.5 → 0.1.7

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.
Files changed (84) hide show
  1. package/assets/agents/oat-reviewer.md +10 -1
  2. package/assets/docs/workflows/projects/artifacts.md +17 -0
  3. package/assets/docs/workflows/projects/index.md +3 -0
  4. package/assets/docs/workflows/projects/splitting.md +79 -0
  5. package/assets/docs/workflows/skills/index.md +2 -0
  6. package/assets/public-package-versions.json +4 -4
  7. package/assets/skills/oat-brainstorm/SKILL.md +43 -3
  8. package/assets/skills/oat-project-discover/SKILL.md +72 -8
  9. package/assets/skills/oat-project-implement/SKILL.md +21 -1
  10. package/assets/skills/oat-project-quick-start/SKILL.md +14 -5
  11. package/assets/skills/oat-project-review-provide/SKILL.md +9 -1
  12. package/assets/skills/oat-project-review-receive/SKILL.md +21 -1
  13. package/assets/skills/oat-project-split/SKILL.md +82 -0
  14. package/assets/skills/oat-project-summary/SKILL.md +15 -13
  15. package/assets/templates/implementation.md +5 -5
  16. package/assets/templates/state.md +6 -1
  17. package/assets/templates/summary.md +2 -1
  18. package/dist/__tests__/skills/split-flow-fixtures.d.ts +50 -0
  19. package/dist/__tests__/skills/split-flow-fixtures.d.ts.map +1 -0
  20. package/dist/__tests__/skills/split-flow-fixtures.js +161 -0
  21. package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
  22. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
  23. package/dist/commands/init/tools/shared/skill-manifest.js +1 -0
  24. package/dist/commands/project/complete-discovery/index.d.ts +16 -0
  25. package/dist/commands/project/complete-discovery/index.d.ts.map +1 -0
  26. package/dist/commands/project/complete-discovery/index.js +123 -0
  27. package/dist/commands/project/complete-state/index.d.ts.map +1 -1
  28. package/dist/commands/project/complete-state/index.js +5 -0
  29. package/dist/commands/project/index.d.ts.map +1 -1
  30. package/dist/commands/project/index.js +4 -0
  31. package/dist/commands/project/list.d.ts +6 -0
  32. package/dist/commands/project/list.d.ts.map +1 -1
  33. package/dist/commands/project/list.js +37 -4
  34. package/dist/commands/project/new/scaffold.d.ts.map +1 -1
  35. package/dist/commands/project/new/scaffold.js +4 -0
  36. package/dist/commands/project/open/index.d.ts.map +1 -1
  37. package/dist/commands/project/open/index.js +9 -3
  38. package/dist/commands/project/pause/index.d.ts.map +1 -1
  39. package/dist/commands/project/pause/index.js +7 -1
  40. package/dist/commands/project/split/evaluate-signals.d.ts +8 -0
  41. package/dist/commands/project/split/evaluate-signals.d.ts.map +1 -0
  42. package/dist/commands/project/split/evaluate-signals.js +47 -0
  43. package/dist/commands/project/split/index.d.ts +3 -0
  44. package/dist/commands/project/split/index.d.ts.map +1 -0
  45. package/dist/commands/project/split/index.js +11 -0
  46. package/dist/commands/project/split/run.d.ts +21 -0
  47. package/dist/commands/project/split/run.d.ts.map +1 -0
  48. package/dist/commands/project/split/run.js +231 -0
  49. package/dist/commands/project/split/validate-plan.d.ts +14 -0
  50. package/dist/commands/project/split/validate-plan.d.ts.map +1 -0
  51. package/dist/commands/project/split/validate-plan.js +62 -0
  52. package/dist/commands/shared/frontmatter.d.ts +9 -0
  53. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  54. package/dist/commands/shared/frontmatter.js +46 -0
  55. package/dist/commands/state/generate.d.ts.map +1 -1
  56. package/dist/commands/state/generate.js +38 -6
  57. package/dist/projects/split/child-plan.d.ts +46 -0
  58. package/dist/projects/split/child-plan.d.ts.map +1 -0
  59. package/dist/projects/split/child-plan.js +107 -0
  60. package/dist/projects/split/document-validation.d.ts +14 -0
  61. package/dist/projects/split/document-validation.d.ts.map +1 -0
  62. package/dist/projects/split/document-validation.js +106 -0
  63. package/dist/projects/split/finalize.d.ts +7 -0
  64. package/dist/projects/split/finalize.d.ts.map +1 -0
  65. package/dist/projects/split/finalize.js +32 -0
  66. package/dist/projects/split/resume.d.ts +19 -0
  67. package/dist/projects/split/resume.d.ts.map +1 -0
  68. package/dist/projects/split/resume.js +107 -0
  69. package/dist/projects/split/seed-children.d.ts +9 -0
  70. package/dist/projects/split/seed-children.d.ts.map +1 -0
  71. package/dist/projects/split/seed-children.js +122 -0
  72. package/dist/projects/split/signals.d.ts +10 -0
  73. package/dist/projects/split/signals.d.ts.map +1 -0
  74. package/dist/projects/split/signals.js +18 -0
  75. package/dist/projects/split/validation.d.ts +14 -0
  76. package/dist/projects/split/validation.d.ts.map +1 -0
  77. package/dist/projects/split/validation.js +104 -0
  78. package/dist/projects/split/write-parent.d.ts +16 -0
  79. package/dist/projects/split/write-parent.d.ts.map +1 -0
  80. package/dist/projects/split/write-parent.js +176 -0
  81. package/dist/validation/project-state.d.ts +50 -0
  82. package/dist/validation/project-state.d.ts.map +1 -0
  83. package/dist/validation/project-state.js +279 -0
  84. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-reviewer
3
- version: 1.0.1
3
+ version: 1.0.2
4
4
  description: Unified reviewer for OAT projects - mode-aware verification of requirements/design alignment and code quality. Writes review artifact to disk.
5
5
  tools: Read, Bash, Grep, Glob, Write
6
6
  color: yellow
@@ -32,6 +32,8 @@ Reviews catch issues before they ship:
32
32
 
33
33
  Your review artifact feeds into `oat-project-review-receive`, which converts findings into plan tasks for systematic gap closure.
34
34
 
35
+ Some findings are artifact drift rather than implementation defects. If shipped implementation is defensible but `spec.md`, `design.md`, or `plan.md` is stale, frame the issue as artifact alignment and say which artifact should change. Do not require a code fix solely because the design artifact lagged behind implementation.
36
+
35
37
  ## Inputs
36
38
 
37
39
  You will be given a "Review Scope" block including:
@@ -161,6 +163,11 @@ For each design decision relevant to scope:
161
163
  - Do endpoints match the design?
162
164
  - Are error responses as specified?
163
165
 
166
+ 4. **Artifact drift classification**
167
+ - If implementation diverges from design/spec/plan, decide whether the implementation is wrong or the artifact is stale.
168
+ - When the implementation is defensible, write the finding as stale-artifact alignment guidance instead of a code defect.
169
+ - Include enough rationale for `oat-project-review-receive` to convert the finding into an artifact-alignment task or explicit deferral.
170
+
164
171
  ### Step 6: Verify Code Quality
165
172
 
166
173
  This step applies to **code reviews** only.
@@ -204,6 +211,7 @@ Group findings by severity:
204
211
  - Missing error handling
205
212
  - Significant maintainability issues
206
213
  - Missing tests for important paths
214
+ - Stale spec/design/plan artifact that conflicts with a defensible implementation and should be aligned before closeout
207
215
 
208
216
  **Minor** (fix if time permits)
209
217
 
@@ -211,6 +219,7 @@ Group findings by severity:
211
219
  - Style issues
212
220
  - Minor refactoring opportunities
213
221
  - Documentation gaps
222
+ - Low-impact artifact wording drift where implementation is defensible and the stale wording is unlikely to mislead near-term work
214
223
 
215
224
  ### Step 8: Write Review Artifact
216
225
 
@@ -29,11 +29,28 @@ Mode-sensitive notes:
29
29
  - `reviews/*.md`: phase/final review files
30
30
  - `pr/*.md`: generated PR descriptions
31
31
  - `references/imported-plan.md`: preserved source plan for import mode
32
+ - `references/split-plan.json`: persisted split plan for a coordination parent, used as the durable resume source when `oat-project-split` is interrupted
32
33
 
33
34
  ## Contract
34
35
 
35
36
  Artifacts are the project system of record; automation and routing should derive from these files, not memory.
36
37
 
38
+ ## Coordination parents
39
+
40
+ Project splitting introduces a coordination-only parent artifact. It records shared context and child relationships, but it is not an executable lifecycle project.
41
+
42
+ A coordination parent uses:
43
+
44
+ - `oat_kind: coordination`
45
+ - `oat_phase: decomposition`
46
+ - `oat_phase_status: complete`
47
+
48
+ Coordination parents do not contain executable phase files. `spec.md`, `design.md`, `plan.md`, and `implementation.md` are removed from the parent and represented in state prose as not applicable.
49
+
50
+ The parent still keeps `state.md`, `discovery.md`, and `references/split-plan.json`. Child projects are flat siblings and link back to the parent through state metadata. Each child starts from a distilled discovery seed and must revalidate inherited context before moving beyond discovery/design.
51
+
52
+ See [Project Splitting](splitting.md) for the full parent/child model.
53
+
37
54
  ### plan.md frontmatter
38
55
 
39
56
  `plan.md` carries frontmatter that the implementation skill consumes. Notable fields:
@@ -17,12 +17,14 @@ This sub-section is the deep technical surface for how tracked OAT projects exec
17
17
 
18
18
  - Start with [Lifecycle](lifecycle.md) for the end-to-end flow.
19
19
  - Read [Artifacts](artifacts.md) once you need the file contract behind project execution.
20
+ - Use [Project Splitting](splitting.md) when one discovery or brainstorm should become coordinated child projects.
20
21
  - Use [HiLL Checkpoints](hill-checkpoints.md) when you want to understand pause/approval behavior.
21
22
 
22
23
  ## Common Tasks
23
24
 
24
25
  - Understand lifecycle order and alternate lanes in [Lifecycle](lifecycle.md).
25
26
  - Learn the artifact system of record in [Artifacts](artifacts.md).
27
+ - Split broad scopes into coordination parents and focused children in [Project Splitting](splitting.md).
26
28
  - Understand lifecycle and review transitions in [State Machine](state-machine.md).
27
29
  - Learn review and PR expectations in [Reviews](reviews.md) and [PR Flow](pr-flow.md).
28
30
 
@@ -32,6 +34,7 @@ This sub-section is the deep technical surface for how tracked OAT projects exec
32
34
  - [Design Modes](design-modes.md) - How full design balances collaborative, selective collaborative, and draft-and-review interaction.
33
35
  - [HiLL Checkpoints](hill-checkpoints.md) - Human-in-the-Loop Lifecycle configuration and approval behavior.
34
36
  - [Artifacts](artifacts.md) - What lives in `state.md`, `discovery.md`, `plan.md`, `implementation.md`, and related files.
37
+ - [Project Splitting](splitting.md) - How broad discoveries or brainstorms become coordination parents and child projects.
35
38
  - [State Machine](state-machine.md) - Lifecycle and review status transitions across a project.
36
39
  - [Reviews](reviews.md) - How review request/receive loops work inside OAT projects.
37
40
  - [PR Flow](pr-flow.md) - Progress and final PR generation expectations.
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: Project Splitting
3
+ description: 'How OAT splits broad discoveries or brainstorms into a coordination parent and focused child projects.'
4
+ ---
5
+
6
+ # Project Splitting
7
+
8
+ Use project splitting when one discovery or brainstorming thread turns into several independently shippable projects that should keep shared context but execute separately.
9
+
10
+ `oat-project-split` is the handoff skill for that moment. It creates a durable coordination parent, scaffolds flat sibling child projects, seeds each child with focused discovery context, and activates the first child by dependency or value order.
11
+
12
+ ## When To Split
13
+
14
+ Split when the work has multiple deliverables that can ship independently, no single shared design surface owns all of them, separate PRs are expected, or the scope clearly spans distinct subsystems.
15
+
16
+ Do not split just because a project has many tasks. A large but coherent implementation can stay one project when it has one design surface and one release boundary.
17
+
18
+ ## Entry Paths
19
+
20
+ Splitting can start from either discovery or brainstorming:
21
+
22
+ - **Declared:** the user states multi-project intent up front. `oat-brainstorm` skips detection and hands off to `oat-project-split`.
23
+ - **Detected mid-stream:** `oat-project-discover` evaluates codified split signals during solution-space exploration and prompts when the threshold is crossed.
24
+ - **Detected at convergence:** `oat-project-discover` performs an end-of-discovery scope check, and `oat-brainstorm` can expose a split destination when the accumulated scope is large.
25
+
26
+ Declared non-interactive runs can proceed. Detected non-interactive runs record the split recommendation and fail fast rather than silently creating projects.
27
+
28
+ ## Coordination Parent
29
+
30
+ The parent becomes a coordination artifact, not an implementation project.
31
+
32
+ It stays in place under `.oat/projects/<scope>/<parent>/` with:
33
+
34
+ - `oat_kind: coordination`
35
+ - `oat_phase: decomposition`
36
+ - `oat_phase_status: complete`
37
+ - broad context, split rationale, shared constraints, child registry, and integration sketch
38
+ - `references/split-plan.json` as the durable resume source
39
+
40
+ Coordination parents do not keep executable phase artifacts. They should not contain `spec.md`, `design.md`, `plan.md`, or `implementation.md`.
41
+
42
+ ## Child Projects
43
+
44
+ Children are flat sibling projects under the same projects root. They are not nested under the parent.
45
+
46
+ Each child gets:
47
+
48
+ - parent backlink and sibling links in `state.md`
49
+ - `depends-on` metadata when ordering or dependency constraints exist
50
+ - a seeded `discovery.md` with Origin, Inherited Context, Child Scope, Known Dependencies, Assumptions To Revalidate, Likely Workflow Mode, and Sibling Projects
51
+ - `oat_inherited_context_revalidated: false` until the child revalidates inherited assumptions
52
+
53
+ Only one child is activated immediately. The rest remain parked until opened or resumed.
54
+
55
+ ## Resume And Recovery
56
+
57
+ The split plan is persisted before child writes. If a split is interrupted, resume reads `references/split-plan.json` from the coordination parent instead of reconstructing child inputs from state.
58
+
59
+ Resume requires explicit confirmation and seeds only missing child projects.
60
+
61
+ ## Listing And Dashboard Behavior
62
+
63
+ Completed coordination parents are hidden from default `oat project list` output so normal project lists stay focused on executable work.
64
+
65
+ Use:
66
+
67
+ ```bash
68
+ oat project list --include-coordination
69
+ ```
70
+
71
+ to show them. Completed coordination parents render as `decomposition (complete)` with recommendation `none`.
72
+
73
+ `oat state refresh` also groups completed coordination parents under the repo dashboard's decompositions section.
74
+
75
+ ## Related Pages
76
+
77
+ - [Lifecycle](lifecycle.md)
78
+ - [Artifacts](artifacts.md)
79
+ - [Implementation Execution](implementation-execution.md)
@@ -18,6 +18,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
18
18
  - Resume an existing project: `oat-project-open` and `oat-project-progress`
19
19
  - Execute a ready plan: `oat-project-implement`
20
20
  - Import an existing plan: `oat-project-import-plan`
21
+ - Split a broad discovery or brainstorm into child projects: `oat-project-split`
21
22
  - Retroactively capture existing work: `oat-project-capture`
22
23
  - Run or receive reviews: `oat-project-review-provide`, `oat-project-review-receive`, or the non-project review variants
23
24
  - Capture a scoped, shippable backlog item: `oat-pjm-add-backlog-item` directly when the work is already scoped, or `oat-brainstorm` when the thought hasn't converged yet — the brainstorm dispatcher's "scoped backlog item" destination pre-fills the title / description / acceptance criteria / scope estimate / priority from the conversation and then runs `oat-pjm-add-backlog-item` with confirmed inputs
@@ -53,6 +54,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
53
54
  - `oat-project-design`
54
55
  - `oat-project-plan`
55
56
  - `oat-project-plan-writing`
57
+ - `oat-project-split`
56
58
  - `oat-project-implement`
57
59
  - `oat-project-progress`
58
60
  - `oat-project-next`
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.5",
3
- "docs-config": "0.1.5",
4
- "docs-theme": "0.1.5",
5
- "docs-transforms": "0.1.5"
2
+ "cli": "0.1.7",
3
+ "docs-config": "0.1.7",
4
+ "docs-theme": "0.1.7",
5
+ "docs-transforms": "0.1.7"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-brainstorm
3
- version: 1.0.2
3
+ version: 1.0.4
4
4
  description: Use when the user explicitly invokes the `brainstorm` verb, including `/oat-brainstorm`, "let's brainstorm", "brainstorm this", "can we brainstorm X", or "help me brainstorm X". For ambiguous exploratory phrasing ("I've been thinking", "what if", "help me think through"), do NOT auto-enter; respond conversationally and offer mode only after ≥2 sustained exploratory turns. Do NOT use for review, debug, PR, status, implementation, or active-workflow questions.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -29,6 +29,21 @@ Enter OAT brainstorm mode immediately when the user invokes `/oat-brainstorm` or
29
29
 
30
30
  Hard Activation runs the full Process flow below: print the mode banner (Step 2), assess visual need (Step 3), detect packs and active project (Step 4), and proceed.
31
31
 
32
+ ### Declared Multi-Project Mode
33
+
34
+ If the opening request explicitly says the scope is multiple projects, several sub-projects, an umbrella project, or otherwise declares decomposition intent, still enter brainstorm mode through Hard Activation, but switch the conversation shape immediately to umbrella framing. This is a first-class split path, not an ordinary destination guess.
35
+
36
+ Do not treat ambiguous exploratory phrasing as declared mode. Put another way: do not treat ambiguous exploratory phrasing as declared mode. Messages like "help me think through a broad thing", "what if this has multiple parts", or "this might get big" remain on the Soft Exploratory Path unless the user explicitly declares that the desired outcome is multiple projects.
37
+
38
+ In declared mode, ask this boundary question before ordinary free brainstorming:
39
+
40
+ > "Do you already know the child projects, or should we decompose the scope together?"
41
+
42
+ - If the user already knows the children, capture light parent-level context: shared context, child list, dependencies, sequencing, and integration risks.
43
+ - If the children are unknown, brainstorm the boundaries first until a child list is clear.
44
+
45
+ Once the child list is clear, invoke `oat-project-split` with a `SplitPayload` using `origin: "declared"`, `interactive: true`, `declaredChildren`, and the parent/umbrella slug when known. The brainstorm hook only frames and hands off; `oat-project-split` owns normalization, parent writing, child scaffolding, and activation.
46
+
32
47
  ### Soft Exploratory Path
33
48
 
34
49
  Do **not** print the banner, assert mode, run pack detection, or offer the visual companion on the first response. Answer normally with brainstorm-quality structure (options, tradeoffs, open questions, no premature implementation, no destination guess). Examples:
@@ -278,7 +293,21 @@ If "keep going", return to step 5. If "wrap up", surface the **pack-filtered ter
278
293
  - Gated by `PJM_INSTALLED == "true"`: `Scoped backlog item`.
279
294
  - Gated by `WORKFLOWS_INSTALLED == "true"` AND `ACTIVE_PROJECT_VALID != "true"`: `Promote to new OAT project`.
280
295
  - Gated by `WORKFLOWS_INSTALLED == "true"` AND `ACTIVE_PROJECT_VALID == "true"`: `Active project: fold-back` and `Active project: brainstorming reference file`. When this branch fires, present the **3-way active-project router first** (see step 9 active-project branches) — its outcome controls whether the rest of the picker is even surfaced.
281
- 3. Present the filtered list to the user. Wait for selection.
296
+ 3. Evaluate whether the accumulated brainstorm scope is large enough to offer a split destination. Track the same four split signals used by discovery and evaluate them through the installed CLI:
297
+
298
+ ```bash
299
+ oat project split evaluate-signals --fired "<comma-list>"
300
+ ```
301
+
302
+ Use the local-development fallback only when the installed `oat` command is unavailable:
303
+
304
+ ```bash
305
+ pnpm run cli -- project split evaluate-signals --fired "<comma-list>"
306
+ ```
307
+
308
+ If the JSON result has `triggered: true`, add `Promote to N projects` to the picker. Below 2 split signals, do not show this option.
309
+
310
+ 4. Present the filtered list to the user. Wait for selection.
282
311
 
283
312
  Once a destination is identified (either path), proceed to step 7.
284
313
 
@@ -581,6 +610,16 @@ git commit -m "chore(oat): capture brainstorming reference for <project-name>"
581
610
 
582
611
  Use only `git add -- <path>` so unrelated working-tree changes are not swept into the commit. After the commit succeeds, capture the short hash via `git rev-parse --short HEAD` and report it alongside the absolute path written (for example: "Wrote `<absolute-path>` and committed as `<hash>`."). End mode assertion.
583
612
 
613
+ #### 9k — Promote to N projects
614
+
615
+ This branch is available only when the step 6 picker added `Promote to N projects` after `oat project split evaluate-signals` returned `triggered: true`.
616
+
617
+ Confirm the parent/umbrella slug and the inferred child list at step 8 using the minimal confirmation pattern. If the child list is still unclear, ask one boundary question and return briefly to step 5 to decompose the scope.
618
+
619
+ When confirmed, invoke `oat-project-split` with a `SplitPayload` using `origin: "brainstorm-picker"`, `interactive: true`, `inferredChildren`, the parent/umbrella slug when known, and the brainstorm session note as inherited parent context. The brainstorm hook does not create project directories itself; `oat-project-split` owns normalization, `SplitPlanDocument` validation, coordination-parent writing, child seeding, activation, and dashboard refresh.
620
+
621
+ End mode assertion when the split handoff completes or reports its own blocker.
622
+
584
623
  ## Success Criteria
585
624
 
586
625
  - ✅ Activation Contract is honored: Hard Activation fires only on explicit brainstorm-verb phrasing or `/oat-brainstorm`; Soft Exploratory Path messages ("help me think through", "I've been thinking about", "what if we") respond conversationally without the banner and offer mode only after ≥2 sustained exploratory turns; No Activation Path messages (advisory / review / debug / PR / status / implementation / active-workflow) get a direct response with no banner and no offer.
@@ -590,9 +629,10 @@ Use only `git add -- <path>` so unrelated working-tree changes are not swept int
590
629
  - ✅ Pack and active-project detection (`oat config get tools.<pack>` and `oat config get activeProject`) runs once per session at step 4, before the conversation starts.
591
630
  - ✅ Conversation cadence holds the Superpowers contract: one question at a time, multiple-choice preferred, 2-3 distinct approaches with a recommendation, per-question visual-companion routing.
592
631
  - ✅ Destination is identified via either trigger-phrase opportunistic surfacing (loose substring + paraphrase tolerance, not regex; ambiguity → ask) or convergence cue (pack-filtered terminal-state picker).
632
+ - ✅ The terminal-state picker conditionally includes `Promote to N projects` only when `oat project split evaluate-signals` reports `triggered: true`; small-scope convergence keeps the option hidden.
593
633
  - ✅ Synthesis payload is built per the design Data Models `SynthesizedPayload` schema: `title`, `summary`, `motivation`, `vision`, `approachesConsidered[]`, `chosenDirection`, `openQuestions[]`, `nextSteps[]`, `transcriptSessionNote`.
594
634
  - ✅ Confirmation pattern matches `references/destinations.md`: `full` for scoped backlog item (field-by-field with example wording), `minimal` for slug/path/artifact destinations, `none` for inline-only and summarize-idea-directly.
595
- - ✅ Each handoff branch (9a-9j) reads the correct downstream `SKILL.md` path and enters at the documented step. Project promotion writes `discovery.md` only — never `design.md` — and does not auto-chain into the next phase.
635
+ - ✅ Each handoff branch (9a-9k) reads the correct downstream `SKILL.md` path and enters at the documented step. Project promotion writes `discovery.md` only — never `design.md` — and does not auto-chain into the next phase.
596
636
  - ✅ Doc-to-path validation handles all four cases: path-is-directory, parent-missing (with explicit out-of-repo confirmation), file-already-exists (overwrite or rename), unwritable (surface OS error).
597
637
  - ✅ Fold-back commit safety contract honored: preflight `git status --porcelain -- "$ARTIFACT_PATH"` runs before any artifact mutation; clean → append + `git add -- "$ARTIFACT_PATH"` (explicit `--`, never `-A`, never globs) + scoped commit; dirty → three-option picker (commit-prior-first / mix / abort-to-reference-file); handoff prompt prints only after `git commit` succeeds.
598
638
  - ✅ Handoff target for fold-back resolves correctly per `oat_workflow_mode` + `oat_pr_status`: `oat-project-plan` (spec-driven, no/closed PR) / `oat-project-quick-start` (quick, no/closed PR) / `oat-project-revise` (either mode, open PR).
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: oat-project-discover
3
- version: 2.0.0
3
+ version: 2.0.2
4
4
  description: Use when starting a project or when requirements are still unclear. Runs structured discovery to gather requirements, constraints, and context.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
7
- allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
7
+ allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Bash(pnpm:*), Glob, Grep, AskUserQuestion
8
8
  ---
9
9
 
10
10
  # Discovery Phase
@@ -262,6 +262,59 @@ This focuses the conversation on what matters most to the user.
262
262
 
263
263
  Before converging on an approach, invest in genuine divergent exploration. Simple projects are where unexamined assumptions cause the most wasted work.
264
264
 
265
+ **Step 9 Split Detection: Evaluate Multi-Project Signals**
266
+
267
+ During solution-space exploration, silently evaluate whether the current thread is really multiple loosely related projects. Re-evaluate after each user turn while approaches are being shaped; do not interrupt normal discovery unless the threshold is met.
268
+
269
+ Track the four codified signals:
270
+
271
+ 1. `independently-shippable` — at least two deliverables can ship independently.
272
+ 2. `no-shared-design-surface` — the work lacks a single shared design surface.
273
+ 3. `expect-separate-prs` — a reviewer would reasonably expect separate PRs.
274
+ 4. `distinct-subsystems` — the work spans distinct subsystems, packages, layers, or ownership areas.
275
+
276
+ Evaluate the current comma-separated signal list through the installed CLI:
277
+
278
+ ```bash
279
+ oat project split evaluate-signals --fired "<comma-list>"
280
+ ```
281
+
282
+ Use the local-development fallback only when the installed `oat` command is unavailable:
283
+
284
+ ```bash
285
+ pnpm run cli -- project split evaluate-signals --fired "<comma-list>"
286
+ ```
287
+
288
+ Parse the JSON output:
289
+
290
+ ```json
291
+ { "fired": [], "triggered": false, "confidence": "below" }
292
+ ```
293
+
294
+ Branch on `confidence`:
295
+
296
+ - `high` — both load-bearing signals 1 and 2 fired. Use high-confidence wording and ask directly: "This looks like multiple independent projects. Split now, do one round of broad cross-cutting discovery first, or keep this as one project?"
297
+ - `soft` — at least two signals fired, but not both load-bearing signals. Use soft wording: "This may be multiple projects. Split, do one round of broad cross-cutting discovery first, or keep it as one project?"
298
+ - `below` — Below 2 signals, do not surface a split offer.
299
+
300
+ If the user confirms split, invoke the `oat-project-split` skill with a `SplitPayload` using `origin: "detected-mid-stream"`, `interactive: true`, the active discovery path as `priorDiscovery.path`, and any inferred children already named in the conversation. The discover hook only detects and hands off; it does not scaffold children or write the coordination parent itself.
301
+
302
+ **Non-interactive branch:** if `OAT_NON_INTERACTIVE=1` and detection triggers (`confidence` is `high` or `soft`), do not show an offer prompt and do not silently choose. Append this section to `"$PROJECT_PATH/discovery.md"` and exit non-zero:
303
+
304
+ ```markdown
305
+ ## Detected Split Recommendation
306
+
307
+ Discovery detected multi-project scope via `oat project split evaluate-signals`.
308
+
309
+ - Fired signals: <comma-list>
310
+ - Confidence: <high|soft>
311
+ - Recommendation: rerun discovery interactively and choose whether to invoke `oat-project-split`.
312
+ ```
313
+
314
+ ```bash
315
+ exit 1
316
+ ```
317
+
265
318
  **Step 9a: Propose Approaches**
266
319
 
267
320
  Propose 2-3 **genuinely distinct** approaches (not minor variations). For each:
@@ -313,6 +366,19 @@ Update discovery.md sections:
313
366
 
314
367
  ### Step 11: Human-in-the-Loop Lifecycle (HiLL) Gate (If Configured)
315
368
 
369
+ Before the HiLL gate or discovery completion, run the same split signal evaluation one final time.
370
+
371
+ **Non-interactive convergence branch:** if `OAT_NON_INTERACTIVE=1`, do not show the scope-check prompt and do not silently choose. Parse the final `oat project split evaluate-signals --fired "<comma-list>"` result:
372
+
373
+ - `high` or `soft` — append the same section to `"$PROJECT_PATH/discovery.md"` as the Step 9 non-interactive branch, using the final fired signal list and confidence, then exit non-zero.
374
+ - `below` — proceed as one cohesive project without prompting.
375
+
376
+ For interactive runs, show an always-visible scope-check confirmation. The prompt is required even when no mid-stream offer fired:
377
+
378
+ > "This reads as one cohesive project — proceed, or split into multiple?"
379
+
380
+ Pre-fill the recommendation from `oat project split evaluate-signals --fired "<comma-list>"`: recommend splitting for `high`, suggest considering a split for `soft`, and recommend proceeding as one cohesive project for `below`. If the user chooses split at this convergence point, invoke `oat-project-split` with `origin: "detected-convergence"` and `interactive: true`.
381
+
316
382
  Read `"$PROJECT_PATH/state.md"` frontmatter:
317
383
 
318
384
  - `oat_hill_checkpoints`
@@ -342,13 +408,11 @@ If discovery is not configured as a HiLL checkpoint, or user explicitly approves
342
408
 
343
409
  ### Step 12: Mark Discovery Complete
344
410
 
345
- Update frontmatter:
411
+ Use the CLI completion boundary so split-created child discoveries cannot
412
+ complete until inherited context has been revalidated:
346
413
 
347
- ```yaml
348
- ---
349
- oat_status: complete
350
- oat_ready_for: oat-project-design
351
- ---
414
+ ```bash
415
+ oat project complete-discovery "$PROJECT_PATH" --ready-for oat-project-design
352
416
  ```
353
417
 
354
418
  ### Step 13: Update Project State
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-implement
3
- version: 2.0.16
3
+ version: 2.0.17
4
4
  description: Use when plan.md is ready for execution. Dispatches phase-level subagents with bounded fix loops; supports plan-declared parallel phase groups with worktree-isolated execution and ordered fan-in.
5
5
  argument-hint: '[--retry-limit <N>] [--dry-run]'
6
6
  disable-model-invocation: true
@@ -28,6 +28,9 @@ After every code commit and after every phase/review-fix completion, you MUST co
28
28
  **CRITICAL — Review boundaries require a committed artifact baseline.**
29
29
  Do not enter checkpoint review, final review, revise, or PR-final handoff with dirty core project artifacts (`discovery.md`, `spec.md`, `design.md`, `plan.md`, `implementation.md`, `state.md`, plus `.oat/state.md` when refreshed). If one of those boundaries is next and artifact bookkeeping is still uncommitted, stop and create the bookkeeping commit first.
30
30
 
31
+ **CRITICAL — Intentional artifact divergence must be recorded.**
32
+ If implementation intentionally diverges from `spec.md`, `design.md`, or `plan.md`, record the delta in `implementation.md` before the next phase/review boundary. Include what diverged, why it diverged, whether the implementation or original artifact is now source of truth, and any follow-up artifact updates or explicit deferral. Do not leave accepted design drift only in chat, a review artifact, or code comments; final summary generation depends on `implementation.md` preserving the delta.
33
+
31
34
  ## Progress Indicators (User-Facing)
32
35
 
33
36
  When executing this skill, provide lightweight progress feedback so the user can tell what's happening after they confirm.
@@ -557,6 +560,7 @@ For each phase `pNN` in the plan (or each phase in the current parallel group),
557
560
  spec: {PROJECT_PATH}/spec.md
558
561
  implementation: {PROJECT_PATH}/implementation.md
559
562
  discovery: {PROJECT_PATH}/discovery.md
563
+ delta_recording: record any intentional divergence from spec/design/plan in implementation.md with rationale, source of truth, and follow-up artifact disposition
560
564
  commit_convention: {from plan.md header}
561
565
  workflow_mode: {from state.md or plan.md frontmatter}
562
566
  model_axis: {selected:<value> | inherited | not-applicable | host-auto; omit if unknown}
@@ -793,6 +797,14 @@ Append a new entry to the `## Orchestration Runs` section between the `<!-- orch
793
797
  #### Outstanding Items
794
798
 
795
799
  - {None | list of excluded phases with review paths and worktree paths}
800
+
801
+ #### Artifact / Design Deltas
802
+
803
+ Run-scoped snapshot only. The durable record is `## Deviations from Plan / Design`; consolidate any non-`None` entries there at the next phase boundary.
804
+
805
+ | Task / Review | Source Artifact | Planned / Documented | Actual / Accepted | Reason | Source of Truth | Follow-up |
806
+ | ----------------------------- | ----------------------------------- | ------------------------------- | -------------------------------------- | ---------------------------- | ------------------------- | ------------------------------------------- |
807
+ | {task_id/review_id or `None`} | {spec.md/design.md/plan.md section} | {planned behavior/taxonomy/API} | {actual shipped behavior/taxonomy/API} | {why divergence is accepted} | {implementation/artifact} | {artifact update task or explicit deferral} |
796
808
  ```
797
809
 
798
810
  Append only — never overwrite prior run entries.
@@ -887,6 +899,14 @@ When pausing:
887
899
  - Verification run
888
900
  - Notable decisions/deviations
889
901
 
902
+ **Design/artifact deltas (required when present):**
903
+
904
+ - If a completed task intentionally diverged from `spec.md`, `design.md`, or `plan.md`, update the `## Deviations from Plan / Design` table in `implementation.md`.
905
+ - For existing project artifacts, treat any `## Deviations...` heading as the deviations section; migrate to the preferred `## Deviations from Plan / Design` heading and table shape when already touching the section.
906
+ - Each delta must include: the affected source artifact/section, the planned/documented expectation, the actual shipped implementation, the reason the divergence is accepted, the current source of truth, and any follow-up artifact update task or explicit deferral.
907
+ - If the implementation is now source of truth and the design/spec/plan is stale, write that directly. Do not treat the stale artifact as a no-op just because code is correct.
908
+ - If no deltas exist for the phase, do not invent one; leave the table unchanged.
909
+
890
910
  **Bookkeeping commit (required):**
891
911
 
892
912
  **DO NOT SKIP.** This commit prevents state drift across sessions.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-quick-start
3
- version: 2.1.0
3
+ version: 2.1.1
4
4
  description: Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.
5
5
  argument-hint: '<project-name> ["project description"]'
6
6
  disable-model-invocation: true
@@ -211,10 +211,12 @@ Use `AskUserQuestion` to present this choice.
211
211
 
212
212
  **If user chooses "Promote to spec-driven":**
213
213
 
214
- - Update `discovery.md` frontmatter:
215
- - `oat_status: complete`
216
- - `oat_ready_for: oat-project-design`
217
- - `oat_last_updated: {today}`
214
+ - Complete discovery through the CLI validation boundary:
215
+
216
+ ```bash
217
+ oat project complete-discovery "$PROJECT_PATH" --ready-for oat-project-design
218
+ ```
219
+
218
220
  - Update `state.md`:
219
221
  - `oat_workflow_mode: spec-driven`
220
222
  - `oat_phase: discovery`
@@ -287,6 +289,13 @@ fi
287
289
  # Route the user accordingly. Do NOT loop back into the gate.
288
290
  ```
289
291
 
292
+ Before continuing to Step 3, complete discovery through the CLI validation
293
+ boundary:
294
+
295
+ ```bash
296
+ oat project complete-discovery "$PROJECT_PATH" --ready-for oat-project-quick-start
297
+ ```
298
+
290
299
  ### Step 2.75a: Lightweight Design Mode Choice
291
300
 
292
301
  Resolve the interaction mode before drafting. Same mechanics as the full `oat-project-design` skill (Component 1): argument precedes env var, config fallback, **explicit** non-interactive fallback to draft.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-provide
3
- version: 1.3.3
3
+ version: 1.3.4
4
4
  description: Use when completed work in an active OAT project needs a quality gate before merge. Performs a lifecycle-scoped review after a task, phase, or full implementation, unlike oat-review-provide.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -15,6 +15,8 @@ Request and execute a code or artifact review for the current project scope.
15
15
 
16
16
  Produce an independent review artifact that verifies requirements/design alignment (mode-aware) and code quality.
17
17
 
18
+ Reviewers should distinguish implementation defects from artifact drift. If code is defensible but `spec.md`, `design.md`, or `plan.md` is stale, frame the finding as artifact alignment rather than a required code change.
19
+
18
20
  ## Prerequisites
19
21
 
20
22
  **Required:** Active project with at least one completed task.
@@ -481,6 +483,12 @@ Build the "Review Scope" metadata for the reviewer:
481
483
  - Deferred Medium count: {DEFERRED_MEDIUM_COUNT}
482
484
  - Deferred Minor count: {DEFERRED_MINOR_COUNT}
483
485
  {DEFERRED_LEDGER}
486
+
487
+ **Design Drift Review Guidance:**
488
+
489
+ - If implementation differs from `spec.md`, `design.md`, or `plan.md`, decide whether the code should change or whether the artifact is stale.
490
+ - Use artifact-alignment framing when shipped implementation is defensible and the lifecycle artifact should be updated.
491
+ - Do not force a code-defect framing for accepted design drift; `oat-project-review-receive` can convert artifact drift into alignment tasks or explicit deferrals.
484
492
  ```
485
493
 
486
494
  ### Step 6: Execute Review (3-Tier Capability Model)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-receive
3
- version: 1.4.1
3
+ version: 1.4.2
4
4
  description: Use when review findings from oat-project-review-provide need closure. Converts review artifacts into actionable plan tasks.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -52,6 +52,7 @@ When executing this skill, provide lightweight progress feedback so the user can
52
52
  - No re-reviewing
53
53
  - For `artifact` reviews: no converting findings into plan tasks
54
54
  - For `artifact` reviews: no deferring findings by default
55
+ - No treating accepted design/code drift as a no-op; accepted drift must be converted to an artifact-alignment task or explicitly deferred, with an `implementation.md` note
55
56
 
56
57
  **ALLOWED Activities:**
57
58
 
@@ -167,6 +168,10 @@ For each finding, build a structured register entry:
167
168
  - Agent analysis (agree/disagree + why)
168
169
  - Recommendation (convert to task now vs defer with rationale)
169
170
  - Task Scope (`Large` | `Moderate` | `Minor` | `Negligible`)
171
+ - Drift disposition, when applicable:
172
+ - `code_fix_required` — implementation should change
173
+ - `artifact_alignment_required` — shipped implementation is defensible; design/docs/plan should be aligned
174
+ - `explicit_deferral` — drift is accepted for now with a concrete rationale and follow-up trigger
170
175
  - For `artifact` reviews, use dispositions:
171
176
  - `resolve_in_artifact`
172
177
  - `rejected_with_rationale` (invalid/not applicable)
@@ -386,6 +391,10 @@ Add a note to implementation.md:
386
391
 
387
392
  **New tasks added:** {task_ids}
388
393
 
394
+ **Design drift / artifact alignment notes:**
395
+
396
+ - {finding_id}: {review found stale design/spec/plan relative to shipped implementation; why the implementation is accepted; source of truth; artifact-alignment task ID or explicit deferral}
397
+
389
398
  **Next:** Execute fix tasks via the `oat-project-implement` skill.
390
399
 
391
400
  After the fix tasks are complete:
@@ -399,6 +408,10 @@ After the fix tasks are complete:
399
408
  - If `{PROJECT_PATH}/implementation.md` exists, ensure it will resume correctly after this skill:
400
409
  - If `oat_current_task_id` is `null` (or points at already-completed work), set it to the **first newly-added review-fix task ID** (or the next incomplete task in plan order).
401
410
  - Update the Progress Overview table totals (tasks + completed) if they are present and depend on task counts.
411
+ - If any finding is resolved by accepting the shipped implementation and aligning stale artifacts instead of changing code, add an explicit review note under the current "Review Received" section and update `## Deviations from Plan / Design` when that table exists.
412
+ - For existing project artifacts, treat any `## Deviations...` heading as the deviations section; migrate to the preferred `## Deviations from Plan / Design` heading and table shape when already touching the section.
413
+ - The note must say the review found design/spec/plan drift, why the shipped implementation is accepted, which source is now authoritative, and which artifact-alignment task will update the stale artifact.
414
+ - If the artifact update is intentionally deferred, record the deferral rationale and follow-up trigger in `implementation.md`.
402
415
  - Update `{PROJECT_PATH}/state.md` frontmatter so routing/UI is accurate:
403
416
  - `oat_phase: implement`
404
417
  - `oat_phase_status: in_progress`
@@ -503,6 +516,13 @@ If any Medium is proposed for deferral:
503
516
  - If user declines deferral, convert that Medium to a fix task now.
504
517
  - If user approves deferral, record rationale in `implementation.md` under "Deferred Findings (Medium)".
505
518
 
519
+ Design drift handling applies before Medium/Minor convenience deferrals:
520
+
521
+ - If a review finding reveals that the design artifact is stale relative to a defensible implementation, do not treat this as a no-op.
522
+ - Either convert the finding to an artifact-alignment task or record an explicit deferral.
523
+ - In both cases, add an `implementation.md` review note so final summary generation can preserve the design delta.
524
+ - The note must include what drift was found, why the implementation is accepted, whether implementation or artifact is source of truth, and the artifact task or deferral that will align the lifecycle record.
525
+
506
526
  Minor findings handling is scope-aware:
507
527
 
508
528
  - If `scope != final`: