Audit and slim CLAUDE.md for Claude Code#341
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Docs-only PR to align repo-local Claude instructions with Claude Code’s actual harness behavior by moving generic guidance out of CLAUDE.md and keeping a slim, repo-specific contract plus audit/proof artifacts.
Changes:
- Add
CLAUDE_MD_AUDIT.mdto document what Claude Code already injects and what should remain repo-local. - Slim
CLAUDE.mdinto a focused AgentGuard repo contract (boundary, proof discipline, key workflow). - Add proof artifacts under
proof/claude-md-audit/(test run output, lint/security snapshots, token-count notes) and updatePR_DRAFT.md/MORNING_REPORT.mdaccordingly.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md |
Replaces long mixed prompt content with a slim repo-specific contract and pointers to canonical docs. |
CLAUDE_MD_AUDIT.md |
New audit write-up describing Claude Code prompt assembly takeaways and rationale for slimming. |
PR_DRAFT.md |
Updates the PR draft metadata/scope/proof list to match the audit work. |
MORNING_REPORT.md |
Updates the morning report to reflect the Claude audit deliverables and validation steps. |
proof/claude-md-audit/README.md |
Documents what each proof artifact in the audit folder represents. |
proof/claude-md-audit/check.txt |
Captures pytest + coverage output used as proof. |
proof/claude-md-audit/lint.txt |
Captures repo-wide ruff output (noted as pre-existing debt). |
proof/claude-md-audit/preflight.txt |
Captures sdk preflight output for this docs-only change. |
proof/claude-md-audit/release-guard.txt |
Captures release guard output. |
proof/claude-md-audit/security.txt |
Captures bandit output (empty file indicates no emitted findings). |
proof/claude-md-audit/token-counts.txt |
Captures before/after size counts for CLAUDE.md. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb4b1f6718
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
PR Draft
Title
Audit and slim
CLAUDE.mdto match Claude Code's actual system prompt behaviorSummary
CLAUDE_MD_AUDIT.mddocumenting what Claude Code already injects and what should stay repo-localCLAUDE.mdfrom a long mixed prompt into a focused AgentGuard repo contractmemory/,ops/, andARCHITECTURE.mdinstead of embedding stale architecture and API detailScope
CLAUDE.mdCLAUDE_MD_AUDIT.mdPR_DRAFT.mdMORNING_REPORT.mdproof/claude-md-audit/Non-goals
AGENTS.mdProof
python scripts/sdk_preflight.pypython -m pytest sdk/tests -v --cov=agentguard --cov-report=term-missing --cov-fail-under=80python scripts/sdk_release_guard.pyproof/claude-md-audit/token-counts.txtproof/claude-md-audit/Saved artifacts
proof/claude-md-audit/check.txtproof/claude-md-audit/preflight.txtproof/claude-md-audit/release-guard.txtproof/claude-md-audit/token-counts.txtproof/claude-md-audit/lint.txtproof/claude-md-audit/security.txt