feat(agents): split public/internal context + CI safety lint#2977
Merged
Conversation
Split .agents/current-context.md into public + internal. Public stays safe for Addie injection and triage comments; internal holds editorial framing, narratives, and stakeholder-sensitive content. New CI at .github/workflows/validate-agent-context.yml runs on PR: - Safety (hard fail): injection markers, level-1 headings, control chars, 16 KB cap. - Boundary (warnings): tier-N, narrative, editorial, gap, stakeholder attribution without PR link. Context-refresh prompt updated to write both files per a routing table and run the lint locally. Closes the persistent-injection path + "reads weird to a cold prospect" concerns from the #2974 expert review. Co-Authored-By: Claude Opus 4.7 (1M context) <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
Follow-up to the expert review on #2974. Closes two related gaps at the source:
Change
File split:
.agents/current-context.md— public. Factual status + links. Injected into Addie; quotable in triage comments..agents/internal-context.md— internal. Editorial framing, narratives, gaps, stakeholder-sensitive. Triage reads it; Addie doesn't.Moved the "Narratives and gaps" section from public to internal as the seed. Demoted the public file's title from
# Current Contextto## Current Contextso the CI lint can ban level-1 headings outright.CI lint:
ignore previous, role markers,you are now,new instructions,disregard, fence tags), level-1 headings, control chars, 16 KB size cap.tier-N,narrative,editorial,gap, stakeholder attribution without a PR link.Context-refresh routine prompt updated to write both files per a side-by-side routing table and to run the lint locally before opening the refresh PR.
Test plan
Independent of #2974 — either order merges fine.
🤖 Generated with Claude Code