Skip to content

fix(workflows): let docs auditors open PRs for README and AGENTS.md#1188

Merged
jamesadevine merged 1 commit into
mainfrom
docs/allow-readme-agents-prs
Jun 24, 2026
Merged

fix(workflows): let docs auditors open PRs for README and AGENTS.md#1188
jamesadevine merged 1 commit into
mainfrom
docs/allow-readme-agents-prs

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Problem

The doc-freshness-check (docs rewriter) and bash-lint-auditor workflows are designed to edit AGENTS.md and README.md, but every run that touched those files filed an issue instead of opening a PR — producing a steady stream of docs: fix documentation drift issues (#1180, #1177, #1175, #1143, #1129, #1126, #1123, #1121, #1114, #1106, ...).

Root cause

gh-aw maintains a default protected-files set that includes README.md, AGENTS.md, CHANGELOG.md, CONTRIBUTING.md, etc. protected-files and allowed-files are orthogonal checks — listing a file in allowed-files does not remove it from the protected set. So any patch touching README/AGENTS.md hit the fallback-to-issue policy.

Fix

Switch protected-files from the string form to the object form with an exclude list in the two workflows that intentionally maintain these docs:

  • doc-freshness-check — excludes AGENTS.md and README.md
  • bash-lint-auditor — excludes AGENTS.md

The fallback-to-issue policy is fully preserved for all genuinely protected files (package manifests, CODEOWNERS, CHANGELOG.md, dot-folders, etc.) — the issue fallback safety net is intact; it just no longer trips on the docs these workflows are explicitly designed to update.

Validation

  • Recompiled both .lock.yml files with gh aw compile (0 errors).
  • Confirmed the compiled protected_files array now omits AGENTS.md/README.md while protected_files_policy stays fallback-to-issue.

doc-freshness-check and bash-lint-auditor edit AGENTS.md/README.md, but those files are in gh-aw's default protected-files set, so every patch fell back to filing an issue instead of opening a PR (regardless of allowed-files, which is an orthogonal check).

Switch protected-files to the object form with an exclude list for AGENTS.md (and README.md for doc-freshness-check). The fallback-to-issue policy is preserved for all genuinely protected files (package manifests, CODEOWNERS, CHANGELOG.md, dot-folders, etc.).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit d855e6e into main Jun 24, 2026
13 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.

1 participant