@open-agent-toolkit/cli 0.1.63 → 0.1.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/assets/agents/oat-phase-implementer.md +9 -1
  2. package/assets/agents/oat-reviewer.md +8 -1
  3. package/assets/docs/cli-utilities/backlog-lifecycle.md +2 -2
  4. package/assets/docs/cli-utilities/config-and-local-state.md +20 -6
  5. package/assets/docs/cli-utilities/tool-packs.md +1 -0
  6. package/assets/docs/cli-utilities/workflow-gates.md +3 -1
  7. package/assets/docs/contributing/code.md +18 -0
  8. package/assets/docs/contributing/skills.md +22 -0
  9. package/assets/docs/workflows/projects/artifacts.md +30 -0
  10. package/assets/docs/workflows/projects/dispatch-ceiling.md +13 -0
  11. package/assets/public-package-versions.json +4 -4
  12. package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +17 -72
  13. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +165 -165
  14. package/assets/skills/oat-project-document/SKILL.md +8 -1
  15. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +165 -165
  16. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +165 -165
  17. package/assets/skills/oat-project-plan-writing/SKILL.md +48 -12
  18. package/assets/skills/oat-project-pr-final/SKILL.md +9 -1
  19. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +165 -165
  20. package/assets/skills/oat-project-quick-start/SKILL.md +8 -1
  21. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +165 -165
  22. package/assets/skills/oat-project-review-provide/SKILL.md +9 -1
  23. package/assets/skills/oat-project-review-receive/SKILL.md +9 -1
  24. package/assets/skills/oat-project-summary/SKILL.md +16 -4
  25. package/assets/templates/plan.md +2 -0
  26. package/dist/commands/backlog/archive.d.ts.map +1 -1
  27. package/dist/commands/backlog/archive.js +5 -5
  28. package/dist/commands/backlog/index.d.ts +4 -0
  29. package/dist/commands/backlog/index.d.ts.map +1 -1
  30. package/dist/commands/backlog/index.js +55 -0
  31. package/dist/commands/backlog/new.d.ts +27 -0
  32. package/dist/commands/backlog/new.d.ts.map +1 -0
  33. package/dist/commands/backlog/new.js +158 -0
  34. package/dist/commands/backlog/regenerate-index.d.ts.map +1 -1
  35. package/dist/commands/backlog/regenerate-index.js +42 -3
  36. package/dist/commands/decision/index.d.ts.map +1 -1
  37. package/dist/commands/decision/index.js +4 -0
  38. package/dist/commands/decision/new.d.ts +2 -0
  39. package/dist/commands/decision/new.d.ts.map +1 -1
  40. package/dist/commands/decision/new.js +4 -2
  41. package/dist/commands/doctor/index.d.ts +1 -0
  42. package/dist/commands/doctor/index.d.ts.map +1 -1
  43. package/dist/commands/doctor/index.js +3 -0
  44. package/dist/commands/doctor/stale-invocations.d.ts +3 -0
  45. package/dist/commands/doctor/stale-invocations.d.ts.map +1 -0
  46. package/dist/commands/doctor/stale-invocations.js +173 -0
  47. package/dist/commands/gate/index.d.ts +1 -0
  48. package/dist/commands/gate/index.d.ts.map +1 -1
  49. package/dist/commands/gate/index.js +9 -2
  50. package/dist/commands/project/new/scaffold.d.ts.map +1 -1
  51. package/dist/commands/project/new/scaffold.js +24 -9
  52. package/dist/commands/tools/update/index.d.ts.map +1 -1
  53. package/dist/commands/tools/update/index.js +22 -12
  54. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-phase-implementer
3
- version: 1.0.7
3
+ version: 1.0.8
4
4
  description: Implements one plan phase end-to-end, commits each task separately, self-checks between tasks, and handles bounded review fixes when resumed by oat-project-implement.
5
5
  tools: Read, Write, Edit, Bash, Grep, Glob, Task
6
6
  color: cyan
@@ -90,6 +90,14 @@ Read each required artifact once at phase start:
90
90
  Extract all phase tasks, dependency order, file boundaries, verification
91
91
  commands, commit messages, and phase-wide verification before editing.
92
92
 
93
+ ## Artifact Hygiene
94
+
95
+ Artifact hygiene contract: Before finishing or committing, format every file you created or edited. Use the concrete write/fix formatting command supplied by the governing plan, task, or brief. If none is usable, discover the repository's documented write/fix command from applicable `AGENTS.md`/`CLAUDE.md` instructions and relevant package manifests; do not infer or hardcode a formatter. Prefer a file-scoped invocation when supported, and avoid rewriting unrelated files. If no command is discoverable, warn once with `no format command discovered in repo instructions; skipping`, then continue.
96
+
97
+ After formatting, run the repository's applicable gate set over the produced
98
+ diff, explicitly including artifact writes. This supplements rather than
99
+ replaces every task and phase verification command below.
100
+
93
101
  ## Mode: Implement
94
102
 
95
103
  ### 1. Verify Phase Base
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-reviewer
3
- version: 1.1.6
3
+ version: 1.1.7
4
4
  description: Unified reviewer for OAT projects - mode-aware verification of requirements/design alignment and code quality. Writes a review artifact to disk by default, or returns structured findings in-memory when dispatched in structured-output mode.
5
5
  tools: Read, Bash, Grep, Glob, Write
6
6
  color: yellow
@@ -84,6 +84,13 @@ Use workflow mode to determine required evidence:
84
84
  Do not mark missing optional artifacts as findings.
85
85
  If required artifacts for the mode are unexpectedly missing, record a workflow contract gap.
86
86
 
87
+ ## Artifact Hygiene
88
+
89
+ Artifact hygiene contract: Before finishing or committing, format every file you created or edited. Use the concrete write/fix formatting command supplied by the governing plan, task, or brief. If none is usable, discover the repository's documented write/fix command from applicable `AGENTS.md`/`CLAUDE.md` instructions and relevant package manifests; do not infer or hardcode a formatter. Prefer a file-scoped invocation when supported, and avoid rewriting unrelated files. If no command is discoverable, warn once with `no format command discovered in repo instructions; skipping`, then continue.
90
+
91
+ After formatting, run only repository checks relevant to the files changed;
92
+ writing a prose artifact does not imply unrelated full test suites.
93
+
87
94
  ## Process
88
95
 
89
96
  ### Step 1: Load Artifacts
@@ -42,11 +42,11 @@ oat backlog archive BL-260705-example --wont-do --summary "superseded by BL-2607
42
42
  A single `oat backlog archive` run performs the whole close-out so its parts cannot drift apart:
43
43
 
44
44
  1. Sets the terminal `status` (`closed` by default, `wont_do` with `--wont-do`) and stamps `updated`.
45
- 2. Appends a canonical newest-first entry to `completed.md`. `closed` items always get an entry (with a visible `TODO: summarize outcome` placeholder when `--summary` is omitted, so the gap stays visible); `wont_do` items get one only when you pass `--summary`.
45
+ 2. Validates and trims a nonblank `--summary` before mutating a `closed` item, then appends its canonical newest-first `completed.md` entry. `wont_do` items may omit the summary and get an entry only when one is provided.
46
46
  3. Moves `items/<id>.md` into `archived/` — with `git mv` inside a work tree, or a plain rename outside git.
47
47
  4. Regenerates the managed backlog index.
48
48
 
