@open-agent-toolkit/cli 0.2.62 → 0.2.63

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 (62) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/cli-utilities/config-and-local-state.md +1 -0
  3. package/assets/docs/cli-utilities/configuration.md +10 -8
  4. package/assets/docs/cli-utilities/project-log.md +16 -0
  5. package/assets/docs/cli-utilities/workflow-gates.md +124 -16
  6. package/assets/docs/provider-sync/commands.md +3 -0
  7. package/assets/docs/provider-sync/instruction-sync.md +107 -0
  8. package/assets/docs/reference/cli-reference.md +16 -6
  9. package/assets/docs/reference/oat-directory-structure.md +32 -31
  10. package/assets/docs/workflows/projects/lifecycle.md +45 -0
  11. package/assets/docs/workflows/projects/picking-up-projects.md +14 -0
  12. package/assets/docs/workflows/skills/explainer-kit.md +10 -4
  13. package/assets/docs/workflows/skills/repo-improve.md +15 -1
  14. package/assets/public-package-versions.json +4 -4
  15. package/assets/skills/oat-explainer-kit/SKILL.md +14 -1
  16. package/assets/skills/oat-explainer-kit/references/config-contract.md +12 -0
  17. package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +57 -10
  18. package/assets/skills/oat-explainer-kit/scripts/check-terminal-outcome.mjs +28 -5
  19. package/assets/skills/oat-explainer-kit/scripts/probe-recap-seams.mjs +371 -0
  20. package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +123 -1
  21. package/assets/skills/oat-project-autonomous/SKILL.md +10 -1
  22. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +121 -121
  23. package/assets/skills/oat-project-complete/SKILL.md +134 -4
  24. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +121 -121
  25. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  26. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +38 -6
  27. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +121 -121
  28. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +121 -121
  29. package/assets/skills/oat-project-next/SKILL.md +62 -19
  30. package/assets/skills/oat-project-plan/SKILL.md +31 -5
  31. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +121 -121
  32. package/assets/skills/oat-project-progress/SKILL.md +12 -3
  33. package/assets/skills/oat-project-quick-start/SKILL.md +264 -4
  34. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +121 -121
  35. package/assets/skills/oat-project-summary/SKILL.md +34 -23
  36. package/assets/skills/oat-repo-improve/SKILL.md +40 -5
  37. package/assets/skills/oat-repo-improve/references/plan-template.md +84 -7
  38. package/dist/commands/config/index.d.ts +1 -0
  39. package/dist/commands/config/index.d.ts.map +1 -1
  40. package/dist/commands/config/index.js +401 -18
  41. package/dist/commands/gate/index.d.ts +3 -1
  42. package/dist/commands/gate/index.d.ts.map +1 -1
  43. package/dist/commands/gate/index.js +699 -211
  44. package/dist/commands/init/tools/shared/skill-script-references.d.ts +126 -0
  45. package/dist/commands/init/tools/shared/skill-script-references.d.ts.map +1 -0
  46. package/dist/commands/init/tools/shared/skill-script-references.js +311 -0
  47. package/dist/commands/instructions/instructions.types.d.ts +63 -0
  48. package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
  49. package/dist/commands/instructions/instructions.utils.d.ts +51 -2
  50. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
  51. package/dist/commands/instructions/instructions.utils.js +201 -4
  52. package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
  53. package/dist/commands/instructions/sync/sync.js +12 -1
  54. package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
  55. package/dist/commands/instructions/validate/validate.js +12 -1
  56. package/dist/commands/project/log/append.d.ts +195 -0
  57. package/dist/commands/project/log/append.d.ts.map +1 -1
  58. package/dist/commands/project/log/append.js +1034 -11
  59. package/dist/config/oat-config.d.ts +41 -0
  60. package/dist/config/oat-config.d.ts.map +1 -1
  61. package/dist/config/oat-config.js +111 -0
  62. package/package.json +2 -2
@@ -141,6 +141,51 @@ On completion, OAT treats archive handling as an explicit closeout choice:
141
141
  ref. `oat project prune` is a separate destructive choice that removes
