.sightmap/ corpus. snapshot observes a page — it prints an annotated tree and coverage, and never touches the corpus. capture persists a capture into the matched view’s set, subject to the novelty gate. inspect shows the unfiltered DOM structure for selector authoring.
All three commands need a running browser session. Start one with
sightmap browser start; see Browser session. Use Coverage commands to score saved captures, View sets to understand their layout and maintenance, and selector tools to verify a selector before adding it to YAML.snapshot
Connects to Chrome, extracts the component tree, applies the corpus, and emits an annotated ARIA tree with coverage statistics to stdout (or to --out FILE). snapshot is a pure observe command: it never writes into the corpus’s capture set and never applies the novelty gate. Persisting a capture is capture’s job.
The output contains a [View: ...] header when the URL matches a view, a [Guide] with match counts by component, the component tree, and a [Coverage] summary. [Warnings] lists declared components that matched no nodes. [Conflicts] flags runtime ambiguities: two or more views matching this URL at equal specificity (declaration order picked the winner), and any single DOM node matched by more than one component (first-match-wins kept only one, which also explains a component that otherwise looks like it matched zero nodes). When a corpus is loaded but no view’s route matches the URL (for example after an auth redirect), the header is replaced by a [No view matched] <url> notice so you know the page is off the map. The [Coverage] summary is printed whenever a corpus is applied — even for a matched view with no components yet, where every interactive node reads as an orphan — so the snapshot --coverage bootstrap always has something to iterate on.
Each tree line starts with a numeric probe ID, then the node content:
- Matched nodes render as
ID [ComponentName prop="val"]. The component name replaces the ARIA role, properties are sorted alphabetically, and the accessible name appears last unless it duplicates a property value. - Unmatched nodes render as
ID role "text"with the ARIA role and accessible name.
Snapshot excerpt
--coverage gives a terse feedback view — the same [View], [Warnings], and [Coverage] sections plus the T3/T2 cluster traces, with the (potentially huge) tree suppressed. It is the fastest way to read a page’s coverage while authoring:
sel-probe before writing YAML, add the component, then run snapshot --coverage again. Repeat until the coverage line reads 0 orphaned T3 ✓.
--tree-out writes the raw component tree used by coverage, multi-coverage, and sel-check. --json writes an annotated version that adds matched component names, memory notes, and extracted property values. Both flags require a file path. --out writes the rendered annotated output to an arbitrary file — this is a plain file write, unrelated to the corpus view set.
capture
Extracts the component tree exactly as snapshot does, then persists it into the matched view’s set at .sightmap/snapshots/{view}/{stamp}.snap, writing a sibling .snap.tree.json. capture requires a view: a page with no matching route is an error (use snapshot to observe an unmapped page). Success prints a one-line confirmation and coverage summary to stderr.
A view is a set of captures, not a single file — real pages are non-deterministic. capture appends rather than overwrites, and the novelty gate keeps a capture only when it adds a matched component type or an orphan slot that does not appear elsewhere in the set. Changes to values such as products, prices, or copy do not count. The first capture of a view always writes; --force bypasses the gate.
Flags:
--all navigates to each view’s top-level url and any snapshots[].url variants, appends a novelty-gated capture for each target, then prints a summary:
capture-novelty / capture-prune maintenance commands.
inspect
Renders the unfiltered DOM component tree with identifying attributes. Use it to find an anchor when you do not yet have a selector to pass to sel-probe.
Each line shows the probe ID, a CSS-selector-style display (tag#id[attr="value"]), and the accessible name when present. By default, it includes data-*, aria-*, role, type, href, name, for, action, src, and placeholder. Hidden and ignored nodes are marked [hidden] and [ignored]. A matched node carries a ★ComponentName annotation.
Flags:
Typical flow
1
Start a browser session
Run
sightmap browser start from the directory containing your .sightmap/ corpus. Confirm with sightmap browser status (see Browser session).2
Close coverage gaps on one page
Run
sightmap snapshot --coverage --url 'URL' and read the coverage line. For each unlabeled cluster, verify the suggested selector with sel-probe, add a component to your YAML, and run it again until 0 orphaned T3 ✓.3
Inspect when you need an anchor
When no suggestion fits, run
sightmap inspect --interactive to see the raw DOM with ★ marks on already-claimed nodes, and pick a stable attribute to build the selector from.4
Refresh the view sets
Run
sightmap capture --all to append a novelty-gated capture for every view URL in views/*.yaml, then score them offline with the coverage commands.