Skip to main content
monogram boot reconstructs the initialization sequence that Monogram can observe from an indexed JavaScript/TypeScript application. It connects import order, global registration, DOM event handlers, configured priority arrays, and guarded initialization paths, then routes each finding back into the ordinary graph commands. Documents the public OpenCLIs release monogram 0.98.6.

Quick start

Override the entry file without changing configuration:

What the trace answers

  • Which ESM modules evaluate before the entry point completes?
  • Which window.* globals and event handlers are registered, and from where?
  • In what import-registration order do DOMContentLoaded handlers appear?
  • Which configured initializer objects run by priority?
  • Which configured init functions are guarded by bootstrap flags?
The result is index-observed evidence. Dynamic imports, runtime-generated handlers, dependency injection, and browser behavior outside the indexed source may require a live MonoSurf observation as a second proof layer.

Phase 1: ESM evaluation

Monogram walks the indexed import graph from the entry and reports module evaluation order with relevant registration events.
Typical rows:

Phase 2: DOM handlers

DOMContentLoaded handlers are shown in the registration order implied by module evaluation, with calls made by each handler.
This proves the indexed registration path. It does not claim that asynchronous work inside the handlers finishes in the same order.

Phase 3: configured priorities

When .monogram/boot.toml describes a priority array, Monogram reads its objects and displays the initialization order.
This phase needs configuration because object-field conventions differ across projects.

Phase 4: configured guards

Guard rules identify candidate init functions whose execution is controlled by bootstrap flags.
A guard match is a static candidate, not proof that the runtime branch is always unreachable. Confirm the flag’s writers and callers with grep, provenance, context, and chain.

Configuration

Generate it

The command detects likely entry files, arrays containing repeated priority fields, and init-style functions with window-flag guards. It writes:
Example:

Refine it manually

Keep patterns project-relative and narrow enough that a match has one understandable owner.

Drill from boot into structural proof

Boot is the overview; use the regular commands for the owning path.
Keep filtering and bounded context inside Monogram so the [NEXT] trail retains the file, graph, and rank evidence.

CLI and MCP boundary

MONOGRAM_PREPARED_INDEX=1 blocks non-JSON boot init with the protected-index guard. Read-only tracing remains available against the prepared snapshot.

Verification flow

If the runtime order itself matters, add a browser/runtime trace after the source proof. Keep the two conclusions separate: Monogram shows the indexed initialization structure; the live browser proves what actually executed in that run.