142
142
  terminal ref reachability but preserves local and S3 archive snapshots.
143
143
 
144
+ ### Absorbed-project retirement sweep
145
+
146
+ Retiring a project that a later project absorbed is a semantic claim, not a
147
+ filesystem operation. Deleting or archiving the old scaffold does not make the
148
+ roadmap stop promising its work, so completion checks the claim against the
149
+ prose that still makes it.
150
+
151
+ When a quick project consolidates earlier scaffolds, quick-start records
152
+ `absorbed_projects` and `absorbed_backlog_ids` in that project's `state.md`
153
+ frontmatter. Those two fields are the only inputs the sweep takes.
154
+
155
+ Recording them is a quick-mode step today. A lite project that consolidates
156
+ earlier scaffolds records nothing, so the sweep finds no inputs and degrades to
157
+ its recorded note rather than checking that project's surfaces.
158
+
159
+ Inside the project-log completion gate — after the log status probe and before
160
+ the roll-up and seal — completion searches the active planning surfaces for each
161
+ absorbed slug and backlog ID, and for future-oriented ownership language tied to
162
+ them:
163
+
164
+ - `.oat/repo/pjm/roadmap.md` (the Now/Next/Later lanes and the sequencing map)
165
+ - `.oat/repo/pjm/current-state.md`
166
+ - the Curated Overview in `.oat/repo/pjm/backlog/index.md`
167
+ - the scope-nested `state.md` of projects that are still active, under the
168
+ configured projects root, skipping the `archived` tree and any project already
169
+ recorded as complete
170
+
171
+ The sweep is advisory. A raw match is never a hard block on closeout: each hit
172
+ becomes a named finding carrying a recorded disposition: fixed in the same run,
173
+ accepted as historical with a reason, or — in an autonomous run — recorded as
174
+ `deferred advisory`. Prose that clearly describes
175
+ past state is exempt, so a dated history entry, a retro, a decision record, or a
176
+ changelog line reads as evidence rather than a stale claim.
177
+
178
+ Placement is the point. Dispositions are appended to the project log before the
179
+ roll-up, so the roll-up summarizes them and the completion seal remains the
180
+ final entry — no project-log append ever follows the seal. Three variations
181
+ change where and how the dispositions are recorded: an autonomous run records
182
+ each finding as a `deferred advisory` warning and continues, a project with no log reports them in the
183
+ final completion summary, and a resumed completion whose log already
184
+ carries a seal runs report-only and appends nothing.
185
+
186
+ Repositories that never adopted PJM skip the sweep with a one-line note. A
187
+ missing planning surface degrades the sweep, never the closeout.
188
+
144
189
  ### Phase status: `pr_open`
145
190
 
146
191
  After `oat-project-pr-final` runs, `state.md` shows `oat_phase_status: pr_open`. This signals:
@@ -36,6 +36,20 @@ its parent is reported and skipped rather than adopted.
36
36
  After adoption, set or open the project through the normal lifecycle command
37
37
  you are using. Arrival-aware project skills pull before reading its artifacts.
38
38
 
39
+ An adopted quick-workflow project whose `plan.md` is not implementation-ready
40
+ resumes through `oat-project-quick-start`, which continues it in place without
41
+ re-scaffolding, rather than through `oat-project-implement`. `oat-project-plan`,
42
+ `oat-project-progress`, and `oat-project-next` all route by the single **quick
43
+ plan readiness** predicate that `oat-project-quick-start` defines; readiness is
44
+ never inferred from the presence of tasks alone.
45
+
46
+ `oat project status` and `oat project list` apply the same predicate. For a
47
+ quick project at the `plan` phase they recommend `oat-project-quick-start`, with
48
+ the unmet clause in the reason, until the plan carries ready frontmatter, a
49
+ durable `## Reviews` disposition, and a substantive task; only then do they
50
+ recommend `oat-project-implement`. Recommendations for lite, spec-driven, and
51
+ import projects are unchanged, because the predicate is quick-workflow policy.
52
+
39
53
  ## What travels
