@open-agent-toolkit/cli 0.3.7 → 0.3.9
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/README.md +3 -3
- package/assets/agents/oat-codebase-mapper.md +3 -2
- package/assets/agents/oat-reviewer.md +5 -13
- package/assets/agents/skeptical-evaluator.md +6 -2
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/backlog-lifecycle.md +3 -2
- package/assets/docs/cli-utilities/bootstrap.md +5 -2
- package/assets/docs/cli-utilities/config-and-local-state.md +13 -6
- package/assets/docs/cli-utilities/configuration.md +25 -10
- package/assets/docs/cli-utilities/tool-packs.md +60 -10
- package/assets/docs/cli-utilities/workflow-gates.md +37 -0
- package/assets/docs/contributing/code.md +9 -5
- package/assets/docs/provider-sync/commands.md +17 -8
- package/assets/docs/provider-sync/instruction-sync.md +241 -39
- package/assets/docs/provider-sync/providers.md +20 -0
- package/assets/docs/provider-sync/scope-and-surface.md +3 -1
- package/assets/docs/reference/cli-reference.md +4 -1
- package/assets/docs/reference/oat-directory-structure.md +12 -11
- package/assets/docs/reference/troubleshooting.md +19 -4
- package/assets/docs/workflows/projects/evidence-layers.md +5 -1
- package/assets/docs/workflows/projects/implementation-execution.md +22 -8
- package/assets/docs/workflows/projects/lifecycle.md +4 -6
- package/assets/docs/workflows/projects/retro.md +7 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +4 -4
- package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +5 -5
- package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +14 -11
- package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +2 -2
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +4 -3
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +17 -6
- package/assets/skills/oat-agent-instructions-apply/SKILL.md +3 -3
- package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +14 -11
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/oat-dispatch-subagents/references/managed-claude-example.json +387 -0
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +75 -0
- package/assets/skills/oat-doctor/SKILL.md +17 -13
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/SKILL.md +2 -2
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +33 -11
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -22
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/references/phase-execution.md +109 -8
- package/assets/skills/oat-project-lite/SKILL.md +23 -1
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-next/SKILL.md +3 -3
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-progress/SKILL.md +2 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-retro/SKILL.md +70 -6
- package/assets/skills/oat-project-review-provide/SKILL.md +3 -1
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +3 -1
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +1 -3
- package/assets/templates/pjm-agents.md +7 -3
- package/assets/templates/state.md +2 -2
- package/dist/agents/canonical/resolve.d.ts +6 -4
- package/dist/agents/canonical/resolve.d.ts.map +1 -1
- package/dist/agents/canonical/resolve.js +6 -4
- package/dist/commands/backlog/archive.d.ts +10 -2
- package/dist/commands/backlog/archive.d.ts.map +1 -1
- package/dist/commands/backlog/archive.js +22 -6
- package/dist/commands/backlog/index.d.ts.map +1 -1
- package/dist/commands/backlog/index.js +5 -1
- package/dist/commands/backlog/rewrite-references.d.ts +41 -0
- package/dist/commands/backlog/rewrite-references.d.ts.map +1 -0
- package/dist/commands/backlog/rewrite-references.js +516 -0
- package/dist/commands/config/index.d.ts +1 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +69 -34
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +51 -2
- package/dist/commands/gate/review-verdict.d.ts +22 -0
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +111 -0
- package/dist/commands/init/index.d.ts +6 -0
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +27 -4
- package/dist/commands/init/tools/index.d.ts +18 -1
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +84 -17
- package/dist/commands/init/tools/project-guidance.d.ts +19 -4
- package/dist/commands/init/tools/project-guidance.d.ts.map +1 -1
- package/dist/commands/init/tools/project-guidance.js +58 -15
- package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
- package/dist/commands/init/tools/workflows/index.js +5 -1
- package/dist/commands/instructions/instructions.types.d.ts +105 -4
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.types.js +4 -5
- package/dist/commands/instructions/instructions.utils.d.ts +161 -6
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.js +650 -12
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
- package/dist/commands/instructions/sync/sync.js +256 -18
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
- package/dist/commands/instructions/validate/validate.js +36 -8
- package/dist/commands/pjm/index.d.ts.map +1 -1
- package/dist/commands/pjm/index.js +19 -4
- package/dist/commands/pjm/init.d.ts +3 -0
- package/dist/commands/pjm/init.d.ts.map +1 -1
- package/dist/commands/pjm/init.js +23 -5
- package/dist/commands/project/dispatch/canonical-role.d.ts +33 -0
- package/dist/commands/project/dispatch/canonical-role.d.ts.map +1 -0
- package/dist/commands/project/dispatch/canonical-role.js +114 -0
- package/dist/commands/project/dispatch/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch/index.js +3 -1
- package/dist/commands/project/dispatch/record.d.ts.map +1 -1
- package/dist/commands/project/dispatch/record.js +146 -4
- package/dist/commands/shared/agents-md.d.ts +26 -5
- package/dist/commands/shared/agents-md.d.ts.map +1 -1
- package/dist/commands/shared/agents-md.js +182 -3
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +28 -21
- package/dist/commands/tools/guidance/index.d.ts +15 -0
- package/dist/commands/tools/guidance/index.d.ts.map +1 -0
- package/dist/commands/tools/guidance/index.js +81 -0
- package/dist/commands/tools/index.d.ts.map +1 -1
- package/dist/commands/tools/index.js +2 -0
- package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -1
- package/dist/commands/tools/shared/sync-evidence.js +32 -5
- package/dist/config/oat-config.d.ts +57 -3
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +223 -15
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +12 -2
- package/dist/engine/compute-plan.d.ts.map +1 -1
- package/dist/engine/compute-plan.js +31 -3
- package/dist/providers/claude/dispatch-envelope.d.ts +53 -0
- package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
- package/dist/providers/claude/dispatch-envelope.js +324 -48
- package/dist/providers/claude/rule-transform.js +1 -1
- package/dist/providers/copilot/rule-transform.js +1 -1
- package/dist/providers/cursor/rule-transform.js +1 -1
- package/dist/providers/identity/absolute-paths.d.ts +13 -0
- package/dist/providers/identity/absolute-paths.d.ts.map +1 -1
- package/dist/providers/identity/absolute-paths.js +27 -14
- package/dist/providers/identity/generic-dispatch-record.d.ts +212 -0
- package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
- package/dist/providers/identity/generic-dispatch-record.js +78 -19
- package/dist/providers/identity/oat-dispatch-record.d.ts +5 -0
- package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -1
- package/dist/providers/identity/oat-dispatch-record.js +11 -2
- package/dist/providers/shared/registry.d.ts +6 -0
- package/dist/providers/shared/registry.d.ts.map +1 -1
- package/dist/providers/shared/registry.js +30 -0
- package/dist/rules/canonical/parse.d.ts.map +1 -1
- package/dist/rules/canonical/parse.js +38 -3
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ disable-model-invocation: true
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Glob, Grep, Bash(git:*), Bash(oat:*), Skill
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.1.
|
|
8
|
+
version: 1.1.3
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Project Next
|
|
@@ -253,8 +253,8 @@ Otherwise, look up the target skill from the routing table for the current `oat_
|
|
|
253
253
|
| Current Phase | Phase Status | Boundary Tier | Quick Plan Readiness | Target Skill |
|
|
254
254
|
| ------------- | ------------ | ------------- | -------------------- | -------------------------- |
|
|
255
255
|
| discovery | in_progress | tier 3 | — | `oat-project-discover` |
|
|
256
|
-
| discovery | in_progress | tier 2 | — | `oat-project-
|
|
257
|
-
| discovery | complete | tier 1 | — | `oat-project-
|
|
256
|
+
| discovery | in_progress | tier 2 | — | `oat-project-quick-start` |
|
|
257
|
+
| discovery | complete | tier 1 | — | `oat-project-quick-start` |
|
|
258
258
|
| plan | in_progress | tier 3 | not ready | `oat-project-quick-start` |
|
|
259
259
|
| plan | in_progress | tier 2 | not ready | `oat-project-quick-start` |
|
|
260
260
|
| plan | in_progress | tier 1 | not ready | `oat-project-quick-start` |
|
|
@@ -274,7 +274,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
274
274
|
| `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
|
|
275
275
|
| `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
|
|
276
276
|
| `oat-dispatch-subagents/references/provider-cursor.md` | `f781555295a9 -> NG`; `55ccfef14fd6 -> NG` |
|
|
277
|
-
| `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`
|
|
277
|
+
| `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`; `66bc2f0d4fda -> NG` |
|
|
278
278
|
| `oat-project-dispatch-subagents/SKILL.md` | `eca03ad1ca12 -> PDISPATCH-01`; `59fbcdc79cea -> PDISPATCH-01` |
|
|
279
279
|
| `oat-project-plan/SKILL.md` | `f99e44b39932 -> PLAN-12`; `7e6a9854504b -> NG` |
|
|
280
280
|
| `oat-project-complete/SKILL.md` | `0177956707aa -> NG`; `8305b5bb65ef -> NG`; `3c0b26f0ff1c -> NG`; `8cc1fa5aab1e -> COMPLETE-01`; `4c209fbb4716 -> COMPLETE-01`; `02e4175e1171 -> COMPLETE-01`; `d698d4f98e76 -> COMPLETE-01`; `9f86a7218d93 -> COMPLETE-01`; `024713698d9a -> COMPLETE-01`; `c327995053fa -> COMPLETE-01`; `61f81d4ec7c1 -> COMPLETE-01`; `14fb2e56809f -> COMPLETE-01`; `7d4ff668744d -> COMPLETE-01`; `502a6c141784 -> COMPLETE-01`; `fb7e2db356af -> COMPLETE-01`; `f73f8476360a -> NG`; `1e15f420039f -> NG`; `cc234032ddd7 -> NG`; `1dd54687229b -> NG`; `fc05c8303cd2 -> NG`; `24be721d635e -> NG` |
|
|
@@ -5,7 +5,7 @@ disable-model-invocation: false
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Glob, Grep, Bash(git:*), Bash(oat:*), AskUserQuestion
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.4.
|
|
8
|
+
version: 1.4.3
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Progress Router
|
|
@@ -276,7 +276,7 @@ Routing matrix by mode:
|
|
|
276
276
|
| oat_phase | oat_phase_status | Next Skill |
|
|
277
277
|
| --------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
278
278
|
| discovery | in_progress | Continue `oat-project-discover` |
|
|
279
|
-
| discovery | complete | `oat-project-
|
|
279
|
+
| discovery | complete | `oat-project-quick-start` |
|
|
280
280
|
| plan | in_progress | Continue `oat-project-quick-start` when the plan is not implementation-ready; otherwise `oat-project-implement` |
|
|
281
281
|
| plan | complete | `oat-project-implement` when the plan is implementation-ready; otherwise `oat-project-quick-start` |
|
|
282
282
|
| implement | in_progress | Continue `oat-project-implement`. If drift detected (see drift detection above), also mention `oat-project-reconcile` as an option. |
|
|
@@ -274,7 +274,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
274
274
|
| `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
|
|
275
275
|
| `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
|
|
276
276
|
| `oat-dispatch-subagents/references/provider-cursor.md` | `f781555295a9 -> NG`; `55ccfef14fd6 -> NG` |
|
|
277
|
-
| `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`
|
|
277
|
+
| `oat-dispatch-subagents/references/record-schema.md` | `78f8069274a8 -> NG`; `1c9a84c4d1e0 -> NG`; `2a63da6e3a96 -> NG`; `30762d53b043 -> NG`; `66bc2f0d4fda -> NG` |
|
|
278
278
|
| `oat-project-dispatch-subagents/SKILL.md` | `eca03ad1ca12 -> PDISPATCH-01`; `59fbcdc79cea -> PDISPATCH-01` |
|
|
279
279
|
| `oat-project-plan/SKILL.md` | `f99e44b39932 -> PLAN-12`; `7e6a9854504b -> NG` |
|
|
280
280
|
| `oat-project-complete/SKILL.md` | `0177956707aa -> NG`; `8305b5bb65ef -> NG`; `3c0b26f0ff1c -> NG`; `8cc1fa5aab1e -> COMPLETE-01`; `4c209fbb4716 -> COMPLETE-01`; `02e4175e1171 -> COMPLETE-01`; `d698d4f98e76 -> COMPLETE-01`; `9f86a7218d93 -> COMPLETE-01`; `024713698d9a -> COMPLETE-01`; `c327995053fa -> COMPLETE-01`; `61f81d4ec7c1 -> COMPLETE-01`; `14fb2e56809f -> COMPLETE-01`; `7d4ff668744d -> COMPLETE-01`; `502a6c141784 -> COMPLETE-01`; `fb7e2db356af -> COMPLETE-01`; `f73f8476360a -> NG`; `1e15f420039f -> NG`; `cc234032ddd7 -> NG`; `1dd54687229b -> NG`; `fc05c8303cd2 -> NG`; `24be721d635e -> NG` |
|
|
@@ -5,7 +5,7 @@ disable-model-invocation: false
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Write, Bash(git:*), Bash(jq:*), Bash(pnpm:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat project log:*), Bash(oat project push:*), Bash(oat project scope:*), Bash(oat tools:*), Glob, Grep, AskUserQuestion
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.0.
|
|
8
|
+
version: 1.0.7
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Project Retrospective
|
|
@@ -53,8 +53,9 @@ OAT ▸ PROJECT RETRO
|
|
|
53
53
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Use `[1/
|
|
57
|
-
|
|
56
|
+
Use `[1/7] Resolving project and mode…` through `[7/7] Walking through
|
|
57
|
+
register items…`, with `[6/7] Formatting and committing…` before the final
|
|
58
|
+
walkthrough. Name evidence inventory, synthesis, disposition, and project-log
|
|
58
59
|
steps as they begin.
|
|
59
60
|
|
|
60
61
|
## Artifact Hygiene
|
|
@@ -165,7 +166,9 @@ provenance.
|
|
|
165
166
|
|
|
166
167
|
### Step 4: Resolve Post-Generation Consent
|
|
167
168
|
|
|
168
|
-
Read effective `workflow.retro.apply
|
|
169
|
+
Read effective `workflow.retro.apply`, `workflow.retro.filing.repo`, and
|
|
170
|
+
`workflow.retro.filing.upstream` configuration. Read each filing leaf key on its
|
|
171
|
+
own; the filing namespace has no single readable value.
|
|
169
172
|
|
|
170
173
|
**Interactive run:**
|
|
171
174
|
|
|
@@ -173,16 +176,19 @@ Read effective `workflow.retro.apply` and `workflow.retro.filing` configuration.
|
|
|
173
176
|
2. Ask whether to apply eligible RP apply-items now.
|
|
174
177
|
3. If unfiled UP or RP file-items exist, offer the `oat-project-retro-file`
|
|
175
178
|
skill.
|
|
179
|
+
4. Close the run with the Step 7 walkthrough, whatever the user answered.
|
|
176
180
|
|
|
177
181
|
**Non-interactive run:**
|
|
178
182
|
|
|
179
183
|
- Apply only when `workflow.retro.apply` is `auto`.
|
|
180
184
|
- `ask` or absent means propose-only.
|
|
181
|
-
- Chain to `oat-project-retro-file` only when
|
|
182
|
-
`workflow.retro.filing`
|
|
185
|
+
- Chain to `oat-project-retro-file` only when `workflow.retro.filing.repo` or
|
|
186
|
+
`workflow.retro.filing.upstream` is explicitly configured; chaining means
|
|
183
187
|
loading the current `oat-project-retro-file/SKILL.md` and following it, or
|
|
184
188
|
dispatching a child that carries it.
|
|
185
189
|
- Without filing config, file nothing and report that proposals remain.
|
|
190
|
+
- Close the run with the Step 7 walkthrough even though no one answered a
|
|
191
|
+
prompt.
|
|
186
192
|
|
|
187
193
|
All applications follow the apply procedure. Filing remains owned by
|
|
188
194
|
`oat-project-retro-file`; generate/apply mode does not file tracker items.
|
|
@@ -298,6 +304,61 @@ Commit the artifact, project-log append, and any approved apply outputs. Use
|
|
|
298
304
|
one reviewed batch when items are tightly coupled; otherwise use one commit per
|
|
299
305
|
item as described in the apply procedure. Never stage unrelated changes.
|
|
300
306
|
|
|
307
|
+
### Step 7: Final Report Walkthrough
|
|
308
|
+
|
|
309
|
+
After the artifact passes Step 6 validation, end the final response with a
|
|
310
|
+
walkthrough of every `RP-*` and `UP-*` item so the user can decide what to apply
|
|
311
|
+
or file without opening the retro. Link the artifact by its repo-relative path
|
|
312
|
+
instead of reproducing it; the walkthrough explains items, it does not copy
|
|
313
|
+
their bodies.
|
|
314
|
+
|
|
315
|
+
For each item, state:
|
|
316
|
+
|
|
317
|
+
- its ID and a short title;
|
|
318
|
+
- a plain-language summary of what it proposes;
|
|
319
|
+
- why it matters for future runs;
|
|
320
|
+
- its current disposition and destination, read from the register fields after
|
|
321
|
+
every action in this run; and
|
|
322
|
+
- the next available action, or that none remains.
|
|
323
|
+
|
|
324
|
+
Group items in this order: apply items (RP `Disposition: apply`), repository
|
|
325
|
+
filing items (RP `Disposition: file`), and upstream filing items (UP). Give an
|
|
326
|
+
empty group a one-line "none" note rather than dropping it.
|
|
327
|
+
|
|
328
|
+
The walkthrough is required in interactive and non-interactive runs alike, and
|
|
329
|
+
whether apply or filing was performed, declined, deferred, skipped, automatic,
|
|
330
|
+
or unanswered. When both registers are empty, give an explicit no-items summary
|
|
331
|
+
such as "No repo improvements or upstream feedback items were proposed."
|
|
332
|
+
|
|
333
|
+
Worked example:
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
Retro: `.oat/projects/shared/example/references/project-retro.md`
|
|
337
|
+
|
|
338
|
+
**Apply items**
|
|
339
|
+
|
|
340
|
+
- **RP-01 — Isolate HOME in template tests.** Summary: run template-resolving
|
|
341
|
+
tests with a temporary HOME. Why it matters: they read the maintainer's user
|
|
342
|
+
templates and fail locally while passing in CI. Disposition: apply; Status:
|
|
343
|
+
applied; Applied-ref: `abc1234`. Next action: none.
|
|
344
|
+
|
|
345
|
+
**Repository filing items**
|
|
346
|
+
|
|
347
|
+
- **RP-02 — Document the cache-replay trap.** Summary: warn that a green turbo
|
|
348
|
+
run can be a cache replay. Why it matters: two sessions reported replays as
|
|
349
|
+
real passes. Disposition: file; Status: proposed; Destination: — because
|
|
350
|
+
filing was deferred, and `workflow.retro.filing.repo` routes it to the
|
|
351
|
+
backlog. Next action: run retro filing to create the backlog item.
|
|
352
|
+
|
|
353
|
+
**Upstream filing items**
|
|
354
|
+
|
|
355
|
+
- **UP-01 — Name the file in rule parse errors.** Summary: include the rule path
|
|
356
|
+
in canonical parse failures. Why it matters: the error named no file, so
|
|
357
|
+
diagnosis needed a full scan. Status: proposed; Destination: — because
|
|
358
|
+
`workflow.retro.filing.upstream` is unset. Next action: set that key or file
|
|
359
|
+
it interactively.
|
|
360
|
+
```
|
|
361
|
+
|
|
301
362
|
## Success Criteria
|
|
302
363
|
|
|
303
364
|
- The resolved mode matches explicit user/config intent.
|
|
@@ -311,3 +372,6 @@ item as described in the apply procedure. Never stage unrelated changes.
|
|
|
311
372
|
- No promotion is applied or item filed without interactive approval or
|
|
312
373
|
explicit non-interactive configuration.
|
|
313
374
|
- The project log and commit preserve the outcome without unrelated changes.
|
|
375
|
+
- The final response walks through every `RP-*` and `UP-*` item, grouped into
|
|
376
|
+
apply, repository filing, and upstream filing items, or gives an explicit
|
|
377
|
+
no-items summary, and links the artifact instead of reproducing it.
|
|
@@ -5,7 +5,7 @@ disable-model-invocation: false
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Glob, Grep, Write, Edit, Bash(git:*), Bash(oat:*), Bash(pnpm:*), Bash(mkdir:*), Bash(date:*), Bash(realpath:*), Bash(awk:*), AskUserQuestion
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.5.
|
|
8
|
+
version: 1.5.11
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Request Review
|
|
@@ -1034,6 +1034,8 @@ When `oat gate review` invokes this skill, it includes gate-originated context i
|
|
|
1034
1034
|
|
|
1035
1035
|
The gate prompt also supplies exact values for `oat_gate_run_id`, `oat_gate_target`, `oat_gate_runtime`, `oat_invocation_model`, `oat_invocation_reasoning_effort`, and `oat_invocation_source`. Copy all six values verbatim for gate-originated artifacts. These fields record OAT's configured invocation; do not derive them from `baseCommand`, the target id, model self-identification, or surrounding dispatch prose. Optional observed/self-reported identity is separate and non-authoritative.
|
|
1036
1036
|
|
|
1037
|
+
For gate-originated artifacts (`oat_review_invocation: gate`), write the Step 6.0 resolver stamp on a line labeled `**Dispatch audit (policy view):**`, with the stamp in one backtick pair so the literal `Dispatch:` token stays readable, for example ``**Dispatch audit (policy view):** `Dispatch: scope=p01 action=review role=reviewer …` ``. The resolver stamp records the project reviewer policy, and the six gate frontmatter fields record the gate's actual invocation; the label keeps both accurate. `oat gate review` checks every other reviewer audit stamp anywhere outside `## Findings`, the severity sections, and fenced code (for example in the metadata block, `## Dispatch Audit`, or `## Review Scope`), including a backtick-wrapped stamp followed only by punctuation or one parenthetical, against the frontmatter: its `target` must equal `oat_gate_target`, and its `effort_axis` must equal `selected:<oat_invocation_reasoning_effort>` when that effort is concrete. A disagreeing stamp fails the gate with `gate_dispatch_audit_mismatched`. Manual and auto reviews keep their audit line unlabeled.
|
|
1038
|
+
|
|
1037
1039
|
For all other invocations (user-triggered, fresh session), use `manual`.
|
|
1038
1040
|
|
|
1039
1041
|
Gate parsing contract:
|
|
@@ -5,7 +5,7 @@ disable-model-invocation: true
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
|
|
7
7
|
metadata:
|
|
8
|
-
version: 1.1.
|
|
8
|
+
version: 1.1.8
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Remote Review Provide (Project-Scoped GitHub PR)
|
|
@@ -408,6 +408,8 @@ oat_gate_target: <exact configured gate target; omit for lifecycle>
|
|
|
408
408
|
|
|
409
409
|
`oat_project` carries the resolved project path so machine A's `oat-project-review-receive-remote` routes findings into the right project's plan tasks. Preserve the current invocation lineage in the GitHub marker: omit `oat_gate_target` for lifecycle reviews and include the exact target for gate reviews. Verdict: `REQUEST_CHANGES` when any critical or high finding exists; `COMMENT` otherwise (including a clean, zero-findings review — never auto-`APPROVE`).
|
|
410
410
|
|
|
411
|
+
For gate reviews (`oat_review_invocation: gate`), write the resolver stamp in the posted review's dispatch audit metadata on a line labeled `**Dispatch audit (policy view):**`, with the stamp in one backtick pair so the literal `Dispatch:` token stays readable. The resolver stamp records the project reviewer policy, while `oat_gate_target` names the gate's actual invocation; the label keeps both accurate. Any other reviewer audit stamp outside `## Findings`, the severity sections, and fenced code must name `oat_gate_target` as its `target` and carry `effort_axis=selected:<effort>` for a concrete gate effort, because `oat gate review` rejects a disagreeing unlabeled stamp with `gate_dispatch_audit_mismatched`. Lifecycle reviews keep their audit line unlabeled.
|
|
412
|
+
|
|
411
413
|
### Step 8: Post the Review + Clean Up
|
|
412
414
|
|
|
413
415
|
Probe `agent-reviews` for a posting flow with a non-mutating check (`npx agent-reviews --help`), cached for the run:
|
|
@@ -102,9 +102,8 @@ Extends fenced code support and enables custom fences such as Mermaid:
|
|
|
102
102
|
```mermaid
|
|
103
103
|
flowchart LR
|
|
104
104
|
A[Read index.md] --> B[Generate nav]
|
|
105
|
-
````
|
|
106
|
-
|
|
107
105
|
```
|
|
106
|
+
````
|
|
108
107
|
|
|
109
108
|
### `pymdownx.tabbed`
|
|
110
109
|
|
|
@@ -119,4 +118,3 @@ Adds table-of-contents anchors and permalinks for headings.
|
|
|
119
118
|
- Treat `index.md` plus its `## Contents` section as the local discovery source of truth.
|
|
120
119
|
- Prefer linking to source files and commands explicitly when documenting behavior.
|
|
121
120
|
- When adding a new plugin or extension, update this guide with what it does and how to use it.
|
|
122
|
-
```
|
|
@@ -36,8 +36,10 @@ for abandoned work and `--summary "<text>"` to record the outcome. The command
|
|
|
36
36
|
performs the whole close-out atomically: it flips `status` to the terminal
|
|
37
37
|
value and bumps `updated`, appends the canonical `backlog/completed.md` entry
|
|
38
38
|
(always for `closed`; for `wont_do` only when `--summary` is given), moves the
|
|
39
|
-
item file from `backlog/items/` to `backlog/archived/`,
|
|
40
|
-
`
|
|
39
|
+
item file from `backlog/items/` to `backlog/archived/`, rewrites inbound
|
|
40
|
+
`.oat/repo` links and path references to the moved file (reporting each
|
|
41
|
+
rewritten file), and regenerates `backlog/index.md`. Stage the resulting
|
|
42
|
+
changes with the shipping commit/PR.
|
|
41
43
|
|
|
42
44
|
**Manual fallback.** These are the steps the command automates — follow them, in
|
|
43
45
|
order, only when closing out by hand:
|
|
@@ -46,7 +48,9 @@ order, only when closing out by hand:
|
|
|
46
48
|
2. Append a summary entry to `backlog/completed.md` (newest first; entry format
|
|
47
49
|
is documented at the top of that file). Add the entry for a `wont_do` item
|
|
48
50
|
only when the abandonment itself is worth recording (an explicit summary).
|
|
49
|
-
3. `git mv` the item file from `backlog/items/` to `backlog/archived
|
|
51
|
+
3. `git mv` the item file from `backlog/items/` to `backlog/archived/`, then
|
|
52
|
+
rewrite inbound `.oat/repo` links to `archived/` (plans, decision records,
|
|
53
|
+
other items, and repository-root paths such as `oat_external_plan_sources`).
|
|
50
54
|
4. Run `oat backlog regenerate-index` and stage the regenerated
|
|
51
55
|
`backlog/index.md`.
|
|
52
56
|
5. If the completion changes the operating picture, refresh
|
|
@@ -50,8 +50,8 @@ oat_workflow_origin: native # native | imported
|
|
|
50
50
|
# max_attempts: 2
|
|
51
51
|
# attempts_completed: 0
|
|
52
52
|
# reviewed_head: null
|
|
53
|
-
# implementation_base_ref: null # exact logical base ref for effective-delta
|
|
54
|
-
# implementation_fingerprint: null # new generations use sha256:effective-delta-
|
|
53
|
+
# implementation_base_ref: null # exact logical base ref for the qualified effective-delta fingerprint
|
|
54
|
+
# implementation_fingerprint: null # new generations use sha256:effective-delta-v2:<digest>; stored v1 values keep v1 semantics
|
|
55
55
|
# freshness_head: null # rolling accepted tree checkpoint
|
|
56
56
|
# freshness_fingerprint: null # full effective delta at freshness_head
|
|
57
57
|
# launch_state: not_started # not_started | intent_persisted | accepted | result_persisted | not_accepted
|
|
@@ -36,10 +36,12 @@ export interface ResolveCanonicalRoleInput {
|
|
|
36
36
|
projectCanonicalRoot: string;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* `
|
|
42
|
-
*
|
|
39
|
+
* Resolve canonical role identity before a native launch. Its production
|
|
40
|
+
* caller is `oat project dispatch canonical-role`
|
|
41
|
+
* (`commands/project/dispatch/canonical-role.ts`), which prints the evidence
|
|
42
|
+
* as a `canonical-role-resolution` event for `oat project dispatch record` to
|
|
43
|
+
* validate, so skill-side callers never hand-assemble redacted paths or a
|
|
44
|
+
* content digest.
|
|
43
45
|
*/
|
|
44
46
|
export declare function resolveCanonicalRole(input: ResolveCanonicalRoleInput): CanonicalRoleEvidence;
|
|
45
47
|
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/agents/canonical/resolve.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAC/B,kBAAkB,GAClB,yBAAyB,CAAC;AAC9B,MAAM,MAAM,6BAA6B,GACrC,SAAS,GACT,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,6BAA6B,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,uBAAuB,CAAC;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;CAC3C,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;IAC1C,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,CAAC;AAEN,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAgLD
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/agents/canonical/resolve.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAC/B,kBAAkB,GAClB,yBAAyB,CAAC;AAC9B,MAAM,MAAM,6BAA6B,GACrC,SAAS,GACT,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,6BAA6B,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,uBAAuB,CAAC;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;CAC3C,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,SAAS,aAAa,EAAE,CAAC;IAC1C,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,CAAC;AAEN,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAgLD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,qBAAqB,CA0DvB"}
|
|
@@ -138,10 +138,12 @@ function resolveRoleIdentity(resolved, candidate, input, candidateMisses) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* `
|
|
144
|
-
*
|
|
141
|
+
* Resolve canonical role identity before a native launch. Its production
|
|
142
|
+
* caller is `oat project dispatch canonical-role`
|
|
143
|
+
* (`commands/project/dispatch/canonical-role.ts`), which prints the evidence
|
|
144
|
+
* as a `canonical-role-resolution` event for `oat project dispatch record` to
|
|
145
|
+
* validate, so skill-side callers never hand-assemble redacted paths or a
|
|
146
|
+
* content digest.
|
|
145
147
|
*/
|
|
146
148
|
export function resolveCanonicalRole(input) {
|
|
147
149
|
const loadedRoot = resolve(input.skillDir, '..', '..');
|
|
@@ -7,6 +7,12 @@ export interface ArchiveBacklogItemResult {
|
|
|
7
7
|
completedEntry: 'written' | 'scaffolded' | 'skipped';
|
|
8
8
|
movedTo: string | null;
|
|
9
9
|
indexRegenerated: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Markdown files under `.oat/repo/**` whose references to
|
|
12
|
+
* `items/<id>.md` were rewritten to `archived/<id>.md`, relative to the
|
|
13
|
+
* repository root.
|
|
14
|
+
*/
|
|
15
|
+
rewrittenReferences: string[];
|
|
10
16
|
warnings: string[];
|
|
11
17
|
}
|
|
12
18
|
export interface ArchiveBacklogItemOptions {
|
|
@@ -26,8 +32,10 @@ export declare class BacklogArchiveError extends Error {
|
|
|
26
32
|
/**
|
|
27
33
|
* Atomic backlog close-out. Validates the current status, sets the terminal
|
|
28
34
|
* status and `updated`, records a canonical `completed.md` entry, moves the
|
|
29
|
-
* item file into `archived/`,
|
|
30
|
-
* item is already
|
|
35
|
+
* item file into `archived/`, rewrites inbound `.oat/repo` references to the
|
|
36
|
+
* moved file, and regenerates the index. Idempotent when the item is already
|
|
37
|
+
* archived: that path writes no status, completed-log, or move changes and only
|
|
38
|
+
* retries the reference rewrite and index regeneration.
|
|
31
39
|
*/
|
|
32
40
|
export declare function archiveBacklogItem(backlogRoot: string, id: string, options?: ArchiveBacklogItemOptions): Promise<ArchiveBacklogItemResult>;
|
|
33
41
|
//# sourceMappingURL=archive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/archive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/archive.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,sBAAsB,CAAC;AAmB9B,mDAAmD;AACnD,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,GAAG,CAAK,EAI/C;CACF;AAkID;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,wBAAwB,CAAC,CA4InC"}
|
|
@@ -5,6 +5,7 @@ import { promisify } from 'node:util';
|
|
|
5
5
|
import { getFrontmatterBlock } from '../shared/frontmatter.js';
|
|
6
6
|
import YAML from 'yaml';
|
|
7
7
|
import { regenerateBacklogIndex } from './regenerate-index.js';
|
|
8
|
+
import { rewriteInboundReferences } from './rewrite-references.js';
|
|
8
9
|
import { BACKLOG_ITEM_STATUSES, extractBacklogStatus, isValidBacklogStatus, } from './shared/item-status.js';
|
|
9
10
|
const execFileAsync = promisify(execFile);
|
|
10
11
|
const COMPLETED_HEADING = '## Completed Items';
|
|
@@ -133,14 +134,17 @@ async function moveItemFile(backlogRoot, fromPath, toPath, warnings) {
|
|
|
133
134
|
/**
|
|
134
135
|
* Atomic backlog close-out. Validates the current status, sets the terminal
|
|
135
136
|
* status and `updated`, records a canonical `completed.md` entry, moves the
|
|
136
|
-
* item file into `archived/`,
|
|
137
|
-
* item is already
|
|
137
|
+
* item file into `archived/`, rewrites inbound `.oat/repo` references to the
|
|
138
|
+
* moved file, and regenerates the index. Idempotent when the item is already
|
|
139
|
+
* archived: that path writes no status, completed-log, or move changes and only
|
|
140
|
+
* retries the reference rewrite and index regeneration.
|
|
138
141
|
*/
|
|
139
142
|
export async function archiveBacklogItem(backlogRoot, id, options = {}) {
|
|
140
143
|
const itemsPath = join(backlogRoot, 'items', `${id}.md`);
|
|
141
144
|
const archivedPath = join(backlogRoot, 'archived', `${id}.md`);
|
|
142
145
|
const warnings = [];
|
|
143
|
-
//
|
|
146
|
+
// Already archived: no status, completed-log, or move writes; only the
|
|
147
|
+
// idempotent reference rewrite and index regeneration are retried.
|
|
144
148
|
if (await pathExists(archivedPath)) {
|
|
145
149
|
// Conflicting duplicate: the same id lives in BOTH `items/` and
|
|
146
150
|
// `archived/`. Treating this as a clean no-op would silently leave the live
|
|
@@ -157,14 +161,22 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
|
|
|
157
161
|
catch {
|
|
158
162
|
status = null;
|
|
159
163
|
}
|
|
160
|
-
warnings.push(`Backlog item ${id} is already archived at ${archivedPath};
|
|
164
|
+
warnings.push(`Backlog item ${id} is already archived at ${archivedPath}; re-checked inbound references and regenerated the index.`);
|
|
165
|
+
// Retry the idempotent tail of a close-out: a run that failed during the
|
|
166
|
+
// reference rewrite (or an item archived before the rewrite existed)
|
|
167
|
+
// still gets its inbound links repointed and the index regenerated.
|
|
168
|
+
const references = await rewriteInboundReferences(backlogRoot, itemsPath, archivedPath, { rebaseMovedItem: false });
|
|
169
|
+
warnings.push(...references.warnings);
|
|
170
|
+
const regeneration = await regenerateBacklogIndex(backlogRoot);
|
|
171
|
+
warnings.push(...regeneration.warnings);
|
|
161
172
|
return {
|
|
162
173
|
id,
|
|
163
174
|
result: 'noop',
|
|
164
175
|
status,
|
|
165
176
|
completedEntry: 'skipped',
|
|
166
177
|
movedTo: archivedPath,
|
|
167
|
-
indexRegenerated:
|
|
178
|
+
indexRegenerated: true,
|
|
179
|
+
rewrittenReferences: references.rewritten,
|
|
168
180
|
warnings,
|
|
169
181
|
};
|
|
170
182
|
}
|
|
@@ -214,7 +226,10 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
|
|
|
214
226
|
}
|
|
215
227
|
// 6. Move items/<id>.md -> archived/<id>.md (git mv with rename fallback).
|
|
216
228
|
await moveItemFile(backlogRoot, itemsPath, archivedPath, warnings);
|
|
217
|
-
// 7.
|
|
229
|
+
// 7. Rewrite inbound references so no `.oat/repo` link dangles at items/.
|
|
230
|
+
const references = await rewriteInboundReferences(backlogRoot, itemsPath, archivedPath);
|
|
231
|
+
warnings.push(...references.warnings);
|
|
232
|
+
// 8. Regenerate the index via the exported core.
|
|
218
233
|
const regeneration = await regenerateBacklogIndex(backlogRoot);
|
|
219
234
|
warnings.push(...regeneration.warnings);
|
|
220
235
|
return {
|
|
@@ -224,6 +239,7 @@ export async function archiveBacklogItem(backlogRoot, id, options = {}) {
|
|
|
224
239
|
completedEntry,
|
|
225
240
|
movedTo: archivedPath,
|
|
226
241
|
indexRegenerated: true,
|
|
242
|
+
rewrittenReferences: references.rewritten,
|
|
227
243
|
warnings,
|
|
228
244
|
};
|
|
229
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAuB,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AA8B5D,UAAU,0BAA0B;IAClC,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;IAChD,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AA4ED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAuB,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AA8B5D,UAAU,0BAA0B;IAClC,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;IAChD,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AA4ED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,CA6RT"}
|
|
@@ -179,7 +179,7 @@ export function createBacklogCommand(overrides = {}) {
|
|
|
179
179
|
});
|
|
180
180
|
cmd
|
|
181
181
|
.command('archive')
|
|
182
|
-
.description('Close out a backlog item: set a terminal status, record it in completed.md, move it to archived/, and regenerate the index')
|
|
182
|
+
.description('Close out a backlog item: set a terminal status, record it in completed.md, move it to archived/, rewrite inbound .oat/repo references to it, and regenerate the index')
|
|
183
183
|
.argument('<id>', 'Backlog item id (`BL-YYMMDD-slug`)')
|
|
184
184
|
.option('--wont-do', 'Close the item as `wont_do` instead of `closed`')
|
|
185
185
|
.option('--summary <text>', 'One-line outcome summary for completed.md')
|
|
@@ -206,6 +206,10 @@ export function createBacklogCommand(overrides = {}) {
|
|
|
206
206
|
else {
|
|
207
207
|
context.logger.success(`Archived ${id} as ${result.status} (moved to ${result.movedTo}).`);
|
|
208
208
|
}
|
|
209
|
+
// Both results can rewrite: a retry on an archived item re-runs it.
|
|
210
|
+
for (const path of result.rewrittenReferences) {
|
|
211
|
+
context.logger.info(`Rewrote references in ${path}`);
|
|
212
|
+
}
|
|
209
213
|
}
|
|
210
214
|
process.exitCode = 0;
|
|
211
215
|
}
|