@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.
Files changed (147) hide show
  1. package/README.md +3 -3
  2. package/assets/agents/oat-codebase-mapper.md +3 -2
  3. package/assets/agents/oat-reviewer.md +5 -13
  4. package/assets/agents/skeptical-evaluator.md +6 -2
  5. package/assets/bundle-metadata.json +1 -1
  6. package/assets/docs/cli-utilities/backlog-lifecycle.md +3 -2
  7. package/assets/docs/cli-utilities/bootstrap.md +5 -2
  8. package/assets/docs/cli-utilities/config-and-local-state.md +13 -6
  9. package/assets/docs/cli-utilities/configuration.md +25 -10
  10. package/assets/docs/cli-utilities/tool-packs.md +60 -10
  11. package/assets/docs/cli-utilities/workflow-gates.md +37 -0
  12. package/assets/docs/contributing/code.md +9 -5
  13. package/assets/docs/provider-sync/commands.md +17 -8
  14. package/assets/docs/provider-sync/instruction-sync.md +241 -39
  15. package/assets/docs/provider-sync/providers.md +20 -0
  16. package/assets/docs/provider-sync/scope-and-surface.md +3 -1
  17. package/assets/docs/reference/cli-reference.md +4 -1
  18. package/assets/docs/reference/oat-directory-structure.md +12 -11
  19. package/assets/docs/reference/troubleshooting.md +19 -4
  20. package/assets/docs/workflows/projects/evidence-layers.md +5 -1
  21. package/assets/docs/workflows/projects/implementation-execution.md +22 -8
  22. package/assets/docs/workflows/projects/lifecycle.md +4 -6
  23. package/assets/docs/workflows/projects/retro.md +7 -0
  24. package/assets/public-package-versions.json +4 -4
  25. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +4 -4
  26. package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +5 -5
  27. package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +14 -11
  28. package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +2 -2
  29. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +4 -3
  30. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +17 -6
  31. package/assets/skills/oat-agent-instructions-apply/SKILL.md +3 -3
  32. package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +14 -11
  33. package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
  34. package/assets/skills/oat-dispatch-subagents/references/managed-claude-example.json +387 -0
  35. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +75 -0
  36. package/assets/skills/oat-doctor/SKILL.md +17 -13
  37. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
  38. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
  39. package/assets/skills/oat-project-implement/SKILL.md +2 -2
  40. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +33 -11
  41. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -22
  42. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
  43. package/assets/skills/oat-project-implement/references/phase-execution.md +109 -8
  44. package/assets/skills/oat-project-lite/SKILL.md +23 -1
  45. package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +1 -1
  46. package/assets/skills/oat-project-next/SKILL.md +3 -3
  47. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
  48. package/assets/skills/oat-project-progress/SKILL.md +2 -2
  49. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
  50. package/assets/skills/oat-project-retro/SKILL.md +70 -6
  51. package/assets/skills/oat-project-review-provide/SKILL.md +3 -1
  52. package/assets/skills/oat-project-review-provide-remote/SKILL.md +3 -1
  53. package/assets/templates/docs-app-mkdocs/docs/contributing.md +1 -3
  54. package/assets/templates/pjm-agents.md +7 -3
  55. package/assets/templates/state.md +2 -2
  56. package/dist/agents/canonical/resolve.d.ts +6 -4
  57. package/dist/agents/canonical/resolve.d.ts.map +1 -1
  58. package/dist/agents/canonical/resolve.js +6 -4
  59. package/dist/commands/backlog/archive.d.ts +10 -2
  60. package/dist/commands/backlog/archive.d.ts.map +1 -1
  61. package/dist/commands/backlog/archive.js +22 -6
  62. package/dist/commands/backlog/index.d.ts.map +1 -1
  63. package/dist/commands/backlog/index.js +5 -1
  64. package/dist/commands/backlog/rewrite-references.d.ts +41 -0
  65. package/dist/commands/backlog/rewrite-references.d.ts.map +1 -0
  66. package/dist/commands/backlog/rewrite-references.js +516 -0
  67. package/dist/commands/config/index.d.ts +1 -0
  68. package/dist/commands/config/index.d.ts.map +1 -1
  69. package/dist/commands/config/index.js +69 -34
  70. package/dist/commands/gate/index.d.ts.map +1 -1
  71. package/dist/commands/gate/index.js +51 -2
  72. package/dist/commands/gate/review-verdict.d.ts +22 -0
  73. package/dist/commands/gate/review-verdict.d.ts.map +1 -1
  74. package/dist/commands/gate/review-verdict.js +111 -0
  75. package/dist/commands/init/index.d.ts +6 -0
  76. package/dist/commands/init/index.d.ts.map +1 -1
  77. package/dist/commands/init/index.js +27 -4
  78. package/dist/commands/init/tools/index.d.ts +18 -1
  79. package/dist/commands/init/tools/index.d.ts.map +1 -1
  80. package/dist/commands/init/tools/index.js +84 -17
  81. package/dist/commands/init/tools/project-guidance.d.ts +19 -4
  82. package/dist/commands/init/tools/project-guidance.d.ts.map +1 -1
  83. package/dist/commands/init/tools/project-guidance.js +58 -15
  84. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
  85. package/dist/commands/init/tools/workflows/index.js +5 -1
  86. package/dist/commands/instructions/instructions.types.d.ts +105 -4
  87. package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
  88. package/dist/commands/instructions/instructions.types.js +4 -5
  89. package/dist/commands/instructions/instructions.utils.d.ts +161 -6
  90. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
  91. package/dist/commands/instructions/instructions.utils.js +650 -12
  92. package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
  93. package/dist/commands/instructions/sync/sync.js +256 -18
  94. package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
  95. package/dist/commands/instructions/validate/validate.js +36 -8
  96. package/dist/commands/pjm/index.d.ts.map +1 -1
  97. package/dist/commands/pjm/index.js +19 -4
  98. package/dist/commands/pjm/init.d.ts +3 -0
  99. package/dist/commands/pjm/init.d.ts.map +1 -1
  100. package/dist/commands/pjm/init.js +23 -5
  101. package/dist/commands/project/dispatch/canonical-role.d.ts +33 -0
  102. package/dist/commands/project/dispatch/canonical-role.d.ts.map +1 -0
  103. package/dist/commands/project/dispatch/canonical-role.js +114 -0
  104. package/dist/commands/project/dispatch/index.d.ts.map +1 -1
  105. package/dist/commands/project/dispatch/index.js +3 -1
  106. package/dist/commands/project/dispatch/record.d.ts.map +1 -1
  107. package/dist/commands/project/dispatch/record.js +146 -4
  108. package/dist/commands/shared/agents-md.d.ts +26 -5
  109. package/dist/commands/shared/agents-md.d.ts.map +1 -1
  110. package/dist/commands/shared/agents-md.js +182 -3
  111. package/dist/commands/sync/apply.d.ts.map +1 -1
  112. package/dist/commands/sync/apply.js +28 -21
  113. package/dist/commands/tools/guidance/index.d.ts +15 -0
  114. package/dist/commands/tools/guidance/index.d.ts.map +1 -0
  115. package/dist/commands/tools/guidance/index.js +81 -0
  116. package/dist/commands/tools/index.d.ts.map +1 -1
  117. package/dist/commands/tools/index.js +2 -0
  118. package/dist/commands/tools/shared/sync-evidence.d.ts.map +1 -1
  119. package/dist/commands/tools/shared/sync-evidence.js +32 -5
  120. package/dist/config/oat-config.d.ts +57 -3
  121. package/dist/config/oat-config.d.ts.map +1 -1
  122. package/dist/config/oat-config.js +223 -15
  123. package/dist/config/resolve.d.ts.map +1 -1
  124. package/dist/config/resolve.js +12 -2
  125. package/dist/engine/compute-plan.d.ts.map +1 -1
  126. package/dist/engine/compute-plan.js +31 -3
  127. package/dist/providers/claude/dispatch-envelope.d.ts +53 -0
  128. package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
  129. package/dist/providers/claude/dispatch-envelope.js +324 -48
  130. package/dist/providers/claude/rule-transform.js +1 -1
  131. package/dist/providers/copilot/rule-transform.js +1 -1
  132. package/dist/providers/cursor/rule-transform.js +1 -1
  133. package/dist/providers/identity/absolute-paths.d.ts +13 -0
  134. package/dist/providers/identity/absolute-paths.d.ts.map +1 -1
  135. package/dist/providers/identity/absolute-paths.js +27 -14
  136. package/dist/providers/identity/generic-dispatch-record.d.ts +212 -0
  137. package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -1
  138. package/dist/providers/identity/generic-dispatch-record.js +78 -19
  139. package/dist/providers/identity/oat-dispatch-record.d.ts +5 -0
  140. package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -1
  141. package/dist/providers/identity/oat-dispatch-record.js +11 -2
  142. package/dist/providers/shared/registry.d.ts +6 -0
  143. package/dist/providers/shared/registry.d.ts.map +1 -1
  144. package/dist/providers/shared/registry.js +30 -0
  145. package/dist/rules/canonical/parse.d.ts.map +1 -1
  146. package/dist/rules/canonical/parse.js +38 -3
  147. package/package.json +2 -2
