@open-agent-toolkit/cli 0.3.21 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/reference/cli-reference.md +8 -3
  3. package/assets/docs/reference/configuration.md +3 -0
  4. package/assets/docs/reference/oat-directory-structure.md +1 -1
  5. package/assets/docs/reference/project-artifacts.md +141 -2
  6. package/assets/docs/reference/project-state-machine.md +2 -2
  7. package/assets/docs/workflows/advanced/autonomy.md +29 -12
  8. package/assets/docs/workflows/advanced/cursor-cloud.md +20 -6
  9. package/assets/docs/workflows/advanced/workflow-gates.md +9 -0
  10. package/assets/docs/workflows/projects/closeout/closeout-skills.md +24 -5
  11. package/assets/docs/workflows/projects/closeout/retro.md +6 -2
  12. package/assets/docs/workflows/projects/execution/implementation-execution.md +18 -4
  13. package/assets/docs/workflows/projects/execution/index.md +1 -1
  14. package/assets/docs/workflows/projects/execution/picking-up-projects.md +3 -2
  15. package/assets/docs/workflows/projects/execution/project-log.md +100 -11
  16. package/assets/docs/workflows/projects/lifecycle.md +3 -3
  17. package/assets/docs/workflows/projects/reviews/index.md +18 -0
  18. package/assets/public-package-versions.json +4 -4
  19. package/assets/skills/oat-cursor-cloud-projects/SKILL.md +12 -8
  20. package/assets/skills/oat-cursor-cloud-projects/references/cursor-cloud-mechanics.md +63 -2
  21. package/assets/skills/oat-project-autonomous/SKILL.md +88 -26
  22. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
  23. package/assets/skills/oat-project-brief/SKILL.md +1 -1
  24. package/assets/skills/oat-project-brief/references/brief-contract.md +33 -27
  25. package/assets/skills/oat-project-brief/references/docs/autonomy-contract.md +1 -1
  26. package/assets/skills/oat-project-complete/SKILL.md +142 -25
  27. package/assets/skills/oat-project-complete-auto/SKILL.md +4 -4
  28. package/assets/skills/oat-project-dispatch-subagents/SKILL.md +10 -5
  29. package/assets/skills/oat-project-document/SKILL.md +1 -1
  30. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
  31. package/assets/skills/oat-project-goal/SKILL.md +63 -15
  32. package/assets/skills/oat-project-goal/references/docs/autonomy-contract.md +1 -1
  33. package/assets/skills/oat-project-implement/SKILL.md +6 -6
  34. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +28 -7
  35. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +10 -5
  36. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
  37. package/assets/skills/oat-project-implement/references/phase-execution.md +23 -9
  38. package/assets/skills/oat-project-implement/references/plan-and-resume.md +4 -4
  39. package/assets/skills/oat-project-lite/SKILL.md +1 -1
  40. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
  41. package/assets/skills/oat-project-pr-final/SKILL.md +6 -1
  42. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
  43. package/assets/skills/oat-project-pr-progress/SKILL.md +6 -1
  44. package/assets/skills/oat-project-quick-start/SKILL.md +1 -1
  45. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
  46. package/assets/skills/oat-project-reconcile/SKILL.md +13 -19
  47. package/assets/skills/oat-project-retro/SKILL.md +5 -2
  48. package/assets/skills/oat-project-retro/references/evidence-and-lanes.md +9 -3
  49. package/assets/skills/oat-project-review-provide/SKILL.md +28 -3
  50. package/assets/skills/oat-project-review-receive/SKILL.md +32 -18
  51. package/assets/skills/oat-project-review-receive-remote/SKILL.md +10 -6
  52. package/assets/skills/oat-project-revise/SKILL.md +9 -2
  53. package/assets/skills/oat-project-summary/SKILL.md +166 -37
  54. package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +3 -3
  55. package/assets/templates/implementation-brief.md +5 -36
  56. package/assets/templates/implementation.md +11 -81
  57. package/assets/templates/project-log.md +2 -31
  58. package/assets/templates/project-retro.md +4 -1
  59. package/assets/templates/summary.md +13 -5
  60. package/dist/commands/config/index.d.ts.map +1 -1
  61. package/dist/commands/config/index.js +44 -1
  62. package/dist/commands/project/archive/archive-utils.d.ts +205 -8
  63. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
  64. package/dist/commands/project/archive/archive-utils.js +708 -44
  65. package/dist/commands/project/archive/index.d.ts.map +1 -1
  66. package/dist/commands/project/archive/index.js +1 -0
  67. package/dist/commands/project/archive/push-runner.d.ts +9 -1
  68. package/dist/commands/project/archive/push-runner.d.ts.map +1 -1
  69. package/dist/commands/project/archive/push-runner.js +56 -18
  70. package/dist/commands/project/archive/sync-runner.d.ts +28 -0
  71. package/dist/commands/project/archive/sync-runner.d.ts.map +1 -1
  72. package/dist/commands/project/archive/sync-runner.js +44 -22
  73. package/dist/commands/project/complete-state/index.d.ts.map +1 -1
  74. package/dist/commands/project/complete-state/index.js +45 -0
  75. package/dist/commands/project/dispatch/index.d.ts.map +1 -1
  76. package/dist/commands/project/dispatch/index.js +24 -2
  77. package/dist/commands/project/dispatch/record.d.ts +54 -1
  78. package/dist/commands/project/dispatch/record.d.ts.map +1 -1
  79. package/dist/commands/project/dispatch/record.js +229 -1
  80. package/dist/commands/project/index.d.ts.map +1 -1
  81. package/dist/commands/project/index.js +2 -0
  82. package/dist/commands/project/journal-check/evaluator.d.ts +17 -0
  83. package/dist/commands/project/journal-check/evaluator.d.ts.map +1 -0
  84. package/dist/commands/project/journal-check/evaluator.js +140 -0
  85. package/dist/commands/project/journal-check/index.d.ts +34 -0
  86. package/dist/commands/project/journal-check/index.d.ts.map +1 -0
  87. package/dist/commands/project/journal-check/index.js +163 -0
  88. package/dist/commands/project/journal-check/rules.d.ts +68 -0
  89. package/dist/commands/project/journal-check/rules.d.ts.map +1 -0
  90. package/dist/commands/project/journal-check/rules.js +994 -0
  91. package/dist/commands/project/journal-check/types.d.ts +63 -0
  92. package/dist/commands/project/journal-check/types.d.ts.map +1 -0
  93. package/dist/commands/project/journal-check/types.js +26 -0
  94. package/dist/commands/project/log/append.d.ts +6 -0
  95. package/dist/commands/project/log/append.d.ts.map +1 -1
  96. package/dist/commands/project/log/append.js +114 -6
  97. package/dist/commands/project/log/check.d.ts +23 -1
  98. package/dist/commands/project/log/check.d.ts.map +1 -1
  99. package/dist/commands/project/log/check.js +20 -3
  100. package/dist/commands/project/log/grammar.d.ts +37 -0
  101. package/dist/commands/project/log/grammar.d.ts.map +1 -1
  102. package/dist/commands/project/log/grammar.js +72 -0
  103. package/dist/commands/project/log/rollup.d.ts +87 -1
  104. package/dist/commands/project/log/rollup.d.ts.map +1 -1
  105. package/dist/commands/project/log/rollup.js +257 -5
  106. package/dist/config/oat-config.d.ts +14 -0
  107. package/dist/config/oat-config.d.ts.map +1 -1
  108. package/dist/config/oat-config.js +17 -0
  109. package/dist/config/resolve.d.ts.map +1 -1
  110. package/dist/config/resolve.js +5 -1
  111. package/dist/providers/identity/generic-dispatch-record.d.ts +33 -0
  112. package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
  113. package/dist/providers/identity/generic-dispatch-record.js +60 -1
  114. package/package.json +2 -2
