@open-agent-toolkit/cli 0.3.18 → 0.3.20
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/README.md +2 -1
- package/assets/agents/oat-phase-implementer.md +104 -3
- package/assets/agents/oat-reviewer.md +20 -5
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/reference/cli-reference.md +15 -7
- package/assets/docs/reference/oat-directory-structure.md +2 -0
- package/assets/docs/reference/project-artifacts.md +72 -1
- package/assets/docs/reference/project-state-machine.md +55 -6
- package/assets/docs/skills/brainstorm.md +3 -1
- package/assets/docs/skills/index.md +13 -9
- package/assets/docs/workflows/advanced/autonomy.md +12 -2
- package/assets/docs/workflows/advanced/dispatch-ceiling.md +2 -2
- package/assets/docs/workflows/advanced/workflow-gates.md +25 -7
- package/assets/docs/workflows/approvals-and-automation.md +25 -9
- package/assets/docs/workflows/choose-workflow.md +24 -8
- package/assets/docs/workflows/ideas/index.md +1 -1
- package/assets/docs/workflows/ideas/lifecycle.md +3 -2
- package/assets/docs/workflows/projects/closeout/closeout-skills.md +83 -5
- package/assets/docs/workflows/projects/closeout/pr-flow.md +9 -1
- package/assets/docs/workflows/projects/execution/execution-skills.md +27 -2
- package/assets/docs/workflows/projects/execution/implementation-execution.md +15 -0
- package/assets/docs/workflows/projects/execution/picking-up-projects.md +20 -1
- package/assets/docs/workflows/projects/lifecycle.md +172 -9
- package/assets/docs/workflows/projects/planning/hill-checkpoints.md +18 -1
- package/assets/docs/workflows/projects/planning/planning-skills.md +13 -10
- package/assets/docs/workflows/projects/planning/starting-projects.md +138 -20
- package/assets/docs/workflows/projects/reviews/index.md +36 -2
- package/assets/docs/workflows/projects/reviews/review-flavors.md +7 -3
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-brainstorm/SKILL.md +58 -9
- package/assets/skills/oat-brainstorm/references/destinations.md +12 -4
- package/assets/skills/oat-docs/SKILL.md +13 -4
- package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/SKILL.md +20 -8
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +156 -122
- package/assets/skills/oat-project-brief/SKILL.md +592 -0
- package/assets/skills/oat-project-brief/references/brief-contract.md +743 -0
- package/assets/skills/oat-project-brief/references/docs/autonomy-contract.md +412 -0
- package/assets/skills/oat-project-brief/references/docs/gate-approval-record.md +93 -0
- package/assets/skills/oat-project-capture/SKILL.md +2 -2
- package/assets/skills/oat-project-complete/SKILL.md +16 -2
- package/assets/skills/oat-project-discover/SKILL.md +4 -2
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +9 -1
- package/assets/skills/oat-project-document/SKILL.md +17 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +156 -122
- package/assets/skills/oat-project-goal/SKILL.md +697 -0
- package/assets/skills/oat-project-goal/references/docs/autonomy-contract.md +412 -0
- package/assets/skills/oat-project-goal/references/docs/gate-approval-record.md +93 -0
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +107 -0
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +156 -122
- package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +13 -0
- package/assets/skills/oat-project-implement/references/phase-execution.md +173 -1
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +124 -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 +156 -122
- package/assets/skills/oat-project-new/SKILL.md +5 -1
- package/assets/skills/oat-project-next/SKILL.md +71 -14
- package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +13 -0
- package/assets/skills/oat-project-plan/SKILL.md +24 -3
- package/assets/skills/oat-project-plan-writing/SKILL.md +8 -4
- package/assets/skills/oat-project-pr-final/SKILL.md +65 -3
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +156 -122
- package/assets/skills/oat-project-pr-progress/SKILL.md +125 -4
- package/assets/skills/oat-project-progress/SKILL.md +63 -8
- package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +13 -0
- package/assets/skills/oat-project-promote-spec-driven/SKILL.md +2 -2
- package/assets/skills/oat-project-quick-start/SKILL.md +65 -1
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +156 -122
- package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +13 -0
- package/assets/skills/oat-project-reconcile/SKILL.md +94 -3
- package/assets/skills/oat-project-review-provide/SKILL.md +397 -12
- package/assets/skills/oat-project-review-receive/SKILL.md +155 -1
- package/assets/skills/oat-project-revise/SKILL.md +51 -4
- package/assets/skills/oat-project-summary/SKILL.md +150 -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/closeout-check/closeout-invariant.d.ts +119 -3
- package/dist/commands/project/closeout-check/closeout-invariant.d.ts.map +1 -1
- package/dist/commands/project/closeout-check/closeout-invariant.js +454 -2
- package/dist/commands/project/closeout-check/index.d.ts +21 -3
- package/dist/commands/project/closeout-check/index.d.ts.map +1 -1
- package/dist/commands/project/closeout-check/index.js +190 -4
- package/dist/commands/project/complete-state/index.d.ts +2 -1
- package/dist/commands/project/complete-state/index.d.ts.map +1 -1
- package/dist/commands/project/complete-state/index.js +7 -1
- package/dist/commands/project/delivery/check.d.ts +66 -0
- package/dist/commands/project/delivery/check.d.ts.map +1 -0
- package/dist/commands/project/delivery/check.js +232 -0
- package/dist/commands/project/delivery/evidence.d.ts +171 -0
- package/dist/commands/project/delivery/evidence.d.ts.map +1 -0
- package/dist/commands/project/delivery/evidence.js +902 -0
- package/dist/commands/project/delivery/index.d.ts +7 -0
- package/dist/commands/project/delivery/index.d.ts.map +1 -0
- package/dist/commands/project/delivery/index.js +13 -0
- package/dist/commands/project/delivery/refresh.d.ts +110 -0
- package/dist/commands/project/delivery/refresh.d.ts.map +1 -0
- package/dist/commands/project/delivery/refresh.js +441 -0
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/commands/project/log/append.d.ts +6 -0
- package/dist/commands/project/log/append.d.ts.map +1 -1
- package/dist/commands/project/log/append.js +6 -1
- 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 +81 -7
- package/dist/commands/project/promote/promote.d.ts +46 -1
- package/dist/commands/project/promote/promote.d.ts.map +1 -1
- package/dist/commands/project/promote/promote.js +646 -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 +62 -18
- package/dist/commands/project/validate-plan/profiles.d.ts +69 -0
- package/dist/commands/project/validate-plan/profiles.d.ts.map +1 -0
- package/dist/commands/project/validate-plan/profiles.js +420 -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 +2 -0
- package/dist/commands/state/generate.d.ts.map +1 -1
- package/dist/commands/state/generate.js +82 -2
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oat-project-goal
|
|
3
|
+
description: Use when an outcome needs several deliveries over time - one approved Project Brief with a Milestones table, a milestone loop of activation, delivery and re-alignment, and a terminal declaration audited against the brief's outcomes.
|
|
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
|
+
# Goal Project
|
|
14
|
+
|
|
15
|
+
Create or resume a project in **goal mode**: one reviewed, approved Project
|
|
16
|
+
Brief in `plan.md` whose phases are grouped into milestones, delivered one
|
|
17
|
+
milestone at a time, re-aligned between milestones, and closed by an explicit
|
|
18
|
+
declaration audited against the brief's outcomes.
|
|
19
|
+
|
|
20
|
+
## Hook-safe exact-path commits
|
|
21
|
+
|
|
22
|
+
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`.
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- A repository initialized for OAT (`.oat/` and `.agents/` exist).
|
|
27
|
+
- An outcome that needs more than one delivery, whose first milestone can be
|
|
28
|
+
agreed in conversation without a separate discovery, spec, or design
|
|
29
|
+
document. One delivery is a brief project (`oat-project-brief`).
|
|
30
|
+
|
|
31
|
+
## Mode Assertion
|
|
32
|
+
|
|
33
|
+
**OAT MODE: Goal**
|
|
34
|
+
|
|
35
|
+
**Purpose:** Reach design alignment for the whole outcome, write one Project
|
|
36
|
+
Brief with a canonical Milestones table, take it through the standard
|
|
37
|
+
pre-implementation review ladder, approve it once, and then own each milestone's
|
|
38
|
+
activation, re-alignment and the terminal declaration. Phases carry intent and
|
|
39
|
+
exit evidence; tasks are execution records created during implementation.
|
|
40
|
+
|
|
41
|
+
Resolve the shared brief contract from the sibling `oat-project-brief` skill in
|
|
42
|
+
the same installed scope as this skill:
|
|
43
|
+
`BRIEF_CONTRACT="$(dirname "$GOAL_SKILL_DIR")/oat-project-brief/references/brief-contract.md"`,
|
|
44
|
+
where `GOAL_SKILL_DIR` is the directory this `SKILL.md` was loaded from. Read
|
|
45
|
+
sections 1–11 and section 12 (goal mode) before Step 2. A missing contract
|
|
46
|
+
stops the run with `oat tools install workflows --scope <user|project>`. The
|
|
47
|
+
contract wins wherever this skill restates a rule; this skill names the
|
|
48
|
+
section rather than repeating it.
|
|
49
|
+
|
|
50
|
+
When `OAT_AUTONOMOUS=1`, read `references/docs/autonomy-contract.md` and keep
|
|
51
|
+
`OAT_NON_INTERACTIVE=1` set for the run. Resolve every interactive decision
|
|
52
|
+
through its `GOAL-NN` row and stop only where that row declares a boundary:
|
|
53
|
+
|
|
54
|
+
- `GOAL-01`: inherited dirty tree;
|
|
55
|
+
- `GOAL-02`: missing project name or description;
|
|
56
|
+
- `GOAL-03`: alignment interview and milestone split;
|
|
57
|
+
- `GOAL-04`: workflow fit;
|
|
58
|
+
- `GOAL-05`: dispatch-ladder scope;
|
|
59
|
+
- `GOAL-06`: project dispatch policy;
|
|
60
|
+
- `GOAL-07`: optional phase-gate setup;
|
|
61
|
+
- `GOAL-08`: configured lifecycle gate posture;
|
|
62
|
+
- `GOAL-09`: brief or amendment artifact-review findings;
|
|
63
|
+
- `GOAL-10`: configured milestone plan gate;
|
|
64
|
+
- `GOAL-11`: brief or amendment approval;
|
|
65
|
+
- `GOAL-12`: re-alignment delta interview; and
|
|
66
|
+
- `GOAL-13`: terminal declaration, always a boundary.
|
|
67
|
+
|
|
68
|
+
Record each autonomous resolution and its provenance in the artifact named by
|
|
69
|
+
the row. Never persist either autonomy environment signal. Goal projects are
|
|
70
|
+
not run by `oat-project-autonomous`.
|
|
71
|
+
|
|
72
|
+
**BLOCKED Activities:**
|
|
73
|
+
|
|
74
|
+
- No `discovery.md`, `spec.md`, or `design.md` authoring; agreed design lives
|
|
75
|
+
in the brief's Approach and Decisions.
|
|
76
|
+
- No `### Task` headings in `plan.md` and no execution records in
|
|
77
|
+
`implementation.md`; tasks are opened only when work starts.
|
|
78
|
+
- No implementation code changes, no review production, no delivery
|
|
79
|
+
registration, and no exit-gate carrier writes: those belong to
|
|
80
|
+
`oat-project-implement`, the review skills, and `oat-project-pr-progress` /
|
|
81
|
+
`oat-project-pr-final`.
|
|
82
|
+
- Never write `implementing` for a milestone whose previous delivery is not
|
|
83
|
+
observed at its agreed endpoint, and never write `declared_met` without the
|
|
84
|
+
user's explicit declaration.
|
|
85
|
+
|
|
86
|
+
**ALLOWED Activities:**
|
|
87
|
+
|
|
88
|
+
- Goal scaffolding, milestone state, and project metadata updates.
|
|
89
|
+
- A conversational interview in readiness rounds, with facts resolved by the
|
|
90
|
+
agent and decisions put to the user.
|
|
91
|
+
- One Project Brief with its Milestones table, amended in place at each
|
|
92
|
+
re-alignment.
|
|
93
|
+
- Artifact review, dispatch policy resolution, the configured gate and one
|
|
94
|
+
approval for the brief and for each amendment, and the milestone `plan`
|
|
95
|
+
carrier those produce.
|
|
96
|
+
- `oat project delivery refresh`, learnings capture, milestone activation, and
|
|
97
|
+
the terminal declaration with its outcome audit.
|
|
98
|
+
|
|
99
|
+
**Self-Correction Protocol:**
|
|
100
|
+
|
|
101
|
+
- If the outcome is one delivery, recommend `oat-project-brief` instead.
|
|
102
|
+
- If the user wants an approved up-front task plan, offer promotion to quick
|
|
103
|
+
at a settled delivery boundary (brief contract section 11).
|
|
104
|
+
- If implementation code is about to change, stop and hand off to
|
|
105
|
+
`oat-project-implement`.
|
|
106
|
+
|
|
107
|
+
## Progress Indicators (User-Facing)
|
|
108
|
+
|
|
109
|
+
Print this banner once after entry:
|
|
110
|
+
|
|
111
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
112
|
+
OAT ▸ GOAL
|
|
113
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
114
|
+
|
|
115
|
+
Use these compact progress lines for the entry:
|
|
116
|
+
|
|
117
|
+
- `[0/9] Checking inherited git state…`
|
|
118
|
+
- `[1/9] Resolving the goal project and entry…`
|
|
119
|
+
- `[2/9] Running the alignment interview…`
|
|
120
|
+
- `[3/9] Writing and committing the brief and milestones…`
|
|
121
|
+
- `[4/9] Resolving dispatch and gate setup…`
|
|
122
|
+
- `[5/9] Reviewing the brief artifact…`
|
|
123
|
+
- `[6/9] Running the configured gate…`
|
|
124
|
+
- `[7/9] Confirming approval and recording the plan carrier…`
|
|
125
|
+
- `[8/9] Initializing the journal and milestone state…`
|
|
126
|
+
- `[9/9] Activating the milestone and handing off…`
|
|
127
|
+
|
|
128
|
+
Re-alignment and declaration entries print `[realign mNN]` and
|
|
129
|
+
`[declare]` before their step lines.
|
|
130
|
+
|
|
131
|
+
## Artifact Persistence (Required)
|
|
132
|
+
|
|
133
|
+
- Save every change to `plan.md`, `state.md`, and `implementation.md`
|
|
134
|
+
immediately. Never leave interview answers, agreed design, or milestone
|
|
135
|
+
membership only in conversation.
|
|
136
|
+
- Commit the authored brief (or amendment) before any review dispatch. The
|
|
137
|
+
reviewer and the gate read the committed brief, not the session.
|
|
138
|
+
- Commit the recorded review disposition before Gate Execution so the gate
|
|
139
|
+
sees a committed core-artifact baseline.
|
|
140
|
+
- After a receive-eligible gate handoff, commit its receive bookkeeping. The
|
|
141
|
+
approval, the `plan` carrier and milestone state are committed together
|
|
142
|
+
after approval.
|
|
143
|
+
- Before each scoped commit, resolve the project scope. Scope resolution fails
|
|
144
|
+
closed. A synced project uses `oat project push` with the same message;
|
|
145
|
+
another scope uses `oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-goal:1" --message "$BOOKKEEPING_MESSAGE" -- "$PROJECT_PATH/plan.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/implementation.md"`
|
|
146
|
+
(adding `"$PROJECT_PATH/oat-execution-learnings.md"` only when this run
|
|
147
|
+
wrote it) and stops on a nonzero exit. Set the same bookkeeping message and a
|
|
148
|
+
distinct operation identity for each lifecycle write; retain both for
|
|
149
|
+
retries. Never include unrelated paths.
|
|
150
|
+
|
|
151
|
+
## Artifact Hygiene
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
|
|
155
|
+
After formatting, run only repository checks relevant to the files changed;
|
|
156
|
+
writing lifecycle artifacts does not imply unrelated full test suites.
|
|
157
|
+
|
|
158
|
+
## Project Log
|
|
159
|
+
|
|
160
|
+
Defer entry flags to `oat project log append --help`; never pre-check project
|
|
161
|
+
log configuration: the helper no-ops when logging is disabled.
|
|
162
|
+
|
|
163
|
+
- At each milestone activation (Step 7), append exactly one structural entry:
|
|
164
|
+
`oat project log append --project "$PROJECT_PATH" --structural --producer oat-project-goal --ref <activated mNN> --idempotency-key "<goal-slug>-activate-<mNN>" --body "Activated <mNN> (<ordered phase ids>); <goal-slug>-activate-<mNN>"`.
|
|
165
|
+
- At each re-alignment entry (Step 8), append exactly one structural entry with
|
|
166
|
+
`--ref <delivered mNN>` and the key `<goal-slug>-realign-<mNN>`.
|
|
167
|
+
- Learnings capture at re-alignment is a judgment entry (brief contract
|
|
168
|
+
section 12.10).
|
|
169
|
+
|
|
170
|
+
The idempotency key makes a resumed step report `already-appended` instead of
|
|
171
|
+
duplicating the entry. Commit each append with the bookkeeping commit of the
|
|
172
|
+
step that owns it.
|
|
173
|
+
|
|
174
|
+
## Process
|
|
175
|
+
|
|
176
|
+
### Step 0 (Preflight): Inherited Git State
|
|
177
|
+
|
|
178
|
+
Before scaffolding or writing, surface the working tree state so unrelated
|
|
179
|
+
changes don't get carried into the project workflow's bookkeeping commits.
|
|
180
|
+
|
|
181
|
+
1. Run `git status --porcelain`. If empty, continue silently.
|
|
182
|
+
2. If `.oat/sync/manifest.json` is the only entry **and** its two-character
|
|
183
|
+
status code is either `??` or made up solely of the letter `M` and blanks —
|
|
184
|
+
a plain modification, staged, unstaged, or both — commit it without asking:
|
|
185
|
+
`oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-goal:2" --message "chore: run sync" -- .oat/sync/manifest.json`.
|
|
186
|
+
Report the commit and continue. Every other code falls through, including
|
|
187
|
+
`MD`, `MT`, `AM`, `RM`, `CM`, and every unmerged state.
|
|
188
|
+
3. Otherwise, present the dirty list to the user and offer commit now, proceed
|
|
189
|
+
anyway, or abort (`GOAL-01`). Note generated provider-view paths when they
|
|
190
|
+
appear. Commit now stages only the paths the user selected.
|
|
191
|
+
4. When the response channel is unavailable and `OAT_NON_INTERACTIVE=1`, apply
|
|
192
|
+
`GOAL-01`: proceed without staging unrelated files. Destructive cleanup is
|
|
193
|
+
a stop boundary.
|
|
194
|
+
|
|
195
|
+
Once the dirty list has been presented, do not advance past this gate without
|
|
196
|
+
an explicit choice. The step 2 manifest-only auto-commit is not a choice point
|
|
197
|
+
and continues on its own.
|
|
198
|
+
|
|
199
|
+
### Step 0.5: Resolve the Goal Project and the Entry
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
PROJECT_PATH=$(oat config get activeProject 2>/dev/null || true)
|
|
203
|
+
PROJECTS_ROOT="${OAT_PROJECTS_ROOT:-$(oat config get projects.root 2>/dev/null || echo ".oat/projects/shared")}"
|
|
204
|
+
PROJECTS_ROOT="${PROJECTS_ROOT%/}"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
When `PROJECT_PATH` names an existing project whose `state.md` records
|
|
208
|
+
`oat_workflow_mode: goal`, resume it and never re-scaffold. Read the router's
|
|
209
|
+
recommendation (`oat project status --json`, `recommendation.context`) and
|
|
210
|
+
choose the entry:
|
|
211
|
+
|
|
212
|
+
| Project state | Entry |
|
|
213
|
+
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
214
|
+
| `plan.md` not yet `oat_status: complete` | **Authoring**: the earliest step whose output is missing (no authored brief → Step 2; no disposition → Step 3.6; no gate outcome → Gate Execution; no approval → Step 3.7) |
|
|
215
|
+
| Reason `Active milestone membership invalid` | **Membership repair** (Step 3, Milestones table only) |
|
|
216
|
+
| `oat_milestone_status: aligning` (context `align mNN`) | **Activation** (Step 7), after any missing `plan` carrier is produced through Steps 3.6–3.7 for that milestone |
|
|
217
|
+
| `oat_milestone_status: delivered` (context `realign mNN`) | **Re-alignment** (Step 8), or the **terminal declaration** (Step 9) when the user declares the goal met |
|
|
218
|
+
| `oat_goal_status: declared_met` with context `audit` | **Audit repair** (Step 9, audit only) |
|
|
219
|
+
| `implementing`, `reviewing`, `delivering`, a pending `oat_goal_recovery`, or terminal recovery | Not this skill's transition: report the router's recommended skill and stop |
|
|
220
|
+
|
|
221
|
+
Preserve every authored section, phase, milestone row, and `## Reviews` row;
|
|
222
|
+
never copy a template over an authored brief. A promoted goal is a quick
|
|
223
|
+
project and resumes through `oat-project-quick-start`.
|
|
224
|
+
|
|
225
|
+
If no valid active goal project exists, resolve a project name and substantive
|
|
226
|
+
description from `$ARGUMENTS`. A bare name is insufficient. Ask for the missing
|
|
227
|
+
startup input under `GOAL-02`; in autonomous mode derive both only from the
|
|
228
|
+
explicit goal and stop if it is not substantive.
|
|
229
|
+
|
|
230
|
+
Create the project through the canonical scaffolder:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
oat project new "{project-name}" --mode goal
|
|
234
|
+
PROJECT_PATH=$(oat config get activeProject)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Confirm `"$PROJECT_PATH/state.md"` reports `oat_workflow_mode: goal`,
|
|
238
|
+
`oat_phase: plan`, and `oat_phase_status: in_progress`; that `plan.md` carries
|
|
239
|
+
`oat_plan_source: goal` and the canonical `| Milestone | Phases |` header
|
|
240
|
+
under `## Milestones`; and that `implementation.md` and `references/research/`
|
|
241
|
+
exist. A missing file or a different mode stops the run before any write. Do
|
|
242
|
+
not create discovery, spec, or design artifacts.
|
|
243
|
+
|
|
244
|
+
**Consolidating earlier scaffolds.** When this goal project absorbs work that
|
|
245
|
+
earlier project scaffolds already started, record `absorbed_projects: [<slug>]`
|
|
246
|
+
and `absorbed_backlog_ids: [<BL-id>]` in `"$PROJECT_PATH/state.md"` as one
|
|
247
|
+
frontmatter write immediately after the scaffold, with the same shapes and
|
|
248
|
+
meaning that `oat-project-brief` records. Record them only when a
|
|
249
|
+
consolidation actually happened.
|
|
250
|
+
|
|
251
|
+
### Step 1: Set Metadata and Read Repository Knowledge
|
|
252
|
+
|
|
253
|
+
Update `"$PROJECT_PATH/state.md"` frontmatter (brief contract section 12.2):
|
|
254
|
+
|
|
255
|
+
- `oat_workflow_mode: goal`
|
|
256
|
+
- `oat_workflow_origin: native`
|
|
257
|
+
- `oat_phase: plan`
|
|
258
|
+
- `oat_phase_status: in_progress`
|
|
259
|
+
- `oat_milestone: m01` and `oat_milestone_status: aligning` (new → aligning)
|
|
260
|
+
- `oat_goal_status: active`, `oat_goal_outcome_audit: null`,
|
|
261
|
+
`oat_goal_recovery: null`, `oat_milestone_gates: {}`, `oat_deliveries: []`
|
|
262
|
+
- `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
|
|
263
|
+
|
|
264
|
+
Read repository instructions and the minimum durable context the interview
|
|
265
|
+
needs. Start with root `AGENTS.md`/`CLAUDE.md`. If `.oat/repo/AGENTS.md`
|
|
266
|
+
exists, follow its routing into current state, decisions, and references.
|
|
267
|
+
Settle facts from code, docs, and research before asking about them.
|
|
268
|
+
|
|
269
|
+
### Step 2: Alignment Interview
|
|
270
|
+
|
|
271
|
+
Follow the readiness and design-strand rules in brief contract section 4
|
|
272
|
+
(`GOAL-03`): readiness rounds with a recommendation and tradeoff per question,
|
|
273
|
+
facts settled by the agent, decisions put to the user, Known Unknowns for
|
|
274
|
+
phase-local questions, and a stop criterion of explicit design alignment.
|
|
275
|
+
|
|
276
|
+
Goal adds the **milestone split**: agree which outcomes each milestone
|
|
277
|
+
delivers, its ordered phases, and its agreed delivery endpoint (`open` or
|
|
278
|
+
`merged`, recorded once under Delivery endpoint and authority). The first
|
|
279
|
+
milestone must be concrete enough to activate; later milestones may be sketched
|
|
280
|
+
with provisional phases or left for re-alignment.
|
|
281
|
+
|
|
282
|
+
Persist interview results as you go in `"$PROJECT_PATH/plan.md"`.
|
|
283
|
+
|
|
284
|
+
**Workflow fit (`GOAL-04`).** Change course only on content, never on
|
|
285
|
+
interview length:
|
|
286
|
+
|
|
287
|
+
- One delivery → recommend `oat-project-brief` and abandon this scaffold.
|
|
288
|
+
- Several unrelated outcomes → recommend separate projects, or
|
|
289
|
+
`oat-project-split` for a confirmed broad scope.
|
|
290
|
+
- A design question cannot be settled without a separate design artifact →
|
|
291
|
+
recommend quick with lightweight design (before the brief is committed,
|
|
292
|
+
abandon the scaffold and start `oat-project-quick-start`).
|
|
293
|
+
- The user wants a maintained, approved up-front task plan → quick; a goal
|
|
294
|
+
promotes only at a settled delivery boundary (brief contract section 11).
|
|
295
|
+
|
|
296
|
+
Otherwise record in Decisions why goal fits and continue.
|
|
297
|
+
|
|
298
|
+
### Step 3: Write the Brief and Milestones in One Pass and Commit
|
|
299
|
+
|
|
300
|
+
Write `"$PROJECT_PATH/plan.md"` in one pass from the agreed interview, keeping
|
|
301
|
+
the scaffold frontmatter (`oat_plan_source: goal`, `oat_template: true`,
|
|
302
|
+
`oat_status: in_progress`, `oat_ready_for: null`) until Step 3.7. Keep
|
|
303
|
+
`oat_plan_hill_phases: []`, which means none for brief-family modes.
|
|
304
|
+
|
|
305
|
+
The brief follows brief contract section 1 in template order. The
|
|
306
|
+
`## Milestones` section holds the canonical table of section 12.1: the
|
|
307
|
+
scaffold's header and separator, then one row per milestone with its ordered,
|
|
308
|
+
comma-separated phase IDs. Every phase, revision phases included, belongs to
|
|
309
|
+
exactly one milestone. Each phase follows the strict grammar of section 2; the
|
|
310
|
+
first phase of the first milestone is concrete. Declare
|
|
311
|
+
`oat_plan_parallel_groups` only for concrete phases inside one milestone that
|
|
312
|
+
pass the independence test. Seed `## Reviews` with the `plan | artifact` row
|
|
313
|
+
and one `code` row per concrete phase; goal integrated reviews add rows whose
|
|
314
|
+
Scope cell is the milestone ID (section 12.6).
|
|
315
|
+
|
|
316
|
+
Validate with the goal profile:
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
oat project validate-plan --project-path "$PROJECT_PATH"
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Resolve every error before continuing: the brief-profile codes of section 2 and
|
|
323
|
+
the goal-profile codes of section 12.1. Remove any `### Task` heading that
|
|
324
|
+
triggers `brief-task-headings-ignored`.
|
|
325
|
+
|
|
326
|
+
**Membership repair.** When the router reports invalid membership, edit only
|
|
327
|
+
the Milestones table. A repair that changes no milestone's ordered phase set
|
|
328
|
+
(formatting, ID normalization, a missing separator) re-validates and commits
|
|
329
|
+
as bookkeeping. A repair that changes membership is an amendment: it repeats
|
|
330
|
+
Steps 3.6, Gate Execution and 3.7 for the affected milestone. Never move a
|
|
331
|
+
phase frozen in a registered delivery.
|
|
332
|
+
|
|
333
|
+
Format the brief, resolve project scope, and create the scoped pre-review
|
|
334
|
+
commit required by Artifact Persistence. Only after that commit is durable may
|
|
335
|
+
Step 3.5 run.
|
|
336
|
+
|
|
337
|
+
### Step 3.5: Resolve Dispatch Ladder and Ceiling
|
|
338
|
+
|
|
339
|
+
Invoke the complete **Managed Dispatch Readiness and Review Contract** from
|
|
340
|
+
`oat-project-plan-writing`, including its `Complete Dispatch Ladder Adoption
|
|
341
|
+
Contract`. Load the current `oat-project-plan-writing/SKILL.md` and follow
|
|
342
|
+
that contract as written. Do not copy model names into the skill.
|
|
343
|
+
|
|
344
|
+
Apply `GOAL-05`, identical to `QS-08`, to the ladder ownership decision, and
|
|
345
|
+
`GOAL-06`, identical to `QS-09`, to the project policy (project
|
|
346
|
+
`oat_dispatch_policy`, legacy `oat_dispatch_ceiling`, config
|
|
347
|
+
`workflow.dispatchPolicy.*` as a proposed starting value, then an interactive
|
|
348
|
+
choice rendered by `oat project dispatch-ceiling choices --format markdown`).
|
|
349
|
+
Unresolved non-interactive state blocks implementation readiness. Persist the
|
|
350
|
+
policy only in `"$PROJECT_PATH/state.md"`.
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role reviewer --preflight --json
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Re-alignment reuses the recorded policy; it re-runs this step only when the
|
|
357
|
+
policy is unresolved.
|
|
358
|
+
|
|
359
|
+
### Step 3.55: Configure Optional Phase Gate Review
|
|
360
|
+
|
|
361
|
+
Invoke the `Shared Phase Gate Review Setup Contract` from
|
|
362
|
+
`oat-project-plan-writing`: load the current
|
|
363
|
+
`oat-project-plan-writing/SKILL.md` and follow that contract as written
|
|
364
|
+
(`GOAL-07`). Preserve an explicit
|
|
365
|
+
`oat_phase_review_gate` without probing or mutation. Goal projects have no
|
|
366
|
+
HiLL setup. Re-alignment skips this step.
|
|
367
|
+
|
|
368
|
+
### Step 3.57: Configure Lifecycle Gate Posture
|
|
369
|
+
|
|
370
|
+
After the brief has stable phase IDs and before Step 3.6,
|
|
371
|
+
invoke the `Shared Lifecycle Gate Posture Setup Contract` from
|
|
372
|
+
`oat-project-plan-writing`: load the current
|
|
373
|
+
`oat-project-plan-writing/SKILL.md` and follow that contract as written.
|
|
374
|
+
Supply exactly this relevant set: `oat-project-goal` and
|
|
375
|
+
`oat-project-implement`.
|
|
376
|
+
|
|
377
|
+
Apply `GOAL-08` to the shared contract's interaction. When
|
|
378
|
+
`oat_skill_gate_overrides` already exists, preserve it through the shared
|
|
379
|
+
contract without probing, prompting, or mutation. Otherwise, in interactive
|
|
380
|
+
planning, offer Keep or Disable independently for each configured gate in the
|
|
381
|
+
relevant set. Persist only disabled choices to `"$PROJECT_PATH/state.md"`.
|
|
382
|
+
Never modify the shared, local, or user configuration layers. In
|
|
383
|
+
non-interactive planning, preserve configured gates and do not invent or write
|
|
384
|
+
an override. Re-alignment skips this step.
|
|
385
|
+
|
|
386
|
+
### Step 3.6: Run the Artifact Review Loop
|
|
387
|
+
|
|
388
|
+
Invoke the `Auto Artifact-Review Loop` from `oat-project-plan-writing`. Load
|
|
389
|
+
the current `oat-project-plan-writing/SKILL.md` and follow that loop as
|
|
390
|
+
written, with:
|
|
391
|
+
|
|
392
|
+
- `target: plan`
|
|
393
|
+
- `type: artifact`
|
|
394
|
+
- `scope: plan`
|
|
395
|
+
- `artifact_path: "$PROJECT_PATH/plan.md"`
|
|
396
|
+
- `oat_output_mode: structured`
|
|
397
|
+
- `artifact_paths: { brief_contract: "$BRIEF_CONTRACT" }`
|
|
398
|
+
|
|
399
|
+
For an amendment, the request names the milestone under review and its
|
|
400
|
+
ordered phase set, and the reviewer receives the committed amended brief and
|
|
401
|
+
the contract, never the interview session. Resolve
|
|
402
|
+
`workflow.autoArtifactReview.plan`; only explicit `false` skips the loop.
|
|
403
|
+
|
|
404
|
+
Disposition of findings (`GOAL-09`): fold minor, artifact-local findings
|
|
405
|
+
without changing intent; take a material finding (one that would change an
|
|
406
|
+
Outcome, the Approach, a Decision, a phase boundary, milestone membership, the
|
|
407
|
+
endpoint, or the authority) back to the user as a short, focused realignment
|
|
408
|
+
and re-run the loop on the new commit. Under autonomy apply only unambiguous
|
|
409
|
+
artifact-local fixes and stop on an unresolved Critical finding or material
|
|
410
|
+
ambiguity.
|
|
411
|
+
|
|
412
|
+
Record the review row in `## Reviews` (or the explicit skip
|
|
413
|
+
`Plan artifact review: skipped (workflow.autoArtifactReview.plan=false)`).
|
|
414
|
+
Format and validate again, then create the post-review scoped commit before
|
|
415
|
+
Gate Execution.
|
|
416
|
+
|
|
417
|
+
### Gate Execution
|
|
418
|
+
|
|
419
|
+
The gate reviews the committed `plan.md`, `state.md`, and `implementation.md`
|
|
420
|
+
bundle after Step 3.6 and before Step 3.7, so the user approves what the gate
|
|
421
|
+
already reviewed. Its outcome becomes the milestone's `plan` carrier (brief
|
|
422
|
+
contract section 12.4), written at Step 3.7, never `oat_brief_gate`.
|
|
423
|
+
|
|
424
|
+
1. Resolve the gate for this skill with project context:
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
oat gate resolve <this-skill> --project "$PROJECT_PATH" --json
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Handle all three `resolution` values explicitly:
|
|
431
|
+
- `not_configured`: no gate is configured; launch nothing and proceed to the approval in Step 3.7 below with resolution `no_gate`.
|
|
432
|
+
- `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, and proceed to the approval in Step 3.7 below with resolution `project_disabled`. A project-disabled gate never enters the passed, missing, or failed branches, and its `configuredGate` is evidence only, never executed.
|
|
433
|
+
- `configured`: continue with the steps below, executing `effectiveGate` exactly as configured.
|
|
434
|
+
|
|
435
|
+
A null, missing, malformed, or unrecognized result is an operational failure
|
|
436
|
+
that fails closed as unresolved. Never treat it as "no gate configured."
|
|
437
|
+
|
|
438
|
+
2. Export `PROJECT_PATH`. If the stored command invokes lifecycle gate review,
|
|
439
|
+
its canonical form is:
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
oat --json gate review --project "$PROJECT_PATH" ...
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Use global `--json` before `gate review`. Reject `oat gate
|
|
446
|
+
review ...` without the global `--json` placement. Reusable declarations
|
|
447
|
+
must not contain `--target <id>` or add it at runtime. Stop and migrate an invalid stored
|
|
448
|
+
declaration before execution; never inject or append execution-time argv.
|
|
449
|
+
|
|
450
|
+
3. When the current planning parent's model identity is available and the
|
|
451
|
+
command is `oat gate review`, export
|
|
452
|
+
`OAT_GATE_PRODUCER_IDENTITY=<model>:declared` only for that invocation.
|
|
453
|
+
Otherwise ensure it is unset. Do not persist it or alter the command.
|
|
454
|
+
4. Execute the resolved command exactly as configured. Capture stdout, stderr,
|
|
455
|
+
exit code, and structured JSON. Exit code alone never authorizes receipt.
|
|
456
|
+
5. Invoke receive only when all three conditions hold: status is `ok` or
|
|
457
|
+
`blocked`, `receiveEligible: true`, and a non-null `handoff` corroborates
|
|
458
|
+
the artifact. `receiveEligible: false` is a hard stop.
|
|
459
|
+
`targeting_correlation_failed` is never receivable. Correct and revalidate
|
|
460
|
+
`artifact_validation_failed` before receipt. Unknown, contradictory, or
|
|
461
|
+
malformed results stop.
|
|
462
|
+
6. For a validated, receive-eligible `blocked` result, apply `GOAL-10`:
|
|
463
|
+
- `block`: remediate and re-run the gate up to `maxAttempts` attempts
|
|
464
|
+
(default `2`);
|
|
465
|
+
- `prompt`: surface the failure and ask the human how to proceed; under
|
|
466
|
+
`OAT_AUTONOMOUS=1` it is a reported boundary;
|
|
467
|
+
- `warn`: record the validated gate failure and continue.
|
|
468
|
+
|
|
469
|
+
Operational, validation, targeting, launch, and receive failures never inherit
|
|
470
|
+
`onFailure` continuation semantics.
|
|
471
|
+
|
|
472
|
+
A gate that ends in `block` after attempts are exhausted, or at an unresolved
|
|
473
|
+
`prompt` boundary, means Step 3.7 MUST NOT run: write the milestone's `plan`
|
|
474
|
+
carrier as `status: blocked`, `disposition: null`, commit it with the receive
|
|
475
|
+
bookkeeping, and stop resumable. A blocked carrier is never approval.
|
|
476
|
+
|
|
477
|
+
Hold an allowed outcome (`passed`, `warned`, `prompt_approved`,
|
|
478
|
+
`project_disabled`, or `no_gate`) for Step 3.7. If the session ends before
|
|
479
|
+
approval, the resumed entry re-runs Gate Execution: a rerun replaces the
|
|
480
|
+
outcome.
|
|
481
|
+
|
|
482
|
+
### Step 3.7: Single Approval, Then the Plan Carrier
|
|
483
|
+
|
|
484
|
+
Reach this boundary only after the gate passes or resolves according to its
|
|
485
|
+
`onFailure` policy. The write order is fixed by brief contract section 12.4:
|
|
486
|
+
artifact review, gate, approval, and only then the `allowed` carrier.
|
|
487
|
+
|
|
488
|
+
1. Confirm the `plan` artifact row in `## Reviews` carries the Step 3.6
|
|
489
|
+
outcome.
|
|
490
|
+
2. This is the only approval for the brief or this amendment. Use
|
|
491
|
+
`AskUserQuestion` exactly once to offer:
|
|
492
|
+
1. Approve the reviewed brief (or amendment).
|
|
493
|
+
2. Revise: run a focused realignment, write the change, commit it, and
|
|
494
|
+
re-run Step 3.6 and Gate Execution before returning here. An editorial
|
|
495
|
+
fix that changes no Outcome, Approach, Decision, phase boundary,
|
|
496
|
+
milestone membership, endpoint, or authority does not re-run the ladder.
|
|
497
|
+
3. Promote to quick, only at a settled delivery boundary
|
|
498
|
+
(`oat project promote "$PROJECT_PATH" --to quick --json`; brief contract
|
|
499
|
+
section 11), then stop.
|
|
500
|
+
|
|
501
|
+
Under `OAT_AUTONOMOUS=1`, apply `GOAL-11`: approve the recorded brief or
|
|
502
|
+
amendment and write the approval evidence; contradictory or materially
|
|
503
|
+
incomplete outcomes stop at a product-judgment boundary.
|
|
504
|
+
|
|
505
|
+
3. Record the approval as one line under `## Delivery endpoint and authority`:
|
|
506
|
+
`- **Brief approved:** {YYYY-MM-DD} by {user | autonomous run (GOAL-11)} at {reviewed commit SHA}`
|
|
507
|
+
for the first approval, or
|
|
508
|
+
`- **Milestone {mNN} approved:** {YYYY-MM-DD} by {…} at {reviewed commit SHA}`
|
|
509
|
+
for an amendment.
|
|
510
|
+
4. **First approval only:** atomically update the `plan.md` frontmatter once:
|
|
511
|
+
`oat_status: complete`, `oat_ready_for: oat-project-implement`,
|
|
512
|
+
`oat_phase_status: complete`, `oat_template: false`. A later amendment never
|
|
513
|
+
rewrites these fields.
|
|
514
|
+
5. Write `oat_milestone_gates[mNN].plan` for the milestone this approval
|
|
515
|
+
covers, with the core fields defined in
|
|
516
|
+
`references/docs/gate-approval-record.md` and the carrier fields:
|
|
517
|
+
- `status: allowed`; `disposition` the held outcome (`passed`, `warned`,
|
|
518
|
+
`prompt_approved`, `project_disabled`, or `no_gate`);
|
|
519
|
+
- `resolution`: `configured`, `project_disabled`, or `no_gate`;
|
|
520
|
+
- `config_fingerprint`: the stable hash of the resolved declaration, or
|
|
521
|
+
`null` when no gate is configured;
|
|
522
|
+
- `reviewed_head`: the commit the gate reviewed, or `null` for
|
|
523
|
+
`project_disabled` and `no_gate`;
|
|
524
|
+
- `subject: { kind: plan, scope: [the milestone's ordered phase set],
|
|
525
|
+
ref: <reviewed commit SHA> }`;
|
|
526
|
+
- `decided_at`: the decision time.
|
|
527
|
+
|
|
528
|
+
If dispatch remains unresolved, review fails closed, or the outcome cannot be
|
|
529
|
+
recorded, leave the pre-review values unchanged and commit them before
|
|
530
|
+
stopping. Never expose an unreviewed or unapproved brief or amendment to
|
|
531
|
+
`oat-project-implement`.
|
|
532
|
+
|
|
533
|
+
### Step 4: Sync Project State
|
|
534
|
+
|
|
535
|
+
Update `"$PROJECT_PATH/state.md"`: `oat_workflow_mode: goal`,
|
|
536
|
+
`oat_phase: plan`, `oat_phase_status: complete`, `oat_current_task: null`,
|
|
537
|
+
`oat_hill_checkpoints: []`, and `oat_project_state_updated`. Keep
|
|
538
|
+
`oat_milestone_status: aligning` until activation.
|
|
539
|
+
|
|
540
|
+
### Step 5: Initialize or Extend the Journal
|
|
541
|
+
|
|
542
|
+
Prepare `"$PROJECT_PATH/implementation.md"` from the `implementation-brief`
|
|
543
|
+
scaffold as brief Step 5 does: frontmatter `oat_status: in_progress`,
|
|
544
|
+
`oat_template: false`; one Progress Overview row per authored phase; one
|
|
545
|
+
`## Phase pNN: <name>` section per authored phase containing only
|
|
546
|
+
`**Status:** pending`. At re-alignment, append sections and rows only for the
|
|
547
|
+
newly authored phases; never rewrite an existing phase section.
|
|
548
|
+
|
|
549
|
+
### Step 6: Refresh Repo Dashboard and Commit
|
|
550
|
+
|
|
551
|
+
```bash
|
|
552
|
+
oat state refresh
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
Format the scoped artifacts, resolve project scope, and commit the approval,
|
|
556
|
+
the `plan` carrier, milestone state and journal through the Artifact
|
|
557
|
+
Persistence rule with a new operation identity. The repo dashboard
|
|
558
|
+
`.oat/state.md` is generated; do not stage it.
|
|
559
|
+
|
|
560
|
+
### Step 7: Activate the Milestone
|
|
561
|
+
|
|
562
|
+
Activation is the write to `implementing` (brief contract section 12.3). Check
|
|
563
|
+
every prerequisite against persisted state; `oat project status --json`
|
|
564
|
+
reports `Milestone mNN is ready to activate` only when they hold:
|
|
565
|
+
|
|
566
|
+
- `plan.md` `oat_status: complete` (the brief is approved);
|
|
567
|
+
- `oat_milestone_gates[mNN].plan` is `allowed`, not stale, and its subject binds
|
|
568
|
+
exactly the milestone's ordered phase set;
|
|
569
|
+
- every earlier non-superseded delivery is observed at its agreed endpoint
|
|
570
|
+
(run `oat project delivery refresh --project "$PROJECT_PATH" --json` first
|
|
571
|
+
when deliveries exist);
|
|
572
|
+
- the milestone's next phase, and every member of its next dispatched parallel
|
|
573
|
+
group, is concrete (later provisional phases are permitted);
|
|
574
|
+
- `oat_goal_status` is `active`.
|
|
575
|
+
|
|
576
|
+
A failed prerequisite stops with the router's reason; never write
|
|
577
|
+
`implementing` around it. When every prerequisite holds:
|
|
578
|
+
|
|
579
|
+
1. write `oat_milestone_status: implementing` and `oat_phase_status:
|
|
580
|
+
in_progress`, project `oat_pr_status` and `oat_pr_url` from the latest
|
|
581
|
+
delivery member's observed status (`merged`, `closed`, or `open`; both
|
|
582
|
+
`null` when no delivery exists yet), so a merged previous delivery no
|
|
583
|
+
longer reads as a live PR, and set `oat_current_task_id` in
|
|
584
|
+
`implementation.md` to the milestone's first incomplete phase ID;
|
|
585
|
+
2. append the activation structural log entry (Project Log);
|
|
586
|
+
3. commit through the Artifact Persistence rule (adding
|
|
587
|
+
`"$PROJECT_PATH/project-log.md"` when the append wrote it).
|
|
588
|
+
|
|
589
|
+
### Step 8: Re-alignment Entry (at `delivered`)
|
|
590
|
+
|
|
591
|
+
`delivered` means the milestone's delivery is registered, open and
|
|
592
|
+
review-ready; activation of the next milestone waits for the delivery's
|
|
593
|
+
agreed endpoint (brief contract sections 12.3 and 12.10).
|
|
594
|
+
|
|
595
|
+
1. **Refresh.** `oat project delivery refresh --project "$PROJECT_PATH" --json`.
|
|
596
|
+
Commit the persisted observations as bookkeeping. Refresh never writes
|
|
597
|
+
milestone status or recovery; when it reports stale evidence for the
|
|
598
|
+
delivered milestone, stop and report `oat-project-pr-progress` as the owner.
|
|
599
|
+
2. **Log the entry.** Append the re-alignment structural entry (Project Log).
|
|
600
|
+
3. **Capture learnings.** Write one judgment entry (`worked-well` or
|
|
601
|
+
`friction`) through `oat project log append` when the project log is
|
|
602
|
+
enabled; otherwise append a dated entry to
|
|
603
|
+
`"$PROJECT_PATH/oat-execution-learnings.md"` (create it when absent). This
|
|
604
|
+
write is the `delivered → aligning` prerequisite "learnings captured";
|
|
605
|
+
reflection without the write does not satisfy it. Never pre-check log
|
|
606
|
+
configuration: when the helper no-ops, write the learnings file instead.
|
|
607
|
+
4. **Delta interview (`GOAL-12`).** Ask only what changed: what the delivered
|
|
608
|
+
milestone taught, the next milestone's outcomes, phases and endpoint, and
|
|
609
|
+
any material change, which gets a focused realignment.
|
|
610
|
+
5. **Amend in place.** Append the next milestone's phases with new, never
|
|
611
|
+
reused IDs and its `## Milestones` row; amend Outcomes, Decisions or the
|
|
612
|
+
Approach only as agreed. Never reorder, remove, or reassign a phase frozen
|
|
613
|
+
in a registered delivery. Extraction of a phase to a child project is
|
|
614
|
+
recorded here (brief contract section 12.11). Validate (Step 3) and commit.
|
|
615
|
+
Do not push amendment commits onto a still-open delivery member's head
|
|
616
|
+
branch: its observed head would advance with a substantive change and
|
|
617
|
+
refresh would mark that delivery's evidence stale (section 12.8).
|
|
618
|
+
6. **Ladder.** Run Step 3.6, Gate Execution and Step 3.7 for the amendment.
|
|
619
|
+
This may complete while the previous delivery awaits its endpoint; it
|
|
620
|
+
writes the next milestone's `plan` carrier but neither `oat_milestone` nor
|
|
621
|
+
`implementing`.
|
|
622
|
+
7. **Advance and activate.** Once refresh observes the previous delivery at
|
|
623
|
+
its agreed endpoint (for an `open` endpoint the same observation suffices),
|
|
624
|
+
write `oat_milestone: m(N+1)` and `oat_milestone_status: aligning`, extend
|
|
625
|
+
the journal (Step 5), then run Step 7. Until then, stop and report that
|
|
626
|
+
activation waits for the endpoint.
|
|
627
|
+
|
|
628
|
+
### Step 9: Terminal Declaration and Outcome Audit
|
|
629
|
+
|
|
630
|
+
Only this skill writes `oat_goal_status: declared_met` and
|
|
631
|
+
`oat_goal_outcome_audit`, and only after the user's explicit declaration
|
|
632
|
+
(`GOAL-13`; under autonomy this is always a `product-judgment` boundary).
|
|
633
|
+
Declare at `delivered` with no pending `oat_goal_recovery`. Brief contract
|
|
634
|
+
section 12.9 is the audit contract.
|
|
635
|
+
|
|
636
|
+
1. Ask once whether the user declares the goal met; record the declaration as
|
|
637
|
+
one line in `implementation.md` under `## Final Summary (for PR/docs)`:
|
|
638
|
+
`**Goal declared met:** {YYYY-MM-DD} by user at {brief commit SHA}`. Never
|
|
639
|
+
record it in `plan.md`: an edit under `## Delivery endpoint and authority`
|
|
640
|
+
is a substantive change (brief contract section 12.8) and stales every
|
|
641
|
+
delivery whose member head carries it, such as the terminal deliveries
|
|
642
|
+
`oat-project-pr-final` registers after the declaration.
|
|
643
|
+
2. Run `oat project delivery refresh --project "$PROJECT_PATH" --json`.
|
|
644
|
+
3. Author the exhaustive audit over the full phase inventory and every
|
|
645
|
+
numbered outcome: each phase `accepted`, `extracted`, `deferred` or
|
|
646
|
+
`retired`, with non-empty `reason` and `scope_decision_ref` for deferred,
|
|
647
|
+
retired and deferred-child extracted phases; each outcome keyed by its
|
|
648
|
+
number with its exact text and `met`, `extracted`, `deferred` or `retired`;
|
|
649
|
+
`disposition: met` only when nothing is deferred or retired, otherwise
|
|
650
|
+
`met_with_deferrals`; `decided_at`, `declaration_ref` (the declaration
|
|
651
|
+
line in `implementation.md`), and `brief_identity` (the approved brief
|
|
652
|
+
commit). Every deferral or retirement is a scope decision the user approved
|
|
653
|
+
in this step.
|
|
654
|
+
4. Write `oat_goal_status: declared_met` and `oat_goal_outcome_audit` in one
|
|
655
|
+
`state.md` write and commit.
|
|
656
|
+
5. Check the declaration read-only:
|
|
657
|
+
`oat project closeout-check "$PROJECT_PATH" --json`. A refusal with
|
|
658
|
+
`not-declared` or `audit-invalid` (or the router's `audit` context) is this
|
|
659
|
+
skill's to repair; refusals naming implement, the review owners,
|
|
660
|
+
`oat-project-pr-progress` or `oat-project-pr-final` are terminal recovery
|
|
661
|
+
for those owners. Implement consumes the declaration and never declares the
|
|
662
|
+
goal met.
|
|
663
|
+
|
|
664
|
+
**Audit repair** (context `audit`): re-read the router's audit error codes,
|
|
665
|
+
correct only the audit (never the brief's outcome text to fit the audit), and
|
|
666
|
+
re-run step 5.
|
|
667
|
+
|
|
668
|
+
### Step 10: Output Next Action
|
|
669
|
+
|
|
670
|
+
Report the workflow mode (`goal`), the brief path, the milestones with their
|
|
671
|
+
ordered phases, the active milestone and its status, the review, gate and
|
|
672
|
+
approval records, any registered deliveries and their endpoint observations,
|
|
673
|
+
and the next skill from the router (`oat-project-implement` after activation;
|
|
674
|
+
the terminal recovery owner after a declaration).
|
|
675
|
+
|
|
676
|
+
```text
|
|
677
|
+
Goal milestone m01 activated. Next: oat-project-implement
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
## Success Criteria
|
|
681
|
+
|
|
682
|
+
- The interview reached explicit design alignment, including the milestone
|
|
683
|
+
split; facts were settled by the agent and decisions by the user.
|
|
684
|
+
- `plan.md` passes `oat project validate-plan` with the goal profile: a
|
|
685
|
+
canonical Milestones table in which every executable phase belongs to
|
|
686
|
+
exactly one milestone.
|
|
687
|
+
- The brief and every amendment were committed before artifact review, the
|
|
688
|
+
disposition was committed before the gate, and exactly one approval ran per
|
|
689
|
+
brief or amendment, after review and gate.
|
|
690
|
+
- `plan.md` `oat_status: complete` was written once, at the first approval;
|
|
691
|
+
each milestone's `plan` carrier was written `allowed` only after that
|
|
692
|
+
milestone's review, gate and approval, bound to its ordered phase set.
|
|
693
|
+
- No milestone was activated before the previous delivery was observed at its
|
|
694
|
+
agreed endpoint; learnings were written before re-alignment advanced.
|
|
695
|
+
- One structural log entry per activation and per re-alignment entry.
|
|
696
|
+
- `declared_met` and the audit were written only after the user's explicit
|
|
697
|
+
declaration, and the audit is exhaustive.
|