Repository navigation
ci(audit): add a weekly Claude docs audit that opens a docs-only PR - #1773
Merged
Merged
Conversation
Claude audits one focus area a week with read-only contents and issues: write. It may edit only docs/** and README.md files. A second job with no AI in it applies the patch, fails on any path outside the docs, re-renders a changed diagram PNG with the CLAUDE.md command, runs check_docs.py and the close-keyword check, and opens audit/docs-<week>. Security-sensitive findings get no public issue and no evidence, only a private ledger row. The PR body keeps the four template sections and refers to issues only as Refs #N. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt
enabled auto-merge (squash)
November 26, 2026 22:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 6 tasks
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.
What changed
Adds
.github/workflows/weekly-audit.ymland its prompt,.claude/commands/weekly-audit.md. Every Monday at 06:37 UTC, or by hand, Claude audits one of six focus areas: ADRs, ansible, stacks, scripts and CI, secrets/tofu/packer, and the Lemmiwinks contract. It may edit onlydocs/**andREADME.mdfiles. It records findings indocs/audit/FINDINGS.mdand filesauditissues for drift outside the docs.The workflow has two jobs:
contents: readandissues: write. It has no push or PR access, and no token is left in.git/config.docs/diagrams/previous/, or on more than 15 files. It then re-renders a changed diagram PNG with thersvg-convert --zoom=1.5command from CLAUDE.md, runscheck_docs.pyand the close-keyword check on the generated PR body, and opensaudit/docs-<week>..github/OVERVIEW.mdgains a row for the workflow.Why
The docs move daily and drift from the code between passes. This makes the pass weekly and reviewable as a normal PR, without giving the model any write path to code or
main.Choices made for this repository:
check_docs.pyrule 13 (SVG/PNG pairing) always fails while Claude edits an SVG without its PNG. The prompt tells Claude to ignore that one rule, and the PR job re-runs the full check after rendering.privateledger row saying "operator review", perdocs/security.md.Refs #N, and the close-keyword check gates them before the PR opens.Blast radius
This is CI only, with no host, VLAN or service changes. The new workflow can write to the repository only from the non-AI job, and only to
audit/docs-*branches. Themainruleset still requires a PR and the five required checks.secrets/*.sops.yamlVerification
Run locally on Windows:
actionlintandyamllint --stricton the new workflow: clean.zizmor --offline .github/workflows, the waylint.shcalls it: no findings.python scripts/check_docs.py:docs OK.check_close_keywords.py --texton the prompt, OVERVIEW.md, the commit message and this body: PASS.The workflow itself can't run until this merges, because
gh workflow runneeds it onmain. Setup needed before the first run:CLAUDE_CODE_OAUTH_TOKENsecret.auditlabel.LEMMIWINKS_READ_TOKENfor focus 5.After merging, test with
gh workflow run weekly-audit.yml -f focus=0.make validatepasses (not run: docs and CI only; check_docs and the workflow linters were run instead).github/OVERVIEW.md)🤖 Generated with Claude Code