@@ -11,16 +11,20 @@ would otherwise remain in agent transcripts, then roll that evidence into
11
11
  tracked project and repository references before archiving the project.
12
12
 
13
13
  The command group is the only supported writer for the artifact. Do not edit
14
- entries or the synthesis section by hand.
14
+ entries or the synthesis section by hand. A new log starts with a two-line
15
+ header that links to this page; the entry contract lives here and in
16
+ `oat project log append --help` rather than in every log.
15
17
 
16
18
  ## Configure project logs
17
19
 
18
- Two workflow keys control the feature:
20
+ Four workflow keys control the feature:
19
21
 
20
- | Key | Values | Default |
21
- | ------------------------------- | ------------------------ | --------------------------------------------- |
22
- | `workflow.projectLog` | `auto`, `true`, `false` | `auto` |
23
- | `workflow.projectLogLedgerPath` | repository-relative path | `.oat/repo/reference/project-observations.md` |
22
+ | Key | Values | Default |
23
+ | -------------------------------------- | ------------------------ | --------------------------------------------- |
24
+ | `workflow.projectLog` | `auto`, `true`, `false` | `auto` |
25
+ | `workflow.projectLogLedgerPath` | repository-relative path | `.oat/repo/reference/project-observations.md` |
26
+ | `workflow.projectLogDigest.maxEntries` | positive integer | `12` |
27
+ | `workflow.projectLogDigest.maxLines` | positive integer | `60` |
24
28
 