@@ -47,8 +47,9 @@ flowchart LR
47
47
 
48
48
  P --> Report["Phase report\nverification + commits"]
49
49
  Report --> Root
50
- Root --> R["Independent phase reviewer"]
51
- R -->|pass| Book["Bookkeeping + next phase"]
50
+ Root --> Ledger["Commit task ledger\npre-review bookkeeping"]
51
+ Ledger --> R["Independent phase reviewer"]
52
+ R -->|pass| Book["Review-outcome bookkeeping\n+ next phase"]
52
53
  R -->|blocking findings| Fix["Resume phase implementer\nbounded fix scope"]
53
54
  Fix --> R2["Fresh root-owned review round"]
54
55
  ```
@@ -241,7 +242,14 @@ already part of the next phase's base.
241
242
 
242
243
  The root sends the reviewer a fresh scope containing the authoritative phase
243
244
  commit range, task IDs and boundaries, project artifacts, and verification
244
- evidence. The review passes with zero Critical and zero High findings.
245
+ evidence. The root commits the phase's task ledger — task rows, the resume
246
+ pointer, and any settled recovery marker — before it dispatches the reviewer,
247
+ so the reviewed head is never stale by construction. Review-outcome
248
+ bookkeeping — the Reviews row and its disposition, the Orchestration Run, and
249
+ the deferred project-log entries — is out of scope at the reviewed head: the
250
+ root writes it after the review returns. In a parallel group the phase worktree
251
+ does not carry the root ledger, so the reviewer brief names the task ledger out
252
+ of scope as well. The review passes with zero Critical and zero High findings.
245
253
  Medium and Low findings are recorded without blocking the phase.
246
254
 
247
255
  ## Final Exit-Gate Boundary
@@ -278,14 +286,20 @@ contradictory, or ambiguous correlation fails closed. A valid accepted run or
278
286
  completed receive is never duplicated.
279
287
 
280
288
  Freshness is bound to the reviewed HEAD and a versioned implementation
281
- fingerprint. New generations use an `effective-delta-v1` fingerprint over
289
+ fingerprint. New generations use an `effective-delta-v2` fingerprint over
282
290
  Git's canonical NUL-delimited raw tree delta. The generation persists the
283
291
  logical PR/default-branch base ref, requires one merge base, and hashes full
284
292
  base and final modes and object IDs with rename detection disabled. This makes
285
293
  same-file base changes visible while excluding commit history and human diff
286
294
  context. Every effective-delta path is included except the exact project
287
- `state.md` file that carries the digest and would otherwise be self-referential;
288
- that structured state is validated independently.
295
+ `state.md` file that carries the digest and would otherwise be self-referential
296
+ (that structured state is validated independently) and everything under
297
+ `.oat/projects/` and `.oat/repo/`: project artifacts and repository records
298
+ such as reviews, summaries, backlog items, and decisions never make the exit
299
+ gate stale. `.oat/templates/`, `.oat/scripts/`, `.oat/config*.json`, and
300
+ `.oat/sync/` stay fingerprinted. A stored `effective-delta-v1` value keeps its
301
+ original meaning (only the `state.md` carrier excluded) and is never
302
+ reinterpreted; the next generation after it goes stale uses v2.
289
303
 
290
304
  Recognized closeout-only descendants preserve a valid result: gate artifacts
291
305
  and receipts, project tracking and project-log appends,
@@ -301,8 +315,8 @@ A merge, rebase, or base update preserves the result only when its full
301
315
  effective delta matches that rolling checkpoint. Conflict resolution or
302
316
  branch-owned implementation, test, skill, template, or workflow changes that
303
317
  alter the delta make the result stale, require a current final lifecycle review,
304
- and start a new gate generation. No implementation or closeout output path is
305
- excluded from the comparison. Legacy unqualified fingerprints retain the older
318
+ and start a new gate generation. Beyond the version's own exclusion set, no
319
+ implementation or closeout output path is excluded from the comparison. Legacy unqualified fingerprints retain the older
306
320
  fail-closed descendant-path behavior and are not migrated in place.
307
321
 
308
322
  This narrow merge-only exemption relies on fresh repository CI, automated
@@ -158,13 +158,11 @@ filesystem operation. Deleting or archiving the old scaffold does not make the
158
158
  roadmap stop promising its work, so completion checks the claim against the
159
159
  prose that still makes it.
160
160
 
161
- When a quick project consolidates earlier scaffolds, quick-start records
161
+ When a quick or lite project consolidates earlier scaffolds, the workflow that
162
+ scaffolds it (`oat-project-quick-start` or `oat-project-lite`) records
162
163
  `absorbed_projects` and `absorbed_backlog_ids` in that project's `state.md`
163
- frontmatter. Those two fields are the only inputs the sweep takes.
164
-
165
- Recording them is a quick-mode step today. A lite project that consolidates
166
- earlier scaffolds records nothing, so the sweep finds no inputs and degrades to
167
- its recorded note rather than checking that project's surfaces.
164
+ frontmatter, with the same field shapes in both modes. Those two fields are the
165
+ only inputs the sweep takes.
168
166
 
169
167
  Inside the project-log completion gate — after the log status probe and before
170
168
  the roll-up and seal — completion searches the active planning surfaces for each
@@ -84,6 +84,13 @@ Per-item statuses and frontmatter rollups make interrupted and repeated runs
84
84
  resumable. The promotions rollup covers RP apply-items; the filing rollup covers
85
85
  UP items plus RP file-items.
86
86
 
87
+ Every run ends with a final report walkthrough that links the artifact and
88
+ explains each `RP-*` and `UP-*` item (ID, title, summary, why it matters,
89
+ current disposition and destination, and next action), grouped into apply,
90
+ repository filing, and upstream filing items, or states that no items were
91
+ proposed. It appears in interactive and non-interactive runs, whatever happened
92
+ to apply and filing.
93
+
87
94
  ### Project-log receipt
88
95
 
89
96
  When a project log exists, generate mode appends this one-line structural
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.3.7",
3
- "docs-config": "0.3.7",
4
- "docs-theme": "0.3.7",
5
- "docs-transforms": "0.3.7"
2
+ "cli": "0.3.9",
3
+ "docs-config": "0.3.9",
4
+ "docs-theme": "0.3.9",
5
+ "docs-transforms": "0.3.9"
6
6
  }
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion, Task
7
7
  metadata:
8
- version: 1.12.2
8
+ version: 1.12.4
9
9
  ---
10
10
 
11
11
  # Agent Instructions Analysis
@@ -259,7 +259,7 @@ documentation inventory from Step 2 to:
259
259
  **Provider-specific validation:**
260
260
 
261
261
  - **AGENTS.md**: Check section structure, command accuracy, size budget.
262
- - **CLAUDE.md**: Verify `@AGENTS.md` import if present, check for content duplication with AGENTS.md.
262
+ - **CLAUDE.md**: Read the shim strategy with `oat config get instructions.claude.shims`. Under a shim strategy (`pointer`, `symlink`, or `copy`), verify the `@AGENTS.md` import if present and check for content duplication with AGENTS.md. Under `none` (the default), Claude Code reads AGENTS.md itself through its built-in `agents-md` plugin, which stands down while a `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` exists on the session's path: a root file affects the whole project, a nested file affects sessions started in its directory or below; record each such file as a High finding whose fix is to remove it or to configure a shim strategy and run `oat instructions sync`. Take the authoritative list from `oat instructions validate --json` `.warnings[]` (code `claude_md_hides_agents_md`), which covers the whole repository including `CLAUDE.local.md` (exact-case names only); the discovery script also lists `CLAUDE.local.md` under the claude provider. When a warning's `linkedBy` is non-empty, that file holds the only copy of the instructions behind those AGENTS.md links: the fix is to replace each linking AGENTS.md with the file's content first and only then remove the file; never recommend plain removal for it. When `.warnings[]` also holds a `claude_md_blocks_shim_removal` item, removal under `none` is all or nothing and is blocked: report its `paths` (the files with content of their own) as the High finding, whose fix is to move each file's content into an AGENTS.md or remove it (for a file its `linkedBy` maps to AGENTS.md links, replace each linking AGENTS.md with the file's content first) and then rerun `oat instructions sync`; list its `wouldRemove` as the CLAUDE.md files that sync then removes. Those files get no `claude_md_hides_agents_md` warning of their own while the block holds, so read them from the block item rather than reporting them as missing.
263
263
  - **Claude rules** (`.claude/rules/*.md`): Validate `paths` frontmatter if conditional.
264
264
  - **Cursor rules** (`.cursor/rules/*.mdc`): Validate frontmatter fields (`alwaysApply`, `globs`, `description`).
265
265
  - **Copilot instructions** (`.github/instructions/*.instructions.md`): Validate `applyTo` frontmatter.
@@ -306,7 +306,7 @@ These checks are mandatory even when the missing file does not appear in the dis
306
306
 
307
307
  Provider baseline examples:
308
308
 
309
- - **Claude**: if a directory has `AGENTS.md` and the claude provider is active but the matching `CLAUDE.md` shim is missing, record an explicit recommendation to create `CLAUDE.md` with the canonical `@AGENTS.md` import. This applies to **every** directory with an `AGENTS.md` — root and nested alike (e.g., `packages/cli/AGENTS.md` → `packages/cli/CLAUDE.md`).
309
+ - **Claude**: only when a shim strategy is configured (`instructions.claude.shims` is `pointer`, `symlink`, or `copy`): if a directory has `AGENTS.md` and the claude provider is active but the matching `CLAUDE.md` shim is missing, record an explicit recommendation to create `CLAUDE.md` with the canonical `@AGENTS.md` import. This applies to **every** directory with an `AGENTS.md` — root and nested alike (e.g., `packages/cli/AGENTS.md` → `packages/cli/CLAUDE.md`). Under `none`, the default, recommend no `CLAUDE.md`: Claude Code loads AGENTS.md natively, and a shim in some directories but not others makes it ignore the AGENTS.md files that lack one.
310
310
  - **Copilot**: if the copilot provider is active but `.github/copilot-instructions.md` is missing, record an explicit recommendation to create the minimal Copilot shim.
311
311
  - **agents_md / codex**: no extra always-on shim beyond `AGENTS.md`.
312
312
 
@@ -314,7 +314,7 @@ Do not leave these as implied apply-time behavior. They must appear in the analy
314
314
 
315
315
  **Chained recommendations for new AGENTS.md files:**
316
316
 
317
- When a coverage-gap recommendation proposes creating a **new** `AGENTS.md` in a subdirectory, also emit the corresponding provider-baseline recommendations for that directory in the same artifact. For example, if the analysis recommends creating `packages/cli/AGENTS.md` and the claude provider is active, it must also recommend creating `packages/cli/CLAUDE.md` with `@AGENTS.md`. Do not defer these to a follow-up analysis — they belong in the same artifact so `oat-agent-instructions-apply` can generate both files in one pass.
317
+ When a coverage-gap recommendation proposes creating a **new** `AGENTS.md` in a subdirectory, also emit the corresponding provider-baseline recommendations for that directory in the same artifact. For example, if the analysis recommends creating `packages/cli/AGENTS.md`, the claude provider is active, and a shim strategy is configured, it must also recommend creating `packages/cli/CLAUDE.md` with `@AGENTS.md`. Do not defer these to a follow-up analysis — they belong in the same artifact so `oat-agent-instructions-apply` can generate both files in one pass.
318
318
 
319
319
  **In delta mode:** Only assess directories that contain files changed since the last tracked commit. Skip unchanged directories.
320
320
 
@@ -119,11 +119,11 @@ None | {numbered list}
119
119
 
120
120
  Missing always-on provider compatibility files that should exist even when no corresponding file was discovered during inventory.
121
121
 
122
- | # | Provider | Required Path | Format | Reason | Evidence | Severity |
123
- | --- | --------- | --------------------------------- | ------------------ | -------------------------------------------------- | ------------ | ------------- |
124
- | 1 | `claude` | `CLAUDE.md` | Claude import shim | {claude active + AGENTS.md present + shim missing} | {exact refs} | {High/Medium} |
125
- | 2 | `copilot` | `.github/copilot-instructions.md` | Copilot shim | {copilot active + shim missing} | {exact refs} | {High/Medium} |
126
- | ... | | | | | | |
122
+ | # | Provider | Required Path | Format | Reason | Evidence | Severity |
123
+ | --- | --------- | --------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------- |
124
+ | 1 | `claude` | `CLAUDE.md` | Claude import shim | {claude active + shim strategy configured (`instructions.claude.shims` is not `none`) + AGENTS.md present + shim missing} | {exact refs} | {High/Medium} |
125
+ | 2 | `copilot` | `.github/copilot-instructions.md` | Copilot shim | {copilot active + shim missing} | {exact refs} | {High/Medium} |
126
+ | ... | | | | | | |
127
127
 
128
128
  {Or: "No provider baseline gaps identified."}
129
129
 
@@ -125,13 +125,16 @@ User-level rules go in `~/.claude/rules/` and apply to all projects (lower prior
125
125
 
126
126
  ### 2.6 AGENTS.md Support
127
127
 
128
- **AGENTS.md is NOT natively supported by Claude Code** (GitHub issue #6235 has 2,700+ upvotes, still open). The recommended workaround is a one-line `CLAUDE.md`:
128
+ Source: `anthropics/claude-code` `mods/agents-md` README, as of v2.1.278.
129
129
 
130
- ```markdown
131
- @AGENTS.md
132
- ```
130
+ **Claude Code reads AGENTS.md natively** through its built-in `agents-md` plugin. Its `instructionFiles` option defaults to `claude-md-or-agents-md`; the other values are `claude-md`, `claude-md-and-agents-md`, and `managed-only`.
131
+
132
+ - **Default mode stands down on any CLAUDE.md.** In `claude-md-or-agents-md`, the plugin loads no AGENTS.md for the session when any `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` exists in the working directory or any directory above it up to the project root; the engine then loads only CLAUDE.md files. A root `CLAUDE.md` or a personal `CLAUDE.local.md` therefore hides every AGENTS.md, and shims in some directories but not others hide every AGENTS.md without one.
133
+ - **`claude-md-and-agents-md`** loads both; an AGENTS.md that a CLAUDE.md already imports or links is not loaded twice.
134
+ - **Only user or managed settings can set the option** (`~/.claude/settings.json`, `--settings`, or managed settings); a project's `.claude/settings.json` cannot.
135
+ - **Nested gaps:** nested AGENTS.md files attach on a text `Read` only (not on `@`-mentions, IDE selections, or notebook, image, or PDF reads), and `--add-dir` directories contribute no AGENTS.md.
133
136
 
134
- This leverages @-import. Alternative: symlink `ln -s AGENTS.md CLAUDE.md`.
137
+ The one-line `CLAUDE.md` shim (`@AGENTS.md`, or `ln -s AGENTS.md CLAUDE.md`) is now **opt-in**: use it for Claude Code releases before the plugin, for users who set `instructionFiles` to `claude-md`, or when the nested gaps above matter, and then keep a shim beside every AGENTS.md. In OAT this is `instructions.claude.shims` (`none` by default; `pointer`, `symlink`, or `copy` to opt in), applied by `oat instructions sync`; see the OAT docs page `provider-sync/instruction-sync.md` (§ Claude Code and AGENTS.md).
135
138
 
136
139
  ### 2.7 Skills vs CLAUDE.md vs Rules
137
140
 
@@ -411,12 +414,12 @@ All three providers support file-pattern-based activation — this is the unifyi
411
414
 
412
415
  ### 5.4 AGENTS.md Support
413
416
 
414
- | Provider | Native support | Nested | Import mechanism |
415
- | ----------- | -------------------------------- | ---------------------- | -------------------- |
416
- | Claude Code | **No** (use `@AGENTS.md` import) | N/A | `@path` in CLAUDE.md |
417
- | Cursor | **Yes** (first-class) | Yes (hierarchical) | N/A — read directly |
418
- | Copilot | **Yes** (`**/AGENTS.md`) | Yes (nearest wins) | N/A — read directly |
419
- | Codex | **Yes** (primary format) | Yes (override pattern) | N/A — native |
417
+ | Provider | Native support | Nested | Import mechanism |
418
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------- |
419
+ | Claude Code | **Yes** (built-in `agents-md` plugin; stands down while any CLAUDE.md, `.claude/CLAUDE.md`, or `CLAUDE.local.md` is on the path to the working directory) | Yes (attached on a text `Read`) | Opt-in `@AGENTS.md` shim in CLAUDE.md |
420
+ | Cursor | **Yes** (first-class) | Yes (hierarchical) | N/A — read directly |
421
+ | Copilot | **Yes** (`**/AGENTS.md`) | Yes (nearest wins) | N/A — read directly |
422
+ | Codex | **Yes** (primary format) | Yes (override pattern) | N/A — native |
420
423
 
421
424
  ---
422
425
 
@@ -27,7 +27,7 @@ Per-file evaluation criteria for agent instruction files. Use this checklist to
27
27
 
28
28
  ### 4. Size Within Budget
29
29
 
30
- - [ ] Root files (AGENTS.md, CLAUDE.md): <300 lines (hard max 500)
30
+ - [ ] Root files (AGENTS.md, and CLAUDE.md when a shim strategy is configured): <300 lines (hard max 500)
31
31
  - [ ] Scoped/package files: 40–150 lines
32
32
  - [ ] Individual rules files: <80 lines
33
33
  - [ ] Always-on baseline load is estimated and kept comfortably below the task budget
@@ -44,7 +44,7 @@ Per-file evaluation criteria for agent instruction files. Use this checklist to
44
44
 
45
45
  ### 6. Precedence Clear
46
46
 
47
- - [ ] Override semantics are explicit (nearest-wins for AGENTS.md, import directives for CLAUDE.md)
47
+ - [ ] Override semantics are explicit (nearest-wins for AGENTS.md, import directives for CLAUDE.md when a shim strategy is configured)
48
48
  - [ ] No ambiguous or conflicting instructions across scope levels
49
49
  - **Severity if failing:** Medium
50
50
 
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # File patterns per provider:
12
12
  # agents_md → **/AGENTS.md
13
- # claude → **/CLAUDE.md, .claude/rules/*.md
13
+ # claude → **/CLAUDE.md, **/CLAUDE.local.md, .claude/rules/*.md
14
14
  # cursor → .cursor/rules/*.mdc, .cursor/rules/*.md
15
15
  # copilot → .github/copilot-instructions.md, .github/instructions/*.instructions.md
16
16
  # cline → .cline/rules/*
@@ -58,8 +58,9 @@ discover_agents_md() {
58
58
  }
59
59
 
60
60
  discover_claude() {
61
- # CLAUDE.md files
62
- find_exclude -name 'CLAUDE.md' | while read -r f; do
61
+ # CLAUDE.md and personal CLAUDE.local.md files (either one makes Claude
62
+ # Code's default agents-md mode ignore AGENTS.md)
63
+ find_exclude -name 'CLAUDE.md' -o -name 'CLAUDE.local.md' | while read -r f; do
63
64
  local rel="${f#"$REPO_ROOT"/}"
64
65
  printf 'claude\t%s\n' "$rel"
65
66
  done
@@ -78,11 +78,21 @@ resolve_from_sync_config() {
78
78
  }
79
79
 
80
80
  resolve_from_auto_detect() {
81
- # Scan for provider directories
82
- [[ -d "${REPO_ROOT}/.claude" || -f "${REPO_ROOT}/CLAUDE.md" ]] && providers+=("claude")
83
- [[ -d "${REPO_ROOT}/.cursor" ]] && providers+=("cursor")
84
- [[ -d "${REPO_ROOT}/.github/instructions" || -f "${REPO_ROOT}/.github/copilot-instructions.md" ]] && providers+=("copilot")
85
- [[ -d "${REPO_ROOT}/.cline" ]] && providers+=("cline")
81
+ # Scan for provider directories. Each test is an `if` block so a false test
82
+ # never becomes the function's exit status under `set -e`.
83
+ if [[ -d "${REPO_ROOT}/.claude" || -f "${REPO_ROOT}/CLAUDE.md" ]]; then
84
+ providers+=("claude")
85
+ fi
86
+ if [[ -d "${REPO_ROOT}/.cursor" ]]; then
87
+ providers+=("cursor")
88
+ fi
89
+ if [[ -d "${REPO_ROOT}/.github/instructions" || -f "${REPO_ROOT}/.github/copilot-instructions.md" ]]; then
90
+ providers+=("copilot")
91
+ fi
92
+ if [[ -d "${REPO_ROOT}/.cline" ]]; then
93
+ providers+=("cline")
94
+ fi
95
+ return 0
86
96
  }
87
97
 
88
98
  interactive_confirm() {
@@ -103,7 +113,8 @@ interactive_confirm() {
103
113
  echo "" >&2
104
114
  echo "Available providers: claude, cursor, copilot, cline, codex" >&2
105
115
  echo -n "Add any additional providers? (comma-separated, or Enter to skip): " >&2
106
- read -r additional
116
+ # EOF (for example Ctrl-D) means no additional providers, not failure.
117
+ read -r additional || additional=""
107
118
 
108
119
  if [[ -n "$additional" ]]; then
109
120
  IFS=',' read -ra items <<< "$additional"
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Edit, Bash(git:*), Bash(gh:*), Glob, Grep, AskUserQuestion
7
7
  metadata:
8
- version: 1.7.2
8
+ version: 1.7.3
9
9
  ---
10
10
 
11
11
  # Agent Instructions Apply
@@ -204,7 +204,7 @@ recommendation so plan review and generation stay aligned to the same pack file.
204
204
  **For provider baseline gaps (always-on provider files):**
205
205
 
206
206
  - Treat them as first-class recommendations from the artifact, not as implied apply-time behavior
207
- - Examples include missing Claude `CLAUDE.md` import shims and missing `.github/copilot-instructions.md` shims
207
+ - Examples include missing Claude `CLAUDE.md` import shims (recommended only when `instructions.claude.shims` is a shim strategy: `pointer`, `symlink`, or `copy`) and missing `.github/copilot-instructions.md` shims
208
208
  - Carry forward the artifact's evidence refs, confidence, and disclosure mode into the plan
209
209
  - If the artifact marks a provider-baseline recommendation `omit`, do not include it in the apply plan
210
210
  - If the artifact marks a provider-baseline recommendation `ask_user`, include it with the evidence and require explicit user approval
@@ -240,7 +240,7 @@ recommendation so plan review and generation stay aligned to the same pack file.
240
240
  **Multi-format composition order:**
241
241
 
242
242
  1. **AGENTS.md first** — the canonical, provider-agnostic file
243
- 2. **CLAUDE.md** — if claude provider is active, ensure `@AGENTS.md` import exists
243
+ 2. **CLAUDE.md** — only if the claude provider is active and a shim strategy is configured (`oat config get instructions.claude.shims` returns `pointer`, `symlink`, or `copy`), ensure the `@AGENTS.md` import exists. Under `none`, the default, create no `CLAUDE.md`: Claude Code reads AGENTS.md itself, and a CLAUDE.md makes it ignore AGENTS.md for sessions started in that file's directory or below (project-wide for a root file)
244
244
  3. **Glob-scoped rules** — author once in canonical format at `.agents/rules/{name}.md` with YAML frontmatter (`description`, `globs`, `activation`)
245
245
  - `activation` MUST be one of `always`, `glob`, `agent-requested`, `manual` — any other value (e.g. `auto`) is rejected by `oat sync`. Use `glob` (with `globs`) for file-targeted rules; see `frontmatter/canonical-rule.md` for the full activation matrix.
246
246
  - Provider-specific rule files are generated by `oat sync --scope project`
@@ -125,13 +125,16 @@ User-level rules go in `~/.claude/rules/` and apply to all projects (lower prior
125
125
 
126
126
  ### 2.6 AGENTS.md Support
127
127
 
128
- **AGENTS.md is NOT natively supported by Claude Code** (GitHub issue #6235 has 2,700+ upvotes, still open). The recommended workaround is a one-line `CLAUDE.md`:
128
+ Source: `anthropics/claude-code` `mods/agents-md` README, as of v2.1.278.
129
129
 
130
- ```markdown
131
- @AGENTS.md
132
- ```
130
+ **Claude Code reads AGENTS.md natively** through its built-in `agents-md` plugin. Its `instructionFiles` option defaults to `claude-md-or-agents-md`; the other values are `claude-md`, `claude-md-and-agents-md`, and `managed-only`.
131
+
132
+ - **Default mode stands down on any CLAUDE.md.** In `claude-md-or-agents-md`, the plugin loads no AGENTS.md for the session when any `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` exists in the working directory or any directory above it up to the project root; the engine then loads only CLAUDE.md files. A root `CLAUDE.md` or a personal `CLAUDE.local.md` therefore hides every AGENTS.md, and shims in some directories but not others hide every AGENTS.md without one.
133
+ - **`claude-md-and-agents-md`** loads both; an AGENTS.md that a CLAUDE.md already imports or links is not loaded twice.
134
+ - **Only user or managed settings can set the option** (`~/.claude/settings.json`, `--settings`, or managed settings); a project's `.claude/settings.json` cannot.
135
+ - **Nested gaps:** nested AGENTS.md files attach on a text `Read` only (not on `@`-mentions, IDE selections, or notebook, image, or PDF reads), and `--add-dir` directories contribute no AGENTS.md.
133
136
 
134
- This leverages @-import. Alternative: symlink `ln -s AGENTS.md CLAUDE.md`.
137
+ The one-line `CLAUDE.md` shim (`@AGENTS.md`, or `ln -s AGENTS.md CLAUDE.md`) is now **opt-in**: use it for Claude Code releases before the plugin, for users who set `instructionFiles` to `claude-md`, or when the nested gaps above matter, and then keep a shim beside every AGENTS.md. In OAT this is `instructions.claude.shims` (`none` by default; `pointer`, `symlink`, or `copy` to opt in), applied by `oat instructions sync`; see the OAT docs page `provider-sync/instruction-sync.md` (§ Claude Code and AGENTS.md).
135
138
 
136
139
  ### 2.7 Skills vs CLAUDE.md vs Rules
137
140
 
@@ -411,12 +414,12 @@ All three providers support file-pattern-based activation — this is the unifyi
411
414
 
412
415
  ### 5.4 AGENTS.md Support
413
416
 
414
- | Provider | Native support | Nested | Import mechanism |
415
- | ----------- | -------------------------------- | ---------------------- | -------------------- |
416
- | Claude Code | **No** (use `@AGENTS.md` import) | N/A | `@path` in CLAUDE.md |
417
- | Cursor | **Yes** (first-class) | Yes (hierarchical) | N/A — read directly |
418
- | Copilot | **Yes** (`**/AGENTS.md`) | Yes (nearest wins) | N/A — read directly |
419
- | Codex | **Yes** (primary format) | Yes (override pattern) | N/A — native |
417
+ | Provider | Native support | Nested | Import mechanism |
418
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------- |
419
+ | Claude Code | **Yes** (built-in `agents-md` plugin; stands down while any CLAUDE.md, `.claude/CLAUDE.md`, or `CLAUDE.local.md` is on the path to the working directory) | Yes (attached on a text `Read`) | Opt-in `@AGENTS.md` shim in CLAUDE.md |
420
+ | Cursor | **Yes** (first-class) | Yes (hierarchical) | N/A — read directly |
421
+ | Copilot | **Yes** (`**/AGENTS.md`) | Yes (nearest wins) | N/A — read directly |
422
+ | Codex | **Yes** (primary format) | Yes (override pattern) | N/A — native |
420
423
 
421
424
  ---
422
425
 
@@ -5,7 +5,7 @@ disable-model-invocation: true
5
5
  user-invocable: false
6
6
  allowed-tools: Read
7
7
  metadata:
8
- version: 1.2.9
8
+ version: 1.2.10
9
9
  ---
10
10
 
11
11
  # Dispatching OAT Subagents