@open-agent-toolkit/cli 0.1.72 → 0.1.73
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 +1 -0
- package/assets/docs/cli-utilities/configuration.md +7 -0
- package/assets/docs/cli-utilities/index.md +1 -0
- package/assets/docs/cli-utilities/project-log.md +183 -0
- package/assets/docs/reference/cli-reference.md +1 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +3 -2
- package/assets/skills/oat-project-complete/SKILL.md +60 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +3 -2
- package/assets/skills/oat-project-implement/SKILL.md +18 -2
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +3 -2
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +3 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +3 -2
- package/assets/skills/oat-project-summary/SKILL.md +122 -18
- package/assets/templates/project-log.md +47 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +41 -0
- package/dist/commands/gate/index.d.ts +2 -0
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +99 -4
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +1 -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 +41 -0
- package/dist/commands/project/log/append.d.ts.map +1 -0
- package/dist/commands/project/log/append.js +241 -0
- package/dist/commands/project/log/check.d.ts +66 -0
- package/dist/commands/project/log/check.d.ts.map +1 -0
- package/dist/commands/project/log/check.js +194 -0
- package/dist/commands/project/log/grammar.d.ts +28 -0
- package/dist/commands/project/log/grammar.d.ts.map +1 -0
- package/dist/commands/project/log/grammar.js +31 -0
- package/dist/commands/project/log/index.d.ts +9 -0
- package/dist/commands/project/log/index.d.ts.map +1 -0
- package/dist/commands/project/log/index.js +13 -0
- package/dist/commands/project/log/rollup.d.ts +40 -0
- package/dist/commands/project/log/rollup.d.ts.map +1 -0
- package/dist/commands/project/log/rollup.js +203 -0
- package/dist/commands/project/log/synthesize.d.ts +23 -0
- package/dist/commands/project/log/synthesize.d.ts.map +1 -0
- package/dist/commands/project/log/synthesize.js +112 -0
- package/dist/commands/project/new/index.d.ts +1 -0
- package/dist/commands/project/new/index.d.ts.map +1 -1
- package/dist/commands/project/new/index.js +7 -0
- package/dist/commands/project/new/scaffold.d.ts +1 -0
- package/dist/commands/project/new/scaffold.d.ts.map +1 -1
- package/dist/commands/project/new/scaffold.js +24 -0
- package/dist/config/oat-config.d.ts +3 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +7 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +2 -0
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-summary
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.3
|
|
4
4
|
description: Use when the user requests or confirms summarizing an active OAT project — e.g. "summarize the project", "generate the summary", "run oat-project-summary", or confirms a previously offered summary run. Do NOT auto-invoke when implementation completes. Generates summary.md from project artifacts as institutional memory.
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
7
|
-
allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat decision:*), Glob, Grep, AskUserQuestion
|
|
7
|
+
allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat project log:*), Glob, Grep, AskUserQuestion
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Project Summary
|
|
@@ -36,16 +36,17 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
36
36
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
37
|
|
|
38
38
|
- Before multi-step work, print step indicators, e.g.:
|
|
39
|
-
- `[1/
|
|
40
|
-
- `[2/
|
|
41
|
-
- `[3/
|
|
42
|
-
- `[4/
|
|
43
|
-
- `[5/
|
|
39
|
+
- `[1/6] Resolving project + reading artifacts…`
|
|
40
|
+
- `[2/6] Checking project log + existing summary…`
|
|
41
|
+
- `[3/6] Generating / updating summary sections…`
|
|
42
|
+
- `[4/6] Rolling up project observations…`
|
|
43
|
+
- `[5/6] Promoting key decisions to reference/decisions/ (if PJM installed)…`
|
|
44
|
+
- `[6/6] Committing…`
|
|
44
45
|
|
|
45
46
|
**BLOCKED Activities:**
|
|
46
47
|
|
|
47
48
|
- ❌ No implementation work
|
|
48
|
-
- ❌ No
|
|
49
|
+
- ❌ No hand-editing project artifacts (other than summary.md)
|
|
49
50
|
- ❌ No creating tasks or modifying plan
|
|
50
51
|
- ❌ No hand-authoring decision files or editing `reference/decisions/index.md` inside its managed markers
|
|
51
52
|
|
|
@@ -53,6 +54,10 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
53
54
|
|
|
54
55
|
- ✅ Reading all project artifacts
|
|
55
56
|
- ✅ Creating or updating summary.md
|
|
57
|
+
- ✅ Using `oat project log append` and `oat project log rollup` as the only
|
|
58
|
+
writers for project-log promotion and roll-up
|
|
59
|
+
- ✅ Offering follow-up-marked project-log entries to
|
|
60
|
+
`oat-pjm-add-backlog-item`
|
|
56
61
|
- ✅ Committing summary.md changes
|
|
57
62
|
- ✅ Promoting the summary's Key Decisions into canonical `reference/decisions/` records via `oat decision new` (Step 7), gated on the PJM tool pack being installed
|
|
58
63
|
|
|
@@ -120,6 +125,8 @@ Read all available artifacts for synthesis:
|
|
|
120
125
|
- `"$PROJECT_PATH/plan.md"` — phases, tasks, reviews, deferred items
|
|
121
126
|
- `"$PROJECT_PATH/implementation.md"` — task outcomes, deviations, challenges, review notes
|
|
122
127
|
- `"$PROJECT_PATH/state.md"` — associated issues, workflow mode
|
|
128
|
+
- `"$PROJECT_PATH/project-log.md"` — optional append-only workflow
|
|
129
|
+
observations; never hand-edit
|
|
123
130
|
- `"$PROJECT_PATH/oat-execution-learnings.md"` — optional append-only
|
|
124
131
|
autonomous-run observations and recommendations
|
|
125
132
|
|
|
@@ -128,6 +135,34 @@ Read all available artifacts for synthesis:
|
|
|
128
135
|
If `oat-execution-learnings.md` is absent, do not infer autonomous learnings
|
|
129
136
|
from other artifacts and do not add an Autonomous Execution Learnings section.
|
|
130
137
|
|
|
138
|
+
### Step 2.5: Check Project Log and Offer Ledger Graduation
|
|
139
|
+
|
|
140
|
+
Run the read-only status probe before authoring or refreshing `summary.md`:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
PROJECT_LOG_CHECK=$(oat project log check --project "$PROJECT_PATH" --json)
|
|
144
|
+
PROJECT_LOG_PROMOTION_APPENDED="false"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Route on the structured result. `status: "absent"` is inert. When the entry
|
|
148
|
+
counts show one or more entries, keep the log in the summary flow even if task,
|
|
149
|
+
revision, and autonomous-learning tracking fields are otherwise current.
|
|
150
|
+
|
|
151
|
+
Before roll-up, inspect `project`-scoped judgments for observations that are
|
|
152
|
+
reusable across projects and offer ledger graduation. For every observation the
|
|
153
|
+
user selects, invoke `oat project log append` with the original judgment type
|
|
154
|
+
and area, `--scope general`, and a body that references the original entry's
|
|
155
|
+
exact heading. The new body may explain why the observation is reusable, but it
|
|
156
|
+
must not copy the full original entry. Request the append result as structured
|
|
157
|
+
JSON; whenever it reports `status: "appended"`, set
|
|
158
|
+
`PROJECT_LOG_PROMOTION_APPENDED="true"` so the commit step includes the mutated
|
|
159
|
+
project log.
|
|
160
|
+
|
|
161
|
+
Ledger graduation is append-only: never edit, annotate, strike through, or add
|
|
162
|
+
side metadata to the original entry. The newly appended `general` judgment is
|
|
163
|
+
the promotion, and the later `rollup` command naturally selects it for the
|
|
164
|
+
ledger.
|
|
165
|
+
|
|
131
166
|
### Step 3: Check for Existing Summary
|
|
132
167
|
|
|
133
168
|
```bash
|
|
@@ -154,7 +189,7 @@ test -f "$PROJECT_PATH/summary.md"
|
|
|
154
189
|
identifiers (timestamp, category, and title) with the source pointers in
|
|
155
190
|
the existing `## Autonomous Execution Learnings` section. Treat missing,
|
|
156
191
|
added, or changed recommendations as `learnings_changed`.
|
|
157
|
-
- If `oat_summary_last_task == current_last_task` AND `oat_summary_revision_count == current_rev_count` AND learnings are absent or unchanged: **No changes detected. Skip update.** Report: "Summary is current. No updates needed."
|
|
192
|
+
- If `oat_summary_last_task == current_last_task` AND `oat_summary_revision_count == current_rev_count` AND learnings are absent or unchanged AND the project-log check reports no entries: **No changes detected. Skip update.** Report: "Summary is current. No updates needed."
|
|
158
193
|
- If `current_rev_count > oat_summary_revision_count`: New revision phases exist. Update: Revision History, What Was Implemented, Follow-up Items.
|
|
159
194
|
- If `current_last_task > oat_summary_last_task`: New tasks completed. Update: What Was Implemented, Notable Challenges, Tradeoffs Made.
|
|
160
195
|
- If `learnings_changed`: update Autonomous Execution Learnings even when
|
|
@@ -192,6 +227,7 @@ For each section, synthesize content from the relevant artifacts. Apply these ru
|
|
|
192
227
|
| Revision History | plan.md p-revN phases, implementation.md revision notes |
|
|
193
228
|
| Follow-up Items | implementation.md deferred findings, plan.md deferred items |
|
|
194
229
|
| Associated Issues | state.md `associated_issues` field |
|
|
230
|
+
| Workflow Observations | project-log.md via `oat project log rollup` only |
|
|
195
231
|
| Autonomous Execution Learnings | oat-execution-learnings.md dated entries |
|
|
196
232
|
|
|
197
233
|
**Autonomous Execution Learnings (conditional):**
|
|
@@ -232,6 +268,17 @@ entries, omit the entire section. If the file is absent, this behavior is inert:
|
|
|
232
268
|
remove the template placeholder during a first render and make no
|
|
233
269
|
learnings-driven update on a re-run.
|
|
234
270
|
|
|
271
|
+
**Workflow Observations coexistence contract:**
|
|
272
|
+
|
|
273
|
+
Keep `## Workflow Observations` and `## Autonomous Execution Learnings` as
|
|
274
|
+
distinct summary sections. Author the autonomous-execution section first, then
|
|
275
|
+
perform the project-log roll-up in Step 6. Because the roll-up command writes
|
|
276
|
+
every project-log entry, keep the project-log observation in Workflow
|
|
277
|
+
Observations and represent any overlap from Autonomous Execution Learnings with
|
|
278
|
+
a one-line cross-reference instead of copying it there. The roll-up command
|
|
279
|
+
remains the only writer of Workflow Observations—never hand-implement its
|
|
280
|
+
section or ledger writes.
|
|
281
|
+
|
|
235
282
|
**For incremental updates (re-run):**
|
|
236
283
|
|
|
237
284
|
Only update sections affected by the new content. Do not rewrite the entire summary. Preserve existing section content and append/modify as needed.
|
|
@@ -253,11 +300,50 @@ oat_summary_includes_revisions: [{ list of p-revN IDs reflected }]
|
|
|
253
300
|
---
|
|
254
301
|
```
|
|
255
302
|
|
|
256
|
-
### Step 6:
|
|
303
|
+
### Step 6: Roll Up Project Observations and Offer Backlog Graduation
|
|
304
|
+
|
|
305
|
+
Run this step after `summary.md` has been authored or refreshed, including the
|
|
306
|
+
distinct `## Autonomous Execution Learnings` section when its source artifact
|
|
307
|
+
exists.
|
|
308
|
+
|
|
309
|
+
When Step 2.5 found entries, run:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
PROJECT_LOG_LEDGER_PATH=$(oat config get workflow.projectLogLedgerPath)
|
|
313
|
+
PROJECT_LOG_LEDGER_APPENDED="false"
|
|
314
|
+
PROJECT_LOG_ROLLUP=$(oat project log rollup --project "$PROJECT_PATH" --json)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
`PROJECT_LOG_LEDGER_PATH` must be the effective resolved path, including the
|
|
318
|
+
default when no override exists. If it cannot be resolved, stop before roll-up
|
|
319
|
+
because a later `ledgerOutcome: "appended"` could not be staged safely.
|
|
320
|
+
|
|
321
|
+
Route only on the structured `ProjectLogRollupResult`:
|
|
322
|
+
|
|
323
|
+
- `status: "ok"` with `ledgerOutcome: "appended"`: set
|
|
324
|
+
`PROJECT_LOG_LEDGER_APPENDED="true"` and proceed.
|
|
325
|
+
- `status: "ok"` with `ledgerOutcome: "deduplicated"`: proceed without staging
|
|
326
|
+
the unchanged ledger.
|
|
327
|
+
- `status: "ok"` with `ledgerOutcome: "skipped_permitted"`: proceed and report
|
|
328
|
+
that the ledger was permissibly skipped because the default reference layer
|
|
329
|
+
is absent.
|
|
330
|
+
- `status: "failed"` or `ledgerOutcome: "failed"`: surface the failure to the
|
|
331
|
+
user and stop before commit. Do not describe the summary as fully rolled up.
|
|
332
|
+
|
|
333
|
+
The command mechanically writes or updates `## Workflow Observations` and
|
|
334
|
+
appends/deduplicates eligible `general` judgments in the configured ledger. Do
|
|
335
|
+
not reproduce either write by hand.
|
|
336
|
+
|
|
337
|
+
Separately inspect follow-up-marked project-log entries and offer backlog
|
|
338
|
+
graduation through `oat-pjm-add-backlog-item`. Backlog graduation creates a
|
|
339
|
+
tracked work item; it is not ledger graduation and must not replace the
|
|
340
|
+
append-based `project` → `general` promotion in Step 2.5.
|
|
341
|
+
|
|
342
|
+
### Step 7: Promote Key Decisions to Canonical Decision Records
|
|
257
343
|
|
|
258
344
|
Run this step **after** `summary.md` (including its `## Key Decisions` section) has been written/refreshed and its frontmatter updated. It promotes the project's Key Decisions out of per-project prose and into the canonical, repo-wide `reference/decisions/` log so they stop being siloed in `summary.md`. This step is **additive and non-interactive** — it never prompts.
|
|
259
345
|
|
|
260
|
-
**
|
|
346
|
+
**7.1 — PJM gate (auto, no prompt).** Check whether the PJM tool pack is installed:
|
|
261
347
|
|
|
262
348
|
```bash
|
|
263
349
|
PJM_ENABLED=$(oat config get tools.project-management 2>/dev/null || echo "")
|
|
@@ -266,9 +352,9 @@ PJM_ENABLED=$(oat config get tools.project-management 2>/dev/null || echo "")
|
|
|
266
352
|
- If `PJM_ENABLED` is `true` → perform the promotion automatically. Do NOT ask the user.
|
|
267
353
|
- Otherwise (any other value, empty, or unset) → **skip this entire step silently.** Do not print a warning or prompt.
|
|
268
354
|
|
|
269
|
-
**
|
|
355
|
+
**7.2 — Skip if nothing to promote.** If `summary.md` has no `## Key Decisions` section, or that section has no decision content, skip the step. There is nothing to promote.
|
|
270
356
|
|
|
271
|
-
**
|
|
357
|
+
**7.3 — Ensure the decisions surface exists.** The canonical decisions root is `.oat/repo/reference/decisions` (the `oat decision` default; pass `--decisions-root <path>` only for an explicit override). If its managed index is missing — i.e. `.oat/repo/reference/decisions/index.md` does not exist — initialize it first so `oat decision new` can succeed:
|
|
272
358
|
|
|
273
359
|
```bash
|
|
274
360
|
test -f .oat/repo/reference/decisions/index.md || oat decision init
|
|
@@ -276,7 +362,7 @@ test -f .oat/repo/reference/decisions/index.md || oat decision init
|
|
|
276
362
|
|
|
277
363
|
`oat decision init` is idempotent; running it when the scaffold already exists is harmless.
|
|
278
364
|
|
|
279
|
-
**
|
|
365
|
+
**7.4 — Idempotent, date-independent promotion (critical).** For each decision in `## Key Decisions`:
|
|
280
366
|
|
|
281
367
|
1. **Derive title + complete sections.** Ground every value in the Key Decision and its project artifacts:
|
|
282
368
|
- The bold lead-in / first clause becomes the **title** (a short noun phrase).
|
|
@@ -308,7 +394,7 @@ Because of the date-independent slug dedup, this step is **safe to run every tim
|
|
|
308
394
|
|
|
309
395
|
**Status value:** use `--status accepted`. The decision template's status field (`.oat/templates/decision.md`) is free-form, and the canonical accepted/decided value in the decision vocabulary (`proposed` → `accepted` → `superseded`) is `accepted`. A Key Decision in a completed project's summary represents a decision that was made and shipped, so `accepted` is the correct status.
|
|
310
396
|
|
|
311
|
-
**
|
|
397
|
+
**7.5 — Report, don't prompt.** After processing all Key Decisions, print a short informational summary, e.g.:
|
|
312
398
|
|
|
313
399
|
```
|
|
314
400
|
Promoted N key decision(s) to reference/decisions/:
|
|
@@ -318,14 +404,25 @@ Promoted N key decision(s) to reference/decisions/:
|
|
|
318
404
|
|
|
319
405
|
This is informational only. There is no interactive prompt anywhere in this step.
|
|
320
406
|
|
|
321
|
-
### Step
|
|
407
|
+
### Step 8: Commit
|
|
322
408
|
|
|
323
409
|
```bash
|
|
324
410
|
git add "$PROJECT_PATH/summary.md"
|
|
411
|
+
if [ "$PROJECT_LOG_PROMOTION_APPENDED" = "true" ]; then
|
|
412
|
+
git add "$PROJECT_PATH/project-log.md"
|
|
413
|
+
fi
|
|
414
|
+
if [ "$PROJECT_LOG_LEDGER_APPENDED" = "true" ]; then
|
|
415
|
+
git add "$PROJECT_LOG_LEDGER_PATH"
|
|
416
|
+
fi
|
|
325
417
|
git commit -m "docs: generate summary for {project-name}"
|
|
326
418
|
```
|
|
327
419
|
|
|
328
|
-
|
|
420
|
+
These conditional paths are required: append-based promotion mutates
|
|
421
|
+
`project-log.md`, while `ledgerOutcome: "appended"` mutates the effective
|
|
422
|
+
repository ledger. A permitted skip or deduplicated ledger does not add a
|
|
423
|
+
ledger staging path.
|
|
424
|
+
|
|
425
|
+
If decision records were promoted in Step 7, also stage `.oat/repo/reference/decisions/` so the new `DR-*.md` records and the regenerated `index.md` land with the summary.
|
|
329
426
|
|
|
330
427
|
If this is a re-run (incremental update):
|
|
331
428
|
|
|
@@ -333,7 +430,7 @@ If this is a re-run (incremental update):
|
|
|
333
430
|
git commit -m "docs: update summary for {project-name}"
|
|
334
431
|
```
|
|
335
432
|
|
|
336
|
-
### Step
|
|
433
|
+
### Step 9: Output Summary
|
|
337
434
|
|
|
338
435
|
```
|
|
339
436
|
Summary generated for {project-name}.
|
|
@@ -360,5 +457,12 @@ Summary tracks: last task {task_id}, {N} revision phases
|
|
|
360
457
|
follow-ups, and Workflow issues with source-entry pointers
|
|
361
458
|
- When `oat-execution-learnings.md` is absent, no Autonomous Execution
|
|
362
459
|
Learnings section is rendered and normal summary behavior is unchanged
|
|
460
|
+
- Project-log ledger graduation appends a new referencing `general` judgment
|
|
461
|
+
before roll-up and never mutates the original `project` judgment
|
|
462
|
+
- `oat project log rollup --json` owns the distinct Workflow Observations
|
|
463
|
+
section and ledger writes; `failed` stops the summary flow while
|
|
464
|
+
`skipped_permitted` proceeds with a note
|
|
465
|
+
- Follow-up-marked project-log entries use backlog graduation separately from
|
|
466
|
+
ledger graduation
|
|
363
467
|
- When the PJM tool pack is installed, each Key Decision is promoted to a canonical `reference/decisions/DR-YYMMDD-slug` record via `oat decision new` (status `accepted`), deduped on the date-independent slug so re-runs never create duplicate records
|
|
364
468
|
- When the PJM tool pack is not installed, decision promotion is skipped silently with no prompt
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
oat_generated: false
|
|
3
|
+
oat_template: true
|
|
4
|
+
oat_template_name: project-log
|
|
5
|
+
purpose: project-observations
|
|
6
|
+
oat_last_updated: YYYY-MM-DD
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Project Log: {Project Name}
|
|
10
|
+
|
|
11
|
+
This append-only log serves two audiences: the project team learning from this project's execution, and maintainers improving the general OAT workflow and tooling.
|
|
12
|
+
|
|
13
|
+
## Logging contract
|
|
14
|
+
|
|
15
|
+
Append when something breaks, surprises you, requires a workaround, or works notably well enough to preserve as do-not-regress evidence. Record evidence, not a running narrative. Prior entries are never edited or struck through; append corrections as a new judgment entry that references the original entry and explains the correction. Add a version note to tool-related observations. Create entries only with `oat project log append`; run `oat project log append --help` for the complete entry contract. Reference supporting artifacts by path instead of inlining them. Never record secret values such as tokens, keys, signed URLs, or credentials because this log rolls up into tracked surfaces; reference secrets by name or source, never by value.
|
|
16
|
+
|
|
17
|
+
Judgment entries default to 1–3 sentences covering what happened, the impact or workaround, and any follow-up. High-value entries may instead use this structured body:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
Observation: What happened and the supporting evidence.
|
|
21
|
+
Impact: Why it mattered or what workaround was required.
|
|
22
|
+
Recommendation: What should change or be preserved.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Shared tracked surfaces must be written only from the root checkout, never from parallel worktrees.
|
|
26
|
+
|
|
27
|
+
## Entry format
|
|
28
|
+
|
|
29
|
+
Judgment entries:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
### YYYY-MM-DD · <project|general> · <bug|friction|worked-well|feedback> · <area>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Structural entries:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
### YYYY-MM-DD · structural · <producer> · <ref>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Entries
|
|
42
|
+
|
|
43
|
+
Entries are chronological and append-only.
|
|
44
|
+
|
|
45
|
+
## End-of-run synthesis (pending — do not skip at project completion)
|
|
46
|
+
|
|
47
|
+
Summarize the overall verdict, adopted adjustments, and entries graduated to the repo ledger or backlog. Roll up durable observations into tracked surfaces before archiving this project log.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAezC,OAAO,EAML,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAehB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,0BAA0B,EAC3B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAezC,OAAO,EAML,KAAK,SAAS,EACd,KAAK,cAA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M,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,kBAAkB,EAAE,CAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC7C,mCAAmC,EAAE,OAAO,mCAAmC,CAAC;IAChF,0BAA0B,EAAE,OAAO,0BAA0B,CAAC;IAC9D,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAkhED,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAsKT"}
|
|
@@ -57,6 +57,8 @@ const KEY_ORDER = [
|
|
|
57
57
|
'workflow.autoNarrowReReviewScope',
|
|
58
58
|
'workflow.autoArtifactReview.plan',
|
|
59
59
|
'workflow.autoArtifactReview.analysis',
|
|
60
|
+
'workflow.projectLog',
|
|
61
|
+
'workflow.projectLogLedgerPath',
|
|
60
62
|
'workflow.designMode',
|
|
61
63
|
'workflow.dispatchPolicy.mode',
|
|
62
64
|
'workflow.dispatchPolicy.policy',
|
|
@@ -464,6 +466,28 @@ const CONFIG_CATALOG = [
|
|
|
464
466
|
owningCommand: 'oat config set workflow.autoArtifactReview.analysis <true|false>',
|
|
465
467
|
description: 'Automatically run the bounded accuracy-review loop for generated analysis artifacts before apply workflows consume them. Resolution: local > shared > user > default.',
|
|
466
468
|
},
|
|
469
|
+
{
|
|
470
|
+
key: 'workflow.projectLog',
|
|
471
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
472
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
473
|
+
scope: 'workflow',
|
|
474
|
+
type: 'true | false | auto',
|
|
475
|
+
defaultValue: 'auto',
|
|
476
|
+
mutability: 'read/write',
|
|
477
|
+
owningCommand: 'oat config set workflow.projectLog <true|false|auto>',
|
|
478
|
+
description: 'Controls the append-only per-project observation log. auto creates it on first append; an existing artifact always remains enabled. Resolution: local > shared > user > default.',
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
key: 'workflow.projectLogLedgerPath',
|
|
482
|
+
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
483
|
+
file: '.oat/config.local.json | .oat/config.json | ~/.oat/config.json',
|
|
484
|
+
scope: 'workflow',
|
|
485
|
+
type: 'string',
|
|
486
|
+
defaultValue: '.oat/repo/reference/project-observations.md',
|
|
487
|
+
mutability: 'read/write',
|
|
488
|
+
owningCommand: 'oat config set workflow.projectLogLedgerPath <repo-relative-path>',
|
|
489
|
+
description: 'Repo-relative ledger path used by project-log rollup. Resolution: local > shared > user > default.',
|
|
490
|
+
},
|
|
467
491
|
{
|
|
468
492
|
key: 'workflow.designMode',
|
|
469
493
|
group: 'Workflow Preferences (3-layer: local > shared > user)',
|
|
@@ -745,6 +769,23 @@ function parseWorkflowValue(key, rawValue) {
|
|
|
745
769
|
if (WORKFLOW_BOOLEAN_KEYS.has(key)) {
|
|
746
770
|
return parseBooleanValue(key, rawValue);
|
|
747
771
|
}
|
|
772
|
+
if (key === 'workflow.projectLog') {
|
|
773
|
+
const normalized = rawValue.trim().toLowerCase();
|
|
774
|
+
if (normalized === 'true' || normalized === 'false') {
|
|
775
|
+
return normalized === 'true';
|
|
776
|
+
}
|
|
777
|
+
if (normalized === 'auto') {
|
|
778
|
+
return normalized;
|
|
779
|
+
}
|
|
780
|
+
throw new Error(`Invalid value for ${key}: expected one of true | false | auto, got '${rawValue}'`);
|
|
781
|
+
}
|
|
782
|
+
if (key === 'workflow.projectLogLedgerPath') {
|
|
783
|
+
const normalized = rawValue.trim();
|
|
784
|
+
if (!normalized) {
|
|
785
|
+
throw new Error(`Invalid value for ${key}: expected a non-empty string path`);
|
|
786
|
+
}
|
|
787
|
+
return normalized;
|
|
788
|
+
}
|
|
748
789
|
if (key === 'workflow.postImplementSequence') {
|
|
749
790
|
const normalized = rawValue.trim();
|
|
750
791
|
if (normalized.startsWith('{') || normalized.startsWith('[')) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
|
|
2
|
+
import { appendProjectLog } from '../project/log/append.js';
|
|
2
3
|
import { type ExecTarget, type OatConfig, type OatLocalConfig, type UserConfig } from '../../config/oat-config.js';
|
|
3
4
|
import { type ResolvedConfig } from '../../config/resolve.js';
|
|
4
5
|
import { type ModelFamily } from '../../providers/identity/family.js';
|
|
@@ -24,6 +25,7 @@ interface GateCommandDependencies {
|
|
|
24
25
|
readGateRouteReceipt: typeof readGateRouteReceipt;
|
|
25
26
|
runProcess: (command: string, args: string[], options: ProcessRunOptions) => Promise<ProcessRunResult>;
|
|
26
27
|
parseReviewGateVerdict: typeof parseReviewGateVerdict;
|
|
28
|
+
appendProjectLog: typeof appendProjectLog;
|
|
27
29
|
processEnv: NodeJS.ProcessEnv;
|
|
28
30
|
writeGateRunMarker: (path: string, marker: GateRunMarker, warn: (message: string) => void) => Promise<boolean>;
|
|
29
31
|
removeGateRunMarker: (path: string, warn: (message: string) => void) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAM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B,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,WAAW,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA83CD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAC9C,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,kBAAkB,EACzB,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,kBAAkB,GAAG,IAAI,CAS3B;AA02DD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CA4NT"}
|
|
@@ -4,6 +4,7 @@ import { mkdir, readdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import { basename, isAbsolute, join, relative } from 'node:path';
|
|
6
6
|
import { buildCommandContext, } from '../../app/command-context.js';
|
|
7
|
+
import { appendProjectLog } from '../project/log/append.js';
|
|
7
8
|
import { getFrontmatterBlock, parseFrontmatterScalarFields, parseGeneratedTime, } from '../shared/frontmatter.js';
|
|
8
9
|
import { readGlobalOptions } from '../shared/shared.utils.js';
|
|
9
10
|
import { parseJsonConfig } from '../../config/json.js';
|
|
@@ -38,6 +39,7 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
38
39
|
readGateRouteReceipt,
|
|
39
40
|
runProcess: runChildProcess,
|
|
40
41
|
parseReviewGateVerdict,
|
|
42
|
+
appendProjectLog,
|
|
41
43
|
processEnv: process.env,
|
|
42
44
|
writeGateRunMarker,
|
|
43
45
|
removeGateRunMarker,
|
|
@@ -1654,6 +1656,29 @@ function writeReviewGateTargetingFailure(context, payload) {
|
|
|
1654
1656
|
context.logger.error(`Expected project=${payload.corroboration.expectedProject} run=${payload.gateInvocation.runId}; actual containing_project=${payload.corroboration.actual.containingProject ?? 'missing'} artifact_project=${payload.corroboration.actual.artifactProject ?? 'missing'} run_matches=${payload.corroboration.actual.matchingArtifactPaths.join(',') || 'none'}.`);
|
|
1655
1657
|
context.logger.error('This targeting failure is not receive-eligible and must be corrected before severity or invocation remediation.');
|
|
1656
1658
|
}
|
|
1659
|
+
async function finalizeReviewGateProjectLog(context, dependencies, finalization) {
|
|
1660
|
+
const findings = finalization.counts
|
|
1661
|
+
? ` findings=critical:${finalization.counts.critical},important:${finalization.counts.important},medium:${finalization.counts.medium},minor:${finalization.counts.minor}`
|
|
1662
|
+
: '';
|
|
1663
|
+
const artifact = finalization.artifactPath
|
|
1664
|
+
? ` artifact=${finalization.artifactPath}`
|
|
1665
|
+
: '';
|
|
1666
|
+
const body = `target=${finalization.target} threshold=${finalization.threshold}${findings} exit=${finalization.exitCode} status=${finalization.status}${artifact}`;
|
|
1667
|
+
try {
|
|
1668
|
+
await dependencies.appendProjectLog({
|
|
1669
|
+
repoRoot: finalization.repoRoot,
|
|
1670
|
+
home: finalization.home,
|
|
1671
|
+
project: finalization.project,
|
|
1672
|
+
structural: true,
|
|
1673
|
+
producer: 'oat gate review',
|
|
1674
|
+
ref: finalization.ref,
|
|
1675
|
+
body,
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
catch (error) {
|
|
1679
|
+
context.logger.warn(`Warning: unable to append oat gate review result to the project log: ${error instanceof Error ? error.message : String(error)}. Gate result is unchanged.`);
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1657
1682
|
async function updateConfigLayer(context, layer, dependencies, mutate) {
|
|
1658
1683
|
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
1659
1684
|
const userConfigDir = join(context.home, '.oat');
|
|
@@ -1809,6 +1834,8 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1809
1834
|
let runMarkerPath;
|
|
1810
1835
|
let runMarkerWritten = false;
|
|
1811
1836
|
let branchLocalGateCli;
|
|
1837
|
+
let projectLogFinalization;
|
|
1838
|
+
let projectLogFinalized = false;
|
|
1812
1839
|
let postSelectionContext;
|
|
1813
1840
|
try {
|
|
1814
1841
|
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
@@ -1854,6 +1881,16 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1854
1881
|
dispatchReport,
|
|
1855
1882
|
};
|
|
1856
1883
|
const threshold = parseReviewGateThreshold(options.exitNonzeroOn);
|
|
1884
|
+
projectLogFinalization = {
|
|
1885
|
+
repoRoot,
|
|
1886
|
+
home: context.home,
|
|
1887
|
+
project: projectPath,
|
|
1888
|
+
ref: options.reviewScope?.trim() || 'gate-review',
|
|
1889
|
+
target: selected.id,
|
|
1890
|
+
threshold,
|
|
1891
|
+
status: 'review_failed',
|
|
1892
|
+
exitCode: 1,
|
|
1893
|
+
};
|
|
1857
1894
|
const before = await listReviewGateArtifactCandidates({
|
|
1858
1895
|
repoRoot,
|
|
1859
1896
|
effective,
|
|
@@ -1926,6 +1963,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1926
1963
|
if (!refusal) {
|
|
1927
1964
|
return false;
|
|
1928
1965
|
}
|
|
1966
|
+
if (projectLogFinalization) {
|
|
1967
|
+
projectLogFinalization.status = 'review_failed';
|
|
1968
|
+
projectLogFinalization.exitCode = 1;
|
|
1969
|
+
}
|
|
1929
1970
|
writeReviewGateExecutionFailure(context, {
|
|
1930
1971
|
runId,
|
|
1931
1972
|
target: selected.id,
|
|
@@ -1955,12 +1996,21 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1955
1996
|
before,
|
|
1956
1997
|
after,
|
|
1957
1998
|
});
|
|
1999
|
+
if (projectLogFinalization) {
|
|
2000
|
+
projectLogFinalization.artifactPath =
|
|
2001
|
+
artifactResolution.artifact?.path ??
|
|
2002
|
+
artifactResolution.diagnosticArtifact?.path;
|
|
2003
|
+
}
|
|
1958
2004
|
if (!artifactResolution.artifact && writeRefusalFailure()) {
|
|
1959
2005
|
return;
|
|
1960
2006
|
}
|
|
1961
2007
|
if (childExitCode !== 0 &&
|
|
1962
2008
|
!childResult.timedOut &&
|
|
1963
2009
|
!artifactResolution.artifact) {
|
|
2010
|
+
if (projectLogFinalization) {
|
|
2011
|
+
projectLogFinalization.status = 'review_failed';
|
|
2012
|
+
projectLogFinalization.exitCode = childExitCode;
|
|
2013
|
+
}
|
|
1964
2014
|
writeReviewGateExecutionFailure(context, {
|
|
1965
2015
|
runId,
|
|
1966
2016
|
target: selected.id,
|
|
@@ -1982,6 +2032,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1982
2032
|
if (childResult.timedOut &&
|
|
1983
2033
|
artifactResolution.matchingArtifactPaths.length === 0 &&
|
|
1984
2034
|
!artifactResolution.diagnosticArtifact) {
|
|
2035
|
+
if (projectLogFinalization) {
|
|
2036
|
+
projectLogFinalization.status = 'review_failed';
|
|
2037
|
+
projectLogFinalization.exitCode = childExitCode;
|
|
2038
|
+
}
|
|
1985
2039
|
writeReviewGateExecutionFailure(context, {
|
|
1986
2040
|
runId,
|
|
1987
2041
|
target: selected.id,
|
|
@@ -2017,6 +2071,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2017
2071
|
: initialTargetCorroboration.run === 'mismatched'
|
|
2018
2072
|
? `The changed review artifact did not carry the expected gate run ID ${runId}.`
|
|
2019
2073
|
: `No direct active project review artifact carried gate run ID ${runId}.`;
|
|
2074
|
+
if (projectLogFinalization) {
|
|
2075
|
+
projectLogFinalization.status = 'targeting_correlation_failed';
|
|
2076
|
+
projectLogFinalization.exitCode = 1;
|
|
2077
|
+
}
|
|
2020
2078
|
writeReviewGateTargetingFailure(context, {
|
|
2021
2079
|
runId,
|
|
2022
2080
|
target: selected.id,
|
|
@@ -2038,6 +2096,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2038
2096
|
if (writeRefusalFailure()) {
|
|
2039
2097
|
return;
|
|
2040
2098
|
}
|
|
2099
|
+
if (projectLogFinalization) {
|
|
2100
|
+
projectLogFinalization.status = 'targeting_correlation_failed';
|
|
2101
|
+
projectLogFinalization.exitCode = 1;
|
|
2102
|
+
}
|
|
2041
2103
|
writeReviewGateTargetingFailure(context, {
|
|
2042
2104
|
runId,
|
|
2043
2105
|
target: selected.id,
|
|
@@ -2062,6 +2124,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2062
2124
|
if (writeRefusalFailure()) {
|
|
2063
2125
|
return;
|
|
2064
2126
|
}
|
|
2127
|
+
if (projectLogFinalization) {
|
|
2128
|
+
projectLogFinalization.status = 'artifact_validation_failed';
|
|
2129
|
+
projectLogFinalization.exitCode = 1;
|
|
2130
|
+
}
|
|
2065
2131
|
writeReviewGateArtifactValidationFailure(context, {
|
|
2066
2132
|
runId,
|
|
2067
2133
|
target: selected.id,
|
|
@@ -2093,6 +2159,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2093
2159
|
return;
|
|
2094
2160
|
}
|
|
2095
2161
|
const detail = error instanceof Error ? error.message : String(error);
|
|
2162
|
+
if (projectLogFinalization) {
|
|
2163
|
+
projectLogFinalization.status = 'artifact_validation_failed';
|
|
2164
|
+
projectLogFinalization.exitCode = 1;
|
|
2165
|
+
}
|
|
2096
2166
|
writeReviewGateArtifactValidationFailure(context, {
|
|
2097
2167
|
runId,
|
|
2098
2168
|
target: selected.id,
|
|
@@ -2109,6 +2179,9 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2109
2179
|
process.exitCode = 1;
|
|
2110
2180
|
return;
|
|
2111
2181
|
}
|
|
2182
|
+
if (projectLogFinalization) {
|
|
2183
|
+
projectLogFinalization.counts = verdict.counts;
|
|
2184
|
+
}
|
|
2112
2185
|
const targetCorroboration = initialTargetCorroboration;
|
|
2113
2186
|
const corroboration = corroborateGateInvocation(gateInvocation, verdict.gateInvocation, targetCorroboration);
|
|
2114
2187
|
if (corroboration.run !== 'matched' ||
|
|
@@ -2118,6 +2191,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2118
2191
|
}
|
|
2119
2192
|
const missing = corroboration.run === 'missing' ||
|
|
2120
2193
|
corroboration.invocation === 'missing';
|
|
2194
|
+
if (projectLogFinalization) {
|
|
2195
|
+
projectLogFinalization.status = 'artifact_validation_failed';
|
|
2196
|
+
projectLogFinalization.exitCode = 1;
|
|
2197
|
+
}
|
|
2121
2198
|
writeReviewGateArtifactValidationFailure(context, {
|
|
2122
2199
|
runId,
|
|
2123
2200
|
target: selected.id,
|
|
@@ -2140,6 +2217,10 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2140
2217
|
if (writeRefusalFailure()) {
|
|
2141
2218
|
return;
|
|
2142
2219
|
}
|
|
2220
|
+
if (projectLogFinalization) {
|
|
2221
|
+
projectLogFinalization.status = 'artifact_validation_failed';
|
|
2222
|
+
projectLogFinalization.exitCode = 1;
|
|
2223
|
+
}
|
|
2143
2224
|
writeReviewGateArtifactValidationFailure(context, {
|
|
2144
2225
|
runId,
|
|
2145
2226
|
target: selected.id,
|
|
@@ -2163,6 +2244,12 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2163
2244
|
threshold,
|
|
2164
2245
|
blocking,
|
|
2165
2246
|
});
|
|
2247
|
+
if (projectLogFinalization) {
|
|
2248
|
+
projectLogFinalization.status = blocking ? 'blocked' : 'ok';
|
|
2249
|
+
projectLogFinalization.exitCode = blocking ? 1 : 0;
|
|
2250
|
+
projectLogFinalization.counts = verdict.counts;
|
|
2251
|
+
projectLogFinalization.artifactPath = producedArtifact.path;
|
|
2252
|
+
}
|
|
2166
2253
|
writeReviewGateResult(context, {
|
|
2167
2254
|
status: blocking ? 'blocked' : 'ok',
|
|
2168
2255
|
runId,
|
|
@@ -2200,11 +2287,19 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
2200
2287
|
}
|
|
2201
2288
|
}
|
|
2202
2289
|
finally {
|
|
2203
|
-
|
|
2204
|
-
|
|
2290
|
+
try {
|
|
2291
|
+
if (branchLocalGateCli) {
|
|
2292
|
+
await dependencies.removeBranchLocalGateCli(branchLocalGateCli);
|
|
2293
|
+
}
|
|
2294
|
+
if (runMarkerPath) {
|
|
2295
|
+
await dependencies.removeGateRunMarker(runMarkerPath, (message) => context.logger.warn(message));
|
|
2296
|
+
}
|
|
2205
2297
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2298
|
+
finally {
|
|
2299
|
+
if (projectLogFinalization && !projectLogFinalized) {
|
|
2300
|
+
projectLogFinalized = true;
|
|
2301
|
+
await finalizeReviewGateProjectLog(context, dependencies, projectLogFinalization);
|
|
2302
|
+
}
|
|
2208
2303
|
}
|
|
2209
2304
|
}
|
|
2210
2305
|
}
|
|
@@ -13,7 +13,7 @@ export declare const PACK_METADATA: Record<string, PackMetadata>;
|
|
|
13
13
|
export declare function resolvePackDefaultScope(packName: string): 'user' | 'project';
|
|
14
14
|
export declare const WORKFLOW_SKILLS: readonly ["oat-cursor-cloud-projects", "oat-project-autonomous", "oat-project-capture", "oat-project-clear-active", "oat-project-complete", "oat-project-design", "oat-project-dispatch-subagents", "oat-project-discover", "oat-project-document", "oat-project-implement", "oat-project-import-plan", "oat-project-new", "oat-project-next", "oat-project-open", "oat-project-plan", "oat-project-plan-writing", "oat-project-pr-final", "oat-project-pr-progress", "oat-project-progress", "oat-project-promote-spec-driven", "oat-project-quick-start", "oat-project-reconcile", "oat-project-revise", "oat-project-review-provide", "oat-project-review-provide-remote", "oat-project-review-receive", "oat-project-review-receive-remote", "oat-project-spec", "oat-project-split", "oat-project-summary", "oat-repo-knowledge-index", "oat-worktree-bootstrap", "oat-worktree-bootstrap-auto", "oat-wrap-up"];
|
|
15
15
|
export declare const WORKFLOW_AGENTS: readonly ["oat-codebase-mapper.md", "oat-phase-implementer.md", "oat-reviewer.md"];
|
|
16
|
-
export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "spec.md", "design.md", "plan.md", "implementation.md", "summary.md"];
|
|
16
|
+
export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "spec.md", "design.md", "plan.md", "implementation.md", "summary.md", "project-log.md"];
|
|
17
17
|
export declare const WORKFLOW_SCRIPTS: readonly ["generate-oat-state.sh", "generate-thin-index.sh", "resolve-tracking.sh"];
|
|
18
18
|
export declare const IDEA_SKILLS: readonly ["oat-idea-new", "oat-idea-ideate", "oat-idea-summarize", "oat-idea-scratchpad"];
|
|
19
19
|
export declare const CORE_SKILLS: readonly ["oat-docs", "oat-doctor"];
|