Fix ambiguous Plan Summary placeholder + add subagent read-guard caveat#3399
Merged
Trecek merged 2 commits intoMay 31, 2026
Merged
Conversation
Add explicit instruction to Step 7 to extract body text only (not the heading) and update the ## Plan Summary placeholder with NEVER prohibition against nested ## headings. Prevents agents from including the ## Summary heading itself in the plan summary section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-anchored regex Reviewer noted that the two separate tests (test_prepare_pr_plan_summary_prohibits_nested_heading and test_prepare_pr_plan_summary_has_negative_example) checked for 'NOT include', 'NEVER', '## Summary', and 'heading' independently without proximity anchoring — all three strings could match from unrelated sections of the file. Merged into a single test with a regex that requires the prohibition verb and heading reference to co-occur in the same sentence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
445348a to
cb11b72
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix two SKILL.md instruction gaps that cause token waste in the pipeline: (A) disambiguate the
## Plan Summaryplaceholder inprepare-pr/SKILL.mdso agents extract only the body text without the## Summaryheading, and (B) add a subagent read-guard isolation caveat to all implement-class skills that need it — strengthening 5 files that already have the base instruction, and adding the full instruction to 3 files that lack it entirely (retry-worktree,resolve-claims-review,resolve-research-review).Requirements
Finding A — prepare_pr
## Plan Summarydouble-heading: Theprepare-pr/SKILL.mdtemplate placeholder at line 209–212 is ambiguous about whether to include the## Summaryheading or only its body text. The agent included the full heading, producing## Plan Summary\n\n## Summary\n\n.... Any parser looking for content between## Plan Summaryand the next##heading sees nothing.compose-prdetected the empty field, added an extra Read of the full 26KB plan file, and composed the PR body from scratch rather than from the curated prep summary.Finding B — Subagent read-guard isolation caveat missing: 5 SKILL.md files have a "Read before editing" instruction but none mention that subagent reads don't satisfy the parent session's read-guard (a Claude Code platform constraint). The implement session used parallel Agent subagents to read files, then fired parallel Edit calls — all 4 failed with "File has not been read yet." The agent self-corrected (Read then Edit), but 4 wasted API turns at full context size. Additionally,
retry-worktree/SKILL.mdis missing the instruction entirely.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260531-000101-782122/.autoskillit/temp/make-plan/prepare-pr-ambiguous-plan-summary-placeholder-subagent-read_plan_2026-05-31_000101.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown