@open-agent-toolkit/cli 0.3.14 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/NOTICES.md +48 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/contributing/markdown-features.md +38 -0
- package/assets/docs/contributing/smoke-testing.md +20 -13
- package/assets/docs/docs-tooling/workflows.md +26 -19
- package/assets/docs/getting-started/concepts.md +35 -21
- package/assets/docs/provider-sync/commands.md +21 -0
- package/assets/docs/provider-sync/manifest-and-drift.md +24 -17
- package/assets/docs/reference/cli-reference.md +2 -1
- package/assets/docs/reference/configuration.md +10 -2
- package/assets/docs/reference/project-state-machine.md +27 -20
- package/assets/docs/skills/index.md +1 -0
- package/assets/docs/skills/recon.md +8 -5
- package/assets/docs/workflows/advanced/autonomy.md +10 -0
- package/assets/docs/workflows/advanced/evidence-layers.md +19 -12
- package/assets/docs/workflows/advanced/orchestration-model.md +48 -34
- package/assets/docs/workflows/advanced/workflow-gates.md +109 -10
- package/assets/docs/workflows/approvals-and-automation.md +3 -1
- package/assets/docs/workflows/ideas/lifecycle.md +32 -25
- package/assets/docs/workflows/projects/closeout/closeout-skills.md +62 -1
- package/assets/docs/workflows/projects/execution/implementation-execution.md +67 -33
- package/assets/docs/workflows/projects/execution/project-log.md +6 -0
- package/assets/docs/workflows/projects/lifecycle.md +119 -63
- package/assets/docs/workflows/projects/reviews/index.md +63 -1
- package/assets/docs/workflows/projects/reviews/review-flavors.md +30 -23
- package/assets/docs/workflows/waves/wave-workflows.md +11 -3
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +172 -165
- package/assets/skills/oat-project-complete-auto/SKILL.md +388 -0
- package/assets/skills/oat-project-document/SKILL.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +172 -165
- package/assets/skills/oat-project-implement/SKILL.md +6 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +28 -1
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +172 -165
- package/assets/skills/oat-project-implement/references/docs/complexity-review-fallback.md +262 -0
- package/assets/skills/oat-project-implement/references/docs/gate-approval-record.md +80 -0
- package/assets/skills/oat-project-implement/references/phase-execution.md +18 -0
- package/assets/skills/oat-project-lite/SKILL.md +1 -1
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +172 -165
- package/assets/skills/oat-project-next/SKILL.md +19 -2
- package/assets/skills/oat-project-next/references/docs/gate-approval-record.md +80 -0
- package/assets/skills/oat-project-pr-final/SKILL.md +4 -3
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +172 -165
- package/assets/skills/oat-project-progress/SKILL.md +15 -1
- package/assets/skills/oat-project-progress/references/docs/gate-approval-record.md +80 -0
- package/assets/skills/oat-project-quick-start/SKILL.md +31 -3
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +172 -165
- package/assets/skills/oat-project-quick-start/references/docs/complexity-review-fallback.md +262 -0
- package/assets/skills/oat-project-quick-start/references/docs/gate-approval-record.md +80 -0
- package/assets/skills/oat-project-review-receive/SKILL.md +21 -3
- package/assets/skills/oat-project-review-receive/references/docs/complexity-review-fallback.md +262 -0
- package/assets/skills/oat-wave-execute/SKILL.md +49 -28
- package/assets/skills/oat-wave-program/SKILL.md +15 -6
- package/assets/skills/oat-wrap-up/SKILL.md +9 -3
- package/assets/skills/oat-wrap-up/references/report-template.md +1 -1
- package/assets/skills/recon/SKILL.md +1 -1
- package/assets/skills/recon/references/packet-contract.md +18 -3
- package/assets/skills/recon/scripts/lib/contracts.mjs +16 -2
- package/assets/skills/recon/scripts/reconcile-ledger.mjs +20 -10
- package/assets/skills/recon/scripts/render-packet.mjs +31 -3
- package/assets/skills/recon/scripts/validate-packet.mjs +5 -5
- package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +14 -2
- package/assets/templates/docs-app-fuma/app/globals.css +1 -0
- package/assets/templates/state.md +7 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +13 -0
- package/dist/commands/gate/index.d.ts +5 -0
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +270 -9
- package/dist/commands/shared/frontmatter.d.ts +1 -1
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +1 -0
- package/dist/commands/state/generate.d.ts +1 -1
- package/dist/commands/state/generate.d.ts.map +1 -1
- package/dist/commands/state/generate.js +87 -8
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +31 -5
- package/dist/commands/sync/dry-run.d.ts.map +1 -1
- package/dist/commands/sync/dry-run.js +28 -11
- package/dist/commands/sync/sync.utils.d.ts +13 -0
- package/dist/commands/sync/sync.utils.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.js +21 -1
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +1 -0
- package/dist/config/oat-config.d.ts +1 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +3 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +1 -0
- package/dist/drift/detector.js +6 -6
- package/dist/engine/compute-plan.d.ts.map +1 -1
- package/dist/engine/compute-plan.js +87 -2
- package/dist/engine/engine.types.d.ts +10 -1
- package/dist/engine/engine.types.d.ts.map +1 -1
- package/dist/engine/engine.types.js +4 -0
- package/dist/engine/execute-plan.d.ts.map +1 -1
- package/dist/engine/execute-plan.js +42 -5
- package/dist/engine/managed-copy-hash.d.ts +4 -3
- package/dist/engine/managed-copy-hash.d.ts.map +1 -1
- package/dist/engine/managed-copy-hash.js +4 -3
- package/dist/fs/assets.d.ts.map +1 -1
- package/dist/fs/assets.js +7 -1
- package/dist/manifest/hash.d.ts +8 -10
- package/dist/manifest/hash.d.ts.map +1 -1
- package/dist/release/public-package-contract.js +1 -1
- package/dist/ui/output.js +1 -1
- package/dist/validation/skills.d.ts.map +1 -1
- package/dist/validation/skills.js +13 -0
- package/package.json +2 -2
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Complexity Review at Budget Exhaustion
|
|
2
|
+
|
|
3
|
+
When a review or gate budget runs out, the loop has stopped converging, and
|
|
4
|
+
another round of the same review is unlikely to change that. Before asking the
|
|
5
|
+
operator how to proceed, the root dispatches one complexity review and shows its
|
|
6
|
+
result together with the reasons the loop stopped. The review asks whether the
|
|
7
|
+
reviewed work, or the machinery the findings keep demanding, earns its cost
|
|
8
|
+
against the contract; it is not another correctness review.
|
|
9
|
+
|
|
10
|
+
This document is read by two parties: the root (the orchestrating agent that
|
|
11
|
+
owns the exhausted loop) and the reviewer subagent it dispatches.
|
|
12
|
+
|
|
13
|
+
## When
|
|
14
|
+
|
|
15
|
+
Each owning skill points here at its exhaustion point:
|
|
16
|
+
|
|
17
|
+
| Exhaustion point | Owning skill and step |
|
|
18
|
+
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
19
|
+
| Root-owned phase review still has Critical/High findings at the orchestration limit | `oat-project-implement`, `references/phase-execution.md`, Bounded Fix and Re-Review Loop |
|
|
20
|
+
| Optional phase review gate still blocks at the orchestration limit | `oat-project-implement`, `references/phase-execution.md`, Optional External Phase Review Gate |
|
|
21
|
+
| Final review reaches the three-cycle review cap | `oat-project-implement`, `references/completion-and-closeout.md`, Step 13 |
|
|
22
|
+
| Implementation exit gate ends in `block` at `maxAttempts` | `oat-project-implement`, `references/completion-and-closeout.md`, Step 14 |
|
|
23
|
+
| A review scope reaches the three-cycle review cap | `oat-project-review-receive`, Step 8 |
|
|
24
|
+
| Quick-start plan gate (`QS-12`) ends in `block` at `maxAttempts` | `oat-project-quick-start`, Gate Execution step 6 |
|
|
25
|
+
|
|
26
|
+
These are budget exhaustions only. A single `prompt` failure, a `warn`
|
|
27
|
+
outcome, and launch, transport, or runtime failures that consume no attempt do
|
|
28
|
+
not trigger the review.
|
|
29
|
+
|
|
30
|
+
One exhausted loop gets one review. Before dispatching, look for an existing
|
|
31
|
+
report for the scope and reuse the newest
|
|
32
|
+
`reviews/archived/complexity-<scope>-*.md` when it is newer than every review
|
|
33
|
+
artifact of that scope: its filename timestamp is at or after the newest of
|
|
34
|
+
their `oat_generated_at` values, compared at seconds precision. Among reports
|
|
35
|
+
from the same second, the highest collision suffix is the newest. A legacy
|
|
36
|
+
minute-precision name (`YYYY-MM-DDTHHMMZ`) reads as second `00`, which errs
|
|
37
|
+
toward a fresh review. For example, a report saved as
|
|
38
|
+
`complexity-p03-2026-10-02T183045Z.md` is newer than a review generated at
|
|
39
|
+
`2026-10-02T18:30:20Z` and older than one generated at `2026-10-02T18:30:50Z`,
|
|
40
|
+
an order minute precision could not establish. Dispatch again only when a new
|
|
41
|
+
review round has landed since that report. The rule covers a re-entered review-receive at the cap, the
|
|
42
|
+
final review cap reached through review-receive Step 8, and a phase scope that
|
|
43
|
+
reaches both the receive cap and the implement retry limit.
|
|
44
|
+
|
|
45
|
+
The operator can ask for the same review at any other time. There is no
|
|
46
|
+
automatic early trigger.
|
|
47
|
+
|
|
48
|
+
## Probe
|
|
49
|
+
|
|
50
|
+
The operator may have the full `complexity-review` skill installed. Probe these
|
|
51
|
+
paths in order and bind the first that exists:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
COMPLEXITY_REVIEW_SKILL=""
|
|
55
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || true)
|
|
56
|
+
for candidate in \
|
|
57
|
+
"${HOME:-}/.agents/skills/complexity-review/SKILL.md" \
|
|
58
|
+
"${HOME:-}/.claude/skills/complexity-review/SKILL.md" \
|
|
59
|
+
"${REPO_ROOT:+$REPO_ROOT/.agents/skills/complexity-review/SKILL.md}"; do
|
|
60
|
+
[ -n "$candidate" ] && [ -f "$candidate" ] || continue
|
|
61
|
+
COMPLEXITY_REVIEW_SKILL="$candidate"
|
|
62
|
+
break
|
|
63
|
+
done
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- **Found:** the reviewer subagent reads that `SKILL.md` and the references it
|
|
67
|
+
links, and follows them as a document. The skill is not model-invocable, so
|
|
68
|
+
never launch it as a skill. Interactive questions are forbidden: where the
|
|
69
|
+
skill would ask, the reviewer states the gap, labels the contract inferred,
|
|
70
|
+
and marks the verdict provisional. It ignores any `--out` destination and
|
|
71
|
+
returns the report inline. It then adds the OAT sections below.
|
|
72
|
+
- **Not found:** the reviewer follows the condensed method below, then adds the
|
|
73
|
+
OAT sections.
|
|
74
|
+
|
|
75
|
+
Report which path ran in the report's first line, for example
|
|
76
|
+
`Method: installed complexity-review (<path>)` or `Method: OAT condensed`.
|
|
77
|
+
|
|
78
|
+
## Dispatch
|
|
79
|
+
|
|
80
|
+
The root dispatches exactly one read-only reviewer-class subagent through
|
|
81
|
+
`oat-project-dispatch-subagents`, at the reviewer ceiling already resolved for
|
|
82
|
+
the exhausted loop. The reviewer:
|
|
83
|
+
|
|
84
|
+
- writes nothing, commits nothing, and launches nothing;
|
|
85
|
+
- reads committed content (`git show <rev>:<path>`, `git diff <range>`) rather
|
|
86
|
+
than the working tree whenever another writer may own the worktree; and
|
|
87
|
+
- returns the full report inline to the root.
|
|
88
|
+
|
|
89
|
+
The brief names the scope:
|
|
90
|
+
|
|
91
|
+
- **Reviewed target:** the phase commit range, the final implementation range,
|
|
92
|
+
or the plan bundle (`plan.md` with the discovery, design, and spec it was
|
|
93
|
+
built from).
|
|
94
|
+
- **Contract sources:** the backlog items the project closes, `discovery.md`,
|
|
95
|
+
`spec.md`, `design.md`, and the relevant records under
|
|
96
|
+
`.oat/repo/reference/decisions/`. A plan cannot justify its own machinery, so
|
|
97
|
+
the contract comes from these sources, not from the reviewed plan.
|
|
98
|
+
- **Loop history:** every review artifact of the exhausted loop, active and
|
|
99
|
+
archived, gate artifacts included, plus the dispositions recorded for them
|
|
100
|
+
in `implementation.md` or `plan.md`.
|
|
101
|
+
|
|
102
|
+
### Routing outside implement
|
|
103
|
+
|
|
104
|
+
Inside an `oat-project-implement` run, the root already loaded its dispatch
|
|
105
|
+
contract and resolved the reviewer route, and both apply here. When the
|
|
106
|
+
exhausted loop belongs to `oat-project-quick-start` or to a standalone
|
|
107
|
+
`oat-project-review-receive` run, resolve them before the launch:
|
|
108
|
+
|
|
109
|
+
1. Independently probe each required `<name>/SKILL.md` in order:
|
|
110
|
+
`${SKILL_DIR}/..` from this loaded owning skill, `${HOME}/.agents/skills`,
|
|
111
|
+
then `<repo-root>/.agents/skills`. Bind each first match to its own root:
|
|
112
|
+
`${PROJECT_DISPATCH_SKILLS_ROOT}` for `oat-project-dispatch-subagents` and
|
|
113
|
+
`${DISPATCH_SKILLS_ROOT}` for `oat-dispatch-subagents`; never rely on ambient
|
|
114
|
+
discovery. On a miss, name the skill and give its recovery
|
|
115
|
+
command, then continue with
|
|
116
|
+
`Complexity review unavailable: <skill> not installed`:
|
|
117
|
+
- `oat-project-dispatch-subagents`:
|
|
118
|
+
`oat tools install workflows --scope <user|project>`;
|
|
119
|
+
- `oat-dispatch-subagents`:
|
|
120
|
+
`oat tools install utility --scope <user|project>`.
|
|
121
|
+
2. Read `${PROJECT_DISPATCH_SKILLS_ROOT}/oat-project-dispatch-subagents/SKILL.md`,
|
|
122
|
+
then `${DISPATCH_SKILLS_ROOT}/oat-dispatch-subagents/SKILL.md`, and follow them.
|
|
123
|
+
3. When no reviewer ceiling was resolved for this loop, resolve one with
|
|
124
|
+
`oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role reviewer --json`
|
|
125
|
+
and launch at that ceiling.
|
|
126
|
+
|
|
127
|
+
When no reviewer route is available, the root says so in the decision message
|
|
128
|
+
(`Complexity review unavailable: <reason>`) and presents the decision with the
|
|
129
|
+
loop-stop reasons alone. It never substitutes a weaker reviewer class and never
|
|
130
|
+
blocks the decision on the missing review.
|
|
131
|
+
|
|
132
|
+
## Condensed method
|
|
133
|
+
|
|
134
|
+
Generated artifacts are cheap; owned complexity is not. Each piece of
|
|
135
|
+
machinery must earn its cost for this contract. The simplest solution is the
|
|
136
|
+
one with the lowest total lifecycle cost that still meets the contract and
|
|
137
|
+
still proves that it works, not the one with the fewest lines.
|
|
138
|
+
|
|
139
|
+
1. **Restate the contract** in four lines, from the contract sources:
|
|
140
|
+
- Outcome: what was asked for, in the requester's terms.
|
|
141
|
+
- Hard constraints: limits the requester or the repository imposes.
|
|
142
|
+
- Acceptance criteria: how the requester would know it is done.
|
|
143
|
+
- Minimum proof: the smallest evidence that the outcome is achieved.
|
|
144
|
+
|
|
145
|
+
Separate requirements from implementation choices treated as requirements.
|
|
146
|
+
Verify mechanically enforced constraints in source, validators, tests, or
|
|
147
|
+
tool behavior rather than in descriptive prose. When the originating request
|
|
148
|
+
is missing or ambiguous, label the contract inferred, cite each inference,
|
|
149
|
+
and mark the verdict provisional. When sources conflict, report the
|
|
150
|
+
conflict instead of picking the one that justifies the machinery.
|
|
151
|
+
|
|
152
|
+
2. **Establish the simplest viable baseline:** the least complex version that
|
|
153
|
+
satisfies the contract and its minimum proof. It is the reference point every
|
|
154
|
+
additional piece of machinery must beat, not automatically the
|
|
155
|
+
recommendation.
|
|
156
|
+
|
|
157
|
+
3. **Inventory the machinery.** Consider schemas and intermediate
|
|
158
|
+
representations; scripts and generated output; tests, fixtures, and
|
|
159
|
+
snapshots; validation and repair loops; multiple agents or passes; state
|
|
160
|
+
machines, phases, and resumable sessions; abstractions and plugin seams;
|
|
161
|
+
configuration, persistence, and caching; duplicated documentation; and
|
|
162
|
+
process ceremony (planning documents, review passes, phase gates). Report
|
|
163
|
+
only material items, and judge the system as a whole: ten individually
|
|
164
|
+
defensible additions can still be indefensible together.
|
|
165
|
+
|
|
166
|
+
4. **Apply the deletion test** to each item: what outcome does it support, what
|
|
167
|
+
concrete failure occurs without it, is that failure observed or merely
|
|
168
|
+
imaginable, can a smaller mechanism address it, how would we know it helped,
|
|
169
|
+
what does it cost to own, and what would adding it later cost? Grade the
|
|
170
|
+
evidence as **hard requirement**, **observed**, **strongly inferred**,
|
|
171
|
+
**speculative**, or **unsupported**, and recommend **Keep**, **Simplify**,
|
|
172
|
+
**Defer** (with an observable reintroduction trigger), or **Delete**. If an
|
|
173
|
+
item can be deleted, deferred, or substantially simplified while the
|
|
174
|
+
contract and its proof stay intact, it should be. A hard requirement, a
|
|
175
|
+
credible threat model, an irreversible interface, or a low-frequency
|
|
176
|
+
high-impact risk can justify a mechanism before any failure.
|
|
177
|
+
|
|
178
|
+
5. **Build the ledger before the verdict:**
|
|
179
|
+
|
|
180
|
+
| Item | Claimed value | Evidence | Lifecycle cost | Recommendation |
|
|
181
|
+
| ------------------- | ------------- | ------------------------------- | -------------- | -------------------------------- |
|
|
182
|
+
| {file or component} | … | {evidence grade, with citation} | … | Keep / Simplify / Defer / Delete |
|
|
183
|
+
|
|
184
|
+
Cite a file and line, a section, a commit, a run, or a short quote from the
|
|
185
|
+
request. "Best practice" and "consistency with siblings" belong in Claimed
|
|
186
|
+
value, never in Evidence.
|
|
187
|
+
|
|
188
|
+
6. **Assign the verdict:** `Deletion-rule compliant` when every item is Keep or
|
|
189
|
+
a trivial wording-only Simplify; `Partially compliant` when the central
|
|
190
|
+
approach is right and the overshoot is peripheral; `Not compliant` when the
|
|
191
|
+
central approach itself fails the deletion test. Append `, provisional`
|
|
192
|
+
whenever the contract was inferred.
|
|
193
|
+
|
|
194
|
+
Report sections: Verdict, Contract, Simplest viable solution, and Complexity
|
|
195
|
+
ledger always; Proposed changes, Risks of simplifying, Reintroduction triggers,
|
|
196
|
+
and Out of lane only when they have content.
|
|
197
|
+
|
|
198
|
+
**Stance: skeptical, not reflexively minimalist.** Do not remove complexity
|
|
199
|
+
that satisfies a hard requirement, do not trade clear code for a clever
|
|
200
|
+
abstraction, do not recommend a large rewrite to remove a minor burden, and do
|
|
201
|
+
not increase net machinery. Sunk cost is irrelevant; removal and migration cost
|
|
202
|
+
are not. Grade necessity, not correctness: correctness, security, or staleness
|
|
203
|
+
findings noticed in passing go under Out of lane, one line each, and are not
|
|
204
|
+
investigated.
|
|
205
|
+
|
|
206
|
+
## OAT sections
|
|
207
|
+
|
|
208
|
+
Both paths add these sections to the report:
|
|
209
|
+
|
|
210
|
+
- **REQUIRES-OPERATOR:** mark each ledger row that only the operator can settle
|
|
211
|
+
(a contract question, a scope or product call, accepting a risk) with
|
|
212
|
+
`REQUIRES-OPERATOR` and state the question in plain terms.
|
|
213
|
+
- **Open findings:** classify each finding still open in the exhausted loop as
|
|
214
|
+
`accepted-requirement` (the contract requires it), `regression` (the change
|
|
215
|
+
broke something that worked), or `new-hardening` (a new demand beyond the
|
|
216
|
+
contract). Call out recurring families: the same kind of finding returning
|
|
217
|
+
across rounds.
|
|
218
|
+
- **Dissolvable findings:** list the open findings that a recommended Simplify,
|
|
219
|
+
Defer, or Delete would dissolve.
|
|
220
|
+
- **Recommended disposition:** one of `extra cycles` (more fix and review
|
|
221
|
+
rounds), `proceed with override` (accept the residual findings and continue),
|
|
222
|
+
`corrective revision` (rework within the current approach), or `simplify`
|
|
223
|
+
(apply the ledger's simplifications, then review again), with a one-sentence
|
|
224
|
+
rationale. This is a recommendation only.
|
|
225
|
+
|
|
226
|
+
## Decision message and record
|
|
227
|
+
|
|
228
|
+
The root, never the reviewer:
|
|
229
|
+
|
|
230
|
+
1. Saves the returned report verbatim at
|
|
231
|
+
`$PROJECT_PATH/reviews/archived/complexity-<scope>-<YYYY-MM-DDTHHMMSSZ>.md`,
|
|
232
|
+
beside the loop's archived review artifacts, with the UTC timestamp from
|
|
233
|
+
`date -u +%Y-%m-%dT%H%M%SZ`. When that path already exists, append `-2`,
|
|
234
|
+
then `-3`, and so on before `.md` until the path is free. It is not a review event: it
|
|
235
|
+
carries no `oat_review_*` or `oat_generated_at` frontmatter, has no `plan.md`
|
|
236
|
+
Reviews row, and stays out of the top-level `reviews/` directory, where
|
|
237
|
+
routers would read it as an unprocessed review. Write it only while no
|
|
238
|
+
dispatched child owns the worktree; when `reviews/archived/` is tracked,
|
|
239
|
+
commit it with the decision bookkeeping.
|
|
240
|
+
2. Shows one decision message containing:
|
|
241
|
+
- why the loop stopped: the budget, the count reached, and the findings still
|
|
242
|
+
blocking;
|
|
243
|
+
- the verdict and the ledger highlights;
|
|
244
|
+
- the dissolvable findings;
|
|
245
|
+
- each REQUIRES-OPERATOR item, in plain terms;
|
|
246
|
+
- the recommended disposition;
|
|
247
|
+
- the dispositions on offer: the owning step's existing options plus
|
|
248
|
+
`simplify`; and
|
|
249
|
+
- the report path.
|
|
250
|
+
3. Records the operator's choice in `implementation.md` with the date, the
|
|
251
|
+
scope, the exhaustion point, the verdict, the chosen disposition, and the
|
|
252
|
+
report path.
|
|
253
|
+
|
|
254
|
+
Agents never select the disposition, including the recommended one. Under
|
|
255
|
+
`OAT_AUTONOMOUS=1` the run stops at its boundary report, and that report
|
|
256
|
+
includes the same decision-message content; no disposition is chosen or
|
|
257
|
+
recorded on the operator's behalf. The operator's choice is recorded when the
|
|
258
|
+
run resumes.
|
|
259
|
+
|
|
260
|
+
A `simplify` choice routes the accepted ledger changes through the owning
|
|
261
|
+
skill's normal revision path (fix tasks for a code scope, plan edits for a plan
|
|
262
|
+
bundle), followed by a fresh review of the revised work.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Lifecycle Gate Approval Record
|
|
2
|
+
|
|
3
|
+
A configured lifecycle gate ends in an outcome the operator or a later session
|
|
4
|
+
needs to see again: it passed, it warned, the operator explicitly continued
|
|
5
|
+
past a failure, the project disabled it, or it blocked. Chat output does not
|
|
6
|
+
survive the session, so the skill that runs the gate persists the outcome in
|
|
7
|
+
project `state.md`. This document defines the record's shared core once; each
|
|
8
|
+
carrier names where it lives and what it adds.
|
|
9
|
+
|
|
10
|
+
## Core record
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
<carrier>:
|
|
14
|
+
status: allowed # allowed | blocked
|
|
15
|
+
disposition: passed # passed | warned | prompt_approved | project_disabled; null when blocked
|
|
16
|
+
config_fingerprint: '<stable hash of the resolved gate declaration>'
|
|
17
|
+
reviewed_head: '<full SHA of the commit the gate reviewed>'
|
|
18
|
+
decided_at: '2026-10-02T15:20:00Z'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- `status`: `allowed` | `blocked`.
|
|
22
|
+
- `disposition`: `passed`, `warned`, `prompt_approved`, or `project_disabled`
|
|
23
|
+
when `status` is `allowed`; `null` when `status` is `blocked`.
|
|
24
|
+
- `config_fingerprint`: the writer's stable hash of the resolved gate
|
|
25
|
+
declaration it ran (command, description, `onFailure`, `maxAttempts`, and the
|
|
26
|
+
project override state), recorded as provenance. Implement recomputes its own
|
|
27
|
+
carrier's fingerprint under its Step 14 rules; quick-start readers do not.
|
|
28
|
+
- `reviewed_head`: the full 40-character SHA of the commit the gate reviewed,
|
|
29
|
+
recorded as provenance. `null` when no gate ran.
|
|
30
|
+
- `decided_at`: the ISO 8601 UTC time the outcome was decided. A record written
|
|
31
|
+
before `decided_at` existed is not malformed for that reason alone.
|
|
32
|
+
|
|
33
|
+
## Write rules
|
|
34
|
+
|
|
35
|
+
| Gate outcome | Record |
|
|
36
|
+
| --------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
37
|
+
| Passed its threshold | `allowed` / `passed` |
|
|
38
|
+
| Failed under `onFailure: warn` | `allowed` / `warned` |
|
|
39
|
+
| Failed under `onFailure: prompt`, operator explicitly continued | `allowed` / `prompt_approved` |
|
|
40
|
+
| Failed under `onFailure: prompt`, operator declined or deferred | `blocked` / `null` |
|
|
41
|
+
| `block` still failing after `maxAttempts` | `blocked` / `null` |
|
|
42
|
+
| Configured but disabled by project override (no launch) | `allowed` / `project_disabled` |
|
|
43
|
+
| Launch, transport, validation, or receive failure | `blocked` / `null` |
|
|
44
|
+
| Not configured | no record (quick-start); implement writes `allowed/no_gate` |
|
|
45
|
+
|
|
46
|
+
Only an explicit operator continuation writes `prompt_approved`. Declining,
|
|
47
|
+
deferring, giving no response, or running under `OAT_AUTONOMOUS=1` writes
|
|
48
|
+
`blocked`, never anything that reads as approval. A rerun of the same gate
|
|
49
|
+
replaces the record.
|
|
50
|
+
|
|
51
|
+
## Carriers
|
|
52
|
+
|
|
53
|
+
- **`oat_implement_exit_gate`** (`oat-project-implement`,
|
|
54
|
+
`references/completion-and-closeout.md` Step 14) uses this core and keeps its
|
|
55
|
+
additional values and fields there: the `pending` and `stale` statuses, the
|
|
56
|
+
`no_gate` disposition, and the resolution, attempt, launch, receive, waiver,
|
|
57
|
+
and freshness fields. Its own effective-delta freshness rule decides whether a
|
|
58
|
+
record is current.
|
|
59
|
+
- **`oat_quick_start_gate`** (`oat-project-quick-start`, Gate Execution) carries
|
|
60
|
+
exactly the core.
|
|
61
|
+
|
|
62
|
+
## Reading a quick-start record
|
|
63
|
+
|
|
64
|
+
Readers report a quick-start record as recorded and do not recompute
|
|
65
|
+
`config_fingerprint`: no CLI emits a canonical fingerprint for the quick-start
|
|
66
|
+
gate, so a recomputation could not be reproduced across sessions. They do not
|
|
67
|
+
route on the record either.
|
|
68
|
+
|
|
69
|
+
- Report `status`, `disposition`, `decided_at`, and `config_fingerprint` (as
|
|
70
|
+
provenance) exactly as stored.
|
|
71
|
+
- Report the record as malformed when `status` and `disposition` do not form
|
|
72
|
+
one of the combinations in the write rules, or when a present `decided_at` is
|
|
73
|
+
not a valid ISO 8601 UTC time.
|
|
74
|
+
- `reviewed_head` is provenance only and is not compared with `HEAD`, because
|
|
75
|
+
the quick-start completion step commits after the gate.
|
|
76
|
+
- An absent record means none was written: no gate was configured, the gate
|
|
77
|
+
has not reached an outcome, or the plan predates the record. Readers do not
|
|
78
|
+
infer which.
|
|
79
|
+
|
|
80
|
+
Readers never write, repair, or infer a record.
|
|
@@ -3,9 +3,9 @@ name: oat-project-review-receive
|
|
|
3
3
|
description: Use when the user explicitly asks to receive review findings for an OAT project — e.g. "receive review", "process review", "process the project review", or confirms a previously offered review-receive step. Do NOT auto-invoke merely because a review file exists. Resolves the latest review and offers before acting.
|
|
4
4
|
disable-model-invocation: false
|
|
5
5
|
user-invocable: true
|
|
6
|
-
allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Glob, Grep, AskUserQuestion
|
|
6
|
+
allowed-tools: Read, Write, Bash(git:*), Bash(oat:*), Glob, Grep, AskUserQuestion, Task
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.6.
|
|
8
|
+
version: 1.6.8
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Receive Review
|
|
@@ -603,28 +603,46 @@ If the project itself is still untracked because earlier lifecycle steps never c
|
|
|
603
603
|
|
|
604
604
|
**Bounded loop protection:**
|
|
605
605
|
|
|
606
|
-
Count how many review cycles have occurred for this scope. Exclude gate-originated artifacts (`oat_review_invocation: gate`): the cap measures failed fix cycles of the standard review loop, not artifact volume, and phase gate re-runs are governed by the phase review gate flow in `oat-project-implement`, not by this cap.
|
|
606
|
+
Count how many review cycles have occurred for this scope. Exclude gate-originated artifacts (`oat_review_invocation: gate`): the cap measures failed fix cycles of the standard review loop, not artifact volume, and phase gate re-runs are governed by the phase review gate flow in `oat-project-implement`, not by this cap. Saved complexity reports (`complexity-<scope>-*.md` under `reviews/archived/`) name the scope but are not review cycles, so the count skips them too.
|
|
607
607
|
|
|
608
608
|
```bash
|
|
609
609
|
{
|
|
610
610
|
find "$PROJECT_PATH/reviews" -maxdepth 1 -type f -name "*$SCOPE_TOKEN*.md" 2>/dev/null
|
|
611
611
|
find "$PROJECT_PATH/reviews/archived" -maxdepth 1 -type f -name "*$SCOPE_TOKEN*.md" 2>/dev/null
|
|
612
612
|
} | while IFS= read -r artifact; do
|
|
613
|
+
case "$(basename "$artifact")" in complexity-*) continue ;; esac
|
|
613
614
|
grep -q "oat_review_invocation: gate" "$artifact" || echo "$artifact"
|
|
614
615
|
done | wc -l
|
|
615
616
|
```
|
|
616
617
|
|
|
617
618
|
**If 3 or more cycles:**
|
|
618
619
|
|
|
620
|
+
Before showing the menu, dispatch the complexity review that
|
|
621
|
+
`references/docs/complexity-review-fallback.md` defines for this scope's
|
|
622
|
+
exhausted loop, then show its decision message with the menu below; under
|
|
623
|
+
`OAT_AUTONOMOUS=1`, put the same content in the boundary report instead.
|
|
624
|
+
Record the operator's choice with the report path in `implementation.md`.
|
|
625
|
+
Agents never select the disposition. The loop history in the brief includes
|
|
626
|
+
this scope's gate-originated artifacts even though the count excludes them. To
|
|
627
|
+
launch the review, load the current `oat-project-dispatch-subagents/SKILL.md`
|
|
628
|
+
and follow it, resolving the route as that doc's "Routing outside implement"
|
|
629
|
+
section describes; inside an implement run, the implement route applies. A
|
|
630
|
+
receive re-entered at the cap with no new review round since the scope's newest
|
|
631
|
+
complexity report reuses that report instead of dispatching another.
|
|
632
|
+
|
|
619
633
|
```
|
|
620
634
|
⚠️ Review cycle limit reached (3 cycles).
|
|
621
635
|
|
|
622
636
|
This scope has been reviewed {N} times. Further automated review cycles are blocked.
|
|
623
637
|
|
|
638
|
+
Complexity review: {verdict}; recommended disposition: {recommended disposition}
|
|
639
|
+
Report: {report path}
|
|
640
|
+
|
|
624
641
|
Options:
|
|
625
642
|
1. Review findings manually and decide which to address
|
|
626
643
|
2. Proceed to PR with current state
|
|
627
644
|
3. Request explicit user override to continue
|
|
645
|
+
4. Simplify: apply the complexity review's accepted simplifications, then review again
|
|
628
646
|
|
|
629
647
|
Choose an option:
|
|
630
648
|
```
|
package/assets/skills/oat-project-review-receive/references/docs/complexity-review-fallback.md
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Complexity Review at Budget Exhaustion
|
|
2
|
+
|
|
3
|
+
When a review or gate budget runs out, the loop has stopped converging, and
|
|
4
|
+
another round of the same review is unlikely to change that. Before asking the
|
|
5
|
+
operator how to proceed, the root dispatches one complexity review and shows its
|
|
6
|
+
result together with the reasons the loop stopped. The review asks whether the
|
|
7
|
+
reviewed work, or the machinery the findings keep demanding, earns its cost
|
|
8
|
+
against the contract; it is not another correctness review.
|
|
9
|
+
|
|
10
|
+
This document is read by two parties: the root (the orchestrating agent that
|
|
11
|
+
owns the exhausted loop) and the reviewer subagent it dispatches.
|
|
12
|
+
|
|
13
|
+
## When
|
|
14
|
+
|
|
15
|
+
Each owning skill points here at its exhaustion point:
|
|
16
|
+
|
|
17
|
+
| Exhaustion point | Owning skill and step |
|
|
18
|
+
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
19
|
+
| Root-owned phase review still has Critical/High findings at the orchestration limit | `oat-project-implement`, `references/phase-execution.md`, Bounded Fix and Re-Review Loop |
|
|
20
|
+
| Optional phase review gate still blocks at the orchestration limit | `oat-project-implement`, `references/phase-execution.md`, Optional External Phase Review Gate |
|
|
21
|
+
| Final review reaches the three-cycle review cap | `oat-project-implement`, `references/completion-and-closeout.md`, Step 13 |
|
|
22
|
+
| Implementation exit gate ends in `block` at `maxAttempts` | `oat-project-implement`, `references/completion-and-closeout.md`, Step 14 |
|
|
23
|
+
| A review scope reaches the three-cycle review cap | `oat-project-review-receive`, Step 8 |
|
|
24
|
+
| Quick-start plan gate (`QS-12`) ends in `block` at `maxAttempts` | `oat-project-quick-start`, Gate Execution step 6 |
|
|
25
|
+
|
|
26
|
+
These are budget exhaustions only. A single `prompt` failure, a `warn`
|
|
27
|
+
outcome, and launch, transport, or runtime failures that consume no attempt do
|
|
28
|
+
not trigger the review.
|
|
29
|
+
|
|
30
|
+
One exhausted loop gets one review. Before dispatching, look for an existing
|
|
31
|
+
report for the scope and reuse the newest
|
|
32
|
+
`reviews/archived/complexity-<scope>-*.md` when it is newer than every review
|
|
33
|
+
artifact of that scope: its filename timestamp is at or after the newest of
|
|
34
|
+
their `oat_generated_at` values, compared at seconds precision. Among reports
|
|
35
|
+
from the same second, the highest collision suffix is the newest. A legacy
|
|
36
|
+
minute-precision name (`YYYY-MM-DDTHHMMZ`) reads as second `00`, which errs
|
|
37
|
+
toward a fresh review. For example, a report saved as
|
|
38
|
+
`complexity-p03-2026-10-02T183045Z.md` is newer than a review generated at
|
|
39
|
+
`2026-10-02T18:30:20Z` and older than one generated at `2026-10-02T18:30:50Z`,
|
|
40
|
+
an order minute precision could not establish. Dispatch again only when a new
|
|
41
|
+
review round has landed since that report. The rule covers a re-entered review-receive at the cap, the
|
|
42
|
+
final review cap reached through review-receive Step 8, and a phase scope that
|
|
43
|
+
reaches both the receive cap and the implement retry limit.
|
|
44
|
+
|
|
45
|
+
The operator can ask for the same review at any other time. There is no
|
|
46
|
+
automatic early trigger.
|
|
47
|
+
|
|
48
|
+
## Probe
|
|
49
|
+
|
|
50
|
+
The operator may have the full `complexity-review` skill installed. Probe these
|
|
51
|
+
paths in order and bind the first that exists:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
COMPLEXITY_REVIEW_SKILL=""
|
|
55
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || true)
|
|
56
|
+
for candidate in \
|
|
57
|
+
"${HOME:-}/.agents/skills/complexity-review/SKILL.md" \
|
|
58
|
+
"${HOME:-}/.claude/skills/complexity-review/SKILL.md" \
|
|
59
|
+
"${REPO_ROOT:+$REPO_ROOT/.agents/skills/complexity-review/SKILL.md}"; do
|
|
60
|
+
[ -n "$candidate" ] && [ -f "$candidate" ] || continue
|
|
61
|
+
COMPLEXITY_REVIEW_SKILL="$candidate"
|
|
62
|
+
break
|
|
63
|
+
done
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- **Found:** the reviewer subagent reads that `SKILL.md` and the references it
|
|
67
|
+
links, and follows them as a document. The skill is not model-invocable, so
|
|
68
|
+
never launch it as a skill. Interactive questions are forbidden: where the
|
|
69
|
+
skill would ask, the reviewer states the gap, labels the contract inferred,
|
|
70
|
+
and marks the verdict provisional. It ignores any `--out` destination and
|
|
71
|
+
returns the report inline. It then adds the OAT sections below.
|
|
72
|
+
- **Not found:** the reviewer follows the condensed method below, then adds the
|
|
73
|
+
OAT sections.
|
|
74
|
+
|
|
75
|
+
Report which path ran in the report's first line, for example
|
|
76
|
+
`Method: installed complexity-review (<path>)` or `Method: OAT condensed`.
|
|
77
|
+
|
|
78
|
+
## Dispatch
|
|
79
|
+
|
|
80
|
+
The root dispatches exactly one read-only reviewer-class subagent through
|
|
81
|
+
`oat-project-dispatch-subagents`, at the reviewer ceiling already resolved for
|
|
82
|
+
the exhausted loop. The reviewer:
|
|
83
|
+
|
|
84
|
+
- writes nothing, commits nothing, and launches nothing;
|
|
85
|
+
- reads committed content (`git show <rev>:<path>`, `git diff <range>`) rather
|
|
86
|
+
than the working tree whenever another writer may own the worktree; and
|
|
87
|
+
- returns the full report inline to the root.
|
|
88
|
+
|
|
89
|
+
The brief names the scope:
|
|
90
|
+
|
|
91
|
+
- **Reviewed target:** the phase commit range, the final implementation range,
|
|
92
|
+
or the plan bundle (`plan.md` with the discovery, design, and spec it was
|
|
93
|
+
built from).
|
|
94
|
+
- **Contract sources:** the backlog items the project closes, `discovery.md`,
|
|
95
|
+
`spec.md`, `design.md`, and the relevant records under
|
|
96
|
+
`.oat/repo/reference/decisions/`. A plan cannot justify its own machinery, so
|
|
97
|
+
the contract comes from these sources, not from the reviewed plan.
|
|
98
|
+
- **Loop history:** every review artifact of the exhausted loop, active and
|
|
99
|
+
archived, gate artifacts included, plus the dispositions recorded for them
|
|
100
|
+
in `implementation.md` or `plan.md`.
|
|
101
|
+
|
|
102
|
+
### Routing outside implement
|
|
103
|
+
|
|
104
|
+
Inside an `oat-project-implement` run, the root already loaded its dispatch
|
|
105
|
+
contract and resolved the reviewer route, and both apply here. When the
|
|
106
|
+
exhausted loop belongs to `oat-project-quick-start` or to a standalone
|
|
107
|
+
`oat-project-review-receive` run, resolve them before the launch:
|
|
108
|
+
|
|
109
|
+
1. Independently probe each required `<name>/SKILL.md` in order:
|
|
110
|
+
`${SKILL_DIR}/..` from this loaded owning skill, `${HOME}/.agents/skills`,
|
|
111
|
+
then `<repo-root>/.agents/skills`. Bind each first match to its own root:
|
|
112
|
+
`${PROJECT_DISPATCH_SKILLS_ROOT}` for `oat-project-dispatch-subagents` and
|
|
113
|
+
`${DISPATCH_SKILLS_ROOT}` for `oat-dispatch-subagents`; never rely on ambient
|
|
114
|
+
discovery. On a miss, name the skill and give its recovery
|
|
115
|
+
command, then continue with
|
|
116
|
+
`Complexity review unavailable: <skill> not installed`:
|
|
117
|
+
- `oat-project-dispatch-subagents`:
|
|
118
|
+
`oat tools install workflows --scope <user|project>`;
|
|
119
|
+
- `oat-dispatch-subagents`:
|
|
120
|
+
`oat tools install utility --scope <user|project>`.
|
|
121
|
+
2. Read `${PROJECT_DISPATCH_SKILLS_ROOT}/oat-project-dispatch-subagents/SKILL.md`,
|
|
122
|
+
then `${DISPATCH_SKILLS_ROOT}/oat-dispatch-subagents/SKILL.md`, and follow them.
|
|
123
|
+
3. When no reviewer ceiling was resolved for this loop, resolve one with
|
|
124
|
+
`oat project dispatch-ceiling resolve --provider "$ACTIVE_PROVIDER" --role reviewer --json`
|
|
125
|
+
and launch at that ceiling.
|
|
126
|
+
|
|
127
|
+
When no reviewer route is available, the root says so in the decision message
|
|
128
|
+
(`Complexity review unavailable: <reason>`) and presents the decision with the
|
|
129
|
+
loop-stop reasons alone. It never substitutes a weaker reviewer class and never
|
|
130
|
+
blocks the decision on the missing review.
|
|
131
|
+
|
|
132
|
+
## Condensed method
|
|
133
|
+
|
|
134
|
+
Generated artifacts are cheap; owned complexity is not. Each piece of
|
|
135
|
+
machinery must earn its cost for this contract. The simplest solution is the
|
|
136
|
+
one with the lowest total lifecycle cost that still meets the contract and
|
|
137
|
+
still proves that it works, not the one with the fewest lines.
|
|
138
|
+
|
|
139
|
+
1. **Restate the contract** in four lines, from the contract sources:
|
|
140
|
+
- Outcome: what was asked for, in the requester's terms.
|
|
141
|
+
- Hard constraints: limits the requester or the repository imposes.
|
|
142
|
+
- Acceptance criteria: how the requester would know it is done.
|
|
143
|
+
- Minimum proof: the smallest evidence that the outcome is achieved.
|
|
144
|
+
|
|
145
|
+
Separate requirements from implementation choices treated as requirements.
|
|
146
|
+
Verify mechanically enforced constraints in source, validators, tests, or
|
|
147
|
+
tool behavior rather than in descriptive prose. When the originating request
|
|
148
|
+
is missing or ambiguous, label the contract inferred, cite each inference,
|
|
149
|
+
and mark the verdict provisional. When sources conflict, report the
|
|
150
|
+
conflict instead of picking the one that justifies the machinery.
|
|
151
|
+
|
|
152
|
+
2. **Establish the simplest viable baseline:** the least complex version that
|
|
153
|
+
satisfies the contract and its minimum proof. It is the reference point every
|
|
154
|
+
additional piece of machinery must beat, not automatically the
|
|
155
|
+
recommendation.
|
|
156
|
+
|
|
157
|
+
3. **Inventory the machinery.** Consider schemas and intermediate
|
|
158
|
+
representations; scripts and generated output; tests, fixtures, and
|
|
159
|
+
snapshots; validation and repair loops; multiple agents or passes; state
|
|
160
|
+
machines, phases, and resumable sessions; abstractions and plugin seams;
|
|
161
|
+
configuration, persistence, and caching; duplicated documentation; and
|
|
162
|
+
process ceremony (planning documents, review passes, phase gates). Report
|
|
163
|
+
only material items, and judge the system as a whole: ten individually
|
|
164
|
+
defensible additions can still be indefensible together.
|
|
165
|
+
|
|
166
|
+
4. **Apply the deletion test** to each item: what outcome does it support, what
|
|
167
|
+
concrete failure occurs without it, is that failure observed or merely
|
|
168
|
+
imaginable, can a smaller mechanism address it, how would we know it helped,
|
|
169
|
+
what does it cost to own, and what would adding it later cost? Grade the
|
|
170
|
+
evidence as **hard requirement**, **observed**, **strongly inferred**,
|
|
171
|
+
**speculative**, or **unsupported**, and recommend **Keep**, **Simplify**,
|
|
172
|
+
**Defer** (with an observable reintroduction trigger), or **Delete**. If an
|
|
173
|
+
item can be deleted, deferred, or substantially simplified while the
|
|
174
|
+
contract and its proof stay intact, it should be. A hard requirement, a
|
|
175
|
+
credible threat model, an irreversible interface, or a low-frequency
|
|
176
|
+
high-impact risk can justify a mechanism before any failure.
|
|
177
|
+
|
|
178
|
+
5. **Build the ledger before the verdict:**
|
|
179
|
+
|
|
180
|
+
| Item | Claimed value | Evidence | Lifecycle cost | Recommendation |
|
|
181
|
+
| ------------------- | ------------- | ------------------------------- | -------------- | -------------------------------- |
|
|
182
|
+
| {file or component} | … | {evidence grade, with citation} | … | Keep / Simplify / Defer / Delete |
|
|
183
|
+
|
|
184
|
+
Cite a file and line, a section, a commit, a run, or a short quote from the
|
|
185
|
+
request. "Best practice" and "consistency with siblings" belong in Claimed
|
|
186
|
+
value, never in Evidence.
|
|
187
|
+
|
|
188
|
+
6. **Assign the verdict:** `Deletion-rule compliant` when every item is Keep or
|
|
189
|
+
a trivial wording-only Simplify; `Partially compliant` when the central
|
|
190
|
+
approach is right and the overshoot is peripheral; `Not compliant` when the
|
|
191
|
+
central approach itself fails the deletion test. Append `, provisional`
|
|
192
|
+
whenever the contract was inferred.
|
|
193
|
+
|
|
194
|
+
Report sections: Verdict, Contract, Simplest viable solution, and Complexity
|
|
195
|
+
ledger always; Proposed changes, Risks of simplifying, Reintroduction triggers,
|
|
196
|
+
and Out of lane only when they have content.
|
|
197
|
+
|
|
198
|
+
**Stance: skeptical, not reflexively minimalist.** Do not remove complexity
|
|
199
|
+
that satisfies a hard requirement, do not trade clear code for a clever
|
|
200
|
+
abstraction, do not recommend a large rewrite to remove a minor burden, and do
|
|
201
|
+
not increase net machinery. Sunk cost is irrelevant; removal and migration cost
|
|
202
|
+
are not. Grade necessity, not correctness: correctness, security, or staleness
|
|
203
|
+
findings noticed in passing go under Out of lane, one line each, and are not
|
|
204
|
+
investigated.
|
|
205
|
+
|
|
206
|
+
## OAT sections
|
|
207
|
+
|
|
208
|
+
Both paths add these sections to the report:
|
|
209
|
+
|
|
210
|
+
- **REQUIRES-OPERATOR:** mark each ledger row that only the operator can settle
|
|
211
|
+
(a contract question, a scope or product call, accepting a risk) with
|
|
212
|
+
`REQUIRES-OPERATOR` and state the question in plain terms.
|
|
213
|
+
- **Open findings:** classify each finding still open in the exhausted loop as
|
|
214
|
+
`accepted-requirement` (the contract requires it), `regression` (the change
|
|
215
|
+
broke something that worked), or `new-hardening` (a new demand beyond the
|
|
216
|
+
contract). Call out recurring families: the same kind of finding returning
|
|
217
|
+
across rounds.
|
|
218
|
+
- **Dissolvable findings:** list the open findings that a recommended Simplify,
|
|
219
|
+
Defer, or Delete would dissolve.
|
|
220
|
+
- **Recommended disposition:** one of `extra cycles` (more fix and review
|
|
221
|
+
rounds), `proceed with override` (accept the residual findings and continue),
|
|
222
|
+
`corrective revision` (rework within the current approach), or `simplify`
|
|
223
|
+
(apply the ledger's simplifications, then review again), with a one-sentence
|
|
224
|
+
rationale. This is a recommendation only.
|
|
225
|
+
|
|
226
|
+
## Decision message and record
|
|
227
|
+
|
|
228
|
+
The root, never the reviewer:
|
|
229
|
+
|
|
230
|
+
1. Saves the returned report verbatim at
|
|
231
|
+
`$PROJECT_PATH/reviews/archived/complexity-<scope>-<YYYY-MM-DDTHHMMSSZ>.md`,
|
|
232
|
+
beside the loop's archived review artifacts, with the UTC timestamp from
|
|
233
|
+
`date -u +%Y-%m-%dT%H%M%SZ`. When that path already exists, append `-2`,
|
|
234
|
+
then `-3`, and so on before `.md` until the path is free. It is not a review event: it
|
|
235
|
+
carries no `oat_review_*` or `oat_generated_at` frontmatter, has no `plan.md`
|
|
236
|
+
Reviews row, and stays out of the top-level `reviews/` directory, where
|
|
237
|
+
routers would read it as an unprocessed review. Write it only while no
|
|
238
|
+
dispatched child owns the worktree; when `reviews/archived/` is tracked,
|
|
239
|
+
commit it with the decision bookkeeping.
|
|
240
|
+
2. Shows one decision message containing:
|
|
241
|
+
- why the loop stopped: the budget, the count reached, and the findings still
|
|
242
|
+
blocking;
|
|
243
|
+
- the verdict and the ledger highlights;
|
|
244
|
+
- the dissolvable findings;
|
|
245
|
+
- each REQUIRES-OPERATOR item, in plain terms;
|
|
246
|
+
- the recommended disposition;
|
|
247
|
+
- the dispositions on offer: the owning step's existing options plus
|
|
248
|
+
`simplify`; and
|
|
249
|
+
- the report path.
|
|
250
|
+
3. Records the operator's choice in `implementation.md` with the date, the
|
|
251
|
+
scope, the exhaustion point, the verdict, the chosen disposition, and the
|
|
252
|
+
report path.
|
|
253
|
+
|
|
254
|
+
Agents never select the disposition, including the recommended one. Under
|
|
255
|
+
`OAT_AUTONOMOUS=1` the run stops at its boundary report, and that report
|
|
256
|
+
includes the same decision-message content; no disposition is chosen or
|
|
257
|
+
recorded on the operator's behalf. The operator's choice is recorded when the
|
|
258
|
+
run resumes.
|
|
259
|
+
|
|
260
|
+
A `simplify` choice routes the accepted ledger changes through the owning
|
|
261
|
+
skill's normal revision path (fix tasks for a code scope, plan edits for a plan
|
|
262
|
+
bundle), followed by a fresh review of the revised work.
|