Distribution and drift
A standards change is worth nothing until it reaches the repositories it is for. This page covers how changes travel, and how a repository that falls behind gets noticed.
Why changes have to travel
Onboarding writes a copy of the standard into each repository: AGENTS.md, the assistant instruction files, the gate's caller workflow. A copy does not update itself. When the standard changes, or a new redlinegate release fixes something, each repository needs a pull request that rewrites its copy.
A repository that quietly stops matching is worse than one that never onboarded: everyone believes it is covered. So Redline also checks, every week, that each repository still matches what it claims.
Two ways to update
| Update one repository | Sync the whole organisation | |
|---|---|---|
| Who runs it | the repository's own team | the team that owns Redline |
| Where | in the product repository | in a checkout of the Redline source repository |
| Command | init --no-commit | sync |
| Hosts | GitHub and Azure DevOps | GitHub only |
Update one repository
Raise redlinegate in the repository's devDependencies to the new version with your package manager. Then, on a branch:
$ pnpm redline status $ pnpm redline init --no-commit
$ npx redlinegate status $ npx redlinegate init --no-commit
$ yarn redline status $ yarn redline init --no-commit
$ bun run redline status $ bun run redline init --no-commit
status shows whether the repository is behind on its standards line, for example — behind 0.2.2, a sync will raise it, or — current. init keeps every choice recorded in .redline.json and rewrites the generated files.
Raising the version alone is not enough: the files are copies, and only init replaces them. Commit, open a pull request, merge. Learn step 10 does it end to end.
Sync the whole organisation
An organisation with many repositories does not rely on each team remembering. sync opens the same pull request on every registered repository that is behind, naming the version it moves from and to.
It runs from a checkout of the Redline source repository: automatically in the Redline Sync workflow when a change to standards/, the renderer or the templates lands on main, or by hand. Run from a product repository it stops with no registry.json.
# from a checkout of the Redline source repository $ npm ci $ npm run build $ node dist/bin/redline.js sync --dry-run
--dry-run prints the plan and changes nothing. --repo owner/name narrows it to one repository. What a sync pull request guarantees:
- Your own content survives. Everything a team wrote above the
REDLINE:BEGINmarker inAGENTS.mdis untouched, because the render starts from the repository's current files. - It starts from your default branch, never from an older sync branch, so an unmerged sync pull request cannot carry stale changes forward.
- One open sync pull request per repository. A newer change updates it rather than opening another.
- It never merges and never pushes to a default branch. Merging is the repository's decision.
Which repositories sync reaches
Only those in registry.json, the register of onboarded repositories. Nobody edits it by hand. A nightly workflow in the source repository walks the organisation for repositories that carry a .redline.json and writes what it finds.
So a repository is registered exactly as long as that file exists. One that removes Redline drops out on the next run. One onboarded today becomes a sync target after tonight's run.
A sync pull request exempts itself, for 30 days
A sync diff is generated, so the launch-readiness checklist and the ADR check do not fit it. Instead of a special case in the gate, the pull request carries the redline-sync label and a real exemption block, scoped to checklist, adr and expiring 30 days after it was opened. The tool that writes the rules follows them too.
The expiry is deliberate. At a blocking rung, a sync pull request nobody merges starts failing its own gate after 30 days, which makes a repository quietly refusing a standards change visible.
Drift: noticing a repository that fell behind
Drift is any gap between what a repository's .redline.json claims and what is actually there: a hand-edited ruleset, a renamed caller job, push protection switched off, generated files left stale.
A weekly workflow in the source repository runs verify --repo owner/name against every registered GitHub repository. If any has drifted, it opens one tracking issue, and adds each later week's results to that same issue as a comment.
Verifying over the API cannot run every check: some need a working tree. Those report ??, never ok, because reporting an unrun check as passing would give a false all-clear across every repository at once. A ?? never fails a repository on its own either.
In a product repository, verify runs the full set of checks against the checkout:
$ pnpm redline verify
$ npx redlinegate verify
$ yarn redline verify
$ bun run redline verify
Azure DevOps
Sync and remote verify are GitHub-only today. A registered Azure DevOps repository is reported as unsupported rather than silently skipped. On Azure DevOps, update each repository yourself, as above.
Related
redline syncandredline verify: every flag.- Redline Sync and Verify Onboarding: the scheduled workflows.
- Who runs what: which commands belong to a product team and which to the Redline owners.