Skip to content

fix(index): stop leaking per-engineer STATE_* snapshots into AGENTS.md - #68

Merged
nmccready merged 2 commits into
mainfrom
fix/state-index-per-engineer
Jul 5, 2026
Merged

fix(index): stop leaking per-engineer STATE_* snapshots into AGENTS.md#68
nmccready merged 2 commits into
mainfrom
fix/state-index-per-engineer

Conversation

@nmccready

Copy link
Copy Markdown
Contributor

Problem

The generated AGENTS.md index enumerated every .agents/STATE_*.md under ## State. Those snapshots are per-engineer working files — listing them leaks one engineer's scratch state into the shared, committed AGENTS.md and churns it on every index/sync regeneration.

Fix

  • ## State is now a pointer to the convention rule (.agents/rules/state.md) so agents still remember to keep state snapshots.
  • A snapshot is listed only when it opts in as a shared task via shared: true frontmatter (same pattern as the import: true opt-in for reference docs, feat: remaining polish — import:true opt-in, gate legacy import, SPEC-006, SPEC-005 Part C #65). Opted-in snapshots render under a ### Shared subheading.
  • Legacy .agents/STATE.md (pre-migration) still lists under Shared until fix migrates it.
  • State rule template + docs/commands/index.md document the sharing opt-in.

Tests

TestCmdIndex_WithStateSnapshots now asserts: private snapshot excluded, shared: true snapshot included, rule pointer present. Full suite green (go test ./...).

🤖 Generated with Claude Code

STATE_*.md snapshots are per-engineer working files. Indexing them all
churned the shared, committed AGENTS.md with personal scratch state.

The State section is now a pointer to the state convention rule
(.agents/rules/state.md); a snapshot is listed only when it opts in as
a shared task via `shared: true` frontmatter (mirrors the
`import: true` opt-in for reference docs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🤖 AI Code Review Complete

Review performed on changed files. Check inline comments for specific findings.

Severity Levels:

  • 🔴 Critical: Must fix (bugs, security, data loss)
  • 🟡 Warning: Should fix (performance, maintainability)
  • 🔵 Suggestion: Nice to have (style, alternatives)
  • Nit: Optional (cosmetic)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🤖 AI Code Review Complete

Review performed on changed files. Check inline comments for specific findings.

Severity Levels:

  • 🔴 Critical: Must fix (bugs, security, data loss)
  • 🟡 Warning: Should fix (performance, maintainability)
  • 🔵 Suggestion: Nice to have (style, alternatives)
  • Nit: Optional (cosmetic)

@nmccready
nmccready merged commit 5ac55d5 into main Jul 5, 2026
6 checks passed
@nmccready
nmccready deleted the fix/state-index-per-engineer branch July 5, 2026 14:57
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