triggerlist
Code review checklist that the diff selects: only items whose triggers fire reach the reviewer, REVIEW.md compiles under a byte budget, and rules are read from the base branch. No dependency outside the burgee family. A danger migration path.
triggerlist gives a code reviewer, a person or a model, only the checklist items a change
fires. Each item names the paths and the line pattern that trigger it, the question to ask and
the check that answers it. triggerlist match lists what fires on a diff, brief writes the
reviewer's prompt for one round, compile writes REVIEW.md under a byte budget, and protect
flags a change that edits a gate and the code it judges together. The checklist and the rules
are read from the base branch, so a pull request is reviewed by rules it did not write.
It covers the rules half of danger: where a Dangerfile runs code against a pull request,
triggerlist keeps the rules as data a reviewer reads. Every command prints burgee's --json
envelope, each item with where it fired, for a pipe or an agent.
Install
npm install triggerlist
pnpm add triggerlist
yarn add triggerlist
bun add triggerlistInstall it as a dev dependency (-D) of the repository it reviews. It needs git.
Quick start
npm install triggerlistimport { match, parseChecklist, parseDiff } from "triggerlist";
const checklist = parseChecklist(".sdlc/checklist.yaml", `
gates: ["scripts/*-lock.test.ts"]
items:
- id: spawn
trigger: { paths: ["src/**/*.ts"], pattern: "child_process" }
question: Does it spawn through bellpull?
check: a direct child_process import is a finding
sources: ["#212"]
`);
// What `git diff --no-renames -U0` prints for one added import.
const diff = `diff --git a/src/run.ts b/src/run.ts
--- a/src/run.ts
+++ b/src/run.ts
@@ -1,0 +2,1 @@
+import { spawn } from "node:child_process";
`;
for (const { item, at } of match(checklist, parseDiff(diff))) console.log(`${item.id}: ${item.question} (${at[0].file}:${at[0].line})`);spawn: Does it spawn through bellpull? (src/run.ts:2)What it checks
triggerlist match origin/main # the items that fire on origin/main...HEAD
triggerlist brief origin/main --head "$SHA" # the reviewer's prompt for one round
triggerlist compile --check # fail when REVIEW.md is stale
triggerlist protect origin/main # a gate and the code it judges, changed together| Command | Exit 1 when |
|---|---|
compile --check | REVIEW.md is not what the checklist compiles to |
protect | one change edits a gate file and the code that gate judges |
Migrating
The switch is one command, npx triggerlist brief, where the Dangerfile ran:
# .github/workflows/review.yml
- - run: npx danger ci
+ - run: npx triggerlist brief origin/${{ github.base_ref }} --head ${{ github.sha }} > brief.mdand each Dangerfile rule becomes a checklist item with the paths that trigger it. Keep danger for rules that must post on the pull request themselves.
Compatibility
Not graded: triggerlist reads a repository's diff and checklist, and no suite is graded against it. It runs anywhere git does.
Benchmarks
Every number here is produced by npm run bench and published at burgee.interlace.tools/docs/benchmarks.
No suite is graded against this package yet, so there is no compatibility number to quote.
For agents
triggerlist match --json,brief --jsonandprotect --jsonprint burgee's--jsonenvelope; a failure ends infix:.--json,--schemaand an MCP server come from one declaration on burgee:triggerlist --mcpserves its commands as tools.- Exit codes are the contract.
0passed;1a check failed, as the table above says;2a usage error, with thefix:to run. - The docs are machine-readable at burgee.interlace.tools/llms.txt.
API
| Import | What it gives you |
|---|---|
triggerlist | parseChecklist(), parseDiff(), match(), compile(), protect(), briefText() and program |
The triggerlist bin is that API, declared once on burgee.
Requirements
Node 22.13 or later, and git.
Where it sits
It hosts no plugin key of its own.
Nothing in this family builds on it yet, and it builds on bellpull, burgee, seniority, truefit.
The family
18 packages, one repository, one release pipeline. Each installs and works on its own, and each owns
one job. Seven of them — bellpull, closeout, linegauge, paratext, roundel, seniority,
truefit — depend on nothing; the others depend only on packages in this table, and every
dependency points one way, down the layers.
No package declares a dependency from outside the family; react and react-reconciler are
optional peers of controlroom, which npm does not install; vitest is an optional peer of
oxmutate, which npm does not install; eslint is an optional peer of truepass, which npm does
not install.
package-shape-lock
holds that for every manifest, and
independence-install-lock
installs each package alone and finds nothing but the family packages it declares.
Releases are published by one workflow through npm trusted publishing: no npm token is used, and
each release carries SLSA provenance, which npm view <package> dist.attestations shows.
trusted-publishing-lock
keeps both true.
| Package | What it is | Migrates from |
|---|---|---|
| burgee | The CLI framework: one declaration, every surface | commander, yargs and meow |
| roundel | Colour: one output policy, semantic tokens, a theme | chalk, colorette, kleur, picocolors, supports-color and yoctocolors |
| flagstaff | The frame loop: spinners, progress, boxes and tables | ora, log-update, boxen and cli-table3 |
| caique | Prompts that are flags first, and never hang | @inquirer/core |
| linegauge | Measuring, wrapping, truncating and slicing styled text | string-width, wrap-ansi, strip-ansi, slice-ansi, cli-truncate and widest-line |
| paratext | Hyperlinks, images, title, clipboard and notifications | ansi-escapes, terminal-link and term-img |
| seniority | Configuration precedence and discovery, with provenance | cosmiconfig, lilconfig, dotenv and rc |
| closeout | Exit handlers, terminal restore and a bounded shutdown | signal-exit, exit-hook, restore-cursor, cli-cursor and onetime |
| bellpull | Subprocesses, and which executable actually ran | cross-spawn and which |
| controlroom | Keyboard-driven terminal screens, inline or full-screen | ink |
| oxmutate | Mutation testing on the oxc engine, inside your own Vitest | Stryker |
| truepass | Lint rules and a pre-push check that keep a test suite honest | @vitest/eslint-plugin |
| contractdiff | API contracts: breaking-change diff, lint, and code from the spec | openapi-typescript |
| truefit | Validation whose schemas are data, with no eval | zod |
| provedone | A receipt for how every change was verified, and a gate that reads it | @commitlint/cli |
| replz | Recall of a reviewer and its checks, replayed on bugs that shipped | promptfoo |
| hookset | The same git and Claude Code hooks in every repository, pinned by tag | husky |
| triggerlist (this package) | The review checklist a diff selects, read from the base branch | danger |
Every migration guide, and the family-wide compatibility and benchmarks pages, are on burgee.interlace.tools.
Contributing
Issues and pull requests are welcome at ofri-peretz/burgee; read CONTRIBUTING.md first. Report a vulnerability privately, as SECURITY.md describes — never in a public issue.
Licence
MIT © Ofri Peretz — see LICENSE.
replz
Code review benchmark for AI reviewers and a repo's checks: replays each pull request a revert or fix blamed beside clean controls, and grades findings against a one-line answer key. No dependency outside the burgee family. A promptfoo migration path.
truepass
Test integrity for JS and TS: lint rules for focused, skipped, sleeping and retried tests, and a pre-push check for weakened assertions and unexplained snapshots. No dependency outside the burgee family. A @vitest/eslint-plugin migration path.