fix(agents): sharpen Skim agent usage discipline and heatmap scoping - #305
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
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
Five targeted edits to
src/assets/agents/skim.mdthat sharpen the Skim agent's file-reading discipline, heatmap usage, and CLI invocation. No build step required — agent assets are the single source of truth.Behavioral guidance was the gap: the cascade description (
full → minimal → structure → signatures → types) was already correct perskim --help2.11.0. These edits address what was missing.Changes
Edit 1 — PATH-first invocation: Intro paragraph now instructs the agent to prefer the
skimbinary when on PATH (command -v skim) and fall back tonpx rskim, so installations with the binary avoid the npm spawning overhead.Edit 2 — Branch-scoped heatmap: Step 4 guidance adds
--diff <base-branch>for feature-branch runs to scope findings to touched files only, plus--window sprint|month|quarterfor recency tuning and--top Nfor result-count control.Edit 3 — One-view-per-file discipline: Step 5 replaces the binary skim/Read split with a three-tier model: structure (default skim), logic (
--mode pseudo), or exact content (Read tool). Includes explicit anti-pattern guidance: don't skim a file you already know you'll Read.Edit 4 — Reference table and prose/config note: Two heatmap rows added (
--diffand--window). A sentence below the table notes that skim handles.md/.json/.yaml/.tomlfiles with heading/key structural views.Edit 5 — Principle 2 reworded: From the binary "rskim for structure, Read for content" to the three-tier "One view per file" formulation that matches Step 5.
Verification
Empirically verified against
skim --help2.11.0: cascade (full → minimal → structure → signatures → types),--diff,--window,--top, and prose/config support are all present. The cascade description in the file was already correct — behavioral guidance was the only gap.Test suite: all 30 test files passed, EXIT=0 (177 shell-hook tests, 136 proxy tests, 87 agent-frontmatter tests, and 22 other suites — no failures, no flakes on this run).