Boundaries — the external surface
Grep finds the string. This command adds direction, transport, and whether the name is a credential.
ctx-optimize boundariesboundaries: 73 ports
CONSUMES (what this system calls out to) config.env 28 · 28 external · 1 SENSITIVE · 3 dynamic OPENROUTER_API_KEY INFERRED SECRET proof/agent/agent.mjs:L28 (+1 sites) CTX_OPTIMIZE_STORE INFERRED internal/app/app_test.go:L49 (+3 sites) network.http 16 · 16 external api.github.com INFERRED internal/app/app.go:L3149 codeload.github.com INFERRED internal/app/manifests.go:L157 (+2 sites)
UNRESOLVED 3 ports carry a dynamic identifier — the SITE is certain, the value is notCONSUMES vs PROVIDES. Grouped by transport. Truncation is printed.
config.env
Section titled “config.env”Env names the code reads. KEY|TOKEN|SECRET|PASSWORD|_PW marked SECRET. Never the value.
network.http
Section titled “network.http”Hosts and routes: api.openai.com, /orders. Direction: consumes vs provides.
process.exec
Section titled “process.exec”Binaries the process spawns. A variable argv is AMBIGUOUS, not missing.
Narrowing it
Section titled “Narrowing it”ctx-optimize boundaries --sensitive # credentials onlyctx-optimize boundaries --direction provides # the routes we servectx-optimize boundaries --transport process.exec # what it shells out toctx-optimize boundaries --all # including dynamic identifiersctx-optimize boundaries --json # otel.* semconv keys pass through--json keeps OpenTelemetry names (otel.server.address, otel.http.route).
A value never enters the graph. sensitive is the name matching KEY|TOKEN|SECRET|PASSWORD|_PW.
Rules are JSON on the same AST walk. Tier comes from measured recall:
| recall | tier |
|---|---|
| ≥ 0.95 | EXTRACTED |
| 0.70 – 0.95 | INFERRED |
| < 0.70 | AMBIGUOUS, or reject the rule |
Most shipped rules were demoted by their own numbers.
Related verbs
Section titled “Related verbs”Where provides, consumes, and declared disagree. --strict is the CI gate.
services
Section titled “services”SDK egress from the manifest: stripe, openai, firebase become ports even with no host literal.
boundaries-verify
Section titled “boundaries-verify”boundaries verify re-runs each rule’s ground truth. Numbers only move up.
Authoring your own
Section titled “Authoring your own”Point your agent at the bundled boundaries-authoring reference and it will follow an
eight-step measured loop — survey, propose, ground, run, measure, iterate, tier, write —
emitting reviewed JSON into .ctxoptimize/boundaries.json. Repo rules merge over machine
rules over the shipped defaults, by rule id, so you can narrow or replace a default
without forking anything.