@open-agent-toolkit/cli 0.1.53 → 0.1.54
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/docs/workflows/skills/index.md +3 -0
- package/assets/docs/workflows/skills/repo-improve.md +45 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +39 -7
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +10 -1
- package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +6 -3
- package/assets/skills/oat-pjm-review-backlog/SKILL.md +22 -10
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +20 -4
- package/assets/skills/oat-repo-improve/SKILL.md +224 -81
- package/assets/skills/oat-repo-improve/references/plan-template.md +134 -133
- package/assets/skills/oat-repo-maintainability-review/SKILL.md +22 -7
- package/assets/templates/backlog-item.md +1 -0
- package/assets/templates/pjm-agents.md +8 -0
- package/assets/templates/reference-agents.md +3 -1
- package/package.json +2 -2
- package/assets/skills/oat-repo-improve/references/closing-the-loop.md +0 -96
|
@@ -1,199 +1,200 @@
|
|
|
1
|
-
#
|
|
1
|
+
# External Implementation Plan Template
|
|
2
2
|
|
|
3
|
-
Every plan
|
|
3
|
+
Use this template for plans written by `oat-repo-improve`. Every plan must stand alone for an executor that has zero context from the advisor session, source review, backlog discussion, or sibling plans.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
External plans are durable reference artifacts. They are deliberately not canonical OAT `plan.md` files and must not contain OAT phase IDs, task IDs, lifecycle readiness, review tables, or implementation bookkeeping.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. **Verification gates** — every step ends with a command and its expected result. The executor never has to _judge_ whether it succeeded.
|
|
9
|
-
3. **Hard boundaries and escape hatches** — explicit out-of-scope list, and "STOP and report" conditions instead of letting the model improvise when reality doesn't match the plan.
|
|
7
|
+
## File Contract
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Write plans under `.oat/repo/reference/external-plans/` as:
|
|
12
10
|
|
|
11
|
+
`YYYY-MM-DD-<short-slug>.md`
|
|
12
|
+
|
|
13
|
+
Use this frontmatter:
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
---
|
|
17
|
+
oat_generated: true
|
|
18
|
+
oat_external_plan: true
|
|
19
|
+
oat_external_plan_source: repo-audit|maintainability-review|backlog-review|backlog-directory|backlog-item
|
|
20
|
+
oat_external_plan_sources:
|
|
21
|
+
- <repo-relative source artifact or scope>
|
|
22
|
+
oat_external_plan_commit: <short SHA>
|
|
23
|
+
oat_backlog_items: []
|
|
24
|
+
oat_issue_url: null
|
|
25
|
+
created: '<ISO 8601 UTC>'
|
|
13
26
|
---
|
|
27
|
+
```
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
`oat_backlog_items` contains backlog IDs represented by the plan. Keep it empty when none apply. Set `oat_issue_url` only after confirmed issue publication. Never record absolute workstation paths in durable frontmatter.
|
|
16
30
|
|
|
17
|
-
|
|
18
|
-
# Plan NNN: <Imperative title — what will be true after this plan>
|
|
19
|
-
|
|
20
|
-
> **Executor instructions**: Follow this plan step by step. Run every
|
|
21
|
-
> verification command and confirm the expected result before moving to the
|
|
22
|
-
> next step. If anything in the "STOP conditions" section occurs, stop and
|
|
23
|
-
> report — do not improvise. When done, update the status row for this plan
|
|
24
|
-
> in `plans/README.md` — unless a reviewer dispatched you and told you they
|
|
25
|
-
> maintain the index.
|
|
26
|
-
>
|
|
27
|
-
> **Drift check (run first)**: `git diff --stat <planned-at SHA>..HEAD -- <in-scope paths>`
|
|
28
|
-
> If any in-scope file changed since this plan was written, compare the
|
|
29
|
-
> "Current state" excerpts against the live code before proceeding; on a
|
|
30
|
-
> mismatch, treat it as a STOP condition.
|
|
31
|
+
## Plan Template
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
````markdown
|
|
34
|
+
# <Imperative title: what will be true after execution>
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
> [!NOTE]
|
|
37
|
+
> This is an external implementation plan, not a canonical OAT project
|
|
38
|
+
> `plan.md`. Execute it directly, or import it for tracked OAT execution with
|
|
39
|
+
> `oat-project-import-plan <this-file>`.
|
|
40
|
+
>
|
|
41
|
+
> Begin with the drift check. Follow the steps and verification gates in order.
|
|
42
|
+
> If a STOP condition occurs, stop and report instead of improvising.
|
|
41
43
|
|
|
42
|
-
##
|
|
44
|
+
## Outcome
|
|
43
45
|
|
|
44
|
-
2–5 sentences.
|
|
45
|
-
lands. Written so the executor (and a human reviewer) understands the intent —
|
|
46
|
-
intent is what lets a correct judgment call happen when a detail is off.
|
|
46
|
+
State the observable end result in 2–5 sentences. Explain why it matters and preserve the source intent in language an executor and reviewer can understand without opening the source artifact.
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Source and live evidence
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
- Source artifact or scope: `<repo-relative path or scope>`
|
|
51
|
+
- Planned at: commit `<short SHA>` on `<YYYY-MM-DD>`
|
|
52
|
+
- Related backlog items: `<ID and title, or none>`
|
|
53
|
+
- Verified evidence:
|
|
54
|
+
- `<file:line or command evidence>` — what it establishes
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
- `src/orders/api.ts` — order-list endpoint; contains the N+1 (lines 130–160)
|
|
54
|
-
- Excerpts of the code as it exists today (short, with `file:line` markers),
|
|
55
|
-
enough that the executor can confirm it's looking at the right thing.
|
|
56
|
-
- The repo conventions that apply here, with a pointer to one exemplar file:
|
|
57
|
-
"Error handling follows the Result pattern — see `src/lib/result.ts` and its
|
|
58
|
-
use in `src/users/api.ts:40-60`. Match it."
|
|
59
|
-
- Any documented vocabulary or design constraints the plan must honor, inlined
|
|
60
|
-
from the intent/design docs found in recon: the relevant `CONTEXT.md` terms
|
|
61
|
-
the executor should use in names and comments, the `DESIGN.md` tokens/components
|
|
62
|
-
to reuse, or the ADR whose decision this work must stay consistent with. Quote
|
|
63
|
-
the specific lines — the executor has not read those docs.
|
|
56
|
+
Distinguish source assertions from facts verified against the live repository. Do not copy stale evidence forward.
|
|
64
57
|
|
|
65
|
-
##
|
|
58
|
+
## Drift check
|
|
66
59
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
Run before editing:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git diff --stat <planned-at SHA>..HEAD -- <in-scope paths>
|
|
64
|
+
```
|
|
65
|
+
````
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
If an in-scope file changed, compare the plan's current-state evidence with the live code. A material mismatch is a STOP condition unless the plan explicitly explains how to reconcile it.
|
|
75
68
|
|
|
76
|
-
##
|
|
69
|
+
## Repository conventions
|
|
77
70
|
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
- Build: `<exact command>` → `<expected success>`
|
|
72
|
+
- Typecheck: `<exact command or not applicable>`
|
|
73
|
+
- Test: `<exact command>` → `<expected success>`
|
|
74
|
+
- Lint/format check: `<exact non-mutating command>`
|
|
75
|
+
- Implementation pattern: `<exemplar file and the convention to match>`
|
|
76
|
+
- Git/PR convention: `<observed convention; do not push/open a PR unless instructed>`
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
"use `vercel-react-best-practices` when writing the memoization in step 3".
|
|
83
|
-
- Reference docs worth reading before starting, by path or URL.
|
|
78
|
+
Only include commands verified from repository instructions or configuration.
|
|
84
79
|
|
|
85
80
|
## Scope
|
|
86
81
|
|
|
87
|
-
|
|
82
|
+
### In scope
|
|
88
83
|
|
|
89
|
-
-
|
|
90
|
-
- `src/orders/api.test.ts` (create)
|
|
84
|
+
- `<exact file, directory, symbol, or behavior>`
|
|
91
85
|
|
|
92
|
-
|
|
86
|
+
### Out of scope
|
|
93
87
|
|
|
94
|
-
-
|
|
95
|
-
changing it wastes effort and risks the v1 clients still pinned to it.
|
|
96
|
-
- Any change to the public response shape — clients depend on it.
|
|
88
|
+
- `<specific adjacent concern>` — `<why it must remain untouched>`
|
|
97
89
|
|
|
98
|
-
##
|
|
90
|
+
## Current state
|
|
91
|
+
|
|
92
|
+
Describe the minimum facts needed to execute safely:
|
|
99
93
|
|
|
100
|
-
|
|
94
|
+
- role of each relevant file or module;
|
|
95
|
+
- short current-state excerpts with `file:line` markers when exact code shape matters;
|
|
96
|
+
- applicable decisions, vocabulary, data contracts, or design constraints;
|
|
97
|
+
- dependencies and assumptions established during vetting.
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
- Commit per step or per logical unit; message style: <match repo, e.g. conventional commits — include an example from `git log`>
|
|
104
|
-
- Do NOT push or open a PR unless the operator instructed it.
|
|
99
|
+
## Implementation steps
|
|
105
100
|
|
|
106
|
-
|
|
101
|
+
### 1. <Imperative step title>
|
|
107
102
|
|
|
108
|
-
|
|
103
|
+
Name exact files and symbols. Describe the target behavior or code shape and any boundary that must remain stable.
|
|
109
104
|
|
|
110
|
-
|
|
111
|
-
shape when it's load-bearing (the pattern to produce, not necessarily every
|
|
112
|
-
line).
|
|
105
|
+
**Verify:** `<command>` → `<expected output>`
|
|
113
106
|
|
|
114
|
-
|
|
107
|
+
### 2. <Imperative step title>
|
|
115
108
|
|
|
116
|
-
|
|
109
|
+
Continue in dependency order. Keep each step independently checkable and leave the repository in a coherent state.
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
is never broken between steps when possible — e.g. add new path, switch
|
|
120
|
-
callers, then remove old path.)
|
|
111
|
+
**Verify:** `<command>` → `<expected output>`
|
|
121
112
|
|
|
122
113
|
## Test plan
|
|
123
114
|
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
-
|
|
115
|
+
- Tests to add or change, with exact paths and named cases.
|
|
116
|
+
- Existing test to use as the structural pattern.
|
|
117
|
+
- Regression or failure mode each test proves.
|
|
118
|
+
- Focused command and expected result.
|
|
119
|
+
- Full relevant suite and expected result.
|
|
129
120
|
|
|
130
121
|
## Done criteria
|
|
131
122
|
|
|
132
|
-
|
|
123
|
+
- [ ] All in-scope behavior matches the stated outcome.
|
|
124
|
+
- [ ] Focused tests pass with the expected cases.
|
|
125
|
+
- [ ] Required build, typecheck, lint, and full relevant tests pass.
|
|
126
|
+
- [ ] `git status --short` contains no unexplained or out-of-scope files.
|
|
127
|
+
- [ ] Documentation or migration notes named by the plan are complete.
|
|
133
128
|
|
|
134
|
-
-
|
|
135
|
-
- [ ] `pnpm test` exits 0; new tests for <X> exist and pass
|
|
136
|
-
- [ ] `grep -rn "<old pattern>" src/` returns no matches
|
|
137
|
-
- [ ] No files outside the in-scope list are modified (`git status`)
|
|
138
|
-
- [ ] `plans/README.md` status row updated
|
|
129
|
+
Replace generic criteria with machine-checkable commands or observable assertions specific to the plan.
|
|
139
130
|
|
|
140
131
|
## STOP conditions
|
|
141
132
|
|
|
142
|
-
Stop and report
|
|
133
|
+
Stop and report instead of improvising when:
|
|
143
134
|
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
135
|
+
- live state materially contradicts the verified evidence or drift assumptions;
|
|
136
|
+
- a required change crosses an out-of-scope boundary;
|
|
137
|
+
- a named verification gate fails twice after one bounded correction;
|
|
138
|
+
- a load-bearing dependency, API, ownership assumption, or migration precondition is false;
|
|
139
|
+
- the work would expose, copy, or rotate a credential without explicit authority.
|
|
149
140
|
|
|
150
|
-
|
|
141
|
+
Add plan-specific STOP conditions for its actual risks.
|
|
151
142
|
|
|
152
|
-
|
|
143
|
+
## Review focus
|
|
153
144
|
|
|
154
|
-
- What
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
- Any follow-up explicitly deferred out of this plan (and why).
|
|
158
|
-
```
|
|
145
|
+
- What a reviewer should inspect most closely.
|
|
146
|
+
- Compatibility or regression risks.
|
|
147
|
+
- Follow-ups intentionally deferred and why.
|
|
159
148
|
|
|
160
|
-
|
|
149
|
+
````
|
|
161
150
|
|
|
162
|
-
## Index
|
|
151
|
+
## Multi-Plan Index
|
|
163
152
|
|
|
164
|
-
|
|
153
|
+
When one run writes multiple plans, create `YYYY-MM-DD-<source-mode>-plan-index.md`:
|
|
165
154
|
|
|
166
155
|
```markdown
|
|
167
|
-
|
|
156
|
+
---
|
|
157
|
+
oat_generated: true
|
|
158
|
+
oat_external_plan_index: true
|
|
159
|
+
oat_external_plan_source: <source mode>
|
|
160
|
+
oat_external_plan_sources:
|
|
161
|
+
- <source artifact or scope>
|
|
162
|
+
oat_external_plan_commit: <short SHA>
|
|
163
|
+
created: '<ISO 8601 UTC>'
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
# External Plan Index: <run title>
|
|
168
167
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
honor its STOP conditions, and update your row when done.
|
|
168
|
+
This index records selection and ordering. It is not an executable plan and is
|
|
169
|
+
not an `oat-project-import-plan` target.
|
|
172
170
|
|
|
173
|
-
##
|
|
171
|
+
## Selection
|
|
174
172
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
| 002 | ... | P1 | M | 001 | TODO |
|
|
173
|
+
- Selected: <why these candidates were chosen>
|
|
174
|
+
- Deferred/rejected: <material candidates and rationale>
|
|
175
|
+
- Unaudited or out of scope: <boundaries>
|
|
179
176
|
|
|
180
|
-
|
|
177
|
+
## Recommended order
|
|
178
|
+
|
|
179
|
+
| Order | Plan | Source item/finding | Depends on | Tracking | Rationale |
|
|
180
|
+
| --- | --- | --- | --- | --- | --- |
|
|
181
|
+
| 1 | [Title](./YYYY-MM-DD-slug.md) | <ID/title or finding> | — | <backlog ID and/or issue URL, or none> | <reason> |
|
|
181
182
|
|
|
182
183
|
## Dependency notes
|
|
183
184
|
|
|
184
|
-
-
|
|
185
|
+
- <Dependency or parallel-lane explanation.>
|
|
186
|
+
````
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
Do not use a repository-wide `README.md` as the index. Do not ask executors to mutate the index; execution tracking belongs to the chosen execution workflow.
|
|
187
189
|
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
+
## Quality Gate
|
|
190
191
|
|
|
191
|
-
|
|
192
|
+
Before finishing each plan, confirm:
|
|
192
193
|
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
194
|
+
- It can be executed with only the plan and repository.
|
|
195
|
+
- Every source claim used for implementation was verified live.
|
|
196
|
+
- It has one coherent shippable outcome and verification boundary. Independent outcomes are separate plans; inseparable project-sized work is escalated to an OAT project/import decision.
|
|
197
|
+
- Every step names exact files/symbols and ends in a command with an expected result.
|
|
198
|
+
- Scope and STOP conditions are specific enough to prevent plausible but unauthorized expansion.
|
|
199
|
+
- Frontmatter source paths are repo-relative and backlog IDs are exact.
|
|
200
|
+
- No secret value, workstation-only absolute path, OAT task ID, or lifecycle bookkeeping appears.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-repo-maintainability-review
|
|
3
|
-
version: 1.
|
|
4
|
-
description: Use when you need a structured maintainability analysis for a repository or directory target with actionable findings.
|
|
3
|
+
version: 1.3.0
|
|
4
|
+
description: Use when you need a structured maintainability analysis for a repository or directory target with actionable findings and an optional external-plan handoff.
|
|
5
5
|
argument-hint: '[--scope repo|directory] [--target <path>] [--mode auto|tracked|local|inline] [--output <path>] [--focus <areas>] [--analysis-mode full] [--fan-out]'
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
user-invocable: true
|
|
@@ -42,11 +42,12 @@ Analyze repository maintainability and developer experience using a deterministi
|
|
|
42
42
|
- ` OAT ▸ REPO MAINTAINABILITY REVIEW`
|
|
43
43
|
- `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`
|
|
44
44
|
- Print step indicators before major work:
|
|
45
|
-
- `[1/
|
|
46
|
-
- `[2/
|
|
47
|
-
- `[3/
|
|
48
|
-
- `[4/
|
|
49
|
-
- `[5/
|
|
45
|
+
- `[1/6] Resolving scope, arguments, and output policy...`
|
|
46
|
+
- `[2/6] Collecting repository evidence...`
|
|
47
|
+
- `[3/6] Running dimension analysis (single-agent or multi-agent)...`
|
|
48
|
+
- `[4/6] Synthesizing findings and scoring...`
|
|
49
|
+
- `[5/6] Rendering artifact and summary...`
|
|
50
|
+
- `[6/6] (Optional) Handing selected findings to repo improve...` — only print after the user accepts the offer
|
|
50
51
|
- For long-running fan-out or large scans, print start + completion lines.
|
|
51
52
|
- Print a resolved run-options summary before evidence collection begins.
|
|
52
53
|
|
|
@@ -58,6 +59,7 @@ Analyze repository maintainability and developer experience using a deterministi
|
|
|
58
59
|
4. Gather evidence across required dimensions.
|
|
59
60
|
5. Synthesize findings into prioritized recommendations.
|
|
60
61
|
6. Render artifact or return inline output.
|
|
62
|
+
7. Offer a scoped external-plan handoff when a file artifact exists.
|
|
61
63
|
|
|
62
64
|
### Output Policy Resolution
|
|
63
65
|
|
|
@@ -190,9 +192,22 @@ Final user-facing summary must include:
|
|
|
190
192
|
- Artifact path (`inline-only` when no file is emitted)
|
|
191
193
|
- Execution mode (`single-agent` or `multi-agent`)
|
|
192
194
|
|
|
195
|
+
### Optional Repo Improve Handoff
|
|
196
|
+
|
|
197
|
+
When tracked or local output produced a file artifact, offer one bounded next step after the completion summary:
|
|
198
|
+
|
|
199
|
+
> Want to turn selected findings from this maintainability review into self-contained external implementation plans with `oat-repo-improve`?
|
|
200
|
+
|
|
201
|
+
If the user accepts, invoke `oat-repo-improve` in `maintainability-review` mode and pass the exact artifact path. That skill must use this artifact as its candidate source and perform only bounded live-evidence verification; it must not repeat a full repository audit. The user selects which findings become plans.
|
|
202
|
+
|
|
203
|
+
If output was inline-only, explain that the handoff requires a file-backed review artifact. Offer to render the completed review to the normal tracked/local destination before invoking `oat-repo-improve`; do not silently create it.
|
|
204
|
+
|
|
205
|
+
The maintainability-review skill never writes external plans itself. `oat-repo-improve` is the sole owner of `.oat/repo/reference/external-plans/` output for this flow.
|
|
206
|
+
|
|
193
207
|
## Success Criteria
|
|
194
208
|
|
|
195
209
|
- Output includes required sections and metadata.
|
|
196
210
|
- Findings include scoring fields and evidence.
|
|
197
211
|
- Result includes now/next/later execution guidance.
|
|
198
212
|
- Required arguments are explicitly resolved before analysis execution.
|
|
213
|
+
- File-backed runs offer an optional, source-scoped `oat-repo-improve maintainability-review <artifact>` handoff without re-auditing the repository.
|
|
@@ -60,6 +60,14 @@ doctor` surfaces this drift.
|
|
|
60
60
|
recent commits against open items: work that shipped without a close-out
|
|
61
61
|
should be closed retroactively with a note.
|
|
62
62
|
|
|
63
|
+
## External Plan Reverse Links
|
|
64
|
+
|
|
65
|
+
Backlog item frontmatter may include `external_plans`, a YAML string array of
|
|
66
|
+
repo-relative paths under `.oat/repo/reference/external-plans/`.
|
|
67
|
+
`oat-repo-improve` owns additions to this field after a plan write succeeds.
|
|
68
|
+
Preserve existing links, deduplicate additions, and never link a failed or
|
|
69
|
+
partial write. These are durable source-to-plan references, not project status.
|
|
70
|
+
|
|
63
71
|
## Project Kickoff Handoffs
|
|
64
72
|
|
|
65
73
|
`handoffs/` holds one-shot kickoff prompts — consumable context for turning a
|
|
@@ -9,7 +9,9 @@ This directory owns append-mostly reference material.
|
|
|
9
9
|
|
|
10
10
|
- `decisions/` stores file-per-record decisions and the generated decision index.
|
|
11
11
|
- `project-summaries/` stores archived project summaries.
|
|
12
|
-
- `external-plans/` stores imported provider
|
|
12
|
+
- `external-plans/` stores imported provider plans and external implementation
|
|
13
|
+
plans generated by `oat-repo-improve`. Improve owns plan generation; project
|
|
14
|
+
import optionally normalizes one selected file into an OAT project.
|
|
13
15
|
- Create research, brainstorm, and deck folders on demand when a workflow needs them.
|
|
14
16
|
- Do not put active roadmap, current-state, or backlog records directly under `reference/`.
|
|
15
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.54"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Closing the Loop — execute, reconcile, issues
|
|
2
|
-
|
|
3
|
-
The advisor's job doesn't end at the plan. This file covers the three follow-through flows: dispatching an executor and reviewing its work (`execute`), keeping the plan backlog alive (`reconcile`), and publishing plans where work gets picked up (`--issues`).
|
|
4
|
-
|
|
5
|
-
The founding rule survives unchanged: **the advisor never edits source code.** In `execute`, a _separate executor subagent_ edits code in an isolated git worktree; the advisor dispatches, reviews, and renders a verdict — like a tech lead who doesn't push commits to your branch.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## `execute <plan>` — dispatch and review
|
|
10
|
-
|
|
11
|
-
### Preconditions (check all before dispatching)
|
|
12
|
-
|
|
13
|
-
- The repo is a git repository (worktree isolation requires it). If not: stop and say so.
|
|
14
|
-
- The plan file exists and its dependencies show DONE in `plans/README.md`. If not: stop, name the missing dependency.
|
|
15
|
-
- Run the plan's drift check yourself. If in-scope files changed since `Planned at`, reconcile the plan first (see below) — don't hand a stale plan to an executor.
|
|
16
|
-
|
|
17
|
-
### Dispatch
|
|
18
|
-
|
|
19
|
-
Spawn **one** `general-purpose` subagent with `isolation: "worktree"`. Executor model: default `sonnet`; use what the user named if they named one (`execute 003 haiku`).
|
|
20
|
-
|
|
21
|
-
The subagent prompt must contain:
|
|
22
|
-
|
|
23
|
-
1. **The full plan file text, inlined.** The worktree contains only committed files — if `plans/` is uncommitted, the executor can't read it. Never assume; always inline.
|
|
24
|
-
2. The executor preamble:
|
|
25
|
-
|
|
26
|
-
> You are the executor for the implementation plan below. Follow it step by
|
|
27
|
-
> step. Run every verification command and confirm the expected result before
|
|
28
|
-
> moving on. Touch only the files listed as in scope. If any STOP condition
|
|
29
|
-
> occurs, stop immediately and report. Do not improvise around obstacles.
|
|
30
|
-
> Commit your work in the worktree following the plan's git workflow section.
|
|
31
|
-
> One override: SKIP the plan's instruction to update `plans/README.md` —
|
|
32
|
-
> your reviewer maintains the index. Before reporting, audit every claim in
|
|
33
|
-
> your report against an actual tool result from this session — only report
|
|
34
|
-
> what you can point to evidence for; if a verification failed or was
|
|
35
|
-
> skipped, say so plainly. When finished, reply with exactly the report
|
|
36
|
-
> format below.
|
|
37
|
-
|
|
38
|
-
3. The report format:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
STATUS: COMPLETE | STOPPED
|
|
42
|
-
STEPS: per step — done/skipped + verification command result
|
|
43
|
-
STOPPED BECAUSE: (only if STOPPED) which STOP condition, what was observed
|
|
44
|
-
FILES CHANGED: list
|
|
45
|
-
NOTES: anything the reviewer should know (deviations, surprises, judgment calls)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Review (the advisor's real job here)
|
|
49
|
-
|
|
50
|
-
Note on fresh worktrees: they share git history but not `node_modules` or build artifacts — the executor must install dependencies first, and check tooling that resolves from `dist/` may need one build even though the plan's command table (recon'd in the main tree) didn't mention it. Expect this; it isn't a deviation.
|
|
51
|
-
|
|
52
|
-
Review like a tech lead reviewing a PR against the spec — never fix anything yourself:
|
|
53
|
-
|
|
54
|
-
1. **Re-run every done criterion** in the worktree. Don't trust the executor's report — verify.
|
|
55
|
-
2. **Scope compliance**: `git -C <worktree> diff --stat` against the plan's in-scope list. Any file outside scope fails review, full stop.
|
|
56
|
-
3. **Read the full diff.** Judge it against "Why this matters" (does it solve the actual problem?) and the repo conventions named in the plan (does it look like the rest of the codebase?).
|
|
57
|
-
4. **Audit the new tests.** Executors game criteria — a test that asserts nothing meaningful passes `pnpm test` and proves nothing. Read what the tests assert.
|
|
58
|
-
|
|
59
|
-
### Verdict
|
|
60
|
-
|
|
61
|
-
**Documented deviations are judged on merit, not reflex-blocked.** "Do not improvise" exists to stop silent drift; an executor that hits a real obstacle (e.g. the plan's approach breaks existing test mocks), adapts minimally, and explains it in NOTES has done the right thing. Approve it if the adaptation serves the plan's intent and stays in scope; treat _undocumented_ deviations as review failures.
|
|
62
|
-
|
|
63
|
-
| Verdict | When | Action |
|
|
64
|
-
| ----------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
-
| **APPROVE** | Criteria pass, scope clean, quality holds | Update index status to DONE. Present to the user: diff summary, worktree path and branch, anything from NOTES. **Merging is the user's decision — never merge, push, or commit to their branch.** |
|
|
66
|
-
| **REVISE** | Fixable gaps | SendMessage to the same executor with specific, actionable feedback ("criterion 3 fails: X; the error handling in `api.ts:90` swallows the error — use the Result pattern per the plan"). **Max 2 revision rounds**, then BLOCK. |
|
|
67
|
-
| **BLOCK** | STOP condition hit, scope violated unrecoverably, or revisions exhausted | Mark BLOCKED in the index with the reason. Refine or rewrite the plan with what was learned. Tell the user what happened and what changed in the plan. |
|
|
68
|
-
|
|
69
|
-
Running verification commands inside the executor's worktree is fine — it's isolated and disposable. The no-mutating-commands rule protects the user's working tree, not the worktree.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## `reconcile` — keep `plans/` alive
|
|
74
|
-
|
|
75
|
-
Process what happened since the last session. Read `plans/README.md` and every plan file, then per status:
|
|
76
|
-
|
|
77
|
-
- **DONE** — spot-check that the done criteria still hold on the current HEAD (cheap ones only). Mark verified in the index. Don't delete plan files — they're the record.
|
|
78
|
-
- **BLOCKED** — read the reason. Investigate the underlying obstacle in the codebase. Either rewrite the plan around it (new number if the approach changed fundamentally, in-place refresh otherwise) or mark REJECTED with one line of rationale.
|
|
79
|
-
- **IN PROGRESS** (stale) — flag it to the user; an executor probably died mid-run. Check the worktree if one exists.
|
|
80
|
-
- **TODO** — run the drift check. If drifted: re-verify the finding still exists (it may have been fixed in passing), then refresh the "Current state" excerpts and `Planned at` SHA. If the finding is gone, mark REJECTED ("fixed independently").
|
|
81
|
-
|
|
82
|
-
Finish with a short report: what's verified done, what was refreshed, what's rejected, and what's executable right now.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## `--issues` — publish plans as GitHub issues
|
|
87
|
-
|
|
88
|
-
Modifier on any planning invocation (`/oat-repo-improve --issues`, `/oat-repo-improve security --issues`). The flag is the user's authorization to create issues — never create them without it.
|
|
89
|
-
|
|
90
|
-
1. Preflight: `gh auth status` succeeds and the repo has a GitHub remote. If either fails, write the plan files as normal and say why issues were skipped.
|
|
91
|
-
2. Visibility check: `gh repo view --json visibility`. If the repo is **public**, warn the user that issues are publicly visible and get explicit confirmation before publishing any plan that describes a security vulnerability, credential location, or other sensitive finding.
|
|
92
|
-
3. Show the list of titles about to become issues; confirm once if interactive.
|
|
93
|
-
4. Per plan: `gh issue create --title "<plan title>" --body-file <plan file>`. Labels: `improve` plus the category — apply only if the labels exist or can be created without erroring; skip labels rather than fail.
|
|
94
|
-
5. Record each issue URL in the plan's Status block (`- **Issue**: <url>`) and the index.
|
|
95
|
-
|
|
96
|
-
The plan file remains the source of truth; the issue is distribution. The self-containment rule pays off here — the issue body needs no edits to make sense to whoever (or whatever) picks it up.
|