boundaries
propose: a model writes a boundaries file from censuses of the model, checked on receipt. audit: the precision per rule of the shipped boundaries-audit walk.
propose shows a model no code: counts over the graph — annotations by use, supertypes, the names of operations nothing calls, the types that hold them and their suffixes, the external code the model calls with its members, the files whose name says wiring. Two calls per language, one per half (inbound, outbound), each with a strict response schema. What comes back is checked before it is written:
- The names are given, not chosen. A key the census did not show, or a pattern that matches none of its names, is dropped and listed.
- Every rule is run. A rule that finds no row is dropped and listed; an
operationsortypesrule taking more than a quarter of the uncalled operations is kept and flagged broad, to audit. - A person’s file is never overwritten. The file’s
proposalheader holds the digest of what was proposed. A file at--outthat no longer digests to it (or has none, or is not JSON) is left as it is: the proposal is written beside it asFILE.proposed, and the diff is printed on stdout.
Synopsis
codegraph boundaries <propose|audit> [model.jsonl] [--out FILE] [--name NAME] [--provider <auto|openrouter|cloudflare|claude-code>] [--claude-path FILE] [--model SLUG] [--max-tokens N] [--boundaries FILE] [--store FILE] [--per-rule N] [--threshold P] [--no-cache] [--dry-run] [--estimate] [--price-in USD] [--price-out USD] [--yes] [--json]Arguments
| Argument | Meaning | Default |
|---|---|---|
<propose|audit> | propose: show a model the censuses and write the boundaries file it answers; audit: read the boundaries-audit walk’s store as a precision per rule. | — |
[model.jsonl] | The model, of one language. | <current-dir>-codegraph.jsonl |
Options
| Option | Meaning | Default |
|---|---|---|
--out FILE | propose: the boundaries file to write; a file a person wrote or edited is never replaced (FILE.proposed and a diff instead). | <model>.boundaries.json |
--name NAME | propose: the file’s name key. | proposed |
--provider NAME | propose: where the two calls go, as for walk. | auto |
--claude-path FILE | propose: the Claude Code binary. | — |
--model SLUG | propose: the model slug. | per provider |
--max-tokens N | propose: cap on the tokens one answer may use. | — |
--boundaries FILE | audit, required: the boundaries file the audit walk was run with. | — |
--store FILE | audit: the walk’s store. | <model>.boundaries-audit.walk.db |
--per-rule N | audit: rows sampled per rule; the shipped walk’s sample.perRule. | 5 |
--threshold P | audit: a rule whose precision is below this is listed for removal. | 0.8 |
--no-cache | Read the model.jsonl directly; never build or reuse a sibling model.db. | — |
--dry-run | propose: print the two prompts as they would be sent, and make no call. | — |
--estimate | propose: print the calls and the token volume, and make no call. | — |
--price-in USD, --price-out USD | propose: per million tokens, for the estimate’s cost line. | — |
-y, --yes | propose: run without asking. Otherwise the estimate is printed and a yes is asked for, which needs a terminal. | — |
--json | One machine-readable document on stdout. | — |
Each verb refuses the other’s flags.
The audit
The shipped walk plugin/walks/boundaries-audit.json asks, of 5 rows per inbound rule sampled by a hash of the ids (the same on every run), whether the entity is an entry point, of which kind, and at which shown line it is wired. Its prompt names no rule. boundaries audit then prints, per rule, the rows sampled, the answers yes, no and unsure, how many confirmed rows agree with the rule’s kind, and the precision yes / (yes + no). A rule under the threshold is listed for removal: nothing is rewritten, the file is yours to edit.
codegraph boundaries propose model.jsonl --estimate
codegraph boundaries propose model.jsonl --out proposed.boundaries.json
codegraph walk model.jsonl --walk plugin/walks/boundaries-audit.json --boundaries proposed.boundaries.json --estimate
codegraph boundaries audit model.jsonl --boundaries proposed.boundaries.jsonExit codes
0 ok · 1 internal error (a bug) · 2 usage error · 3 findings.
A model of several languages, an answer that does not follow its schema, a run with calls and no terminal to confirm on without --yes, and audit without its store are usage errors. A proposal written beside a person’s file is not an error.
Example
$ codegraph boundaries propose fixtures/elixir/expected/model.jsonl --estimate --price-in 0.10 --price-out 0.60
boundaries propose (ex): 2 model calls, one per half; writes fixtures/elixir/expected/model.boundaries.json
census: 36 uncalled operations; annotations 0, supertypes 4, operation names 32, types 21, suffixes 18, stubs 15, containers 2, wiring files 2
model: openai/gpt-5.6-luna (openrouter)
call input tokens output tokens
inbound 1 421 1 500
outbound 910 1 500
total 2 331 3 000
cost at $0.1/M in, $0.6/M out: $0.0020
input ≈ system, census and schema at 4 characters per token; output ≈ 1500 per call, assumed, not measured.