Skip to main content
Monogram’s audit layer asks whether code is connected, contract-complete, and worth deeper review. It does not turn ranked candidates into automatic verdicts. Every meaningful finding should return to line-numbered source and the owning call/boundary path before a change is made. Documents the public OpenCLIs release monogram 0.98.6. For the complete 50-tool list, see Monogram Reference.

Proof discipline

  • ORPHAN_*, uncalled, semantic rows, and possibility bands are observed evidence, not deletion or bug orders.
  • Search and audit ranks help choose where to look; they do not establish cause.
  • Deep commands are trustworthy only after monogram semantic status confirms a current semantic companion.
  • --score-debug explains ranking evidence; it does not increase the certainty of a structural finding.
  • Broad JSON outputs may be summary-first. Narrow with the emitted next_hint, --pattern, --category, --file, or --lang before requesting sites.

Contract audits

Public requirement preflight

spec-audit extracts public edge bands and source probes before implementation search. sequence keeps the contract investigation stateful and joins the selected bands, IAW-SOP gates, structural forks, and embedded fix-shape knowledge. sequence define writes connection-points.md; follow its binding ORDER chain and review it as a proof plan, not generated truth. After the final Edit/Write and test, sequence finish re-presents the saved task contract and Book section, writes the close witness, and sets the session phase to finished. Make no source mutation after that close; if a gate is unproved, prove it and run finish again.

Format-language contract gate

Use format-trace first when a task is owned by a reference graph, schema scope, branch semantics, generated runtime behavior, normalization, or round trip. Public planes are json-schema, openapi, openapi-yaml, hcl, and cargo-toml. JSON Schema output can identify $defs/$ref edges, cycles, converter re-entry, lost root context, runtime binding risks, and required positive/negative probes. Do not close work while completion_gate is BLOCKED or a required coverage row remains unproved.

Boundary and structural audits

monogram coupling

Joins client/caller keys to definitions across language, process, and protocol boundaries.
--verify-callers adds an inbound call-edge count to orphan definitions. Zero is stronger evidence for dead surface; one or more suggests internal or dynamic use. Neither result replaces source review. monogram bridges provides the resolved semantic view of frontend Tauri invokes and backend commands.

monogram trace versus monogram investigate

trace returns a bounded definition/caller/callee view and suggests a coupling boundary. investigate runs that boundary in the same report and identifies the highest fan-in edit anchor. Prefer investigate when a review must demonstrate the structural and cross-boundary path together.

monogram important

Classifies CSS !important rules into redundant, needed, vendor/runtime override, and conflicting families.
report aggregates hotspots and conflict pairs; migrate produces refactor plans. Monogram is report-only: there is no --apply. Selector text cannot prove DOM overlap, so each proposed removal needs source/DOM review.

monogram errors

Categorizes Rust and TypeScript build errors and joins each error to its containing symbol and impact radius.
Without --from or --stdin, errors runs the relevant compiler (cargo check or tsc) and may write ordinary build artifacts even though it does not edit source. Categories include merge conflict, missing resource, unresolved import, syntax, type, trait-bound, borrow-check, and frontend distribution failures.

monogram metrics, monogram uncalled, and monogram unused-imports

  • metrics reports length, parameters, fan-in/out, depth, recursion, and coupling hotspots.
  • uncalled reports functions with no inbound indexed call edge. --dead adds internally unreachable evidence from the deep graph.
  • unused-imports reports names that appear only on their own import line; JSX, re-export, type, and code uses count as used.
These are review candidates. Dynamic dispatch, public APIs, reflection, generated calls, and tests can sit outside the observed edge set.

Deep semantic plane

Build and verify the companion first:
The semantic plane is observed-only (ranking_ready=false in semantic reports). It complements the core trigram/call index; it does not replace reading source. Example flow:

The 14 possibility-band commands

These MCP/CLI commands are explicit review surfaces. Some are false-positive-leaning candidates; others are complete Tier-0 worklists. Presence never means “confirmed bug.”
The stable proof path is:

Book attachments

Navigation commands can attach curated vulnerability/fix knowledge with --bands:
Text output prints an executable monograph read only when the standalone Monograph companion is available. JSON preserves all matching Book IDs. The attached Book entry explains a known pattern; the source and call/boundary evidence decide whether it applies here.

Mutation and execution boundaries

For database selection, fail-closed deep state, and cleanup previews, continue to Scope & Index Management.