Skip to content

Workflow ref trust

Prompt

Before responding to questions or discussion points in this document, explore this repository thoroughly. Read the relevant files and ground your answers in what they actually say. Do not speculate about the repository when you could read it instead. Flag any uncertainty explicitly rather than guessing.

There is no application code here. The artifacts are the audit specifications in docs/audits/, the tooling in scripts/ that measures them, the templates in templates/ that the rest of the fleet copies, and the workflows that run all of it every morning against every Shaken Fist repository.

Consult AGENTS.md for the conventions and the invariants that are not visible in the code, and ARCHITECTURE.md for the shape of the system. docs/consistency-audits.md is the reference for what a daily run does, how to add a criterion, how to bring a repository into scope, and how to test a change before it reaches the fleet -- read it before changing anything under scripts/ or docs/audits/. docs/code-review-tracking.md covers the review tooling, and PUSH-AUDIT.md is the pre-push review runbook that every plan's final phase runs.

Two things make planning here different from planning in a repository that holds a product, and both should shape any plan written from this template:

  • The blast radius is other people's repositories. The daily workflow files and closes GitHub issues fleet-wide. A change that is merely wrong does not produce a red build; it produces issues in ten repositories, or silently closes ones that should have stayed open. Always pass --dry-run when running audit-manage-issues.py by hand.
  • This repository is in its own audit matrix. A standard we exempt ourselves from is a standard we stop noticing the cost of. A change to a criterion is a change we are measured against the next morning, so a plan should say how many repositories -- including this one -- it newly fails.

Plan file conventions (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-file-conventions.md):

  • All planning documents live in docs/plans/.
  • A phase is planned in detail either in a file of its own or as a prose section of the master plan. Both are allowed, and a repository that prefers sections says so once, in a paragraph above the table in docs/plans/index.md, rather than in every plan. A phase file is named for its master plan, sits in the same directory as it, and appends -phase-NN-descriptive before the .md extension.
  • Either way the master plan tracks every phase, in order, in one table under its Execution section. Merged is last, and the push audit is the last row, for the reasons given in plan-push-audit-phase. The Plan column names the phase file, so it is present with phase files and absent with sections -- there is no file to name:
Phase Plan Status Merged
1. Schema migration PLAN-thing-phase-01-schema.md Not started
2. Public API PLAN-thing-phase-02-api.md Not started
3. Push audit - Not started

Or, where the phases are sections and there is no file to name:

Phase Status Merged
1. Schema migration Not started
2. Public API Not started
3. Push audit Not started

A plan that tracks its phases in prose alone, with no table, records each landing as the Merged: line in that phase's own section, which is the form plan-push-audit-phase describes. Where plan-phase-landing says Merged cell, that line is the cell.

  • One commit per logical change, and at minimum one commit per phase. Unrelated changes are not batched into a single commit. Each commit is self-contained: it builds, passes tests, and has a message explaining what changed and why.

In this repository. Plans here keep their phases as sections inside the master plan rather than as separate phase files, and the Execution table's Plan column is dropped accordingly; docs/plans/index.md says so. The shared convention above is the fleet default, and a plan large enough to want phase files should use them rather than argue with the block.

Situation

#153 named two habits in the fleet's workflows: reusable workflows are called at @main with secrets: inherit, and third-party actions are referenced by a tag rather than a commit sha. Both mean that code nobody reviewed in the calling repository runs inside its CI.

The secrets: inherit half has already landed (fe4b3ba, 2026-09-29). The reusable-workflow-secrets criterion reports any job that passes secrets: inherit to a reusable workflow, and leaves two callees to criteria that already owned them (export-repo-config, ci-review-automation). The fix in the calling repositories is phase 1 of this plan. These were the live secrets: inherit lines on each repository's default branch at the phase 1 survey, read through the GitHub API on 2026-10-02 before any phase 1 pull request was opened (local clones were stale and overcounted). The pull requests that remove them are listed in the phase 1 section.

Criterion Repositories Open issues
reusable-workflow-secrets 4 client-python#410, instar#610, occystrap#150, shakenfist#4380
export-repo-config (its inherit finding) 9 agent-python#146, client-python#409, client-python-k3s#79, clingwrap#138, divergulent#121, instar#600, library-utilities#63, occystrap#148, sfui#38
ci-review-automation (its inherit finding) 0 none; its open issues are about other findings

fe4b3ba says no reusable workflow in the fleet read a secret. That is true of the shared callees in actions (smoke-cluster.yml and export-repo-config.yml) and of the test-drift-fix.yml template. It is not true of instar's local test-drift-fix.yml, which reads secrets.GITLAB_TESTDATA_TOKEN to fetch its test data. Deleting instar's inherit would leave that token empty. Phase 1 handles this.

