@open-agent-toolkit/cli 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/oat-phase-implementer.md +81 -3
- package/assets/agents/oat-reviewer.md +15 -5
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/reference/cli-reference.md +8 -5
- package/assets/docs/reference/oat-directory-structure.md +1 -0
- package/assets/docs/reference/project-artifacts.md +17 -1
- package/assets/docs/reference/project-state-machine.md +19 -4
- package/assets/docs/skills/brainstorm.md +2 -1
- package/assets/docs/skills/index.md +1 -0
- package/assets/docs/workflows/advanced/autonomy.md +9 -1
- package/assets/docs/workflows/advanced/workflow-gates.md +11 -6
- package/assets/docs/workflows/approvals-and-automation.md +13 -8
- package/assets/docs/workflows/choose-workflow.md +16 -8
- package/assets/docs/workflows/projects/closeout/closeout-skills.md +8 -3
- package/assets/docs/workflows/projects/closeout/pr-flow.md +2 -0
- package/assets/docs/workflows/projects/execution/execution-skills.md +14 -2
- package/assets/docs/workflows/projects/execution/implementation-execution.md +15 -0
- package/assets/docs/workflows/projects/execution/picking-up-projects.md +10 -1
- package/assets/docs/workflows/projects/lifecycle.md +73 -9
- package/assets/docs/workflows/projects/planning/hill-checkpoints.md +18 -1
- package/assets/docs/workflows/projects/planning/planning-skills.md +11 -10
- package/assets/docs/workflows/projects/planning/starting-projects.md +92 -20
- package/assets/docs/workflows/projects/reviews/index.md +15 -2
- package/assets/docs/workflows/projects/reviews/review-flavors.md +5 -3
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-brainstorm/SKILL.md +33 -9
- package/assets/skills/oat-brainstorm/references/destinations.md +9 -4
- package/assets/skills/oat-docs/SKILL.md +9 -4
- package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/SKILL.md +14 -8
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +17 -2
- package/assets/skills/oat-project-brief/SKILL.md +592 -0
- package/assets/skills/oat-project-brief/references/brief-contract.md +294 -0
- package/assets/skills/oat-project-brief/references/docs/autonomy-contract.md +393 -0
- package/assets/skills/oat-project-brief/references/docs/gate-approval-record.md +84 -0
- package/assets/skills/oat-project-capture/SKILL.md +2 -2
- package/assets/skills/oat-project-complete/SKILL.md +7 -2
- package/assets/skills/oat-project-discover/SKILL.md +3 -2
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +9 -1
- package/assets/skills/oat-project-document/SKILL.md +11 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +17 -2
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +40 -0
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +17 -2
- package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +4 -0
- package/assets/skills/oat-project-implement/references/phase-execution.md +166 -1
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +97 -3
- package/assets/skills/oat-project-import-plan/SKILL.md +5 -1
- package/assets/skills/oat-project-lite/SKILL.md +4 -1
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +17 -2
- package/assets/skills/oat-project-new/SKILL.md +5 -1
- package/assets/skills/oat-project-next/SKILL.md +31 -4
- package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +4 -0
- package/assets/skills/oat-project-plan/SKILL.md +12 -2
- package/assets/skills/oat-project-plan-writing/SKILL.md +6 -4
- package/assets/skills/oat-project-pr-final/SKILL.md +15 -3
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +17 -2
- package/assets/skills/oat-project-pr-progress/SKILL.md +31 -4
- package/assets/skills/oat-project-progress/SKILL.md +30 -8
- package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +4 -0
- package/assets/skills/oat-project-promote-spec-driven/SKILL.md +2 -2
- package/assets/skills/oat-project-quick-start/SKILL.md +60 -1
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +17 -2
- package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +4 -0
- package/assets/skills/oat-project-reconcile/SKILL.md +65 -3
- package/assets/skills/oat-project-review-provide/SKILL.md +331 -12
- package/assets/skills/oat-project-review-receive/SKILL.md +86 -1
- package/assets/skills/oat-project-revise/SKILL.md +27 -4
- package/assets/skills/oat-project-summary/SKILL.md +95 -2
- package/assets/skills/oat-wave-execute/SKILL.md +3 -2
- package/assets/templates/implementation-brief.md +165 -0
- package/assets/templates/plan-brief.md +140 -0
- package/assets/templates/plan.md +1 -1
- package/assets/templates/state.md +8 -2
- package/dist/commands/project/new/scaffold.d.ts +1 -1
- package/dist/commands/project/new/scaffold.d.ts.map +1 -1
- package/dist/commands/project/new/scaffold.js +35 -7
- package/dist/commands/project/promote/promote.d.ts +32 -1
- package/dist/commands/project/promote/promote.d.ts.map +1 -1
- package/dist/commands/project/promote/promote.js +562 -5
- package/dist/commands/project/validate-plan/frontmatter.d.ts +12 -0
- package/dist/commands/project/validate-plan/frontmatter.d.ts.map +1 -0
- package/dist/commands/project/validate-plan/frontmatter.js +27 -0
- package/dist/commands/project/validate-plan/index.d.ts.map +1 -1
- package/dist/commands/project/validate-plan/index.js +52 -18
- package/dist/commands/project/validate-plan/profiles.d.ts +54 -0
- package/dist/commands/project/validate-plan/profiles.d.ts.map +1 -0
- package/dist/commands/project/validate-plan/profiles.js +269 -0
- package/dist/commands/project/validate-plan/validate-plan.d.ts +3 -19
- package/dist/commands/project/validate-plan/validate-plan.d.ts.map +1 -1
- package/dist/commands/project/validate-plan/validate-plan.js +5 -82
- package/dist/commands/shared/frontmatter.d.ts +1 -1
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +1 -0
- package/dist/commands/state/generate.d.ts.map +1 -1
- package/dist/commands/state/generate.js +51 -2
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oat-project-brief
|
|
3
|
+
description: Use when one delivery needs a design-aligned interview, a single approved Project Brief with phases of intent and exit evidence instead of planned tasks, and resumable OAT implementation.
|
|
4
|
+
argument-hint: '<project-name> ["project description"]'
|
|
5
|
+
oat_gateable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
user-invocable: true
|
|
8
|
+
allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, Task
|
|
9
|
+
metadata:
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Brief Project
|
|
14
|
+
|
|
15
|
+
Create or resume a project in **brief mode** and produce one reviewed,
|
|
16
|
+
approved Project Brief in `plan.md` for `oat-project-implement`.
|
|
17
|
+
|
|
18
|
+
## Hook-safe exact-path commits
|
|
19
|
+
|
|
20
|
+
Before a parent-branch commit, verify `oat internal commit-paths --help` succeeds. If unavailable, stop and update the OAT CLI; never fall back to a staged-index or pathspec-only commit. Set `COMMIT_IDENTITY` to a unique operation/artifact identity before the first attempt and retain it for every retry; use a new identity for a new operation. Pass only the exact produced file list, including tracked removals and both names of a rename. A blocked/failed result stops the workflow; retain its receipt and follow its diagnostics. Hooks remain enabled. Synced project artifacts continue through `oat project push`.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- A repository initialized for OAT (`.oat/` and `.agents/` exist).
|
|
25
|
+
- One delivery whose outcome can be agreed in conversation, without a
|
|
26
|
+
separate discovery, spec, or design document.
|
|
27
|
+
|
|
28
|
+
## Mode Assertion
|
|
29
|
+
|
|
30
|
+
**OAT MODE: Brief**
|
|
31
|
+
|
|
32
|
+
**Purpose:** Reach design alignment through a conversational interview, write
|
|
33
|
+
one Project Brief in a single pass, take it through the standard
|
|
34
|
+
pre-implementation review ladder, and approve it once. Phases carry intent and
|
|
35
|
+
exit evidence; tasks are execution records created during implementation.
|
|
36
|
+
|
|
37
|
+
Read `references/brief-contract.md` before Step 2. It is the shared contract
|
|
38
|
+
for brief sections, phase and marker grammar, readiness, the review ladder,
|
|
39
|
+
execution records, anchors, and promotion.
|
|
40
|
+
|
|
41
|
+
When `OAT_AUTONOMOUS=1`, read `references/docs/autonomy-contract.md` and keep
|
|
42
|
+
`OAT_NON_INTERACTIVE=1` set for the run. Resolve every interactive decision
|
|
43
|
+
through its `BRIEF-NN` row and stop only where that row declares a boundary:
|
|
44
|
+
|
|
45
|
+
- `BRIEF-01`: inherited dirty tree;
|
|
46
|
+
- `BRIEF-02`: missing project name or description;
|
|
47
|
+
- `BRIEF-03`: alignment interview;
|
|
48
|
+
- `BRIEF-04`: workflow fit;
|
|
49
|
+
- `BRIEF-05`: dispatch-ladder scope;
|
|
50
|
+
- `BRIEF-06`: project dispatch policy;
|
|
51
|
+
- `BRIEF-07`: optional phase-gate setup;
|
|
52
|
+
- `BRIEF-08`: configured lifecycle gate posture;
|
|
53
|
+
- `BRIEF-09`: brief artifact-review findings;
|
|
54
|
+
- `BRIEF-10`: configured exit gate; and
|
|
55
|
+
- `BRIEF-11`: brief approval.
|
|
56
|
+
|
|
57
|
+
Record each autonomous resolution and its provenance in the artifact named by
|
|
58
|
+
the row. Never persist either autonomy environment signal.
|
|
59
|
+
|
|
60
|
+
**BLOCKED Activities:**
|
|
61
|
+
|
|
62
|
+
- No `discovery.md`, `spec.md`, or `design.md` authoring; agreed design lives
|
|
63
|
+
in the brief's Approach and Decisions.
|
|
64
|
+
- No `### Task` headings in `plan.md` and no execution records in
|
|
65
|
+
`implementation.md`; tasks are opened only when work starts.
|
|
66
|
+
- No implementation code changes.
|
|
67
|
+
|
|
68
|
+
**ALLOWED Activities:**
|
|
69
|
+
|
|
70
|
+
- Brief scaffolding and project metadata updates.
|
|
71
|
+
- A conversational interview in readiness rounds, with facts resolved by the
|
|
72
|
+
agent and decisions put to the user.
|
|
73
|
+
- One Project Brief with concrete next phase and provisional later phases.
|
|
74
|
+
- Brief artifact review, dispatch policy resolution, configured gate review,
|
|
75
|
+
and one approval.
|
|
76
|
+
|
|
77
|
+
**Self-Correction Protocol:**
|
|
78
|
+
|
|
79
|
+
- If the user wants an approved up-front task plan, offer promotion to quick
|
|
80
|
+
instead of writing tasks into the brief.
|
|
81
|
+
- If a design question cannot be settled without a separate design artifact,
|
|
82
|
+
apply the Step 2 workflow-fit check rather than inventing an answer.
|
|
83
|
+
- If implementation code is about to change, stop and hand off to
|
|
84
|
+
`oat-project-implement`.
|
|
85
|
+
|
|
86
|
+
## Progress Indicators (User-Facing)
|
|
87
|
+
|
|
88
|
+
Print this banner once after entry:
|
|
89
|
+
|
|
90
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
OAT ▸ BRIEF
|
|
92
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
+
|
|
94
|
+
Use these compact progress lines:
|
|
95
|
+
|
|
96
|
+
- `[0/8] Checking inherited git state…`
|
|
97
|
+
- `[1/8] Resolving the brief project…`
|
|
98
|
+
- `[2/8] Running the alignment interview…`
|
|
99
|
+
- `[3/8] Writing and committing the brief…`
|
|
100
|
+
- `[4/8] Resolving dispatch and gate setup…`
|
|
101
|
+
- `[5/8] Reviewing the brief artifact…`
|
|
102
|
+
- `[6/8] Running the configured gate…`
|
|
103
|
+
- `[7/8] Confirming brief approval…`
|
|
104
|
+
- `[8/8] Initializing the journal and handing off…`
|
|
105
|
+
|
|
106
|
+
## Artifact Persistence (Required)
|
|
107
|
+
|
|
108
|
+
- Save every change to `plan.md`, `state.md`, and `implementation.md`
|
|
109
|
+
immediately. Never leave interview answers or agreed design only in
|
|
110
|
+
conversation.
|
|
111
|
+
- After Step 3 authoring, commit the scoped project artifacts before any review
|
|
112
|
+
dispatch. The reviewer and the gate read the committed brief, not the
|
|
113
|
+
session.
|
|
114
|
+
- After Step 3.6 records the review disposition, commit the same scoped
|
|
115
|
+
artifacts before Gate Execution so the gate sees a committed core-artifact
|
|
116
|
+
baseline.
|
|
117
|
+
- After a receive-eligible gate handoff, commit its receive bookkeeping and the
|
|
118
|
+
`oat_brief_gate` record. The Step 6.5 completion commit runs only after the
|
|
119
|
+
gate passes or resolves and the brief is approved.
|
|
120
|
+
- Before each scoped commit, resolve the project scope. Scope resolution fails
|
|
121
|
+
closed. A synced project uses `oat project push` with the same message;
|
|
122
|
+
another scope uses `oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-brief:1" --message "$BOOKKEEPING_MESSAGE" -- "$PROJECT_PATH/plan.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/implementation.md"` and stops on a nonzero exit. Set the same bookkeeping message and a distinct operation identity for each lifecycle write; retain both for retries. Never include unrelated paths.
|
|
123
|
+
|
|
124
|
+
## Artifact Hygiene
|
|
125
|
+
|
|
126
|
+
Artifact hygiene contract: Before finishing or committing, format every file you created or edited. Use the concrete write/fix formatting command supplied by the governing plan, task, or brief. If none is usable, discover the repository's documented write/fix command from applicable `AGENTS.md`/`CLAUDE.md` instructions and relevant package manifests; do not infer or hardcode a formatter. Prefer a file-scoped invocation when supported, and avoid rewriting unrelated files. If no command is discoverable, warn once with `no format command discovered in repo instructions; skipping`, then continue.
|
|
127
|
+
|
|
128
|
+
After formatting, run only repository checks relevant to the files changed;
|
|
129
|
+
writing lifecycle artifacts does not imply unrelated full test suites.
|
|
130
|
+
|
|
131
|
+
## Process
|
|
132
|
+
|
|
133
|
+
### Step 0 (Preflight): Inherited Git State
|
|
134
|
+
|
|
135
|
+
Before scaffolding, surface the working tree state so unrelated changes don't
|
|
136
|
+
get carried into the project workflow's bookkeeping commits.
|
|
137
|
+
|
|
138
|
+
1. Run `git status --porcelain`. If empty, continue silently.
|
|
139
|
+
2. If `.oat/sync/manifest.json` is the only entry **and** its two-character
|
|
140
|
+
status code is either `??` or made up solely of the letter `M` and blanks —
|
|
141
|
+
a plain modification, staged, unstaged, or both — commit it without asking:
|
|
142
|
+
`oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-brief:2" --message "chore: run sync" -- .oat/sync/manifest.json`.
|
|
143
|
+
Report the commit and continue. Every other code falls through, including
|
|
144
|
+
`MD`, `MT`, `AM`, `RM`, `CM`, and every unmerged state.
|
|
145
|
+
3. Otherwise, present the dirty list to the user and offer commit now, proceed
|
|
146
|
+
anyway, or abort (`BRIEF-01`). Note generated provider-view paths when they
|
|
147
|
+
appear. Commit now stages only the paths the user selected.
|
|
148
|
+
4. When the response channel is unavailable and `OAT_NON_INTERACTIVE=1`, apply
|
|
149
|
+
`BRIEF-01`: proceed without staging unrelated files. Destructive cleanup is
|
|
150
|
+
a stop boundary.
|
|
151
|
+
|
|
152
|
+
Once the dirty list has been presented, do not advance past this gate without
|
|
153
|
+
an explicit choice. The step 2 manifest-only auto-commit is not a choice point
|
|
154
|
+
and continues on its own.
|
|
155
|
+
|
|
156
|
+
### Step 0.5: Resolve Active Project or Scaffold Brief
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
PROJECT_PATH=$(oat config get activeProject 2>/dev/null || true)
|
|
160
|
+
PROJECTS_ROOT="${OAT_PROJECTS_ROOT:-$(oat config get projects.root 2>/dev/null || echo ".oat/projects/shared")}"
|
|
161
|
+
PROJECTS_ROOT="${PROJECTS_ROOT%/}"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Resume in place.** When `PROJECT_PATH` names an existing project whose
|
|
165
|
+
`state.md` records `oat_workflow_mode: brief`, resume it and never re-scaffold:
|
|
166
|
+
|
|
167
|
+
- `plan.md` reads `oat_status: complete` and
|
|
168
|
+
`oat_ready_for: oat-project-implement` → nothing is left to author; load
|
|
169
|
+
`oat-project-implement/SKILL.md` and follow it.
|
|
170
|
+
- Otherwise re-enter at the earliest step whose output is missing: no authored
|
|
171
|
+
brief → Step 2; an authored brief with no review disposition → Step 3.5; a
|
|
172
|
+
recorded disposition with no gate outcome → Gate Execution; a resolved gate
|
|
173
|
+
without approval → Step 3.7. Preserve every authored section, phase, and
|
|
174
|
+
`## Reviews` row; never copy a template over an authored brief.
|
|
175
|
+
|
|
176
|
+
A project in another mode is not resumed here. A promoted brief is a quick
|
|
177
|
+
project and resumes through `oat-project-quick-start`.
|
|
178
|
+
|
|
179
|
+
If no valid active brief project exists, resolve a project name and
|
|
180
|
+
substantive description from `$ARGUMENTS`. A bare name is insufficient. Ask for
|
|
181
|
+
the missing startup input under `BRIEF-02`; in autonomous mode derive both only
|
|
182
|
+
from the explicit goal and stop if it is not substantive.
|
|
183
|
+
|
|
184
|
+
Create the project through the canonical scaffolder:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
oat project new "{project-name}" --mode brief
|
|
188
|
+
PROJECT_PATH=$(oat config get activeProject)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Confirm `"$PROJECT_PATH/state.md"` exists and reports
|
|
192
|
+
`oat_workflow_mode: brief`, `oat_phase: plan`, and
|
|
193
|
+
`oat_phase_status: in_progress`, and that `plan.md` (from the `plan-brief`
|
|
194
|
+
template), `implementation.md` (from `implementation-brief`), and
|
|
195
|
+
`references/research/` exist. A missing file or a different mode stops the run
|
|
196
|
+
before any write. Do not create discovery, spec, or design artifacts.
|
|
197
|
+
|
|
198
|
+
**Consolidating earlier scaffolds.** When this brief project absorbs work that
|
|
199
|
+
earlier project scaffolds already started, record `absorbed_projects: [<slug>]`
|
|
200
|
+
and `absorbed_backlog_ids: [<BL-id>]` in `"$PROJECT_PATH/state.md"` as one
|
|
201
|
+
frontmatter write immediately after the scaffold, with the same shapes and
|
|
202
|
+
meaning that `oat-project-quick-start` and `oat-project-lite` record. Record
|
|
203
|
+
them only when a consolidation actually happened.
|
|
204
|
+
|
|
205
|
+
### Step 1: Set Metadata and Read Repository Knowledge
|
|
206
|
+
|
|
207
|
+
Update `"$PROJECT_PATH/state.md"` frontmatter:
|
|
208
|
+
|
|
209
|
+
- `oat_workflow_mode: brief`
|
|
210
|
+
- `oat_workflow_origin: native`
|
|
211
|
+
- `oat_phase: plan`
|
|
212
|
+
- `oat_phase_status: in_progress`
|
|
213
|
+
- `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
214
|
+
|
|
215
|
+
Read repository instructions and the minimum durable context the interview
|
|
216
|
+
needs. Start with root `AGENTS.md`/`CLAUDE.md`. If `.oat/repo/AGENTS.md`
|
|
217
|
+
exists, follow its routing into current state, decisions, and references.
|
|
218
|
+
Settle facts from code, docs, and research before asking about them.
|
|
219
|
+
|
|
220
|
+
### Step 2: Alignment Interview
|
|
221
|
+
|
|
222
|
+
Follow the readiness and design-strand rules in `references/brief-contract.md`
|
|
223
|
+
(`BRIEF-03`). In summary:
|
|
224
|
+
|
|
225
|
+
1. **Readiness rounds.** Ask in small rounds. Batch independent questions,
|
|
226
|
+
sequence dependent ones, and ask one question alone when its answer
|
|
227
|
+
reshapes the rest. Give each question a recommendation and its tradeoff,
|
|
228
|
+
worded so accepting the recommendation is a one-word answer.
|
|
229
|
+
2. **Facts versus decisions.** Facts the agent can settle from code, docs, or
|
|
230
|
+
research never become questions; resolve them yourself, using read-only
|
|
231
|
+
subagents when that is faster, without blocking the round. Decisions go to
|
|
232
|
+
the user.
|
|
233
|
+
3. **Design strand.** Cover, proportionally to the work, the architecture
|
|
234
|
+
(components, boundaries, interfaces, data shapes), the observable behavior,
|
|
235
|
+
the alternatives for each consequential design decision with a
|
|
236
|
+
recommendation and its cost, and the risks. The user chooses; record the
|
|
237
|
+
choice and the rejected alternatives.
|
|
238
|
+
4. **Known Unknowns.** A question that only matters inside one phase, or that
|
|
239
|
+
needs evidence, becomes a Known Unknown with the phase that settles it
|
|
240
|
+
(often a research or prototype phase), not an interview question.
|
|
241
|
+
5. **Stop criterion.** Stop when outcome, boundaries, approach, evidence, and
|
|
242
|
+
remaining uncertainty are understood and the user has explicitly accepted
|
|
243
|
+
the design. Readiness is design alignment, never a round count.
|
|
244
|
+
|
|
245
|
+
Persist interview results as you go: write agreed decisions and design into
|
|
246
|
+
the brief sections in `"$PROJECT_PATH/plan.md"` rather than holding them in
|
|
247
|
+
conversation.
|
|
248
|
+
|
|
249
|
+
**Workflow fit (`BRIEF-04`).** Change course only on content, never on
|
|
250
|
+
interview length:
|
|
251
|
+
|
|
252
|
+
- The work is several independent deliveries → recommend separate projects,
|
|
253
|
+
or `oat-project-split` for a confirmed broad scope. Goal mode, for many
|
|
254
|
+
milestones, is not registered yet.
|
|
255
|
+
- A design question cannot be settled without a separate design artifact →
|
|
256
|
+
recommend quick with lightweight design, reached under the promotion
|
|
257
|
+
precondition below.
|
|
258
|
+
- The user wants a maintained, approved up-front task plan → offer quick under
|
|
259
|
+
the same precondition. Execution-time lookahead does not need it.
|
|
260
|
+
- The change fits one sitting with no phase structure → `oat-project-lite`
|
|
261
|
+
remains available.
|
|
262
|
+
|
|
263
|
+
Otherwise record in Decisions why brief fits and continue.
|
|
264
|
+
|
|
265
|
+
**Promotion precondition.** Promotion to quick through
|
|
266
|
+
`oat project promote "$PROJECT_PATH" --to quick --json` is offered only after
|
|
267
|
+
Step 3 has written, validated, and committed the brief, because promotion
|
|
268
|
+
migrates the committed brief's phases. Before that point, abandon the brief
|
|
269
|
+
scaffold and start `oat-project-quick-start` instead.
|
|
270
|
+
|
|
271
|
+
### Step 3: Write the Brief in One Pass and Commit
|
|
272
|
+
|
|
273
|
+
Write `"$PROJECT_PATH/plan.md"` in one pass from the agreed interview, keeping
|
|
274
|
+
the `plan-brief` scaffold frontmatter (`oat_plan_source: brief`,
|
|
275
|
+
`oat_template: true`, `oat_status: in_progress`, `oat_ready_for: null`) until
|
|
276
|
+
Step 3.7. Keep `oat_plan_hill_phases: []`, which means none for brief modes.
|
|
277
|
+
|
|
278
|
+
The brief contains, in template order: Goal; Outcomes (numbered, each naming
|
|
279
|
+
its intended evidence); Approach (agreed architecture, with an optional
|
|
280
|
+
`### Design` subsection); Constraints and Out of Scope; Decisions (one line and
|
|
281
|
+
rationale each, including rejected alternatives); Known Unknowns (each with the
|
|
282
|
+
phase that settles it); Delivery endpoint and authority (recorded once and
|
|
283
|
+
reused, never re-asked per command); the empty `## Milestones` section, which
|
|
284
|
+
brief projects leave empty; Phases; Parallelism; Reviews; Implementation
|
|
285
|
+
Complete; References. Planned proof lives here; observed evidence goes in
|
|
286
|
+
`implementation.md`.
|
|
287
|
+
|
|
288
|
+
Each phase follows the strict grammar in `references/brief-contract.md`:
|
|
289
|
+
`## Phase pNN: <name>`, a blank line, then `**Intent:**`, `**Exit evidence:**`,
|
|
290
|
+
and `**Provisional:** yes|no`. The first phase is concrete
|
|
291
|
+
(`**Provisional:** no`); later phases may stay provisional until they are made
|
|
292
|
+
concrete. Phase IDs are stable and never reused, and document order governs
|
|
293
|
+
execution. Declare `oat_plan_parallel_groups` only for concrete phases that
|
|
294
|
+
pass the independence test. Seed `## Reviews` with the `plan | artifact` row,
|
|
295
|
+
one `code` row per concrete phase, and the `final` row.
|
|
296
|
+
|
|
297
|
+
Validate the brief with the brief profile:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
oat project validate-plan --project-path "$PROJECT_PATH"
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Resolve every error (`brief-no-phases`, `brief-duplicate-phase`,
|
|
304
|
+
`brief-phase-missing-intent`, `brief-phase-missing-exit-evidence`,
|
|
305
|
+
`brief-provisional-invalid`, `brief-first-phase-provisional`,
|
|
306
|
+
`brief-malformed-phase-heading`) before continuing. Remove any
|
|
307
|
+
`### Task` heading that triggers the `brief-task-headings-ignored` warning.
|
|
308
|
+
|
|
309
|
+
Format the brief, resolve project scope, and create the scoped pre-review
|
|
310
|
+
commit required by Artifact Persistence. Only after that commit is durable may
|
|
311
|
+
Step 3.5 run.
|
|
312
|
+
|
|
313
|
+
### Step 3.5: Resolve Dispatch Ladder and Ceiling
|
|
314
|
+
|
|
315
|
+
Invoke the complete **Managed Dispatch Readiness and Review Contract** from
|
|
316
|
+
`oat-project-plan-writing`, including its `Complete Dispatch Ladder Adoption
|
|
317
|
+
Contract`. Load the current `oat-project-plan-writing/SKILL.md` and follow
|
|
318
|
+
that contract as written. Resolve and, when necessary, adopt the dispatch
|
|
319
|
+
ladder before selecting a project policy. Do not copy model names into the
|
|
320
|
+
skill.
|
|
321
|
+
|
|
322
|
+
For the ladder ownership decision, apply `BRIEF-05`, which is identical to
|
|
323
|
+
`QS-08`: check existing user, local, then authorized shared configuration in
|
|
324
|
+
that fixed order; skip scalar-blocked candidates; adopt once; re-run the
|
|
325
|
+
preflight resolver. Stop before writing if none is compatible.
|
|
326
|
+
|
|
327
|
+
Resolve the project policy through `BRIEF-06`, identical to `QS-09`, in this
|
|
328
|
+
order: project `oat_dispatch_policy`, legacy `oat_dispatch_ceiling`, config
|
|
329
|
+
`workflow.dispatchPolicy.*` as a proposed starting value, then an interactive
|
|
330
|
+
choice rendered by `oat project dispatch-ceiling choices --format markdown`.
|
|
331
|
+
Unresolved non-interactive state blocks implementation readiness. Persist the
|
|
332
|
+
policy only in `"$PROJECT_PATH/state.md"`; it remains a named ceiling,
|
|
333
|
+
uncapped managed selection, or host inheritance, never a pinned provider
|
|
334
|
+
target.
|
|
335
|
+
|
|
336
|
+
Run the reviewer readiness check:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role reviewer --preflight --json
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Step 3.55: Configure Optional Phase Gate Review
|
|
343
|
+
|
|
344
|
+
After the brief has stable phase IDs and before Step 3.6, invoke the
|
|
345
|
+
`Shared Phase Gate Review Setup Contract` from `oat-project-plan-writing`:
|
|
346
|
+
load the current `oat-project-plan-writing/SKILL.md` and follow that contract
|
|
347
|
+
as written (`BRIEF-07`). Preserve an explicit `oat_phase_review_gate` without
|
|
348
|
+
probing or mutation. The optional phase gate is independent from the built-in
|
|
349
|
+
per-phase reviews and the final review, which run regardless. Brief projects
|
|
350
|
+
have no HiLL setup.
|
|
351
|
+
|
|
352
|
+
### Step 3.57: Configure Lifecycle Gate Posture
|
|
353
|
+
|
|
354
|
+
After the brief has stable phase IDs and before Step 3.6,
|
|
355
|
+
invoke the `Shared Lifecycle Gate Posture Setup Contract` from
|
|
356
|
+
`oat-project-plan-writing`: load the current
|
|
357
|
+
`oat-project-plan-writing/SKILL.md` and follow that contract as written.
|
|
358
|
+
Supply exactly this relevant set: `oat-project-brief` and
|
|
359
|
+
`oat-project-implement`.
|
|
360
|
+
|
|
361
|
+
Apply `BRIEF-08` to the shared contract's interaction. When
|
|
362
|
+
`oat_skill_gate_overrides` already exists, preserve it through the shared
|
|
363
|
+
contract without probing, prompting, or mutation. Otherwise, in interactive
|
|
364
|
+
planning, offer Keep or Disable independently for each configured gate in the
|
|
365
|
+
relevant set. Persist only disabled choices to `"$PROJECT_PATH/state.md"`.
|
|
366
|
+
Never modify the shared, local, or user configuration layers. In
|
|
367
|
+
non-interactive planning, preserve configured gates and do not invent or write
|
|
368
|
+
an override.
|
|
369
|
+
|
|
370
|
+
### Step 3.6: Run Brief Artifact Review Loop
|
|
371
|
+
|
|
372
|
+
Invoke the `Auto Artifact-Review Loop` from `oat-project-plan-writing`. Load
|
|
373
|
+
the current `oat-project-plan-writing/SKILL.md` and follow that loop as
|
|
374
|
+
written, with:
|
|
375
|
+
|
|
376
|
+
- `target: plan`
|
|
377
|
+
- `type: artifact`
|
|
378
|
+
- `scope: plan`
|
|
379
|
+
- `artifact_path: "$PROJECT_PATH/plan.md"`
|
|
380
|
+
- `oat_output_mode: structured`
|
|
381
|
+
- `artifact_paths: { brief_contract: "$BRIEF_SKILL_DIR/references/brief-contract.md" }`,
|
|
382
|
+
where `BRIEF_SKILL_DIR` is the directory this `SKILL.md` was loaded from
|
|
383
|
+
|
|
384
|
+
The review dispatch includes the committed brief and the brief contract through
|
|
385
|
+
that payload, never the interview session. Resolve `workflow.autoArtifactReview.plan`; only
|
|
386
|
+
explicit `false` skips the loop. Keep review at the current planning parent
|
|
387
|
+
unless the shared managed-dispatch contract proves the exception route is
|
|
388
|
+
required. Accepted handles are never replaced.
|
|
389
|
+
|
|
390
|
+
Disposition of findings (`BRIEF-09`):
|
|
391
|
+
|
|
392
|
+
- Fold minor, artifact-local findings into the brief without changing intent.
|
|
393
|
+
- A material finding (one that would change an Outcome, the Approach, a
|
|
394
|
+
Decision, a phase boundary, or the authority) goes back to the user as a
|
|
395
|
+
short, focused realignment; the agreed answer is written into the brief and
|
|
396
|
+
the loop re-runs on the new commit.
|
|
397
|
+
- Under autonomy, apply only unambiguous artifact-local fixes, never rewrite
|
|
398
|
+
agreed intent, and stop on an unresolved Critical finding or material
|
|
399
|
+
ambiguity.
|
|
400
|
+
|
|
401
|
+
Record the review row in `## Reviews` (or the explicit skip
|
|
402
|
+
`Plan artifact review: skipped (workflow.autoArtifactReview.plan=false)`).
|
|
403
|
+
Format and validate again, then create the post-review scoped commit before
|
|
404
|
+
Gate Execution. The brief stays `in_progress` and resumable.
|
|
405
|
+
|
|
406
|
+
### Gate Execution
|
|
407
|
+
|
|
408
|
+
The brief exit-gate review scope is the committed `plan.md`, `state.md`, and
|
|
409
|
+
`implementation.md` bundle. It runs after Step 3.6 and before Step 3.7, so the
|
|
410
|
+
user approves the brief the gate has already reviewed.
|
|
411
|
+
|
|
412
|
+
1. Resolve the gate for this skill with project context:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
oat gate resolve <this-skill> --project "$PROJECT_PATH" --json
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Handle all three `resolution` values explicitly:
|
|
419
|
+
- `not_configured`: no gate is configured; write no record and proceed directly to the approval in Step 3.7 below.
|
|
420
|
+
- `configured_disabled_by_project`: the operator disabled this configured gate for this project. Do not launch any process. Emit `configured but disabled by project override`, including the project path and the `projectOverride` source from the envelope, write `oat_brief_gate` as `allowed/project_disabled` with `reviewed_head: null` per **Persist the gate outcome** below, then proceed directly to the approval in Step 3.7 below. A project-disabled gate never enters the passed, missing, or failed branches, and its `configuredGate` is evidence only, never executed.
|
|
421
|
+
- `configured`: continue with the steps below, executing `effectiveGate` exactly as configured.
|
|
422
|
+
|
|
423
|
+
A null, missing, malformed, or unrecognized result is an operational failure
|
|
424
|
+
that fails closed as unresolved. Never treat it as "no gate configured."
|
|
425
|
+
|
|
426
|
+
2. Export `PROJECT_PATH`. If the stored command invokes lifecycle gate review,
|
|
427
|
+
its canonical form is:
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
oat --json gate review --project "$PROJECT_PATH" ...
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Use global `--json` before `gate review`. Reject `oat gate
|
|
434
|
+
review ...` without the global `--json` placement. Reusable declarations
|
|
435
|
+
must not contain `--target <id>` or add it at runtime. Stop and migrate an invalid stored
|
|
436
|
+
declaration before execution; never inject or append execution-time argv.
|
|
437
|
+
|
|
438
|
+
3. When the current planning parent's model identity is available and the
|
|
439
|
+
command is `oat gate review`, export
|
|
440
|
+
`OAT_GATE_PRODUCER_IDENTITY=<model>:declared` only for that invocation.
|
|
441
|
+
Otherwise ensure it is unset. Do not persist it or alter the command.
|
|
442
|
+
4. Execute the resolved command exactly as configured. Capture stdout, stderr,
|
|
443
|
+
exit code, and structured JSON. Exit code alone never authorizes receipt.
|
|
444
|
+
5. Invoke receive only when all three conditions hold: status is `ok` or
|
|
445
|
+
`blocked`, `receiveEligible: true`, and a non-null `handoff` corroborates
|
|
446
|
+
the artifact. `receiveEligible: false` is a hard stop.
|
|
447
|
+
`targeting_correlation_failed` is never receivable. Correct and revalidate
|
|
448
|
+
`artifact_validation_failed` before receipt. Unknown, contradictory, or
|
|
449
|
+
malformed results stop.
|
|
450
|
+
6. For a validated, receive-eligible `blocked` result, apply `BRIEF-10`:
|
|
451
|
+
- `block`: remediate and re-run the gate up to `maxAttempts` attempts
|
|
452
|
+
(default `2`);
|
|
453
|
+
- `prompt`: surface the failure and ask the human how to proceed; under
|
|
454
|
+
`OAT_AUTONOMOUS=1` it is a reported boundary;
|
|
455
|
+
- `warn`: record the validated gate failure and continue.
|
|
456
|
+
|
|
457
|
+
Operational, validation, targeting, launch, and receive failures never inherit
|
|
458
|
+
`onFailure` continuation semantics.
|
|
459
|
+
|
|
460
|
+
A gate that ends in `block` after attempts are exhausted, or at an unresolved
|
|
461
|
+
`prompt` boundary, means Step 3.7 and the completion steps MUST NOT run; the
|
|
462
|
+
project stays `in_progress` and resumable. Persist eligible receive bookkeeping
|
|
463
|
+
in its own scoped commit.
|
|
464
|
+
|
|
465
|
+
**Persist the gate outcome.** For a configured gate, including one disabled by
|
|
466
|
+
project override, write `oat_brief_gate` to `$PROJECT_PATH/state.md` with
|
|
467
|
+
exactly the core fields defined in `references/docs/gate-approval-record.md`
|
|
468
|
+
(`status`, `disposition`, `config_fingerprint`, `reviewed_head`,
|
|
469
|
+
`decided_at`) once the gate reaches its outcome, and commit it with the next
|
|
470
|
+
brief bookkeeping commit or before stopping:
|
|
471
|
+
|
|
472
|
+
- passed: `allowed/passed`;
|
|
473
|
+
- `warn` failure: `allowed/warned`;
|
|
474
|
+
- a `prompt` failure the operator explicitly continues past: `allowed/prompt_approved`;
|
|
475
|
+
- a `prompt` failure declined or deferred (every `prompt` failure under
|
|
476
|
+
`OAT_AUTONOMOUS=1`), `block` exhausted after `maxAttempts`, or a launch,
|
|
477
|
+
validation, or receive failure: `blocked` with `disposition: null`;
|
|
478
|
+
- `configured_disabled_by_project`: `allowed/project_disabled` with `reviewed_head: null` and no launch.
|
|
479
|
+
|
|
480
|
+
`not_configured` writes no record, so the field is absent. `reviewed_head` is
|
|
481
|
+
the brief commit the gate reviewed and `decided_at` the decision time. A rerun
|
|
482
|
+
replaces the record. Nothing reads the record back to route; it is provenance
|
|
483
|
+
only, and Step 3.7 stays gated by the control flow above.
|
|
484
|
+
|
|
485
|
+
### Step 3.7: Record Review Disposition and Single Approval
|
|
486
|
+
|
|
487
|
+
Reach this boundary only after the configured gate passes or resolves
|
|
488
|
+
according to its `onFailure` policy.
|
|
489
|
+
|
|
490
|
+
1. Confirm the `plan` artifact row in `## Reviews` carries the Step 3.6
|
|
491
|
+
outcome. Use `passed` only for a clean result; keep a non-passed status with
|
|
492
|
+
a concise residual-finding disposition otherwise.
|
|
493
|
+
2. This is the only approval. Use `AskUserQuestion` exactly once to offer:
|
|
494
|
+
1. Approve the reviewed brief.
|
|
495
|
+
2. Revise: run a focused realignment, write the change into the brief,
|
|
496
|
+
commit it, and re-run Step 3.6 and Gate Execution before returning
|
|
497
|
+
here. An editorial fix that changes no Outcome, Approach, Decision,
|
|
498
|
+
phase boundary, or authority does not re-run the ladder.
|
|
499
|
+
3. Promote to quick for an approved up-front task plan, through
|
|
500
|
+
`oat project promote "$PROJECT_PATH" --to quick --json` (the Step 2
|
|
501
|
+
promotion precondition holds here; see `references/brief-contract.md`
|
|
502
|
+
for refusals), then stop; the project is now quick and resumes through
|
|
503
|
+
`oat-project-quick-start`.
|
|
504
|
+
|
|
505
|
+
Under `OAT_AUTONOMOUS=1`, apply `BRIEF-11`: approve the recorded brief and
|
|
506
|
+
write the approval evidence; contradictory or materially incomplete
|
|
507
|
+
outcomes stop at a product-judgment boundary.
|
|
508
|
+
|
|
509
|
+
3. Record the approval as one line under `## Delivery endpoint and authority`:
|
|
510
|
+
`- **Brief approved:** {YYYY-MM-DD} by {user | autonomous run (BRIEF-11)} at {reviewed brief commit SHA}`.
|
|
511
|
+
4. Only after those writes succeed, atomically update the `plan.md`
|
|
512
|
+
frontmatter:
|
|
513
|
+
- `oat_status: complete`
|
|
514
|
+
- `oat_ready_for: oat-project-implement`
|
|
515
|
+
- `oat_phase_status: complete`
|
|
516
|
+
- `oat_template: false`
|
|
517
|
+
|
|
518
|
+
If dispatch remains unresolved, review fails closed, or the outcome cannot be
|
|
519
|
+
recorded, leave the pre-review values unchanged and commit them before
|
|
520
|
+
stopping. Never expose an unreviewed or unapproved brief to
|
|
521
|
+
`oat-project-implement`.
|
|
522
|
+
|
|
523
|
+
### Step 4: Sync Project State
|
|
524
|
+
|
|
525
|
+
Update `"$PROJECT_PATH/state.md"`:
|
|
526
|
+
|
|
527
|
+
- `oat_workflow_mode: brief`
|
|
528
|
+
- `oat_phase: plan`
|
|
529
|
+
- `oat_phase_status: complete`
|
|
530
|
+
- `oat_current_task: null`
|
|
531
|
+
- `oat_hill_checkpoints: []` (none for brief modes)
|
|
532
|
+
- `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
533
|
+
|
|
534
|
+
### Step 5: Initialize the Journal
|
|
535
|
+
|
|
536
|
+
Prepare `"$PROJECT_PATH/implementation.md"` from the `implementation-brief`
|
|
537
|
+
scaffold:
|
|
538
|
+
|
|
539
|
+
- frontmatter `oat_status: in_progress`, `oat_template: false`, and
|
|
540
|
+
`oat_current_task_id: p01` (the first phase ID in document order; a phase ID
|
|
541
|
+
is a valid pointer in brief modes);
|
|
542
|
+
- one Progress Overview row per authored phase (`pending`, `1` unit, `0/1`
|
|
543
|
+
accepted) and the total phase count;
|
|
544
|
+
- one `## Phase pNN: <name>` section per authored phase containing only
|
|
545
|
+
`**Status:** pending`. Remove the template's placeholder `**Base:**`,
|
|
546
|
+
`**Head:**`, and `**Executor:**` lines and the example execution record:
|
|
547
|
+
implementation records `**Base:**` when a phase starts and `**Head:**` when
|
|
548
|
+
its work ends, before its review, and opens execution records only when work
|
|
549
|
+
starts.
|
|
550
|
+
|
|
551
|
+
### Step 6: Refresh Repo Dashboard
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
oat state refresh
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
### Step 6.5: Commit Brief Artifacts
|
|
558
|
+
|
|
559
|
+
Format the scoped artifacts, resolve project scope, and create the completion
|
|
560
|
+
commit through the Artifact Persistence rule with a new operation identity.
|
|
561
|
+
The repo dashboard `.oat/state.md` is generated; do not stage it.
|
|
562
|
+
|
|
563
|
+
### Step 7: Output Next Action
|
|
564
|
+
|
|
565
|
+
Report:
|
|
566
|
+
|
|
567
|
+
- workflow mode (`brief`) and the brief path;
|
|
568
|
+
- the phases, which are concrete and which provisional, and any declared
|
|
569
|
+
parallel groups;
|
|
570
|
+
- the review and gate outcomes and the approval record;
|
|
571
|
+
- next: `oat-project-implement`.
|
|
572
|
+
|
|
573
|
+
```text
|
|
574
|
+
Brief approved and ready. Next: oat-project-implement
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
## Success Criteria
|
|
578
|
+
|
|
579
|
+
- The interview reached explicit design alignment; facts were settled by the
|
|
580
|
+
agent and decisions by the user.
|
|
581
|
+
- `plan.md` is a Project Brief that passes `oat project validate-plan` with the
|
|
582
|
+
brief profile, with a concrete first phase and no task headings.
|
|
583
|
+
- The authored brief was committed before artifact review, and the reviewed
|
|
584
|
+
disposition was committed before the gate.
|
|
585
|
+
- The configured gate saw a committed core-artifact baseline, used canonical
|
|
586
|
+
global `--json` placement without `--target`, and its outcome is recorded as
|
|
587
|
+
`oat_brief_gate` with exactly the core fields, or absent when no gate is
|
|
588
|
+
configured.
|
|
589
|
+
- Exactly one approval ran, after review and gate, and is recorded in the
|
|
590
|
+
brief.
|
|
591
|
+
- No discovery, spec, design, HiLL setup, or execution records were created.
|
|
592
|
+
- Completion state was committed and routes to `oat-project-implement`.
|