Removing Redline

Everything redline init wrote, and how to take it back out — which files are Redline's to delete, which are yours with a Redline block inside them, and which host settings you should think twice about switching off.

redline remove does this in one step and opens the pull request for you. The rest of this page is the manual path, and it is written out in full deliberately: redline init writes into files you already own and changes settings on your host, so “how do I back this out” deserves an answer you can read and check rather than a command you have to trust.

If you only want Redline to stop maintaining part of this repository, removal is the wrong tool. redline init --skip gate stops Redline maintaining the merge gate — the caller workflow an earlier run installed stays on disk and keeps running; it is yours to keep or delete — --skip merge-policy hands back the branch policy, and --vendors narrows which AI tools get rendered files: a deselected vendor's block is stripped and its files pruned on the next run. Every one of those choices is recorded in .redline.json, so it survives the next run. See Onboard a repository.

The order of work

  1. git checkout -b redline/removeRemoval is a change to how this repository is reviewed and merged, so it goes through review like any other. redline init opens its own branch for the same reason.
  2. Delete the files Redline owns wholeEverything under the redline- prefix, the rendered command files, and the gate caller workflow. Nothing in them was written by a human.
  3. Strip the REDLINE blocks from the merged filesAGENTS.md, CLAUDE.md, .github/copilot-instructions.md and the pull request template are shared with your own content. Delete the marker pair and everything between it; leave every other byte.
  4. Delete .redline.jsonThis is the file that says the repository is onboarded. Until it is gone, verify and the central registry both still count this repository as part of the estate.
  5. Undo the host settings that are Redline'sThe branch ruleset entry, the labels, the repository property. Not the security floor — see below, it is the one part you almost certainly want to keep.
  6. Open the pull requestOn an advisory repository the gate runs on this pull request and reports; it is the last thing it reviews. On a blocking one the required check has to come out before the pull request is opened, or nothing publishes it and nothing merges.

Files Redline owns whole — delete them

These are generated end to end. Nothing in them came from your repository, and the redline- prefix is what makes them identifiable: it is the same prefix render() prunes on when a stack leaves your profile.

Only the vendors your organisation has enabled ever wrote anything, so expect gaps in this list rather than a clean sweep. Every vendor listed below is enabled on the manifest as it ships today. Check .redline.json — it records the vendors this repository actually rendered.

PathWhat it is
.github/instructions/redline-*.instructions.mdOne per stack in your profile — the Copilot rules with their applyTo globs.
.cursor/rules/redline-*.mdcCursor rules, core plus one per stack.
.github/prompts/redline-*.prompt.mdThe rendered slash commands for Copilot. Equivalents live in .claude/commands/, .opencode/command/ and .cursor/commands/.
.github/workflows/redline.ymlThe caller workflow: a few lines that reference your org's reusable gate. On Azure DevOps this is .azuredevops/redline-gate.yml.
.redline.jsonThe record of what was installed. Covered on its own below.

One exception, in the command files. Redline renders redline-init and redline-verify into paths that nothing reserves — a team can have its own .claude/commands/redline-init.md. Where a file was already there, Redline merged into it instead of owning it, and the file is a merged file, not a generated one. The tell is what sits outside the block: a file that is nothing but a # Managed by Redline frontmatter line and one REDLINE block is Redline's and can go; anything else is yours with a block in it, so strip the block and keep the file.

Files that are yours — strip the block only

These files are shared. Redline writes into them between two marker lines and never touches a byte outside that span — that is the whole reason the markers exist. Removing Redline means deleting the marker pair and everything between them, and leaving the rest of the file exactly as it is.

AGENTS.md
# Checkout service
Your own notes, untouched by every redline run.

<!-- REDLINE:BEGIN — generated by Redline. Do not edit inside this block. -->
…everything here is Redline's — delete it…
<!-- REDLINE:END -->

More of your own notes, also untouched.
  • AGENTS.md — the composed standard: core rules plus every stack in your profile. Usually the largest block.
  • CLAUDE.md — four lines that import AGENTS.md.
  • .github/copilot-instructions.md — the core standard for Copilot code review.
  • The pull request template.github/pull_request_template.md, or wherever your host resolves one. Same marker rule; see below.

If nothing but the markers was ever in the file — no notes of your own above or below the block — delete the file. That is exactly what Redline itself does when a vendor is deselected — strip the block, and remove the file if nothing is left.

!

Match the marker pair literally: <!-- REDLINE:BEGIN at the start of a line, through to the matching <!-- REDLINE:END -->. Redline itself refuses to write a file carrying a half-edited pair — one marker without the other, or two of either — rather than guess which span is its own, so leaving a stray marker behind is the one edit here that can break a later redline init.

The pull request template

Created, never taken over. A template your repository wrote for itself is not Redline's to edit, so there are four cases and only two of them leave you anything to undo:

  • You had no template. Redline wrote the packaged one whole. Delete the file.
  • You had one that already answered the gate. Redline left it untouched and there is nothing to undo.
  • You had one that did not answer the gate. Redline still did not edit it. The install named the sections it lacks — ## Launch readiness, ## Architecture decision — and said the checklist job will fail until someone adds them or the gate is deselected. Nothing to undo; the file is entirely yours.
  • Your template carries a REDLINE block. Redline put it there on an earlier run, and refreshes only what is inside it. Strip the block and keep every other byte.