25
29
  ```bash
26
30
  oat config set workflow.projectLog auto --shared
@@ -35,6 +39,12 @@ current config value.
35
39
  For one scaffold operation, `oat project new --with-project-log` forces
36
40
  creation and `--no-project-log` suppresses it.
37
41
 
42
+ The two `workflow.projectLogDigest` keys bound the Workflow Observations digest
43
+ that roll-up writes into `summary.md` (see
44
+ [Promote and roll up observations](#promote-and-roll-up-observations)). They
45
+ are siblings of `workflow.projectLog`, resolve independently of it, and accept
46
+ only positive integers.
47
+
38
48
  ## Append entries
39
49
 
40
50
  Judgment entries capture evidence about the project or reusable workflow:
@@ -57,6 +67,48 @@ Judgment flags:
57
67
  - `--version-note <text>` — adds an `observed on` clause
58
68
  - `--project <path>` — optional when an active project resolves
59
69
 
70
+ ### Learning entries
71
+
72
+ A judgment entry can carry a learning category and a stable source identity.
73
+ Autonomous, cloud and goal runs record their learnings this way, so the log is
74
+ the one place learnings live; summary and retro read these entries first and a
75
+ legacy `oat-execution-learnings.md` second.
76
+
77
+ ```bash
78
+ oat project log append \
79
+ --project .oat/projects/shared/example \
80
+ --type friction --scope project --area "cloud cache misses" \
81
+ --category environment-limited \
82
+ --source obs-2026-10-11-cache \
83
+ --origin oat-project-autonomous \
84
+ --idempotency-key obs-2026-10-11-cache \
85
+ --body "Observation: the runner cache missed on every run. Impact: builds doubled. Recommendation: warm the cache in setup."
86
+ ```
87
+
88
+ - `--category <category>` — one of `gotcha`, `efficiency`,
89
+ `documentation-gap`, `candidate-skill-content`, `decision`, or
90
+ `environment-limited`, carried verbatim. Any other value is refused, and
91
+ `--category` without `--source` is refused.
92
+ - `--source <id>` — the stable per-observation source id, one word. Pass the
93
+ same id as `--idempotency-key` and a retried write appends nothing; the key
94
+ is found in the `**Source:**` line, so the body need not repeat it.
95
+ - `--origin <producer>` — the producer that recorded the learning.
96
+
97
+ These flags write a body head above the body:
98
+
99
+ ```text
100
+ **Category:** environment-limited
101
+ **Source:** obs-2026-10-11-cache
102
+ **Origin:** oat-project-autonomous
103
+ **Recorded:** 2026-10-11T14:03:22Z
104
+ ```
105
+
106
+ The heading grammar and the four judgment types are unchanged, and an entry
107
+ written without these flags is stored exactly as before. The flags are refused
108
+ on structural entries.
109
+
110
+ ### Structural entries
111
+
60
112
  Structural entries record lifecycle events without duplicating larger
61
113
  artifacts:
62
114
 
@@ -185,7 +237,10 @@ oat project log check --project .oat/projects/shared/example --json
185
237
 
186
238
  `check` reports whether the log is absent, ready, or still awaiting synthesis;
187
239
  entry counts by class, type, and scope; the last entry date; and invalid
188
- hand-written headings. It reads only `project-log.md`.
240
+ hand-written headings. It reads `project-log.md` and checks only for the
241
+ presence of the legacy learnings file: `learnings` is `legacy` when the project
242
+ still has `oat-execution-learnings.md` (summary and retro read it after the
243
+ log) and `none` otherwise, in every status including `absent`.
189
244
 
190
245
  It also reports whether the log carries a completion seal:
191
246
 
@@ -253,16 +308,50 @@ oat project log rollup \
253
308
  --json
254
309
  ```
255
310
 
256
- `rollup` writes or updates `## Workflow Observations` in `summary.md` and
257
- appends `general` judgments to `workflow.projectLogLedgerPath`. Ledger entries
311
+ `rollup` writes a bounded observations digest into `summary.md` and appends
312
+ `general` judgments to `workflow.projectLogLedgerPath`. Ledger entries
258
313
  deduplicate by date and area. The command is idempotent.
259
314
 
315
+ The digest is a projection, not a copy:
316
+
317
+ - Only judgment entries qualify. Structural entries are provenance and stay in
318
+ the log; they are counted, never rendered.
319
+ - Entries are ordered newest first, then `decision` and `gotcha` categories
320
+ ahead of the rest, then by heading text, and taken while both bounds hold:
321
+ at most `workflow.projectLogDigest.maxEntries` items and at most
322
+ `workflow.projectLogDigest.maxLines` lines for the whole section. Entries
323
+ beyond the bound are counted in a one-line trailer, never copied.
324
+ - Each item is concise: a line with date, type, area, scope, category and the
325
+ entry's source locator, then the first observation sentence and any
326
+ limitation or uncertainty line. A recommendation is rendered only for an
327
+ uncategorized entry; a categorized learning's recommendation belongs to the
328
+ summary's Autonomous Execution Learnings section, and the digest adds a
329
+ one-line cross-reference to it.
330
+ - The locator is a plain token, never a link:
331
+ `oat-project:<slug>#<entry-id>`, where the entry id is
332
+ `<date>-<type>-<area slug>-<n>` and `n` counts entries sharing that date,
333
+ type and area slug in log order. Archive export finalizes the token to the
334
+ archive identity.
335
+ - Live `.oat/projects/<scope>/<slug>/…` paths in rendered text are replaced by
336
+ a `(project file …)` label that keeps the project-relative remainder.
337
+ - When no judgment entry qualifies, the section is omitted: an existing
338
+ Workflow Observations section is removed and none is created.
339
+
340
+ The digest never feeds the ledger. Ledger graduation reads the complete
341
+ judgment set, so a `general` lesson the digest bound left out still graduates.
342
+
260
343
  The structured result contains:
261
344
 
262
345
  - `status`: `ok`, `failed`, or `ambiguous`
263
- - `summarySection`: `written` or `updated`
346
+ - `summarySection`: `written`, `updated`, or `omitted`
264
347
  - `ledgerOutcome`: `appended`, `deduplicated`, `skipped_permitted`, or `failed`
265
- - `entriesRolledUp`: number of log entries written to the summary section
348
+ - `entriesRolledUp`: number of log entries read, structural and judgment
349
+ - `digest`: the bounds used (`maxEntries`, `maxLines`), the `rendered` count,
350
+ `omitted` counts (`overBound`, `structural`, and `malformed` for a heading
351
+ that matches neither grammar and was skipped individually),
352
+ `omittedEntries` (the locator tokens of over-bound entries, no bodies), and
353
+ `byProducer` rendered/omitted counts keyed by a judgment's `**Origin:**` (or
354
+ `unattributed`) or a structural entry's producer
266
355
 
267
356
  An `ambiguous` result carries only `status` and an `ambiguity` reason, and exits
268
357
  1: the log's structure has two readings, so no count would mean anything and
@@ -66,7 +66,7 @@ Implementation closeout has one authoritative order:
66
66
  4. Run the configured pre-approval sequence.
