@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
|
@@ -5,7 +5,7 @@ disable-model-invocation: false
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Write, Bash(git:*), Bash(jq:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat pjm:*), Bash(oat project log:*), Bash(oat project push:*), Bash(oat project scope:*), Bash(oat template:*), Bash(oat tools:*), Glob, Grep, AskUserQuestion
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.5.
|
|
8
|
+
version: 1.5.9
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Project Summary
|
|
@@ -22,7 +22,7 @@ Produce a `summary.md` that serves as institutional memory — capturing what wa
|
|
|
22
22
|
|
|
23
23
|
## Prerequisites
|
|
24
24
|
|
|
25
|
-
**Required:** Active project with `implementation.md` that has meaningful progress (at least one completed task).
|
|
25
|
+
**Required:** Active project with `implementation.md` that has meaningful progress (at least one completed task; in brief modes, at least one accepted phase-unit).
|
|
26
26
|
|
|
27
27
|
## Mode Assertion
|
|
28
28
|
|
|
@@ -120,6 +120,12 @@ test -f "$PROJECT_PATH/implementation.md"
|
|
|
120
120
|
|
|
121
121
|
**If exists:** Read the file. Check for at least one task with `**Status:** completed`. If no completed tasks, warn: "No completed tasks found. Summary will be minimal."
|
|
122
122
|
|
|
123
|
+
In brief modes the prerequisite is one accepted phase-unit instead: a
|
|
124
|
+
`**Status:** completed` line directly under a `## Phase` heading of the
|
|
125
|
+
journal, before that phase's first `### Task` record (a completed execution
|
|
126
|
+
record is not an accepted unit). If no phase-unit is accepted, warn: "No
|
|
127
|
+
accepted phase-units found. Summary will be minimal."
|
|
128
|
+
|
|
123
129
|
### Step 2: Read Project Artifacts
|
|
124
130
|
|
|
125
131
|
For `oat_workflow_mode: lite`, use the reduced artifact contract and skip the
|
|
@@ -131,6 +137,19 @@ project accepts `discovery.md`, `spec.md`, and `design.md` as absent; do not
|
|
|
131
137
|
read or require them. Ground the summary in what actually shipped, with
|
|
132
138
|
`implementation.md` taking precedence over the plan.
|
|
133
139
|
|
|
140
|
+
For `oat_workflow_mode: brief`, read the brief's sources instead of the
|
|
141
|
+
ordinary list below; `discovery.md`, `spec.md`, and `design.md` are absent by
|
|
142
|
+
design:
|
|
143
|
+
|
|
144
|
+
| Source | Use |
|
|
145
|
+
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
146
|
+
| `plan.md` Goal, Outcomes, Approach | Overview and what the project set out to do; audit What Was Implemented against the numbered Outcomes |
|
|
147
|
+
| `plan.md` Decisions, Constraints and Out of Scope | Key Decisions and Tradeoffs Made |
|
|
148
|
+
| `plan.md` phases and `## Reviews` | Phase intent and review dispositions |
|
|
149
|
+
| `implementation.md` phase sections | Accepted phases, anchors, execution records, verification evidence, deviations, and `Brief deltas` |
|
|
150
|
+
| `implementation.md` Final Summary | Shipped results; takes precedence over the brief's plans |
|
|
151
|
+
| `state.md`, `project-log.md`, `oat-execution-learnings.md`, `references/research/` | Same roles as below, when present |
|
|
152
|
+
|
|
134
153
|
For every other workflow mode, read all available artifacts for synthesis:
|
|
135
154
|
|
|
136
155
|
- `"$PROJECT_PATH/discovery.md"` — initial request, decisions, constraints
|
|
@@ -231,6 +250,76 @@ test -f "$PROJECT_PATH/summary.md"
|
|
|
231
250
|
|
|
232
251
|
Copy template: `oat template resolve summary --output "$PROJECT_PATH/summary.md"`
|
|
233
252
|
|
|
253
|
+
**Brief modes (`oat_workflow_mode: brief`): freshness by phase fingerprint.**
|
|
254
|
+
Replace the task and revision comparison above with
|
|
255
|
+
`oat_summary_phase_fingerprint`, a stable hash of the ordered accepted phase
|
|
256
|
+
IDs; for each accepted phase its `**Head:**`, its `**Status:**` line, and the
|
|
257
|
+
`Status` of the latest `## Reviews` `code` row for that phase; and the brief's
|
|
258
|
+
Goal, Outcomes, and Decisions sections with whitespace normalized. Compute it
|
|
259
|
+
in bash from the project root with `PROJECT_PATH` set:
|
|
260
|
+
|
|
261
|
+
````bash
|
|
262
|
+
brief_summary_marker() {
|
|
263
|
+
awk -v id="$1" -v key="$2" '
|
|
264
|
+
/^[ \t]*(```|~~~)/ { fence = !fence; next }
|
|
265
|
+
fence { next }
|
|
266
|
+
/^#/ { owner = (index($0, "## Phase " id ": ") == 1); next }
|
|
267
|
+
!owner || found { next }
|
|
268
|
+
index($0, "**" key ":** ") == 1 {
|
|
269
|
+
v = substr($0, length("**" key ":** ") + 1); sub(/[ \t]+$/, "", v); print v; found = 1
|
|
270
|
+
}
|
|
271
|
+
' "$PROJECT_PATH/implementation.md"
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
brief_summary_fingerprint() {
|
|
275
|
+
local plan="$PROJECT_PATH/plan.md" id status head review section
|
|
276
|
+
{
|
|
277
|
+
for id in $(awk '
|
|
278
|
+
/^[ \t]*(```|~~~)/ { fence = !fence; next }
|
|
279
|
+
fence { next }
|
|
280
|
+
/^## Phase (p[0-9]+|p-rev[0-9]+): / { id = $3; sub(/:$/, "", id); print id }
|
|
281
|
+
' "$plan"); do
|
|
282
|
+
status=$(brief_summary_marker "$id" Status)
|
|
283
|
+
[ "$status" = completed ] || continue
|
|
284
|
+
head=$(brief_summary_marker "$id" Head)
|
|
285
|
+
review=$(awk -v id="$id" '
|
|
286
|
+
/^## Reviews[ \t]*$/ { in_reviews = 1; next }
|
|
287
|
+
in_reviews && /^## / { exit }
|
|
288
|
+
!in_reviews || !/^\|/ { next }
|
|
289
|
+
{
|
|
290
|
+
n = split($0, cells, "|")
|
|
291
|
+
for (i = 2; i < n; i++) { c = cells[i]; gsub(/^[ \t]+|[ \t]+$/, "", c); cells[i] = c }
|
|
292
|
+
if (!sc) { for (i = 2; i < n; i++) { if (cells[i] == "Scope") sc = i; if (cells[i] == "Type") ty = i; if (cells[i] == "Status") st = i }; next }
|
|
293
|
+
if (cells[sc] == id && cells[ty] == "code") last = cells[st]
|
|
294
|
+
}
|
|
295
|
+
END { print (last == "" ? "-" : last) }
|
|
296
|
+
' "$plan")
|
|
297
|
+
printf 'phase=%s head=%s status=%s review=%s\n' "$id" "${head:--}" "$status" "$review"
|
|
298
|
+
done
|
|
299
|
+
for section in Goal Outcomes Decisions; do
|
|
300
|
+
printf 'section=%s ' "$section"
|
|
301
|
+
awk -v heading="## $section" '
|
|
302
|
+
/^## / { in_section = ($0 == heading); next }
|
|
303
|
+
in_section { print }
|
|
304
|
+
' "$plan" | tr -s ' \t\n' ' ' | sed 's/^ //; s/ $//'
|
|
305
|
+
printf '\n'
|
|
306
|
+
done
|
|
307
|
+
} | { command -v sha256sum >/dev/null 2>&1 && sha256sum || shasum -a 256; } | cut -d' ' -f1
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
CURRENT_PHASE_FINGERPRINT=$(brief_summary_fingerprint)
|
|
311
|
+
````
|
|
312
|
+
|
|
313
|
+
- No existing summary, or `oat_summary_phase_fingerprint` differs from
|
|
314
|
+
`CURRENT_PHASE_FINGERPRINT`: refresh. Update What Was Implemented from the
|
|
315
|
+
newly accepted phases, Revision History when an accepted `p-revN` is new, and
|
|
316
|
+
Follow-up Items from review dispositions.
|
|
317
|
+
- Fingerprint unchanged: no phase-driven update. The autonomous-learnings and
|
|
318
|
+
project-log triggers above stay independent and can still require a refresh.
|
|
319
|
+
- A brief summary never reads or writes `oat_summary_last_task`; execution
|
|
320
|
+
records are not units. `oat-project-complete` recomputes the same
|
|
321
|
+
fingerprint with this fragment to decide whether `summary.md` is stale.
|
|
322
|
+
|
|
234
323
|
### Step 4: Generate / Update Summary Sections
|
|
235
324
|
|
|
236
325
|
For each section, synthesize content from the relevant artifacts. Apply these rules:
|
|
@@ -403,6 +492,10 @@ oat_summary_includes_revisions: [{ list of p-revN IDs reflected }]
|
|
|
403
492
|
---
|
|
404
493
|
```
|
|
405
494
|
|
|
495
|
+
In brief modes write `oat_summary_phase_fingerprint: {CURRENT_PHASE_FINGERPRINT}`
|
|
496
|
+
(Step 3) and omit `oat_summary_last_task`; keep `oat_summary_revision_count`
|
|
497
|
+
and `oat_summary_includes_revisions` as informational fields.
|
|
498
|
+
|
|
406
499
|
### Step 6: Roll Up Project Observations and Offer Backlog Graduation
|
|
407
500
|
|
|
408
501
|
Run this step after `summary.md` has been authored or refreshed, including the
|
|
@@ -6,7 +6,7 @@ disable-model-invocation: false
|
|
|
6
6
|
user-invocable: true
|
|
7
7
|
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
|
|
8
8
|
metadata:
|
|
9
|
-
version: 1.9.
|
|
9
|
+
version: 1.9.8
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Execute a Wave of External Plans
|
|
@@ -200,7 +200,8 @@ writes and stay on the orchestrator's own model class, the same rule
|
|
|
200
200
|
`oat project new wave-N-execution --mode quick --no-commit`. If the flag is
|
|
201
201
|
absent because of version skew, run the command without it, expect the scaffold
|
|
202
202
|
to auto-commit, record that generated commit, and land the wrapper artifacts in
|
|
203
|
-
a follow-up commit (Orc W1 scaffold evidence).
|
|
203
|
+
a follow-up commit (Orc W1 scaffold evidence). The wrapper stays in quick
|
|
204
|
+
mode: its lanes need task-level plans, so lite and brief do not apply.
|
|
204
205
|
2. **Verify scaffold substitution AND advance the lifecycle** in `state.md`.
|
|
205
206
|
On oat ≥0.1.65, verify that the basic scaffold placeholders
|
|
206
207
|
(`{ OAT_HILL_CHECKPOINTS }`, `{ OAT_PHASE }`, `{ OAT_WORKFLOW_MODE }`) were
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
oat_status: in_progress
|
|
3
|
+
oat_ready_for: null
|
|
4
|
+
oat_blockers: []
|
|
5
|
+
oat_last_updated: YYYY-MM-DD
|
|
6
|
+
oat_current_task_id: p01
|
|
7
|
+
oat_generated: false
|
|
8
|
+
oat_template: true
|
|
9
|
+
oat_template_name: implementation-brief
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Implementation: {Project Name}
|
|
13
|
+
|
|
14
|
+
**Started:** YYYY-MM-DD
|
|
15
|
+
**Last Updated:** YYYY-MM-DD
|
|
16
|
+
|
|
17
|
+
> This journal records execution of the Project Brief in `plan.md` and is used
|
|
18
|
+
> to resume interrupted sessions.
|
|
19
|
+
>
|
|
20
|
+
> Conventions:
|
|
21
|
+
>
|
|
22
|
+
> - Progress counts phase-units: each `## Phase pNN:` in `plan.md` is one unit,
|
|
23
|
+
> accepted only by the exact line `**Status:** completed` in its section here.
|
|
24
|
+
> A provisional phase never counts as complete.
|
|
25
|
+
> - `oat_current_task_id` points at the **next unit to do**: a phase ID (`p02`)
|
|
26
|
+
> or an open execution record (`p02-t03`). Set it to `null` when every phase
|
|
27
|
+
> is accepted.
|
|
28
|
+
> - Marker lines are exact, one per line, directly under the phase heading:
|
|
29
|
+
> `**Status:** pending | in_progress | completed | failed | extracted`,
|
|
30
|
+
> `**Base:** <full SHA>`, `**Head:** <full SHA>`, and
|
|
31
|
+
> `**Executor:** root | phase-implementer:<id> | worker:<id> | inline:<exception-ref> | reconciled`.
|
|
32
|
+
> `**Status:** extracted` always pairs with `**Extracted to:** <slug>` naming
|
|
33
|
+
> the linked project; without it the phase reads as `pending`.
|
|
34
|
+
> Phase ownership ends at the next heading, so a task record's status is never
|
|
35
|
+
> read as its phase's status.
|
|
36
|
+
> - `### Task pNN-tNN:` blocks are execution records, opened when work starts
|
|
37
|
+
> and closed at commit with the SHA or a terminal status
|
|
38
|
+
> (`completed | failed | cancelled | no-change`). They never change phase totals.
|
|
39
|
+
> - Reviews are **not** units. Track review status in `plan.md` under `## Reviews`.
|
|
40
|
+
|
|
41
|
+
## Progress Overview
|
|
42
|
+
|
|
43
|
+
| Phase | Status | Units | Accepted |
|
|
44
|
+
| ----- | ------- | ----- | -------- |
|
|
45
|
+
| p01 | pending | 1 | 0/1 |
|
|
46
|
+
| p02 | pending | 1 | 0/1 |
|
|
47
|
+
|
|
48
|
+
**Total:** 0/[N] phases accepted
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Phase p01: [Phase Name]
|
|
53
|
+
|
|
54
|
+
**Status:** pending
|
|
55
|
+
**Base:** [full base SHA, recorded when the phase starts]
|
|
56
|
+
**Head:** [full head SHA, recorded when the phase's work ends, before its review]
|
|
57
|
+
**Executor:** [root | phase-implementer:<id> | worker:<id> | inline:<exception-ref> | reconciled]
|
|
58
|
+
|
|
59
|
+
[Summary prose: verification, review disposition, authority changes, deviations, next action.]
|
|
60
|
+
|
|
61
|
+
<!-- Execution records follow the summary. Replace this example with real records when work starts: -->
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
### Task p01-t01: [Execution record name]
|
|
65
|
+
|
|
66
|
+
**Status:** completed
|
|
67
|
+
**Commit:** [full commit SHA]
|
|
68
|
+
**Executor:** worker:w1
|
|
69
|
+
|
|
70
|
+
Intent, files, proof command, result.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Phase p02: [Phase Name]
|
|
76
|
+
|
|
77
|
+
**Status:** pending
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Orchestration Runs
|
|
82
|
+
|
|
83
|
+
_Each run from `oat-project-implement` appends an entry below with:_
|
|
84
|
+
_- Run header (number, timestamp, branch, tier, policy, phase counts)_
|
|
85
|
+
_- Phase Outcomes table_
|
|
86
|
+
_- Parallel Groups list_
|
|
87
|
+
_- Outstanding Items_
|
|
88
|
+
|
|
89
|
+
<!-- orchestration-runs-start -->
|
|
90
|
+
|
|
91
|
+
_Orchestration runs from `oat-project-implement` are appended here, most-recent-first within the file but append-only at the bottom of the log._
|
|
92
|
+
|
|
93
|
+
<!-- orchestration-runs-end -->
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Implementation Log
|
|
98
|
+
|
|
99
|
+
Chronological log of implementation progress.
|
|
100
|
+
|
|
101
|
+
### YYYY-MM-DD
|
|
102
|
+
|
|
103
|
+
**Session Start:** [time]
|
|
104
|
+
|
|
105
|
+
- [x] p01: [Phase name] - [head SHA]
|
|
106
|
+
- [ ] p02: [Phase name] - in progress
|
|
107
|
+
|
|
108
|
+
**What changed (high level):**
|
|
109
|
+
|
|
110
|
+
- [short bullets suitable for PR/docs]
|
|
111
|
+
|
|
112
|
+
**Decisions:**
|
|
113
|
+
|
|
114
|
+
- [Decision made and rationale]
|
|
115
|
+
|
|
116
|
+
**Follow-ups / TODO:**
|
|
117
|
+
|
|
118
|
+
- [anything discovered during implementation that should be captured for later]
|
|
119
|
+
|
|
120
|
+
**Blockers:**
|
|
121
|
+
|
|
122
|
+
- [Blocker description] - [status: resolved/pending]
|
|
123
|
+
|
|
124
|
+
**Session End:** [time]
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Deviations from Plan / Design
|
|
129
|
+
|
|
130
|
+
Document any intentional deviations from the brief. Include accepted review findings where the shipped implementation is source of truth and the brief needs alignment.
|
|
131
|
+
|
|
132
|
+
| Phase / Review | Source Artifact | Planned / Documented | Actual / Accepted | Reason | Source of Truth | Follow-up |
|
|
133
|
+
| -------------- | --------------- | -------------------- | ----------------- | ------ | --------------- | --------- |
|
|
134
|
+
| - | - | - | - | - | - | - |
|
|
135
|
+
|
|
136
|
+
## Final Summary (for PR/docs)
|
|
137
|
+
|
|
138
|
+
**What shipped:**
|
|
139
|
+
|
|
140
|
+
- [capability 1]
|
|
141
|
+
|
|
142
|
+
**Behavioral changes (user-facing):**
|
|
143
|
+
|
|
144
|
+
- [bullet]
|
|
145
|
+
|
|
146
|
+
**Key files / modules:**
|
|
147
|
+
|
|
148
|
+
- `[path]` - [purpose]
|
|
149
|
+
|
|
150
|
+
**Verification performed:**
|
|
151
|
+
|
|
152
|
+
- [tests/lint/typecheck/build/manual steps]
|
|
153
|
+
|
|
154
|
+
**Outcomes audit:**
|
|
155
|
+
|
|
156
|
+
- Outcome 1: [observed evidence (accepted phase, commit, or verification result) or the recorded deferral]
|
|
157
|
+
|
|
158
|
+
**Brief deltas (if any):**
|
|
159
|
+
|
|
160
|
+
- [what changed vs plan.md and why]
|
|
161
|
+
|
|
162
|
+
## References
|
|
163
|
+
|
|
164
|
+
- Brief: `plan.md`
|
|
165
|
+
- Research: `references/research/`
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
oat_status: in_progress
|
|
3
|
+
oat_ready_for: null
|
|
4
|
+
oat_blockers: []
|
|
5
|
+
oat_last_updated: YYYY-MM-DD
|
|
6
|
+
oat_phase: plan
|
|
7
|
+
oat_phase_status: in_progress
|
|
8
|
+
oat_plan_hill_phases: [] # [] = none for brief modes
|
|
9
|
+
oat_plan_parallel_groups: [] # groups of phases that run concurrently in worktrees; [] = fully sequential
|
|
10
|
+
oat_plan_source: brief
|
|
11
|
+
oat_import_reference: null
|
|
12
|
+
oat_import_source_path: null
|
|
13
|
+
oat_import_provider: null
|
|
14
|
+
oat_generated: false
|
|
15
|
+
oat_template: true
|
|
16
|
+
oat_template_name: plan-brief
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Project Brief: {Project Name}
|
|
20
|
+
|
|
21
|
+
> Execute this brief using `oat-project-implement`. Phases are the units of
|
|
22
|
+
> progress: each `## Phase pNN:` block carries intent and exit evidence instead
|
|
23
|
+
> of planned tasks, and only the next phase must be concrete. Execution records
|
|
24
|
+
> (`### Task pNN-tNN:`) live in `implementation.md`, never here.
|
|
25
|
+
|
|
26
|
+
**Commit Convention:** `{type}({scope}): {description}` - e.g., `feat(p01-t01): add user auth endpoint`
|
|
27
|
+
|
|
28
|
+
**Phase block grammar (strict):** each phase is one `## Phase pNN: <name>`
|
|
29
|
+
heading followed by a blank line and these exact lines:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
**Intent:** one or more non-empty lines
|
|
33
|
+
**Exit evidence:** one or more non-empty lines
|
|
34
|
+
**Provisional:** no
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Phase IDs are stable and document order governs execution. `**Provisional:**`
|
|
38
|
+
accepts `yes` or `no`; absent means `no`. The first phase must not be
|
|
39
|
+
provisional. Do not add `### Task` headings to phases.
|
|
40
|
+
|
|
41
|
+
## Goal
|
|
42
|
+
|
|
43
|
+
[State the outcome this project must achieve and why it matters.]
|
|
44
|
+
|
|
45
|
+
## Outcomes
|
|
46
|
+
|
|
47
|
+
<!-- Number each outcome and name the evidence that will show it holds. Completion is audited against this list. -->
|
|
48
|
+
|
|
49
|
+
1. **[Observable outcome]** — Evidence: [test, command, artifact, or review that will prove it]
|
|
50
|
+
2. **[Observable outcome]** — Evidence: [test, command, artifact, or review that will prove it]
|
|
51
|
+
|
|
52
|
+
## Approach
|
|
53
|
+
|
|
54
|
+
[Describe the intended approach: the modules and contracts involved and how the change fits them.]
|
|
55
|
+
|
|
56
|
+
<!-- Optional: add a `### Design` subsection when architecture decisions need recording. Delete this comment otherwise. -->
|
|
57
|
+
|
|
58
|
+
## Constraints and Out of Scope
|
|
59
|
+
|
|
60
|
+
- **Constraint:** [A rule the work must respect.]
|
|
61
|
+
- **Out of scope:** [Adjacent work intentionally excluded.]
|
|
62
|
+
|
|
63
|
+
## Decisions
|
|
64
|
+
|
|
65
|
+
- [Record each decision made by the user during the interview, with its rationale.]
|
|
66
|
+
|
|
67
|
+
## Known Unknowns
|
|
68
|
+
|
|
69
|
+
- [Open question] — Settled by: [phase ID that resolves it]
|
|
70
|
+
|
|
71
|
+
## Delivery endpoint and authority
|
|
72
|
+
|
|
73
|
+
- **Endpoint:** [open | merged] — [what "delivered" means for this project]
|
|
74
|
+
- **Authority:** [who approves the brief, phase acceptance, and the delivery; what the agent may decide alone]
|
|
75
|
+
|
|
76
|
+
## Milestones
|
|
77
|
+
|
|
78
|
+
<!-- Reserved for goal mode. Brief projects deliver once and leave this section empty. -->
|
|
79
|
+
|
|
80
|
+
## Phase p01: [Phase Name]
|
|
81
|
+
|
|
82
|
+
**Intent:** [What this phase changes and why.]
|
|
83
|
+
**Exit evidence:** [The verification that shows the phase is done.]
|
|
84
|
+
**Provisional:** no
|
|
85
|
+
|
|
86
|
+
## Phase p02: [Phase Name]
|
|
87
|
+
|
|
88
|
+
**Intent:** [What this phase is expected to change; refine before it starts.]
|
|
89
|
+
**Exit evidence:** [The verification expected to show the phase is done.]
|
|
90
|
+
**Provisional:** yes
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Parallelism
|
|
95
|
+
|
|
96
|
+
Phases that have no overlapping file modifications may run concurrently. To declare parallelism:
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
oat_plan_parallel_groups: [['p02', 'p03']]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Each inner array is a group of phases that execute in parallel (each in its own worktree) and merge back in plan order after all pass. Groups may be declared whenever the phases become concrete.
|
|
103
|
+
|
|
104
|
+
Default is `[]` (fully sequential, no worktrees).
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Reviews
|
|
109
|
+
|
|
110
|
+
| Scope | Type | Status | Date | Artifact | Reviewed Head | Invocation | Gate Target |
|
|
111
|
+
| ----- | -------- | ------- | ---- | -------- | ------------- | ---------- | ----------- |
|
|
112
|
+
| plan | artifact | pending | - | - | - | - | - |
|
|
113
|
+
| p01 | code | pending | - | - | - | - | - |
|
|
114
|
+
| final | code | pending | - | - | - | - | - |
|
|
115
|
+
|
|
116
|
+
Add one `code` row per phase as phases become concrete. For code-review events,
|
|
117
|
+
`Reviewed Head` is the full 40-character SHA at the head of the reviewed range.
|
|
118
|
+
Writers must preserve every existing row and every unknown trailing cell.
|
|
119
|
+
|
|
120
|
+
**Status values:** `pending` → `received` → `fixes_added` → `fixes_completed` → `passed`
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Implementation Complete
|
|
125
|
+
|
|
126
|
+
**Summary:**
|
|
127
|
+
|
|
128
|
+
- Phase p01: [Description]
|
|
129
|
+
|
|
130
|
+
**Total: [N] phases**
|
|
131
|
+
|
|
132
|
+
Ready for final code review and PR preparation.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## References
|
|
137
|
+
|
|
138
|
+
- Journal: `implementation.md`
|
|
139
|
+
- Research: `references/research/`
|
|
140
|
+
- Project log: `project-log.md` (when enabled)
|
package/assets/templates/plan.md
CHANGED
|
@@ -7,7 +7,7 @@ oat_phase: plan
|
|
|
7
7
|
oat_phase_status: in_progress
|
|
8
8
|
oat_plan_hill_phases: [] # phases to pause AFTER completing (empty = every phase)
|
|
9
9
|
oat_plan_parallel_groups: [] # groups of phases that run concurrently in worktrees; [] = fully sequential
|
|
10
|
-
oat_plan_source: spec-driven # spec-driven | quick | imported | lite
|
|
10
|
+
oat_plan_source: spec-driven # spec-driven | quick | imported | lite | brief
|
|
11
11
|
oat_import_reference: null # e.g., references/imported-plan.md
|
|
12
12
|
oat_import_source_path: null # original source path provided by user
|
|
13
13
|
oat_import_provider: null # codex | cursor | claude | null
|
|
@@ -8,7 +8,7 @@ oat_parent: null # optional child-only coordination parent slug
|
|
|
8
8
|
oat_siblings: [] # optional child-only sibling slugs
|
|
9
9
|
oat_depends_on: [] # optional child-only sibling dependencies
|
|
10
10
|
oat_children: [] # optional coordination-parent child slugs
|
|
11
|
-
oat_hill_checkpoints: { OAT_HILL_CHECKPOINTS } # Configured: which phases require human-in-the-loop lifecycle approval
|
|
11
|
+
oat_hill_checkpoints: { OAT_HILL_CHECKPOINTS } # Configured: which phases require human-in-the-loop lifecycle approval; [] = none for brief modes
|
|
12
12
|
oat_hill_completed: [] # Progress: which HiLL checkpoints have been completed
|
|
13
13
|
oat_parallel_execution: false
|
|
14
14
|
oat_phase: { OAT_PHASE } # Current phase: discovery | spec | design | plan | implement | decomposition
|
|
@@ -34,7 +34,7 @@ oat_phase_status: in_progress # Status: in_progress | complete | pr_open
|
|
|
34
34
|
# - { harness: cursor, model: gpt-5.5-xhigh }
|
|
35
35
|
# source: project-state
|
|
36
36
|
# oat_dispatch_ceiling: # legacy compatibility alias for capped managed provider targets
|
|
37
|
-
oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import | lite
|
|
37
|
+
oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import | lite | brief
|
|
38
38
|
oat_workflow_origin: native # native | imported
|
|
39
39
|
# oat_skill_gate_overrides: # optional; per-project posture for configured lifecycle gates
|
|
40
40
|
# oat-project-implement: disabled # only the literal value `disabled`; absence means follow configuration
|
|
@@ -82,6 +82,12 @@ oat_workflow_origin: native # native | imported
|
|
|
82
82
|
# config_fingerprint: '<stable hash of resolved gate declaration>'
|
|
83
83
|
# reviewed_head: null # full SHA of the commit the gate reviewed; provenance only
|
|
84
84
|
# decided_at: null # ISO 8601 UTC
|
|
85
|
+
# oat_brief_gate: # optional; persisted brief artifact gate outcome, absent when no gate is configured; provenance only, read back by no route (core record: gate-approval-record.md)
|
|
86
|
+
# status: allowed # allowed | blocked
|
|
87
|
+
# disposition: passed # passed | warned | prompt_approved | project_disabled; null when blocked
|
|
88
|
+
# config_fingerprint: '<stable hash of resolved gate declaration>'
|
|
89
|
+
# reviewed_head: null # full SHA of the commit the gate reviewed; provenance only
|
|
90
|
+
# decided_at: null # ISO 8601 UTC
|
|
85
91
|
oat_docs_updated: null # null | skipped | complete — documentation sync status
|
|
86
92
|
oat_pr_status: null # null | ready | open | closed | merged — actual PR state for the current project
|
|
87
93
|
oat_pr_url: null # null | string — tracked PR URL when a PR exists
|
|
@@ -4,7 +4,7 @@ import { writeSyncedRecord } from '../../project/sync/record.js';
|
|
|
4
4
|
import { commitRecordChange, createSyncedProject, pushSynced, rollbackCreatedSyncedProject } from '../../project/sync/ref-sync.js';
|
|
5
5
|
import { resolveDefaultScope, type ProjectScope } from '../../shared/project-scope.js';
|
|
6
6
|
import { setActiveProject } from '../../../config/oat-config.js';
|
|
7
|
-
import type
|
|
7
|
+
import { type WorkflowMode } from '@open-agent-toolkit/control-plane';
|
|
8
8
|
export interface ScaffoldProjectOptions {
|
|
9
9
|
repoRoot: string;
|
|
10
10
|
projectName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/scaffold.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAEL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAGL,mBAAmB,EAGnB,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/scaffold.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAEL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAGL,mBAAmB,EAGnB,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,mCAAmC,CAAC;AAG3C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,O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,4BAA4B,EAAE,OAAO,4BAA4B,CAAC;IAClE,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,yBAAyB,EAAE,OAAO,yBAAyB,CAAC;IAC5D,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;CAC3C;AA2MD,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,YAAY,GACjB,MAAM,CAyBR;AA8QD,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CAAC,qBAAqB,CAAC,CAqXhC"}
|
|
@@ -15,6 +15,7 @@ import { resolveEffectiveConfig } from '../../../config/resolve.js';
|
|
|
15
15
|
import { CliError } from '../../../errors/cli-error.js';
|
|
16
16
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
17
17
|
import { dirExists, fileExists } from '../../../fs/io.js';
|
|
18
|
+
import { isBriefMode, } from '@open-agent-toolkit/control-plane';
|
|
18
19
|
import { assertValidProjectStateContent } from '../../../validation/project-state.js';
|
|
19
20
|
const DEFAULT_DEPENDENCIES = {
|
|
20
21
|
resolveDefaultScope,
|
|
@@ -43,6 +44,11 @@ const TEMPLATES_BY_MODE = {
|
|
|
43
44
|
{ source: 'plan-lite.md', target: 'plan.md' },
|
|
44
45
|
'implementation.md',
|
|
45
46
|
],
|
|
47
|
+
brief: [
|
|
48
|
+
'state.md',
|
|
49
|
+
{ source: 'plan-brief.md', target: 'plan.md' },
|
|
50
|
+
{ source: 'implementation-brief.md', target: 'implementation.md' },
|
|
51
|
+
],
|
|
46
52
|
};
|
|
47
53
|
function normalizeTemplateEntry(entry) {
|
|
48
54
|
return typeof entry === 'string' ? { source: entry, target: entry } : entry;
|
|
@@ -122,6 +128,23 @@ const STATE_TEMPLATE_BY_MODE = {
|
|
|
122
128
|
],
|
|
123
129
|
nextMilestone: 'Run `oat-project-lite` to author and approve the plan',
|
|
124
130
|
},
|
|
131
|
+
brief: {
|
|
132
|
+
hillCheckpoints: '[]',
|
|
133
|
+
phase: 'plan',
|
|
134
|
+
status: 'Plan',
|
|
135
|
+
currentPhase: 'Plan - Authoring the Project Brief',
|
|
136
|
+
artifacts: [
|
|
137
|
+
'- **Plan:** `plan.md` (scaffolded Project Brief template — not started)',
|
|
138
|
+
'- **Implementation:** `implementation.md` (scaffolded brief journal template — not started)',
|
|
139
|
+
'- **Research:** `references/research/` (empty)',
|
|
140
|
+
],
|
|
141
|
+
progress: [
|
|
142
|
+
'- ✓ Brief project scaffolded',
|
|
143
|
+
'- ✓ Brief and implementation artifacts scaffolded',
|
|
144
|
+
'- ⧗ Awaiting brief interview and authoring',
|
|
145
|
+
],
|
|
146
|
+
nextMilestone: 'Run `oat-project-brief` to author and approve the brief',
|
|
147
|
+
},
|
|
125
148
|
};
|
|
126
149
|
function replaceOatPlaceholders(template, replacements) {
|
|
127
150
|
return template.replace(OAT_PLACEHOLDER_PATTERN, (placeholder, token) => replacements[token] ?? placeholder);
|
|
@@ -219,7 +242,7 @@ async function scaffoldModeTemplates(home, repoRoot, absoluteProjectPath, projec
|
|
|
219
242
|
}
|
|
220
243
|
const { content: template } = await resolveProjectTemplate(home, repoRoot, source);
|
|
221
244
|
let rendered = applyTemplateReplacements(template, projectName, today, nowUtc, mode);
|
|
222
|
-
if (mode === 'lite' && target === 'plan.md') {
|
|
245
|
+
if ((mode === 'lite' || isBriefMode(mode)) && target === 'plan.md') {
|
|
223
246
|
rendered = rendered.replace(/^---\n/, '---\noat_template: true\n');
|
|
224
247
|
}
|
|
225
248
|
assertNoUnresolvedOatPlaceholders(rendered, source);
|
|
@@ -258,12 +281,17 @@ async function ensureStructure(absoluteProjectPath, mode) {
|
|
|
258
281
|
await mkdir(join(absoluteProjectPath, 'reviews'), { recursive: true });
|
|
259
282
|
await mkdir(join(absoluteProjectPath, 'pr'), { recursive: true });
|
|
260
283
|
if (mode === 'import') {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
284
|
+
await ensureGitkeepDir(join(absoluteProjectPath, 'references'));
|
|
285
|
+
}
|
|
286
|
+
if (isBriefMode(mode)) {
|
|
287
|
+
await ensureGitkeepDir(join(absoluteProjectPath, 'references', 'research'));
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async function ensureGitkeepDir(dir) {
|
|
291
|
+
await mkdir(dir, { recursive: true });
|
|
292
|
+
const gitkeepPath = join(dir, '.gitkeep');
|
|
293
|
+
if (!(await fileExists(gitkeepPath))) {
|
|
294
|
+
await writeFile(gitkeepPath, '', 'utf8');
|
|
267
295
|
}
|
|
268
296
|
}
|
|
269
297
|
async function ensureScopedProjectIgnored(repoRoot, absoluteScopeRoot, scope, dependencies) {
|
|
@@ -15,7 +15,7 @@ export interface LitePlanSections {
|
|
|
15
15
|
productBehavior?: string;
|
|
16
16
|
technicalDesign?: string;
|
|
17
17
|
}
|
|
18
|
-
type PromotionReason = 'promoted' | 'unsupported-target' | 'not-lite' | 'lite-plan-reference-exists' | 'invalid-lite-plan' | 'scope-unresolved' | 'project-unreadable' | 'template-unreadable' | 'write-failed' | 'persistence-failed';
|
|
18
|
+
type PromotionReason = 'promoted' | 'unsupported-target' | 'not-lite' | 'lite-plan-reference-exists' | 'invalid-lite-plan' | 'brief-archive-exists' | 'extracted-phases' | 'invalid-brief-plan' | 'missing-phase-head' | 'scope-unresolved' | 'project-unreadable' | 'template-unreadable' | 'write-failed' | 'persistence-failed';
|
|
19
19
|
interface PromotionRecovery extends ExactPathCommitResult {
|
|
20
20
|
identity: string;
|
|
21
21
|
message: string;
|
|
@@ -30,6 +30,7 @@ export type PromotionResult = {
|
|
|
30
30
|
status: 'refused';
|
|
31
31
|
reason: Exclude<PromotionReason, 'promoted'>;
|
|
32
32
|
files: string[];
|
|
33
|
+
phases?: string[];
|
|
33
34
|
recovery?: PromotionRecovery;
|
|
34
35
|
};
|
|
35
36
|
export interface ProjectPromoteDependencies {
|
|
@@ -50,6 +51,36 @@ export interface ProjectPromoteDependencies {
|
|
|
50
51
|
now: () => Date;
|
|
51
52
|
}
|
|
52
53
|
export declare function parseLitePlanSections(planContent: string, liteTemplateContent?: string): LitePlanSections | null;
|
|
54
|
+
export type BriefPhaseState = 'accepted' | 'active' | 'pending' | 'provisional';
|
|
55
|
+
export interface BriefMigration {
|
|
56
|
+
plan: string;
|
|
57
|
+
implementation: string;
|
|
58
|
+
implementationChanged: boolean;
|
|
59
|
+
pendingPhases: string[];
|
|
60
|
+
phaseStates: Record<string, BriefPhaseState>;
|
|
61
|
+
}
|
|
62
|
+
export type BriefMigrationResult = {
|
|
63
|
+
ok: true;
|
|
64
|
+
migration: BriefMigration;
|
|
65
|
+
} | {
|
|
66
|
+
ok: false;
|
|
67
|
+
reason: 'extracted-phases' | 'invalid-brief-plan';
|
|
68
|
+
} | {
|
|
69
|
+
ok: false;
|
|
70
|
+
reason: 'missing-phase-head';
|
|
71
|
+
phases: string[];
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Pure brief → quick migration. Phase states follow the phase-unit progress
|
|
75
|
+
* contract: accepted (journal `completed`, not provisional), active (any other
|
|
76
|
+
* started status), pending, or provisional. An extracted phase refuses.
|
|
77
|
+
*/
|
|
78
|
+
export declare function migrateBriefToQuick(input: {
|
|
79
|
+
planContent: string;
|
|
80
|
+
implementationContent: string;
|
|
81
|
+
projectName: string;
|
|
82
|
+
today: string;
|
|
83
|
+
}): BriefMigrationResult;
|
|
53
84
|
export declare function createProjectPromoteCommand(overrides?: Partial<ProjectPromoteDependencies>): Command;
|
|
54
85
|
export {};
|
|
55
86
|
//# sourceMappingURL=promote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/promote/promote.ts"],"names":[],"mappings":"AACA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