Add your own vendor

Redline is a standards system with adapters — only ~60 lines of the renderer are vendor-aware, and that is the whole surface a new vendor touches.

The contract

Add one function to the VENDORS record in cli/render/vendors.ts — the renderer lives in the CLI as TypeScript, not scripts/render.mjs (deleted). A VendorRenderer is (ctx: RenderContext) => VendorOutput, where ctx carries { manifest, root, profile, stacks } — every real vendor needs ctx.root and ctx.manifest to actually read rule text off disk; a function that only sees profile and stacks has no way to read a single rule.

cli/render/vendors.ts — a minimal vendor
const myvendor: VendorRenderer = (ctx) => {
  const files = new Map<string, RenderedFile>();
  files.set('.myvendor/redline-core.rules', {
    merge: true,  // wraps the body in REDLINE:BEGIN markers
    body: read(ctx.root, ctx.manifest.core.source),
  });
  return {
    files,
    prune: [{ dir: '.myvendor', matches: (f) => f.startsWith('redline-') }],
  };
};
  • merge: true wraps the body in <!-- REDLINE:BEGIN --> markers and preserves everything outside them — a repo's own context survives every re-render. That marker string is frozen deliberately: changing it would make every already-onboarded repo append a second block instead of replacing its first.
  • prune is an array of { dir, matches: (filename) => boolean } — not glob strings. redline init deletes anything matching, inside dir, that a re-render no longer produces. Every real vendor generates filenames prefixed redline- precisely so pruning can never touch a file a team wrote by hand.

Register and ship

  1. Add the vendor to vendors in standards/manifest.json with enabled: true.
  2. CI renders it for every profile on the next PR — the render-drift check keeps output honest.
  3. Merge. Registered repositories get the new artifacts as a sync pull request; anything not in the register picks them up on its next redline init, and redline verify reports it stale until then.

Measurement comes free

Telemetry and seed scoring classify a review comment by the reviewer login and the Redline/<SEVERITY> prefix — neither knows which vendor produced it. Any vendor that follows the output contract is measurable from day one, and comparable against the incumbents on identical seeded input.