67
67
  5. Record final HiLL approval when the final phase is a checkpoint.
68
68
  6. Run the configured post-approval sequence.
69
- 7. Mark implementation complete and emit the implementation success output.
69
+ 7. Check the journal (`oat project journal check --at implement-preflight`), then mark implementation complete and emit the implementation success output.
70
70
 
71
71
  The configured exit gate is independent from the mandatory lifecycle review,
72
72
  root-owned phase reviews, and optional `oat_phase_review_gate`. It must reach an
@@ -91,7 +91,7 @@ After implementation closeout finishes:
91
91
  - GitHub PR feedback delegates to `oat-project-review-receive-remote`
92
92
  - Review artifacts delegate to `oat-project-review-receive`
93
93
  - After revision tasks complete, state returns to `pr_open`
94
- 5. **Complete** (`oat-project-complete`) — accepts any phase status (`pr_open`, `complete`, `in_progress`), auto-refreshes `summary.md` before closeout when needed, and archives when selected by the workflow preference or completion prompt. Before any completion write it runs the read-only `oat project closeout-check`: a configured, autonomous, or lite closeout whose `oat_post_implement_sequence` snapshot is missing, malformed, or incomplete stops and routes back to `oat-project-implement`, and `oat project complete-state` refuses the same state. There is no override; see the [CLI reference](../../reference/cli-reference.md).
94
+ 5. **Complete** (`oat-project-complete`) — accepts `pr_open` or `complete` (an `in_progress` project is routed back to `oat-project-implement`, because the journal and `state.md` must agree at completion), auto-refreshes `summary.md` before closeout when needed, and archives when selected by the workflow preference or completion prompt. Before any completion write it runs the read-only `oat project closeout-check`: a configured, autonomous, or lite closeout whose `oat_post_implement_sequence` snapshot is missing, malformed, or incomplete stops and routes back to `oat-project-implement`, and `oat project complete-state` refuses the same state. There is no override for that invariant. Completion then refreshes the journal's Final Summary and `summary.md` prose from observed facts, runs the summary staged, and validates the journal with `oat project journal check --at completion` before any roll-up, seal, archive or lifecycle write; a refusal stops completion with the reason, line and owner, and `complete-state` rechecks the same evaluator before its write. A journal-only override line under `## Deviations from Plan / Design` can cover an authorized gap such as lost commit evidence, never the closeout invariant; see the [CLI reference](../../reference/cli-reference.md) and [Project Artifacts](../../reference/project-artifacts.md#the-implementation-journal).
95
95
 
96
96
  ### Project-recap gate (non-lite)
97
97
 
@@ -157,7 +157,7 @@ On completion, OAT treats archive handling as an explicit closeout choice:
157
157
  - If `.oat/config.json` sets `archive.awsProfile` and/or `archive.awsRegion`, those values are forwarded to every `aws` invocation triggered by completion (preflight checks + `aws s3 sync`) and override any ambient shell `AWS_PROFILE` / `AWS_DEFAULT_PROFILE` / `AWS_REGION` / `AWS_DEFAULT_REGION` values. The repo's archive-scoped credentials are treated as deliberate intent so users don't have to unset shell env vars before running completion. See [`config-and-local-state.md`](../../reference/config-and-local-state.md) for the full precedence chain.
158
158
  - If `.oat/config.json` sets `archive.summaryExportPath`, completion copies `summary.md` to `<archive.summaryExportPath>/20260401-<project>.md`.
159
159
  - Missing or unusable AWS CLI configuration blocks synced terminal cleanup when S3 durability is configured; when S3 sync is not configured, it is not part of the durability requirement.
160
- - `oat repo archive sync` can later sync all archived projects, or one named archived project, back down from S3; it selects the latest dated remote snapshot and materializes it into the local bare archive tree.
160
+ - `oat repo archive sync` can later sync all archived projects, or one named archived project, back down from S3, materializing each snapshot into the local bare archive tree under its full local name (generation 2 of `<project>` restores to `<project>-g2`, never over generation 1). Archive names follow one contract, `<project>[-gN][-<scope>]` locally and `<YYYYMMDD>-<project>[-gN][-<scope>]` in S3, where `-<scope>` appears only when another scope's archive already held the unqualified name. An unnamed sync restores the latest dated snapshot of every local archive. A named sync takes an exact snapshot name first, then a full generation name such as `<project>-g2` or `<project>-g2-local`, then a generation family: `<project>-<scope>` restores that scope's latest generation, and the base `<project>` restores every family of the project (the unqualified one and each scope-qualified one) at its latest generation, then latest date. A project whose own name ends in `-gN` or `-<scope>` reads as that generation or qualifier, so its name can resolve to the same archive directory as a shorter-named project's; sync it by exact snapshot name to remove the ambiguity.
161
161
  - Persisted archive metadata binds the snapshot to the source-ref SHA, allowing
162
162
  an interrupted closeout or legacy complete record to resume without
163
163
  rematerializing an active project. Dashboard and list surfaces omit fully
@@ -259,6 +259,24 @@ Final review `passed` gate requires:
259
259
  A goal milestone delivery is gated by its passed, fresh integrated review and
260
260
  exit carrier rather than by a `final` row.
261
261
 