On Azure DevOps, check the branch-specific templates too — anything under a branches/ folder inside pull_request_template/, in .azuredevops/, .vsts/, docs/ or the repository root. Azure serves those in preference to the default, so redline init considers every one it finds — under the same four cases above, which for a template you wrote means it is reported and left alone.

.github/CODEOWNERS

Seeded only if you asked for it, and only if this repository had none. Ownership is off by default — it is written when redline init --with review-ownership selects it, because the generated file names an owner Redline cannot prove exists and a ruleset requiring code-owner review with an unresolvable owner blocks every pull request in the repository. Where it is selected, redline init looks for .github/CODEOWNERS, CODEOWNERS and docs/CODEOWNERS; if any of the three exists the file is reported as already present, left untouched and Redline never writes ownership at all. So a pre-existing CODEOWNERS is not Redline's and must not be deleted.

The tell is the first line. A seeded file opens with # Managed by Redline. and then names one owning team against the sensitive paths — workflows, the rendered standards, infra/, Dockerfile. A file that does not open with that line was yours before Redline arrived.

Deleting a seeded CODEOWNERS removes code-owner review from .github/workflows/ and your infrastructure paths — a protection that has nothing to do with Redline and that your branch policy may still be requiring. Removing Redline is not a reason to give that up: keep the file and drop the # Managed by Redline. line, unless you know the ownership was never wanted. On Azure DevOps this question does not arise — required reviewers there take identity GUIDs rather than team slugs, so Redline reports the capability as unsupported and writes nothing.

.redline/local.md

Yours, entirely. Redline reads this file and renders a copy of it inside the block in each artifact; it never writes it, never prunes it and never fails a run over what is in it. Stripping the blocks removes the copies. The source file stays unless you delete it yourself.

.redline.json — what deleting it means

This is the file that makes the repository onboarded, and deleting it is what makes the removal real rather than cosmetic.

  • redline verify stops recognising the repository. It reports a single finding — no .redline.json — run: npx redlinegate init — and exits 2, a usage error, not drift.
  • Central discovery reads .redline.json from the default branch of every repository in the org. With the file gone this repository is simply not in the registry, and stops appearing in coverage and drift reporting.
  • It also carries onboardedAt, the recorded menu, the pending-admin list and the content ids of the command files. All of that is gone with it — a later redline init would start from nothing and read as a fresh onboarding.

Delete it last, and only in the same pull request as the rest. A repository with the files still on disk and no .redline.json looks, to redline init, very like a repository from an older generation of the tool that is due a migration.

Host settings

None of these live in the repository, so no pull request removes them. They are split here into the ones that are Redline's and the ones that only arrived with Redline.

Keep these

Secret scanning, push protection and dependency alerts are an organisation-wide security floor. They are additive host settings — they displace nothing else the repository runs — and they have nothing to do with code review standards. Removing Redline is not a reason to turn them off. The CLI itself refuses --skip security-floor by name for exactly this reason, rather than quietly recording an opt-out.

SettingWhere
secret scanningGitHub repository settings; Azure DevOps Advanced Security.
push protectionSame place — the half of secret scanning that blocks the push rather than reporting after it.
dependency alertsDependabot alerts and automated security fixes on GitHub; Advanced Security dependency scanning on Azure.

Remove these

ObjectWhat to do
ruleset “Redline”The branch ruleset on your default branch, created under exactly that name. Delete it — or, if your team wants the approval rules it carries, rename it and keep it; from then on it is yours and Redline would create a second one beside it.
redline-gate / gateThe required status check inside that ruleset, present only on a repository promoted to blocking. This one comes out first — see the ordering note below.
redline=onboardedThe custom repository property. GitHub only; Azure DevOps has no repository properties and the central registry tracks the repo instead.
no-adrLabel. Created by the gate install and meaningless without it.
redline-exemptLabel. Same — it is what the gate soft-failed on. Check for open pull requests carrying it before deleting.
redline-syncLabel, applied to the pull requests the standards sync opens.

On Azure DevOps the equivalents are branch policies whose display name starts Redline: — the minimum-reviewers, comment-resolution, gate-status and gate-build policies — plus the build definition redline-gate in the \Redline folder. A policy of the same type without that prefix is a human's and was never touched by Redline.

The reusable gate workflow itself lives in your organisation's .github repository, not here. Removing Redline from one repository deletes its caller and leaves the org-level workflow alone — which is what you want while any other repository still calls it.

Do it as a pull request

Onboarding never pushes to your default branch, and removal should not either. Everything above except the host settings is a file change, so it goes on a branch and through review — which is also the only way the rest of the team finds out that the standard they have been reviewing against is gone.

On a repository promoted to blocking, drop the required check before you open the removal pull request. The caller workflow runs from the head of the branch under review, so a pull request that deletes it is a pull request on which redline-gate / gate is never reported — and a ruleset still requiring that check will not let it merge, or anything else after it. Remove the required_status_checks rule (or the whole ruleset) first, then open the pull request. On the default advisory install there is no required check and no such problem: the gate runs on the removal pull request, reports, and blocks nothing.

terminal
$ git checkout -b redline/remove
$ git add -A
$ git commit -m 'chore(redline): remove Redline from this repository'
$ git push -u origin redline/remove
  on an advisory repo the gate still runs here — it is the last thing it reviews

Once it has merged, take out what is left on the host: the ruleset, the redline=onboarded property, the three labels. Leave the security floor on.