The pinning half has not been started. The spec of reusable-workflow-secrets explicitly leaves it out. These measurements come from local clones of the default branches, with worktree copies excluded, on 2026-10-02:

  • There are 633 remote uses: references, and none is pinned to a sha.
  • 93 of them are shakenfist/actions/...@main, in 14 repositories.
  • The other 540 are third-party references, all by tag except one branch, noted below. The largest groups are actions/checkout (272), actions/upload-artifact (93), actions/download-artifact (36), dtolnay/rust-toolchain (16), renovatebot/github-action (15), github/codeql-action/* (40), dorny/paths-filter (13), softprops/action-gh-release (11) and pypa/gh-action-pypi-publish (11). pypa/...@release/v1 is a branch, not a tag.
  • Every renovate-managed repository already runs Renovate, self hosted through renovatebot/github-action. Every config has automerge: false for minor, patch and digest updates, so each bump is a pull request that a person reviews. Two repositories have no renovate.json at all: visual-digest-rust and private-ci.

What @main on shakenfist/actions actually trusts. That branch has a ruleset ("Protect default branch history") that blocks deletion and non-fast-forward pushes, and nothing more. There is no classic branch protection and no pull request requirement. Over the last three months, 146 first-parent commits landed on it:

How it landed Count
Merged pull request 81
Pushed directly, by a person 21
Pushed directly, by shakenfist-bot (review-mark prune or import) 44

The bot pushes with DEPENDENCIES_TOKEN, a personal access token that falls back to github.token (actions/.github/workflows/prune-reviews.yml:90). Today, anything that can push to actions main runs, at the next CI run, in every one of the 14 consuming repositories. That includes anyone holding that token. It runs with whatever those jobs can reach. After the inherit rollout that is github.token under the caller's permissions: block, but it is also everything on the self-hosted runner the job lands on: smoke-cluster.yml authenticates to its clusters with an on-disk key (its lines 18-20). Composite actions from actions (for example pr-bot-trigger@main) are worse again: they run inside the caller's own job, with its environment and any secrets that job was given. This is the narrowest point of the whole problem: one setting in one repository, rather than 93 references spread over 14.

What sha-pinning shakenfist/actions would cost. At 146 changes per quarter, about 1.6 a day, nearly every day would bring a change. Renovate updates an open digest pull request in place and runs once a night, so the cost is at most one pull request per consuming repository per day: an upper bound of 14 a day across the fleet, each one needing a human. The audit also has callers that hard-code @main as the expected form: CI_REVIEW_SHARED_ACTION and CI_REVIEW_TRIGGER_ACTION in scripts/audit/checks/ci_workflows.py:162-165, and the rationale in REPO_OVERRIDES (scripts/audit/repo.py:33). Those would all have to learn to accept a sha.

Mission and problem statement

Answer #153 with a settled fleet policy on which workflow references may move, enforced by the audit wherever it can be decided mechanically. In brief, the policy is:

  1. Finish the inherit rollout that fe4b3ba started, so no callee can see a secret it was not given by name.
  2. Make @main on shakenfist/actions mean "landed through a pull request that passed CI". Change that repository's ruleset so that changes reach main only that way. With one maintainer this is a record and a CI gate, not a second reviewer (open question 2), and the specs say so. First-party reusable workflows and composite actions keep the moving ref. The decision not to sha-pin them, and its cost, is recorded in the specs.
  3. Pin third-party actions to a sha, with the version in a trailing comment. Renovate (helpers:pinGitHubActionDigests) keeps the pins current, and a new criterion enforces them.
  4. Express a repeated workflow once. A template meant to be the same in every repository becomes a short caller of a reusable workflow or composite action in actions, at the moving ref that point 2 makes safe to trust, and the template's own criterion checks the caller. This belongs in this plan because it rests on the same trust decision: every job moved into actions widens what an unreviewed push to its main would reach, so it waits for phase 2.

Out of scope:

  • Docker image digests in container: and image: keys. The image-supply-chain plan owns the images the fleet builds.
  • Pinning the Python, cargo or npm dependencies that workflows install. Other criteria cover those.
  • Harden-runner-style egress control.
  • Renovate's own workflow. A shared workflow would still run once per repository, and the better answer is one central run for the whole fleet, which PLAN-renovate-cadence.md delivers.
  • A fleet-wide "these workflows look alike" detector. It cannot tell drift from a legitimate per-repository difference, so it would file issues against copies that are right to differ. Phase 6 enforces the policy through each template's own criterion instead.

Open questions

  1. How does the review-mark bot keep landing on actions main once a pull request is required? If shakenfist-bot is a ruleset bypass actor, the PAT path stays open. If it is not, prune-reviews has to open a pull request and auto-merge it, which is a template change across every adopted repository. A ruleset bypass cannot name a user, only an organisation admin, a repository role, a team, an app or a deploy key, so "bypass for the bot" means a team whose only member is shakenfist-bot, or a GitHub App. A repository-role bypass would let every writer through and is not acceptable. Default: a GitHub App, as the only bypass actor, rather than a team of one. PLAN-bot-bypass-identity.md built it: shakenfist-review-marks carries contents: write and the implicit metadata: read, and nothing more. Its key is an environment secret in a review-marks environment that admits only the repository's default branch. A token for it is minted per run, scoped to the one repository, and revoked when the job ends. shakenfist-bot has left the team that used to bypass, so its PATs bypass nothing; that plan's phase 3 record has two refused pushes as proof. Step 2a installs the App on actions, puts the key in the review-marks environment that already exists there, and names the App as the only bypass actor on the actions ruleset. The bypass is not narrowed to the review-tracking paths: a ruleset's bypass list covers the whole ruleset, branch rulesets have no per-path condition, and a file-path restriction is a push rule that binds every push, pull request merges included. Write phase 2's success criterion for an unnarrowed bypass. The spec states the residual risk the old default carried accurately: a DEPENDENCIES_TOKEN bypass moved the boundary from "can push to main" to "can run a workflow that has DEPENDENCIES_TOKEN in scope", which is wider than one setting in one repository. What closed that bypass residual is PLAN-bot-bypass-identity.md phase 3a taking shakenfist-bot out of sf-can-skip-merge-queue on 2026-11-08 (the refused pushes above); this is the work #211 tracked, done there rather than here. Step 2a's job is to install the App so the review-mark path keeps landing without re-opening it. After 2a the credential that bypasses the ruleset is a per-run App token, minted and revoked inside the job; the key that mints it is long-lived, and what bounds it is the review-marks environment's default-branch policy. The residuals that remain are the ones docs/audits/bypass-actor-identity.md keeps in its reviewer-confirmed half, and DEPENDENCIES_TOKEN itself is still in the scope of pull_request-triggered workflows in shakenfist, client-python and kerbside, which is why 2a's scope survey below stands. The || github.token fallback stays harmless, because github.token is not a bypass actor and its push is simply refused; nobody should add the Actions app as a bypass actor to "fix" that refusal. PLAN-review-import.md does not move prune to pull requests, so that alternative remains a template change this plan does not make.
  2. What does "a pull request is required" mean with one maintainer? A required approval count of one cannot be met by the author. Default: require a pull request with zero required approvals, plus required status checks. Rulesets require check contexts by job name, not workflow file, so step 2a names them from actions' ci.yml. Decision 1 settles them as Check paths, Lint, Unit tests and gitleaks, with Automated reviewer deliberately not required; read the decision rather than this default, which named three before the survey found five jobs. Lint and Unit tests skip on a review-only change, which 2a measured is enough to satisfy the rule. The gain is that nothing lands without CI and a visible record. It is not gated on a second person. And a required check that runs workflow code from the pull request itself can be edited by that pull request to pass, so step 2a also looks at an organisation "require workflows" rule, sourced from a protected ref, as the stronger form. The spec says all of this rather than implying more.
  3. Should GitHub-owned actions (actions/*, github/*) be exempt from sha-pinning? They are the bulk of the references (about 70% of all 633, and over 80% of the 540 third-party ones) and the lowest risk. Default: no exemption. One rule is easier to hold than one with a carve-out (the same reasoning reusable-workflow-secrets gives for local callees), and the Renovate preset makes the cost of the pins uniform.
  4. Is the extra Renovate pull request volume acceptable? Today a @v4 tag silently absorbs every v4.x release. Once pinned, each release becomes a digest pull request. Default: measure it in phase 3a on this repository before deciding the fleet rollout. If volume is the problem, the answer is a grouping rule (one pull request per repository for all action digests), not dropping the pins. Grouping interacts with #88 (standardise renovate groupings), so check that issue's state first. To be answered in phase 4, which carries the measurement over the December 2026 and January 2027 windows. The grouping rule exists already: phase 3 found that the preset's CI-tooling group captures digest pins and bumps, one monthly pull request per repository.
  5. Does Renovate pin owner/repo/.github/workflows/x.yml@ref reusable-workflow references the same way it pins actions? This only matters for third-party reusable workflows, and there are none today. Default: the criterion measures them anyway, and phase 3a confirms the Renovate behaviour against a fixture rather than assuming it. Answered from Renovate's source rather than a fixture, in phase 3's step 3a citations: yes, with the same helper. lib/modules/manager/github-actions/extract.ts:111 at tag 44.227.4 types a job-level reusable workflow workflow and every other reference action, and helpers:pinGitHubActionDigests pins both dep types. Re-read on 2026-11-21 at 44.251.0, the version renovate-fleet.yml pins: that line and the helper are unchanged.

Execution

Phase Status Merged
1. Finish the inherit rollout Complete development 8df8179 (#209); instar bdc8905 (#617); shakenfist e4c7726 (#4404); occystrap c583d68 (#152); client-python 68f295f (#415); agent-python 4bf7763 (#148); client-python-k3s 03998e0 (#83); clingwrap 125eb20 (#141); divergulent 8a2852e (#125); library-utilities 832d82d (#67); sfui ad0d6a2 (#44)
2. Make actions main require a pull request Complete development 951fef7 (#388); development 9bd865d (#392)
3. Pin third-party actions to a sha Complete development 6170a78 (#406); development 528e46c (#407); development 4db8f79 (#409); development 9805498 (#429)
4. Third-party action pinning criterion Blocked
5. Record the policy Not started
6. Shared workflows instead of copied templates In progress
7. Push audit Not started

Phase 2 was planned on 2026-11-11, once PLAN-bot-bypass-identity.md phase 3 had merged (e460a2b and 38f15f1) and made the review-marks App the bypass actor its open question 1 names. Nothing in this plan's phase 3 depends on phase 2, so the two could run in either order; the table keeps the phases in the order the plan reasons about them. Phase 2 ran first in the end, although phase 3 was planned first: phase 3 was written on 2026-10-31 while 2a was still held, and re-planned on 2026-11-13 once phase 2 had landed and the shared Renovate preset existed.

Phase 3's step 3b, the criterion, became phase 4 on 2026-11-21, and the phases after it were renumbered: the policy write-up, shared workflows and the push audit are now phases 5 to 7. This file uses the new numbers throughout. Commits and pull requests from before that date use the old ones; the date is AEDT, as are this plan's other dates, so the split's own commits read 2026-11-20 in UTC. Phase 3 was closed out on 2026-11-22, in phase 4's first commit, which recorded the merge commit of the pull request that made the split.

Phase 6 was planned on 2026-11-29 and runs before phases 4 and 5, so the order of this table is no longer the order of execution. Phases 4 and 5 are held: step 4a waits on PLAN-renovate-cadence.md phase 3's fleet sweep plus two weeks, and phase 5's step 5a cites the specification 4a writes, so it cannot land first either. Phase 6 depends only on phase 2, which is complete. The numbers are not reshuffled to match, for the reason phase 6's decision 1 gives: they are cited from commits, pull requests and plan-blockers notes that a rename cannot reach. Read the phase sections, not this table's order, to see what is available to work on.

Phase 1: finish the inherit rollout

Planning effort: medium. Review effort: high for instar (step 1a), which is the only repository where a callee reads a real secret.

Scope. Remove every live secrets: inherit in the fleet: at the survey, 17 lines in 10 repositories, closing 13 issues. In this repository, one correction to a spec and a docstring. Out of scope: the other findings on the export-repo-config and ci-review-automation issues, and any other drift between the local test-drift-fix.yml copies and their template. Phase 1 changes only the token references in those copies.

What the survey found (2026-10-02, against default branches through the GitHub API; the master plan's Situation section was corrected to match, and later steps should not redo that):

  • There are no live pr-auto-review.yml inherits. Local clones of sfui and client-python-k3s still had them, but the default branches did not. ci-review-automation has no part in this phase.
  • The live export-repo-config.yml inherits were in nine repositories (table in Situation). At the survey none of their issues had a pull request in flight.
  • actions/.github/workflows/smoke-cluster.yml and export-repo-config.yml read no secret. Each already carries a comment saying so (lines 18 and 9), so for those two, deleting the line is the whole fix.
  • The local test-drift-fix.yml copies in instar, occystrap and shakenfist have drifted from the template. templates/test-drift-fix/test-drift-fix.yml uses github.token (lines 169, 378, 394, 441). The copies still use secrets.GITHUB_TOKEN: instar at lines 145, 248, 644, 661 and 711, occystrap at 173, 394, 410 and 457, shakenfist at 156, 375, 391 and 438.
  • instar's copy reads secrets.GITLAB_TESTDATA_TOKEN (line 120, the "Prepare instar-testdata" step). That contradicts both the fe4b3ba commit message and docs/audits/reusable-workflow-secrets.md, which say no callee in the fleet reads a secret. The original brief told the implementer to stop and report if this happened, so the plan now decides it instead (decision 2).
  • instar's GITLAB_TESTDATA_TOKEN is set in the env: of the one "Prepare instar-testdata" step, not job-wide, so passing it by name does not expose it to the later steps that run pull request code. The calling workflow is maintainer-triggered through pr-bot-trigger.

Decisions.

  1. This phase is planned on the master plan's branch, not a new worktree. The master plan has not merged yet, a branch cut from main would not contain it, and phase 1's code lands in other repositories anyway. Only step 1f lands here, as its own commit on this branch.
  2. instar passes GITLAB_TESTDATA_TOKEN by name rather than losing it. test-drift-fix.yml declares it under on.workflow_call.secrets with a description and required: false, so the copy still works when triggered directly. pr-fix-tests.yml passes GITLAB_TESTDATA_TOKEN: ${{ secrets.GITLAB_TESTDATA_TOKEN }}. This is the named form that the reusable-workflow-secrets spec asks for, and the first live use of it in the fleet, so it is the worked example phase 5 will cite.
  3. Every local test-drift-fix.yml moves from secrets.GITHUB_TOKEN to github.token, matching the template. Whether secrets.GITHUB_TOKEN resolves in a called workflow that was passed nothing is a question nobody here has verified. github.token makes it moot, and it is what fe4b3ba already did to the template for the same reason.
  4. One pull request per repository, one commit per issue, as consistency-fix prescribes. client-python, instar and occystrap each close two issues from one pull request.
  5. Merge order: low risk first, shakenfist last. The six repositories with only an export-repo-config line go first. They have nothing to break: the callee reads nothing, and the workflow runs on its own schedule. Then client-python and occystrap, then instar, then shakenfist, whose four smoke-cluster callers sit on its most expensive lanes.
Step Effort Model Isolation Brief for sub-agent
1a high opus worktree instar, closing #610 and #600. (1) In .github/workflows/export-repo-config.yml, delete the secrets: inherit line under the job calling shakenfist/actions/.github/workflows/export-repo-config.yml@main. Commit, citing #600. (2) In .github/workflows/test-drift-fix.yml, add secrets: GITLAB_TESTDATA_TOKEN: {description: 'Read access to the instar-testdata GitLab repository, used by Prepare instar-testdata.', required: false} under on.workflow_call, and replace every ${{ secrets.GITHUB_TOKEN }} (lines 145, 248, 644, 661, 711) with ${{ github.token }}. In .github/workflows/pr-fix-tests.yml, replace secrets: inherit under job fix-tests with secrets: / GITLAB_TESTDATA_TOKEN: ${{ secrets.GITLAB_TESTDATA_TOKEN }}. Commit, citing #610. Then grep both files for any other secrets. reference; anything else must be declared and passed the same way. Run actionlint and pre-commit run --all-files. Re-run scripts/audit-check.py from shakenfist/development against the worktree, and confirm reusable-workflow-secrets and export-repo-config no longer report the inherit. Open one pull request whose body closes both issues. Do not merge.
1b medium sonnet worktree shakenfist, closing #4380. Delete the secrets: inherit line under jobs smoke_collection, functional_matrix_merge_collection and ansible_modules_collection in .github/workflows/functional-tests.yml, under functional_matrix_collection in scheduled-tests.yml, and under fix-tests in pr-fix-tests.yml. The callee smoke-cluster.yml in shakenfist/actions reads no secret; its line 18 says so. In test-drift-fix.yml, replace ${{ secrets.GITHUB_TOKEN }} at lines 156, 375, 391 and 438 with ${{ github.token }}, then grep for any remaining secrets.; there should be none, and if there is one, stop and report. Run pre-commit and the audit check as in 1a. Open the pull request with "Fixes #4380". Only smoke_collection runs on a pull request; functional_matrix_merge_collection and ansible_modules_collection run in the merge queue, so the merge queue run is the verification for those two.
1c medium sonnet worktree occystrap, closing #150 and #148. Same shape as 1b: delete the export-repo-config inherit (commit citing #148), delete the fix-tests inherit in pr-fix-tests.yml, and replace ${{ secrets.GITHUB_TOKEN }} at test-drift-fix.yml lines 173, 394, 410 and 457 with ${{ github.token }} (commit citing #150). Run pre-commit and the audit check, then open one pull request closing both issues.
1d medium sonnet worktree client-python, closing #410 and #409. Delete the secrets: inherit under job functional_matrix in .github/workflows/functional-tests.yml (callee smoke-cluster.yml, reads no secret; commit citing #410), and the one in export-repo-config.yml (commit citing #409). Run pre-commit and the audit check, then open one pull request closing both issues, and let its functional-tests run pass.
1e low sonnet worktree In each of agent-python (#146), client-python-k3s (#79), clingwrap (#138), divergulent (#121), library-utilities (#63) and sfui (#38): delete the secrets: inherit line in .github/workflows/export-repo-config.yml, run pre-commit, and open a pull request with "Fixes #N". One pull request per repository. Touch nothing else, even if the same issue lists other findings.
1f low sonnet none In this repository (branch reusable-workflow-secrets), correct the claim that no callee reads a secret. The Why section of docs/audits/reusable-workflow-secrets.md says "no reusable workflow in the fleet read a secret" and that every inherit "is fixed by deleting the line". The ReusableWorkflowSecrets.run docstring in scripts/audit/checks/ci_workflows.py (around line 2186) says "on 2026-09-29 was every callee in the fleet". Both should say that instar's local test-drift-fix.yml read GITLAB_TESTDATA_TOKEN and was moved to the named form, and every other inherit was a deleted line. Do not add a consistency-audit marker or touch compliance.md. Run pre-commit run --all-files.

Risks and mitigations.

  • instar's test data fetch fails silently after the change. If the secret name is wrong, the step gets an empty token. prepare-testdata.sh should then fail at authentication rather than carry on. Once 1a has merged, the management session triggers pr-fix-tests once on a throwaway instar pull request and reads the "Prepare instar-testdata" step log. That trigger is maintainer-only, through pr-bot-trigger: comment @shakenfist-bot please attempt to fix (templates/test-drift-fix/README.md:20).
  • pr-fix-tests in occystrap and shakenfist is not exercised by pull request CI, because it runs only on a maintainer comment. The same post-merge trigger, once per repository, is the check.
  • A smoke-cluster caller breaks. The callee reads no secret and says so. client-python's pull request run and shakenfist's smoke_collection exercise a changed caller on the pull request. shakenfist's other two run in its merge queue before landing, and its scheduled caller runs that night. The management session checks the next scheduled run.

Definition of done.

  • This prints one checked line per repository, with a non-zero count, and nothing else. A failed API call prints API ERROR rather than nothing, so an outage cannot read as a clean fleet. GitHub only runs workflows from .ya?ml files directly in .github/workflows, so the listing skips anything else rather than fetching a subdirectory as if it were a file:
for r in agent-python client-python client-python-k3s clingwrap \
    divergulent instar library-utilities occystrap sfui shakenfist; do
  files=$(gh api repos/shakenfist/$r/contents/.github/workflows \
      --jq '.[] | select(.type == "file" and (.name | test("\\.ya?ml$"))) | .name') ||
    { echo "$r: API ERROR listing workflows"; continue; }
  n=0
  for f in $files; do
    body=$(gh api repos/shakenfist/$r/contents/.github/workflows/$f --jq .content) ||
      { echo "$r: $f: API ERROR"; continue; }
    n=$((n + 1))
    echo "$body" | base64 -d | grep -qE '^\s*secrets:\s*inherit' && echo "$r: $f"
  done
  echo "$r: checked $n"
done
  • The 13 issues are closed: client-python#410 and #409, instar#610 and #600, occystrap#150 and #148, shakenfist#4380, agent-python#146, client-python-k3s#79, clingwrap#138, divergulent#121, library-utilities#63 and sfui#38. The next morning's audit closes any that the pull request bodies did not.
  • gh api repos/shakenfist/instar/contents/.github/workflows/test-drift-fix.yml --jq .content | base64 -d | grep -oE '\$\{\{ *secrets\.[A-Za-z_]+' | sort -u prints exactly ${{ secrets.GITLAB_TESTDATA_TOKEN. Matching the expression rather than secrets. keeps a comment that mentions secrets.GITHUB_TOKEN from reading as a failure.
  • The post-merge pr-fix-tests triggers in instar, occystrap and shakenfist each got past their token-using steps.
  • The Merged cell records each landing as <repo> <sha> (#pr).

Back brief gate. Step 1a is implemented first, and its pull request is reviewed before 1b to 1e start. This is about the order of the work, not the order of merging; decision 5 still decides when each pull request merges. Step 1a is the only step that adds rather than deletes, and its shape (declared, optional, described) is the pattern phase 5 documents.

Pull requests. Opened 2026-10-02. The Merged cell was filled from this list at close-out on 2026-10-31. The reusable-workflow-secrets spec still describes instar#617 as proposed; step 5a puts it in the past tense. The development#209 merge also carried this plan itself, so its diff is wider than step 1f.

Step Pull request Closes State
1a instar#617 #600, #610 Merged as bdc8905 (2026-10-04)
1b shakenfist#4404 #4380 Merged as e4c7726
1c occystrap#152 #148, #150 Merged as c583d68
1d client-python#415 #409, #410 Merged as 68f295f
1e agent-python#148 #146 Merged as 4bf7763
1e client-python-k3s#83 #79 Merged as 03998e0
1e clingwrap#141 #138 Merged as 125eb20
1e divergulent#125 #121 Merged as 8a2852e
1e library-utilities#67 #63 Merged as 832d82d
1e sfui#44 #38 Merged as ad0d6a2
1f development#209 -- Merged as 8df8179 (2026-10-03)

Step 1f landed differently from its brief, deliberately. Rather than updating the docstring's dated claim about the fleet's callees, it removed it: the docstring now says what the check does, and the spec's Why section is the single record of what callees were found to read. A docstring survey goes stale every time a callee changes.

In review, divergulent#125 and library-utilities#67 also replaced a comment that called the deleted secrets: inherit necessary, with the template's comment. The comment was wrong: the callee reads no secret.

Close-out (2026-10-31). Checked against the default branches through the GitHub API: the definition of done's fleet script prints one checked line per repository and no finding; the 13 issues are closed; instar's test-drift-fix.yml reads exactly secrets.GITLAB_TESTDATA_TOKEN. One item was not met and is deferred rather than dropped: the post-merge pr-fix-tests trigger was never run in instar, occystrap or shakenfist. Every run of that workflow in the three repositories since 2026-10-04 was skipped, because it runs only on a maintainer's comment and nobody has asked for a fix since. It is the only proof that instar's named token reaches its "Prepare instar-testdata" step, so it stays in Future work until the first real trigger, whose "Prepare instar-testdata" step log answers it.

Phase 2: make actions main require a pull request

This covers everything actions serves at @main: reusable workflows and composite actions alike. Composite actions are the stronger case for it, since they run inside the caller's job.

Planning effort: high. This is what decides what the fleet trusts, and it touches GitHub settings that this repository cannot test.

Scope. In: the operator change to shakenfist/actions' one branch ruleset, 21132503 -- a pull-request rule, required status checks, and the review-marks App as its only bypass actor (2a); and the moving-ref-source-protection criterion, its specification and its tests, so that the change cannot quietly regress (2b). Out: pinning third-party references, which is phase 3; the policy write-up, which is phase 5; any change to actions' ci.yml, including the job names the ruleset will require and the path filter that skips two of them; comparing the ruleset's bypass list in code, which waits on #352 giving the audit a read identity that can see it; narrowing DEPENDENCIES_TOKEN, which PLAN-bot-bypass-identity.md owns; and an organisation-level "require workflows" rule (decision 6).

What the survey found (2026-11-11, against this checkout at bcd768d and the GitHub API with the operator's own credential. The master plan's text for this phase was corrected where it was stale, and a later step need not redo that.)

  • Nothing of this phase has shipped: moving-ref-source-protection appears nowhere under scripts/ or docs/.
  • The ruleset has not drifted from what the 2a brief recorded on 2026-11-09. shakenfist/actions has exactly one ruleset, 21132503, "Protect default branch history", enforcement: active, condition ~DEFAULT_BRANCH, and two rules, deletion and non_fast_forward. There is no pull_request rule and no required_status_checks rule. Read with an admin credential the bypass_actors key is present and [], so the App becomes the only entry, as the brief provides. No organisation ruleset reaches the branch.
  • actions already carries the whole workflow half of the review mark path. Its .github/workflows/prune-reviews.yml has the App-token step (actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510, v3.3.0) guarded by HAS_REVIEW_MARKS_KEY, and pushes with steps.app-token.outputs.token || github.token. The review-marks environment exists, with exactly one custom branch policy, main. What is missing is the key: that environment holds no secret and actions holds no repository secret at all, which is why the push falls back to github.token today.
  • So 2a adds the key and nothing else of that shape. REVIEW_MARKS_APP_CLIENT_ID is an organisation variable with visibility: all, so actions already resolves vars.REVIEW_MARKS_APP_CLIENT_ID; no repository or environment copy of it exists in andris, hunkydory, kerbside, ryll or actions.
  • The App is as PLAN-bot-bypass-identity.md describes it: shakenfist-review-marks, app id 5538020, installation 176803138, permissions exactly contents: write and metadata: read, repository_selection: selected. Which repositories that installation covers cannot be listed from a personal access token -- user/installations/176803138/repositories answers 403, "You must authenticate with an access token authorized to a GitHub App" -- so that actions is not among them is read from the organisation's GitHub Apps page, or inferred from the environment secret listings: andris, hunkydory, kerbside and ryll each hold REVIEW_MARKS_APP_KEY and actions does not. 2a installs through that page rather than the API.
  • ci.yml has five jobs, not the three open question 2 names. Check paths (line 63), Lint (121), Unit tests (180), gitleaks (231) and Automated reviewer (266). The trigger is on: pull_request with no paths: or paths-ignore:, so the brief's reasoning holds: the filter is check_paths' output, consumed by Lint and Unit tests through needs.check_paths.outputs.code_changed != 'false', and a job skipped that way reports success to a required check. Lint, Unit tests and gitleaks additionally skip a fork pull request. gitleaks has no check_paths dependency, so it already runs on every non-fork pull request, a review-only one included -- the fork guard above still applies to it. Decision 1 settles the contexts.
  • A non-active ruleset is already absent from the effective rules. instar's ruleset 19389569 is enforcement: disabled, targets ~DEFAULT_BRANCH and carries a copilot_code_review rule, and repos/shakenfist/instar/rules/branches/develop returns only ruleset 20783686's five rules. Of the twelve audited repositories that have any ruleset, that is the only one not active. So disabled needs no measurement, and the enforcement read in decision 2 is there for evaluate, which nothing in the fleet uses and which the endpoint's documentation does not settle.
  • The helpers the criterion needs already exist, and the brief named the wrong model. branch_rules(repo, branch) and default_branch_rules(repo) are at scripts/audit/checks/github_config.py:47 and :68, and MergeQueueConfig (line 302) and ReleaseMergeQueue (line 321) read through them. ReleaseMergeQueue is the model: it is the one that pairs default_branch_rules with an applies() returning a reason. DeleteBranchOnMerge is at line 269 rather than 213, and is the wrong shape anyway -- it asks GraphQL for a repository setting. The brief was corrected.
  • The repository list belongs in a class constant, not a module one. ScopeCoverage (line 710) is the existing pattern for a criterion that can only be measured somewhere particular: SCOPE_REPO = 'development' as a documented class attribute, with the reason returned from applies(). The brief said "a module constant"; corrected.
  • Nothing in the audit reads required_status_checks today, so this criterion is the first. BypassActorIdentity (line 521) does read the default branch's pull_request rules, at line 580, but only on the path where the review-marks environment is absent. actions has that environment, so it is already measured on the other path and 2a does not change its verdict.
  • Adding a criterion is a documented six-file procedure: docs/consistency-audits.md, "Adding a criterion" (line 465), which PUSH-AUDIT.md and AGENTS.md link to rather than copy. The 2b brief now cites it instead of carrying its own list. Two of its rules the brief had not carried: the applicability test goes in applies(repo) rather than at the top of run(), because the scheduler asks the cheap question first; and a specification page must carry no consistency-audit marker block, which test_audit_update_docs.py fails on.
  • The pinned tool-failure list does not change. test_an_empty_directory_is_a_tool_failure_exactly_where_expected (scripts/tests/test_metadata.py:656) pins an exact list of the criteria that cannot reach a verdict without git or GitHub. Its fixture repository is named testrepo (repo(), line 540), so a criterion applying only to actions skips before any API call and does not join the list -- which is why scope-coverage is absent from it too.
  • The audit's read token can read a ruleset object; only bypass_actors is withheld. PLAN-bot-bypass-identity.md's phase 1 record has AUDIT_READ_TOKEN answering has bypass_actors: False for repos/shakenfist/hunkydory/rulesets/23805020 on 2026-10-31 under the security manager role, run 41130157778. It answered, which is what decision 2 needs: enforcement is readable. Taken from that record rather than measured again, as the brief requires.
  • The DEPENDENCIES_TOKEN residual is narrower than open question 1 implies. An organisation-wide code search puts the token in six workflows in three repositories: shakenfist (code-formatting.yml, functional-tests.yml, pin-indirect-dependencies.yml, sync-external-docs.yml), client-python (code-formatting.yml) and kerbside (pin-indirect-dependencies.yml). Their triggers are pull_request, workflow_dispatch, schedule and merge_group; none uses pull_request_target, issue_comment or workflow_run, and a fork's pull_request run is handed no secrets. So the token reaches a job only for someone who can already push a branch to one of those three repositories. Recorded here so that 2a does not survey it again.
  • #153 is already closed, on 2026-10-03, the day development#209 landed phase 1. Phase 5's brief still said to close it from its pull request body, and the Related issues list still called it the issue this plan closes; both were corrected. What phase 5 writes is unaffected.
  • 352, the audit's read identity, is open, so 2b's shape is the

    fallback one this section describes.

Everything else the section claimed held: actions does serve composite actions at @main, the key must be an environment secret rather than a repository or organisation one, and a ruleset bypass cannot be narrowed to a path.

Decisions.

  1. The required contexts are Check paths, Lint, Unit tests and gitleaks, and Automated reviewer is not one. The first four either report or skip for every pull request this repository will see, and a skipped job satisfies a required check, so none of them wedges a review-only or a fork pull request. gitleaks is included although open question 2 did not name it: it is the secret scan, it already runs on every pull request, so requiring it costs nothing and not requiring it would be the odd choice. The requirement protects the first-party case only: gitleaks carries the same fork guard as Lint and Unit tests, so on a fork pull request it skips and the skip satisfies the required check. secret-scan.yml and the organisation's push protection are what cover forks, and a required check that could not run on one would wedge every fork pull request. Taken together with the fork guards on Lint and Unit tests, this means only Check paths actually reports on a fork pull request and the other three are satisfied by skipping: the required checks are a first-party gate, and phase 5 says so rather than describing them as the enforcement point for every contributor. Automated reviewer is excluded deliberately. It needs the other three, it writes to the pull request it is reviewing, and it is the one lane whose outcome depends on a service outside this fleet, so requiring it would let an outage there hold every merge. Required approvals stay at zero, per open question 2: with one maintainer a count of one cannot be met by the author.
  2. The criterion measures the two rules from the effective-rules endpoint, and enforcement from each ruleset that contributed them. repos/{org}/{repo}/rules/branches/{default} is the only endpoint that resolves organisation and repository rulesets together, and the survey measured that it already excludes a disabled ruleset. It does not settle evaluate, where a rule is reported on but does not block, so the check collects the ruleset_id of each rule it matched, reads repos/{org}/{repo}/rulesets/{id}, and fails unless every one is active. The read token can do that (survey). It also fails when the required_status_checks rule's context list is empty, which is the shape an operator leaves behind by removing the contexts but not the rule: it satisfies "the rule exists" while enforcing nothing. Checking the contexts against ci.yml's job names needs the workflow read and stays in Future work; checking that the list is not empty needs nothing. A ruleset whose ruleset_source_type is Organization -- the field is spelled that way on the effective-rules response, beside ruleset_source and ruleset_id, not source_type -- is read from orgs/{org}/rulesets/{id}. Under today's read token that read does not answer (decision 6's measurement), so an organisation-sourced ruleset is a ToolFailure rather than a verdict until #352 lands. Nothing in the fleet reaches that path: the survey measured that no organisation ruleset contributes a rule to actions' default branch.

One thing the endpoint does not do, measured because the review of this phase asserted the opposite: it does not hide rules the calling credential can bypass. On instar's ruleset 20783686 the operator's own credential reads current_user_can_bypass: "always", through the sf-can-skip-merge-queue team, and repos/shakenfist/instar/rules/branches/develop still returns all five of its rules including pull_request and required_status_checks (2026-11-11). So the criterion's fail verdict does not depend on the audit identity holding no bypass, and needs no fail-closed path for that case. Nothing in this repository ever recorded such a behaviour; the claim was checked rather than taken. 3. The repositories the fleet consumes at a moving ref are a class constant, MOVING_REF_REPOS = ('actions',), with the reason returned from applies(). Follows ScopeCoverage.SCOPE_REPO. Everywhere else the criterion reports not_applicable naming the repository, which is what keeps it from paying for an API call on 23 repositories that cannot fail it. (The literal shape was revised when the step ran: it is one table keyed org/name with each repository's expected contexts beside it, for the reasons in the step 2b record below. The decision stands as written; only its literal is out of date.) 4. The bypass list stays confirmed by a reviewer rather than measured, and this rests on a measurement rather than an assumption: the audit's read token answers the ruleset endpoint but is not given bypass_actors, measured twice in PLAN-bot-bypass-identity.md's phase 1, the second time under the security manager role. The token is not widened to make the check fit. The documented set -- one actor, the shakenfist-review-marks App, app id 5538020 -- goes in the specification's "Required, but confirmed by a reviewer" half, and becomes code when #352 lands, at which point a missing key is an error and never an empty set. 5. 2b lands in its own pull request, after 2a has been applied and proved. The criterion fails actions until the ruleset change is in place, and it applies to no other repository, so landing it second means the first scheduled audit after it reports one more compliant row and files no issue. That is the inverse of phase 3's problem (its decision 4), and it is cheap here because only one repository is measured. 6. An organisation "require workflows" rule is out of scope, and recorded as future work. Open question 2 names it as the stronger form, and it is one: a required check whose workflow the pull request can edit is a check the pull request can make pass. But it wants a ruleset on a protected ref to source the workflow from, which is what this phase creates rather than something it can assume; the audit's token could not read the organisation ruleset endpoint on 2026-10-29 (PLAN-bot-bypass-identity.md, step 1a), so no criterion could measure it yet; and the residual it would close is bounded by the edit being visible in a pull request, which is the gain open question 2 claims. Phase 5 states that limit rather than implying more. 7. The order inside 2a is install, key, bypass, then rule. The brief already says so; it is restated as a decision because getting it wrong is silent. actions holds no key today, so the moment the pull-request rule is active its prune-reviews push with github.token is refused, and nothing outside actions reports that: bypass-actor-identity measures the environment, not the push.

Step Effort Model Isolation Brief for sub-agent
2a high opus none Operator step, done by the management session with the operator, not by a sub-agent. Four changes, in this order (decision 7), each read back before the next is made. (1) Install shakenfist-review-marks (app id 5538020, installation 176803138) on shakenfist/actions from the organisation's GitHub Apps settings page, since a personal access token can neither list nor change an installation's repositories (survey). (2) gh secret set REVIEW_MARKS_APP_KEY --repo shakenfist/actions --env review-marks from the key file -- never without --env, never at organisation level. The review-marks environment and its main-only custom branch policy already exist and are not recreated, and REVIEW_MARKS_APP_CLIENT_ID is already an organisation variable visible to all repositories, so nothing is added for it. Record repos/shakenfist/actions/environments/review-marks/secrets and gh secret list --repo shakenfist/actions, which must name no repository-level copy. Adding a repository is a key rotation and not a new key for that repository alone: docs/code-review-tracking.md step 7.3 says to generate one key, set it in actions' environment and again in every environment that already holds the key, read each back, then delete the old key so the App keeps exactly one. This brief did not say so and the step did not do it; the record below says what the state is instead. (3) Add the App as the only bypass actor on ruleset 21132503, with the GET-then-PUT shape under "Template" in docs/audits/merge-queue-config.md, appending {"actor_id": 5538020, "actor_type": "Integration", "bypass_mode": "always"}. Assert has("bypass_actors") on the GET first and stop if it is false: that recipe's (.bypass_actors // []) is right for a caller who can see the key and silently destructive for one who cannot (risk 1). The key was present and [] on 2026-11-11; if anything else is in it by then, add the App beside it and report it rather than removing it -- taking a team bypass away would be PLAN-bot-bypass-identity.md's open question 3 rather than this plan's, whose open question 3 is about sha-pinning exemptions. In the event the GET found the list empty, so this did not arise. (4) Only then add the pull_request rule, with required_approving_review_count: 0, and the required_status_checks rule with exactly the four contexts from decision 1 and the GitHub Actions integration_id, preserving the existing deletion and non_fast_forward rules and the ~DEFAULT_BRANCH condition. Record the whole ruleset JSON in this phase. Then prove it, recording each: a direct push of a trivial commit to main from the operator's own credential is refused; the next prune-reviews run on main has Mint the push token running rather than skipped, its push attributed to shakenfist-review-marks[bot] in repos/shakenfist/actions/rulesets/rule-suites?time_period=day&rule_suite_result=bypass (the way PLAN-bot-bypass-identity.md's phase 3 record proves it for kerbside), and repos/shakenfist/actions/deployments?environment=review-marks empty; and a throwaway review-only pull request reaches a mergeable state with all four contexts reported success or skipped, after which it and its branch are deleted. Do not measure whether the audit token sees bypass_actors: it does not, and 2b takes the fallback shape (decision 4). The DEPENDENCIES_TOKEN scope survey the brief used to ask for is done and recorded above; do not repeat it.
2b high opus worktree Add a MovingRefSourceProtection class to scripts/audit/checks/github_config.py: id moving-ref-source-protection, issue_title Moving ref source protection, spec docs/audits/moving-ref-source-protection.md, template None, no column. Follow the procedure in docs/consistency-audits.md, under "Adding a criterion" -- it is the one list of what a criterion touches, so read it rather than working from a list in this brief. Seven files, not the six that section is usually quoted as: this criterion reaches the GitHub API, so its id also goes in NETWORK_CHECKS in scripts/audit_snapshot.py. That matters more than a red test. Without the id, audit-raised.py reads a tool failure from this check as a check that broke rather than as a network call that did not answer, and fails the audit leg -- holding back the whole fleet's compliance page and filing an audit-failure issue. It is also exactly the path decision 2 routes an organisation-sourced ruleset down. NetworkCheckListTest re-derives the list from the checks and fails until the id is there, and PLAN-TEMPLATE.md's success criteria still say "five of its files", so neither the template nor a remembered file count is a safe guide. Model the check on ReleaseMergeQueue (github_config.py:321) and not on DeleteBranchOnMerge: read through the module's own default_branch_rules(repo) (line 68), and put the applicability test in applies(repo), returning a reason that names the repository. The repositories are a class constant, MOVING_REF_REPOS = ('actions',), documented with a #: comment (decision 3). Fail unless both a pull_request rule and a required_status_checks rule are in the effective rules; then, for each distinct ruleset_id those two rules came from, read repos/{org}/{repo}/rulesets/{id} and fail unless every one is enforcement: active (decision 2), reading a ruleset whose ruleset_source_type is Organization (that spelling, beside ruleset_source and ruleset_id) from orgs/{org}/rulesets/{id}, which under today's read token does not answer and so is a ToolFailure, as decision 2 now says. GitHub not answering is a ToolFailure, never a verdict. Write no bypass_actors comparison and no test of one: the audit's read token is not given the key (decision 4), so the one-actor documented set goes in the specification's "Required, but confirmed by a reviewer" half, with the measurement that says why. Tests in scripts/tests/test_github_config.py, with CheckTestCase (in scripts/tests/base.py) and a stubbed client: pass; fail on a missing pull_request rule; fail on a missing required_status_checks rule; fail on a contributing ruleset in enforcement: evaluate; fail on a required_status_checks rule whose context list is empty, with the message naming decision 1's four contexts so the issue body says what to restore; not-applicable for a repository outside MOVING_REF_REPOS, asserting the reason names the repository, since that reason is what an operator reads off the compliance page for 23 of the 24; and three tool-failure cases with assert_tool_failure() -- one where the rules/branches read does not answer, one where the per-ruleset rulesets/{id} read does not answer, and one where a matched rule's ruleset_source_type is Organization while the repository-level read answers normally, which is a tool failure by construction rather than from a failed read, and whose message should name the organisation endpoint and #352. The second path is new to the audit, so no existing test covers its shape, and AGENTS.md treats the tool-failure distinction as the one a criterion must never get wrong: a fail files an issue for our own outage and a not_applicable closes one. Cite symbols rather than line numbers when reading this brief -- the citations above were corrected once already between planning and execution. In scripts/tests/test_metadata.py add the criterion's lines to FROZEN_METADATA and FROZEN_ISSUE_TITLES only, and leave test_an_empty_directory_is_a_tool_failure_exactly_where_expected's list alone: its fixture repository is testrepo, so this check skips before any API call (survey). The specification follows the structure in docs/audits/README.md, links compliance.md#moving-ref-source-protection under ## Projects, carries no consistency-audit marker block, and cites this plan's Situation for the landing counts; add its line to the criterion index in docs/audits/README.md. Open the pull request only once 2a is applied and proved, so that the criterion passes on the day it lands (decision 5), and say in the commit what it measured against actions.

Risks and mitigations.

  • A ruleset PUT built from a read that could not see bypass_actors empties the bypass list silently. The GET-then-PUT recipe in docs/audits/merge-queue-config.md defaults the field with (.bypass_actors // []), which is right for a caller who can see it and destructive for one who cannot. The operator checks has("bypass_actors") on the GET before editing and re-reads the list afterwards; their credential saw the key on 2026-11-11.
  • A required context that never reports wedges every pull request. The operator opens a throwaway review-only pull request before trusting the rule, and confirms each of the four contexts resolves to success or skipped and that the merge button is offered. If one does not report, the rule comes off again rather than being left to wedge the next review-only pull request. The pull_request rule's require_extra_approval_for_unattributed_changes has the same symptom from a different cause -- it asks for one approving review on a pull request carrying a commit GitHub cannot attribute to an account. That is only unobtainable on a pull request the sole maintainer authored; on an automation's pull request the maintainer can approve it, and the fleet's bot commits are attributed anyway (bot@shakenfist.com resolves to shakenfist-bot). It is left true because every other ruleset in the fleet pairs it with zero required approvals (measured on andris, hunkydory, instar, kerbside and ryll, 2026-11-11) and none has wedged; the escape, if one ever does, is an admin edit to the ruleset, since the operator holds no bypass.
  • Renaming a job in ci.yml breaks the required context, and this criterion will not notice. It measures that a required_status_checks rule exists, not that its contexts match the workflow's job names. Recorded as future work. The symptom is loud -- every pull request stops offering a merge -- and the fix is one ruleset edit.
  • Installing the App on actions widens what one key reaches, from four repositories to five. The mitigations are unchanged from PLAN-bot-bypass-identity.md: the permission is contents: write only, the key is an environment secret whose branch policy admits only main, and the token is minted per run and revoked when the job ends. 2a adds no repository-level or organisation-level copy, and the definition of done reads the listings to show it.

What is genuinely different, and was not written down until the review of this phase asked: the widening extends an accepted residual to the one repository this plan exists to protect. docs/audits/bypass-actor-identity.md records that the runner-controller App shakenfist-k3s-ci-arc holds administration: write on hunkydory, so whoever holds that App's key can widen hunkydory's review-marks branch policy, read the review-marks key from a branch workflow, and mint push tokens for every repository the App is installed on. Until 2a that set was four product repositories; it now includes actions, whose composite actions run inside every caller's job at @main, so the chain ends in a bypass of the ruleset 2a just created. It is accepted knowingly rather than made a prerequisite, because narrowing another App's permission is not this plan's work and blocking on it would leave prune-reviews unable to land on actions at all. The residual is recorded in the criterion's specification, phase 5 states it rather than implying the bypass is bounded by this phase alone, and narrowing the runner-controller App is Future work.

Closed on 2026-11-29, after this phase was written. 33fl's PLAN-k3s-ci-runners.md phase 5 made the runner scale set organisation-scoped and the App's administration: write therefore unnecessary, so the chain described above no longer exists. The reasoning is kept as written because it is why 2a was accepted at the time; docs/audits/bypass-actor-identity.md carries the current state and the check that it has not come back.

Definition of done.

  • repos/shakenfist/actions/rules/branches/main returns a pull_request rule and a required_status_checks rule, and that rule's contexts are exactly Check paths, Lint, Unit tests and gitleaks.
  • repos/shakenfist/actions/rulesets/21132503 reads enforcement: active, and its bypass_actors holds exactly one entry: actor_id 5538020, actor_type Integration.
  • repos/shakenfist/actions/environments/review-marks/secrets names REVIEW_MARKS_APP_KEY, and gh secret list --repo shakenfist/actions names no copy of it.
  • A direct push of a trivial commit to actions main from the operator's own credential is refused, and the refusal is recorded here.
  • The first prune-reviews run on actions main after 2a shows Mint the push token running rather than skipped; rulesets/rule-suites?time_period=day&rule_suite_result=bypass names shakenfist-review-marks[bot] as the actor of its push; and deployments?environment=review-marks is empty. The first and third are met; the second is not met as of 2026-11-11 -- the run had nothing to push, so the listing is empty. Deferred to Future work; see "Not proved: the push attribution".
  • A review-only pull request opened on actions reaches a mergeable state with all four required contexts reported.
  • python3 -m unittest discover -s scripts/tests -t scripts passes, and scripts/tests/test_metadata.py passes without its pinned tool-failure list having been edited.
  • The first scheduled consistency audit after 2b reports moving-ref-source-protection compliant on actions and not_applicable everywhere else, files no issue, and the commit that landed 2b states that prediction, following "Before and after a change to a check" in docs/consistency-audits.md.
  • docs/audits/moving-ref-source-protection.md exists, is linked from docs/audits/README.md, carries no consistency-audit marker block, and its reviewer-confirmed half names the one bypass actor and says why it is not measured.
  • 389 is closed: the App holds exactly one private key again,

    confirmed from its settings page. Added after the fact, because 2a broke that property rather than finding it broken. It gates this phase's close-out rather than 2b, since 2b measures the ruleset and not the key, and until it is done the fleet cannot revoke a leaked key without breaking a working repository. Nothing in the API can measure it, so the reading is a person's.

Back brief gate. 2a changes a live setting the whole fleet depends on, by hand, in an order whose mistakes are silent. Before touching GitHub, back brief the four changes, their order, and what will be read to prove each one. 2b needs no gate.

Back brief outcome. Four answers, all recorded here because later steps read them. The browser half of 2a -- installing the App and generating a key -- is the operator's, because this session's token can neither list nor change an installation's repositories, and the key is handled only by them. The key is a freshly generated one rather than a reuse: the original was shredded in PLAN-bot-bypass-identity.md step 1b, which the brief did not account for. Decision 5's two pull requests stand as written, with 2a's record first and 2b off updated main, although the ruleset change itself never passes through a pull request -- what the first one lands is the record of it. And this session may push and open both pull requests for this phase.

Step 2a record (2026-11-11, UTC throughout; GitHub renders the ruleset's own updated_at in +11:00). The four changes were made in decision 7's order, each read back before the next. The operator made changes 1 and 2 in the browser and with gh secret set; the management session made changes 3 and 4 through the API.

  1. Installed shakenfist-review-marks on shakenfist/actions from the organisation's GitHub Apps page, taking the installation from four repositories to five. This is the one change nothing in this session can read back directly: a personal access token cannot list an installation's repositories (survey), and user/installations/176803138/repositories answers 403 to this session's token. It is attested twice instead, both indirectly: GitHub accepted app id 5538020 as an Integration bypass actor in change 3, and the prune-reviews run below minted a token from the key, which an App that is not installed cannot do.
  2. Set the key as an environment secret. repos/shakenfist/actions/environments/review-marks/secrets names REVIEW_MARKS_APP_KEY with created_at and updated_at both 2026-11-11T18:48:11Z -- equal, so this is a new secret rather than an overwrite, which is the reading that confirms actions held no key before (decision 7). gh secret list --repo shakenfist/actions prints nothing at all: there is no repository-level copy of this or any other secret. REVIEW_MARKS_APP_CLIENT_ID remains an organisation variable with ALL visibility, unchanged since 2026-10-30, and nothing was added for it. The operator shredded the key file afterwards. repos/shakenfist/actions/environments/review-marks still carries exactly one protection rule, branch_policy, whose one policy is the branch main; no reviewers and no wait timer were added, so a run on main is admitted without an approval and a run on any other ref is not admitted at all.
  3. Added the bypass actor. The GET answered has bypass_actors: true with the list [], so risk 1's guard passed and nothing was removed; the App was appended rather than substituted. The script that made the change refuses to continue when that assertion fails, which is the mitigation risk 1 asks for rather than a promise of care.
  4. Added the two rules, preserving deletion, non_fast_forward and the ~DEFAULT_BRANCH condition. The parameter sets were copied from instar's live ruleset rather than composed from the API reference, which is also where integration_id: 15368 for GitHub Actions comes from. instar requires Can enqueue and Can merge because it has a merge queue; actions has none, so the four contexts here are job names.

Departure from the documented key procedure. Change 2 did half of what docs/code-review-tracking.md step 7.3 requires. That step exists because the App is meant to hold exactly one private key, the one every repository's environment carries, so adding a repository is a rotation: generate a key, set it in the new environment and in every environment that already holds the key, read each back, then delete the old key. Only the new environment was set. The App should now hold two valid private keys -- the older one, carried by andris, hunkydory, kerbside and ryll, and this one, carried only by actions -- so the property PLAN-bot-bypass-identity.md phase 1 closed on, "the App's page lists exactly one private key", is currently false. What the operator shredded was the downloaded file, which is not the same as deleting the old key.

This is a hygiene regression rather than an exposure: both keys are environment secrets behind a default-branch-only policy, both mint per-run tokens that are revoked at job end, and the App's permissions are unchanged. What is lost is the ability to invalidate a leaked key by deleting it, because deleting either one now breaks a working repository. Nothing measures it, and nothing can through the API: bypass-actor-identity reads the environment and its branch policy, and an App's key list is visible only on its settings page. Completing the rotation is one pass over five repositories and is tracked as #389, not deferred to a later phase of this plan, because it is fleet state rather than plan state.

The whole ruleset as read back afterwards, with _links removed:

{
  "id": 21132503,
  "name": "Protect default branch history",
  "target": "branch",
  "source_type": "Repository",
  "source": "shakenfist/actions",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "exclude": [],
      "include": [
        "~DEFAULT_BRANCH"
      ]
    }
  },
  "rules": [
    {
      "type": "deletion"
    },
    {
      "type": "non_fast_forward"
    },
    {
      "type": "pull_request",
      "parameters": {
        "required_approving_review_count": 0,
        "dismiss_stale_reviews_on_push": true,
        "required_reviewers": [],
        "require_code_owner_review": false,
        "dismissal_restriction": {
          "enabled": false,
          "allowed_actors": []
        },
        "require_last_push_approval": false,
        "required_review_thread_resolution": false,
        "require_extra_approval_for_unattributed_changes": true,
        "allowed_merge_methods": [
          "merge",
          "squash",
          "rebase"
        ]
      }
    },
    {
      "type": "required_status_checks",
      "parameters": {
        "strict_required_status_checks_policy": false,
        "do_not_enforce_on_create": false,
        "required_status_checks": [
          {
            "context": "Check paths",
            "integration_id": 15368
          },
          {
            "context": "Lint",
            "integration_id": 15368
          },
          {
            "context": "Unit tests",
            "integration_id": 15368
          },
          {
            "context": "gitleaks",
            "integration_id": 15368
          }
        ]
      }
    }
  ],
  "node_id": "RRS_lACqUmVwb3NpdG9yec41biqPzgFCdNc",
  "created_at": "2026-08-21T17:25:43.123+10:00",
  "updated_at": "2026-11-12T05:49:25.598+11:00",
  "bypass_actors": [
    {
      "actor_id": 5538020,
      "actor_type": "Integration",
      "bypass_mode": "always"
    }
  ],
  "current_user_can_bypass": "never"
}

current_user_can_bypass: "never" is worth noting: the operator's own credential has no bypass, so the only identity that can push to actions main is the App's per-run token. repos/shakenfist/actions/rules/branches/main reports the four rules, all sourced from ruleset 21132503, and its required_status_checks contexts are exactly Check paths, Lint, Unit tests and gitleaks.

One parameter in that JSON deserves its own note, because it reads against decision 1. require_extra_approval_for_unattributed_changes is true while required_approving_review_count is 0, and the first asks for an approving review on a pull request carrying a commit GitHub cannot attribute to an account -- the very approval decision 1 says one maintainer cannot obtain. It came in with the parameter set copied from instar. It is kept rather than cleared because it is the fleet's settled shape, not an instar quirk: the pull_request rule on andris, hunkydory, instar, kerbside and ryll pairs the same true with the same zero count, measured on 2026-11-11, and none of those repositories has wedged. Clearing it on actions alone would make it the one repository configured differently.

The case it can actually wedge is narrower than "any unattributed commit", and the narrowing is worth having written down. For a pull request the sole maintainer did not author, the maintainer is not the author and can supply the approval, so the rule costs a click rather than wedging: that covers Renovate's, which are authored by shakenfist-bot. For a maintainer-authored pull request the approval cannot be obtained at all. And the commits the fleet's automations make are attributed in any case -- bot@shakenfist.com resolves to the shakenfist-bot account, so a prune-reviews or Renovate commit is not an unattributed change to begin with. What remains is one shape: a maintainer-authored branch carrying a commit whose author email is linked to no GitHub account, which is a thing an agent branch with a misconfigured user.email can produce. The escape is an admin edit to the ruleset, since current_user_can_bypass is never. Risk 2 records it beside the other cause of that symptom.

Phase 1's Merged cells are merge commits. The review asked for this because templates/shared-blocks/plan-push-audit-phase.md says a single commit is only ever enough when it is a merge commit, and phase 7 reads that cell as its audit range. All eleven answer 2 to gh api repos/shakenfist/<repo>/commits/<sha> --jq '.parents | length', checked on 2026-11-11, so the cell is a usable range and phase 7 need not re-derive it.

What 2a proved, and the one thing it did not. Each proof is recorded with the reading that establishes it rather than a verdict.

  • A direct push to main is refused. A trivial empty commit pushed from the operator's own credential was declined with GH013, naming both new rules: "Changes must be made through a pull request" and "4 of 4 required status checks are expected". rulesets/rule-suites?time_period=day records it as actor_name: mikalstill, refs/heads/main, result: fail.
  • A review-only pull request still merges. actions#250 added one file under docs/, which the Check paths filter excludes from code. Check paths and gitleaks succeeded; Lint and Unit tests skipped, as their needs.check_paths.outputs.code_changed != 'false' condition intends; Automated reviewer skipped because its dependencies did. The pull request then read mergeable: MERGEABLE, mergeStateStatus: CLEAN. That is decision 1's load-bearing premise -- that a skipped job satisfies a required check -- measured rather than assumed, and it is the reason Lint and Unit tests can be required at all. The pull request was closed unmerged and its branch deleted; actions main is still c057113, unchanged by anything in 2a.
  • The App's token mints, which is also the only direct evidence the App is installed. Run 43081577539, workflow_dispatch on main: HAS_REVIEW_MARKS_KEY: true, so the environment secret reached the job; Mint the push token ran and succeeded rather than skipping, reporting "Creating token for this repository (shakenfist/actions)"; and the post-job step logged "Token revoked". An App that is not installed on a repository cannot mint a token for it, so this closes change 1, which no API reading available to this session could confirm directly.
  • deployments?environment=review-marks is empty (length 0). Reading an environment secret does not create a deployment record, so the environment's branch policy is acting as an access boundary and nothing else.
  • The job guard on other branches still holds. Pushing the throwaway branch started run 43081548196, which skipped: the workflow triggers on any branch push, and its default-branch guard is what stops it running there.

What else the ruleset now binds. Decision 7 reasons about one workflow, prune-reviews, and the question was not asked of the others until the review of this phase asked it. Two separate questions turn out to be worth keeping apart, because the ruleset binds pushes to main and merges into main by different rules.

At push time, prune-reviews is the only automation subject to it. actions contains four pushes, but the other three -- tools/ci_sync_docs.sh, tools/ci_code_formatting.sh and .github/workflows/export-repo-config.yml -- do not run in actions at all. export-repo-config.yml is workflow_call: only and nothing in actions calls it (canary.yml names the file in a path filter, which is not a call), and the two scripts are invoked by reusable workflows that run in caller repositories. They push and open pull requests there, against those repositories' default branches, not this one.

At merge time the rules bind every pull request into main, automated or not. In actions that means Renovate, which runs hourly from renovate.yml and opens its pull requests as shakenfist-bot. Nothing in the repository merges its own pull request: there is no gh pr merge and no auto-merge anywhere in .github/workflows/ or tools/, and the 15 most recent pull requests were all merged by mikalstill. So the new rules add "CI must be green first" to Renovate's pull requests rather than creating a merge nothing can perform. Recorded so the next reader does not re-derive it.

The export follow-up cannot be performed on actions. docs/audits/merge-queue-config.md, whose recipe shape 2a followed, ends by saying to trigger the repository's export-repo-config workflow so the change is captured in .github/exported-config/. There is nothing to trigger: actions has no .github/exported-config/ directory and nothing in it calls the reusable workflow, which lives there as the template the rest of the fleet consumes. So this ruleset change is recorded in this plan and in GitHub, and nowhere in the repository it applies to. Whether actions should export its own configuration like its callers do is a question for the export-repo-config criterion rather than this phase; it is in Future work.

Not proved: the push attribution. The definition of done also asks that rulesets/rule-suites?time_period=day&rule_suite_result=bypass name shakenfist-review-marks[bot] as the actor of the push. That listing is empty, because the run had nothing to push: it logged "review-import: imported 0 file(s), removed 0 import(s)" and "No review marks to prune or import", so it never reached a push and no rule suite was evaluated. The bypass is therefore exercised but not yet observed. This is the same gap PLAN-bot-bypass-identity.md step 2b recorded for kerbside, and it takes the same answer: wait for a run with real work rather than manufacture one, since manufacturing it would mean landing review-mark data through a pull request for the sole purpose of giving the next run something to delete. It is listed in Future work, and the first prune run that does prune answers it. The bypass itself is not in doubt -- without it that push would be refused exactly as the operator's was -- but the reading that would show it has not been taken.

Step 2b record (2026-11-12). The criterion landed as moving-ref-source-protection in a second pull request off main with 2a's record already merged, as decision 5 requires, so it was measurable against the live repository on the day it was written. Run against shakenfist/actions it passes, with the details string naming the branch and all four contexts; run against this repository it reports not_applicable with the reason naming the repository and asks GitHub nothing. Seven files, the seventh being the NETWORK_CHECKS line the step brief singled out.

Verified in the management session rather than taken from the sub-agent's report: 2618 tests pass, pre-commit run --all-files passes, and the step's eleven mutants were re-run from its own specification against a fresh copy of the tree, all eleven killed with none surviving. One of them removes the NETWORK_CHECKS line and is killed by test_network_checks_matches_the_checker, so that line is now held by a test rather than by this plan's warning about it. The pass verdict was also confirmed against the live repository, which the brief had only asked to be reasoned about offline.

The before-and-after snapshot that Before and after a change to a check asks for was run too, which the step's own report had skipped: captures from a pristine checkout of main at 951fef7 and from this branch, over the 29 audited checkouts. No firm differences, and the whole of the advisory difference is this criterion appearing -- pass on actions, not_applicable on the other 28. That is the check no unit test performs, because a reworded details string is published to docs/audits/compliance.md and into every issue body filed fleet-wide, and nothing fails on it.

Departure from the step table. The table marks 2b worktree isolation. That was satisfied with a worktree created in the management session off updated main, rather than with the agent tool's own isolation, because the latter bases its copy on the shared clone's checked-out HEAD -- which was still main before #388 merged. The criterion would then have been written against a tree in which 2a's record and ruleset did not exist, and its central claim could not have been measured. The isolation the column asks for is from the shared clone, and that is what it got.

Two tests beyond the brief, kept. The brief enumerated three tool-failure cases; the criterion has five. The additions are a matched rule that names no ruleset_id, and a ruleset that answers without an enforcement field -- the second being the one that would otherwise have become a fail, which is the error this repository's conventions treat as the one a criterion must never make, since a fail files an issue about our own outage. Both kill a mutant no other test kills.

The six-file count was left alone, deliberately. This step's brief warns that AGENTS.md says six files and PLAN-TEMPLATE.md's success criteria say five, while this criterion needed seven. Neither was edited, because AGENTS.md does not keep its own list: it names six and points at Adding a criterion in docs/consistency-audits.md, which carries the conditional seventh line for a criterion that reaches the network. The authoritative list is right, and the warning in the brief is what a reader needs rather than a correction to the summaries.

What the review round changed, including a decision's shape. The automated review of #392 raised two fix items. One was a real defect in the criterion: rule_contexts() returned an empty list for every shape it could not read -- a parameters object that is not an object, a required_status_checks value that is not a list, an entry carrying no context -- and that empty list flowed into the empty-context fail. So an unparseable payload filed an issue telling an operator to restore checks that may already have been in place, on a branch that may already have been protected. Every unreadable shape is now a ToolFailure; only a genuinely empty list is still the verdict it was meant to be. That is the distinction this repository treats as the one a criterion must never get wrong, and the criterion had it wrong in the direction that files work for somebody.

Decision 3 said the repositories are a class constant MOVING_REF_REPOS = ('actions',), with the expected contexts in a constant of their own. The review observed that this pairs a list with a single repository's job names, so a second entry would file findings at the new repository naming actions' checks, and that matching on repo.name alone would measure an actions repository in somebody else's organisation as though it were the fleet's. Both are now one table keyed org/name with each repository's contexts beside it. The decision's intent -- the set lives in a documented class constant, not in configuration -- is unchanged; its literal shape is not what it says.

The second fix item is answered as #393 rather than in code, and the specification gained a Known gap section for it. development does meet this criterion's definition: ci-prune-reviews.sh clones this repository unpinned and review-tracking.sh execs scripts/review-tracking.py out of that clone, inside the prune-reviews job of all eight adopters. It is not in the table because its main carries only deletion and non_fast_forward, so adding it would report a fail and file an issue no code change here could close; the ruleset has to come first, and this repository pushes review marks with GITHUB_TOKEN rather than the App, which has to be settled with it. Declining it in code while declaring it on the page is the honest shape, because the alternative was a specification that read as a complete set while being an incomplete one.

The document item was taken as well: the claim that the effective-rules endpoint omits a disabled ruleset but not an evaluate one is now split into what was measured (instar's ruleset 19389569, named on the page) and what is not settled (evaluate, which nothing in the organisation uses and which could only be measured by changing a live ruleset). The page says the second read is the conservative choice rather than a known necessity, and that the organisation-sourced error rests on the same unsettled question. The mutation set is seventeen now, all killed, six of them new this round.

What the second review round changed. One fix item, and it was about the sentence this criterion publishes most. applies() returned "Nothing in the fleet consumes at a moving ref", which is a claim about the fleet rather than about the table, and the same pull request had just proved it false for development. That string is the whole of what the compliance page shows for this criterion on 28 repositories. It now states membership -- what the criterion measures, that this repository is not among them, and that the specification lists the sources it does not yet measure -- and a test asserts it does not make the stronger claim.

Three of that round's consider items were defects rather than preferences, and were taken. The criterion failed only when the context list was entirely empty, so clearing two of four contexts passed, while every pull request still offered a merge: the one shape nothing else would report. It now compares against the table it already prints into the finding, and the rationale in both the comment and the specification was corrected, because the reason given -- "that needs the workflow read as well" -- was about comparing against ci.yml's job names, which is a different comparison and still not made. An Enterprise-sourced rule fell through the Organization test into a repository read that 404s, so the right answer arrived by accident with a message naming the wrong endpoint; anything other than Repository, and a rule naming no source at all, is now raised with the source it saw. And the empty-context fail returned before the enforcement reads, so an operator whose contexts were cleared and whose ruleset only evaluated was told to restore four contexts into a ruleset that refuses nothing; every repair is now collected into one finding.

One consider item exposed an assumption worth recording rather than fixing. The verdict for a cleared context list rests on GitHub returning {"required_status_checks": []} rather than omitting the key, which nobody measured and which cannot be measured without clearing the contexts on a live ruleset. Had the key been omitted and read as unreadable, the criterion would have reported an error for exactly the configuration the verdict exists to catch. An absent key is now the empty list, a wrong-typed value is still unreadable, and the specification says so beside the disabled/evaluate split it already carried.

The document items: the specification no longer sources its 93-reference count and its keep-the-moving-ref reasoning to this plan, because plan retirement deletes plan files and neither docs-external-links nor plan-source-references catches a prose citation in markdown -- so nothing would have failed when it rotted. Both now live on the page. The other asked whether #393 is the issue rather than a pull request, since the two share one number sequence; issues/393 reports pull_request: false, so both references are right.

Unrelated, and not this phase's to fix. plan-source-references fails on this repository, on six PLAN-a.md/PLAN-b.md fixture names in scripts/tests/test_audit_snapshot.py that arrived with the plan-retirement work. It fails identically on a pristine checkout of main, so it predates this step; the audit files its own issues, so the next scheduled run raises it without help. It is in Future work as a pointer rather than fixed here, because mixing it into a criterion pull request would hide it.

Phase 3: pin third-party actions to a sha

Planning effort: high for 3a, which lands a line in a file the whole fleet will read and decides what the probe measures. Medium for 3b, which follows the five-file criterion pattern phase 2b worked through.

Planned 2026-10-31, before phase 2, and re-planned 2026-11-13 after phase 2 landed and after PLAN-renovate-cadence.md's phase 1 published the shared preset. Both moved this phase's ground: the probe's home, the number of steps and the window in which anything can be observed all changed. The survey below says where, and the 2026-10-31 plan's findings are carried forward only where they still hold.

Split on 2026-11-21. Step 3b, the criterion, and observation 6, the two-window volume count, moved to phase 4, and the later phases were renumbered. Both were waiting on time or on another plan, and nothing else was left in this phase. So phase 3 closes on the helper in the preset, the pin pull request and its record, and the rust-toolchain exemption recorded at the end of this section, which settled the last pin by declining it. The 3b brief and its done-items are in phase 4. Decisions 4 to 7 and the risk entries stay here, where they were reasoned; wherever this section says 3b, read phase 4's step 4a.

Scope. In: helpers:pinGitHubActionDigests in the fleet preset, which is simultaneously the probe because this repository is the preset's only consumer today (3a). The third-party-action-pinning criterion, measuring workflows and composite actions, was step 3b and has been phase 4 since the split. Out: pinning shakenfist/actions@main references, which stay a moving ref under phase 2 and are protected by moving-ref-source-protection instead -- and which the helper preset would otherwise pin, so keeping them out took an explicit exclusion rule rather than silence, as the step 3a record below sets out; pinning any fleet repository's own workflows by hand, which Renovate does once that repository extends the preset; docker:// references, which pin by image digest and would be a different criterion if ever; and actions/create-github-app-token, which PLAN-bot-bypass-identity.md already pinned in the form 3b accepts.

What the survey found (2026-11-13, against this checkout at a463b81, shakenfist/actions and ten fleet repositories through the GitHub API). Corrections were made at source in this section, in the note under the Execution table, and in PLAN-renovate-cadence.md's coordination paragraph, so a later step need not redo them.

  • Nothing of this phase has shipped. helpers:pinGitHubActionDigests appears in no configuration in this repository or in the fleet.
  • The inventory has grown and is now partly pinned. This repository has 54 third-party references, 33 under templates/ and 21 under .github/, of which 52 are unpinned: actions/checkout@v7 (25), actions/upload-artifact@v7 (6), actions/download-artifact@v8 (5), github/codeql-action/{init,autobuild,analyze}@v4 (6), softprops/action-gh-release@v3 (2), dtolnay/rust-toolchain@stable (2), dorny/paths-filter@v4 (2), actions/setup-node@v7 (2), pypa/gh-action-pypi-publish@release/v1 (1) and actions/attest-build-provenance@v4 (1). Two are branches rather than tags: release/v1 and stable. The 2026-10-31 survey counted 52 references in total; the two added since are the pinned ones below. Every count in this bullet is as of a463b81 and goes stale with the next merge: re-measured on 2026-11-15 against this branch merged with main at 013c9c4, the tree holds 57 third-party references, 3 of them pinned and 54 unpinned, with actions/checkout@v7 at 26. The three references PLAN-renovate-cadence.md's central runner added account for the difference. The grep in the definition of done, not this inventory, is the gate: it is measured when it runs rather than when it was written.
  • The form 3b accepts is already in the tree, three times. PLAN-bot-bypass-identity.md landed actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 in .github/workflows/prune-reviews.yml:165 and its template twin at the same line. PLAN-renovate-cadence.md then landed a third, dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable at .github/workflows/renovate-fleet.yml:180, which is the more useful of the two forms for this phase: it was pinned by hand, its comment is a branch name rather than a release tag, and it is therefore direct evidence for observations 1 and 2 and a ready fixture for 3b's "sha with a comment" case. So the spec describes a form the repository already demonstrates, rather than one Renovate is predicted to write, and the twin requirement that pin creates for that plan is live rather than anticipated.
  • The probe's home has changed, and the old 3a and 3b are now one step. PLAN-renovate-cadence.md phase 1 has merged (47086db, #391; its table still reads In progress because its close-out belongs to its phase 2's first commit). This repository's renovate.json now extends nothing but local>shakenfist/development:renovate-fleet, keeping only its own github-actions and customManagers file patterns for templates/; and templates/renovate/renovate.json is now a four-line file whose entire content is that same preset reference. So the old 3b's instruction to add the helper to the template has nothing to add it to, and the old 3a's local probe in renovate.json would be a line the fleet step then moves. One edit to renovate-fleet.json is both.
  • No fleet repository extends the preset yet. Read directly: shakenfist, kerbside, ryll, instar, andris, hunkydory, sfui and occystrap all extend customManagers:githubActionsVersions alone, and client-python and agent-python have no extends at all. Only this repository reads the preset, which is what makes 3a's blast radius one repository and decides decision 3.
  • The monthly CI-tooling group now stands between the probe and its observation. renovate-fleet.json sets schedule: ["on saturday"] with timezone: Australia/Sydney, and a package rule matching matchManagers: ["github-actions", "pre-commit"] groups them as CI tooling on schedule: ["on the first day of the month"], described there as covering "every update type, digests included". The rule matches by manager and sets no matchUpdateTypes, so on its face it captures a pin as well as a digest bump, which would put the probe's pull request on 1 December rather than within days. Whether Renovate schedules a pinDigest update that way is not settled by its documentation and is the first thing 3a reads off the dependency dashboard. The master plan's coordination paragraph anticipated exactly this ("a two-week window can see none at all"); it is now the live case rather than a contingency.
  • Open question 4's fallback is already in place. Its default says that if volume is the problem the answer is a grouping rule, not dropping the pins. That grouping rule is the CI-tooling group above, landed by another plan before the pins exist. So 3a does not measure raw volume and then decide whether to group: it measures volume under grouping, which is the only number the fleet will ever see. #88 (one global set of Renovate groupings) is still open, and the preset substantially answers it; PLAN-renovate-cadence.md owns closing it, not this plan.
  • The audit already reads a pinned reference, confirmed again. STEP_USES_RE (scripts/audit/text/workflows.py:442) accepts a trailing comment after the ref and its comment names Renovate's digest form as the reason; step_uses() at 445 and step_action() at 459 drop it for every caller. A grep of scripts/audit/ for @v finds no check matching a tag. So the old 3b's sentence about updating such checks remains a confirmation, not a change.
  • The helpers 3b builds on are all present, at these lines: workflow_job_blocks 219, JOB_USES_RE 288, indented_block 374, workflow_step_blocks 408 (all scripts/audit/text/workflows.py), and tracked_paths at scripts/audit/files.py:193. ReusableWorkflowSecrets is still at scripts/audit/checks/ci_workflows.py:2428, where the 2026-10-31 survey corrected it to; 2162 is still FuzzNightlyReporting.
  • The twin test has moved. test_this_repository_runs_renovate_verbatim is at scripts/tests/test_registry.py:1288, not 1282. Eight templates are byte-identical with their .github/workflows/ twins today (pr-re-review, pr-retest, codeql-analysis, export-repo-config, issue-link-check, mermaid-lint, renovate, prune-reviews), and renovate.json's github-actions block extends the manager's patterns to templates/, so a pin lands on both sides in one pull request. A probe that pinned only .github/ would fail that test.
  • A preset edit is covered by this repository's own tests. scripts/tests/test_packaging.py:349 and :495 load the real renovate-fleet.json and run each check's helper over it, and the comment at scripts/audit/checks/packaging.py:52 says why: "a local> preset takes effect fleet-wide the moment an edit to it merges". That is the strongest argument for landing the helper before the sweep rather than after it, and decision 3 turns on it.
  • The renovate criterion does not require the preset yet. It accepts local>shakenfist/development:renovate-fleet or customManagers:githubActionsVersions (scripts/audit/checks/packaging.py:523), so extending the preset is not enforced until PLAN-renovate-cadence.md phase 3 makes it so. Decision 5's claim that the renovate criterion measures the pinning policy transitively is therefore still a future property, conditional on that phase, and is written as one.
  • Renovate has moved, 44.190.0 to 44.222.2 (.github/workflows/renovate.yml:92), on node-version: 24. The workflow's own cron is still hourly; what changed is that the preset, not the workflow, now decides when a pull request may open. Decision 6 reads the extractor at the new tag.
  • renovatebot/github-action still has nothing to pin, as the 2026-10-31 survey found: templates/renovate/renovate.yml runs Renovate from npm. Its third-party references are actions/checkout@v7, actions/setup-node@v7 (which installs the Node that runs Renovate with RENOVATE_TOKEN in the next step's environment) and dtolnay/rust-toolchain@stable. The Situation's count of 15 for that action predates the change and is left as the historical reading it is.
  • No composite action here; ten in actions (build-smoke-cluster, check-dist, deploy-kolla-ansible, deploy-proxmox-on-shakenfist, pr-bot-trigger, pr-review-ref, require-ci-success, review-pr-with-claude, setup-kerbside-environment, setup-test-environment). So 3b's composite-action path is tested against fixtures here and observed live only when actions extends the preset.
  • Open question 5 still cannot be observed: there is no third-party reusable workflow anywhere in the fleet. It is answered by reading, as decision 6 says.

Decisions.

  1. The helper lands in the fleet preset, and that single edit is the probe. This repository is the preset's only consumer, so the edit's reach is one repository either way; the difference is only which file would be reverted if the probe goes badly. The objection a reviewer should press is that a shared fleet file is the wrong place to experiment, and that a local probe in renovate.json keeps the fleet's policy file free of unproven settings. Three things answer it: templates/renovate/renovate.json no longer holds anything to probe with, so the local alternative is a line that a second commit would move rather than a step that ends somewhere; the preset is held by tests that load the real file (test_packaging.py:349, :495); and the revert is one line out of extends, no worse than reverting it from renovate.json. The old 3a and 3b therefore become one step, 3a, and plan-blockers note n5's "step 3b" now means the criterion.
  2. The probe pins everything Renovate sees here, templates/ included. Unchanged from 2026-10-31, and the twin test still requires it: renovate.json's github-actions patterns cover templates/, so Renovate pins both sides of all eight twins in one pull request, and a pin landing on only one side fails test_this_repository_runs_renovate_verbatim. The fleet's copies of those templates stay unpinned until their own repository extends the preset, which is the designed rollout rather than a gap: a copy Renovate pins in its own repository is kept current there, and a copy pinned by copying a template is not.
  3. 3a lands before PLAN-renovate-cadence.md's phase 3 sweep, and its hold was that plan's phase 1, which has merged. That plan's coordination paragraph says the opposite -- that its phase 3 must land first -- and it is wrong on this point, for the reason its own code comment gives: a local> preset takes effect fleet-wide the moment an edit to it merges. After the sweep, adding the helper to the preset changes every repository's behaviour with no pull request in any of them; before the sweep, it changes one repository, and the sweep's own per-repository pull request then carries the policy in reviewably -- a renovate.json that extends the preset. The pin diff itself arrives afterwards, as one grouped Renovate pull request per repository on the next monthly window, reviewed on its own; roughly one such pull request per repository is also the volume prediction worth stating for the sweep. The churn that paragraph fears -- "one per release per repository" -- is prevented by the CI-tooling group, which lives in the same preset, not by the ordering. That paragraph is corrected at source in this planning commit.
  4. 3b lands two weeks after the sweep, not before. Unchanged in substance from 2026-10-31. The criterion newly fails every audited repository with an unpinned third-party reference, which today is all of them, and the fix for each is "merge the pin pull request Renovate opened" -- which cannot exist until that repository extends the preset. Filing that issue earlier tracks nothing a repository can act on. The consequence is that this phase stays open for weeks with only 3a landed, waiting on another plan whose phase 3 is not yet planned. That is recorded rather than worked around, and the back brief asks whether to accept it.
  5. What is measured and what is confirmed. Measured: every remote uses: whose owner is not shakenfist ends in 40 lowercase hex characters, in workflows and in composite actions. Confirmed by a reviewer: the trailing comment naming the release the sha stands for, which Renovate writes and maintains; and the policy that keeps the pins current, which the renovate criterion will measure transitively only once PLAN-renovate-cadence.md phase 3 makes extending the preset mandatory, since the preset is where the helper lives. Until then that half is a reviewer's reading. The comment's form is whatever Renovate writes -- 3a records it, and the one example already in the tree is # v3.3.0 against a release tag, while a major-tag ref may produce # v7 -- so the spec describes the comment rather than prescribing vX.Y.Z. Open question 3's default stands: no exemption for GitHub-owned actions.
  6. Open question 5 is answered from Renovate's source at the tag the fleet runs, 44.227.4, rather than from a fixture: the github-actions manager's extractor in lib/modules/manager/github-actions/extract.ts either matches a job-level owner/repo/.github/workflows/x.yml@ref or it does not, and the record cites the line. The criterion measures those references either way, as one rule, and if Renovate does not pin them the spec says they are pinned and bumped by hand. There are none in the fleet today.
  7. Branch references are pinned like tags. release/v1 and stable pin to the commit the branch points at, with the branch name in the comment, and Renovate's digest updates follow the branch. 3a records whether that is what happened. If Renovate declines to pin a branch ref, the reference is pinned by hand in the same form and the spec says which refs Renovate does not maintain.

Half right, corrected 2026-11-15 from the pull request. release/v1 pinned exactly as predicted, comment included. stable did not, and the reason is one this decision did not anticipate: minimumReleaseAge: 3 days applies to a branch digest, so a branch that moved recently is held rather than refused. dtolnay/rust-toolchain@stable moved to 3900882 at 02:32 UTC on 2026-11-15, five hours before the run, so its pin is due about 2026-11-18. The reference is therefore maintained by Renovate, just later, and no hand pin is called for. What this does create is a sequencing constraint on PLAN-renovate-cadence.md, recorded in the risk list: the pin arrives only while this repository's own hourly Renovate is still enabled, because the central runner excludes both files the reference sits in. 8. The pin's cost to PLAN-bot-bypass-identity.md is already being paid. That plan's actions/create-github-app-token pin is in the prune-reviews template, and review-tracking-templates requires byte identity across its eight adopters, so every digest bump to that action is a re-sync of eight repositories. This phase did not create that cost and does not change it; once the helper is in the preset and the adopters extend it, Renovate proposes the bump in each of them instead, which the template audit then requires to land together. That interaction is this phase's one genuine new risk and is in the risk list rather than buried here.

Step Effort Model Isolation Brief for sub-agent
3a low sonnet none Add "helpers:pinGitHubActionDigests" to the extends array in renovate-fleet.json, after customManagers:githubActionsVersions. Give the change a description in the voice of that file's other descriptions: every third-party uses: becomes a sha with a comment naming the release, Renovate keeps the sha current, a moving tag is what the pin removes, and templates/ is pinned alongside .github/ because this repository's own github-actions patterns scan it and test_this_repository_runs_renovate_verbatim (scripts/tests/test_registry.py:1288) holds the eight twins byte-identical. Say that the CI-tooling package rule already groups these updates monthly, so pinning does not add a stream of pull requests. Do not touch renovate.json or templates/renovate/renovate.json: the first keeps only its templates/ file patterns and the second is nothing but the preset reference, and neither is where fleet policy lives. Do not pin any uses: line by hand -- the point is to observe what Renovate does. Then document it where the preset is documented: docs/audits/renovate.md describes the preset from line 81, and the paragraph saying what the preset carries is the one to extend. Run python3 -m unittest discover -s scripts/tests -t scripts (the preset's own tests at scripts/tests/test_packaging.py:349 and :495 load the real file), pre-commit run --all-files, and python3 scripts/audit-check.py --repo-path . --repo-name development, confirming the renovate verdict is the same as before the change. Commit subject: Pin action digests in the fleet preset.

The observation after 3a is the management session's, not a sub-agent's, because it happens after the merge and across a window nobody can shorten. Observations 1 to 5 were answered on 2026-11-15 in the step 3a pin pull request record below; only 6, the two-window volume count, is still open, and it moved to phase 4 on 2026-11-21. Once 3a has merged, Renovate's next permitted window opens the pin pull request. Review it against the unpinned references the grep in the definition of done reports on the day -- 54 when this phase was last measured, and not a number to carry around -- and record in this section:

  1. the exact form of a pinned line, comment included, for a major tag and for a release tag;
  2. what pypa/gh-action-pypi-publish@release/v1 in templates/release-automation/release.yml and dtolnay/rust-toolchain@stable in templates/renovate/renovate.yml became -- and, for the two rust-toolchain references, that the same pull request also adds with: toolchain: stable, which the risk list explains and .github/workflows/renovate-fleet.yml:170-183 already does by hand;
  3. one pull request or several, and whether the CI-tooling group captured the pin -- read off the dependency dashboard, with the date the pull request appeared, which answers whether a pinDigest update obeys that rule's monthly schedule -- and which runner opened it, the repository's own hourly workflow or the central fleet runner, because renovate-runner.json disables the two Renovate workflow files for the fleet runner and only the local one can pin them;
  4. whether minimumReleaseAge: 3 days held anything back;
  5. that pre-commit run --all-files passes on the pull request's branch, actionlint, actionlint-templates and the twin test included;
  6. moved to phase 4 on 2026-11-21: the number of grouped pull requests Renovate opens here over the following two monthly windows (gh pr list --author shakenfist-bot --search digest --state all), as open question 4's answer, stated as grouped pull requests because that is the only shape the fleet will see. #407 counts as one, and the December window is expected to carry only ordinary digest bumps because the pin itself was pulled forward out of it: a repository that waits for its own window sees the same total in a different order, so the count is comparable but the first window's shape is not;
  7. open question 5, answered by reading the github-actions extractor and citing the line (decision 6). Answered on 2026-11-15, before the pull request, in the step 3a record below: extract.ts:105 and :111 at tag 44.227.4. What is left for the pull request to show is the pinned line's form, which is observation 1.

Each landing goes in the Merged cell: the preset commit (#406), the pin pull request (#407), its record (#409), and the rust-toolchain exemption. The rust-toolchain pin, which was to have been a landing of its own carrying the two with: toolchain: stable blocks, was declined on 2026-11-21. The record at the end of this section says why.

Risks and mitigations.

  • The CI-tooling group delays the probe to 1 December, leaving the phase apparently stalled for two and a half weeks. Mitigation: the dependency dashboard shows the pending update immediately, so 3a's record can state on day one which window will produce the pull request; the management session reads the dashboard rather than waiting for a pull request to appear. If the wait is unacceptable, the alternative is a temporary rule scheduling pinDigest at any time, which is deliberately not planned, because it would measure a volume the fleet will never see.
  • A pin lands on one side of a twin and breaks the twin test. Mitigation: decision 2 and renovate.json's existing templates/ patterns make Renovate see both sides; 3a asserts the twin test passes on the pull request's branch before it merges, and pre-commit runs actionlint-templates.
  • A pinned dtolnay/rust-toolchain@stable keeps working only by accident. The earlier reading of this risk -- that the pin freezes the Rust toolchain -- was wrong: the sha pins the action's code, and rustup still resolves stable at run time. The real hazard is already written down in this repository, at .github/workflows/renovate-fleet.yml:170-183, where the same reference was pinned by hand: the action takes its own default from the ref name, so on the stable branch the toolchain input defaults to stable while on the default branch it is required, and a bare sha works only by virtue of which branch it happens to sit on. So when Renovate pins dtolnay/rust-toolchain@stable in .github/workflows/renovate.yml:57 and templates/renovate/renovate.yml:57, the step keeps working incidentally, and a later digest update that moves it off that branch makes toolchain required and the step fail. Mitigation: the one renovate-fleet.yml already applies -- the pin pull request must also add with: toolchain: stable to both files, in the same pull request, keeping the template and its twin byte-identical. There is no exempt-by-name fallback, because the problem that fallback addressed does not exist. Superseded 2026-11-21: in the template, the block would have made 16 fleet copies of renovate.yml drift, so the pin was declined by name instead, for that different problem. See the record at the end of this section.
  • Disabling this repository's own Renovate before 2026-11-18 strands the last two pins. dtolnay/rust-toolchain@stable in .github/workflows/renovate.yml and templates/renovate/renovate.yml is held by minimumReleaseAge until about then, and renovate-runner.json disables both files for the central runner, so the pin arrives only if the local hourly workflow is still enabled when it does. PLAN-renovate-cadence.md's cutover step 2 disables exactly that workflow. Mitigation: the two plans are sequenced -- land the rust-toolchain pin before the canary, or narrow the runner rule first -- and this phase's definition-of-done grep is what notices if neither happened, because it prints those two lines and nothing else. The with: toolchain: stable that pin also owes is the entry below, not repeated here. Lifted 2026-11-21: the pin was declined, so no pin is owed and disabling strands nothing; see the record at the end of this section.
  • The pins in templates/renovate/renovate.yml lose their maintainer at the cutover. renovate-runner.json, which PLAN-renovate-cadence.md phase 2 landed, disables every dependency in .github/workflows/renovate.yml and templates/renovate/renovate.yml for the central runner, while each repository's own hourly copy reads renovate.json and sees both. So those two files can only ever be pinned by the local runner, and once phase 2 disables the per-repository copies and the fleet runner takes the schedule, a pin in the template is maintained by nobody -- and the template outlives the deployed copies that rule exists for. Mitigation: that rule has to lose the templates/renovate/renovate.yml path when the copies are deleted; it is recorded here and in docs/audits/renovate.md's preset section rather than left for whoever notices a stale sha.
  • The eight prune-reviews adopters must re-sync together on every bump of actions/create-github-app-token, because review-tracking-templates requires byte identity. Mitigation: decision 8 and this entry; template-resync is the skill that does it, and the cost is one re-sync per release of that action, recorded in PLAN-bot-bypass-identity.md as well.
  • 3b newly fails most of the fleet the morning it lands. Mitigation: decision 4's two-week wait after the sweep, and the before-and-after snapshot procedure, whose count the commit message states so the first morning's issues can be compared against a prediction rather than a hope.

Definition of done.

  • renovate-fleet.json's extends holds helpers:pinGitHubActionDigests, and python3 -m unittest discover -s scripts/tests -t scripts passes.
  • python3 scripts/audit-check.py --repo-path . --repo-name development reports the same renovate verdict as before 3a.
  • The pin pull request is recorded here by number and merge commit, with observations 1 to 5 and 7 above answered, including the date it appeared and which window produced it. Observation 6 is phase 4's.
  • This prints exactly two lines, both dtolnay/rust-toolchain@stable: the references in .github/workflows/renovate.yml and templates/renovate/renovate.yml that the root renovate.json keeps unpinned, as the record at the end of this section says. Once PLAN-renovate-cadence.md phase 3 deletes those files it prints nothing:
git grep -hoE '^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*[^ ]+' \
    -- 'templates/**' '.github/**' |
    sed -E 's/^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*//' |
    sed -E 's/["'"'"']//g' |
    grep -v '^\./' | grep -v '^shakenfist/' | grep -v '^docker://' |
    grep -vE '@[0-9a-f]{40}$'

