@open-agent-toolkit/cli 0.2.58 → 0.2.62

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/agents/oat-phase-implementer.md +27 -4
  2. package/assets/agents/oat-reviewer.md +25 -14
  3. package/assets/bundle-metadata.json +1 -1
  4. package/assets/docs/cli-utilities/configuration.md +16 -0
  5. package/assets/docs/cli-utilities/workflow-gates.md +91 -6
  6. package/assets/docs/contributing/skills.md +27 -5
  7. package/assets/docs/provider-sync/commands.md +23 -0
  8. package/assets/docs/reference/cli-reference.md +10 -3
  9. package/assets/docs/reference/oat-directory-structure.md +1 -0
  10. package/assets/docs/workflows/ideas/index.md +1 -1
  11. package/assets/docs/workflows/index.md +1 -0
  12. package/assets/docs/workflows/projects/artifacts.md +24 -3
  13. package/assets/docs/workflows/projects/autonomy.md +5 -2
  14. package/assets/docs/workflows/projects/dispatch-ceiling.md +43 -7
  15. package/assets/docs/workflows/projects/hill-checkpoints.md +21 -0
  16. package/assets/docs/workflows/projects/implementation-execution.md +10 -2
  17. package/assets/docs/workflows/projects/lifecycle.md +128 -10
  18. package/assets/docs/workflows/projects/pr-flow.md +2 -0
  19. package/assets/docs/workflows/projects/reviews.md +1 -1
  20. package/assets/docs/workflows/projects/state-machine.md +20 -0
  21. package/assets/docs/workflows/skills/index.md +2 -1
  22. package/assets/public-package-versions.json +4 -4
  23. package/assets/skills/oat-brainstorm/SKILL.md +61 -12
  24. package/assets/skills/oat-docs/SKILL.md +13 -8
  25. package/assets/skills/oat-doctor/SKILL.md +3 -3
  26. package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
  27. package/assets/skills/oat-project-autonomous/SKILL.md +14 -9
  28. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +59 -38
  29. package/assets/skills/oat-project-capture/SKILL.md +2 -2
  30. package/assets/skills/oat-project-design/SKILL.md +10 -5
  31. package/assets/skills/oat-project-discover/SKILL.md +15 -9
  32. package/assets/skills/oat-project-document/SKILL.md +11 -1
  33. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +59 -38
  34. package/assets/skills/oat-project-implement/SKILL.md +3 -3
  35. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +149 -24
  36. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +14 -8
  37. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +59 -38
  38. package/assets/skills/oat-project-implement/references/phase-execution.md +16 -1
  39. package/assets/skills/oat-project-implement/references/plan-and-resume.md +19 -1
  40. package/assets/skills/oat-project-import-plan/SKILL.md +75 -6
  41. package/assets/skills/oat-project-lite/SKILL.md +467 -0
  42. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +331 -0
  43. package/assets/skills/oat-project-next/SKILL.md +54 -11
  44. package/assets/skills/oat-project-plan/SKILL.md +42 -5
  45. package/assets/skills/oat-project-plan-writing/SKILL.md +100 -3
  46. package/assets/skills/oat-project-pr-final/SKILL.md +33 -7
  47. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +59 -38
  48. package/assets/skills/oat-project-pr-progress/SKILL.md +3 -3
  49. package/assets/skills/oat-project-progress/SKILL.md +27 -3
  50. package/assets/skills/oat-project-promote-spec-driven/SKILL.md +3 -1
  51. package/assets/skills/oat-project-quick-start/SKILL.md +29 -4
  52. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +59 -38
  53. package/assets/skills/oat-project-review-provide/SKILL.md +37 -11
  54. package/assets/skills/oat-project-review-provide-remote/SKILL.md +12 -5
  55. package/assets/skills/oat-project-summary/SKILL.md +27 -3
  56. package/assets/templates/plan-lite.md +165 -0
  57. package/assets/templates/plan.md +1 -1
  58. package/assets/templates/state.md +5 -2
  59. package/dist/commands/gate/index.d.ts.map +1 -1
  60. package/dist/commands/gate/index.js +102 -8
  61. package/dist/commands/init/index.d.ts.map +1 -1
  62. package/dist/commands/init/index.js +16 -1
  63. package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
  64. package/dist/commands/project/dispatch-ceiling/index.js +10 -1
  65. package/dist/commands/project/index.d.ts.map +1 -1
  66. package/dist/commands/project/index.js +2 -0
  67. package/dist/commands/project/new/index.d.ts +3 -2
  68. package/dist/commands/project/new/index.d.ts.map +1 -1
  69. package/dist/commands/project/new/index.js +2 -1
  70. package/dist/commands/project/new/scaffold.d.ts +5 -3
  71. package/dist/commands/project/new/scaffold.d.ts.map +1 -1
  72. package/dist/commands/project/new/scaffold.js +38 -10
  73. package/dist/commands/project/promote/index.d.ts +2 -0
  74. package/dist/commands/project/promote/index.d.ts.map +1 -0
  75. package/dist/commands/project/promote/index.js +1 -0
  76. package/dist/commands/project/promote/promote.d.ts +47 -0
  77. package/dist/commands/project/promote/promote.d.ts.map +1 -0
  78. package/dist/commands/project/promote/promote.js +322 -0
  79. package/dist/commands/project/split/run.d.ts.map +1 -1
  80. package/dist/commands/project/split/run.js +8 -1
  81. package/dist/commands/project/validate-plan/index.d.ts.map +1 -1
  82. package/dist/commands/project/validate-plan/index.js +25 -1
  83. package/dist/commands/project/validate-plan/validate-plan.d.ts +8 -0
  84. package/dist/commands/project/validate-plan/validate-plan.d.ts.map +1 -1
  85. package/dist/commands/project/validate-plan/validate-plan.js +49 -0
  86. package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
  87. package/dist/commands/remove/skill/remove-skill.js +10 -1
  88. package/dist/commands/shared/frontmatter.d.ts +32 -1
  89. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  90. package/dist/commands/shared/frontmatter.js +93 -0
  91. package/dist/commands/state/generate.d.ts.map +1 -1
  92. package/dist/commands/state/generate.js +23 -0
  93. package/dist/commands/status/index.d.ts.map +1 -1
  94. package/dist/commands/status/index.js +8 -1
  95. package/dist/commands/sync/apply.d.ts.map +1 -1
  96. package/dist/commands/sync/apply.js +40 -6
  97. package/dist/commands/sync/index.d.ts.map +1 -1
  98. package/dist/commands/sync/index.js +11 -17
  99. package/dist/commands/sync/sync.types.d.ts +6 -6
  100. package/dist/commands/sync/sync.types.d.ts.map +1 -1
  101. package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
  102. package/dist/commands/tools/shared/pack-manifest.js +2 -0
  103. package/dist/config/resolve.d.ts +16 -0
  104. package/dist/config/resolve.d.ts.map +1 -1
  105. package/dist/config/resolve.js +16 -8
  106. package/dist/engine/execute-plan.d.ts.map +1 -1
  107. package/dist/engine/execute-plan.js +6 -0
  108. package/dist/manifest/index.d.ts +2 -1
  109. package/dist/manifest/index.d.ts.map +1 -1
  110. package/dist/manifest/index.js +1 -1
  111. package/dist/manifest/manager.d.ts +40 -0
  112. package/dist/manifest/manager.d.ts.map +1 -1
  113. package/dist/manifest/manager.js +35 -0
  114. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-provide