40
54
 
41
55
  - The project ref carries the complete active artifact tree and its history.
@@ -420,10 +420,16 @@ Interactive project explainer and recap preferences resolve independently from
420
420
  the built-in default is `ask`. A resolved project decision in `state.md`
421
421
  outranks those preferences.
422
422
 
423
- Autonomous mode has stricter policy: it always attempts a project recap, while
424
- a project explainer runs only when the kickoff request explicitly asks for
425
- one. Lifecycle-triggered runs do not publish automatically, and recap failure
426
- does not block project completion.
423
+ Autonomous mode has stricter policy: it always runs the project-recap gate,
424
+ while a project explainer runs only when the kickoff request explicitly asks
425
+ for one. The gate probes the five seams an unattended recap needs — author,
426
+ fact critic, browser session, visual critic, and set planner — before
427
+ generating. It attempts the recap only when all five resolve; when a seam has
428
+ no provider configured at all, it records a `skip` with source
429
+ `capability_probe` and a warning instead. A seam that is configured but invalid
430
+ is a configuration error and still fails closed. Lifecycle-triggered runs do
431
+ not publish automatically, and neither recap failure nor an unavailable seam
432
+ blocks project completion.
427
433
 
428
434
  See [Project Artifacts](../projects/artifacts.md) for active and durable output
429
435
  locations, and [Configuration](../../cli-utilities/configuration.md) for the
@@ -35,7 +35,7 @@ These are findings exclusions, not absolute read prohibitions. Improve may read
35
35
 
36
36
  ## Output boundary
37
37
 
38
- External plans are not canonical OAT project `plan.md` files. They contain self-contained context, scope, steps, verification, done criteria, and STOP conditions, but no OAT phase/task IDs or lifecycle bookkeeping.
38
+ External plans are not canonical OAT project `plan.md` files. They contain self-contained context, scope, steps, verification, done criteria, and STOP conditions, but no canonical OAT phase/task IDs or lifecycle bookkeeping. External execution-readiness metadata is a separate thing and is carried deliberately: it describes whether the plan's own prerequisites have merged, not how an OAT project is moving through phases.
39
39
 
40
40
  After generation, choose either execution path:
41
41
 
@@ -44,6 +44,20 @@ After generation, choose either execution path:
44
44
 
45
45
  Project-sized candidates are split when possible. If inseparable work needs multiple design decisions or lacks one coherent verification boundary, improve recommends an OAT project workflow instead of emitting a mega-plan.
46
46
 
47
+ ## Plan readiness and execution readiness
48
+
49
+ Improve scores candidates on two independent axes. A candidate is plan-ready when it is understood well enough to write a self-contained executable plan, and execution-ready when every hard dependency it names has already merged.
50
+
51
+ A blocked candidate is still planned. Rather than dropping work whose prerequisite has not landed, improve writes the plan and records the block:
52
+
53
+ - `oat_execution_status` is `READY` or `BLOCKED` in plan frontmatter.
54
+ - A typed `## Dependencies` table marks each row `Hard`, `Soft`, or `Satisfied`, and every `Hard` row names the state that would unblock it.
55
+ - `## Landing-event impact` records what to re-anchor when a named PR or project lands, and `## Revalidation Before Execution` records when the plan must be re-checked against live state.
56
+
57
+ Plan provenance is recorded as two separate SHAs: `oat_external_plan_commit` is the full SHA of the `HEAD` whose content was actually inspected, and `oat_external_plan_main_commit` is the fetched `origin/main` or merge-base used only for comparison. They may differ, and normally do when planning happens on a branch.
58
+
59
+ Plans written before this contract landed are read in legacy mode: a short SHA, a missing comparison SHA, missing sections, and a missing status (read as `READY`) are all accepted, and those plans are never rewritten.
60
+
47
61
  ## Optional tracking
48
62
 
