@polymerix-labs/dont-break-query
v0.4.0
Published
JSON CLI over the dont-break structural query API, for shell scripts and CI pipelines
Maintainers
Readme
@polymerix-labs/dont-break-query
JSON CLI over the dont-break structural query API, for shell scripts and CI pipelines. Results are printed as raw JSON on stdout so they compose with jq.
npx @polymerix-labs/dont-break-query arch-statusSetup
Set four environment variables (the dont-break extension's Connect your agent panel provides ready-to-copy values):
export DONT_BREAK_API_URL="https://api.dont-break.dev"
export DONT_BREAK_TOKEN="<jwt>"
export DONT_BREAK_WORKSPACE="<workspace-id>"
export DONT_BREAK_PROJECT="<project-slug>"Configuration is environment-only by design: tokens never appear in argv, process lists, or shell history.
Commands
| Command | Purpose |
|---------|---------|
| find <name> [--kind <kind>] [--limit <n>] | Resolve a name/path into graph nodes (entry point — other commands take node ids) |
| dependencies <node_id> [--depth <n>] | What a node depends on |
| dependents <node_id> [--depth <n>] | Who depends on a node |
| impact [--file <path>]... [--node <id>]... | Blast radius of a change |
| path <from> <to> [--k <n>] | Cheapest dependency routes between two nodes |
| do-not-touch [--scope <prefix>] | Danger list: high fan-in + low stability |
| arch-status | Practicability report + verdict |
| check [--file] [--node] [--diff] [--allow-warn] | Team rules vs a planned change (exit 1 on warn, 2 on block) |
| propose-rule --kind --name --severity | Propose a rule (warn active now; block waits for a human) |
| pause-own-rule <rule_id> | Pause a rule this agent token authored |
| append-rule-reason <rule_id> <text> | Append one reason to any rule (add-only) |
Exit codes
| Code | Meaning |
|------|---------|
| 0 | Success (JSON result on stdout). check: verdict ok |
| 1 | API or network error (JSON { error, code, status } on stderr). check: verdict warn |
| 2 | Usage or configuration error (JSON { error } on stderr). check: verdict block |
check --allow-warn keeps a warn verdict at exit 0 so a pipeline can fail only on block.
Examples
# Gate a CI job on architectural health
verdict=$(dont-break-query arch-status | jq -r .practicability.verdict)
[ "$verdict" != "critical" ] || { echo "architecture critical — blocking merge"; exit 1; }
# Files changed in this merge request
git diff --name-only origin/main... | dont-break-query check --diff -
# Refuse to touch danger-zone files
dont-break-query do-not-touch --scope src/services | jq -e 'length == 0'All business logic (weights, caps, thresholds) lives server-side; the CLI is a pure transport built on @polymerix-labs/agents-core.
License
MIT