262
+ ## Receipts in the journal
263
+
264
+ `oat-project-review-receive` writes one receipt per received review: a
265
+ phase-scoped receipt in that phase's section of `implementation.md`, a final,
266
+ multi-phase, milestone or remote (PR) receipt under `## Reviews and Gates`,
267
+ never after `## References`. Each receipt lists every finding's identity and
268
+ substance, its disposition and rationale, the fix task or approved deferral it
269
+ links to, and the final outcome; approved deferrals are also lines under
270
+ `## Deferred Findings`. The review file path is a local-only citation: reviews
271
+ are not archived, so the journal and plan must stand without it, and an
272
+ unresolved review path is never a completion defect.
273
+
274
+ Code reviews run `oat project journal check --at review --scope <phases>`
275
+ first; its reasons reach the reviewer in the Review Scope. A finding that a
276
+ mechanical pointer or projection refresh resolves (stale overview totals, a
277
+ run line to re-render, a lagging resume pointer) is refresh-only and belongs to
278
+ closeout's refresh, never a fix task.
279
+
262
280
  ## Complexity review at budget exhaustion
263
281
 
264
282
  When a review or gate budget runs out, another round of the same review is
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.3.21",
3
- "docs-config": "0.3.21",
4
- "docs-theme": "0.3.21",
5
- "docs-transforms": "0.3.21"
2
+ "cli": "0.3.22",
3
+ "docs-config": "0.3.22",
4
+ "docs-theme": "0.3.22",
5
+ "docs-transforms": "0.3.22"
6
6
  }
@@ -5,7 +5,7 @@ disable-model-invocation: false
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash, Glob, Grep
7
7
  metadata:
8
- version: 1.1.3
8
+ version: 1.1.4
9
9
  ---
10
10
 
11
11
  # OAT in Cursor Cloud
@@ -33,7 +33,8 @@ end-to-end requests route to `oat-project-autonomous` after orientation.
33
33
 
34
34
  - A shell and Node/npm are available.
35
35
  - Read `references/cursor-cloud-mechanics.md` only when model-family identity,
36
- dispatch-surface catalogs, or degraded review evidence is needed.
36
+ dispatch-surface catalogs, degraded review evidence, or a learning write is
37
+ needed.
37
38
 
38
39
  ## Mode Assertion
39
40
 
@@ -62,7 +63,7 @@ context without taking ownership of a lifecycle phase.
62
63
  - Verifying or installing the supported OAT CLI.
63
64
  - Comparing skill versions as a freshness check.
64
65
  - Loading Cursor mechanics and org-layer context skills when relevant.
65
- - Recording environment anomalies and degraded routes in project learnings.
66
+ - Recording environment anomalies and degraded routes as project-log learnings.
66
67
 
67
68
  **Self-Correction Protocol:**
68
69
 
@@ -243,9 +244,10 @@ user version >= repo version
243
244
  It never chooses the source:
244
245
 
245
246
  - user version equal to or higher than repo → read the user copy;
246
- - repo version higher than user → still read the user copy, append an anomaly
247
- to `oat-execution-learnings.md`, and flag the user tier for refresh with
248
- `oat tools update` or an environment rebuild;
247
+ - repo version higher than user → still read the user copy, record the anomaly
248
+ as a learning through the project-log learning write in
249
+ `references/cursor-cloud-mechanics.md` (Learning Write), and flag the user
250
+ tier for refresh with `oat tools update` or an environment rebuild;
249
251
  - if freshness is safety-critical, refresh and re-verify before continuing;
250
252
  stop if the user tier cannot be refreshed safely.
251
253
 
@@ -283,8 +285,10 @@ the provider dispatch algorithm.
283
285
  environment when integrated systems require them. Do not hard-depend on,
284
286
  name, or emulate an absent org layer.
285
287
  - When an expected skill, MCP server, CLI surface, or credential is absent,
286
- record the gap in the active project's `oat-execution-learnings.md`. Continue
287
- only through a documented integrity-preserving route.
288
+ record the gap as a learning in the active project's `project-log.md` through
289
+ the Learning Write in `references/cursor-cloud-mechanics.md`; with the
290
+ project log disabled it warns once and records nothing. Continue only through
291
+ a documented integrity-preserving route.
288
292
 
289
293
  Return an orientation summary:
290
294
 
@@ -92,10 +92,71 @@ That provider reference owns Cursor launch, acceptance, continuation, retry,
92
92
  and recovery mechanics. `oat-project-dispatch-subagents` owns lifecycle scope
93
93
  and policy adaptation. Do not duplicate those contracts here.
94
94
 
