Skip to content

Fix ambiguous Plan Summary placeholder + add subagent read-guard caveat#3399

Merged
Trecek merged 2 commits into
developfrom
prepare-pr-ambiguous-plan-summary-placeholder-subagent-read/3389
May 31, 2026
Merged

Fix ambiguous Plan Summary placeholder + add subagent read-guard caveat#3399
Trecek merged 2 commits into
developfrom
prepare-pr-ambiguous-plan-summary-placeholder-subagent-read/3389

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented May 31, 2026

Summary

Fix two SKILL.md instruction gaps that cause token waste in the pipeline: (A) disambiguate the ## Plan Summary placeholder in prepare-pr/SKILL.md so agents extract only the body text without the ## Summary heading, 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 Summary double-heading: The prepare-pr/SKILL.md template placeholder at line 209–212 is ambiguous about whether to include the ## Summary heading 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 Summary and the next ## heading sees nothing. compose-pr detected 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.md is 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 Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 57 14.3k 583.6k 143.1k 195 58.9k 14m 55s
review_approach* opus 1 24 4.3k 167.3k 36.3k 26 22.3k 2m 46s
verify* opus 1 39 12.6k 596.5k 72.4k 75 55.9k 4m 51s
implement* opus 1 74.8k 11.7k 2.8M 18.5k 138 0 5m 39s
audit_impl* opus 1 357 8.9k 277.9k 39.9k 40 32.8k 3m 28s
prepare_pr* opus 1 56.6k 4.0k 225.6k 0 19 0 1m 30s
compose_pr* opus 1 42.4k 1.8k 268.3k 0 18 0 41s
review_pr* opus 1 35 24.6k 905.2k 80.7k 42 64.8k 6m 15s
resolve_review* opus 1 31 7.3k 692.4k 64.8k 37 49.9k 8m 25s
Total 174.4k 89.5k 6.5M 143.1k 284.5k 48m 32s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
review_approach 0
verify 0
implement 77 36171.8 0.0 152.2
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 23 30102.9 2170.3 316.9
Total 100 65020.0 2845.0 894.5

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 57 14.3k 583.6k 58.9k 14m 55s
opus 8 174.3k 75.2k 5.9M 225.6k 33m 36s

Trecek and others added 2 commits May 31, 2026 00:56
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>
@Trecek Trecek force-pushed the prepare-pr-ambiguous-plan-summary-placeholder-subagent-read/3389 branch from 445348a to cb11b72 Compare May 31, 2026 07:56
@Trecek Trecek added this pull request to the merge queue May 31, 2026
Merged via the queue into develop with commit bf9369e May 31, 2026
3 checks passed
@Trecek Trecek deleted the prepare-pr-ambiguous-plan-summary-placeholder-subagent-read/3389 branch May 31, 2026 08:12
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.

1 participant