49
63
  Plans are always the primary output. Tracking is optional and source-aware:
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.2.62",
3
- "docs-config": "0.2.62",
4
- "docs-theme": "0.2.62",
5
- "docs-transforms": "0.2.62"
2
+ "cli": "0.2.63",
3
+ "docs-config": "0.2.63",
4
+ "docs-theme": "0.2.63",
5
+ "docs-transforms": "0.2.63"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-explainer-kit
3
- version: 1.0.6
3
+ version: 1.0.7
4
4
  description: Use when building project explainers or recaps from OAT configuration, state, and lifecycle artifacts.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -18,6 +18,7 @@ Adapt OAT project context into the versioned request consumed by the canonical
18
18
  - Resolve typed OAT configuration with source attribution.
19
19
  - Derive canonical project or repository output roots.
20
20
  - Bind OAT lifecycle artifacts to generic recipe source roles.
21
+ - Probe recap seam availability before an unattended run is attempted.
21
22
  - Resolve project explainer and recap intent before invoking the core.
22
23
  - Resolve one provider-neutral set planner for unattended project recaps.
23
24
  - Require lifecycle callers to construct a brief-aware author seam.
@@ -79,6 +80,18 @@ source evidence, and medium rationale. The installed core continues reading
79
80
  `project-recap@1` for replay; the adapter never rewrites a retained request's
80
81
  recipe selector.
81
82
 
83
+ Before an unattended `project-recap`, call
84
+ `scripts/probe-recap-seams.mjs#probeRecapSeams` with the seam inputs you are
85
+ about to pass. The probe is pure and checks all five required seams — author,
86
+ fact critic, browser session, visual critic, and set planner — using the same
87
+ rules `run.mjs` applies. `seams-unavailable` means no provider is configured
88
+ for a required seam: pass the probe result to the intent resolver as
89
+ `seamProbe`, which returns a recordable `skip` with source `capability_probe`
90
+ and a warning. `seams-invalid` means a supplied seam violates a resolution
91
+ rule: fail closed and report the configuration error; it is never a skip. When
92
+ the probe returns `ok: true`, invoke the adapter with unchanged behavior, and
93
+ treat any later failure as `failed` rather than as a skip.
94
+
82
95
  Before invocation, read `references/author-callback.md`. Unattended
83
96
  `project-recap` runs require exactly one provider-neutral set planner:
84
97
  in-process callers supply `planSet`, while JSON/CLI callers supply
@@ -27,6 +27,18 @@ do not write config. Recipe, slug, fact-base path, output root, per-run art
27
27
  direction, and private wrapper lanes are invocation inputs rather than config
28
28
  keys and are rejected from the runtime config-override map.
29
29
 
30
+ ## Seams are invocation inputs, not configuration
31
+
32
+ No supported key names an author, fact critic, browser session, visual critic,
33
+ or set planner. Every seam is supplied per invocation as a callback or a module
34
+ entry point, so seam availability is discovered by
35
+ `scripts/probe-recap-seams.mjs#probeRecapSeams` against the inputs a caller is
36
+ about to pass, not read from stored config. A host on which those inputs are
37
+ absent has no configuration to correct: the probe reports `seams-unavailable`
38
+ and the lifecycle caller records a `skip / capability_probe` recap intent. The
39
+ `workflow.explainers.projectRecap` preference expresses whether a host _wants_
40
+ a recap and cannot make an unavailable seam available.
41
+
30
42
  ## Source-sensitive paths
31
43
 
32
44
  A shared theme bundle path is repository-relative and must remain inside the
@@ -18,11 +18,31 @@ now })` is pure. Its result contains the effective `decision`, the
18
18
  `resolutionSource`, whether a prompt is needed, an optional state `record`, and
19
19
  warnings.
20
20
 
21
- In autonomous mode, `projectRecap` always resolves to `generate` with source
22
- `autonomous_policy`. A lower-precedence skip or `never` preference is overridden
23
- and reported as a warning. Autonomous `projectExplainer` resolves to `generate`
24
- only when the kickoff prompt explicitly requested it; otherwise it resolves to
25
- `skip` without writing an invalid prompt-source skip record.
21
+ In autonomous mode, `projectRecap` resolves to `generate` with source
22
+ `autonomous_policy` on any host whose recap seams resolve. A lower-precedence
23
+ skip or `never` preference is overridden and reported as a warning. Autonomous
24
+ `projectExplainer` resolves to `generate` only when the kickoff prompt
25
+ explicitly requested it; otherwise it resolves to `skip` without writing an
26
+ invalid prompt-source skip record.
27
+
28
+ Autonomous `projectRecap` resolution accepts an optional `seamProbe`, the
29
+ result of `scripts/probe-recap-seams.mjs#probeRecapSeams`. It is a pre-flight
30
+ capability input, never a post-hoc reaction to a failed run:
31
+
32
+ - `ok: true` leaves resolution unchanged, so a configured host still forces
33
+ `generate / autonomous_policy`.
34
+ - `seams-unavailable` — no callback and no module path is supplied for a seam
35
+ this mode requires — resolves `skip` with source `capability_probe` and a
36
+ warning naming the unavailable seams.
37
+ - `seams-invalid` — a seam is supplied but violates a resolution rule — throws
38
+ `E_RECAP_SEAMS_INVALID` and fails closed exactly as the runtime would. A
39
+ configured-but-invalid seam is a configuration error, never a capability
40
+ skip.
41
+
42
+ A seam probe is scoped to autonomous `projectRecap`; supplying one for
43
+ `projectExplainer` or for interactive resolution is an error. A recap that
44
+ fails after a passing probe stays `failed` and is never reinterpreted as a
45
+ skip.
26
46
 
27
47
  In interactive mode, an existing valid project record prevents another prompt.
28
48
  Preferences `always` and `never` resolve directly but are not copied into
@@ -47,12 +67,22 @@ oat_project_recap:
47
67
 
48
68
  Allowed decision/source pairs are:
49
69
 
50
- | Product | Allowed pairs |
51
- | ------------------ | ------------------------------------------------------------------------ |
52
- | `projectExplainer` | `generate/interactive`, `skip/interactive`, `generate/kickoff_prompt` |
53
- | `projectRecap` | `generate/interactive`, `skip/interactive`, `generate/autonomous_policy` |
70
+ | Product | Allowed pairs |
71
+ | ------------------ | ------------------------------------------------------------------------------------------------- |
72
+ | `projectExplainer` | `generate/interactive`, `skip/interactive`, `generate/kickoff_prompt` |
73
+ | `projectRecap` | `generate/interactive`, `skip/interactive`, `generate/autonomous_policy`, `skip/capability_probe` |
54
74
 
55
- In particular, `skip/autonomous_policy` is invalid.
75
+ In particular, `skip/autonomous_policy` is invalid: an autonomous skip is
76
+ recordable only as the probe-driven `skip/capability_probe`, and that pair is
77
+ product-scoped to `projectRecap`. `generate/capability_probe` is invalid too,
78
+ because a probe can only withhold a run, never authorize one.
79
+
80
+ The pair is product-scoped but not mode-scoped, and that is deliberate. Only
81
+ autonomous resolution can _produce_ a `skip/capability_probe`, but once one is
82
+ persisted a later interactive resolution reads it back as a valid recorded
83
+ decision and honors it, exactly as it honors `skip/interactive`. A resumed
84
+ project therefore neither re-prompts nor fails validation on a legitimately
85
+ recorded capability skip.
56
86
 
57
87
  ## Safe persistence
58
88
 
@@ -120,6 +150,23 @@ the relative path and public URL. Neither summary contract is mutated in place.
120
150
 
121
151
  ## Browser and visual-review execution
122
152
 