95
+ ## Learning Write
96
+
97
+ Cloud learnings — environment anomalies, setup gaps, degraded checks, freshness
98
+ anomalies and missing skills, MCP servers, CLI surfaces or credentials — are
99
+ category-bearing judgment entries in the active project's `project-log.md`,
100
+ written only through `oat project log append`. Never create or append to
101
+ `oat-execution-learnings.md`.
102
+
103
+ Give each observation a stable, whitespace-free source id unique to this run
104
+ and observation (for example `cloud-<run id>-<NN>`) and retain it for retries;
105
+ it is both `--source` and `--idempotency-key`, so a replay appends nothing.
106
+ Write the learning title as `--area` and the body as `Observation:`,
107
+ `Impact:`, `Recommendation:` and, when it applies, `Uncertainty:` lines.
108
+
109
+ ```bash
110
+ # Learning write (shared by oat-project-autonomous, oat-cursor-cloud-projects
111
+ # and oat-project-goal): oat_record_learning <category> <source-id> <title> <body>
112
+ oat_record_learning() {
113
+ local category="$1" source="$2" title="$3" body="$4" type result
114
+ case "$category" in
115
+ gotcha | environment-limited) type=friction ;;
116
+ efficiency | candidate-skill-content) type=worked-well ;;
117
+ documentation-gap | decision) type=feedback ;;
118
+ *)
119
+ echo "oat: unknown learning category '$category'" >&2
120
+ return 1
121
+ ;;
122
+ esac
123
+ result=$(oat project log append --json --project "$PROJECT_PATH" \
124
+ --type "$type" --scope project --area "$title" \
125
+ --category "$category" \
126
+ --source "$source" \
127
+ --origin "${LEARNING_ORIGIN:?set to the producer skill name}" \
128
+ --idempotency-key "$source" \
129
+ --body "$body") || {
130
+ printf '%s\n' "$result" >&2
131
+ return 1
132
+ }
133
+ if printf '%s' "$result" | grep -Eq '"status": *"skipped"'; then
134
+ echo "oat: warning: project log disabled (workflow.projectLog=false); learning $source not recorded" >&2
135
+ fi
136
+ }
137
+ ```
138
+
139
+ Set `LEARNING_ORIGIN=oat-cursor-cloud-projects`. Use the six categories
140
+ verbatim; an environment anomaly or a missing surface is usually
141
+ `environment-limited`, a stale user tier `gotcha`. The write maps the category
142
+ to the judgment type (`gotcha`, `environment-limited` → `friction`;
143
+ `efficiency`, `candidate-skill-content` → `worked-well`; `documentation-gap`,
144
+ `decision` → `feedback`).
145
+
146
+ Call it unconditionally; do not read `workflow.projectLog` yourself. The
147
+ append consults that flag only while `project-log.md` does not exist: with the
148
+ log disabled and absent it creates nothing and reports `status: skipped`, the
149
+ write prints one warning line, records nothing, and orientation continues. An
150
+ existing `project-log.md` keeps accepting categorized learnings whatever the
151
+ flag says (`DR-260718-automatic-create-on-first`). Commit `project-log.md`, when it
152
+ exists, with the next bookkeeping commit for the project (a synced project uses
153
+ `oat project push`).
154
+
95
155
  ## Degraded Route Evidence
96
156
 
97
157
  Degradation is a pre-launch selection outcome, not a post-accept fallback.
98
- Record it in the canonical dispatch record plus project learnings.
158
+ Record it in the canonical dispatch record plus one learning (see Learning
159
+ Write).
99
160
 
100
161
  Use this shape for the Cursor-specific evidence supplied to the generic record:
101
162
 
@@ -149,7 +210,7 @@ independence:
149
210
  degradation:
150
211
  present: true
151
212
  reason: catalog-contained-one-dispatchable-family
152
- learnings_entry: oat-execution-learnings.md#<entry>
213
+ learnings_entry: <learning source id>
153
214
  ```
154
215
 
155
216
  Include the exact configured invocation evidence required by the generic record
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  user-invocable: true
7
7
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, Task
8
8
  metadata:
9
- version: 1.0.21
9
+ version: 1.0.22
10
10
  ---
11
11
 
12
12
  # Autonomous OAT Project
@@ -99,7 +99,7 @@ If you catch yourself:
99
99
  **Recovery:**
100
100
 
101
101
  1. Persist only safe, owned bookkeeping.
102
- 2. Record the deviation or inventory gap in the learnings log.
102
+ 2. Record the deviation or inventory gap as a learning (Step 4).
103
103
  3. Return to the earliest incomplete canonical lifecycle step, or stop with the
104
104
  structured blocker report.
105
105
 
@@ -117,7 +117,7 @@ Print each indicator only when its step begins:
117
117
  - `[2/9] Detecting persisted lifecycle state…`
118
118
  - `[3/9] Selecting workflow review density…`
119
119
  - `[4/9] Gathering external-integration evidence…`
120
- - `[5/9] Initializing execution learnings…`
120
+ - `[5/9] Preparing the project-log learning write…`
121
121
  - `[6/9] Running lifecycle phases and independent reviews…`
122
122
  - `[7/9] Completing implementation closeout…`
123
123
  - `[8/9] Committing and pushing the phase boundary…`
@@ -388,18 +388,12 @@ continue with checked-out sources when that preserves integrity. Missing
388
388
  evidence that would force material product or safety assumptions is a boundary,
389
389
  not permission to guess.
390
390
 
391
- ### Step 4: Create and Maintain the Learnings Log
391
+ ### Step 4: Record Learnings in the Project Log
392
392
 
393
- At run start, create `"$PROJECT_PATH/oat-execution-learnings.md"` when absent
394
- with `oat_generated: false` and append-only intent. Append UTC-dated entries:
395
-
396
- ```markdown
397
- ## {timestamp} - {category} - {title}
398
-
399
- **Observation:** ...
400
- **Impact:** ...
401
- **Recommendation:** ...
402
- ```
393
+ Learnings are category-bearing judgment entries in `project-log.md`, written
394
+ only through `oat project log append`. Never create or append to
395
+ `oat-execution-learnings.md`; summary and retro still read an existing legacy
396
+ file second.
403
397
 
404
398
  Use only these categories: `gotcha`, `efficiency`, `documentation-gap`,
405
399
  `candidate-skill-content`, `decision`, and `environment-limited`. Record
@@ -407,22 +401,89 @@ degraded routes, inventory gaps, unavailable verification, and reusable
407
401
  improvements. Never record secrets, token values, signed URLs, or active
408
402
  autonomy signals.
409
403
 
410
- After creating the log and after every later append, persist that write before
411
- continuing:
404
+ Give every observation a stable source id: one whitespace-free word that is
405
+ unique to this run and observation, for example
406
+ `autonomous-<run id>-<NN>`. Retain it for retries: the id is both `--source`
407
+ and `--idempotency-key`, so a replayed write reports `already-appended` and
408
+ appends nothing. Write the learning title as `--area`, and the body as
409
+ `Observation:`, `Impact:`, `Recommendation:` and, when it applies,
410
+ `Uncertainty:` lines. Define the write once and call it for every learning:
412
411
 
413
412
  ```bash