49
- The command is safe to re-run: an item already in `archived/` produces a no-op warning with no writes. An out-of-enum current status (for example a hand-set `done`) is a hard error that names the file, lists the valid statuses, and tells you how to recover. See the [command reference](config-and-local-state.md#oat-backlog-archive) for exit codes and the `--json` payload.
49
+ The command is safe to re-run: an item already in `archived/` produces a no-op warning with no writes. A missing closed-item summary or an out-of-enum current status (for example a hand-set `done`) is a hard error before mutation and includes recovery guidance. See the [command reference](config-and-local-state.md#oat-backlog-archive) for exit codes and the `--json` payload.
50
50
 
51
51
  ## Catching lifecycle drift
52
52
 
@@ -14,6 +14,7 @@ Use these commands when you need operational support around the toolkit rather t
14
14
  Use the `oat backlog` group when you want direct CLI support for the file-backed backlog under `.oat/repo/pjm/backlog/`.
15
15
 
16
16
  - `oat backlog init` - scaffold `.oat/repo/pjm/backlog/` with starter files and directories for a fresh repo
17
+ - `oat backlog new <title>` - validate and create a file-backed backlog item from the canonical template, then regenerate the managed index
17
18
  - `oat backlog generate-id <title>` - generate a deterministic `BL-YYMMDD-slug` backlog ID from a title
18
19
  - `oat backlog generate-id <title> --created-at <timestamp>` - generate a reproducible ID for a known creation timestamp
19
20
  - `oat backlog archive <id>` - atomic close-out: set a terminal status, record the completion in `completed.md`, move the item into `archived/`, and regenerate the index in one step
@@ -21,10 +22,18 @@ Use the `oat backlog` group when you want direct CLI support for the file-backed
21
22
 
22
23
  Backlog IDs are deterministic date+slug identifiers (`BL-YYMMDD-slug`) derived from the creation date and title, so two machines or worktrees produce the same ID for the same record without scanning the local checkout. The slug is capped at 30 characters at the last whole-word boundary (with trailing stop-words trimmed), so prefer concise, meaningful titles. Index regeneration is deterministic and safe to re-run when resolving an index merge conflict.
23
24
 
24
- Run `oat backlog init` first when the local backlog scaffold does not exist yet in a fresh repo. This command group is primarily used by the `oat-pjm-*` project-management skills, but it is also available directly when you need to inspect or repair backlog metadata by hand.
25
+ Run `oat backlog init` directly when you need to create or repair only the backlog scaffold. `oat backlog new` initializes a missing scaffold automatically after validating its inputs. This command group is primarily used by the `oat-pjm-*` project-management skills, but it is also available directly when you need to inspect or repair backlog metadata by hand.
25
26
 
26
27
  For the end-to-end states an item moves through — and how `oat backlog archive` and `oat pjm doctor` keep the backlog honest — see [Backlog Lifecycle](backlog-lifecycle.md).
27
28
 
29
+ ### `oat backlog new`
30
+
31
+ `oat backlog new <title> [--priority <priority>] [--scope <scope>] [--scope-estimate <size>] [--labels <labels>] [--description <text>] [--backlog-root <path>]` creates one active item and refreshes the managed backlog index.
32
+
33
+ Defaults are `priority: medium` and `scope: task`. Valid priorities are `urgent`, `high`, `medium`, `low`, and `none`; valid scopes are `idea`, `task`, `feature`, and `initiative`; scope estimates accept `XS`, `S`, `M`, `L`, `XL`, or `XXL`. Pass labels as a comma-delimited list.
34
+
35
+ The command validates all inputs before creating the scaffold or writing an item. It uses the repo-local canonical backlog template when available, falls back to the CLI's bundled template, writes structured YAML frontmatter, and rejects an ID collision in either `items/` or `archived/` without overwriting the existing record. If managed-index regeneration fails after the item write, OAT removes only the new item and restores the prior index.
36
+
28
37
  ### `oat backlog archive`
29
38
 
30
39
  `oat backlog archive <id> [--wont-do] [--summary <text>] [--json] [--backlog-root <path>]` performs the full close-out for a backlog item so status flip, completed-log entry, file move, and index regeneration never drift apart.
@@ -33,22 +42,23 @@ For the end-to-end states an item moves through — and how `oat backlog archive
33
42
 
34
43
  - `<id>` (required) - the backlog item id (`BL-YYMMDD-slug`); the item file must live under `items/`.
35
44
  - `--wont-do` - close the item as `wont_do` instead of the default terminal status `closed`.
36
- - `--summary <text>` - one-line outcome summary recorded in `completed.md`.
45
+ - `--summary <text>` - one-line outcome summary recorded in `completed.md`; required and nonblank for the default `closed` path.
37
46
  - `--backlog-root <path>` - override the backlog root (defaults to `.oat/repo/pjm/backlog`).
38
47
  - `--json` - emit the machine-readable result payload instead of human log lines.
39
48
 
40
49
  **Behavior:**
41
50
 
42
51
  - Validates the item's current `status` against the enum (`open | in_progress | closed | wont_do`); an out-of-enum value such as `done` is a hard error with a fix hint. Archiving is legal from any valid status — a `closed` item still in `items/` just gets its move finished.
52
+ - For the default `closed` path, validates and trims a nonblank `--summary` before any file or index mutation. The `wont_do` path may omit the summary and completion-ledger entry.
43
53
  - Rewrites only the `status:` and `updated:` frontmatter lines (preserving any inline enum comment), then moves the item from `items/` to `archived/` with `git mv` inside a work tree, falling back to a plain rename (with a warning) outside git or if `git mv` fails.
44
- - `closed` archives always append a canonical newest-first `completed.md` entry (`YYYY-MM-DD — <id> — Title — summary`); when `--summary` is omitted the entry carries a visible `TODO: summarize outcome` placeholder. `wont_do` archives append an entry only when `--summary` is provided. A missing `completed.md` is scaffolded from the starter template; a missing `## Completed Items` heading is scaffolded with a warning.
54
+ - `closed` archives append a canonical newest-first `completed.md` entry (`YYYY-MM-DD — <id> — Title — summary`). `wont_do` archives append an entry only when `--summary` is provided. A missing `completed.md` is scaffolded from the starter template; a missing `## Completed Items` heading is scaffolded with a warning.
45
55
  - Regenerates the managed backlog index after the move.
46
56
  - Idempotent: re-running on an item already in `archived/` is a no-op warning with no writes.
47
57
 
48
58
  **Exit codes:**
49
59
 
50
60
  - `0` - item archived, or already-archived no-op.
51
- - `1` - actionable error: unknown id (no file under `items/`) or an out-of-enum current status. The message names the file path, the valid statuses, and the fix.
61
+ - `1` - actionable error: unknown id, out-of-enum current status, duplicate active/archived ID, or a missing closed-item summary. The message includes the recovery action.
52
62
  - `2` - reserved for unexpected system/runtime failures.
53
63
 
54
64
  **JSON payload (`--json`):**
@@ -76,10 +86,12 @@ For full project-management repo-reference setup, use [`oat pjm init`](tool-pack
76
86
  Use the `oat decision` group for file-per-record decisions under `.oat/repo/reference/decisions/`. Each decision is its own file with a deterministic `DR-YYMMDD-slug` ID (the slug is capped at 30 characters at the last whole-word boundary, with trailing stop-words trimmed), and the human-facing index is a committed generated view.
77
87
 
78
88
  - `oat decision init` - scaffold `.oat/repo/reference/decisions/` and the managed decision index
79
- - `oat decision new <title>` - create a new decision record; supports `--status`, `--context`, and `--created-at`
89
+ - `oat decision new <title>` - create a new decision record; supports `--status`, `--context`, `--decision`, `--consequences`, and `--created-at`
80
90
  - `oat decision regenerate-index` - rebuild the managed decision index table from record frontmatter
81
91
  - `oat decision migrate` - convert a legacy single `decision-record.md` into file-per-record decisions, preserving each old `ADR-NNN`/`DR-NNN` ID as `legacy_id`; applies by default, so pass `--dry-run` to preview the legacy-to-new mappings without writing, and `--delete-legacy` to remove the source file after a verified migration (unlike `oat pjm migrate`, which defaults to dry-run)
82
92
 
93
+ Pass `--context`, `--decision`, and `--consequences` together when creating a resolved decision so every substantive template section is complete in the same atomic creation step. Callers that omit them retain the template's placeholder content for later editing.
94
+
83
95
  The decision index uses managed marker pairs and is deterministic, so an index merge conflict can be resolved by re-running `oat decision regenerate-index` and staging the result. Decision records replace the legacy single `decision-record.md`; repos still on the old layout migrate with `oat decision migrate` (or the broader `oat pjm migrate`).
84
96
 
85
97
  ## `oat local ...`
@@ -239,4 +251,6 @@ For the full state model, repair semantics, and examples, see [Instruction Sync]
239
251
  - `oat internal validate-oat-skills` - validate `oat-*` skill contracts and metadata
240
252
  - `oat doctor` - run environment and setup diagnostics, including installed-vs-bundled skill version checks
241
253
 
242
- `oat doctor` is the quickest way to confirm that your runtime, directory structure, and installed OAT assets are healthy before deeper debugging. The `/oat-doctor` skill (installed via the core pack) provides richer diagnostics with check and summary modes, including config explanations sourced from bundled documentation.
254
+ `oat doctor` is the quickest way to confirm that your runtime, directory structure, and installed OAT assets are healthy before deeper debugging. At project scope it also scans bounded repository script and documentation surfaces for known-stale CLI grammar, such as `oat --scope all sync`, and reports file/line evidence plus the current `oat sync --scope all` form. Generated provider views, OAT lifecycle artifacts, archived content, dependencies, build output, and nested worktrees are excluded.
255
+
256
+ The `/oat-doctor` skill (installed via the core pack) provides richer diagnostics with check and summary modes, including config explanations sourced from bundled documentation.
@@ -171,6 +171,7 @@ Purpose:
171
171
  Key behavior:
172
172
 
173
173
  - Accepts a tool name, `--pack <pack>`, or `--all` (mutually exclusive)
174
+ - With no target, exits without mutation and suggests the explicit bulk command `oat tools update --all`; invalid packs and conflicting targets keep their own targeted diagnostics
174
175
  - Compares installed versions against bundled versions and copies updated assets
175
176
  - For `--pack <pack>` and `--all`, an already-installed pack is reconciled to include newly added bundled skills or agents in that same scope
176
177
  - Pack-targeted updates intentionally rewrite bundled template and script companions in place, even when the pack's installed skills are already current
@@ -451,7 +451,9 @@ By default the dispatcher:
451
451
  5. Applies `--avoid same-family`.
452
452
  6. Checks candidate availability in descending priority order, with target id as
453
453
  the tie-breaker.
454
- 7. Runs the chosen `baseCommand` with the selected model and prompt appended.
454
+ 7. Runs the chosen `baseCommand` with the selected model and prompt appended. The
455
+ prompt is carried in argv, stdin is closed, and stdout/stderr remain captured
456
+ for diagnostics and liveness tracking.
455
457
  8. Exits with the child process status.
456
458
 
457
459
  Use `--target <id>` to pin one target and skip detection/avoidance:
@@ -96,6 +96,24 @@ not the steady-state path.
96
96
  - Make verification explicit in commit-adjacent notes or review artifacts.
97
97
  - If docs behavior changes, update the docs surface in the same change window.
98
98
 
99
+ ### Breaking CLI grammar changes
100
+
101
+ When a command, option name, or option placement changes, make the migration visible to both reviewers and release-note readers:
102
+
103
+ - Use a `BREAKING:` PR title or prominent callout so generated release notes retain the warning.
104
+ - Include the old and new copy-pasteable commands.
105
+ - State the migration action for scripts, docs, and automation that use the old grammar.
106
+
107
+ For example:
108
+
109
+ **Breaking change title/callout:** `BREAKING: move scope after the sync command`
110
+
111
+ **Before:** `oat --scope all sync` <!-- oat-doctor: allow-stale-invocation -->
112
+
113
+ **After:** `oat sync --scope all`
114
+
115
+ **Migration action:** Update repository scripts and documentation, then run `oat doctor --scope project` to find known-stale invocations.
116
+
99
117
  ## Related Guides
100
118
 
101
119
  - [Contributing Docs](documentation.md)
@@ -56,6 +56,28 @@ Skill behavior is defined by frontmatter plus the process contract in each `SKIL
56
56
  - Keep `AGENTS.md` skills table synchronized with `.agents/skills`.
57
57
  - Require explicit user approval for destructive or state-advancing transitions.
58
58
 
59
+ ### Artifact-writing hygiene
60
+
61
+ Every role or skill that creates or edits tracked output must include the
62
+ artifact hygiene contract at its writing boundary. The writer uses a concrete
63
+ write/fix formatting command supplied by its plan, task, or brief. If none is
64
+ usable, it discovers the repository's documented command from applicable
65
+ `AGENTS.md` / `CLAUDE.md` instructions and relevant package manifests.
66
+
67
+ Contracts must distinguish write/fix commands from check-only commands, prefer
68
+ a file-scoped invocation when supported, avoid unrelated whole-tree rewrites,
69
+ and never infer or hardcode a formatter. If no command can be discovered, the
70
+ writer warns once with
71
+ `no format command discovered in repo instructions; skipping` and continues.
72
+ Run only verification relevant to the changed files unless the role's
73
+ definition of done requires broader gates.
74
+
75
+ For planned implementation, plan-producing skills resolve this command once and
76
+ place it in every artifact-writing task. Runtime discovery remains the fallback
77
+ for direct lifecycle writers and incomplete or stale plans. When the same
78
+ contract crosses dispatch boundaries, keep each copy self-contained and protect
79
+ equivalence with contract tests.
80
+
59
81
  ## Recommended Starting Points
60
82
 
61
83
  - Use `create-oat-skill` when the new skill belongs to an OAT lifecycle or maintenance flow.
@@ -57,6 +57,36 @@ Manual and auto review artifacts do not require the gate-only fields.
57
57
 
58
58
  Artifacts are the project system of record; automation and routing should derive from these files, not memory.
59
59
 
60
+ ### Formatting and verification hygiene
61
+
62
+ Tracked artifacts are part of the repository diff, so artifact writers format
63
+ them before finishing or committing. During plan authoring, OAT resolves the
64
+ repository's documented write/fix command from applicable `AGENTS.md` /
65
+ `CLAUDE.md` instructions and relevant package manifests. Each task that writes
66
+ an artifact receives a concrete invocation, scoped to that task's files when
67
+ the command supports paths.
68
+
69
+ Downstream implementers execute that supplied command without repeating
70
+ discovery. Roles and lifecycle skills that write outside a planned task,
71
+ including reviewers and documentation, summary, PR, and quick-start flows, use
72
+ the same discovery procedure as a fallback. Gate-originated review prompts also
73
+ carry the contract so review artifacts follow the same rule across runtimes.
74
+
75
+ Writers must:
76
+
77
+ - prefer a documented write/fix command over a check-only command;
78
+ - avoid inferring or hardcoding a formatter;
79
+ - scope the write to created or edited files when supported;
80
+ - avoid whole-tree rewrites that could absorb unrelated changes; and
81
+ - warn once with
82
+ `no format command discovered in repo instructions; skipping` when no command
83
+ is discoverable, then continue.
84
+
85
+ Formatting supplements the applicable verification contract. Phase
86
+ implementation runs repository gates over its produced diff, including
87
+ artifact writes. Prose-only lifecycle work runs only checks relevant to the
88
+ files it changed.
89
+
60
90
  ## Coordination parents
61
91
 
62
92
  Project splitting introduces a coordination-only parent artifact. It records shared context and child relationships, but it is not an executable lifecycle project.
@@ -64,6 +64,19 @@ existing cells. Planning shows the complete recommendation before asking which
64
64
  scope should own it. If the resulting ladder is still missing or incomplete,
65
65
  planning remains blocked rather than replacing the user's explicit values.
66
66
 
67
+ Before offering adoption, planning runs `oat config list --json` once and treats
68
+ its output as the effective boundary across shared, repo-local, user, and
69
+ bundled-default precedence. A complete effective ladder skips adoption even
70
+ when the current project has not selected a policy or named ceiling. Adoption
71
+ is offered only when the resolved provider/tier cells are actually missing,
72
+ empty, malformed, or incomplete.
73
+
74
+ Ladder completeness and project-ceiling selection are separate checks. In
75
+ particular, `oat project dispatch-ceiling resolve` returning `matrix: null` can
76
+ mean that the project policy or ceiling is unresolved; it does not prove that
77
+ the effective reusable ladders are absent. When ladders are complete, planning
78
+ proceeds directly to the project-specific policy choice.
79
+
67
80
  The ownership boundary is deliberate:
68
81
 
69
82
  | Source | Config location | Codex materialization output |
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.63",
3
- "docs-config": "0.1.63",
4
- "docs-theme": "0.1.63",
5
- "docs-transforms": "0.1.63"
2
+ "cli": "0.1.65",
3
+ "docs-config": "0.1.65",
4
+ "docs-theme": "0.1.65",
5
+ "docs-transforms": "0.1.65"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-pjm-add-backlog-item
3
- version: 1.3.0
3
+ version: 1.3.1
4
4
  description: Use when the user requests or confirms adding a new repo backlog item — e.g. "add a backlog item for X", "capture that as backlog", "track that follow-up", "file a backlog ticket", or confirms a previously offered backlog capture. Do NOT auto-invoke when a follow-up is mentioned. Creates the item file in the file-per-item backlog structure, regenerates the index, and prompts for curated overview updates.
5
5
  disable-model-invocation: false
6
6
  user-invocable: true
@@ -29,8 +29,8 @@ When executing this skill, provide lightweight progress feedback so the user can
29
29
 
30
30
  - Before multi-step work, print short step indicators, e.g.:
31
31
  - `[1/4] Resolving item details…`
32
- - `[2/4] Generating ID + populating template…`
33
- - `[3/4] Regenerating backlog index…`
32
+ - `[2/4] Creating the item + managed index atomically…`
33
+ - `[3/4] Enriching acceptance criteria…`
34
34
  - `[4/4] Updating curated overview guidance…`
35
35
 
36
36
  ## Process
@@ -47,85 +47,30 @@ Collect the item details from the user or surrounding context:
47
47
  If the title is missing, ask the user.
48
48
  If the description is missing, ask for 1-3 sentences of context.
49
49
 
50
- ### Step 2: Ensure Backlog Scaffold
50
+ Propose an initial scope estimate (`XS`, `S`, `M`, `L`, `XL`, or `XXL`) from the described work, then ask the user to confirm or adjust it before creation.
51
51
 
52
- Before generating IDs or editing backlog files, run:
52
+ ### Step 2: Create the Backlog Item Atomically
53
53
 
54
- ```bash
55
- oat backlog init
56
- ```
57
-
58
- This command is idempotent. Use it even in existing repos so the canonical backlog scaffold and exact managed index markers are present before `oat backlog regenerate-index` runs.
59
-
60
- Do not hand-create the managed marker block in `backlog/index.md`. The scaffold writes the exact markers required by the CLI:
61
-
62
- ```md
63
- <!-- OAT BACKLOG-INDEX -->
64
- <!-- END OAT BACKLOG-INDEX -->
65
- ```
66
-
67
- ### Step 3: Generate ID
68
-
69
- Run:
70
-
71
- ```bash
72
- oat backlog generate-id "{title}"
73
- ```
74
-
75
- The CLI returns a deterministic `BL-YYMMDD-slug` value derived from the creation date and the title. It performs no scan, hash, counter, or random allocation.
76
-
77
- If the command reports a same-day same-slug filename collision against an existing `items/<id>.md` or `archived/<id>.md`, do not overwrite the existing record. Disambiguate by using a more specific title and re-running `oat backlog generate-id`.
78
-
79
- ### Step 4: Prepare Output Path
80
-
81
- Set the output path using the returned ID so the filename stem equals the ID:
54
+ Run the single creation command with the confirmed values:
82
55
 
83
56
  ```bash
84
- ITEM_PATH=".oat/repo/pjm/backlog/items/{id}.md"
57
+ oat backlog new "{title}" --priority "<priority>" --scope "<scope>" --scope-estimate "<confirmed-scope-estimate>" --labels "<comma-delimited-labels>" --description "<description>"
85
58
  ```
86
59
 
87
- ### Step 5: Copy Template and Fill Frontmatter
88
-
89
- 1. Use `.oat/templates/backlog-item.md` as the source template.
90
- 2. Fill:
91
- - `id`
92
- - `title`
93
- - `created`
94
- - `updated`
95
- - `status` (default `open`)
96
- - `priority` (default `medium` unless the user says otherwise)
97
- - `scope` (default `task` unless the user says otherwise)
98
- - `labels`
99
- - `assignee`
100
- - `associated_issues`
101
- - `external_plans` (initialize to `[]`; `oat-repo-improve` owns later reverse-link additions)
102
- 3. Keep `external_plans` as a YAML string array of repo-relative paths under `.oat/repo/reference/external-plans/`. Do not pre-populate it from discussion or anticipated work.
103
- 4. The agent should propose an initial `scope_estimate` based on the described work, then ask the user to confirm or adjust it.
104
- 5. Write the item body with:
105
- - `## Description`
106
- - `## Acceptance Criteria`
107
-
108
- ### Step 6: Write the Backlog Item
109
-
110
- Write the completed file to the path resolved in Step 4:
60
+ The command validates all inputs, initializes the scaffold when needed, generates and collision-checks the `BL-YYMMDD-slug` ID, renders the canonical template, writes the item, and regenerates the managed index. If it reports a collision, do not overwrite the existing active or archived record; use a more specific title and rerun the same command.
111
61
 
112
- ```bash
113
- .oat/repo/pjm/backlog/items/{id}.md
114
- ```
115
-
116
- Use the template field order from `.oat/templates/backlog-item.md`.
62
+ Use the item path and ID reported by the command. Do not hand-author frontmatter or edit the managed index block. The command initializes `external_plans: []`; `oat-repo-improve` owns later reverse-link additions.
117
63
 
118
- ### Step 7: Regenerate Managed Index
64
+ ### Step 3: Enrich Acceptance Criteria
119
65
 
120
- Run:
66
+ Read the created item and replace only the placeholder bullets under `## Acceptance Criteria` with the acceptance criteria confirmed in Step 1. Preserve the command-generated frontmatter and description. This post-create enrichment is safe because Acceptance Criteria are not index-visible fields.
121
67
 
122
- ```bash
123
- oat backlog regenerate-index
124
- ```
68
+ The item must retain both required body sections:
125
69
 
126
- This refreshes the managed table inside `.oat/repo/pjm/backlog/index.md`.
70
+ - `## Description`
71
+ - `## Acceptance Criteria`
127
72
 
128
- ### Step 8: Update Curated Overview
73
+ ### Step 4: Update Curated Overview
129
74
 
130
75
  Read `.oat/repo/pjm/backlog/index.md` and update the `## Curated Overview` section with a brief human-written note when helpful, for example:
131
76
 
@@ -135,7 +80,7 @@ Read `.oat/repo/pjm/backlog/index.md` and update the `## Curated Overview` secti
135
80
 
136
81
  Do not edit inside the managed marker section.
137
82
 
138
- ### Step 9: Summarize to the User
83
+ ### Step 5: Summarize to the User
139
84
 
140
85
  Report:
141
86
 
@@ -151,5 +96,5 @@ Report:
151
96
  - Item includes populated frontmatter and both required body sections
152
97
  - Item initializes `external_plans: []` for future reverse links
153
98
  - `scope_estimate` was proposed and confirmed
154
- - `oat backlog regenerate-index` ran successfully
99
+ - `oat backlog new` created the item and regenerated the managed index successfully
155
100
  - `.oat/repo/pjm/backlog/index.md` remains valid, with managed section untouched except by regeneration