burnoff 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +11 -0
- package/.github/workflows/burnoff-pr-gate.yml +3 -3
- package/.github/workflows/burnoff-startup-lint.yml +37 -0
- package/README.md +90 -75
- package/bin/burnoff.mjs +185 -24
- package/commands/burnoff.md +16 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +67 -0
- package/docs/DESIGN_PARTNER_INTAKE.md +44 -0
- package/hooks/hook-io.mjs +19 -7
- package/hooks/post-tool-use.mjs +33 -26
- package/hooks/pre-tool-use.mjs +43 -41
- package/hooks/session-lifecycle.mjs +40 -0
- package/package.json +15 -7
- package/scripts/burnoff-statusline.mjs +84 -0
- package/src/ci/ci-gate.mjs +22 -0
- package/src/ci/pr-cost.mjs +42 -10
- package/src/ci/team-digest.mjs +5 -3
- package/src/cli/audit.mjs +103 -18
- package/src/cli/doctor.mjs +209 -14
- package/src/cli/init.mjs +349 -96
- package/src/cli/startup-audit.mjs +712 -62
- package/src/clients/antigravity.mjs +285 -0
- package/src/clients/claude-code.mjs +180 -0
- package/src/clients/detect.mjs +64 -0
- package/src/config/loader.mjs +11 -4
- package/src/config/paths.mjs +62 -2
- package/src/config/policy.mjs +34 -5
- package/src/config/pricing.mjs +16 -5
- package/src/guards/loop-breaker.mjs +198 -13
- package/src/guards/post-tool-engine.mjs +289 -29
- package/src/guards/pre-tool-engine.mjs +382 -151
- package/src/guards/read-clamp.mjs +78 -18
- package/src/guards/session-hook.mjs +207 -0
- package/src/guards/shell-guard.mjs +583 -73
- package/src/guards/snooze.mjs +360 -0
- package/src/ipc/daemon.mjs +50 -8
- package/src/ipc/fast-client.mjs +62 -5
- package/src/ipc/protocol.mjs +1 -1
- package/src/storage/antigravity-parser.mjs +258 -0
- package/src/storage/file-lock.mjs +13 -4
- package/src/storage/fts5-archive.mjs +4 -4
- package/src/storage/jsonl-parser.mjs +7 -1
- package/src/storage/ledger.mjs +10 -3
- package/src/storage/sqlite-client.mjs +4 -2
- package/hooks/hooks.json +0 -12
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "burnoff",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Deterministic circuit breakers, bounded file-read guards, Turn-0 CI linters, and PR spend gates for Claude Code.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Gizzant"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": "https://github.com/Gizzant/burnoff",
|
|
10
|
+
"commands": "./commands/"
|
|
11
|
+
}
|
|
@@ -30,13 +30,13 @@ jobs:
|
|
|
30
30
|
if [ -s .burnoff-ci/provider-usage.json ]; then
|
|
31
31
|
USAGE_FLAG="--provider-usage .burnoff-ci/provider-usage.json"
|
|
32
32
|
fi
|
|
33
|
-
npx -y burnoff@1.
|
|
34
|
-
npx -y burnoff@1.
|
|
33
|
+
npx -y burnoff@1.3.0 pr-cost --base "origin/${{ github.base_ref }}" $USAGE_FLAG --json --out .burnoff-ci/pr-cost.json
|
|
34
|
+
npx -y burnoff@1.3.0 pr-cost --base "origin/${{ github.base_ref }}" $USAGE_FLAG --markdown --out .burnoff-ci/pr-cost.md
|
|
35
35
|
|
|
36
36
|
- name: Enforce CI Token-Budget Gate
|
|
37
37
|
id: gate
|
|
38
38
|
run: |
|
|
39
|
-
npx -y burnoff@1.
|
|
39
|
+
npx -y burnoff@1.3.0 ci-gate --input .burnoff-ci/pr-cost.json --strict --github-annotations --out .burnoff-ci/ci-gate.md
|
|
40
40
|
cat .burnoff-ci/pr-cost.md >> "$GITHUB_STEP_SUMMARY"
|
|
41
41
|
cat .burnoff-ci/ci-gate.md >> "$GITHUB_STEP_SUMMARY"
|
|
42
42
|
echo "summary_path=.burnoff-ci/pr-cost.md" >> "$GITHUB_OUTPUT"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Burnoff Turn-0 Config & Rules Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- 'CLAUDE.md'
|
|
7
|
+
- 'GEMINI.md'
|
|
8
|
+
- '.claude/**'
|
|
9
|
+
- '.agents/**'
|
|
10
|
+
- '.mcp.json'
|
|
11
|
+
- '.burnoff.yaml'
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
startup-lint:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout repository
|
|
22
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js
|
|
25
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
26
|
+
with:
|
|
27
|
+
node-version: '22'
|
|
28
|
+
|
|
29
|
+
- name: Run Repo-Local Turn-0 Startup Audit
|
|
30
|
+
# External consumers copying this workflow can use npx -y burnoff@1.3.0 directly.
|
|
31
|
+
run: |
|
|
32
|
+
if [ -f bin/burnoff.mjs ]; then
|
|
33
|
+
node bin/burnoff.mjs audit --startup --ci --github-annotations --client auto | tee burnoff-startup-lint.txt
|
|
34
|
+
else
|
|
35
|
+
npx -y burnoff@1.3.0 audit --startup --ci --github-annotations --client auto | tee burnoff-startup-lint.txt
|
|
36
|
+
fi
|
|
37
|
+
cat burnoff-startup-lint.txt >> "$GITHUB_STEP_SUMMARY"
|
package/README.md
CHANGED
|
@@ -1,124 +1,118 @@
|
|
|
1
1
|
# Burnoff
|
|
2
2
|
|
|
3
|
-
**Burnoff
|
|
3
|
+
**Burnoff** — Deterministic circuit breakers, bounded file-read guards, and Turn-0 config linting for Claude Code (with experimental Google Antigravity CLI support).
|
|
4
4
|
|
|
5
|
-
Burnoff
|
|
5
|
+
Burnoff runs locally via `PreToolUse` and `PostToolUse` hooks to bound oversized file reads (`updatedInput`), stop runaway command failure loops, block destructive shell/git operations and credential reads, and statically lint Turn-0 repository config bloat (`CLAUDE.md`/`AGENTS.md`, `.mcp.json`, volatile prompt-prefix instructions `BO-CFG-11`). Zero runtime dependencies, MIT licensed, 100% local, and no proxy or daemon required.
|
|
6
6
|
|
|
7
7
|
## Why Burnoff?
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
9
|
+
- **Bounded File-Read Guards (`DET-06`):** Clamps oversized non-code reads (`250 lines / 16 KB`) via `updatedInput`, skips overlapping re-reads, and leaves active source files unclamped.
|
|
10
|
+
- **Deterministic Runaway Loop Breaker (`DET-04`):** Halts repeating tool or command failure loops after 3 consecutive failures using cross-process state locking, exempting read-only recovery steps and resetting cleanly on success or `git stash`.
|
|
11
|
+
- **Destructive Shell & Credential Guards (`DET-01` / `DET-02` / `DET-03`):** Blocks high-risk shell/git commands (`git push --force`, `--no-verify`, `rm -rf`) and sensitive credential/env paths (allowing `.env.example`/`.env.sample` templates), while routing reversible git resets and lockfile/workflow edits through interactive confirmation.
|
|
12
|
+
- **Turn-0 Startup Config Linter (`audit --startup`):** Audits `.mcp.json`, Claude Code settings, `.agents/mcp_config.json`, `GEMINI.md`/`AGENTS.md`/`.agents/rules/*.md`, volatile prompt-prefix instructions (`BO-CFG-11`), and tool bloat before a session starts.
|
|
13
|
+
- **Repo Policy & Local FinOps (`pr-cost` / `ci-gate`):** Correlates branch commits with local Claude Code and Google Antigravity CLI session transcripts, optionally reconciles against `.burnoff-ci/provider-usage.json`, and evaluates `.burnoff.yaml` thresholds via `ci-gate`.
|
|
14
14
|
|
|
15
15
|
## Requirements & Scope
|
|
16
16
|
|
|
17
|
-
- **Supported
|
|
18
|
-
- **Runtime:** **Node.js `>=20.19.0`** (`Node.js >=22.13.0` recommended for built-in `node:sqlite` FTS5 indexing; older supported Node.js versions automatically run in
|
|
17
|
+
- **Supported Agents:** **Claude Code** and **Google Antigravity CLI (experimental)**.
|
|
18
|
+
- **Runtime:** **Node.js `>=20.19.0`** (`Node.js >=22.13.0` recommended for built-in `node:sqlite` FTS5 indexing; older supported Node.js versions automatically run in local JSON fallback mode).
|
|
19
19
|
- **Dependencies:** **Zero runtime npm dependencies.**
|
|
20
20
|
|
|
21
|
+
### Client Capability Matrix
|
|
22
|
+
|
|
23
|
+
| Capability | Claude Code | Google Antigravity CLI (experimental) |
|
|
24
|
+
| :--- | :---: | :---: |
|
|
25
|
+
| **DET-01 / 02 / 03** (Shell, secret & protected-file guards) | Yes | Yes (`decision: deny \| ask`) |
|
|
26
|
+
| **DET-04** (Runaway loop breaker) | Yes (`PostToolUse` / `PostToolUseFailure`) | Yes (`PostToolUse.error`) |
|
|
27
|
+
| **DET-05** (Subagent fan-out & prompt-bloat guard) | Yes (`Task` / `Agent`, advisory by default) | Yes (`invoke_subagent`, advisory by default) |
|
|
28
|
+
| **DET-06** (Bounded file-read clamp & overlap trim) | Yes (`updatedInput`) | Yes (`overwrite: { StartLine, EndLine }`) |
|
|
29
|
+
| **`PostToolUse` FTS5 log archive & MCP output replacement** | MCP replacement + local FTS5 archive (built-in tool output is not replaced in `auto` mode) | **No** (`PostToolUse` returns `{}`) |
|
|
30
|
+
| **Turn-0 startup audit (`burnoff audit --startup`)** | Yes | Yes (`GEMINI.md`, `AGENTS.md`, `.agents/`) |
|
|
31
|
+
| **Local FinOps (`audit`, `pr-cost`, `ci-gate`)** | Yes | Yes (Gemini rate cards & `transcript.jsonl`) |
|
|
32
|
+
|
|
21
33
|
## Quickstart
|
|
22
34
|
|
|
23
|
-
Install Burnoff in your project
|
|
35
|
+
Install Burnoff in your project, preview changes, wire hooks, and run your Turn-0 health & startup audit:
|
|
24
36
|
|
|
25
37
|
```bash
|
|
26
38
|
npm i -D burnoff
|
|
27
39
|
npx burnoff init --dry-run
|
|
28
|
-
npx burnoff init
|
|
40
|
+
npx burnoff init # Claude Code (.claude/settings.local.json)
|
|
41
|
+
npx burnoff init --client antigravity # Google Antigravity CLI (.agents/hooks.json)
|
|
42
|
+
npx burnoff init --client antigravity --global # Global (~/.gemini/config/hooks.json)
|
|
43
|
+
npx burnoff init --client both # Wire both clients
|
|
29
44
|
npx burnoff audit --startup
|
|
30
45
|
npx burnoff doctor
|
|
46
|
+
npx burnoff doctor --gc # Prune >14d caches & rotate prior-month ledger
|
|
31
47
|
```
|
|
32
48
|
|
|
33
49
|
Remove hooks cleanly at any time:
|
|
34
50
|
|
|
35
51
|
```bash
|
|
36
52
|
npx burnoff uninstall
|
|
53
|
+
npx burnoff uninstall --client antigravity [--global]
|
|
37
54
|
```
|
|
38
55
|
|
|
39
|
-
##
|
|
56
|
+
## Smoke Test (`PreToolUse` exit `2`)
|
|
40
57
|
|
|
41
|
-
|
|
58
|
+
Verify that the `PreToolUse` guard blocks secret reads before execution:
|
|
42
59
|
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
- MCP startup tax: 0 tok/turn (deferred loading active)
|
|
46
|
-
- [pass] Chrome default disabled (or actively used)
|
|
47
|
-
- [warn] Artifact built-in tool active (cli, 0 calls in 7d, ~8500 tok/turn est.)
|
|
48
|
-
Note: Setting enableArtifact: false in settings.json is a one-way global lock and cannot be re-enabled per session with --settings.
|
|
49
|
-
Fix (never use): Set "enableArtifact": false in ~/.claude/settings.json (permanent one-way global lock).
|
|
50
|
-
Fix (occasional): Leave "enableArtifact" unset and run terminal coding with: claude --disallowedTools Artifact
|
|
51
|
-
- [warn] Bundled skills/workflows enabled (~6000 tok/turn est.)
|
|
52
|
-
Fix: Set "disableBundledSkills": true and "disableWorkflows": true in ~/.claude/settings.json (or pass per-session: claude --settings '{"disableBundledSkills":true,"disableWorkflows":true}').
|
|
53
|
-
- Rules [pass]: 1 file(s), 1 discrete rules, ~13 est. tokens
|
|
60
|
+
```bash
|
|
61
|
+
echo '{"session_id":"smoke-1","tool_name":"Bash","tool_input":{"command":"cat .env;echo ok"}}' | node node_modules/burnoff/hooks/pre-tool-use.mjs; echo "exit=$?"
|
|
54
62
|
```
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
Expected output:
|
|
57
65
|
|
|
58
66
|
```text
|
|
59
|
-
$ echo '{"session_id":"smoke-1","tool_name":"Bash","tool_input":{"command":"cat .env;echo ok"}}' | npx burnoff-pretool
|
|
60
67
|
[Burnoff DET-02 Secret & Credential Boundary] Access to sensitive credential path ".env" is blocked. (.env.example / .env.sample are permitted.)
|
|
61
|
-
|
|
68
|
+
exit=2
|
|
62
69
|
```
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
## Measured Hook Latency & `Read`-Clamp Savings
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
### Burnoff PR Token & Cost Attribution (`HEAD~1..HEAD`)
|
|
73
|
+
Measured directly on **Windows (`win32`, Node `v25.6.0`)** (reproduce locally with `npm run test:bench`):
|
|
68
74
|
|
|
69
|
-
|
|
|
70
|
-
| :--- | :--- |
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### Burnoff CI / PR Token-Budget Gate: **FAIL** (`mode: enforce`)
|
|
80
|
-
|
|
81
|
-
| Check | Actual | Limit | Status |
|
|
82
|
-
| :--- | :---: | :---: | :---: |
|
|
83
|
-
| `MAX_PR_COST_USD` | `$0.0000` | `<=$15.00` | **PASS** |
|
|
84
|
-
| `MAX_PR_TOKENS` | `0` | `<=1,500,000` | **PASS** |
|
|
85
|
-
| `MIN_CACHE_HIT_PCT` | `0%` | `>=50%` | **PASS** |
|
|
86
|
-
| `MAX_WASTE_RATIO_PCT` | `0%` | `<=35%` | **PASS** |
|
|
87
|
-
| `MAX_RING0_VIOLATIONS` | `1` | `<=0` | **FAIL** |
|
|
88
|
-
|
|
89
|
-
#### Notices
|
|
90
|
-
|
|
91
|
-
- **MISSING_TRANSCRIPTS**: No Claude Code session transcripts matched this PR window (0 tokens attributed). Upload .burnoff-ci/provider-usage.json or session transcripts, or set failOnMissingTranscripts: true to enforce.
|
|
92
|
-
```
|
|
75
|
+
| Hook / Path | Mode | Median (`p50`) | Notes |
|
|
76
|
+
| :--- | :--- | :---: | :--- |
|
|
77
|
+
| `hooks/pre-tool-use.mjs` | Cold CLI spawn (`n=5`) | `102.4 ms` | Synchronous named-pipe bailout on cold start (`112.0 ms` p50 over 10 runs in `test:bench`) |
|
|
78
|
+
| `hooks/pre-tool-use.mjs` | Warm daemon CLI / RPC (`n=10`) | `97.2 ms` CLI / `1.34 ms` RPC | Over warm IPC (`burnoff daemon start`) |
|
|
79
|
+
| `hooks/post-tool-use.mjs` | Cold CLI spawn (`n=5`) | `136.4 ms` | `POST_TOOL_MATCHER` excludes `Grep\|Glob` |
|
|
80
|
+
|
|
81
|
+
Example measured `Read`-clamp (`DET-06`) run on an 800-line, `72,000`-byte (`~18,000` est. tokens) log file (`APP_SERVER.log`):
|
|
82
|
+
|
|
83
|
+
- **Before clamp:** `800` lines / `72,000` bytes (`~18,000` est. tokens).
|
|
84
|
+
- **After `PreToolUse` `updatedInput` (`offset: 1, limit: 182`):** `182` lines / `16,379` bytes (`~4,095` est. tokens) — **`~13,906` est. tokens (`77.3%`) saved** in a single intercepted `Read` while respecting the `16 KB` (`16,384` B) ceiling.
|
|
93
85
|
|
|
94
86
|
## Local-Only Trust & Privacy
|
|
95
87
|
|
|
96
|
-
Burnoff runs 100% locally via
|
|
88
|
+
Burnoff runs 100% locally via hook subprocesses and local CLI commands:
|
|
97
89
|
|
|
98
90
|
- **Zero outbound network calls & zero proxy/MITM:** Your prompts, source code, and credentials never leave your machine.
|
|
99
91
|
- **Exact paths touched:**
|
|
100
|
-
- `~/.burnoff/` (or `$BURNOFF_HOME`): savings ledger,
|
|
101
|
-
- `.claude/settings.local.json`: repo-local hook wiring only (never modifies shared `.claude/settings.json`).
|
|
102
|
-
- `.
|
|
92
|
+
- `~/.burnoff/` (or `$BURNOFF_HOME`): savings ledger, FTS5/JSON CLI log archive, and optional local warm daemon socket/pipe.
|
|
93
|
+
- `.claude/settings.local.json`: repo-local Claude Code hook wiring only (never modifies shared `.claude/settings.json`).
|
|
94
|
+
- `.claude/cache/` and `.claude/locks/`: session loop-breaker state, read-interval snapshots, lockfiles, and offloaded `>=4k`-token tool output artifacts (`.claude/cache/artifacts/burnoff_<sha256>.txt`, pruned via `npx burnoff doctor --gc`).
|
|
95
|
+
- `.agents/hooks.json` (project) or `~/.gemini/config/hooks.json` (global): written only when `--client antigravity` or `--client both` is passed.
|
|
96
|
+
- `.git/info/exclude`: privately ignores Burnoff's local files so `git status` stays spotless without touching `.gitignore`.
|
|
103
97
|
|
|
104
98
|
## CLI Commands
|
|
105
99
|
|
|
106
100
|
| Command | Purpose |
|
|
107
101
|
| :--- | :--- |
|
|
108
|
-
| `burnoff init [--dry-run]` | Wire `PreToolUse` and `
|
|
102
|
+
| `burnoff init [--dry-run]` | Wire `PreToolUse`, `PostToolUse`, and `PostToolUseFailure` hooks and update `.git/info/exclude`. |
|
|
109
103
|
| `burnoff uninstall [--dry-run]` | Remove Burnoff hooks and `.git/info/exclude` block. |
|
|
110
104
|
| `burnoff doctor [--gc] [--json]` | Inspect Node/SQLite FTS5, `.burnoff.yaml`, hook wiring, warm daemon, ledger, and prune >14d caches with `--gc`. |
|
|
111
105
|
| `burnoff audit --startup [--json]` | Run the Turn-0 startup config linter across `.mcp.json`, Claude Code settings, and rule files. |
|
|
112
|
-
| `burnoff audit [--session <file>] [--json]` | Parse
|
|
106
|
+
| `burnoff audit [--session <file>] [--json]` | Parse local JSONL transcripts (`~/.claude/projects/`) and report per-session cost, cache hit %, and >200k-cliff turns. |
|
|
113
107
|
| `burnoff pr-cost [--base main] [--provider-usage file.json]` | Correlate `git log <base>..HEAD` commits with session spend and output Markdown or `burnoff-pr-attribution/v1` JSON. |
|
|
114
108
|
| `burnoff ci-gate --input pr-cost.json [--strict] [--github-annotations]` | Enforce `.burnoff.yaml` `ciBudgetGate` thresholds (`MAX_PR_COST_USD`, `MAX_PR_TOKENS`, `MIN_CACHE_HIT_PCT`, `MAX_WASTE_RATIO_PCT`, `MAX_RING0_VIOLATIONS`). |
|
|
115
|
-
| `burnoff team-digest [--days 7]` | Output a 5-line weekly
|
|
109
|
+
| `burnoff team-digest [--days 7]` | Output a 5-line weekly summary of local spend, cache efficiency, top cost driver, and guard savings. |
|
|
116
110
|
| `burnoff search <turnId> [keyword]` | Search archived FTS5 CLI output without re-running expensive test or build commands. |
|
|
117
111
|
| `burnoff daemon <start\|stop\|status>` | Manage the workspace-scoped warm IPC daemon (`~/.burnoff/run/` or Windows named pipe). |
|
|
118
112
|
|
|
119
|
-
##
|
|
113
|
+
## For Teams: Repo Policy & GitHub Actions
|
|
120
114
|
|
|
121
|
-
|
|
115
|
+
Commit an optional `.burnoff.yaml` in your repository root so every developer shares the same deterministic guardrails, read bounds, and CI gate thresholds:
|
|
122
116
|
|
|
123
117
|
```yaml
|
|
124
118
|
guards:
|
|
@@ -126,6 +120,11 @@ guards:
|
|
|
126
120
|
det04Threshold: 3
|
|
127
121
|
strictTestIntegrity: false
|
|
128
122
|
scopeLockEnabled: true
|
|
123
|
+
subagentFanoutEnabled: true
|
|
124
|
+
subagentFanoutAction: advisory
|
|
125
|
+
subagentMaxBurstCount: 4
|
|
126
|
+
subagentBurstWindowSec: 60
|
|
127
|
+
subagentMaxPromptChars: 8000
|
|
129
128
|
|
|
130
129
|
readClamp:
|
|
131
130
|
enabled: true
|
|
@@ -148,24 +147,40 @@ ciBudgetGate:
|
|
|
148
147
|
failOnMissingTranscripts: false
|
|
149
148
|
```
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
See [`.github/workflows/burnoff-pr-gate.yml`](.github/workflows/burnoff-pr-gate.yml) for a SHA-pinned, least-privilege (`permissions: contents: read`) workflow built for `burnoff@1.3.0`:
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- Runs `npx -y burnoff@1.1.0 pr-cost` (automatically passing `--provider-usage .burnoff-ci/provider-usage.json` when present) to produce `.burnoff-ci/pr-cost.json` and `.burnoff-ci/pr-cost.md`.
|
|
156
|
-
- Runs `npx -y burnoff@1.1.0 ci-gate --input .burnoff-ci/pr-cost.json --strict --github-annotations`.
|
|
152
|
+
- Runs `npx -y burnoff@1.3.0 pr-cost` (automatically passing `--provider-usage .burnoff-ci/provider-usage.json` when present) to produce `.burnoff-ci/pr-cost.json` and `.burnoff-ci/pr-cost.md`.
|
|
153
|
+
- Runs `npx -y burnoff@1.3.0 ci-gate --input .burnoff-ci/pr-cost.json --strict --github-annotations`.
|
|
157
154
|
- Appends the Markdown breakdown to `$GITHUB_STEP_SUMMARY` and posts non-fork PR summary comments.
|
|
158
155
|
|
|
159
|
-
|
|
156
|
+
> **Note on CI runners:** Ephemeral GitHub Actions runners do not have access to developers' local `~/.claude/projects/` transcripts. `failOnMissingTranscripts` automatically defaults to `true` when `CI` or `GITHUB_ACTIONS` is set (unless explicitly overridden in `.burnoff.yaml`), so upload `.burnoff-ci/provider-usage.json` or session transcripts before running `pr-cost` to enforce budgets cleanly.
|
|
157
|
+
|
|
158
|
+
## Turn-0 CI Config Linting (`audit --startup --ci`)
|
|
159
|
+
|
|
160
|
+
See [`.github/workflows/burnoff-startup-lint.yml`](.github/workflows/burnoff-startup-lint.yml) for a SHA-pinned, repo-local workflow that lints `CLAUDE.md`, `GEMINI.md`, `.claude/**`, `.agents/**`, `.mcp.json`, and `.burnoff.yaml` on PRs without touching runner home directories:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npx -y burnoff@1.3.0 audit --startup --ci --github-annotations --client auto
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Pass `--strict` to fail the workflow on warn-level lints as well as error-level secret/deprecated-model findings.
|
|
167
|
+
|
|
168
|
+
## Temporary `ask` Overrides (`allow-once` & `snooze`)
|
|
169
|
+
|
|
170
|
+
When an interactive `ask` prompt (`DET-01` soft discard, `DET-02` public-cert/arg check, `DET-03` lockfile/workflow edit, or `DET-04` warn-mode loop pause) blocks an intentional action:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx -y burnoff@1.3.0 allow-once DET-03 --scope deploy.yml
|
|
174
|
+
npx -y burnoff@1.3.0 snooze DET-04 --minutes 15
|
|
175
|
+
npx -y burnoff@1.3.0 allow-once --list
|
|
176
|
+
npx -y burnoff@1.3.0 allow-once --clear
|
|
177
|
+
```
|
|
160
178
|
|
|
161
|
-
|
|
179
|
+
`allow-once` and `snooze` apply strictly to `ask` verdicts — Ring-0 `deny` / `exitCode: 2` hard blocks (`git push --force`, `.env`/credential reads, `strict`-mode blocks) are never bypassed.
|
|
162
180
|
|
|
163
|
-
|
|
164
|
-
- **Org-Wide Governance:** Centralized `.burnoff.yaml` policy enforcement and branch-protection status checks across all repositories.
|
|
165
|
-
- **Provider Billing Reconciliation:** Automated Anthropic Admin API, AWS Bedrock, and Google Vertex AI invoice reconciliation against PR attribution.
|
|
166
|
-
- **Executive Reporting:** Scheduled Slack weekly Engineering Manager digests (`team-digest`) and cache-efficiency alerts.
|
|
181
|
+
## Claude Code Plugin & Status Line
|
|
167
182
|
|
|
168
|
-
|
|
183
|
+
Burnoff includes `.claude-plugin/plugin.json`, the `/burnoff` slash command (`commands/burnoff.md`), and a fail-silent terminal status-line script (`scripts/burnoff-statusline.mjs`). See [`docs/CLAUDE_CODE_PLUGIN.md`](docs/CLAUDE_CODE_PLUGIN.md) for setup and [`docs/DESIGN_PARTNER_INTAKE.md`](docs/DESIGN_PARTNER_INTAKE.md) for the private MIT design-partner intake form.
|
|
169
184
|
|
|
170
185
|
## Environment Variables
|
|
171
186
|
|