414
- PROJECT_SCOPE=$(oat project scope "$PROJECT_PATH" --format value) || {
415
- echo "oat: cannot resolve project scope for $PROJECT_PATH; refusing to commit artifacts" >&2
416
- exit 1
413
+ # Learning write (shared by oat-project-autonomous, oat-cursor-cloud-projects
414
+ # and oat-project-goal): oat_record_learning <category> <source-id> <title> <body>
415
+ oat_record_learning() {
416
+ local category="$1" source="$2" title="$3" body="$4" type result
417
+ case "$category" in
418
+ gotcha | environment-limited) type=friction ;;
419
+ efficiency | candidate-skill-content) type=worked-well ;;
420
+ documentation-gap | decision) type=feedback ;;
421
+ *)
422
+ echo "oat: unknown learning category '$category'" >&2
423
+ return 1
424
+ ;;
425
+ esac
426
+ result=$(oat project log append --json --project "$PROJECT_PATH" \
427
+ --type "$type" --scope project --area "$title" \
428
+ --category "$category" \
429
+ --source "$source" \
430
+ --origin "${LEARNING_ORIGIN:?set to the producer skill name}" \
431
+ --idempotency-key "$source" \
432
+ --body "$body") || {
433
+ printf '%s\n' "$result" >&2
434
+ return 1
435
+ }
436
+ if printf '%s' "$result" | grep -Eq '"status": *"skipped"'; then
437
+ echo "oat: warning: project log disabled (workflow.projectLog=false); learning $source not recorded" >&2
438
+ fi
417
439
  }
418
- if [ "$PROJECT_SCOPE" = "synced" ]; then
419
- oat project push "$PROJECT_PATH" --message "chore(oat): update autonomous execution learnings" || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
420
- else
421
- OWNED_COMMIT_PATHS=("$PROJECT_PATH/oat-execution-learnings.md")
422
- oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-autonomous:2" --message "chore(oat): update autonomous execution learnings" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
440
+ ```
441
+
442
+ Set `LEARNING_ORIGIN=oat-project-autonomous`. The category is preserved
443
+ verbatim in the entry's `**Category:**` head and maps to the judgment type:
444
+ `gotcha` and `environment-limited` → `friction`; `efficiency` and
445
+ `candidate-skill-content` → `worked-well`; `documentation-gap` and `decision`
446
+ → `feedback`.
447
+
448
+ Call the write unconditionally; do not read `workflow.projectLog` yourself.
449
+ The append consults that flag only while `project-log.md` does not exist: with
450
+ the log disabled (`workflow.projectLog: false`) and absent, it creates nothing
451
+ and reports `status: skipped` (`reason: projectLog=false`), the write prints
452
+ its one warning line, records nothing, and the run continues. An existing
453
+ `project-log.md` keeps accepting categorized learnings whatever the flag says
454
+ (`DR-260718-automatic-create-on-first`). Disabling the log stops its creation;
455
+ do not persist the learning anywhere else.
456
+
457
+ Assign the source id before each write and pass that variable, so the commit
458
+ below carries the id just written (`$RUN_ID` is this run's id; `NN` numbers the
459
+ observation and is retained for retries):
460
+
461
+ ```bash
462
+ LEARNING_SOURCE="autonomous-$RUN_ID-NN"
463
+ oat_record_learning <category> "$LEARNING_SOURCE" "<title>" "<body>"
464
+ ```
465
+
466
+ After every write, persist the log before continuing:
467
+
468
+ ```bash
469
+ if [ -f "$PROJECT_PATH/project-log.md" ]; then
470
+ PROJECT_SCOPE=$(oat project scope "$PROJECT_PATH" --format value) || {
471
+ echo "oat: cannot resolve project scope for $PROJECT_PATH; refusing to commit artifacts" >&2
472
+ exit 1
473
+ }
474
+ if [ "$PROJECT_SCOPE" = "synced" ]; then
475
+ oat project push "$PROJECT_PATH" --message "chore(oat): record autonomous execution learning" || { echo "oat: project push failed; run oat project pull, resolve the reported state, and retry" >&2; exit 1; }
476
+ else
477
+ OWNED_COMMIT_PATHS=("$PROJECT_PATH/project-log.md")
478
+ oat internal commit-paths --identity "${COMMIT_IDENTITY:?set once and retain for retries}:oat-project-autonomous:learning:${LEARNING_SOURCE:?set to the source id just written}" --message "chore(oat): record autonomous execution learning" -- "${OWNED_COMMIT_PATHS[@]}" || exit 1
479
+ fi
423
480
  fi