Any line it prints is a third-party reference Renovate did not pin, and decision 7 says what happens to it. - Open question 5 is answered in this section with a cited source line, and the plan's Open questions section says where the answer is. Open question 4's answer is phase 4's. - test_only_the_doomed_renovate_copies_keep_rust_toolchain_unpinned in scripts/tests/test_packaging_renovate.py holds the exemption to those two files and that one action, and fails while either reference is pinned. The first Renovate run after the exemption merges proposes no dtolnay/rust-toolchain change to either file.

Back brief gate. Two answers are needed before 3a runs.

  1. Decision 3 contradicts PLAN-renovate-cadence.md. This plan says 3a lands before that plan's sweep; that plan's coordination paragraph says after. The planning commit corrects that paragraph. Confirm that is the right way round, because it edits another plan's reasoning.
  2. Decision 4 leaves this phase open for weeks. 3b waits on a sweep in a plan whose phase 3 is not yet planned, so phase 3 lands 3a and then holds. The alternative is to let phase 3 close on 3a alone and plan the criterion as its own phase later, which renumbers phases 4 to 6. Confirm holding is acceptable.

Back brief outcome (2026-11-14). Both gates were answered yes. Decision 3's reversal stands, so the correction this planning commit made to PLAN-renovate-cadence.md's coordination paragraph is kept and 3a lands before that plan's sweep. Decision 4's hold is accepted: this phase lands 3a, stays In progress, and 3b waits for the sweep plus two weeks, so phases 4 to 6 are not renumbered. 3a then ran in the same session. Reversed on 2026-11-21: step 3b became phase 4 and phases 4 to 6 were renumbered 5 to 7, so that this phase could close. The split paragraph at the top of this section says why.

