From cf9ebdde24e29b48e93c0e109cdb7e1608aa8b30 Mon Sep 17 00:00:00 2001 From: "melodic-automation-lanes[bot]" <337595936+melodic-automation-lanes[bot]@users.noreply.github.com> Date: Sat, 21 Nov 2026 21:13:28 +0000 Subject: [PATCH 1/2] Resolve issue #17911 Lane-Activity: work-resolve-issue/resolve-issue --- ...issue-issue-17911-44949329593-1-731a9f15.md | 7 +++++++ .../skills/draft-auto-mode-rules/SKILL.md | 14 ++++++++++---- .../reference/native-auto-mode-setup.md | 18 +++++++++++------- 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .changes/harness-config/work-resolve-issue-issue-17911-44949329593-1-731a9f15.md diff --git a/.changes/harness-config/work-resolve-issue-issue-17911-44949329593-1-731a9f15.md b/.changes/harness-config/work-resolve-issue-issue-17911-44949329593-1-731a9f15.md new file mode 100644 index 00000000000..b3a8610ff29 --- /dev/null +++ b/.changes/harness-config/work-resolve-issue-issue-17911-44949329593-1-731a9f15.md @@ -0,0 +1,7 @@ +--- +bump: patch +--- + +### Changed + +- `draft-auto-mode-rules` now offers the `allow` rules that `/auto-mode-setup` (Claude Code 2.1.329 and later) drafts from recent auto mode denials as input to the `allow` section. Its reference records what the command reads and writes. diff --git a/plugins/harness-config/skills/draft-auto-mode-rules/SKILL.md b/plugins/harness-config/skills/draft-auto-mode-rules/SKILL.md index e4f35068ecb..0401b6682d2 100644 --- a/plugins/harness-config/skills/draft-auto-mode-rules/SKILL.md +++ b/plugins/harness-config/skills/draft-auto-mode-rules/SKILL.md @@ -56,8 +56,12 @@ can mean either. If /auto-mode-setup is available in your session (gate basis: its row of the commands reference; records in [reference/native-auto-mode-setup.md](reference/native-auto-mode-setup.md)), you can run it instead of or alongside this skill to have the `environment` section drafted from your sessions -and saved for you; this interview then covers the allow and deny sections. If they take it, run -Phase 1 again after it saves so the draft builds on what it wrote. When the caller passes +and saved for you; this interview then covers the allow and deny sections. It can also offer `allow` +rules drawn from your recent auto mode denials (version in the records). Those rules are input to +the `allow` section here: paste the ones you accepted, or the `allow` list `claude auto-mode config` +prints, and the interview asks for each one's exclusions and transcript-visible condition instead of +drafting it from recall. If they take it, run Phase 1 again after it saves so the draft builds on +what it wrote. When the caller passes `--unattended`, the run records the offer in its output instead of asking; without that flag it asks. @@ -78,8 +82,10 @@ section to focus the interview on. `--unattended`, anywhere in the arguments, is declaring that nobody is present, which governs the `/auto-mode-setup` offer under "Routing". Take it out first, then read the rest. -There is no history input: a read of "the repo's observed prompt and denial history" names no actual -location, and an unnamed read surface in a skill shipped to consumers is unreviewable. +This skill reads no history itself: a read of "the repo's observed prompt and denial history" names +no actual location, and an unnamed read surface in a skill shipped to consumers is unreviewable. +Denial history reaches the draft only through the `allow` rules `/auto-mode-setup` saved, which the +person brings to the interview (see "Routing"). ## Phase 1: Read what already exists diff --git a/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md b/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md index 1620f0b1d34..1c91d2d21fd 100644 --- a/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md +++ b/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md @@ -7,15 +7,19 @@ any session. | Claim | Basis | As of | Recheck when | |---|---|---|---| | `/auto-mode-setup` is a built-in command, user-invocable only, hidden from the command menu, and gated; its description is "Teach auto mode about your environment, plus optional rule tweaks" | The `/harness-ops:inventory` extraction of the installed 2.1.284 binary (`model_invocable: false`, `user_invocable: true`, `hidden: true`, `gated: true`) | 2026-09-29, Claude Code 2.1.284 | A release renames or removes the command, or changes its invocability or hidden flag | -| We treat it as the writer of `autoMode.environment` entries, saved after the person reviews them, and this skill as the reader; what it drafts and where it saves are read from its row | Pointer: when routing, fetch the `/auto-mode-setup` row of [commands: all commands](https://code.claude.com/docs/en/commands#all-commands) live | 2026-10-11 | The commands page row changes what it drafts or where it saves | +| We treat it as the writer of `autoMode.environment` entries, and sometimes rule entries, saved after the person reviews them, and this skill as the reader; what it drafts and where it saves are read from its row, which names only the `environment` entries | Pointer: when routing, fetch the `/auto-mode-setup` row of [commands: all commands](https://code.claude.com/docs/en/commands#all-commands) live; the rule entries are from [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) | 2026-11-21 | The commands page row changes what it drafts or where it saves | | Its availability depends on plan and version requirements, which we never restate: read them from the same row before telling a person it is available | Same pointer | 2026-10-11 | The commands page row changes its plan or version requirements | +| What it reads: this project's `CLAUDE.md`, `README.md`, config files and git remotes; the person's `autoMode` and `permissions.allow` settings; the hosts, buckets and command names from commands Claude ran in recent sessions in this project, never the person's messages; and, behind two opt-in scans, the first word of each shell-history command and the remotes of repositories under the home directory | [auto mode config: what `/auto-mode-setup` reads](https://code.claude.com/docs/en/auto-mode-config#what-auto-mode-setup-reads) | 2026-11-21 | That section adds or drops a source | +| It also reads recent auto mode denials when it scans a project, and may offer `allow` rules from them. The auto mode config page does not document this yet; the changelog does. The two describe the review differently: the changelog says each rule is reviewed before it saves, the config page that the draft is accepted or discarded as a whole | Changelog, Claude Code 2.1.329: "Fixed `/auto-mode-setup` ignoring recent auto mode denials when it scans a project for rules to suggest; it may now offer allow rules from them, and you review each before it's saved" ([changelog](https://code.claude.com/docs/en/changelog)) | 2026-11-21, Claude Code 2.1.329 | The auto mode config page documents the denial scan, or a release changes what it offers | +| What it writes: `autoMode.environment` entries, and sometimes `allow`, `soft_deny` or `hard_deny` entries, to `~/.claude/settings.json` once the person accepts the draft as a whole. It adds `"$defaults"` to each rule list the draft adds to, unless the person already wrote an `allow` list without it, and keeps `"$defaults"` in `environment` only when the person chose to add rather than replace. After saving, it offers to remove `permissions.allow` rules in that file that auto mode ignores, such as `Bash(*)`, or that auto-approve destructive commands | [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) and its "Review and save the draft" subsection | 2026-11-21 | That section changes what the draft holds, where it saves, or how it handles `"$defaults"` | | Its argument hint is `[--request-id ] (--wizard posture=... scope=... depth=... --propose \| --expect-sha256 <64-hex> --apply-file )`: a propose step and a hash-checked apply step | The `/harness-ops:inventory` extraction of the installed 2.1.284 binary | 2026-09-29, Claude Code 2.1.284 | A release changes the argument hint | ## Why the verdict is complementary -The command writes: it produces `environment` entries and saves them to user settings after the -person reviews them. The commands page documents it for `environment` entries only; its "optional -rule tweaks" are not described there. This skill never writes and covers every classifier section, -with an interview for stated exclusions and a condition the classifier can see in the transcript. -Using the command for `environment` and this skill for the rest composes cleanly, since the -command's save is what Phase 1 then reads. +The command writes: it produces `environment` entries, sometimes rule entries, and saves them to +user settings after the person accepts the draft. Since 2.1.329 its `allow` entries can come from +recent denials, which is the allow-rule evidence this skill's interview has no source for. This +skill never writes and covers every classifier section, with an interview for stated exclusions and +a condition the classifier can see in the transcript. Using the command for `environment` and +denial-based `allow` rules, then this skill to sharpen those rules and draft the rest, composes +cleanly, since the command's save is what Phase 1 then reads. From 866279c08db26e578f072387574f451e580e10ab Mon Sep 17 00:00:00 2001 From: "melodic-automation-lanes[bot]" <337595936+melodic-automation-lanes[bot]@users.noreply.github.com> Date: Sat, 21 Nov 2026 21:26:27 +0000 Subject: [PATCH 2/2] Address review feedback on work-resolve-issue/issue-17911-44949329593-1 Lane-Activity: pr-unblock/address-feedback Lane-Thread: PRRT_kwDOTCGFQM66cfml --- .../reference/native-auto-mode-setup.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md b/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md index 1c91d2d21fd..ce794a6785b 100644 --- a/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md +++ b/plugins/harness-config/skills/draft-auto-mode-rules/reference/native-auto-mode-setup.md @@ -1,24 +1,25 @@ # The built-in `/auto-mode-setup` command, as this skill relates to it -Four-part records behind the `## Boundary` section in `SKILL.md`. The section carries the -conclusion; this file carries what it rests on. Nothing here asserts that the command is present in -any session. +Records behind the `## Boundary` section in `SKILL.md`. The section carries the conclusion; this +file carries what it rests on. A row with an As of date stores a copied string; the other rows are +pointers and carry no stamp. Nothing here asserts that the command is present in any session. | Claim | Basis | As of | Recheck when | |---|---|---|---| | `/auto-mode-setup` is a built-in command, user-invocable only, hidden from the command menu, and gated; its description is "Teach auto mode about your environment, plus optional rule tweaks" | The `/harness-ops:inventory` extraction of the installed 2.1.284 binary (`model_invocable: false`, `user_invocable: true`, `hidden: true`, `gated: true`) | 2026-09-29, Claude Code 2.1.284 | A release renames or removes the command, or changes its invocability or hidden flag | -| We treat it as the writer of `autoMode.environment` entries, and sometimes rule entries, saved after the person reviews them, and this skill as the reader; what it drafts and where it saves are read from its row, which names only the `environment` entries | Pointer: when routing, fetch the `/auto-mode-setup` row of [commands: all commands](https://code.claude.com/docs/en/commands#all-commands) live; the rule entries are from [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) | 2026-11-21 | The commands page row changes what it drafts or where it saves | -| Its availability depends on plan and version requirements, which we never restate: read them from the same row before telling a person it is available | Same pointer | 2026-10-11 | The commands page row changes its plan or version requirements | -| What it reads: this project's `CLAUDE.md`, `README.md`, config files and git remotes; the person's `autoMode` and `permissions.allow` settings; the hosts, buckets and command names from commands Claude ran in recent sessions in this project, never the person's messages; and, behind two opt-in scans, the first word of each shell-history command and the remotes of repositories under the home directory | [auto mode config: what `/auto-mode-setup` reads](https://code.claude.com/docs/en/auto-mode-config#what-auto-mode-setup-reads) | 2026-11-21 | That section adds or drops a source | -| It also reads recent auto mode denials when it scans a project, and may offer `allow` rules from them. The auto mode config page does not document this yet; the changelog does. The two describe the review differently: the changelog says each rule is reviewed before it saves, the config page that the draft is accepted or discarded as a whole | Changelog, Claude Code 2.1.329: "Fixed `/auto-mode-setup` ignoring recent auto mode denials when it scans a project for rules to suggest; it may now offer allow rules from them, and you review each before it's saved" ([changelog](https://code.claude.com/docs/en/changelog)) | 2026-11-21, Claude Code 2.1.329 | The auto mode config page documents the denial scan, or a release changes what it offers | -| What it writes: `autoMode.environment` entries, and sometimes `allow`, `soft_deny` or `hard_deny` entries, to `~/.claude/settings.json` once the person accepts the draft as a whole. It adds `"$defaults"` to each rule list the draft adds to, unless the person already wrote an `allow` list without it, and keeps `"$defaults"` in `environment` only when the person chose to add rather than replace. After saving, it offers to remove `permissions.allow` rules in that file that auto mode ignores, such as `Bash(*)`, or that auto-approve destructive commands | [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) and its "Review and save the draft" subsection | 2026-11-21 | That section changes what the draft holds, where it saves, or how it handles `"$defaults"` | +| We treat it as the writer of auto mode classifier entries, saved after the person reviews them, and this skill as the reader | Pointer: when routing, fetch the `/auto-mode-setup` row of [commands: all commands](https://code.claude.com/docs/en/commands#all-commands) live; when deciding what it drafts, fetch [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) live | | | +| Its availability depends on plan and version requirements, which we never restate: read them from the same row before telling a person it is available | Pointer: when telling a person it is available, fetch the same row live | | | +| We treat what it reads as possible input to the interview, never as a source this skill reads itself | Pointer: when deciding what it read, fetch [auto mode config: what `/auto-mode-setup` reads](https://code.claude.com/docs/en/auto-mode-config#what-auto-mode-setup-reads) live | | | +| Since Claude Code 2.1.329 it can offer `allow` rules drawn from recent auto mode denials; we treat those rules as input to the interview's `allow` section. No auto mode config section covers the denial scan yet | Changelog, Claude Code 2.1.329: "Fixed `/auto-mode-setup` ignoring recent auto mode denials when it scans a project for rules to suggest; it may now offer allow rules from them, and you review each before it's saved" ([changelog](https://code.claude.com/docs/en/changelog)) | 2026-11-21, Claude Code 2.1.329 | The auto mode config page documents the denial scan, or a release changes what it offers | +| The changelog and the auto mode config page disagree on how the draft is reviewed | [changelog](https://code.claude.com/docs/en/changelog) and [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) | | | +| We treat its save as the user-settings write that Phase 1 then reads | Pointer: when deciding what it writes, where it saves, or how it handles `"$defaults"` and `permissions.allow`, fetch [auto mode config: generate environment entries](https://code.claude.com/docs/en/auto-mode-config#generate-environment-entries) live, including its "Review and save the draft" subsection | | | | Its argument hint is `[--request-id ] (--wizard posture=... scope=... depth=... --propose \| --expect-sha256 <64-hex> --apply-file )`: a propose step and a hash-checked apply step | The `/harness-ops:inventory` extraction of the installed 2.1.284 binary | 2026-09-29, Claude Code 2.1.284 | A release changes the argument hint | ## Why the verdict is complementary -The command writes: it produces `environment` entries, sometimes rule entries, and saves them to -user settings after the person accepts the draft. Since 2.1.329 its `allow` entries can come from -recent denials, which is the allow-rule evidence this skill's interview has no source for. This +We treat the command as the writer of classifier entries to user settings, once the person reviews +its draft. Since 2.1.329 its `allow` entries can come from recent denials (the stored changelog +line above), which is the allow-rule evidence this skill's interview has no source for. This skill never writes and covers every classifier section, with an interview for stated exclusions and a condition the classifier can see in the transcript. Using the command for `environment` and denial-based `allow` rules, then this skill to sharpen those rules and draft the rest, composes