From 7c4433c71834d6326e37b7009f36a50dcf30e6db Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Fri, 27 Nov 2026 21:25:04 -0800 Subject: [PATCH 1/3] docs(audit): no early stop, and stale images every run The checklist reruns of focus 0 and 3 still skipped the stale-image step and listed items as not reached with 96 of 150 turns unused. Not reached is now allowed only past about 120 tool calls, the PR body reports the count, and step 9 is spelled out and must report every image. Co-Authored-By: Claude Opus 5.5 --- .claude/commands/weekly-audit.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.claude/commands/weekly-audit.md b/.claude/commands/weekly-audit.md index 10f583f6..15dd076f 100644 --- a/.claude/commands/weekly-audit.md +++ b/.claude/commands/weekly-audit.md @@ -79,9 +79,13 @@ say what it checked and found clean. - Work through every item on the checklist. Prefer one Grep across many files over reading them one by one, so the whole list fits in the turn budget. - Do not stop because you have found something. Stop at the end of the - checklist, at the 10-finding limit, or when you run short of turns. In the - last case, say in the PR body exactly which items you did not reach. -- Step 9 (stale images) runs every week, whatever the focus. + checklist or at the 10-finding limit. The run allows 150 turns: keep a + rough count of your tool calls, and until about 120 there is no such thing + as running short. Only past that may you leave items unchecked, and the PR + body must name each one under *Not reached*. "Not reached" with fewer than + 120 tool calls used is a failed run. +- Step 9 (stale images) runs every week, whatever the focus. It is not part + of the checklist and cannot be "not reached": do it before step 10. ## Focus areas @@ -191,12 +195,14 @@ everything on disk is in the doc, and everything in the doc is on disk. as-of date). Keep the font stack, the ADR-0009 cable colours and the layout. Do not touch PNGs; CI re-renders them. If a change needs new geometry you cannot place cleanly, record a FINDING instead. -9. Stale images. For each image under `docs/images/` and each image linked - from a README, compare `git log -1 --format=%cs -- ` with the last - change to what it depicts (the dashboard JSON for screenshots, the - paragraph that references it otherwise). List suspects for the PR body. - Dashboard screenshots are refreshed by the operator with - `make screenshots`; photos need a retake. +9. Stale images. Every run, every focus. Glob `docs/images/**` and Grep + every `README.md` for image links (`.png`, `.jpg`, `.jpeg`, `.webp`, + `.svg`). For each image, run `git log -1 --format=%cs -- `, then + the same for what it depicts: the dashboard JSON for a screenshot, the + file that holds the referencing paragraph otherwise. The image is a + suspect if what it depicts changed after it. Report every image in the PR + body, suspect or not. Dashboard screenshots are refreshed by the operator + with `make screenshots`; photos need a retake. 10. If you made doc fixes, add one entry for today at the top of `docs/changelog.md` in its existing format. 11. Run `python3 scripts/check_docs.py`. Fix doc-side failures you caused, @@ -220,6 +226,7 @@ Keep the four headings of `.github/pull_request_template.md`. **Coverage** - : N checked, N clean, N findings - Not reached: , or "none" + - Tool calls used: about N of 150 **Doc fixes** - `path`: what was wrong → what it says now. Truth: `path:line` "quote" @@ -242,6 +249,8 @@ Keep the four headings of `.github/pull_request_template.md`. - [ ] `docs/images/x.png`: image , source changed (`make screenshots` / photo) + Checked and current: N images (`path` image , source ; …) + ## Blast radius Documentation only; no host, VLAN or service changes. From 02db74716541f91255b2561562e3eeb88db98e0d Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Fri, 27 Nov 2026 21:25:27 -0800 Subject: [PATCH 2/3] ci(audit): upload the PR body even when nothing changed Co-Authored-By: Claude Opus 5.5 --- .github/workflows/weekly-audit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/weekly-audit.yml b/.github/workflows/weekly-audit.yml index 111f696a..69cd2c76 100644 --- a/.github/workflows/weekly-audit.yml +++ b/.github/workflows/weekly-audit.yml @@ -148,7 +148,8 @@ jobs: fi - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - if: steps.patch.outputs.changed == 'true' + # Always, so a run that changed nothing still leaves its pr-body.md + # (what it checked). Open PR only runs when there is a diff. with: name: audit-patch path: ${{ runner.temp }}/out/ From 686748ea22dce78609d2dbafb91a21f800ab6f84 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Fri, 27 Nov 2026 21:30:41 -0800 Subject: [PATCH 3/3] ci(audit): edit only an open audit PR, never a merged one A second focus-3 run in week 2026-48 found the merged PR for its branch with gh pr view, edited that PR's body, and opened no new PR. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/weekly-audit.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/weekly-audit.yml b/.github/workflows/weekly-audit.yml index 69cd2c76..d5d4e195 100644 --- a/.github/workflows/weekly-audit.yml +++ b/.github/workflows/weekly-audit.yml @@ -244,8 +244,11 @@ jobs: "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \ "HEAD:refs/heads/${BRANCH}" body="$RUNNER_TEMP/out/pr-body.md" - if gh pr view "$BRANCH" >/dev/null 2>&1; then - gh pr edit "$BRANCH" --body-file "$body" + # Open PRs only: `gh pr view ` also finds a merged one, and + # a second run in the same week would edit that instead. + open_pr="$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number // empty')" + if [ -n "$open_pr" ]; then + gh pr edit "$open_pr" --body-file "$body" else gh pr create --base main --head "$BRANCH" \ --title "docs(audit): weekly doc fixes $WEEK, focus $FOCUS" \