Skip to content

feat: audit .github repo and add CLAUDE.md/AGENTS.md checks#14

Merged
don-petry merged 2 commits intomainfrom
feat/audit-github-repo-and-claude-md
Apr 5, 2026
Merged

feat: audit .github repo and add CLAUDE.md/AGENTS.md checks#14
don-petry merged 2 commits intomainfrom
feat/audit-github-repo-and-claude-md

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

@don-petry don-petry commented Apr 5, 2026

Summary

  • Removes the .github repo exclusion — it now gets audited like all other repos
  • Adds two new compliance checks enforcing a standard for Claude Code configuration:
    • CLAUDE.md must exist in every repo and reference AGENTS.md
    • AGENTS.md must exist in every repo and reference the org-level .github/AGENTS.md

Changes

scripts/compliance-audit.sh

  • Removed .github skip from both the audit loop and issue creation loop
  • Added check_claude_md() — verifies CLAUDE.md exists and references AGENTS.md
  • Added check_agents_md() — verifies AGENTS.md exists and references org .github/AGENTS.md
  • Added standards to the category breakdown in the summary report

Dry Run Results

Repo Before After New Findings
.github skipped 20 All (newly audited)
bmad-bgreat-suite 19 21 missing CLAUDE.md ref, missing AGENTS.md ref
ContentTwin 10 12 missing CLAUDE.md ref, missing AGENTS.md ref
markets 7 8 missing AGENTS.md ref
broodly 6 6 (already compliant)
TalkTerm 8 8 (already compliant)
google-app-scripts 11 11 (already compliant)
Total 61 86 +25

Test plan

  • Dry run: .github repo now included with 20 findings
  • Dry run: CLAUDE.md/AGENTS.md checks fire correctly across all repos
  • Existing checks unaffected (broodly, TalkTerm, google-app-scripts unchanged)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added repository checks for CLAUDE.md and AGENTS.md to flag missing files or missing references.
  • Chores

    • Extended compliance auditing and issue management to include the previously-excluded .github repository.
    • Updated reporting to surface a new "standards" category in audit summaries.

- Remove .github repo exclusion — it now gets audited like all
  other repos (settings, labels, rulesets, workflows, etc.)
- Add check_claude_md: every repo must have a CLAUDE.md that
  references AGENTS.md
- Add check_agents_md: every repo must have an AGENTS.md that
  references the org-level .github/AGENTS.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 5, 2026 18:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 5, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1df4a097-d00e-4fe5-bdbd-e7e4bcd80ab1

📥 Commits

Reviewing files that changed from the base of the PR and between ddb07d5 and 58e86b9.

📒 Files selected for processing (1)
  • scripts/compliance-audit.sh

📝 Walkthrough

Walkthrough

Adds two new compliance checks to scripts/compliance-audit.sh: check_claude_md (validates CLAUDE.md exists and references AGENTS.md) and check_agents_md (validates AGENTS.md exists and references org-level .github/AGENTS.md except for .github repo). Also includes standards in reports and enables auditing of the .github repo.

Changes

Cohort / File(s) Summary
Compliance Audit Script
scripts/compliance-audit.sh
Added check_claude_md() to fetch/validate CLAUDE.md; added check_agents_md() to fetch/validate AGENTS.md and enforce reference to org-level .github/AGENTS.md (except .github); updated generate_summary() to include standards category; removed logic that skipped the .github repo during auditing and issue management.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the two main changes: auditing the .github repo and adding CLAUDE.md/AGENTS.md compliance checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/audit-github-repo-and-claude-md

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the org compliance audit to include the .github repository and adds new standards checks for Claude Code configuration files to ensure repos include and cross-reference CLAUDE.md and AGENTS.md.

Changes:

  • Stop skipping the .github repository during auditing and issue management.
  • Add new compliance checks for CLAUDE.md (must exist + reference AGENTS.md) and AGENTS.md (must exist + reference org-level standards).
  • Include a new standards category in the summary category breakdown.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/compliance-audit.sh Outdated
Comment thread scripts/compliance-audit.sh Outdated
Comment thread scripts/compliance-audit.sh Outdated
Comment thread scripts/compliance-audit.sh Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/compliance-audit.sh`:
- Around line 423-426: The current grep checks use a generic case-insensitive
match (grep -qi 'AGENTS\.md') and report only "warning" via add_finding, which
under-enforces the PR requirement and allows loose matches like a bare
"petry-projects/.github"; update the checks to require an explicit path to
AGENTS.md (for example grep -qiE
'(\.github/.+AGENTS\.md|standards/AGENTS\.md|CLAUDE\.md.*AGENTS\.md)') so only
true references pass, and change the add_finding severity from "warning" to the
mandatory severity used for must-fix violations (e.g., "must-fix" or the
project's canonical error level) in the add_finding calls; apply the same
stricter path-plus-severity changes to the other related branch that currently
accepts bare "petry-projects/.github".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8b76bff3-c9bd-4ff8-bfbd-6346294e8172

📥 Commits

Reviewing files that changed from the base of the PR and between c232312 and ddb07d5.

📒 Files selected for processing (1)
  • scripts/compliance-audit.sh

Comment thread scripts/compliance-audit.sh Outdated
- Point standard_ref to AGENTS.md (the actual source of truth)
- Upgrade missing-ref severities from warning to error (required)
- Tighten AGENTS.md org-ref grep to match .github/AGENTS.md only

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@don-petry don-petry merged commit b23b0c7 into main Apr 5, 2026
2 of 3 checks passed
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.

2 participants