Step 3a record (2026-11-14). The helper is in the preset's extends, after customManagers:githubActionsVersions, and docs/audits/renovate.md's fleet-preset section describes the policy in two new paragraphs. The renovate criterion reports pass with details "Renovate workflow and config exist", identical before and after; python3 -m unittest discover -s scripts/tests -t scripts ran 2678 tests, OK; pre-commit run --all-files passed every hook, renovate-config-validator included. No uses: line was pinned by hand, and neither renovate.json nor templates/renovate/renovate.json was touched.

The helper had to be fenced, which this phase did not plan for. Read from Renovate's documentation during execution, helpers:pinGitHubActionDigests expands to a single rule -- matchDepTypes of action and workflow with pinDigests: true -- with no owner scoping of any kind. Three consequences follow, and the first contradicted this phase's Scope:

  1. The fleet's own references would have been pinned. This repository's scanned paths hold 22 shakenfist/actions/...@main references, 15 step-level and 7 job-level reusable workflows, and nothing in the preset distinguished them from a third party's. The Scope rules them out and the definition of done's grep excludes ^shakenfist/, so the plan assumed an exemption that did not exist. Pinning them would have frozen this repository on the sha it last merged and defeated the moving ref that phase 2 exists to protect. 3a therefore carries a packageRules entry naming both dep types and shakenfist/** with pinDigests: false. Renovate applies a configuration's own rules after the rules it inherits through extends, so the exception wins. The Scope above is corrected to say so.
  2. A branch reference is pinned like a tag, which is decision 7's first half answered from documentation rather than observation: the github-actions manager routes a non-semver ref to the digest datasource, "only digest pinning updates are supported", and the original ref is preserved in the trailing comment. The second half -- whether the digest then follows the branch, which is what dtolnay/rust-toolchain@stable turns on -- is still an observation 3a's pull request has to make.
  3. Open question 5 is answered, and decision 6's citation is discharged. A job-level reusable workflow is a workflow dep type, distinct from action, and the helper pins both, so Renovate does extract third-party reusable workflows and would pin them.

The citations, added 2026-11-15 in review round 1. The three claims above were first read from Renovate's documentation during execution, which review item 2 correctly called an assertion. They are now read from Renovate's source at 44.227.4, the version .github/workflows/renovate-fleet.yml:233 pins:

  • lib/config/presets/internal/helpers.preset.ts:118-126 is the whole of helpers:pinGitHubActionDigests: one packageRules entry, matchDepTypes: ['action', 'workflow'], pinDigests: true, and no owner scoping of any kind. The fence 3a added is therefore necessary, not defensive.
  • lib/modules/manager/github-actions/extract.ts:111 sets depType: isReusableWorkflow ? 'workflow' : 'action', and :105 computes that flag from reusableWorkflowPathRe at :78, which is ^\.github/workflows/[^/]+\.ya?ml$ tested against the reference's sub-path. So this repository's 7 job-level shakenfist/actions/.github/workflows/*.yml@main references are workflow and its 15 step-level ones are action; the exception's two dep type names are exactly the set that covers them, which is what review item 2 asked to have proved rather than stated.
  • :113 is where the pinned line's shape comes from: the autoReplaceStringTemplate writes the digest and then, when there is a newValue, # {{newValue}} -- the ref it replaced, tag or branch name alike. That is documentation of the form, not an observation of it; observation 1 still reads the real line off the pull request.
  • The path the review suggested, lib/config/presets/internal/helpers.ts, does not exist at this tag; the file is helpers.preset.ts.

A wrong dep type name would have passed renovate-config-validator silently, since it accepts any string there, and the first visible symptom would have been a pin on a first-party reference in the pull request. test_the_real_preset_exempts_the_fleets_own_actions now pins both names in this repository's own tests.

Step 3a's pin pull request: #407, opened 2026-11-15. Forced rather than waited for: the dependency dashboard (#58) listed the pin as one entry on branch renovate/ci-tooling awaiting its schedule, which answered observation 3 on its own, and ticking that box brought the pull request forward from 1 December. Observations 1 to 5 are answered here; 6 is still two monthly windows away and 7 was answered in the citations above.

  1. The form. A major tag gives actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 and a branch ref gives pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1: the sha, then the reference it replaced, verbatim, which is what extract.ts:113's autoReplaceStringTemplate writes. No release-tag example arose, because nothing in this repository referenced one.
  2. The two branch references diverged. release/v1 pinned. dtolnay/rust-toolchain@stable did not, and is held rather than refused: minimumReleaseAge: 3 days covers a branch digest, the stable branch moved to 3900882 at 02:32 UTC the same morning, and the dashboard still offers the update. Due about 2026-11-18. Decision 7 is corrected above. When it lands, that pull request must also add with: toolchain: stable to both files, which Renovate will not do and the risk list explains.
  3. One grouped pull request, from the local runner. Branch renovate/ci-tooling, so the CI-tooling package rule does capture a pinDigest update as well as a digest bump --- the question the plan recorded as unsettled by Renovate's documentation, now settled by observation. It was awaiting the monthly schedule, so left alone it would have appeared on 1 December. The runner was this repository's own hourly renovate.yml, not the central fleet runner, which matters for the reason the risk list gives: only the local runner can see the two Renovate workflow files.
  4. minimumReleaseAge held two things. The rust-toolchain digest above, and the newer renovatebot/pre-commit-hooks releases --- 44.235.1 is in the pull request with 44.239.1 and 17 others listed as pending. The release age is doing its job in both cases.
  5. pre-commit run --all-files did not pass on the branch, and that is the finding. Two hooks failed on #407: source size ratchet, which is the stale baseline this pull request repairs and nothing to do with the pin, and audit package and script tests, which is. Five tests across two files assumed a real shipped file contains an unpinned uses: owner/action@vN literal, and located it by exact string: RenovateWorkflowDriftTest's three ref tests against templates/renovate/renovate.yml, and GithubReleaseTest.test_no_download_fails and test_no_release_step_fails against templates/release-automation-rust/release.yml. actionlint, actionlint-templates and test_this_repository_runs_renovate_verbatim all passed, so the twin risk this observation exists to check is clear; what the pin broke was tests about the templates rather than the templates themselves. The fix is in this pull request and is described under What the pin broke below; with it, all 2786 tests pass against #407's tree.

An unasked-for observation, worth keeping. Because the CI-tooling rule matches github-actions and pre-commit together, the pin pull request also carries that hook bump, and the group's youngest member puts a pending renovate/stability-days check on it. This repository's main has no required-status-checks rule, so it does not block the merge; on a repository that gains one it would. Worth knowing before the sweep puts this preset in front of the fleet.

What the pull request proves about the fence. Not one shakenfist/ reference appears in its diff. All 22 first-party references this repository consumes --- 15 step-level actions and 7 job-level reusable workflows --- are still moving refs, while 52 third-party references across 18 files were pinned, on both sides of every twin. The exception is therefore observed in production rather than argued from Renovate's merge order.

What the pin broke, and the shape of the fix. Five tests, named in observation 5 above, located an unpinned uses: literal inside a real shipped file in order to mutate it. Pinning that file made the literal absent, and the two in test_release_rust.py failed with ValueError: substring not found from their own in_job() helper rather than with an assertion, which is the signature to recognise if this recurs elsewhere in the fleet.

The literal was not updated to the pinned form, because that would break again on every digest bump --- and under the CI-tooling group a digest bump arrives monthly. The tests now derive the reference from the file with current_ref() in scripts/tests/base.py, which raises rather than returning the bare action, so a substitution that finds nothing fails loudly instead of passing while measuring nothing. That helper has its own suite, scripts/tests/test_base.py. Its cases are a tag, a branch ref, a pinned sha with its comment, a sub-path action, a quoted ref, a tab after uses:, a list dash, a missing action, the escaping of the action before it becomes a pattern (an unescaped . in actions/setup.node would otherwise match setup-node), and a commented-out step --- which review round 2 found the first cut of the helper matching, with a live example at templates/release-automation-rust/release.yml:154. A test that mutated a comment would have passed while measuring nothing, which is the failure the helper exists to prevent, so the pattern is now anchored to the start of a line and admits only whitespace and an optional list dash before uses:.

A sixth test was found by review round 2 rather than by the suite: test_a_comment_after_a_uses_line_is_compared asserted uses: dtolnay/rust-toolchain@stable against the shipped file and passed only because that is the one reference the held digest left unpinned. Enumerating by what failed rather than by shape is what hid it, which is worth knowing for the sweep: the class is tests asserting against a real workflow's uses: line, not tests that failed today, and adjacency assumptions belong to it as much as literals do --- that one asserted a \n\n between the reference and the next comment, which the with: toolchain: stable block the pin owes would also have broken.

This is the one consequence of pinning that reaches beyond the files Renovate rewrites, and it generalises: any repository whose tests assert against a real workflow's uses: line breaks when that repository extends the preset. It therefore belongs in step 4a's specification, which carries it since phase 4 was planned, and the fleet sweep in PLAN-renovate-cadence.md phase 3 should expect it per repository rather than discover it. Filed as

410 so the sweep can plan for it, with the durable half of the

guidance in docs/consistency-audits.md beside the rest of what scripts/tests/base.py offers, since this plan is a point-in-time record due for retirement.

The pin's other half now fails loudly. The with: toolchain: stable that the rust-toolchain pin owes was recorded only in prose here, and Renovate will not write it; if the pin landed without it, the first symptom would be the hourly Renovate run failing in this repository and in every repository that copied the template, rather than a red test. test_a_pinned_rust_toolchain_states_its_toolchain in scripts/tests/test_registry.py now asserts that a 40-hex-sha reference carries the input and that a branch reference need not, so the pull request carrying the pin fails until it adds the block.

The gate after #407 merges: exactly two lines. 54 unpinned references were measured before it, 52 are pinned in it, and the two that remain are both dtolnay/rust-toolchain@stable, in .github/workflows/renovate.yml:57 and templates/renovate/renovate.yml:57. So the definition of done's grep prints two lines until the held digest lands, and nothing else.

The exception is also why renovate-fleet.json carries no top-level description: the first draft of 3a put one there to describe the extends entry, which an extends string cannot carry itself, but every other description in that file sits on the rule or block it explains. The pinning rationale now sits on the exclusion rule, where a reader meets it beside the behaviour it modifies.

The rust-toolchain pin, declined (2026-11-21). The pin's digest cleared minimumReleaseAge on schedule, then waited in the renovate/ci-tooling group for its monthly window. Ticking that box on the dependency dashboard (#58) on 2026-11-20, as for #407, brought it forward as #426. It was opened at 09:26 UTC by this repository's own hourly workflow, dispatched by hand. #426 pinned both references to 39008827e6b4319a349e9a42dfc90579dd25f1ca # stable, alongside a digest bump to the hand-pinned reference in renovate-fleet.yml and a renovatebot/pre-commit-hooks bump. test_a_pinned_rust_toolchain_states_its_toolchain failed it as designed, because the with: toolchain: stable block was missing.

The block is where the plan was wrong. The risk list's mitigation put it in both twins and kept them byte-identical. But renovate_workflow_drift in scripts/audit/checks/packaging.py holds every fleet copy of renovate.yml to the template, and blanks only the versions and refs Renovate bumps, so a new with: block and its comment are drift. Measured against the 22 live copies on 2026-11-20, the block would have made 16 repositories newly fail the renovate criterion; the other 6 already drift. None of the 16 copies needs the block, because they are still on @stable. Both files are on their way out: PLAN-renovate-cadence.md phase 2 disables every copy, and its phase 3 deletes them and the template.

So the pin was declined rather than paid for. A rule in this repository's root renovate.json sets pinDigests: false for dtolnay/rust-toolchain in exactly those two files, and its description says to delete it with them. test_only_the_doomed_renovate_copies_keep_rust_toolchain_unpinned freezes the rule. It cannot widen to renovate-fleet.yml, the workflow that holds the organisation's push token, which stays pinned. The rule is local rather than in the preset because no fleet copy is pinned until its own repository extends the preset, and the sweep that makes it do so deletes that copy, so a preset rule would have nothing to cover. (The template exists only here; the deployed copy is in 22 repositories.) The definition of done's grep therefore prints the same two lines until those files are deleted, and nothing after. PLAN-renovate-cadence.md's cutover step 3 no longer waits for this pin; that plan's step and its risk entry are amended at source.

#426 merged with the pin before the decline did. A separate session fixed #426's CI failure on its own branch by adding the block to both files (90f1ea8), which is what the guard's failure message then asked for, and #426 merged at 01:48 UTC on 2026-11-21, while this decline was still in review. The decline stands, so its pull request reverts both files to @stable with no with: block, leaving them byte-identical to their state before #426. Re-measured on 2026-11-21 against the 22 live copies: with the block, every one drifts; reverted, the same 6 as before. The weekly audit had not run in between, so no issue was filed. Two guards now point the other way. The exemption's test fails while either reference is pinned and says to revert rather than add an input, and test_a_pinned_rust_toolchain_states_its_toolchain's message says the same for these two files.

Two alternatives were weighed. One was to land the block and teach the drift check to ignore it, which gives the audit a carve-out for a file that is about to be deleted. The other was to land it and accept 16 failures until then, or re-sync 16 repositories, again for a file about to be deleted. The residual is one unpinned reference, in a workflow holding this repository's Renovate token, until the cutover disables it. Every fleet repository carries the same residual until then.

Closed out 2026-11-22. #429 merged as 9805498 at 03:37 UTC on 2026-11-21. Against main afterwards, each done-item holds: renovate-fleet.json extends the helper and the unit tests pass; the grep prints exactly the two dtolnay/rust-toolchain@stable lines; renovate and plan-history-in-source both pass here; and the fleet runner's first two runs after the merge, at 03:41 and 05:00 UTC, opened no pull request. That last result is weaker than the done-item meant. renovate-runner.json disables every dependency in both files and this repository's own renovate.yml workflow is disabled, so nothing would have proposed the pin with or without the exemption, which acts only if the per-repository workflow runs again. Phase 4's last done-item carries that obligation forward: the two files and the exemption rule must be gone before 4a lands. The last automated review of #429 arrived four minutes before the merge, with no fix items. Its items in this plan's text were corrected in phase 4's planning commit, and the rest are #435.

Phase 4: third-party action pinning criterion

Planning effort: medium, as phase 3 set it for its step 3b, which this was until 2026-11-21. Planned on 2026-11-22, on branch workflow-ref-trust-phase-04-pinning-criterion, in the commit after phase 3's close-out. The survey below re-took the brief's line numbers, which were from 2026-11-13, and corrected the brief at source. A later step need not redo that.

Held until two weeks after PLAN-renovate-cadence.md phase 3's fleet sweep has landed, for the reason phase 3's decision 4 gives. The criterion fails every repository with an unpinned third-party reference. A repository can only fix that by merging the pin pull request Renovate opens once it extends the shared preset, and the sweep is what makes it extend the preset. On 2026-11-22 PLAN-renovate-cadence.md phase 2 had just turned the fleet runner's schedule on (#432) and was still In progress, and its phase 3 was Not started, so this phase is Blocked. plan-blockers cannot hold a plan on another plan's phase, so the hold is a note there rather than a blocker, and it does not clear itself.

The hold reaches past this phase. Phase 5's step 5a links this phase's new specification and describes third-party refs as pinned under its criterion, so phase 5 cannot land before 4a either. The plan stays In progress in the index regardless, because work on it has begun and not finished, and the blocked state is this phase's to carry. Step 4b is not held (decision 2): when it lands this phase moves to In progress, and the hold on 4a stays until the sweep clears it.

What the survey found (2026-11-22, against main at 6aefd63).

  1. The helpers the brief cites are not in ci_workflows.py. workflow_job_blocks() (219), JOB_USES_RE (288), indented_block() (374), workflow_step_blocks() (408) and step_uses() (445) are in scripts/audit/text/workflows.py, at exactly those lines, and ci_workflows.py imports them from there. ReusableWorkflowSecrets is still at ci_workflows.py:2428, tracked_paths() at scripts/audit/files.py:193, and step_uses() still strips comments and quotes. Corrected in the brief.
  2. The brief would fail pre-commit. The source-size ratchet, which arrived after the brief was written, holds ci_workflows.py to 2,605 lines and test_ci_workflows.py to 3,793, both their size today. Adding the class and its tests there fails source-size-ratchet. Decision 1 moves both into new files.
  3. The spec as briefed would fail plan-phase-references. That criterion greps every .md under docs/, docs/audits/ included, for phase <n>, and the brief told the spec to cite "phase 3's step 3a record". Corrected: the spec states the pinned form itself and links this plan.
  4. COMPOSITE_ACTION_MANIFESTS already exists, at ci_workflows.py:85, naming both action.yml spellings for another rule. The brief now reuses it.
  5. #410's guidance is where the plan says it is, in docs/consistency-audits.md at current_ref() and uses_clause() (about line 786). The step 3a record had sent that guidance to this phase's specification, then step 3b, and the brief did not carry it. It does now.
  6. The exemption the last done-item waits on is inert today. renovate-runner.json disables both files and this repository's own renovate.yml workflow is disabled, so the root renovate.json rule has nothing to act on. That changes nothing here, because the done-item asks for the files and the rule to be gone, not for the rule to have worked.
  7. The two closing review items in this plan's text (#429's last review: a wrong clause in the decline record, this heading's leading article, and a "step 3b" instruction outside the split note's mapping) were fixed at source in this commit. The rest are #435, which PLAN-renovate-cadence.md's sweep should read, since one of its items is an ordering requirement on that sweep.

Otherwise the brief's premises hold: NETWORK_CHECKS is in scripts/audit_snapshot.py, FROZEN_METADATA and FROZEN_ISSUE_TITLES are in scripts/tests/test_metadata.py, CheckTestCase is in scripts/tests/base.py, and tools/audit-snapshot.sh exists.

Decisions.

  1. A new family module, rather than growing a 2,605-line one. scripts/audit/checks/action_pinning.py and scripts/tests/test_action_pinning.py, rather than raising two ratchet baselines. The ratchet asks a pull request that grows a baselined file to say why the file should grow rather than split, and here there is no such reason. The criterion shares only helpers with the rest of ci_workflows.py, and those are already in audit/text/workflows.py. npm_dependencies.py is the precedent for a registered family module for one concern: three of its classes are in CHECKS. release_rust.py supports only the split half of the argument -- it keeps one concern out of a large file, but registers nothing, and release.py imports its rules. A reviewer may prefer the class beside ReusableWorkflowSecrets, its nearest relative. The counter is that ci_workflows.py was already 2,605 lines and the ratchet exists to stop exactly that addition.
  2. Observation 6 gets a step of its own, 4b, which the phase lacked: it is a count, not code, and its window closes on a date, independent of the sweep. 4a and 4b can land in either order.
  3. No step moves earlier than the hold. The brief is complete enough to run today, but the criterion would fail every repository whose renovate.json does not extend the preset yet, and filing about 20 issues that only the sweep can close is the noise decision 4 of phase 3 exists to avoid.

Why a phase of its own. Split out of phase 3 on 2026-11-21, reversing that phase's back brief answer, so that phase 3 closes on what it landed instead of staying open for weeks behind another plan. Phase 3's decisions 4 to 7, its survey's helper inventory and its risk entry for this step stay in phase 3's section, where they were reasoned. This section carries the step and its definition of done.

Scope. In: the criterion, as step 4a; and phase 3's observation 6, the count of grouped digest pull requests Renovate opens here over the December 2026 and January 2027 windows, which answers open question 4 and which nothing could shorten. Out: everything phase 3's scope put out.

Step Effort Model Isolation Brief for sub-agent
4a medium sonnet worktree Held until two weeks after PLAN-renovate-cadence.md phase 3's sweep has landed (phase 3's decision 4). Add a ThirdPartyActionPinning class in a new family module, scripts/audit/checks/action_pinning.py, with a module docstring saying what the family covers (decision 1; ci_workflows.py and its tests are at their source-size ratchet baselines), with id = 'third-party-action-pinning', spec = 'docs/audits/third-party-action-pinning.md', template = None and issue_title = 'Third-party action pinning'. applies() returns a reason unless the repository has a workflows directory with files or at least one tracked action.yml/action.yaml (audit.files.tracked_paths, scripts/audit/files.py:193). run() reads every workflow through repo.workflows() and repo.read(), splits jobs with workflow_job_blocks() (scripts/audit/text/workflows.py:219, where every helper named below also lives) and steps with workflow_step_blocks() (line 408), takes each step's reference from step_uses() (line 445, which already drops a trailing comment and quotes) and each job's reusable-workflow reference from JOB_USES_RE (line 288) against the job body outside its steps; then reads every tracked action.yml/action.yaml and applies the same step splitter to its runs: block (indented_block(body, 'runs'), line 374). Check that workflow_step_blocks() accepts that indentation, and if it does not, add the smallest helper beside it rather than a YAML dependency. Import COMPOSITE_ACTION_MANIFESTS from audit.checks.ci_workflows (line 85) for the two manifest spellings rather than spelling them again. A reference is a finding when it is remote (not ./ or docker://), its owner, compared case-insensitively as the preset's shakenfist/** exemption is (ref.split('/')[0].lower() != 'shakenfist'), is not shakenfist, and the part after @ is not exactly 40 lowercase hex characters; a missing @ is a finding too. Report findings as <file>: <job or action>: <ref>. The criterion measures .github/workflows/ and tracked action manifests only, which is what runs: workflow copies under templates/ and vendored copies elsewhere in a tree are out of its reach. In this repository Renovate's templates/ file patterns in the root renovate.json pin those anyway, and in an adopter the copy is measured where it runs. Say so in the docstring and the spec, so that a pass is not read as every uses: in the tree being pinned. Write docs/audits/third-party-action-pinning.md following docs/audits/README.md, with a ## Projects section linking compliance.md#third-party-action-pinning, with phase 3's decision 5's measured and reviewer-confirmed halves kept apart. Its Why states the 540 third-party references by tag on 2026-10-02 and what a tag can be moved to, the form of a pinned line (owner/repo@<40 lowercase hex> # <tag>), and that Renovate pins branch refs and job-level reusable workflows the same way. The spec cites no plan phase, step or decision number, because plan-phase-references greps every .md under docs/ for phase <n>; it links this plan for the history instead. Its fix section warns that a repository's pin pull request breaks any test that asserts against a real workflow's uses: line, and links the current_ref()/uses_clause() guidance in docs/consistency-audits.md and #410. Add action_pinning to the from audit.checks import (...) list in scripts/audit/registry.py and append the instance at the end of CHECKS, after the github_config entries, because the registry's docstring says families are appended rather than reshuffled and the results JSON's order is part of its bytes, add the row to docs/audits/README.md, and add its entries to FROZEN_METADATA and FROZEN_ISSUE_TITLES in scripts/tests/test_metadata.py, leaving that file's pinned tool-failure list alone. This criterion reaches no network, so NETWORK_CHECKS in scripts/audit_snapshot.py is not edited. Add ThirdPartyActionPinningTest(CheckTestCase) in a new scripts/tests/test_action_pinning.py covering: a tag ref (finding), a sha with a comment (pass), a sha without one (pass), a branch ref (finding), a commented-out line (not a finding), a quoted ref, a docker:// ref (not a finding), a ./ ref (not a finding), a shakenfist/actions/...@main ref (not a finding), a Shakenfist/actions/...@main ref (not a finding: the owner comparison is case-insensitive), a job-level third-party reusable workflow (finding), a job-level first-party reusable workflow at @main (not a finding), a composite action.yml outside .github/ with an unpinned step (finding) and with a pinned one (pass), an action.yaml with an unpinned step (finding, so both manifest spellings are exercised), a workflow copy under templates/ with an unpinned ref (not a finding, holding the scope above), a 7-character short sha (finding), a repository with neither workflows nor an action file (not_applicable), an empty .github/workflows/ and no action file (not_applicable), and a 40-character upper-case sha (a finding, since GitHub prints lower case and the comparison is exact). Then run the before-and-after procedure in docs/consistency-audits.md (tools/audit-snapshot.sh then --diff) against fresh clones of the matrix, and state in the commit message how many repositories newly fail, including this one, which must pass because 3a's pin pull request merged and the sweep deleted the two files whose dtolnay/rust-toolchain phase 3 left unpinned. Any audit-manage-issues.py run is --dry-run. Commit subject: Add the third-party-action-pinning criterion.
4b low sonnet none Management session, inline, on or after 2027-02-01, once the January 2027 CI-tooling window has closed; independent of 4a and of the hold. List this repository's grouped pull requests: gh pr list --repo shakenfist/development --state all --head renovate/ci-tooling --limit 100 --json number,title,createdAt,mergedAt. That branch name is the one #407 and #426 were opened from, not derived from groupName; confirm it against the superset gh pr list --repo shakenfist/development --state all --search 'head:renovate/' --limit 200 --json number,headRefName,createdAt before counting, and if the group appears under another branch, count that one and record its name. An empty narrow result while the superset has grouped CI-tooling pull requests in the window is a measurement failure, not a zero. Keep those created from 2026-12-01 to 2027-01-31 inclusive, and for each say whether it moved an action digest (gh pr diff <n> \| grep -E '^\+.*uses:.*@[0-9a-f]{40}' prints a line). Record in this section the number, creation date and digest lines of each, the count per month, and whether any digest update arrived outside the group, which is the failure open question 4 asks about (gh pr list --repo shakenfist/development --state all --author shakenfist-bot --search 'created:2026-12-01..2027-01-31', the account that opened #407 and #426, minus the grouped ones). Then put the answer under open question 4 in the Open questions section. Commit subject: Record the two-window digest volume.

Risks and mitigations.

  • The sweep slips, and this phase stays Blocked for months. That is the accepted cost of decision 3. The plan-blockers note is shown in every session's SessionStart report in this repository, but as a note it never marks the plan waiting or ready, so whoever plans PLAN-renovate-cadence.md's phase 4 checks this one. #435 carries the one ordering requirement the sweep must meet.
  • workflow_step_blocks() misses the steps of an action.yml, whose runs.steps sit at a different indentation from a workflow's. The check would then pass every composite action, and a silent pass looks the same as compliance. 4a's composite-action test with an unpinned step is the guard. The management session confirms it fails when the action-file walk is removed, with the mutation-check helper, before the step is committed.
  • More repositories newly fail than the sweep explains, for example one that extends the preset but has not merged its pin pull request. 4a's commit states the count from tools/audit-snapshot.sh. If any failing repository is not explained by an open pin pull request, the management session holds the merge and lists them, because each one becomes an auto-filed issue.
  • 4b's date passes unnoticed. Nothing in this plan's hold watches 2027-02-01, and 4b is the one step the hold does not excuse. A dated plan-blockers note carries the date. A slip delays the answer rather than losing it: gh pr list with a created: range answers as well in March as in February.

Back brief gate. Decision 1 is cheap to change now and costly once 4a has written the module, its tests and its registration. Confirm a new action_pinning family before 4a runs.

Definition of done.

  • pre-commit run --all-files passes with tools/source-size-baseline unchanged by this phase.
  • Phase 3's observation 6 is answered here, by step 4b: the number of grouped digest pull requests over the December 2026 and January 2027 windows, which is open question 4's answer, and the Open questions section says where it is.
  • docs/audits/third-party-action-pinning.md exists, is linked from docs/audits/README.md, has a ## Projects section linking compliance.md#third-party-action-pinning, carries no consistency-audit marker block, and keeps phase 3's decision 5's two halves apart, and states the criterion's file scope.
  • scripts/tests/test_metadata.py passes without its pinned tool-failure list having been edited, and NETWORK_CHECKS in scripts/audit_snapshot.py is unchanged.
  • The commit that lands step 4a states how many repositories newly fail, measured with tools/audit-snapshot.sh before and after, and the first scheduled audit after it reports that number.
  • This repository passes third-party-action-pinning on the day step 4a lands.
  • .github/workflows/renovate.yml and templates/renovate/renovate.yml no longer exist, and the root renovate.json rule that kept their dtolnay/rust-toolchain unpinned went with them, so phase 3's grep prints nothing. This phase deletes neither; if the sweep leaves either file in place, 4a does not land until it is gone, rather than landing with the exemption copied into the criterion.

Phase 5: record the policy

Planning effort: medium. It documents a policy that phases 2 and 3 have already decided.

Step Effort Model Isolation Brief for sub-agent
5a medium sonnet none In docs/audits/reusable-workflow-secrets.md, replace "What this does not cover" with the settled policy: first-party refs move, and the moving-ref-source-protection criterion is what makes that acceptable; third-party refs are pinned, under third-party-action-pinning. Include the upper bound of 14 pull requests a day this avoids, what a moving ref can reach (Situation: the runner's filesystem, and the caller's job for composite actions), the "pull request and CI, not a second reviewer" limit from open question 2, and the residual from open question 1. State two more limits. The required status checks are a first-party gate: Lint, Unit tests and gitleaks all carry a fork guard, so on a fork pull request only Check paths reports and the other three are satisfied by skipping; secret-scan.yml and the organisation's push protection are what cover forks. And, which phase 2's risk list records: the review-marks App is installed on actions as of 2a, and bypass-actor-identity's accepted residual -- shakenfist-k3s-ci-arc holding administration: write on hunkydory -- therefore reaches a bypass of actions' own ruleset. Say so plainly rather than describing the ruleset as the boundary. Link both new specs. In the Why section, put the instar#617 sentences in the past tense, describing what actually landed if review changed it. Do not close #153: phase 1 closed it on 2026-10-03, when development#209 landed. Link phase 1's landings instead.

Phase 6: shared workflows instead of copied templates

Planning effort: high. The classification in 6a decides how much of the fleet changes, and renaming required checks can wedge merge queues if it is done carelessly. Planned on 2026-11-29, on branch workflow-ref-trust-phase-06-shared-workflows.

Planned out of numeric order, and the table keeps its numbers (decision 1). Phases 4 and 5 are held behind PLAN-renovate-cadence.md phase 3's fleet sweep plus two weeks; that plan's sweep had landed only its in-repository pull request (#445) by 2026-11-29 and its 22 repository pull requests had not started. Re-read on 2026-12-02: those 22 landed between 2026-11-26 and 2026-11-29, and no repository in the audit matrix now carries .github/workflows/renovate.yml, so the two-week clock expires around 2026-12-10. The hold has not lifted: that date is still ahead, and phase 3 still owes the removal of the runner's temporary rule, which is why its row correctly reads In progress. This phase depends on phase 2 alone, which is complete, so it is the only one of the three that can run. There is no close-out commit at the head of this branch: phase 3 was closed out in phase 4's first commit, and phase 4 has not landed any work to close.

Why. templates/ hands workflows to the fleet by copying, and the copies drift. Read through the GitHub API on 2026-10-03:

Template Live copies Distinct versions
renovate.yml (its README says "copied verbatim") 17 14
codeql-analysis.yml 17 12
pr-retest.yml 17 10
export-repo-config.yml (already a caller of actions) 17 6
mermaid-lint.yml 6 3
prune-reviews.yml 7 1

That table is from the master plan's own survey and the numbers have moved; survey item 2 below re-reads them and is the one to plan against. prune-reviews.yml was the exception because PLAN-review-import.md was actively keeping it converged; survey item 3 records that it no longer is. Even the caller stub export-repo-config.yml had six versions then, and four over 23 copies on 2026-11-29 (survey item 2), so the stubs need a criterion too, not just the code they call.

Why after phase 2. Today a push to actions main reaches 93 @main references in 14 repositories. Each template moved there adds to that. Phase 2 is what makes the moving ref acceptable, so this phase must not start until phase 2's ruleset is live. It is (phase 2 is complete). That census was read on 2026-10-02 and is deliberately not re-taken here; survey item 14 says why.

Two costs to plan around.

  • A job inside a reusable workflow reports its status as caller / callee. Any repository whose ruleset or merge queue requires the old check name stops merging until the ruleset is updated. Survey item 6 found this is one repository rather than the fleet, so the rule stands but the work does not: each rollout step lists the required contexts first and edits a ruleset only where a context names a workflow-level job.
  • A reusable workflow cannot read files from its own repository without a second checkout, whereas a composite action can, through github.action_path. Templates that ship a script into tools/ (mermaid-lint.sh, ci-prune-reviews.sh, pin-indirect-dependencies*.sh, the issue-fix scripts) probably want a composite action for their steps, wrapped by a thin caller workflow. Step 6a confirms this rather than assuming it. A composite action runs inside the caller's job, with that job's environment, which is the wider exposure the Situation section describes, so phase 2's protection matters most for these.

What the survey found (2026-11-29, against main at 101dc05). The fleet reads below are through the GitHub API against each repository's default branch, because local clones are stale. Copy and version counts come from the contents API's blob shas: identical content has an identical blob sha, so distinct shas count distinct versions without fetching any file.

  1. #151 is already closed, on 2026-10-13, as completed, by the re-sync pull requests that PLAN-review-import.md's convergence work drove. The master plan's steps 6c and 6d -- 6d and 6e after this phase's renumbering of its own steps -- were written to close it: the first set the condition and the second's last landing carried "Fixes #151", with a follow-up issue as the fallback. All of that is removed (decision 8). The question #151 asked is not settled by its closing -- drift returned within weeks, and the eight copies 6c did not convert are still at four versions -- so 6d keeps the requirement that every template either becomes a caller or says in its README how drift in its copies is caught. It simply no longer closes an issue. The three re-sync pull requests the Related issues section asked 6a to check all merged on 2026-10-13 (instar#657, occystrap#160, shakenfist#4519), so that question is answered and 6a need not re-ask it. Those merges are what closed #151, and the drift came back anyway, which is the strongest single argument for this phase.

  2. The drift table is stale in both directions. Re-read on 2026-11-29 across the 25 repositories in the audit matrix (.github/workflows/consistency-audit.yml:52-85):

Workflow file Template 2026-10-03 2026-11-29
export-repo-config.yml export-repo-config/ 17 / 6 23 / 4
pr-re-review.yml ci-review-automation/ not listed 24 / 6
codeql-analysis.yml codeql/ 17 / 12 23 / 16
pr-retest.yml ci-review-automation/ 17 / 10 23 / 4
release.yml release-automation{,-rust}/ not listed 16 / 16
prune-reviews.yml review-tracking/ 7 / 1 9 / 2
mermaid-lint.yml mermaid-lint/ 6 / 3 9 / 4
test-drift-fix.yml test-drift-fix/ not listed 3 / 3
pr-fix-tests.yml test-drift-fix/ not listed 3 / 3
issue-link-check.yml issue-link-check/ not listed 1 / 1
pin-indirect-dependencies.yml pin-indirect-dependencies/ not listed 2 / 2
renovate.yml renovate/ 17 / 14 2 / 2
issue-fix.yml issue-fix/ not listed 1 / 1

Three corrections matter. The table's headline row is gone: templates/renovate/renovate.yml was deleted in 52994c7 and, on 2026-11-29, only two live copies remained, in images and teneral, which PLAN-renovate-cadence.md's sweep deletes -- it was already out of 6a's scope and it is now out of the fleet. Both have since gone (images 2026-11-28 3142b55b, teneral 2026-11-29 6499efff), so that row reads 0 / 0 on the 2026-12-02 re-read. codeql-analysis.yml is the worst template in the fleet, not the second worst: 16 distinct versions over 23 copies, and it got worse while the plan sat. And pr-retest.yml improved sharply, from 10 versions over 17 copies to 4 over 23, which is the ci-review-automation re-sync work paying off. The rollout order in 6a is set from this table, not from the 2026-10-03 one.

The export-repo-config.yml and issue-link-check.yml rows were corrected by 6a, from 24 / 5 and 2 / 2, and are the counts after that correction. The first reading counted actions' own copy of each as a template copy, when both are the reusable callees on on: workflow_call -- the thing the stubs call, not a copy of a stub. Survey item 5 states that and the counts did not apply it. Every other count in this table reproduced exactly on 6a's independent re-read.

  1. prune-reviews.yml's footnote is void. PLAN-review-import.md is Complete in docs/plans/index.md, so nothing is actively converging that template, and on 2026-11-29 it had gone from one version to two across nine copies. It is an ordinary candidate now, not an exception -- and that stays true on the 2026-12-02 re-read even though the second version has gone again (survey item 15). Nothing is converging it; it converged by accident, because a Renovate pin bump happened to land on the one stale copy.

  2. Two templates are already callers, and the plan does not say so. templates/export-repo-config/export-repo-config.yml and templates/issue-link-check/issue-link-check.yml are both stubs with no run: steps, calling shakenfist/actions/.github/workflows/<name>.yml@main, and both callees in actions carry on: workflow_call. 6a must not re-classify them. issue-link-check is the worked example this phase should copy rather than invent: it already demonstrates a with: input (runs_on) carrying a per-repository choice, which is exactly the test 6a's third outcome turns on, and its README and in-stub comments record why the input exists and what a repository without self-hosted runners does instead.

  3. actions already holds ten composite actions at its root: build-smoke-cluster, check-dist, deploy-kolla-ansible, deploy-proxmox-on-shakenfist, pr-bot-trigger, pr-review-ref, require-ci-success, review-pr-with-claude, setup-kerbside-environment and setup-test-environment. The composite-action half of 6a's three outcomes is an established shape in this fleet, not a new one. actions' own codeql-analysis.yml, prune-reviews.yml, pr-retest.yml and pr-re-review.yml are that repository's own template copies, not reusable workflows; only issue-link-check.yml and export-repo-config.yml there are workflow_call.

Three corrections from the 2026-12-02 re-read, none of which moves the item's load-bearing half -- that those two files are callees rather than stub copies. 6c added mermaid-lint, so the count is eleven composite actions, not ten. actions has four workflow_call workflows rather than two: also pr-auto-review.yml and smoke-cluster.yml. And the four template copies named above are not all on push/pull_request/ schedule: pr-re-review.yml and pr-retest.yml there are on issue_comment.

  1. The required-check cost is one repository, not twenty-three. Read on 2026-11-30 for every repository in the matrix, through the effective-rules endpoint repos/shakenfist/<repo>/rules/branches/<default branch> rather than through /rulesets. That is the endpoint this repository's own moving-ref-source-protection criterion reads, and for the reason it gives: it is the only one that resolves organisation and repository rulesets together (scripts/audit/checks/github_config.py:806-813, via default_branch_rules()). Every required_status_checks rule it returned carries ruleset_source_type: Repository, so no organisation ruleset contributes a required context anywhere in this fleet. That is what the endpoint establishes, and its limit is the other way round from the obvious guess: it already leaves out a ruleset that is disabled, but it does not say whether a rule it reports blocks anything, because a ruleset set to evaluate reports on every rule it holds and refuses nothing (github_config.py:806-813). That is why moving-ref-source-protection reads each contributing ruleset back for its enforcement, and why 6e does the same before concluding a context is blocking: the table below may list hunkydory's Analyze as required when its ruleset is only evaluating. The direction is safe -- the error would be one unnecessary ruleset edit, not a wedged queue -- but it is the premise 6e is told to rely on. Fifteen repositories require only aggregate gate contexts -- Can see status, Can enqueue, Can merge, plus Can enqueue: direct-qemu and Can enqueue: sf-e2e in kerbside and Can enqueue: unit in occystrap -- which are gate job names that a caller rename cannot touch. Six require nothing at all: cloudgood, images, sfui, teneral, uncalibrated-sextant and visual-digest-rust have no required_status_checks rule in their effective rules, sfui because its only rules are deletion and non_fast_forward and the other five because they return no rules at all. Three name workflow-level contexts:
Repository Required contexts
actions Check paths, Lint, Unit tests, gitleaks
development CI paths, Lint and test, Audit smoke run, gitleaks
hunkydory Build, test and lint; Pre-commit hooks; Analyze; gitleaks; Can enqueue; Can merge

Analyze is CodeQL's job name, so converting codeql-analysis.yml to a caller renames hunkydory's required check and wedges that repository until its ruleset is edited. That is the whole of the cost the plan warned about, in one place, and it falls on the template the corrected rollout order puts first. actions and development name their own ci.yml jobs, which this phase does not wrap. private-ci is the one private repository in the matrix; its effective rules return 403 ("Upgrade to GitHub Pro or make this repository public") on the current plan, and it has no .github/workflows directory at all, so it is outside this phase and 6a does not need the unreadable data. The counts cover the matrix exactly: 15 + 6 + 3 + private-ci = the 25 repositories in .github/workflows/consistency-audit.yml:52-85.

  1. scripts/tests/test_docs_content.py was at its size-ratchet baseline when this was written, 2,128 lines, tools/source-size-baseline:18. The mermaid-lint criterion's tests could not grow there, which is the wall phase 4 hit with ci_workflows.py. scripts/audit/checks/docs_content.py was 550 lines and not baselined, so the class edit itself was unconstrained. Decision 2 splits both out, and the split removes a baseline entry rather than raising one. 6b did that: the file is 772 lines today with no baseline entry, and tools/source-size-baseline:18 is now test_registry.py.

  2. The three mermaid-lint hits the brief singles out all check out. MermaidLintCi is at scripts/audit/checks/docs_content.py:508 with MERMAID_LINT_SCRIPT = 'tools/mermaid-lint.sh' at line 164 and repo_has_mermaid() at 186, used by nothing else in that module. MermaidLintDeploymentTest.test_the_skill_pins_the_same_image is at scripts/tests/test_docs_content.py:837 and :860. The tools/ clause of the audit-package-tests hook is at .pre-commit-config.yaml:240, and the comment above it (:222-230) states the mermaid-lint reason in as many words. The "Using it by hand" section of templates/mermaid-lint/README.md is at line 167, and that README also has a "Required status checks" section at line 120 which 6c must reconcile with survey item 6. git grep -l mermaid-lint.sh found 23 files on 2026-11-30; five are outside both the brief's three and its exclusion list, and 6c must settle them: .claude/skills/diagram-conversion/SKILL.md, ARCHITECTURE.md, docs/audits/mermaid-lint-ci.md, scripts/tests/test_source_size_ratchet.py and scripts/tests/test_ci_prune_reviews.py, whose module docstring (line 12) explains its own design by reference to the way MermaidLintScriptTest runs the script. The last two are both prose rather than paths, so each needs a rewrite rather than a substitution: 6c found that test_source_size_ratchet.py explains itself the same way, which this item counted as a path hit. The count is dated because it moves, and 6c's own run of the grep found 24 -- 6b replaced one module with two.

  3. 6d's documentation target does not exist. docs/consistency-audits.md has no description of templates/ to put the convention beside. Its headings are "The two layers", "What a run does", "Issues are the work tracking", "Adding a criterion", "Bringing a repository into scope", "Testing a change" and "Related"; templates/ appears once, incidentally, at line 769, and template is documented only as a check attribute at line 545. There is no templates/README.md, as 6d says. Decision 7 gives the convention a page of its own.

  4. Four templates have no criterion pointing at them: issue-fix/, issue-link-check/, test-drift-fix/ and release-automation-rust/ (every template = 'templates/...' in scripts/audit/checks/). A template with no criterion has no drift enforcement at all, so "the template stays a template" is not a null outcome for those four -- 6a has to say what catches their drift. issue-fix/ has exactly one live copy, in shakenfist, so for it the honest answer may be that the template and its adopter are the same artifact twice.

  5. templates/source-size-ratchet/ ships no workflow. It ships ci-job.yaml, a job fragment to paste into an existing workflow, plus pre-commit-hook.yaml and the script itself. It cannot become a caller workflow in the shape 6a's three outcomes assume, and 6a says so explicitly rather than leaving a reader to wonder which outcome it got.

  6. Two criteria fail on main today, neither of them this phase's doing, both recorded rather than fixed (decision 9): plan-phase-references, with findings at docs/audits/bypass-actor-identity.md:173 and docs/audits/moving-ref-source-protection.md:206 -- one of them this plan's, not both: moving-ref-source-protection.md is phase 2's specification, while bypass-actor-identity.md belongs to PLAN-bot-bypass-identity.md phase 3 and its flagged line cites 33fl's PLAN-k3s-ci-runners.md phase 5, not this plan at all; and review-coverage, with 6 files needing review against a threshold of 5 -- 15 of 263 on the 2026-12-02 re-read, which is 6b's and 6c's new files awaiting a prune run, not a regression. The first is the criterion phase 4's survey item 3 hit, and it constrains every page 6c and 6d write: it flags phase <number> anywhere outside a plans/ directory, so docs/templates.md and any edit to docs/audits/mermaid-lint-ci.md must link this plan instead of citing a number. This plan file is exempt because it is under docs/plans/.

  7. Phase 4's last definition-of-done item is now met, which a later reader of that section would otherwise go looking for. .github/workflows/renovate.yml and templates/renovate/renovate.yml are both gone -- the second deleted in 52994c7 on 2026-11-25 by PLAN-renovate-cadence.md's in-repository pull request #445 -- and the root renovate.json holds no dtolnay/rust-toolchain or templates/renovate rule, so phase 3's grep prints nothing. This changes nothing about phase 4a's hold, which waits on the sweep's 22 repository pull requests, not on this repository's.

  8. One premise deliberately not verified. The Situation's census of 633 remote uses: references, 93 of them shakenfist/actions/...@main across 14 repositories, was read on 2026-10-02. "Why after phase 2" cites it to argue that each template moved into actions widens what a push to that repository's main can reach. That argument does not turn on the figure, the condition it sets is already satisfied, and re-reading 633 lines across 25 repositories is work 6a does on the files it classifies. The numbers above them in that paragraph are therefore left at their 2026-10-02 reading and dated.

  9. Re-read on 2026-12-02, after 6c landed. Two things moved the fleet between 6a's survey and this reading, and neither was this plan's work. A fleet-wide Renovate "Pin dependencies" sweep on 2026-11-30 touched these files in 20 of the 25 matrix repositories (931c927b agent-python through 7abea515 visual-digest-rust, 13:44-14:03 UTC), and PLAN-renovate-cadence.md's 22 repository pull requests landed 2026-11-26..29.

    Four of the count pairs in survey item 2 have moved. Method unchanged: blob shas from the contents API, probed by exit status, over the same 25 repositories, with actions' own export-repo-config.yml and issue-link-check.yml excluded as callees.

    Workflow file 2026-11-29 2026-12-02
    pr-re-review.yml 24 / 6 24 / 7
    prune-reviews.yml 9 / 2 9 / 1
    mermaid-lint.yml 9 / 4 9 / 5
    renovate.yml 2 / 2 0 / 0

    Every other pair reproduced exactly. mermaid-lint.yml gained a version because this repository's stub is the fifth; the eight copies 6c did not convert are still four versions between them, so the backlog 6f inherits is unchanged. prune-reviews.yml converged by accident, when the pin sweep happened to bump teneral's one stale copy.

    The drift profile has changed, and phase 4 should know. Counting third-party uses: refs whose ref is not a 40-hex sha, one blob per live copy:

    Workflow file 2026-11-29 2026-12-02
    codeql-analysis.yml 21 of 23 3 of 23
    pr-re-review.yml 21 of 24 3 of 24
    mermaid-lint.yml 8 of 9 1 of 9
    pin-indirect-dependencies.yml 2 of 2 0 of 2
    test-drift-fix.yml 3 of 3 0 of 3

    The whole remaining class is three repositories -- actions, andris and ryll -- while the version counts barely moved, so the 16 codeql versions are now generational drift rather than pinning. Two consequences. For this phase, nothing: the rollout order in decision 3 is set by copy and version counts, which did not change. For phase 4, a lot: its criterion is three repositories away from a green fleet rather than twenty-one, so the sweep its hold waits for has largely already happened by another route. Phase 4 should re-read this before planning, and its two-week clock is the thing to check, not the backlog size.

Otherwise the master plan's premises for this phase hold. Every template directory it names exists, MermaidLintCi requires tools/mermaid-lint.sh from the same module as the brief says, the consistency-fix skill 6e calls for exists, and the registry's docstring does say that CHECKS entries are appended rather than reshuffled because the results JSON ordering is part of its bytes (scripts/audit/registry.py:9-17), which decision 2 has to respect.

Decisions.

  1. This phase runs before phases 4 and 5, and the Execution table keeps its numbering. Execution order and table order diverge, and the table's note says so. Renumbering would invalidate every commit message, pull request and plan-blockers note that cites phase 4 or phase 5 -- the 2026-11-21 split already spent that cost once, and its note in this file exists to explain the resulting mismatch to readers of older commits. A reviewer may object that a plan whose phases execute out of order is harder to follow than one renumbered to match. The counter is that the numbers are referenced from outside this file, where a rename cannot reach, while the order is visible in one place.

  2. MermaidLintCi and its tests move to a family module of their own, as a step before the criterion changes. Survey item 7: the tests cannot grow where they are. scripts/audit/checks/ mermaid_lint.py and scripts/tests/test_mermaid_lint.py, taking MERMAID_LINT_SCRIPT, MERMAID_FENCE_RE and repo_has_mermaid() with the class (survey item 8 confirms nothing else in docs_content.py uses them) and MermaidLintCiTest, MermaidLintDeploymentTest and MermaidLintScriptTest with the tests. This follows phase 4's decision 1, with one difference that makes it easier rather than harder: the move takes test_docs_content.py from 2,128 lines to roughly 780, under the 1,500-line threshold, so tools/source-size-ratchet.py --update drops its baseline entry instead of anybody hand-editing one.

Where the moved lines land, and why 6b splits them twice. The three classes are 157, 140 and 1,055 lines (test_docs_content.py:644-800, :837-976, :1020-2074), 1,352 together, so a single new module arrives at roughly 1,375 lines -- about 125 under the same 1,500-line threshold. 6c then adds pass, fail and stale-copy tests to that very file, so the module would cross the threshold in the next step and want a tools/source-size-baseline entry of its own: the letter of this phase's definition of done, and the defeat of decision 2's whole point, which is that the tests cannot grow where they are. MermaidLintScriptTest is 1,055 of the 1,375 and is a different subject -- it executes the shell script rather than exercising the criterion -- so 6b makes two test modules, not one: scripts/tests/test_mermaid_lint.py for MermaidLintCiTest and MermaidLintDeploymentTest (about 320 lines, with room for 6c's tests) and scripts/tests/test_mermaid_lint_script.py for MermaidLintScriptTest (about 1,075). Neither is baselined, and the definition of done now says no new entry either.

scripts/tests/test_mermaid_lint_script.py no longer exists in this tree, and this decision and 6b's and 6c's briefs are the places that first prescribe it, so say it here rather than only in 6c's record: 6b created it at 1,076 lines, and 6c moved it into shakenfist/actions as tests/test_mermaid_lint.py along with the script it executes, which is the answer this decision asked 6c to give. The two-module split did its job and then one of the two left the repository.

What the step's test actually is. The instance keeps its existing position in CHECKS, and the property to demonstrate is that the refactor changed no criterion's identity and no criterion's verdict. A whole-document byte comparison cannot show it, for two reasons. The document carries 'timestamp': datetime.now(timezone.utc).isoformat() at its top level (scripts/audit/registry.py:243). And review-coverage builds its message and its missing list out of the live file inventory (scripts/audit/checks/review.py:256-269), while .vscode/review-scope.toml puts *.py in scope, so 6b's own new files and its edits to existing ones move that check's text for entirely legitimate reasons -- three new .py files and four edited, counting test_metadata.py for FROZEN_CHECK_ORDER below, which 6b's brief turns into a stated prediction rather than a surprise. So the comparison is of the id and status sequence, which is what the registry docstring calls part of the published artifact's bytes:

python3 scripts/audit-check.py \
  --repo-path . --repo-name development 2>audit-stderr.txt \
  | python3 -c "import json,sys; d=json.load(sys.stdin); \
      print('\n'.join('%s %s' % (c['id'], c['status']) \
        for c in d['checks']))"

That is 72 lines, three of them fail on the main this phase executes against: plan-phase-references and review-coverage, which survey item 12 found, and plan-retirement, which began failing after that survey and is nothing to do with this phase. A module rename changes none of them by construction. Stderr goes to a file rather than /dev/null -- separately rather than folded in with 2>&1, per this plan's own Future work correction, but kept, because run_check's traceback is the one output that would explain a difference. 6b also diffs the two full documents and states the review-coverage delta it finds against the prediction in its brief; an unexplained difference anywhere else is a finding.

And a permanent guard, because the one-off comparison protects only 6b. The registry's docstring says the CHECKS order is part of a published artifact's bytes, and records that the ORDER table which used to pin it was deleted when it became redundant; nothing in scripts/tests/ has pinned the sequence since (test_no_criterion_is_registered_twice catches a duplicate and not an order). This phase renames a module inside that list and would leave the next renamer with no guard at all, so 6b adds FROZEN_CHECK_ORDER to scripts/tests/test_metadata.py beside FROZEN_METADATA and FROZEN_ISSUE_TITLES, which exist for the same argument about interfaces. That makes the claim machine- checked and permanent rather than a command output pasted into a commit message.

A reviewer may prefer to leave the class beside its nearest relatives in docs_content.py and split only the tests. The counter is that a test module named for a criterion in a different module is the kind of seam the next person has to re-learn, and the ratchet is going to force the file apart either way.

  1. mermaid-lint stays the pilot, but the rollout after it is reordered. It is still the right pilot for the reason the master plan chose it -- it ships a script, so it exercises the composite action path, and it runs on a docker-capable runner -- and its criterion is one this phase must change anyway. The rollout order after the pilot comes from survey item 2 rather than the 2026-10-03 table: codeql-analysis.yml (16 versions over 23 copies), pr-re-review.yml (6 over 24), export-repo-config.yml (stub convergence only), pr-retest.yml, prune-reviews.yml (2 over 9), then what 6a classifies from the templates the old table never listed. 6a's own figures supersede these: it corrected export-repo-config.yml to 4 over 23, which ties it with pr-retest.yml at 92, and kept it in the earlier slot because it is the cheapest landing of the two. See "Rollout order" below.

  2. Ruleset edits happen only where a context names a workflow-level job. The master plan's rule -- each rollout pull request changes the ruleset in the same step -- is kept, because it is the ordering that cannot wedge a queue. Survey item 6 turns it from 23 ruleset edits into one, in hunkydory, on the codeql-analysis.yml landing. Each rollout step still lists the contexts before it changes anything, because a ruleset is edited by hand outside this repository and a stale reading is how a queue wedges. The listing is of effective rules (repos/{org}/{repo}/rules/branches/{branch}), not of the repository's own rulesets: that is the only endpoint that resolves an organisation ruleset together with a repository one, and an organisation-sourced required context is invisible to the other.

"In the same step" is three ruleset states, not one edit. The conversion renames hunkydory's Analyze to <caller job> / Analyze, and the conversion arrives by a pull request that must itself pass through hunkydory's merge queue. While Analyze is required, that pull request's merge-group run reports the new name and not Analyze, so it can never merge; and the new context cannot be required before the converted workflow is on the default branch and has reported once, because a required context nothing reports stays pending forever. So the order is:

  1. list hunkydory's effective rules and remove Analyze from required_status_checks, leaving its other contexts alone;
  2. merge the conversion pull request;
  3. after one default-branch run of the converted workflow, add <caller job> / Analyze as a required context.

The window between 1 and 3 is the only period in which CodeQL is not a required gate in hunkydory, and it is one merge long rather than open-ended. The obvious alternative -- swap the two contexts in a single edit at step 1 -- is rejected: it makes the conversion pull request mergeable but wedges every other open pull request in the repository, because theirs still report Analyze under the old name. A sequence that strands one gate for one merge is better than one that strands every other author.

  1. release-automation and release-automation-rust default to staying templates. Sixteen copies, sixteen distinct versions. 6a may classify either as shared only by showing that the differences reduce to with: inputs, naming them; it may not reach that outcome by asserting it. Release workflows are where per-repository adaptation legitimately lives -- what gets built, what gets signed, which environment it publishes to -- and release-merge-queue and release-environment-protection already measure the parts that must not vary. This is the decision most likely to be argued with, because 16/16 is the highest drift ratio in the fleet and the instinct is to attack the worst number first.

  2. A template 6a keeps as a template must leave with a named enforcement mechanism. Survey item 10: four templates have no criterion at all today, so "stays a template" cannot mean "stays unmeasured". For each, 6a names one of a criterion that exists, a criterion this phase adds, a vN marker in the shape of shared-blocks/, or an explicit statement that drift there is acceptable and why. issue-fix/, with one copy, may legitimately get the fourth answer -- or the finding that the template is redundant.

  3. The convention goes in a new docs/templates.md. Survey item 9: there is no description of templates/ in docs/consistency-audits.md to put it beside, and inventing a section there would bury a page-sized subject inside the audit runbook. docs/ is the default home for documentation that helps a human, with a one-line pointer from AGENTS.md because this is a convention change, and a link from docs/consistency-audits.md's "Related" section.

  4. No step closes #151. Survey item 1. 6d keeps its condition -- every template 6a classified is either a caller stub or says in its README how drift in its copies is caught -- as a definition-of- done item for this phase, and 6e's briefs lose the "Fixes #151" instruction and the follow-up-issue fallback. The letters are this phase's own, after its renumbering: the master plan's 6c and 6d.

  5. The red criteria are not this phase's work. Survey item

  6. review-coverage clears in a review session, which the phase-landing rules keep out of a code pull request; plan-phase-references is two lines in two different plans' specifications -- one this plan's phase 2, one PLAN-bot-bypass-identity.md's -- and belongs to whoever next edits each page. A third, plan-retirement, began failing between the survey and 6b and is a retirement run's work rather than a criterion to fix. All three are recorded in Future work.

Scope. In: the classification (6a); the family-module split (6b); the mermaid-lint pilot (6c); the convention, its test and its documentation (6d); and the rollout (6e). Out: anything belonging to phases 4, 5 and 7; templates/shared-blocks/, which already meets 6d's condition through its version marker and the audit that flags an old version, and templates/renovate/, which PLAN-renovate-cadence.md owns; fixing either failing criterion (decision 9); renumbering the Execution table (decision 1); re-taking the 633-reference census (survey item 14); and converting release-automation* unless 6a makes the case decision 5 requires.

The classification (6a). Read on 2026-11-29 against this branch's templates/. One blob per distinct version was fetched with gh api repos/<repo>/git/blobs/<sha>, which is content-addressed and so needed no per-repository default-branch resolution, and diffed against the template. Twelve template directories in fourteen rows: ci-review-automation/ and test-drift-fix/ ship two workflows each, release-automation/ and release-automation-rust/ ship a release.yml apiece, and source-size-ratchet/ ships none.

Template Workflow file Copies x versions Outcome Why
codeql/ codeql-analysis.yml 23 x 16 = 368 reusable workflow Everything that varies legitimately is an input or a trigger. languages (kerbside pins four, sfui one, divergulent one, images one, and four repositories run a matrix), build-mode: none (kerbside-patches) and the runner labels take with: inputs in the runs_on shape; branches:, paths-ignore: and hunkydory's merge_group stay in the caller's on:, where a reusable workflow leaves them. Two further axes need inputs of their own: images drops the Autobuild step altogether, which build-mode or a boolean already expresses, and hunkydory rekeys the job concurrency: group for its merge queue, which a called job can take from an input. The job needs no file from the caller beyond actions/checkout, which in a called workflow checks out the caller anyway. Hunkydory's required Analyze is renamed by the conversion, so this is the one landing that edits a ruleset (survey item 6, decision 4).
ci-review-automation/ pr-re-review.yml 24 x 6 = 144 reusable workflow Six versions, zero adaptation: every one has the same two jobs with the same names, the same [self-hosted, static] and [self-hosted, claude-code] labels and the same 10 and 60 minute timeouts. The six are six generations of the template -- the pr-bot-trigger gating and the "tell the requester" step among them. The trigger half already calls the composite action shakenfist/actions/pr-bot-trigger@main; the rest is gh calls and a checkout of refs/pull/N/merge, neither of which needs the caller's files.
release-automation/ release.yml (12 Python copies) 12 x 12 = 144 stays a template Decision 5 upheld on evidence, not assertion. A reusable workflow's job graph is static and no with: input adds a job, and the job graphs differ: seven copies carry the template's five (ci-gate, build, sign-tag, publish-pypi, github-release), shakenfist and client-python-k3s add build-collection and publish-collection, kerbside adds build-proxy-wheels and publish-proxy-pypi on top of those for nine, and hunkydory has no sign-tag and no publish-pypi at all and publishes to the Actions marketplace instead.
export-repo-config/ export-repo-config.yml 23 x 4 = 92 already a caller (survey item 4) Not re-classified. Recorded because the drift is the cleanest case in the fleet for 6d's test: all four versions are functionally identical 14-to-28-line stubs differing only in header comments and the wording of the "no secrets: inherit" note, and the export-repo-config criterion passes on all of them because it checks presence and the absence of secrets: inherit, never bytes.
ci-review-automation/ pr-retest.yml 23 x 4 = 92 reusable workflow Same finding as pr-re-review.yml, and with the per-repository choice already externalised: the workflow it dispatches is vars.RETEST_WORKFLOW with a functional-tests.yml default (templates/ci-review-automation/pr-retest.yml:104), a repository variable rather than a file edit, so it survives the conversion untouched. Divergulent's version is ahead of the template, not adapted: it carries a shakenfist-bot login guard and an if: ${{ !cancelled() }} on the confirmation step that the template lacks.
mermaid-lint/ mermaid-lint.yml 9 x 4 = 36 composite action Pilot (decision 3). It runs ./tools/mermaid-lint.sh from the caller's checkout (templates/mermaid-lint/mermaid-lint.yml:120), so the composite shape applies: $GITHUB_ACTION_PATH carries the 656-line script with no second checkout. One genuine adaptation in nine copies -- shakenfist's two '!docs/components/**' lines, which its own header already explains as "this repository's only divergence from the template" -- and it is a path list, so the trigger half stays in the caller and the filter half is an input or stays in tools/mermaid-lint-exclude, which the script already reads.
review-tracking/ prune-reviews.yml 9 x 2 = 18 composite action It ships the 379-line ci-prune-reviews.sh and deliberately takes no actions/checkout: it clones the caller's own default branch into RUNNER_TEMP to get the script, because the static pool may reuse a workspace a pull request has written to (templates/review-tracking/prune-reviews.yml:125-142). $GITHUB_ACTION_PATH removes that clone outright and fetches the script into the runner's own action directory rather than the workspace, so a pull request's content cannot reach it. That is less than the comment claims for the clone, and the difference matters: the threat it names is a reused workspace on a static runner, where a hook an earlier job left could rewrite the script, and the comment says the vm pool starts each job empty so the no-checkout design is kept "as defence in depth". The conversion trades that defence in depth for the runner's action cache, which is safe on an ephemeral pool and weaker on a static one -- and this job carries a contents: write App token, which is why the template reasoned about it at all. So 6e confirms, before converting, that every repository carrying prune-reviews.yml runs it on the ephemeral vm pool; any adopter still on a static pool keeps the clone. environment: review-marks and permissions: stay in the caller stub, because a composite action cannot set a job-level environment:. tools/review-tracking.sh stays a copied template; AGENTS.md has it run by hand.
release-automation-rust/ release.yml (4 Rust copies) 4 x 4 = 16 stays a template Same argument, smaller population. Ryll carries ten real jobs (build-linux, build-ryll-wheels, publish-crates, publish-ryll-pypi, update-homebrew beyond the template's), andris publishes a wheel from a Rust tree with build-wheels, instar and teneral are the template's graph.
test-drift-fix/ test-drift-fix.yml 3 x 3 = 9 stays a template A {{PLACEHOLDER}} skeleton whose header says "CUSTOMISATION REQUIRED" and whose README has a "Customisation required" section: four customisation points are per-repository by construction -- {{INSTALL_DEPENDENCIES}} (:133), {{TEST_COMMAND}} (:149), a thirty-line {{CLAUDE_PROMPT}} (:182) and {{VERIFY_TEST_COMMAND}} (:305). They could be string inputs, and should not be -- the argument templates/issue-link-check/README.md makes against runs_on travelling as a JSON string applies with more force to a shell command, which would then be invisible to shellcheck and actionlint in the one repository that cares what it runs.
test-drift-fix/ pr-fix-tests.yml 3 x 3 = 9 stays a template Already a caller stub, but of ./.github/workflows/test-drift-fix.yml, a local path it cannot trade for shakenfist/actions while its callee stays local. Its shareable half is already a composite action (shakenfist/actions/pr-bot-trigger@main). Instar's GITLAB_TESTDATA_TOKEN is a named secrets: entry, which is already the right shape; shakenfist's extra bot-comment guard and same_repo condition are a security fix the template has not taken back.
pin-indirect-dependencies/ pin-indirect-dependencies.yml 2 x 2 = 4 composite action It ships pin-indirect-dependencies.sh (286 lines) and -apt.sh and runs them from the caller's checkout, so the shape is the same as mermaid-lint. The sole difference between the two copies is kerbside's unpinned actions/checkout@v7. Two copies is also the whole population by design -- a library is never pinned -- so this earns the least of any conversion and is the one entry 6e may defer with the reason recorded.
issue-fix/ issue-fix.yml 1 x 1 = 1 stays a template One adopter, and nothing to converge towards it: the template is 372 diff lines ahead of shakenfist's copy, holding a max_diff_lines_ceiling input and the tools/extract-model-block.sh parsing that scripts/tests/test_issue_fix_extraction.py pins, neither of which shakenfist has. So survey item 10's guess that the template and its adopter are the same artifact twice is not true today, and the next re-sync runs template to adopter.
issue-link-check/ issue-link-check.yml 1 x 1 = 1 already a caller (survey item 4) Not re-classified. One live caller, byte-identical to the template, kept so by IssueLinkCheckDeploymentTest.
source-size-ratchet/ none n/a stays a template; none of the three fit Survey item 11, confirmed. It ships ci-job.yaml, a job fragment to paste into an existing gate workflow, pre-commit-hook.yaml, a stanza to merge into the adopter's .pre-commit-config.yaml, and the script. There is no workflow file to reduce to a stub; a reusable workflow cannot be needs:-wired into a repository's gate from outside it; and a composite action cannot be what a local pre-commit hook runs, which is the whole point of the ratchet being the same script in both places.

The products in that table are the 2026-11-29 reading. Three moved by 2026-12-02 (survey item 15): pr-re-review.yml to 24 x 7 = 168, prune-reviews.yml to 9 x 1 = 9, and mermaid-lint.yml to 9 x 5 = 45 because this repository's stub is the fifth version. The ranking the products exist to set is unchanged, and the classifications are not affected at all.

Drift against adaptation. Eleven workflow files have two or more live copies, and 54 of their 60 versions differ from their template. Five axes of difference are legitimate per-repository adaptation: the codeql languages and build-mode choices, hunkydory's merge_group trigger and its rekeyed concurrency group, shakenfist's '!docs/components/**' exclusion in mermaid-lint.yml, and instar's named GITLAB_TESTDATA_TOKEN in pr-fix-tests.yml. Images' dropped Autobuild step is not a sixth axis: the codeql row counts it as the build-mode choice expressed by omission, which is the whole reason it is absorbable by an input rather than something a caller has to keep. Every other difference is drift, and not one copy in the fleet differs from its template by legitimate adaptation alone -- images and hunkydory document their codeql divergence in the file and still carry unpinned actions beside it. The drift is of three kinds. Generational: stale comment prose, a branches: list from before the template named both main and develop (11 of 16 codeql versions), a check_paths job added after the copy was taken (present in 5 of 16), a missing timeout-minutes (5 of 16, against docs/audits/workflow-standards.md). Unpinned third-party actions, which was the largest single class on 2026-11-29: 21 of 23 codeql-analysis.yml copies, 21 of 24 pr-re-review.yml, 8 of 9 mermaid-lint.yml, both pin-indirect-dependencies.yml, all three test-drift-fix.yml, and teneral's prune-reviews.yml carrying a pin two releases stale. That class has since collapsed and this paragraph no longer describes the fleet -- survey item 15 has the 2026-12-02 figures and what it means for phase 4. And, in two cases, a copy ahead of its template: divergulent's pr-retest.yml and shakenfist's pr-fix-tests.yml each carry a bot-comment guard the template has not taken back, so drift here does not only flow outwards.

Why the audit is green while this is true. This is the finding that matters most for decision 6. Of the templates with a criterion today, only three compare bytes: review-tracking-templates (scripts/audit/checks/review.py:384-406, which was reporting teneral's stale pin when this was written and passes now that the 2026-11-30 pin sweep converged it), source-size-ratchet (scripts/audit/checks/source_size.py:41-42) and the Rust half of release-process (scripts/audit/checks/release_rust.py:823-891). The rest check presence or behaviour: github-security only asks whether .github/workflows/codeql-analysis.yml exists (scripts/audit/checks/github_config.py:243-244), which is how sixteen versions sit under a passing criterion; mermaid-lint-ci asks for the script and a workflow that mentions it (docs_content.py:533-544); export-repo-config asks for the file and no secrets: inherit (github_config.py:145-157); ci-review-automation asks for presence, the shared trigger action, no inherited secrets and the fork gates (ci_workflows.py:1012-1080). A caller stub is the one shape a presence check can measure completely, which is the argument for the conversions above independently of the drift count.

Enforcement for the five that stay templates (decision 6).

Template Mechanism Status
release-automation/ release-process, by invariant rather than by bytes, plus release-merge-queue and release-environment-protection Exists
release-automation-rust/ release-process again: it calls release_rust_issues, which byte-compares tag-release.sh and sign-release-tag.sh and compares the other two scripts outside their --- per-repository settings --- markers (release_rust.py:95-98, 823-891) Exists; survey item 10 is wrong about this one
test-drift-fix/ A criterion this phase adds, in the outside_settings() shape above -- but that shape needs paired delimiters, and this template has none. release_rust.py can locate a region because the template and every copy carry --- per-repository settings --- / --- end of per-repository settings --- (release_rust.py:97-98, 823-891); test-drift-fix.yml's customisation points are bare one-line # {{...}} comments, and in a copy the placeholder has been replaced by arbitrary multi-line content with nothing marking where the region ended. So the markers are a prerequisite, not a detail: wrap all four points in marker pairs in the template, roll them into the three copies alongside taking shakenfist's bot guard and same_repo condition back, and only then add the criterion. The helper needs generalising too -- outside_settings() returns None unless there is exactly one marker pair (release_rust.py:836-847), and this template needs four 6e adds it, markers and a multi-region helper first
issue-fix/ Decision 6's fourth answer: drift is acceptable while there is one adopter. The scripts are measured by this repository's own scripts/tests/test_issue_fix_extraction.py, and the template leads the adopter, so there is no fleet to converge. A second adopter is the trigger to revisit, and it gets a composite action then Stated, with a trigger
source-size-ratchet/ source-size-ratchet: byte-compares tools/source-size-ratchet.py against the template and requires a CI lane that reaches the hook Exists

Survey item 10's fourth template, issue-link-check/, is not on that list because it is already a caller, but its gap is real: nothing outside this repository measures it, and its one copy is held only by IssueLinkCheckDeploymentTest. 6d's test covers it as a caller stub, and a criterion is only worth writing when a second repository adopts it.

Rollout order (distinct versions multiplied by copy count, decision 3). mermaid-lint first regardless of its 36, as the pilot. Then codeql-analysis.yml (368), pr-re-review.yml (144, 168 on the 2026-12-02 re-read), export-repo-config.yml (92, stub convergence only), pr-retest.yml (92), prune-reviews.yml (18, now 9), pin-indirect-dependencies.yml (4). issue-link-check.yml (1) is already converged and needs nothing. The two 92s are a tie that decision 3's order broke the other way on stale numbers; export-repo-config.yml keeps the earlier slot because it is a comment-only change to files that are already callers, so it is the cheapest landing in the list and proves 6d's test before anything riskier runs. Decision 3's figures for the last two entries were 5 x 24 = 120 for export-repo-config.yml and nothing for pin-indirect-dependencies.yml; the corrections are below.

Corrections made at source. 6a's two corrections to survey item 2's counts, and the one to decision 3's rollout figures, were applied to those passages rather than left here; templates/issue-link-check/README.md warns about the caller-and-callee confusion that caused them in as many words. 6a also falsified survey item 10 for release-automation-rust/, which is enforced -- by release-process through release_rust_issues, it simply carries no template = attribute -- and survey item 10's guess about issue-fix/, whose template leads its one adopter by 372 diff lines rather than duplicating it. Both are corrected in the Enforcement table above and in Future work.

Step Effort Model Isolation Brief for sub-agent
6a high opus none Classify every template directory under templates/ except shared-blocks/ and renovate/. The copy and version counts are already taken, on 2026-11-29, in survey item 2 above -- do not re-take them; they come from the contents API's blob shas across the 25 repositories in .github/workflows/consistency-audit.yml:52-85, and private-ci has no .github/workflows directory. What is left is the diffs. For each workflow file with two or more live copies, fetch each copy from its repository's default branch through the GitHub API (local clones are stale) and diff it against the template, then sort the differences into drift and legitimate per-repository adaptation, citing the lines. Then decide one of three outcomes and say why: a reusable workflow in actions, a composite action in actions (when the steps need the caller's checkout or ship a script), or the template stays a template (when the differences are legitimate and cannot be expressed as with: inputs). Four constraints on the outcomes. Survey item 4: export-repo-config/ and issue-link-check/ are already callers -- do not re-classify them, and read templates/issue-link-check/issue-link-check.yml first, because it is the worked example for a with: input carrying a per-repository choice and the test for the third outcome is whether a difference can take that shape. Survey item 5: actions already holds ten composite actions at its root, so follow one of those rather than designing the shape. Decision 5: release-automation/ and release-automation-rust/ stay templates unless you can name the with: inputs that absorb all sixteen versions' differences. Decision 6: every template you keep as a template leaves with a named enforcement mechanism, and survey item 10 lists the four that have no criterion today. Survey item 11: source-size-ratchet/ ships a job fragment rather than a workflow, so say which outcome it gets and why the three do not fit. Required status checks are already read, in survey item 6 -- use that table rather than re-reading 25 rulesets, and note that only hunkydory needs a ruleset edit, on the codeql-analysis.yml landing. Write the result into this section as a table, with the rollout ordered by distinct versions multiplied by copy count, which is the order decision 3 states. Make no changes outside this plan file. Commit subject: Classify the fleet's workflow templates.
6b medium sonnet worktree A pure refactor, no behaviour change, landing before the criterion changes (decision 2). Move MermaidLintCi from scripts/audit/checks/docs_content.py:508 into a new scripts/audit/checks/mermaid_lint.py, taking MERMAID_LINT_SCRIPT (line 164), MERMAID_FENCE_RE (183) and repo_has_mermaid() (186) with it; survey item 8 confirms nothing else in that module uses them, so verify that with git grep before moving rather than trusting it. Give the module a docstring saying what the family covers, as scripts/audit/checks/plans.py does -- not action_pinning.py, which phase 4 creates and phase 4 is held. Move MermaidLintCiTest (scripts/tests/test_docs_content.py:644) and MermaidLintDeploymentTest (837) into a new scripts/tests/test_mermaid_lint.py, and MermaidLintScriptTest (1020) into a second new module scripts/tests/test_mermaid_lint_script.py -- two files, not one, for the reason decision 2 gives: the three classes are 1,352 lines together, one module would arrive about 125 lines under the 1,500-line threshold, and 6c adds tests to it next. State the resulting line count of each. MermaidLintScriptTest executes the shell script rather than exercising the criterion, which is the seam. Add mermaid_lint to the from audit.checks import (...) list in scripts/audit/registry.py, re-wrapping that list: its second line is 110 characters today and inserting mermaid_lint, makes it 124, over the 120 in .flake8. Change the instance's module prefix in place: its position in CHECKS does not move, because the registry docstring (scripts/audit/registry.py:9-17) says the results JSON ordering is part of its bytes. That is this step's test, and it is a comparison of the id and status sequence rather than of the whole document (decision 2 says why both the run timestamp and review-coverage's text move on their own). Before and after, capture python3 scripts/audit-check.py --repo-path . --repo-name development 2>audit-stderr.txt | python3 -c "import json,sys; d=json.load(sys.stdin); print('\n'.join('%s %s' % (c['id'], c['status']) for c in d['checks']))" and show the two are identical; it is 72 lines, with plan-phase-references, plan-retirement and review-coverage the only fails. Keep audit-stderr.txt rather than discarding stderr: run_check's traceback is what would explain a difference. Then diff the two full documents as well, and expect exactly one check to differ, review-coverage, because .vscode/review-scope.toml has *.py in scope and this step adds three .py files and edits four. The prediction to check against: in-scope 259 to 262, reviewed 253 to 249, needing review 6 to 13, with never reviewed: entries for mermaid_lint.py, test_mermaid_lint.py and test_mermaid_lint_script.py, and stale: entries for docs_content.py, test_docs_content.py, registry.py and test_metadata.py -- the last because FROZEN_CHECK_ORDER edits it and REVIEWS.md has it reviewed on 2026-11-29. tools/source-size-baseline does not count: it is excluded from review scope. A difference anywhere else, or a different review-coverage delta, is a finding. Add FROZEN_CHECK_ORDER to scripts/tests/test_metadata.py beside FROZEN_METADATA and FROZEN_ISSUE_TITLES, asserting [c.id for c in CHECKS] against a frozen list, with a docstring pointing at scripts/audit/registry.py:9-17: nothing has pinned that sequence since the ORDER table was deleted, and a one-off comparison in a commit message protects this step and not the next renamer. Then run tools/source-size-ratchet.py --update, which should drop the scripts/tests/test_docs_content.py entry from tools/source-size-baseline because the file falls from 2,128 lines to under the 1,500-line threshold; if it instead lowers the entry, say what is still in the file. Do not hand-edit the baseline. scripts/tests/test_metadata.py's FROZEN_METADATA and FROZEN_ISSUE_TITLES are keyed on the criterion id, which does not change, so they need no edit -- confirm that rather than assuming it. Commit subject: Split the mermaid lint criterion into its own module.
6c high opus worktree Pilot on mermaid-lint (9 copies, 4 versions, ships mermaid-lint.sh, runs on a docker-capable runner). Runs after 6b, so the criterion and its tests are in scripts/audit/checks/mermaid_lint.py and scripts/tests/test_mermaid_lint.py. In shakenfist/actions, add the composite action or reusable workflow 6a chose, carrying the script. Reduce templates/mermaid-lint/mermaid-lint.yml to the caller stub, following templates/issue-link-check/issue-link-check.yml for the stub's shape and comments, update templates/mermaid-lint/README.md, and change the criterion so that it requires the caller (uses: shakenfist/actions/...@main with the documented inputs) and no longer requires tools/mermaid-lint.sh, with pass, fail and stale-copy tests. Dropping the requirement is not the same as deleting the file: decide, and record here, how a developer runs the lint by hand afterwards (a thin local wrapper, or the action's script from a checkout of actions), because AGENTS.md:86 prescribes tools/mermaid-lint.sh after editing a diagram. If this repository's copy goes, everything that names it moves in the same pull request. Find those files with git grep -l mermaid-lint.sh at the time, not from a list written here -- it found 23 on 2026-11-30, and 15 after 6c landed -- and leave out three kinds of hit: docs/plans/, which records history; REVIEWS.md and the .vscode/ weAudit files, which prune-reviews reconciles on the default branch after the merge and which AGENTS.md says a pull request must not edit. Eight hits need more than a path change. That is a decision about roughly 1,200 lines of tests, and it is the step's largest, so take it explicitly rather than as a by-product of the grep. MermaidLintDeploymentTest holds four more assertions that change meaning once the template is a stub, not just the one the master plan knew: test_script_matches_the_template byte-compares tools/mermaid-lint.sh against the template's copy, test_workflow_matches_the_template does the same for the workflow, and test_the_triggers_filter_on_the_same_paths, test_the_filters_name_the_exclude_file and test_the_script_excludes_what_the_workflow_excludes read the template workflow's paths: lists through _workflow() and _path_filters(). A stub has no script and no paths: to compare, so each either moves to comparing the caller against shakenfist/actions, or goes. And scripts/tests/test_mermaid_lint_script.py, which 6b has just created at roughly 1,075 lines, executes the script: if this repository's copy goes, that whole module has nothing to run, so say whether it follows the script into actions, is kept against whatever local wrapper the by-hand decision lands on, or is deleted. That answer follows from the by-hand decision this brief already requires, so make it the same decision rather than a second one. Three hits the master plan already knew: test_the_skill_pins_the_same_image in MermaidLintDeploymentTest reads the image digest from the script, so say where that pin lives afterwards; the tools/ clause of the audit-package-tests hook (.pre-commit-config.yaml:240, reasoned at :222-230) exists because these tests read the script, so if nothing under tools/ is read any more the clause and its comment both change; and the "Using it by hand" section of templates/mermaid-lint/README.md (line 167) is where the answer above is recorded. Five more that survey item 8 found: .claude/skills/diagram-conversion/SKILL.md, ARCHITECTURE.md, docs/audits/mermaid-lint-ci.md, scripts/tests/test_source_size_ratchet.py and scripts/tests/test_ci_prune_reviews.py, whose module docstring at line 12 describes its own design by reference to MermaidLintScriptTest running the script, so it needs a rewrite rather than a path substitution. Also reconcile that README's "Required status checks" section (line 120) with survey item 6: no repository carrying mermaid-lint.yml requires its job as a status check, so the rename costs nothing here, and the section should say what is true rather than warning generically. Whatever you write in docs/audits/mermaid-lint-ci.md must not contain phase <number>: plan-phase-references flags that anywhere outside a plans/ directory and it is already failing on two other pages (survey item 12). Then run the before-and-after procedure in docs/consistency-audits.md (tools/audit-snapshot.sh then --diff) against fresh clones of the matrix, and state in the commit message how many repositories newly fail, including this one. Any audit-manage-issues.py run is --dry-run. Convert this repository's own copy first. The fleet rollout is step 6f, not this step -- execution cut 6c's scope to actions and development by Mikal's decision, and the eight remaining adopters were briefly owned by nobody because this brief said "one pull request per repository" while the execution note handed them to "6e's shape" and 6e never named them. Record each landing in this section. Commit subject: Make mermaid lint a shared workflow.
6d medium sonnet worktree Add a test under scripts/tests/ asserting that every converted template is a caller stub: it calls shakenfist/actions at @main, and it has no run: steps of its own. It cannot assert that over everything 6a classified as shared, because 6d runs before 6e: at this landing only mermaid-lint (6c) and the two templates that were already callers are stubs, while codeql-analysis.yml, pr-re-review.yml, pr-retest.yml, prune-reviews.yml and pin-indirect-dependencies.yml are still full copies, so a test over the classification would fail pre-commit in the commit that adds it. Drive it from an explicit module-level list of converted templates, holding those three when 6d lands, and make the test fail loudly when a template on the list stops being a stub and when a list entry names a template that does not exist. The predicate in the first sentence of this brief is not sufficient on its own, and the list is load-bearing rather than convenient (2026-12-02 re-read): templates/codeql/codeql-analysis.yml has zero run: steps while being a full copy, so "no run: steps" discriminates nothing, and templates/test-drift-fix/pr-fix-tests.yml has zero run: steps and calls shakenfist/actions/pr-bot-trigger@main, so it satisfies the literal predicate while its actual callee is a local workflow. So each list entry names the specific shakenfist/actions ref that template exists to call, and the test asserts that ref rather than merely that some shakenfist/actions reference appears. The test must also accept both stub shapes -- mermaid-lint is a step-level uses: of a composite action with a legitimate actions/checkout beside it, while export-repo-config and issue-link-check are job-level uses: of a reusable workflow -- and tolerate non-shakenfist uses: steps. scripts/tests/test_mermaid_lint.py:353 (MermaidLintDeploymentTest.test_the_template_is_a_caller_stub) already does this for one template; generalise it rather than inventing it, and reuse the templates/**/*.y{a,}ml walk in ConvergedTemplatesTest (scripts/tests/test_registry.py:1239). Each 6e landing appends its template to that list in the same pull request, which is what makes the list -- rather than 6a's table -- the thing the definition of done's caller-stub item is measured against. Then write docs/templates.md (decision 7; there is no templates/README.md and docs/consistency-audits.md has no templates section to extend -- survey item 9), documenting the convention that a template meant to be identical everywhere is a caller and anything else says in its README why it is not, and how drift in a template that stays a template is caught. Link it from the "Related" section of docs/consistency-audits.md (:966; it was :932 when this was planned), mention it in AGENTS.md as one line because it is a convention change, and link it from README.md's "Templates" section -- that list names all fourteen template directories and is where a reader arrives first, and this phase is about to make several of its entries describe a caller stub rather than a copied workflow. A link into docs/ is exactly what README.md is for; do not expand the list itself, and leave the stale templates/renovate/ description alone, because PLAN-renovate-cadence.md owns it. Use no phase <number> anywhere in it: plan-phase-references flags that outside a plans/ directory. This step does not close an issue -- #151 closed on 2026-10-13, before this phase was planned, and decision 8 removed that instruction. The condition it sets is a definition-of-done item for this phase instead: every template 6a classified is either a caller stub or says in its README how drift in its copies is caught, with a template still queued for 6e counting as neither. The two directories 6a leaves out are outside the condition: shared-blocks/ already meets it, because its README describes the version marker and the audit that flags a repository carrying an old version, and renovate/ is owned by PLAN-renovate-cadence.md, whose shared preset replaces the copies. Commit subject: Document the template caller convention.
6e medium sonnet worktree For each remaining template in 6a's rollout order, repeat 6c's shape: callee in actions, stub template, criterion change with tests, then one pull request per repository using the consistency-fix skill. Decision 3 sets the order: codeql-analysis.yml, pr-re-review.yml, export-repo-config.yml (stub convergence only -- it is already a caller), pr-retest.yml, prune-reviews.yml, then whatever else 6a classified as shared. Required status checks are listed before each change, and a ruleset is edited only where a context names a workflow-level job (decision 4): on this reading that is hunkydory alone, whose required Analyze is the CodeQL job name and whose queue wedges on the codeql-analysis.yml landing until its ruleset is edited. Do not trust survey item 6 for this: before touching each repository, list its effective rules with gh api repos/shakenfist/<repo>/rules/branches/<default branch> and read the required_status_checks rules out of that, which is what default_branch_rules() does and the only endpoint that resolves organisation rulesets together with repository ones. A stale reading, or a reading from /rulesets that missed an organisation-sourced context, is how a queue wedges. Then read each contributing ruleset back for its enforcement, as moving-ref-source-protection does: the effective-rules endpoint reports an evaluate-mode rule the same as a blocking one, so a context listed there is not yet a context that refuses a merge. On the 2026-11-30 reading every such rule in the fleet was ruleset_source_type: Repository, so an organisation-sourced one appearing later is itself a finding. Then edit the ruleset in the three states decision 4 sets out, not one: remove Analyze, merge the conversion, and add <caller job> / Analyze once the converted workflow has reported on the default branch. Do not swap the two contexts in one edit -- that unwedges your own pull request and wedges every other open one in hunkydory. Record the three edits and the time between the first and the last, and show a later hunkydory pull request merging with the new context green before calling the landing done. Each template is its own pull request in this repository, and its landing is recorded here and appended to 6d's converted-template list in that same pull request -- the list is what the definition of done measures, so a conversion that does not extend it is unmeasured. Where a criterion's tests would grow a file at its tools/source-size-baseline entry, split as decision 2 did rather than raising the baseline. One template that is not in the rollout order is also this step's: the Enforcement table assigns 6e the new test-drift-fix criterion, byte-comparing test-drift-fix.yml and pr-fix-tests.yml outside their customisation regions in the outside_settings() shape. That is three pull requests, in order, and the first two are prerequisites rather than tidying. (1) Add --- per-repository settings --- / --- end of per-repository settings --- comment pairs around all four customisation points in templates/test-drift-fix/*.yml, because outside_settings() can only locate a region that is delimited in the copy as well as the template and these points are bare # {{...}} comments today. The existing helper will not do: it returns None unless there is exactly one start and one end marker in order (scripts/audit/checks/release_rust.py:836-847), so a file with four pairs is rejected rather than compared. So this step also decides, and records here, whether outside_settings() is generalised to scan paired markers in order -- failing on an unbalanced or interleaved set -- and shared with release_rust, or whether a multi-region function is written beside it. Generalising is preferred if the Rust comparison's tests stay green, because two nearly-identical region helpers is the seam the next person re-learns. (2) Roll those markers into the copies in instar, occystrap and shakenfist -- the three adopters, listed on 2026-11-30 from each default branch's .github/workflows/, and not divergulent, which carries pr-retest.yml rather than this template -- in the same pull requests that take shakenfist's bot-comment guard and same_repo condition back. (3) Then add the criterion. Note that release_rust treats a surviving {{ as a failure, so the marker convention and the placeholder convention do different jobs and both are needed. Commit subject: one per template, Make <template> a shared workflow., and Measure test drift fix template drift. for that one.
6f medium sonnet none Roll the mermaid-lint caller stub out to the eight repositories still running their own copy. Added 2026-12-02, because the work was owned by no step: 6c's brief said "one pull request per repository", execution cut 6c to actions and development by Mikal's decision, the execution note handed the rest to "6e's shape", and neither 6e's brief nor the rollout-order paragraph ever named them. The eight, confirmed on 2026-12-02 by probing each default branch for .github/workflows/mermaid-lint.yml and reading its blob sha: clingwrap, cloudgood, hunkydory, instar, kerbside, occystrap, ryll and shakenfist, at four distinct versions (662b844 in clingwrap, hunkydory, instar, kerbside and occystrap; cd4a6fc cloudgood; 29408a6 ryll; 2711871 shakenfist). All eight still run ./tools/mermaid-lint.sh and name no uses: shakenfist/actions/mermaid-lint, so all eight fail mermaid-lint-ci under the criterion 6c landed. The driver is the weekly audit, not a sweep from here, which is the mechanism this plan records nowhere else: consistency-audit.yml runs Sunday 18:00 UTC (.github/workflows/consistency-audit.yml:4-9), its last run before 6c was 2026-11-29 23:27 UTC, so the first run to see the new criterion is 2026-12-06. It files a Consistency: Mermaid diagrams linted in CI issue (the criterion's issue_title, scripts/audit/checks/mermaid_lint.py:175) in each of the eight; none existed on 2026-12-02, which is expected rather than a regression. Wait for those issues, then work them with the consistency-fix skill, one pull request per repository. Two things 6c learned on a real runner and this step will hit eight more times. A caller cannot resolve shakenfist/actions/mermaid-lint@main until the callee is on that repository's default branch -- it is, since 8d7cea6 -- and GitHub does not re-trigger an open pull request when another repository's default branch moves, so a lane that went red before the callee merged stays red until the job is re-run by hand. And each repository keeps its own legitimate adaptation: shakenfist's two '!docs/components/**' lines are a path filter, so they stay in the caller's on: or in tools/mermaid-lint-exclude, which the script already reads. Carry no repository's tools/mermaid-lint.sh deletion into a pull request that also edits REVIEWS.md or .vscode/ weAudit files. This step touches no file in this repository and no template, so it is independent of 6e and may run alongside it. Record each landing in this section. Commit subject: one per repository, in that repository: Make mermaid lint a shared workflow.

Execution notes.

  • 2026-11-29 (AEDT). Back brief gate 1 answered yes: this phase runs ahead of phases 4 and 5 and the Execution table keeps its numbering. Gate 2, 6a's classification table, is open -- 6b does not start until it is approved.
  • Step 6a ran as briefed, at opus and high effort, in this worktree with no isolation, and changed only this file. pre-commit run --all-files passed. The run was scoped to 6a alone by instruction; 6b to 6e are not started.
  • 6a disproved four of the plan's own premises, and they are corrected at source rather than only noted: survey item 2's counts for export-repo-config.yml and issue-link-check.yml, decision 3's rollout figures that followed from them, and survey item 10 for both release-automation-rust/ and issue-fix/. The master plan was wrong in this phase's favour twice and against it twice, which is the expected shape of a survey that was taken honestly.
  • The management session verified a sample of 6a's findings rather than all of them, and the distinction matters for one claim. Checked and reproduced exactly: that actions' two workflow_call files are callees not copies; that release_rust_issues is reached from ReleaseProcess; that github-security tests only for the existence of codeql-analysis.yml (scripts/audit/checks/github_config.py:243-244); that review-tracking-templates byte-compares (scripts/audit/checks/review.py:384-406); that teneral's prune-reviews.yml differs by exactly the stale pin; and that divergulent's pr-retest.yml carries a shakenfist-bot login guard the template lacks. Not independently verified: the universal claim that no copy in the fleet differs from its template by legitimate adaptation alone. It is consistent with every instance checked, and 6e should treat it as 6a's finding rather than as established.
  • Two copies lead their templates, so this phase's rollout is not only outward. divergulent's pr-retest.yml and shakenfist's pr-fix-tests.yml each carry a bot-comment guard the template has not taken back. 6e takes them back before converting either file; for test-drift-fix/, which stays a template, that is a precondition of the criterion 6a assigned it.
  • 2026-11-30, review round 2 on pull request #480. Five fix items, one document item and five consider items, all taken; the one none item needed nothing. Two were defects of substance. The audit-JSON test still could not pass after round 1 fixed the timestamp, because review-coverage builds its message and missing list from the live file inventory (review.py:256-269) and .vscode/review-scope.toml has *.py in scope, so 6b's own two new modules and its three edits move that check's text; the test is now the id and status sequence, 72 lines on this branch, plus a stated prediction for the review-coverage delta, plus FROZEN_CHECK_ORDER in test_metadata.py so that CI holds the ordering afterwards rather than a command output pasted into one commit message. Round 1's evidence -- three identical runs -- showed run-to-run stability on an unchanged tree, which is not the property being claimed, and the review was right to say so. And "edit the ruleset in the same step" was a deadlock: while Analyze is required, the conversion pull request's own merge-group run reports the new name and never Analyze, so it cannot merge, and the new context cannot be required before the converted workflow has reported on the default branch. Decision 4 now sets out three ruleset states, and says why swapping the two contexts in one edit is worse: it unwedges the conversion and wedges every other open pull request in hunkydory. Also taken: the outside_settings() shape needs paired markers test-drift-fix/ does not have, so 6e's marker work is now a prerequisite in three ordered pull requests rather than a detail, and the template has four customisation points, not three; the new test module would have landed about 125 lines under the 1,500-line threshold with 6c then growing it, so 6b splits it in two and the definition of done forbids a new baseline entry as well as a raised one; bypass-actor-identity.md belongs to PLAN-bot-bypass-identity.md, not to this plan's phase 2; images' dropped Autobuild step is the build-mode axis already counted rather than a sixth; the prune-reviews row overstated what $GITHUB_ACTION_PATH establishes against the threat the template's comment actually names, so 6e now confirms the ephemeral pool first; docs/templates.md is linked from README.md's Templates section as well; and stderr goes to a file rather than /dev/null, because the traceback is what would explain a difference. The index row's "20 of 25" was round 1's own incomplete sweep -- the body was corrected and the index was not -- and now states the load-bearing fact instead. One claim in the review did not survive checking: it named divergulent as a test-drift-fix adopter. The three adopters, read from each default branch on 2026-11-30, are instar, occystrap and shakenfist; divergulent carries pr-retest.yml. 6e's brief names the right three.
  • 2026-11-30, review round 3 on pull request #480, and the last one. Four fix items and five consider items, all taken. Two of the four were regressions from round 2's own fixes, which is the signal to stop: splitting the test module made 6b's review-coverage prediction stale (three new .py files and four edited, not two and three, so 259 to 262, 253 to 249 and 6 to 13, test_metadata.py going stale because FROZEN_CHECK_ORDER edits it), and the four-marker instruction ran into outside_settings() returning None unless there is exactly one pair (release_rust.py:836-847), so 6e now decides between generalising that helper and writing a multi-region one beside it. The other two were older and worse. 6d's caller-stub test could not pass at 6d's landing, because 6d runs before the rollout and only three templates are stubs then; it is now driven by an explicit converted-template list that each 6e landing appends to, which is also what the definition of done measures. And 6c's brief treated 1,200 lines of tests as a path substitution: MermaidLintDeploymentTest holds four more assertions that compare the template's script, workflow and paths: lists, and test_mermaid_lint_script.py executes the script, so 6c says what becomes of each as part of the by-hand decision it already owed. Also taken: survey item 6 had the endpoint's limitation backwards -- effective rules omit a disabled ruleset but still report an evaluate-mode one, which is why moving-ref-source-protection reads enforcement back and why 6e now does too; the definition of done guards docs-line-references as well as plan-phase-references, because this plan's prose is full of the citations a sub-agent would carry into docs/templates.md; 6b re-wraps the registry import line, which goes from 110 to 124 characters against a 120 limit; and every citation of the same code now uses one span. The index row is trimmed: three rounds flagged it, and the earlier answer that it was comparable with its neighbours stopped being true once phase 6's passage went in -- it measured 3,239 characters against a next-longest of 1,843. Its other phases' passages are left alone as not this phase's to rewrite.
  • Found while verifying, and outside this phase: review-tracking-templates fails on teneral with no issue ever filed there, and scripts/audit-check.py's stdout is valid JSON after all. Both are recorded in Future work. The first was wrong, and the Future work entry now says so: the issue existed.
  • 2026-11-30, review round 1 on pull request #480. Five findings taken, all in this file. The audit-JSON test now compares the document with the run timestamp popped, in all four places that state it, and the comparison was run three times on this branch to show it is stable rather than vacuous. Survey item 6's table was re-taken through the effective-rules endpoint rather than /rulesets: the three workflow-level rows and the six empty ones reproduced exactly, every required_status_checks rule in the fleet is ruleset_source_type: Repository, so no organisation ruleset hides a required context and the one-repository conclusion stands; decision 4 and 6e now name that endpoint. The aggregate count was twenty against a matrix of 25 and is fifteen. The historical export-repo-config.yml figure was edited to a number that was neither reading and is restored. And the renumbering left stale step letters in eight places across five passages, not the two passages the review found: survey item 8 (twice), survey item 9 (twice), survey item 12, decision 8 (twice) and the sentence about the consistency-fix skill. git grep -l mermaid-lint.sh is 23 files, not 24, with a fifth judgment hit the survey missed (scripts/tests/test_ci_prune_reviews.py:12). Also closed by the same pass: the Enforcement table assigned 6e a test-drift-fix criterion that 6e's brief, scoped to the rollout order, did not cover.

  • 2026-11-30 (AEDT). Back brief gate 2 answered yes: 6a's classification table stands as written, so the five directories it moves into actions are settled and 6b to 6e are released. Step 6b then ran as briefed, at sonnet and medium effort, in worktree development-wt-wrt-p6b on branch workflow-ref-trust-phase-06-mermaid-lint-module, cut from origin/main at 09d9641 rather than from the branch this phase was planned on.

  • That base is why 6b's review-coverage prediction could not be checked as absolute numbers: main has since taken a reviews merge (#481, which rewrote REVIEWS.md and the weAudit marks) and two new test files. The prediction was restated to the sub-agent as a delta and held for the step's own files: in-scope +3, from 259 to 262, with the three new modules never reviewed and docs_content.py, test_docs_content.py, registry.py and test_metadata.py stale. Measured on the commit, though, the delta is in-scope +3, reviewed -5 and needing review +8, not the predicted -4 and +7: the management session's own correction to templates/mermaid-lint/README.md makes a fifth file stale. That file is in review scope as well, which the prediction's framing around *.py hid -- .vscode/review-scope.toml takes markdown too, so any file a step edits counts, not only its modules. Staleness is judged against HEAD, so an uncommitted run shows only the three new files and the rest appears on the commit. The lesson for 6c and 6e: a prediction stated as absolute counts expires when main moves, and the delta is the part worth writing down.
  • The id and status sequence is identical across 6b, at 72 lines, and the management session measured it rather than reading the step's measurement: a detached worktree at origin/main for the before, this tree for the after, both with empty stderr. The two full documents differ in timestamp and in review-coverage, and in nothing else. plan-phase-references still reports exactly its two pre-existing findings, so this step added none.
  • tools/source-size-ratchet.py --update dropped the scripts/tests/test_docs_content.py entry as decision 2 expected, that file falling from 2,128 lines to 772, and it also lowered scripts/tests/test_registry.py from 1,581 to 1,569. This step does not touch that file: its entry was already stale and the tool tightens every entry it is run over, which is a lowered entry rather than the raised one the definition of done forbids. No entry appeared for a file this step created. The resulting counts are docs_content.py 445, mermaid_lint.py 120, test_docs_content.py 772, test_mermaid_lint.py 319 and test_mermaid_lint_script.py 1,076, so 6c has room in the module it grows. The suite went from 2,939 tests to 2,940, the extra one being the order test.
  • Two corrections the management session made to the step's output, both of the same kind -- a file brought across with scaffolding that no longer fits it. The new test module had carried audit-ok: plan-reference-file over from test_docs_content.py, which exempts a whole file from plan-reference auditing for the sake of one fixture path; the marker's own documentation prefers the line form, so it is now a line marker on the fixture line, which is the only place plan-source-references looks for one. And templates/mermaid-lint/README.md still named scripts/tests/test_docs_content.py as the module asserting that the deployed script and workflow are byte-identical to the template, which this step made false; it names test_mermaid_lint.py. The step's own grep did not reach it, and 6c inherits the lesson, since it rewrites that README.
  • One premise in 6b's brief was wrong and is corrected at source: scripts/audit/checks/action_pinning.py, offered as the docstring to follow, does not exist, because phase 4 creates it and phase 4 is held. The docstring follows plans.py instead. Kept from the sub-agent's own judgement: FROZEN_CHECK_ORDER's docstring cites the registry's module docstring by name rather than by line number, which is the citation that will not rot.
  • The commit subject is Split the mermaid lint criterion into a module., not the into its own module. the step table prescribes: the prescribed subject is 53 characters against the 50 the commit hook enforces.
  • 2026-11-30 (AEDT). Step 6c. Its three open decisions went to Mikal before the step ran, each being cheap to settle then and expensive to redo: by-hand linting becomes a thin discovery wrapper rather than a deleted command or a second copy of the checker; the scope is shakenfist/actions and this repository only, leaving the eight other adopters to 6e's shape; and the criterion requires the caller immediately rather than tolerating both shapes while the rollout runs, which is what makes the audit's issues drive that rollout. Permission to open both pull requests came in the same answer.
  • The step ran at opus and high effort across two worktrees: development-wt-wrt-p6c on branch workflow-ref-trust-phase-06-mermaid-lint-action, cut from origin/main at e01b5fa, and actions-wt-mermaid-action on mermaid-lint-composite-action, cut from that repository's origin/main at 2dfb670. The callee lands first: until the action is on actions' main the lane here cannot resolve it, so the mermaid-lint job on this repository's pull request is red until then, which costs nothing because that job is deliberately not a required check.
  • The six decisions 6c owed are recorded where a reader would look for them rather than only here. The wrapper exits 1 naming the three paths it searched. The 1,076-line module that executes the checker went to shakenfist/actions as tests/test_mermaid_lint.py, run by that repository's unit-test hook -- whose files: pattern matched only Python, so editing a shell script there would not have run the tests that execute it, and it now carries a tools/ clause as this repository's equivalent hook does. The image digest lives in the checker alone, and the diagram-conversion skill names the command instead of quoting a digest, with a test that fails if one reappears. The criterion requires a step whose uses: is the action at @main, read as steps rather than as text, and distinguishes no caller from a caller pinned off @main from a workflow still running a local copy. The path filter drops tools/mermaid-lint.sh and says why. .pre-commit-config.yaml's tools/ clause stays true, for the review-tracking and ratchet suites rather than the mermaid one, and half its comment is rewritten.
  • Measured by the management session rather than read from the step's report. The id and status sequence is identical across the change at 72 lines, both runs with empty stderr, with no status moving anywhere; mermaid-lint-ci passes here before and after. The suite went from 2,979 tests to 2,919, 64 of them now in shakenfist/actions (869 to 933 there) and 4 new ones here. Eight repositories newly fail mermaid-lint-ci -- clingwrap, cloudgood, hunkydory, instar, kerbside, occystrap, ryll and shakenfist -- from tools/audit-snapshot.sh over fresh clones of all 25 matrix repositories: nine differences, every one of them this criterion, nothing else moving in the fleet, the ninth being the clone of this repository that the converted tree fixes. An independent count through the contents API confirms nine repositories carry mermaid-lint.yml, which is what the 2026-11-29 survey found too. In actions nothing moves at all against its own merge base: mermaid-lint-ci stays not_applicable there, that repository carrying no diagram, and review-coverage was already failing.
  • review-coverage here goes from 224 of 264 reviewed with 40 needing review to 213 of 263 with 50. The in-scope drop is the deleted test module, which was itself unreviewed; the eleven lost marks are files the step edited. Measured on the commit rather than before it: an uncommitted run showed 39 needing review, because staleness is judged against HEAD. That is 6b's lesson holding a second time, and it is why this delta belongs in the record rather than in the step's commit message.
  • Two premises in the step's brief were wrong. The brief said to model the wrapper on tools/review-tracking.sh exactly, including its cd to the repository root; the checker resolves a named file against the directory it was invoked from on purpose, so a cd would break the documented per-file form, and the step was right to leave it out and say so in the file. The other was survey item 8's path-versus-prose count, corrected above.
  • One assertion was lost rather than moved, and it is worth naming. The agreement between the checker's stateful scan and the narrow line match the criterion uses was measured over files that contain diagrams; actions carries none, so in its new home that agreement is asserted over the negative, with the vacuity guard moved onto the tracked-markdown listing so that an empty listing cannot pass silently. The first diagram committed in actions restores the stronger half by itself.
  • Three corrections the management session made to the step's output: a comment claiming the duplicated fence pattern was guarded by the test beside it, which it is not, and two paragraphs left badly wrapped where new text met old, in AGENTS.md and ARCHITECTURE.md. Verified by running rather than by reading: the wrapper was exercised three ways -- a per-file lint from a subdirectory, which rendered and reported ok while pulling the digest the checker pins; a typo, which exits 1 rather than passing vacuously; and with no clone to find, which exits 1 listing what it searched for.
  • 2026-12-02. Step 6d, on branch workflow-ref-trust-phase-06-template-convention, run in the same session as the re-read that added survey item 15 and step 6f. The test is ConvertedTemplatesTest in a new scripts/tests/test_templates.py, not an addition to ConvergedTemplatesTest: scripts/tests/test_registry.py is at its tools/source-size-baseline entry to the line, so there was no room to grow it, and decision 2's answer to that is to split rather than raise. The list is CONVERTED_TEMPLATES, three entries, each naming the one shakenfist/actions reference its template exists to call rather than only the template path. That is the brief's amended shape and the re-read is why: templates/codeql/codeql-analysis.yml has no run: step while being a full copy, so "no run: steps" discriminates nothing on its own, and templates/test-drift-fix/pr-fix-tests.yml has no run: step and calls shakenfist/actions/pr-bot-trigger@main while delegating its real work to a local workflow, so it passes the predicate as first written. Five tests: the listed templates exist, each calls its named callee, none has a run: step, none delegates to ./, and -- the one that makes the list load-bearing -- test_the_list_names_every_caller_stub fails on a template that became a stub without being listed. Its generic detector is deliberately narrower than the list entries, since it has to separate a stub from a copy without being told which is which: no run:, no local delegation, and at least one shakenfist/actions reference, which excludes both trap files above. Six mutations were run and all six were killed by the intended test: a list entry naming a missing file, a run: step added to a stub, a converted template dropped from the list, a callee re-pointed off @main, a stub given a local uses: ./, and the bogus-entry case again after _listed_templates() was added so that one stale entry fails the existence test rather than erroring every test in the class. docs/templates.md carries the convention and the two mechanisms that hold it -- the test here, the criterion in the fleet -- and states the composite action's wider exposure plainly rather than leaving it to the plan. Audit after: the same three failures as main, plan-phase-references still at exactly its two pre-existing findings, so the definition-of-done item on that criterion holds; review-coverage moves 15 to 17 for the two new in-scope files, which a prune run clears.

Risks and mitigations.

  • 6a classifies a template as shared whose copies differ for a reason it could not see. The rollout then flattens a deliberate per-repository choice, and the repository's CI quietly does something other than what it did. The mitigation is the with: input test stated as a requirement rather than a preference (decision 5), and templates/issue-link-check/ as the worked example of a difference that survived as an input. The management session reads 6a's cited lines for each "drift" verdict on a template with more than two versions, rather than the verdict.
  • The codeql-analysis.yml landing wedges hunkydory's merge queue. Its ruleset requires Analyze, which the caller renames. 6e edits that ruleset in the three states decision 4 sets out -- remove, merge, add -- and lists hunkydory's effective rules first rather than its rulesets. The single-edit model the earlier drafting assumed deadlocks: the conversion pull request cannot merge while the old context is required, so "one ruleset edit" is not the remedy and never was. If the edit is forgotten the symptom is loud -- nothing merges in hunkydory -- and the remedy is one ruleset edit, so this is a disruption rather than a loss.
  • 6b reorders CHECKS and nobody notices. A reordered list changes a published artifact's bytes, and the next day's results diff against every repository. The guard is the id and status sequence, compared before and after and shown in the commit message, plus FROZEN_CHECK_ORDER in test_metadata.py so that CI holds the sequence afterwards. What is not the guard is a whole-document byte comparison: the run timestamp (scripts/audit/registry.py:243) and review-coverage's inventory-derived message (review.py:256-269, with *.py in .vscode/review-scope.toml) both move for reasons that have nothing to do with the refactor, so requiring the document to match would buy a false alarm the sub-agent has to argue its way out of, or a test quietly redefined to pass. The management session re-runs the sequence comparison and reads the review-coverage delta against 6b's prediction.
  • tools/source-size-ratchet.py --update lowers an entry this phase should have split instead. The tool never raises an entry, so it cannot hide growth, but it can quietly bless a file that stayed large. 6b states the resulting line count, and decision 2's expectation is that the entry disappears; a lowered entry instead of a dropped one is a finding for the management session, not a pass.
  • The pilot's answer to "how does a developer run the lint by hand" is written and then not followed. AGENTS.md:86 is loaded into every session in this repository, so an instruction there that names a deleted script is worse than no instruction. 6c changes AGENTS.md in the same pull request as the deletion, and the definition of done names that file.
  • This phase lands while phases 4 and 5 are still held, and a later reader reads the Execution table as the execution order. Decision 1 accepts that. The mitigation is the note in the table itself, beside the one the 2026-11-21 renumbering already needed.

Back brief gate. Two gates, both cheap now and expensive later. Confirm decision 1 -- running this phase before 4 and 5 without renumbering -- before 6a runs. And confirm 6a's classification table, in particular every template it moves out of templates/, before 6b starts, because 6c and 6e are the rollout of whatever that table says and a reclassification afterwards is a second fleet-wide pass.

Definition of done.

  • pre-commit run --all-files passes, and tools/source-size-baseline has no entry raised by this phase and no new entry for a file this phase created. Entries lowered or dropped by --update are expected (decision 2). The second half is what stops 6b's split being undone by 6c growing the new module past 1,500 lines and baselining it, which would meet the first half and defeat the purpose.
  • The id and status sequence of the audit results document for this repository is identical across 6b, demonstrated in that step's commit message with the command it was measured by, and the only check whose text differs is review-coverage, by the delta 6b's brief predicts. FROZEN_CHECK_ORDER in scripts/tests/test_metadata.py pins that sequence from 6b onwards, so the next module rename is caught by CI rather than by a reviewer.
  • Every template directory under templates/ except shared-blocks/ and renovate/ appears in 6a's classification table with one of the three outcomes and a stated reason, including source-size-ratchet/, which fits none of them.
  • Every template 6a classified is either a caller stub calling shakenfist/actions at @main with no run: steps of its own, or says in its README how drift in its copies is caught. A template still queued for 6e counts as neither, so this item is met only when the rollout has finished or the remainder is named in a follow-up issue cited here.
  • No repository in the audit matrix still runs its own copy of a workflow this phase converted. Measured by probing each default branch for the file and reading its blob sha, which is how the eight mermaid-lint.yml carriers in 6f were counted, and falsified by any carrier that is not a caller stub. On 2026-12-02 that count was eight; the item is met when it is zero, or when the remainder is named in a follow-up issue cited here.
  • A test under scripts/tests/ fails if a template on its converted list stops being a caller stub, or if the list names a template that is not there. The list holds mermaid-lint and the two pre-existing callers when 6d lands, and every 6e landing appends to it in the same pull request, so the list and the rollout cannot drift apart.
  • docs/templates.md exists, is linked from docs/consistency-audits.md's "Related" section, from AGENTS.md and from README.md's "Templates" section, and contains no phase <number>.
  • No file under docs/ or README.md that this phase writes or edits adds a plan-phase-references finding: the count stays at the two pre-existing ones (survey item 12) or lower.
  • Nor a docs-line-references finding. That criterion has the same shape -- it exempts plans/ and flags file.py:123 in documentation content files (docs_content.py:446-505) -- and this plan's own prose is dense with exactly those citations, which is precisely what a sub-agent writing docs/templates.md or editing docs/audits/mermaid-lint-ci.md from it would carry across. Name the symbol, or carry an audit-ok: docs-line-references comment with a reason.
  • AGENTS.md names a command for linting a diagram by hand that exists in the tree at the commit that lands 6c.
  • For each landing, the commit message states how many repositories newly fail which criterion, measured with tools/audit-snapshot.sh before and after, and the first scheduled audit after it reports that number.
  • Each repository whose ruleset named a workflow-level context that this phase renamed went through decision 4's three ruleset states in the step that converted it, and a later pull request there is shown merging with the new context required and green. On this reading that is hunkydory alone. The step records how long the gate was absent.

Phase 7: push audit

Planning effort: medium. The runbook and the ranges are fixed; the work is running it.

Run PUSH-AUDIT.md once per landing recorded in the Merged cells above, with AUDIT_RANGE set as its "How to use this runbook" section says: <sha>^1..<sha> for a merge commit, <first>^..<last> for a direct landing. Do not use origin/main...: once the phases have merged that range is empty and reads as a clean audit. Phase 1's landings are in other repositories and were reviewed in their own pull requests, so this phase cites those rather than re-running them.

Plan status vocabulary (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-status-vocabulary.md):

A status cell -- in the master plan's own Execution phase table, and in the row docs/plans/index.md carries for the plan -- holds exactly one of these terms and nothing else:

  • Proposed -- written down as a concept, not yet scheduled.
  • Not started -- scheduled, but no work has begun.
  • In progress -- work has begun and has not finished.
  • Blocked -- cannot proceed until something outside the plan changes. Say what, in the plan.
  • Complete -- the work is done.
  • Abandoned -- deliberately dropped without being done.
  • Superseded -- replaced by another plan, which the plan names.

The term is the whole cell. No dates, no phase arithmetic, no parenthetical qualifiers, no summary of what happened: a status is read to decide whether a plan still wants attention, and prose in that column has repeatedly grown until it could no longer be read either by a person scanning the table or by tooling. Detail belongs in the plan file, and a one-line summary belongs in the index's own Intent column.

Matching is case-insensitive, so In Progress is accepted, but the spelling above is the one to write.

In this repository. The same term is written twice: once in this plan's own phase table, and once in the row the plan carries in docs/plans/index.md. The index row is the whole-plan status, so it only reaches Complete once every phase has been completed, abandoned or superseded. The plan-index criterion reads that table, and this repository is inside its own audit matrix, so a status that drifts out of the vocabulary fails our own tooling before it fails anybody else's.

Push audit phase (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-push-audit-phase.md):

  • Every master plan ends with a phase that runs the repository's PUSH-AUDIT.md over the whole plan's work. It is the last row of the Execution table and it is not optional. The rule binds every plan that carries the phase, which is decidable from the plan file alone: a plan that is already Complete, Abandoned or Superseded and does not carry the phase is not reopened to acquire one, and a plan that has the phase runs it even if it reaches Complete before the phase does.
  • That phase audits the accumulated diff of every phase in the plan against the default branch, not the diff of the last phase alone. Auditing one phase at a time would miss what the phases did to each other -- the duplicated helper that only exists once phases three and six have both landed, the doc page that phase two made wrong and phase five never revisited.
  • Once the plan's phases have merged, a diff against the default branch is empty and would read as a clean audit. The range is not reliably derivable after the fact either: unrelated work lands on the default branch between phases, so anything anchored on "since the plan file appeared" is far too wide. It has to be recorded. As each phase lands, what put it on the default branch goes into the plan: the merge commit of its pull request, whose diff against its first parent is the whole of what landed, or -- where the phase landed directly -- every commit of the phase, or its first..last range. A single commit is only ever enough when it is a merge commit. first..last is the label, not the range to diff: A..B excludes A, so a direct landing is read as <first>^..<last>. Drop the caret and the first commit of the phase falls out of the diff silently, which is where a version bump or a column addition tends to live.
  • Where the Execution phases are a table, that record is a Merged column, added last so that a row which omits it still reaches Status; where they are prose sections it is a Merged: line in the phase's own section. The Status column keeps its single vocabulary term and nothing else (see plan-status-vocabulary). A phase that landed in another repository records <repo> <sha> (#pr) and is audited against that repository's default branch, as part of the pull request that lands it; the plan's own push-audit phase cites that audit rather than re-running it.
  • Phases that landed before the plan started recording them are reconstructed rather than left blank. Recover what you can from gh pr list --state merged and git rev-list --first-parent, and say in the plan that the range was reconstructed. Do not trust a path-filtered git log on its own: it lists the commits that touched a path without saying which arrived directly and which arrived inside a pull request, and recording a commit that came in under a merge audits one commit of that pull request rather than the pull request. A reconstructed record may be a summary table in the audit phase's own section rather than a column or a line in the Execution table, which keeps retrospective archaeology out of a table that tracks live status. Where a phase accreted over months of unrelated commits and no range is recoverable, say that instead and name the paths the audit read -- an audit that says what it could not scope is a result; one that silently audits nothing is not.
  • Findings land as their own pull request against the default branch, and the plan is not complete until they are resolved or explicitly declined in writing. A finding that is declined says why, in the plan, where the next reader will find it.
  • Where the audit finds nothing, record that in the plan in one sentence. It is a real result, and a run of them is the evidence for making the phase conditional rather than mandatory.
  • A repository with no PUSH-AUDIT.md still carries the phase, and the phase says that the runbook does not exist yet and what was done instead. Silently omitting it is what let the audit go untriggered for as long as it did. What is done instead is at least the checklist below, applied to the recorded ranges: it is a floor, not a substitute for a runbook, and a plan adds the questions its own repository's blast radius raises. Each item gets a verdict, or a sentence saying why it does not apply. Do not borrow another repository's runbook instead: a runbook is written for one repository's blast radius.
  • Every recorded landing takes one of the forms above: a merge commit with two parents, whose diff is read against its first parent; every commit of a direct landing, or its first..last range read as <first>^..<last>; a landing in another repository, whose own audit is cited; or a statement that no range is recoverable, naming the paths the audit read.
  • Anything the diff added that runs unattended -- cron, a timer, a scheduled workflow, a self-update -- reports its own failure somewhere a human sees, or is named as not doing so.
  • No secret or token entered any repository, and no private hostname or IP address entered a repository more public than the one it came from.
  • Anything the diff removed or renamed has no consumer left, checked by grep across every repository that could consume it rather than by assumption, with the greps stated.
  • Where the repository publishes something -- an image, a release, a package -- a broken change fails closed: one that publishes nothing is recoverable, one that publishes something wrong is not.

In this repository. PUSH-AUDIT.md exists at the repository root and is referenced from AGENTS.md, so the final phase runs it rather than explaining its absence. Its diff commands use ${AUDIT_RANGE:-origin/main...HEAD}, so run git fetch origin first: a stale origin/main widens the audit to unrelated history. Phase 7 sets AUDIT_RANGE per landing, because once a phase has merged the default range is empty and reads as a clean audit.

Phase landing (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-phase-landing.md):

A plan's status and a repository's review state both live in files that every branch would otherwise rewrite. Left alone, that turns each of them into a merge-conflict hot spot, and it spends a pull request and a full CI run on a change that is entirely prose. Three rules keep them out of the way.

  • A phase is closed out in the first commit of the next phase, not in a pull request of its own. By the time the next phase branches, the previous one has merged, so its merge commit is known and its Merged cell can record the thing the push-audit phase actually needs. This is the only ordering that works: a phase cannot record its own merge commit, and a separate close-out pull request buys that record at the price of a round trip. The close-out sets the finished phase's Status and Merged cells and the plan's row in docs/plans/index.md, and it is committed before the next phase's own work, so that the branch never claims the plan is further along than the default branch is.

  • The last phase closes itself out. The push-audit phase is the last row of every plan, so no next phase will carry its close-out. Where the audit raises findings, the plan is not complete until they are resolved or declined. The test for who carries the cell is whether a pull request lands after the audit phase's own: that one is the carrier, and it can record the audit phase's merge commit, which by then is known.

Two orderings leave no carrier, and neither is worth a follow-up pull request opened for the sake of one cell. Where the audit finds nothing, nothing follows the audit phase. Where the audit raised findings but their pull requests landed while the audit phase was still in review, nothing follows it either -- and that is the common ordering rather than the exception, because an audit phase that runs more than one review round is most of them, and a finding is usually fixed as soon as it is found. In both the phase sets its own Status, and the plan's index row, to Complete in its own pull request and records no Merged cell; where the findings landed first it names their pull requests in the row instead, so what the audit produced is still reachable from the table. The push-audit row is the only row permitted to omit the cell. The column exists so that the push-audit phase can reconstruct what to audit; the audit phase is last, so nothing ever reads its own row.

  • REVIEWS.md is not pruned or regenerated in a pull request that changes code or documentation. Editing a reviewed file stales its mark, and adding or removing an in-scope file moves the header count, but neither is the landing pull request's business. prune regenerates the file whether or not it dropped anything, so the prune-reviews workflow heals both on the next push to the default branch. Pruning from a branch is also wrong more often than it is right, though not for the reason it first appears: prune compares each stamp against HEAD, which on a branch is the branch tip, so it drops the marks for the files the pull request itself touched while keeping marks the default branch has already pruned. Committing that state merges a review file computed from a stale tree, and can resurrect marks prune-reviews has already removed. Accumulated staleness is reported by the review-coverage audit, which recomputes coverage against HEAD and raises an issue once the backlog is worth a review session.

A review session is the exception, and it is not optional tidiness: stamp regenerates REVIEWS.md as well as writing the marks, and the rows, the sidecars and the marks are committed together (see docs/code-review-tracking.md). Where a repository requires a pull request to reach its default branch, that is how a review session lands, so "not in a pull request" is about the kind of change, not the mechanism.

These rules assume phases land one after another. Where two phase branches are open at once, each closes out only the phase it directly follows.

In this repository. The plan index is docs/plans/index.md. review-tracking-tests deliberately does not assert the REVIEWS.md header count, so a phase that adds or removes an in-scope file needs no regeneration commit; prune-reviews corrects the count on the next push to main.

Agent guidance

Execution model

Sub-agent execution model (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/subagent-execution-model.md):

All implementation work is done by sub-agents, never in the management session. The management session is reserved for planning, review, and decision-making. This keeps the management context lean and avoids drowning it in implementation diffs.

The workflow is:

  1. Plan at high effort in the management session.
  2. Spawn a sub-agent for each implementation step with the brief from the plan, at the recommended effort level and model.
  3. Review the sub-agent's output in the management session. Check the actual files -- the sub-agent's summary describes what it intended, not necessarily what it did.
  4. Fix or retry if the output is wrong. Diagnose whether the brief was insufficient (improve it) or the model was too light (upgrade it), then re-run.
  5. Commit once the management session is satisfied.

This applies to all steps, including high-effort ones. If a sub-agent cannot succeed even with a detailed brief and the right model, that is a signal the brief needs improving, not that the management session should do the implementation itself.

Use isolation: "worktree" for sub-agents when the change is risky or experimental; the worktree is discarded if the output is unsatisfactory. For safe, well-understood changes, sub-agents can work directly in the main tree.

In this plan. Step 2a is the exception: it changes GitHub settings on another repository, so the management session does it with the operator rather than delegating it.

Planning effort

Planning effort (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-planning-effort.md):

The master plan itself is always created at high effort -- it requires broad codebase understanding, cross-referencing several source files, and judgment calls about scope and sequencing.

Each phase plan states the recommended effort level for planning that phase. Phases that turn on design decisions, cross-component coordination, protocol changes, or subtle correctness questions should be planned at high effort. Phases that are mechanical, or that follow a pattern already established elsewhere in the codebase, can be planned at medium effort.

In this repository. High effort is anything that changes what a criterion means, anything that touches the scheduler in audit-check.py, and anything that reaches audit-manage-issues.py -- those decide what the fleet is held to and what lands in other people's issue trackers. Medium effort covers adding a criterion that follows the shape of an existing one, a documentation sweep, or a template change with a worked example already in the tree.

Step-level guidance

Sub-agent step guidance (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/subagent-step-guidance.md):

Each phase plan includes a table like this:

Step Effort Model Isolation Brief for sub-agent
1a medium sonnet none One-sentence summary of what to do and which files to touch
1b high opus worktree Why this needs high effort: requires understanding X to do Y

Effort levels, from cheapest to most thorough:

  • low -- Purely mechanical changes: rename, reformat, add a log line, regenerate generated code. The brief is a complete instruction.
  • medium -- The plan provides enough context to follow a clear brief. The sub-agent may read a few files, but the approach is already decided.
  • high -- Requires reading several files, making judgment calls, or understanding non-obvious invariants. The sub-agent needs to think about edge cases.
  • xhigh -- The setting for hard coding and agentic steps: long-horizon changes, or steps where the sub-agent must both research and implement.
  • max -- Correctness matters more than cost. Expect diminishing returns and occasional overthinking; reserve it for steps where a wrong answer would be expensive to detect.

Brief for sub-agent: this is the key field. Write it as if briefing a colleague who has never seen the codebase. Include what to change, which files to touch, what patterns to follow, and any non-obvious constraints.

A good brief front-loads the research the planner already did, so the implementing agent does not repeat it. Instead of "add storage functions for the new object", name the functions to add, the file they belong in, the existing equivalent to mirror (with line numbers), and any registration the change also needs.

The better the brief, the lower the effort level needed and the lighter the model that can succeed.

In this repository. A worked brief: instead of "add a check that plans are indexed", write "add a PlanIndex class to scripts/audit/checks/plans.py declaring the id plan-index, its spec and its issue_title as class attributes and implementing run(repo), register the instance in CHECKS in scripts/audit/registry.py beside the other plan checks, write docs/audits/plan-index.md following the structure in docs/audits/README.md and linking to compliance.md#plan-index, add the file to docs/audits/README.md, add its lines to FROZEN_METADATA and FROZEN_ISSUE_TITLES in scripts/tests/test_metadata.py, and add tests to scripts/tests/test_plans.py covering pass, fail and not-applicable." A brief that names four of the criterion's five files is the characteristic defect here, and the frozen tables are the one most often left out.

A check that does not apply reports not_applicable with a reason rather than being omitted, because an omitted check renders as unknown.

Model choice

Sub-agent model roster (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/subagent-model-roster.md):

The planner recommends which model is best suited to each step. This is a judgment call, not a rigid rule -- the right model depends on what the step requires, not on whether it is "planning" or "implementation". The models available to sub-agents are:

  • fable -- The most capable model available, for the hardest reasoning and the longest-horizon work: multi-step changes a single sub-agent must carry end to end, or steps whose correctness depends on holding a whole subsystem in mind at once. It costs materially more than opus, so reserve it for steps that have already defeated opus or are expected to.
  • opus -- The default for steps needing deep reasoning, architectural understanding, subtle correctness judgment (locking, state machines, migrations), or intricate implementation that would be costly to debug if it were wrong.
  • sonnet -- A good default for well-briefed implementation work. Faster and cheaper than opus, and effective when the plan front-loads the research and the brief leaves no broad judgment calls to make.
  • haiku -- Suitable for purely mechanical tasks: search-and-replace, regenerating generated code, adding log lines, running commands. The brief must be a near-complete instruction.

Model choice interacts with effort level and brief quality. A detailed brief compensates for a lighter model -- sonnet at medium effort with a thorough brief often matches opus at medium effort with a vague brief. The planner's job is to write briefs good enough that the recommended model can succeed.

The model also determines the context window: fable, opus and sonnet have 1M tokens, haiku has 200K. A step that must hold many files in context at once may need one of the larger-context models for that reason alone, even when the reasoning itself is straightforward.

When in doubt, skew to the more capable model. Saving money only matters if the outcome is still acceptable. A failed or low-quality implementation wastes more time -- and therefore more money -- than the heavier model would have cost. Recommend a lighter model only when you are confident the brief is detailed enough for it to succeed.

In this repository. The project-specific checks referred to above are:

  • pre-commit run --all-files passes. It runs actionlint, shellcheck, flake8, skillsaw and all five test suites, and ci.yml runs the same command on every pull request.
  • python3 scripts/audit-check.py --repo-path . --repo-name development still reports what it reported before the change, or the plan says why the verdict moved.
  • If the change touches issue filing, it was exercised with --dry-run only.

Management session review checklist

Management session review checklist (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-review-checklist.md):

After a sub-agent completes, the management session verifies:

  • The files that were supposed to change actually changed -- read them, do not trust the summary.
  • No unrelated files were modified.
  • The changes match the intent of the brief: not merely syntactically correct, but semantically right.
  • The project's own pre-merge checks pass, including any generated code that has to be regenerated and committed (see the project-specific checks below).
  • The commit message follows project conventions, including the Co-Authored-By line recording model, context window, and effort level.

Administration and logistics

Success criteria

We will know when this plan has been successfully implemented because the following statements will be true:

  • pre-commit run --all-files passes.
  • scripts/audit-check.py run against this repository reports no new failures, or the plan states which verdicts moved and why.
  • Any new or changed criterion has all five of its files in step: the Check subclass in scripts/audit/checks/<family>.py, its registration in CHECKS in scripts/audit/registry.py, the specification under docs/audits/, its row in docs/audits/README.md, and its frozen lines in FROZEN_METADATA and FROZEN_ISSUE_TITLES in scripts/tests/test_metadata.py -- plus a FROZEN_COLUMN_NAMES line where a spec page carries more than one check. AUDIT_METADATA, ISSUE_TITLES and COLUMN_NAMES are derived from the registry rather than tables anybody edits; the issue title is the fleet-wide idempotency key, so renaming one orphans every open issue for that check across the fleet.
  • No consistency-audit marker block has been added to a criterion specification by hand, and the compliance tables in docs/audits/compliance.md have not been hand-edited.
  • Any entry added to REPO_OVERRIDES carries a stated reason.
  • Anything under templates/ is judged as the code it will become in ten other repositories: placeholders consistent, no reference to paths that only exist here, and the README beside it saying what to substitute.
  • Python is wrapped at 120 characters, single quotes for strings and double quotes for docstrings, and no script has grown a dependency outside the standard library.
  • Documentation in docs/ describes any user-visible change. AGENTS.md changes only if a convention changed; ARCHITECTURE.md only if the shape of the system changed; README.md only if the pitch, the install story or the documentation links changed.

Specific to this plan:

  • reusable-workflow-secrets is compliant in every repository in scope.
  • A direct push to shakenfist/actions main by a person is rejected, and moving-ref-source-protection reports compliant for actions.
  • No third-party uses: in this repository or under templates/ is unpinned. third-party-action-pinning has filed its issues fleet-wide, and the plan records how many.
  • The specs say why first-party refs move and third-party refs do not. #153 itself closed on 2026-10-03 with phase 1, before the policy it asked for was written, so the specs rather than the issue state are what this criterion reads.

Documentation index maintenance

When creating a new master plan from this template, add one row to the table in docs/plans/index.md: the date the plan was written, a link to it, a one-line intent, and its status from the vocabulary above. Rows run oldest first. One row per master plan, never one per phase -- the phases are tracked in the plan's own Execution table, and duplicating them in the index is how the two drift apart.

There is no phase-arithmetic column and no order.yml here; both belong to repositories whose documentation is published through a generated navigation. The plan-index criterion checks the columns this index actually has.

The index row carries the whole-plan status, so it only reaches Complete once every phase has been completed, abandoned or superseded. Update it as the plan progresses, not only at the end.

Plan close-out sections (shared block; do not edit -- the canonical copy lives in shakenfist/development at templates/shared-blocks/plan-closeout-sections.md):

Future work

We should list obvious extensions, known issues, unrelated bugs we encountered, and anything else we should one day do but have chosen to defer to here, so that we do not forget them.

...

Bugs fixed during this work

This section should list any bugs we encounter during development that we fixed. You should also scan the project's issue tracker, where one exists, for directly related issues that we should either resolve as part of this master plan or at least be aware of while planning it.

...

Back brief

Before executing any step of this plan, please back brief the operator as to your understanding of the plan and how the work you intend to do aligns with that plan.

In this repository. Future work, as of writing:

  • PLAN-TEMPLATE.md's "In this repository" note after the push-audit block says PUSH-AUDIT.md's commands are written against main...HEAD. They now use ${AUDIT_RANGE:-origin/main...HEAD}. Correct the template, which this plan copies but does not own.
  • Not a bug, 2026-11-29. scripts/audit-check.py was thought to write more than its JSON document to stdout, so that json.load of a redirected run failed. Its stdout is pure JSON; the extra text is a diagnostic on stderr, such as the shallow-checkout warning plan-retirement emits. The failures came from capturing both with 2>&1. Redirect stderr separately and nothing needs fixing.
  • visual-digest-rust and private-ci have no renovate.json, so phase 3's pins would rot in those two repositories. The renovate criterion already owns that.
  • Phase 1's post-merge pr-fix-tests trigger in instar, occystrap and shakenfist was never run (close-out, 2026-10-31). The first maintainer-triggered run in each is the check: in instar, its "Prepare instar-testdata" step must authenticate with the named GITLAB_TESTDATA_TOKEN; in the other two, the run must get past its token-using steps. Read the step log when one happens, and record it here.
  • Done, 2026-11-29. Narrow shakenfist-k3s-ci-arc's administration: write on hunkydory to the runner registration it needs. Installing the review-marks App on actions in 2a extended that accepted residual to the fleet's moving-ref source, so the chain ended in a bypass of actions' own ruleset. 33fl's PLAN-k3s-ci-runners.md phase 5 widened the scale set to the organisation, which made the permission unnecessary, and it was dropped the next day. docs/audits/bypass-actor-identity.md now carries the check that it has not come back.
  • actions exports no .github/exported-config/, so a ruleset change there is captured nowhere in the repository it applies to, and merge-queue-config.md's closing instruction to trigger export-repo-config cannot be followed. The fleet's moving-ref source is thus the one repository whose configuration drift nothing detects. The decision belongs to the export-repo-config criterion and has two admissible answers: actions calls the reusable workflow it ships, or that criterion records actions as a stated exception with this reason. Whoever next touches that criterion picks one; leaving it unstated is not an answer.
  • The count of files a criterion touches is stated three different ways: PLAN-TEMPLATE.md's shared success-criteria block says five, AGENTS.md says six, and docs/consistency-audits.md says six plus a seventh line for a criterion that reaches the network. The 2b brief works around it by telling its executor not to trust the template, which protects 2b and leaves the next criterion's author reading the same stale count. Make the block and AGENTS.md non-numeric -- "every file the Adding a criterion list names, plus NETWORK_CHECKS for a criterion that reaches the network" -- which is a fleet-wide sweep, since the block is embedded in four plans.
  • actions has no contributor-facing note about the one shape that cannot merge there: a maintainer-authored branch carrying a commit whose author email is linked to no GitHub account asks for an approving review the sole maintainer cannot give. The person who hits it will be in actions with a pull request that will not merge, while the diagnosis sits in this plan in another repository. One sentence in that repository's AGENTS.md, with re-authoring the commit as the fix.
  • 389: the shakenfist-review-marks App holds two private keys

    after 2a, because change 2 set the new key only in actions' environment rather than rotating all five. Completing it is one pass over the five repositories, and the one-key property can only be confirmed by eye on the App's settings page.
  • Phase 2 exercised the actions bypass but never observed it. Run 43081577539 minted the App token and ran to success, but had no review marks to prune, so it never pushed and rulesets/rule-suites?rule_suite_result=bypass stayed empty. The first prune run on actions main that actually prunes answers it: read that listing and confirm it names shakenfist-review-marks[bot], then record it in phase 2.
  • moving-ref-source-protection measures that a required_status_checks rule exists, not that its contexts still name jobs ci.yml defines. Renaming a job in actions would break every pull request there and the criterion would report compliant. The workflow-reading helpers it would need (workflow_job_blocks) are already imported by scripts/audit/checks/github_config.py; it is a second criterion, not a widening of this one.
  • An organisation-level "require workflows" rule, sourced from a protected ref, is the stronger form of what phase 2 does (its decision 6). It wants a protected ref to source from, which phase 2 creates, and an audit token that can read orgs/{org}/rulesets, which #352 is about. Revisit once both hold.
  • plan-source-references fails on this repository, on six PLAN-a.md/PLAN-b.md fixture names in scripts/tests/test_audit_snapshot.py. They are expected-output strings for the plan-retirement criterion rather than references anybody can follow, so the criterion is right that they do not resolve and wrong that they are references. Confirmed failing on a pristine checkout of main at 951fef7, so it predates this phase and 2b did not cause it. The audit files its own issues, so the next scheduled run raises it; the fix is either naming the fixtures something the criterion does not read as a plan reference, or teaching it to skip a string that is a test's expected output.

  • Done, 2026-11-29. #393: development was a moving-ref source nothing protected. The prune-reviews job of all eight adopters clones this repository unpinned and execs scripts/review-tracking.py out of that clone, so its default branch runs in eight repositories' jobs, and its main carried only deletion and non_fast_forward. The criterion shipped measuring actions alone and declared the gap, because adding development to the table before its ruleset existed would have filed a failing issue no code change could close. Raised by the automated review of #392. PLAN-protect-development-main.md answered it: its phase 3 applied the ruleset, so main now also carries pull_request and required_status_checks rules, and its phase 4 added the table entry, so the criterion measures this repository as well as actions. The issue itself was closed earlier, by the pull request that landed that plan's first two phases.

  • Three criteria fail on this repository's main, two of them found by phase 6's survey on 2026-11-29 and deliberately left there (that phase's decision 9), and the third observed by 6b on 2026-11-30: plan-retirement, reporting PLAN-audit-scripts-restructure.md terminal for more than ninety days against fifteen terminal plans not yet eligible. That one is a retirement run's work, not a criterion to fix, and it is outside this plan. plan-phase-references has two findings, docs/audits/bypass-actor-identity.md:173 and docs/audits/moving-ref-source-protection.md:206. One is in a specification this plan wrote and one is not: moving-ref-source-protection.md is this plan's phase 2 criterion, while bypass-actor-identity.md came from PLAN-bot-bypass-identity.md phase 3 and the flagged line cites 33fl's PLAN-k3s-ci-runners.md phase 5. Whoever next edits either page rewrites the citation to link the plan instead of naming a number. review-coverage reports 6 files needing review against a threshold of 5, which clears in a review session rather than in a pull request that changes code.
  • templates/issue-fix/ has exactly one live copy in the fleet, in shakenfist, and no criterion measuring it. Phase 6's step 6a classified it as staying a template under decision 6's fourth answer: the template leads its one adopter by 372 diff lines, so there is no fleet to converge, and a second adopter is the trigger to revisit. The guess that it was the adopter's file written twice was wrong.
  • ~~review-tracking-templates fails on teneral and no issue has ever been filed there.~~ Closed on 2026-12-02: both halves have gone, and the alarming half was a measurement error. Found while verifying phase 6's step 6a and confirmed by running scripts/audit-check.py against a fresh clone on 2026-11-29: teneral's .github/workflows/prune-reviews.yml differed from the template by one line, an actions/create-github-app-token pin two releases stale, left behind when 8eed24b moved the template to v3.4.0 on 2026-11-24. The inference drawn from it -- that "either that run did not cover teneral or issue filing is not reaching it", which would hide every finding in that repository -- was wrong. shakenfist/teneral#14, "Consistency: Review tracking templates", was filed at 2026-11-29T23:36Z, nine minutes after that audit run started, so issue filing reaches teneral and the finding this entry worried about does not exist. The search that concluded "only ever two issues" was taken before that run finished. The drift itself is also gone: the 2026-11-30 fleet Renovate pin sweep bumped the stale pin, review-tracking-templates passes on teneral, and #14 will self-close on the next scheduled run. The durable lesson is the measurement one -- do not read a repository's issue list for the output of an audit run that has not finished -- and it is the same shape as 6c's two other measurement lessons.
  • Moving the mermaid checker into shakenfist/actions in 6c left MERMAID_FENCE_RE in two repositories: the criterion keeps its copy here, and the test that compares the checker's stateful scan against a narrow line match keeps one there, because that repository cannot import this one. Nothing compares the two copies, so the audit and the checker could come to disagree about what a diagram is without any test noticing; a comment beside each copy says so. Closing it properly needs a criterion that compares a constant across repositories, which nothing in the audit does yet, and the same shape will recur for every conversion 6e makes that leaves a constant on both sides.

Related issues, as of writing:

  • 153 is the issue this plan answers. It was closed on

    2026-10-03 by phase 1 (development#209), ahead of the policy write-up in phase 5, so no phase closes it.
  • 151 (templates/mermaid-lint/ has no staleness mechanism) was

    closed on 2026-10-13 as completed, by the three re-sync pull requests below, so no phase closes it -- phase 6's decision 8 removed the instruction that one would. Phase 6 still answers the question it asked, in that phase's step 6d: "a caller, or a README saying how drift is caught" becomes the requirement for every template. The issue's other drift path, this repository's tools/mermaid-lint.sh against the template, was open when it was filed and has since been pinned byte-identical by MermaidLintDeploymentTest; what remains open is drift in the fleet's copies. Its README symptom has no drift path: the template's README.md is not in its Files table and is not copied into adopting repositories, which carry only the script, the workflow and their own tools/mermaid-lint-exclude. Until phase 6 lands, fleet copies are re-synced by hand when they lag. On 2026-10-13 the tools/mermaid-lint.sh copies in instar, occystrap and shakenfist lagged the template's exclusion-file hardening, the drift phase 6 removes, and the re-sync pull requests were opened directly rather than left waiting for it: instar#657, occystrap#160 and shakenfist#4519, all three merged on 2026-10-13. That is the evidence that closing the issue did not fix the mechanism. Six weeks later mermaid-lint.yml is at four distinct versions across nine copies again, which is the case for converting the template rather than re-syncing it.
  • 88 (standardise renovate groupings) interacts with open

    question 4's grouping rule.
  • 58 (Dependency Dashboard) is where phase 3a's pinning pull

    request will show up.

📝 Report an issue with this page