3
- version: 1.5.3
3
+ version: 1.5.5
4
4
  description: Use when the user explicitly asks to review an OAT project — e.g. "review project", "review the project", "run project review", or confirms a previously offered review. Do NOT auto-invoke on completed work alone. Resolves a project review scope and offers before running.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -306,6 +306,7 @@ WORKFLOW_MODE=$(oat project status --project-path "$PROJECT_PATH" --field projec
306
306
  - `spec-driven`: `spec.md`, `design.md`, `plan.md`
307
307
  - `quick`: `discovery.md`, `plan.md` (`spec.md`/`design.md` optional if present)
308
308
  - `import`: `plan.md` (`references/imported-plan.md` recommended, `spec.md`/`design.md` optional)
309
+ - `lite`: `plan.md`, `implementation.md` (`discovery.md`/`spec.md`/`design.md` are absent by design)
309
310
 
310
311
  **Required for artifact review:**
311
312
 
@@ -314,9 +315,10 @@ WORKFLOW_MODE=$(oat project status --project-path "$PROJECT_PATH" --field projec
314
315
  - reviewing `spec` requires `discovery.md`
315
316
  - reviewing `design` in `spec-driven` mode requires `spec.md`
316
317
  - reviewing `design` in `quick/import` mode requires only `discovery.md` (spec is skipped in these modes)
317
- - in `quick/import` mode, missing `spec.md` must not be treated as a project review gate failure for `artifact design`; proceed with normal project-scoped review flow, artifact writing, and bookkeeping
318
+ - in `quick/import` mode (lite has no design artifact), missing `spec.md` must not be treated as a project review gate failure for `artifact design`; proceed with normal project-scoped review flow, artifact writing, and bookkeeping
318
319
  - reviewing `plan` in `spec-driven` mode requires `spec.md` + `design.md`
319
- - reviewing `plan` in `quick/import` mode may use `discovery.md` and/or `references/imported-plan.md` instead
320
+ - reviewing `plan` in `quick/import` mode may use `discovery.md` and/or `references/imported-plan.md` instead; lite uses the separate rule below
321
+ - reviewing `plan` in `lite` mode requires only `plan.md`; its Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria sections are the complete upstream contract
320
322
 
321
323
  **If missing:** Report missing required artifacts for the current mode and stop if requirements are not met.
322
324
 
@@ -502,6 +504,8 @@ case "$SCOPE_TOKEN" in
502
504
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md" "$PROJECT_PATH/spec.md" "$PROJECT_PATH/design.md")
503
505
  elif [[ "$WORKFLOW_MODE" == "quick" ]]; then
504
506
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md" "$PROJECT_PATH/discovery.md")
507
+ elif [[ "$WORKFLOW_MODE" == "lite" ]]; then
508
+ FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md")
505
509
  else
506
510
  FILES_CHANGED=$(printf "%s\n" "$PROJECT_PATH/plan.md" "$PROJECT_PATH/references/imported-plan.md")
507
511
  fi
@@ -581,10 +585,12 @@ Build the "Review Scope" metadata for the reviewer:
581
585
  **Scope:** {scope}{optional: " (" + SCOPE_RANGE + ")"}
582
586
  **Date:** {today}
583
587
 
588
+ - Workflow mode: {WORKFLOW_MODE}
589
+
584
590
  **Artifact Paths:**
585
591
 
586
- - Spec: {PROJECT_PATH}/spec.md (required in spec-driven mode; optional in quick/import)
587
- - Design: {PROJECT_PATH}/design.md (required in spec-driven mode; optional in quick/import)
592
+ - Spec: {PROJECT_PATH}/spec.md (required in spec-driven mode; optional in quick/import/lite)
593
+ - Design: {PROJECT_PATH}/design.md (required in spec-driven mode; optional in quick/import/lite)
588
594
  - Plan: {PROJECT_PATH}/plan.md
589
595
  - Implementation: {PROJECT_PATH}/implementation.md
590
596
  - Discovery: {PROJECT_PATH}/discovery.md
@@ -622,6 +628,19 @@ Build the "Review Scope" metadata for the reviewer:
622
628
  - Do not force a code-defect framing for accepted design drift; `oat-project-review-receive` can convert artifact drift into alignment tasks or explicit deferrals.
623
629
  ```
624
630
 
631
+ For `WORKFLOW_MODE=lite`, render the artifact-path portion of every artifact-plan
632
+ and code-final Review Scope explicitly as:
633
+
634
+ - Discovery: not required (absent by design)
635
+ - Spec: not required (absent by design)
636
+ - Design: not required (absent by design)
637
+ - Import reference: not required
638
+ - Plan: `{PROJECT_PATH}/plan.md` (Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria are the requirements contract)
639
+ - Implementation: `{PROJECT_PATH}/implementation.md`
640
+
641
+ Always pass the resolved workflow mode. Never omit it and let the reviewer fall
642
+ back to its spec-driven default.
643
+
625
644
  ### Step 6: Execute Review (3-Tier Capability Model)
626
645
 
627
646
  **Canonical reviewer instructions:** Before a direct reviewer-definition read or
@@ -654,11 +673,18 @@ oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role review
654
673
  ```
655
674
 
656
675
  Require `dispatchReport.schemaVersion: 1`. Render/consume the resolver's
657
- versioned report using `formatDispatchReport(dispatchReport)` semantics, and
658
- derive the formal compatibility line only with
659
- `formatDispatchStamp(dispatchReport)` / `toDispatchStampRecord(dispatchReport)`.
660
- Include that derived line in the review dispatch audit metadata; do not
661
- hand-assemble `Dispatch:` fields from a role name or model string.
676
+ versioned report using `formatDispatchReport(dispatchReport)` semantics. Take
677
+ the formal compatibility line directly from the same response's additive
678
+ `dispatchStamp` field: it must be a non-empty string beginning with the
679
+ canonical `Dispatch:` prefix. Copy that returned value byte-for-byte into the
680
+ review dispatch audit metadata. Reformatting the report through
681
+ `formatDispatchStamp(dispatchReport)` / `toDispatchStampRecord(dispatchReport)`
682
+ is an optional corroboration where that library is already loaded; it is never
683
+ the normal path and never a substitute for the returned field, and no
684
+ out-of-tree shim is required. Do not hand-assemble `Dispatch:` fields from a
685
+ role name or model string. If `dispatchStamp` is absent or lacks the canonical
686
+ prefix on a report-bearing response, stop and report instead of reconstructing
687
+ it.
662
688
 
663
689
  The exact managed provider target still comes from
664
690
  `providers.<provider>.dispatchArgs` plus
@@ -937,7 +963,7 @@ If running inline (Tier 3), execute the review and write artifact.
937
963
  **Review checklist (from oat-reviewer):**
938
964
 
939
965
  1. Verify scope (don't review out-of-scope changes)
940
- 2. If code review: verify alignment to available requirements sources (`spec`/`design` for spec-driven mode; `discovery`/import reference for quick/import)
966
+ 2. If code review: verify alignment to available requirements sources (`spec`/`design` for spec-driven mode; `discovery`/import reference for quick/import; plan.md Summary, Decisions, Assumptions, Out of Scope, and Validation Criteria for lite)
941
967
  3. If code review: verify code quality (correctness, tests, security, maintainability)
942
968
  4. If artifact review: verify completeness/clarity/readiness of the artifact and its alignment with upstream artifacts
943
969
  5. Categorize findings (Critical/Important/Medium/Minor)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-review-provide-remote
3
- version: 1.1.2
3
+ version: 1.1.3
4
4
  description: Use when reviewing a GitHub PR opened on another machine for an active OAT project and posting findings back as a single PR review. Resolves the project from the PR diff, reads project artifacts for mode-aware review, and posts via gh api.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -286,10 +286,17 @@ oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role review
286
286
  ```
287
287
 
288
288
  Require `dispatchReport.schemaVersion: 1`. Render/consume its versioned human
289
- block with `formatDispatchReport(dispatchReport)` semantics and derive the
290
- formal audit `Dispatch:` line only through
291
- `formatDispatchStamp(dispatchReport)` / `toDispatchStampRecord(dispatchReport)`.
292
- Never hand-build a parallel stamp schema.
289
+ block with `formatDispatchReport(dispatchReport)` semantics and take the formal
290
+ audit `Dispatch:` line directly from the same response's additive
291
+ `dispatchStamp` field: it must be a non-empty string beginning with the
292
+ canonical `Dispatch:` prefix. Copy that returned value byte-for-byte into the
293
+ review dispatch audit metadata. Reformatting the report through
294
+ `formatDispatchStamp(dispatchReport)` / `toDispatchStampRecord(dispatchReport)`
295
+ is an optional corroboration where that library is already loaded; it is never
296
+ the normal path and never a substitute for the returned field, and no
297
+ out-of-tree shim is required. Never hand-build a parallel stamp schema. If
298
+ `dispatchStamp` is absent or lacks the canonical prefix on a report-bearing
299
+ response, stop and report instead of reconstructing it.
293
300
 
294
301
  Retain the exact managed provider payload from
295
302
  `providers.<provider>.dispatchArgs` and
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-summary
3
- version: 1.5.1
3
+ version: 1.5.2
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
@@ -117,7 +117,16 @@ test -f "$PROJECT_PATH/implementation.md"
117
117
 
118
118
  ### Step 2: Read Project Artifacts
119
119
 
120
- Read all available artifacts for synthesis:
120
+ For `oat_workflow_mode: lite`, use the reduced artifact contract and skip the
121
+ ordinary artifact list below. Read the five `plan.md` sections `Summary`,
122
+ `Decisions`, `Assumptions`, `Out of Scope`, and `Validation Criteria`, then read
123
+ `implementation.md` for task outcomes and the shipped results in `Final
124
+ Summary (for PR/docs)`. Read `state.md` only for routing metadata. A lite
125
+ project accepts `discovery.md`, `spec.md`, and `design.md` as absent; do not
126
+ read or require them. Ground the summary in what actually shipped, with
127
+ `implementation.md` taking precedence over the plan.
128
+
129
+ For every other workflow mode, read all available artifacts for synthesis:
121
130
 
122
131
  - `"$PROJECT_PATH/discovery.md"` — initial request, decisions, constraints
123
132
  - `"$PROJECT_PATH/spec.md"` — requirements, goals (optional — may not exist in quick mode)
@@ -213,7 +222,22 @@ For each section, synthesize content from the relevant artifacts. Apply these ru
213
222
 
214
223
  **Minimum viable summary:** Overview + What Was Implemented + Key Decisions. All other sections are included only when they have content worth preserving.
215
224
 
216
- **Section sources:**
225
+ **Lite section sources:**
226
+
227
+ Use this table only for `oat_workflow_mode: lite`. It maps every canonical lite
228
+ plan section and shipped implementation results without requiring discovery,
229
+ spec, or design artifacts.
230
+
231
+ | Summary Section | Primary Lite Sources |
232
+ | -------------------- | ------------------------------------------------------------- |
233
+ | Overview | plan.md `Summary`; implementation.md `Final Summary` |
234
+ | What Was Implemented | implementation.md shipped results and task outcomes |
235
+ | Key Decisions | plan.md `Decisions`; implementation.md accepted decisions |
236
+ | Tradeoffs Made | plan.md `Assumptions`; implementation.md decisions |
237
+ | Follow-up Items | plan.md `Out of Scope`; implementation.md deferred results |
238
+ | Integration Notes | plan.md `Validation Criteria`; implementation.md test results |
239
+
240
+ **Non-lite section sources:**
217
241
 
218
242
  | Section | Primary Sources |
219
243
  | ------------------------------ | ---------------------------------------------------------------------- |
@@ -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_phase: plan
7
+ oat_phase_status: in_progress
8
+ oat_plan_hill_phases: []
9
+ oat_plan_parallel_groups: []
10
+ oat_plan_source: lite
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-lite
17
+ ---
18
+
19
+ # Lite Plan: {Project Name}
20
+
21
+ **Goal:** [State the outcome this single-sitting change must achieve.]
22
+
23
+ ## Summary
24
+
25
+ [Summarize the requested behavior and the smallest coherent implementation.]
26
+
27
+ ## Decisions
28
+
29
+ - **Content shape:** `[minimal | product | technical | both]` — [One-line rationale tied to the observable shape triggers.]
30
+ - [Record the other decisions made during the critical interview.]
31
+
32
+ ## Product Behavior
33
+
34
+ <!-- Include for product or both; omit this section for minimal or technical. -->
35
+
36
+ 1. **[Observable behavior]** — [State the testable user-visible outcome.]
37
+
38
+ ## Technical Design
39
+
40
+ <!-- Include for technical or both; omit this section for minimal or product. -->
41
+
42
+ - **Current operation:** [Describe how the affected modules and contracts work now.]
43
+ - **Proposed changes:** [Describe the change with file-and-symbol references, not line numbers.]
44
+ - **Data flow:** [When state or data crosses a boundary, describe its path and transformations. Omit this item otherwise.]
45
+
46
+ ## Assumptions
47
+
48
+ - [Record assumptions the implementation and validation depend on.]
49
+
50
+ ## Out of Scope
51
+
52
+ - [Name adjacent work intentionally excluded from this change.]
53
+
54
+ ## Validation Criteria
55
+
56
+ - [ ] [Observable criterion] — Check: `[exact verification command]`
57
+ - [ ] [Observable criterion] — Check: `[exact verification command]`
58
+
59
+ ## Parallelism
60
+
61
+ This plan has one phase and executes sequentially.
62
+
63
+ ## Phase 1: [Phase Name]
64
+
65
+ ### Task p01-t01: [Task Name]
66
+
67
+ **Files:**
68
+
69
+ - Create: `[path/to/file.ts]`
70
+ - Modify: `[path/to/existing.ts]`
71
+
72
+ **Implementation and Proof Strategy:**
73
+
74
+ - **Strategy:** `[test-first | characterization-first | implementation-then-regression | static-or-build | manual-or-visual]`
75
+ - **Observable risk:** [Name the behavior, contract, or invariant this evidence covers.]
76
+ - **Why proportionate:** [Explain why this is the smallest proof capable of detecting the relevant failure.]
77
+
78
+ **Step 1: Implement**
79
+
80
+ [Describe the bounded implementation in the order required by the selected strategy.]
81
+
82
+ **Step 2: Prove**
83
+
84
+ Run: `[exact proof command or manual: instruction]`
85
+ Expected: [State the observable passing result and, for behavior changes, how this proof fails without the change.]
86
+
87
+ **Step 3: Refactor and format**
88
+
89
+ [Describe bounded cleanup and name the exact write-mode formatting command.]
90
+
91
+ **Step 4: Verify**
92
+
93
+ Run: `[exact task verification command]`
94
+ Expected: No errors
95
+
96
+ **Step 5: Commit**
97
+
98
+ ```bash
99
+ git add [task files]
100
+ git commit -m "feat(p01-t01): [description]"
101
+ ```
102
+
103
+ ---
104
+
105
+ ### Task p01-t02: [Task Name]
106
+
107
+ **Files:**
108
+
109
+ - Modify: `[path/to/existing.ts]`
110
+
111
+ **Implementation and Proof Strategy:**
112
+
113
+ - **Strategy:** `[test-first | characterization-first | implementation-then-regression | static-or-build | manual-or-visual]`
114
+ - **Observable risk:** [Name the behavior, contract, or invariant this evidence covers.]
115
+ - **Why proportionate:** [Explain why this is the smallest proof capable of detecting the relevant failure.]
116
+
117
+ **Step 1: Implement**
118
+
119
+ [Describe the bounded implementation in the order required by the selected strategy.]
120
+
121
+ **Step 2: Prove**
122
+
123
+ Run: `[exact proof command or manual: instruction]`
124
+ Expected: [State the observable passing result and, for behavior changes, how this proof fails without the change.]
125
+
126
+ **Step 3: Refactor and format**
127
+
128
+ [Describe bounded cleanup and name the exact write-mode formatting command.]
129
+
130
+ **Step 4: Verify**
131
+
132
+ Run: `[exact task verification command]`
133
+ Expected: No errors
134
+
135
+ **Step 5: Commit**
136
+
137
+ ```bash
138
+ git add [task files]
139
+ git commit -m "feat(p01-t02): [description]"
140
+ ```
141
+
142
+ ---
143
+
144
+ ## Reviews
145
+
146
+ | Scope | Type | Status | Date | Artifact | Reviewed Head | Invocation | Gate Target |
147
+ | ------ | -------- | ------- | ---- | -------- | ------------- | ---------- | ----------- |
148
+ | p01 | code | pending | - | - | - | - | - |
149
+ | final | code | pending | - | - | - | - | - |
150
+ | spec | artifact | pending | - | - | - | - | - |
151
+ | design | artifact | pending | - | - | - | - | - |
152
+
153
+ ## Implementation Complete
154
+
155
+ **Summary:**
156
+
157
+ - Phase 1: [N] tasks — [Description]
158
+
159
+ **Total: [N] tasks**
160
+
161
+ Ready for final code review and PR preparation.
162
+
163
+ ## References
164
+
165
+ - Imported Source: `references/imported-plan.md` (when imported provenance applies)
@@ -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
10
+ oat_plan_source: spec-driven # spec-driven | quick | imported | lite
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
@@ -34,15 +34,18 @@ 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
37
+ oat_workflow_mode: { OAT_WORKFLOW_MODE } # spec-driven | quick | import | lite
38
38
  oat_workflow_origin: native # native | imported
39
+ # oat_skill_gate_overrides: # optional; per-project posture for configured lifecycle gates
40
+ # oat-project-implement: disabled # only the literal value `disabled`; absence means follow configuration
39
41
  # oat_implement_exit_gate: # optional; durable configured implementation exit-gate state
40
42
  # status: pending # pending | allowed | blocked | stale
41
43
  # resolution: configured # configured | no_gate
42
- # disposition: null # null | passed | warned | prompt_approved | no_gate
44
+ # disposition: null # null | passed | warned | prompt_approved | project_disabled | no_gate
43
45
  # config_fingerprint: '<stable hash of resolved gate declaration>'
44
46
  # resolved_command: null
45
47
  # resolved_description: null
48
+ # project_override: null # null or {value: disabled, source: state.md:oat_skill_gate_overrides}
46
49
  # on_failure: block # block | prompt | warn | null
47
50
  # max_attempts: 2
48
51
  # attempts_completed: 0
@@ -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;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAShE,OAAO,EAWL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,E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AC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgyCD,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;AAysED,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CAsOT"}
@@ -5,11 +5,11 @@ 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
7
  import { appendProjectLog } from '../project/log/append.js';
8
- import { getFrontmatterBlock, parseFrontmatterScalarFields, parseGeneratedTime, } from '../shared/frontmatter.js';
8
+ import { getFrontmatterBlock, parseFrontmatterScalarFields, parseGeneratedTime, parseSkillGateOverrides, SKILL_GATE_OVERRIDE_DISABLED, SKILL_GATE_OVERRIDE_SOURCE, } from '../shared/frontmatter.js';
9
9
  import { readGlobalOptions } from '../shared/shared.utils.js';
10
10
  import { parseJsonConfig } from '../../config/json.js';
11
11
  import { BUILTIN_EXEC_TARGETS, MAX_GATE_TIMEOUT_MS, MIN_GATE_TIMEOUT_MS, isValidGateTimeoutMs, readOatConfig, readOatLocalConfig, readUserConfig, writeOatConfig, writeOatLocalConfig, writeUserConfig, } from '../../config/oat-config.js';
12
- import { resolveEffectiveConfig, resolveExecTargetViews, resolveExecTargets, resolveGate, } from '../../config/resolve.js';
12
+ import { resolveEffectiveConfig, resolveExecTargetViews, resolveExecTargets, resolveGate, resolveGateWithSource, } from '../../config/resolve.js';
13
13
  import { dirExists, fileExists } from '../../fs/io.js';
14
14
  import { normalizeToPosixPath, resolveProjectRoot, validateRealPathWithinScope, } from '../../fs/paths.js';
15
15
  import { buildDispatchReport, } from '../../providers/identity/dispatch-report.js';
@@ -1173,6 +1173,7 @@ function resolvedProjectsRoot(effective) {
1173
1173
  }
1174
1174
  async function resolveReviewProject(options) {
1175
1175
  const projectsRoot = resolvedProjectsRoot(options.effective);
1176
+ const commandLabel = options.commandLabel ?? 'gate review';
1176
1177
  if (options.project !== undefined) {
1177
1178
  return {
1178
1179
  path: await resolveExplicitReviewProject(options.repoRoot, projectsRoot, options.project),
@@ -1188,10 +1189,10 @@ async function resolveReviewProject(options) {
1188
1189
  }
1189
1190
  const candidates = await listProjectCandidates(options.repoRoot, projectsRoot);
1190
1191
  if (candidates.length === 0) {
1191
- throw new Error('No OAT project could be resolved for gate review. Set an active project or pass --project <path-or-name>.');
1192
+ throw new Error(`No OAT project could be resolved for ${commandLabel}. Set an active project or pass --project <path-or-name>.`);
1192
1193
  }
1193
1194
  if (candidates.length > 1) {
1194
- throw new Error(`Multiple OAT projects could be resolved for gate review: ${candidates.join(', ')}. Pass --project <path-or-name>.`);
1195
+ throw new Error(`Multiple OAT projects could be resolved for ${commandLabel}: ${candidates.join(', ')}. Pass --project <path-or-name>.`);
1195
1196
  }
1196
1197
  return {
1197
1198
  path: candidates[0],
@@ -1725,10 +1726,102 @@ async function updateConfigLayer(context, layer, dependencies, mutate) {
1725
1726
  const config = await dependencies.readUserConfig(userConfigDir);
1726
1727
  await dependencies.writeUserConfig(userConfigDir, mutate(config));
1727
1728
  }
1728
- async function runResolve(skillName, context, dependencies) {
1729
+ /**
1730
+ * Read the project's declared gate overrides.
1731
+ *
1732
+ * Fails closed rather than defaulting to "no overrides": unreadable project
1733
+ * state would otherwise silently launch a gate the operator disabled. CRLF
1734
+ * checkouts are normalized first so a line-ending difference is not mistaken
1735
+ * for missing frontmatter.
1736
+ */
1737
+ async function readProjectGateOverrides(repoRoot, projectPath) {
1738
+ const statePath = normalizeToPosixPath(join(projectPath, 'state.md'));
1739
+ const content = await readFile(join(repoRoot, statePath), 'utf8');
1740
+ const frontmatter = getFrontmatterBlock(content.replace(/\r\n/g, '\n'));
1741
+ if (frontmatter === null) {
1742
+ throw new Error(`${statePath}: project state has no readable YAML frontmatter block, so gate overrides cannot be resolved. Repair the state file before resolving a project-aware gate.`);
1743
+ }
1744
+ return parseSkillGateOverrides(frontmatter, statePath).overrides;
1745
+ }
1746
+ /**
1747
+ * Project-aware resolution. `configuredGate` is retained even when an override
1748
+ * makes the effective gate null, so project-disabled evidence can never be
1749
+ * mistaken for absent configuration.
1750
+ */
1751
+ async function resolveProjectAwareGate(options) {
1752
+ const project = await resolveReviewProject({
1753
+ repoRoot: options.repoRoot,
1754
+ effective: options.effective,
1755
+ // Same active/name/path contract as `oat gate review`; only the guidance
1756
+ // wording follows the caller, so a `gate resolve` failure does not tell the
1757
+ // operator to fix a review command they never ran.
1758
+ commandLabel: 'gate resolve',
1759
+ // A bare `--project` defers to the same active/single-candidate rules
1760
+ // `oat gate review` uses when it is given no explicit project.
1761
+ ...(typeof options.projectValue === 'string'
1762
+ ? { project: options.projectValue }
1763
+ : {}),
1764
+ });
1765
+ const overrides = await readProjectGateOverrides(options.repoRoot, project.path);
1766
+ const projectOverride = overrides[options.skillName] === SKILL_GATE_OVERRIDE_DISABLED
1767
+ ? {
1768
+ value: SKILL_GATE_OVERRIDE_DISABLED,
1769
+ source: SKILL_GATE_OVERRIDE_SOURCE,
1770
+ }
1771
+ : null;
1772
+ const { gate, source } = resolveGateWithSource(options.effective, options.skillName);
1773
+ // An override never fabricates configuration: with no configured gate the
1774
+ // resolution stays `not_configured` while the override remains visible.
1775
+ // `configSource` still reports the layer that owned the decision when one
1776
+ // explicitly declared the skill `null`, so an operator can tell a deliberate
1777
+ // layer-level disable from a skill no layer mentions at all. It stays null in
1778
+ // the latter case, and `configuredGate` is null either way.
1779
+ if (!gate) {
1780
+ return {
1781
+ skill: options.skillName,
1782
+ resolution: 'not_configured',
1783
+ configuredGate: null,
1784
+ effectiveGate: null,
1785
+ configSource: source,
1786
+ projectOverride,
1787
+ };
1788
+ }
1789
+ if (projectOverride) {
1790
+ return {
1791
+ skill: options.skillName,
1792
+ resolution: 'configured_disabled_by_project',
1793
+ configuredGate: gate,
1794
+ effectiveGate: null,
1795
+ configSource: source,
1796
+ projectOverride,
1797
+ };
1798
+ }
1799
+ return {
1800
+ skill: options.skillName,
1801
+ resolution: 'configured',
1802
+ configuredGate: gate,
1803
+ effectiveGate: gate,
1804
+ configSource: source,
1805
+ projectOverride: null,
1806
+ };
1807
+ }
1808
+ async function runResolve(skillName, options, context, dependencies) {
1729
1809
  try {
1730
1810
  const effective = await readEffectiveConfig(context, dependencies);
1731
- writeJsonValue(context, resolveGate(effective, skillName));
1811
+ // Without project context this stays byte-identical to the legacy raw
1812
+ // `GateConfig | null` output that external consumers already parse.
1813
+ if (options.project === undefined) {
1814
+ writeJsonValue(context, resolveGate(effective, skillName));
1815
+ process.exitCode = 0;
1816
+ return;
1817
+ }
1818
+ const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
1819
+ writeJsonValue(context, await resolveProjectAwareGate({
1820
+ skillName,
1821
+ projectValue: options.project,
1822
+ repoRoot,
1823
+ effective,
1824
+ }));
1732
1825
  process.exitCode = 0;
1733
1826
  }
1734
1827
  catch (error) {
@@ -2370,9 +2463,10 @@ export function createGateCommand(overrides = {}) {
2370
2463
  .command('resolve')
2371
2464
  .description('Print the resolved gate configuration for a skill')
2372
2465
  .argument('<skill>', 'Gate-aware skill name')
2373
- .action(async (skillName, _options, command) => {
2466
+ .option('--project [path-or-name]', 'Resolve with project gate overrides applied; defaults to the active project')
2467
+ .action(async (skillName, options, command) => {
2374
2468
  const context = dependencies.buildCommandContext(readGlobalOptions(command));
2375
- await runResolve(skillName, context, dependencies);
2469
+ await runResolve(skillName, options, context, dependencies);
2376
2470
  });
2377
2471
  cmd
2378
2472
  .command('set')
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"A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ACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,EAC1B,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,2BAA2B,EAAE,CAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,kBAAkB,EACzB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,sBAAsB,EACnC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KACrC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,cAAc,EAAE,CACd,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,gBAAgB,EAC9B,uBAAuB,CAAC,EAAE,OAAO,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,YAAY,EAAE,CACZ,OAAO,EAAE,cAAc,EACvB,uBAAuB,CAAC,EAAE,OAAO,KAC9B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzB,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AA0hCD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,OAAO,CA8BT"}
@@ -21,7 +21,7 @@ import { configureLocalHooksPath, getHookInstallInfo, installHook, isHookInstall
21
21
  import { dirExists, fileExists } from '../../fs/io.js';
22
22
  import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
23
23
  import { normalizeToPosixPath } from '../../fs/paths.js';
24
- import { createEmptyManifest, loadManifest, saveManifest, } from '../../manifest/manager.js';
24
+ import { createEmptyManifest, detectManifestVersionRestamp, formatManifestVersionRestampWarning, loadManifest, saveManifest, } from '../../manifest/manager.js';
25
25
  import { applyCodexProjectExtensionPlan, computeCodexProjectExtensionPlan, } from '../../providers/codex/codec/sync-extension.js';
26
26
  import { applyCursorProjectExtensionPlan, computeCursorProjectExtensionPlan, } from '../../providers/cursor/codec/sync-extension.js';
27
27
  import { getActiveAdapters, getConfigAwareAdapters, getProviderRegistrations, recomputeProviderScopeContext, resolveProviderScopeContext, } from '../../providers/shared/index.js';
@@ -465,6 +465,7 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag, explic
465
465
  let projectRoot = null;
466
466
  let oatDirExistedBefore = true;
467
467
  const scopeSummaries = [];
468
+ const manifestVersionRestamps = [];
468
469
  let migrationAborted = false;
469
470
  for (const scope of scopes) {
470
471
  const scopeRoot = await dependencies.resolveScopeRoot(scope, context);
@@ -539,6 +540,16 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag, explic
539
540
  }
540
541
  const manifestPath = join(scopeRoot, '.oat', 'sync', 'manifest.json');
541
542
  let manifest = await dependencies.loadManifest(manifestPath);
543
+ // Captured from the manifest exactly as loaded, before any replacement:
544
+ // adoption rewrites `manifest` and the save then replaces `oatVersion`
545
+ // outright, so this is the last point at which the producing version is
546
+ // still observable. Taken ahead of the `entries` fallback below so the
547
+ // ordering is correct by construction rather than by the schema's current
548
+ // insistence that `entries` be present.
549
+ const versionRestamp = detectManifestVersionRestamp(scope, manifest);
550
+ if (versionRestamp) {
551
+ manifestVersionRestamps.push(versionRestamp);
552
+ }
542
553
  if (!manifest.entries) {
543
554
  manifest = createEmptyManifest();
544
555
  }
@@ -673,6 +684,9 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag, explic
673
684
  context.logger.info(`No stray entries adopted [${scope}].`);
674
685
  }
675
686
  }
687
+ if (versionRestamp && !context.json) {
688
+ context.logger.warn(formatManifestVersionRestampWarning('init', versionRestamp));
689
+ }
676
690
  await dependencies.saveManifest(manifestPath, manifest);
677
691
  scopeSummaries.push({
678
692
  scope,
@@ -689,6 +703,7 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag, explic
689
703
  straysAdopted: scopeSummaries.reduce((total, summary) => total + summary.straysAdopted, 0),
690
704
  hookInstalled,
691
705
  scopes: scopeSummaries,
706
+ manifestVersionRestamps,
692
707
  };
693
708
  context.logger.json(payload);
694
709
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAkB9B,OAAO,EAUL,KAAK,uBAAuB,EAY7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAyBzB,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAiC5C,UAAU,2BAA2B;IACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC7E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAkwFD,wBAAgB,mCAAmC,CACjD,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CA0GT"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/dispatch-ceiling/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa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