153
+ Lifecycle callers probe seam availability before attempting an unattended
154
+ `project-recap`. `scripts/probe-recap-seams.mjs#probeRecapSeams({ mode, ...
155
+ seams })` is pure: it applies the same resolution and exclusivity rules this
156
+ adapter applies at run time, but never imports a module, calls a callback,
157
+ validates a session brand, or touches the filesystem. Unattended runs require
158
+ all five seams — author, fact critic, browser session, visual critic, and set
159
+ planner — and interactive runs require the author and fact critic. A probe that
160
+ checks only four of the five passes on a host with no set planner and the
161
+ adapter still throws `E_SET_PLANNER_REQUIRED`, so the planner is probed with
162
+ the rest.
163
+
164
+ The probe classifies each seam as resolved, `missing`, or `invalid` and never
165
+ conflates them. Only `missing` may become a recorded skip. Requirements below
166
+ are unchanged for every run that is actually attempted: the probe gates whether
167
+ a run is attempted, and never weakens the evidence a run that happens must
168
+ produce.
169
+
123
170
  Every unattended `project-recap` must provide exactly one browser-evidence
124
171
  session and exactly one whole-set visual critic through the adapter's
125
172
  first-class boundary. In-process callers pass `browserSession`, created by the
@@ -8,9 +8,25 @@ const TERMINAL_OUTCOMES = new Set([
8
8
  'failed',
9
9
  ]);
10
10
 
11
- export function checkTerminalOutcome({ intent, outcome }) {
11
+ /**
12
+ * A skip reason is the recorded `source` of the skip decision, so the guard
13
+ * accepts exactly the sources that may produce a `skip` recap record.
14
+ */
15
+ const SKIP_REASONS = new Set(['interactive', 'capability_probe']);
16
+
17
+ export function checkTerminalOutcome({ intent, outcome, reason }) {
18
+ if (reason !== undefined && !SKIP_REASONS.has(reason)) {
19
+ throw recapOutcomeError(
20
+ `Recap skip reason must be one of ${[...SKIP_REASONS].join(', ')}.`,
21
+ );
22
+ }
12
23
  if (intent === 'skip') {
13
- return { ok: true, intent, outcome: null };
24
+ return { ok: true, intent, outcome: null, reason: reason ?? null };
25
+ }
26
+ if (reason !== undefined) {
27
+ throw recapOutcomeError(
28
+ 'A recap skip reason applies only to a skip intent.',
29
+ );
14
30
  }
15
31
  if (intent !== 'generate') {
16
32
  throw recapOutcomeError('Recap intent must be generate or skip.');
@@ -24,7 +40,7 @@ export function checkTerminalOutcome({ intent, outcome }) {
24
40
  }
25
41
 
26
42
  async function main(argv) {
27
- const { intent, manifestPath } = parseArguments(argv);
43
+ const { intent, manifestPath, reason } = parseArguments(argv);
28
44
  let outcome;
29
45
  if (manifestPath !== undefined) {
30
46
  let manifest;
@@ -37,12 +53,17 @@ async function main(argv) {
37
53
  }
38
54
  outcome = manifest?.outcome;
39
55
  }
40
- return checkTerminalOutcome({ intent, outcome });
56
+ return checkTerminalOutcome({
57
+ intent,
58
+ outcome,
59
+ ...(reason !== undefined && { reason }),
60
+ });
41
61
  }
42
62
 
43
63
  function parseArguments(argv) {
44
64
  let intent;
45
65
  let manifestPath;
66
+ let reason;
46
67
  for (let index = 0; index < argv.length; index += 2) {
47
68
  const flag = argv[index];
48
69
  const value = argv[index + 1];
@@ -53,11 +74,13 @@ function parseArguments(argv) {
53
74
  intent = value;
54
75
  } else if (flag === '--manifest') {
55
76
  manifestPath = value;
77
+ } else if (flag === '--skip-reason') {
78
+ reason = value;
56
79
  } else {
57
80
  throw recapOutcomeError(`Unsupported argument: ${flag}.`);
58
81
  }
59
82
  }
60
- return { intent, manifestPath };
83
+ return { intent, manifestPath, reason };
61
84
  }
62
85
 
63
86
  function recapOutcomeError(message) {