424
481
  ```
425
482
 
483
+ `LEARNING_SOURCE` is the source id just written, so each learning commits
484
+ under its own operation identity; an unset id stops the commit rather than
485
+ sharing one identity across learnings.
486
+
426
487
  ### Step 5: Invoke Lifecycle Skills and Reviews
427
488
 
428
489
  Invoke each lifecycle skill by name and let it own its complete workflow,
@@ -582,7 +643,7 @@ Take this goal from discovery to PR with OAT autonomy: add resumable exports.
582
643
  Do not create or normalize project artifacts by hand.
583
644
 
584
645
  **A lifecycle skill asks an unmapped question:** Treat it as an
585
- `inventory-gap` boundary, record the exact site in the learnings log, and stop
646
+ `inventory-gap` boundary, record the exact site as a learning (Step 4), and stop
586
647
  resumably.
587
648
 
588
649
  **A review launch fails after acceptance:** Continue or retry only through the
@@ -607,4 +668,5 @@ reconciliation path. Do not guess or overwrite the tracker.
607
668
  resumable boundary.
608
669
  - ✅ Phase-boundary commits and non-force pushes are recorded.
609
670
  - ✅ The run ended with a final PR report or a structured blocker report.
610
- - ✅ The learnings log contains reusable, secret-free entries.
671
+ - ✅ Learnings are reusable, secret-free, category-bearing project-log entries,
672
+ or the run reported that the disabled, absent log recorded none.
@@ -324,7 +324,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
324
324
  | `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a8983fec040c -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `f3e49b727752 -> NG`; `f979b2342d28 -> NG`; `803bf40ec423 -> NG`; `c8fced47ef8e -> NG`; `d7ea1e2a4f5f -> NG`; `5f315ab87cb1 -> NG` |
325
325
  | `oat-project-pr-final/SKILL.md` | `601ac2b890f2 -> NG`; `c264a64398f0 -> NG`; `9efcbcee42ea -> NG`; `655d61df0a8f -> NG`; `cf317c17c586 -> PRFINAL-01`; `2de348a391c0 -> PRFINAL-03` |
326
326
  | `oat-project-pr-final/references/docs/autonomy-contract.md` | `* -> NG` |
327
- | `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `fffe5eea5ebd -> NG`; `e7dc6fdc4eb3 -> COMPLETE-01`; `e5460e437299 -> NG`; `882b61c9096c -> NG`; `9ffa1c752505 -> NG`; `8c5e599f6bac -> NG` |
327
+ | `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `fffe5eea5ebd -> NG`; `e7dc6fdc4eb3 -> COMPLETE-01`; `e5460e437299 -> NG`; `882b61c9096c -> NG`; `9ffa1c752505 -> NG`; `8c5e599f6bac -> NG` |
328
328
  | `oat-project-review-provide/SKILL.md` | `1f4b981cac8b -> NG`; `adaeca152bb2 -> NG`; `2f7c201c3c06 -> NG`; `88f79700afdc -> NG`; `655d61df0a8f -> NG`; `efafde9ef5a0 -> NG`; `d2a3861d6323 -> REVIEWPROVIDE-02`; `65f5b9cf49cd -> REVIEWPROVIDE-04`; `962cb38d246a -> REVIEWPROVIDE-04`; `1a568483ba0b -> REVIEWPROVIDE-04`; `610e27edfe85 -> REVIEWPROVIDE-04`; `bb0096e95c47 -> REVIEWPROVIDE-06`; `55f6357a987d -> REVIEWPROVIDE-06`; `e3c08ecdab17 -> REVIEWPROVIDE-06`; `1bee61f8531c -> REVIEWPROVIDE-07`; `3d35091607a1 -> REVIEWPROVIDE-08`; `fb40c4341c4c -> NG`; `b22d16885150 -> NG`; `d2b25906242e -> REVIEWPROVIDE-08`; `fd8ebf72b3c4 -> NG`; `79c8103e8656 -> NG`; `4fbd78337e33 -> NG`; `c3d50ea7cf69 -> NG`; `09b1b8dd445c -> NG`; `7acc8f3718d2 -> REVIEWPROVIDE-09`; `b2fa883fc4a2 -> NG`; `fe4421531b4c -> NG` |
329
329
  | `oat-project-review-receive/SKILL.md` | `9b8a3743d626 -> NG`; `49ed2780983b -> NG`; `4ee8730382d3 -> NG`; `655d61df0a8f -> NG`; `765f897d67ac -> NG`; `53b58d16dd32 -> NG`; `fb8755a3bdf4 -> NG`; `1d710fb4cc66 -> NG`; `1f7dd98dff2f -> NG`; `56f78c6740e6 -> NG`; `76f5fb5a88cd -> NG`; `085abfa3599f -> REVIEWRECEIVE-01`; `92578f7df686 -> NG`; `a7d114059bb6 -> NG`; `ac88cfaa83d9 -> NG`; `594bbf70346c -> REVIEWRECEIVE-08`; `f31f07284718 -> REVIEWRECEIVE-02`; `e4c0625439f8 -> REVIEWRECEIVE-04`; `505ad8389c0a -> REVIEWRECEIVE-05`; `20e05e1a4381 -> REVIEWRECEIVE-06`; `e30e06f39281 -> REVIEWRECEIVE-07`; `f8fd58180ecf -> NG`; `c3abcdc02d9f -> NG`; `f2ebdd6abb9b -> NG` |
330
330
  | `oat-project-review-provide/SKILL.md` | `2e794bf4fc4a -> REVIEWPROVIDE-08`; `5441ab977b46 -> REVIEWPROVIDE-08` |
@@ -7,7 +7,7 @@ disable-model-invocation: true
7
7
  user-invocable: true
8
8
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, Task
9
9
  metadata:
10
- version: 1.0.2
10
+ version: 1.0.3
11
11
  ---
12
12
 
13
13
  # Brief Project