Skip to content

docs(instruction-placement): record measured subagent Write and Edit rule loads - #10600

Merged
kyle-sexton merged 3 commits into
mainfrom
host-run/6758-subagent-write-edit-loads
Oct 28, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
host-run/6758-subagent-write-edit-loads

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Closes #6758

Summary

Records the first measurement of what a subagent's Write and Edit load. A headless probe on Claude Code 2.1.312 showed that a Write or an Edit inside a general-purpose subagent loads a matching paths: rule and a nested CLAUDE.md after the tool runs. The InstructionsLoaded record names the subagent through agent_id, agent_type and effort.

Fix

  • plugins/instruction-placement/context/verified-mechanics.md: the two surface-table rows drop "Write and Edit inside a subagent unmeasured" and carry (measured 2.1.312). A new section, "Write and Edit inside a subagent, measured on 2.1.312", holds the repro and its verification record. The write-trigger gap's timing claim moves from inferred to measured.
  • context/routing-rubric.md, README.md and the audit skill's evals/evals.json drop "not yet measured" for the Write-trigger timing.
  • Changelog fragment under .changes/instruction-placement/.

Verification

  • Probe: two claude -p runs in a scratch git project outside the checkout, each with a throwaway --settings file that logged InstructionsLoaded, PreToolUse and PostToolUse. Run 1 had the subagent Write ws/new.txt and wn/new.txt with no Read; run 2 had it Edit existing es/target.txt and en/target.txt with no Read. All four calls were followed by one load record (path_glob_match or nested_traversal, trigger_file_path = the touched file), each after that call's PostToolUse, each carrying the subagent's agent_id, agent_type: general-purpose and effort.
  • scripts/precompute.test.sh (36 cases) and scripts/lib/version.test.sh (19 cases) pass. ip_mechanics_measured_max now reads 2.1.312 from the record, so the audit header reads not stale on that CLI.
  • markdownlint-cli2: 0 issues on the changed Markdown; jq empty passes on the eval file.

Related

🤖 Generated with Claude Code

…rule loads

A headless probe on Claude Code 2.1.312 shows a subagent's Write and Edit
load a matching path-scoped rule and a nested CLAUDE.md after the tool
runs, with agent_id, agent_type and effort on the InstructionsLoaded
record. Replace the unmeasured cells and the inferred write-trigger
timing with the measurement.

Refs: #6758

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 28, 2026 09:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T09:31:20.065814Z c3dbef4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed c3dbef4568a44354781cfedaffeaa9d2e53b9bb9: 1 finding(s), 0 as inline comments.

Docs-only change recording the 2.1.312 subagent Write/Edit probe. The measurement text is internally consistent across the surface-table rows, the new section, the write-trigger gap, the routing rubric, the audit eval and the changelog fragment. I did not re-run the probe; the probe results are author-claimed. I also did not run the shell tests, which are author-claimed too. I read the diff and the PR context only.

Closing issue #6758. Both acceptance criteria are met on the page. The recorded probe sits in verified-mechanics.md, and the rows carry the version. Nothing in the PR could fail if the record were wrong, but that is inherent to a measurement record. Nothing blocks.

1 finding (stale text left behind, not on a changed line). The README revisit-trigger row still says the timing is unmeasured:

| A measurement shows a `Write`-triggered path-scoped rule arrives before the file is written. Record MS-5 in [`context/mechanics-sources.tsv`](context/mechanics-sources.tsv) documents the trigger, which shipped in Claude Code 2.1.288; MS-2 documents it for a nested `CLAUDE.md`. Whether the rule arrives before the write is unmeasured: see `context/verified-mechanics.md`, "The write-trigger gap" | Drop the structural deny on creation-governing content, and stamp the measurement in that gap |

It reads "Whether the rule arrives before the write is unmeasured: see context/verified-mechanics.md, 'The write-trigger gap'". This PR measures it as arriving after the write (2.1.312). The PR description says the README drops "not yet measured", and it does so only at line 106. Reword line 216 to say the timing is measured as after the write on 2.1.312 and that the trigger is a future measurement showing before. Also in routing-rubric.md, the "Lift or narrow it only once a canary measures whether a Write-triggered rule arrives before the write" sentence (unchanged, around line 41) now reads as if the question were still open. Consider pointing it at the 2.1.312 result and saying a re-measurement must show a change.

No spend beyond normal CI. No hold.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed c3dbef4568a44354781cfedaffeaa9d2e53b9bb9: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

The change is documentation and test-expectation text only:

  • a changelog fragment
  • plugins/instruction-placement/README.md
  • context/routing-rubric.md
  • context/verified-mechanics.md
  • the audit skill's evals/evals.json (only the expected-output strings changed)

What I checked:

  • Trusted paths: none of the five changed files matches a TRUSTED PATHS glob. No workflow, action, merge-hold script, CODEOWNERS, .gitmodules or pr-pipeline.yaml is touched.
  • Plugin manifests: neither plugin.json nor marketplace.json changes, so there are no manifest flags.
  • Instruction-surface lens: no rule is deleted, narrowed or softened. The edits replace "unmeasured" and "most likely after the write" with a measured result. The routing rubric still denies the paths: destination for creation-governing content and still keeps its condition for lifting that deny. The measurement strengthens that deny, so no guardrail is removed. I did not read docs/conventions/instruction-exception-register/README.md, so I judged by consequence.
  • PR context: the PR description and issue comments contain no embedded directives aimed at the review lane. The only instruction-like text is the usual note that they are data.

Spend: none. The ip_mechanics_measured_max bump to 2.1.312 only changes a staleness label, and the probe ran on the host runner, not in this change.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 30fa30d Oct 28, 2026
74 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/6758-subagent-write-edit-loads branch October 28, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(instruction-placement): measure subagent Write and Edit rule loads with InstructionsLoaded agent fields

1 participant