Skip to content

docs(entity-map): cli, format and cloud pages (#2098) - #345

Merged
nc9 merged 2 commits into
mainfrom
feat/2098-entity-map-docs
Sep 13, 2026
Merged

nc9 merged 2 commits into
mainfrom
feat/2098-entity-map-docs

Conversation

@nc9

@nc9 nc9 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Completes the Entity map nav group. index and fixing came with #338, mcp with #342; these are the three that were missing.

Implements the public half of the private squirrelscan/repo#2098 (epic section 11).

The pages

cli.mdx — where the map appears in each of the six report formats and what each actually carries, squirrel entities with every flag and format, the diff, and the three store tables with the queries worth knowing.

The point worth pulling out is the page cap. A node's pages array holds at most 50 entries with the rest in morePages, so "every page that declares this Organization" is answerable from entity_occurrences or from the document's own uncapped top-level page index, and never from the node's array. A 50-entry list looks exactly like a complete one.

format.mdx — the version 1 document, the JSON-LD export and the change set, with a real sample of each from an audit of docs.squirrelscan.com. Covers the four key shapes, which values can and cannot dangle, and why coverage on a gainedId row needs both of its halves.

cloud.mdx — the dashboard Entities page, its filters and exports, and the two API endpoints.

Two surface differences, documented rather than left to be discovered

Both found by fact-checking the pages against the code rather than by writing them:

  • The API's page filter is a prefix match; the CLI's and the MCP tools' is a substring match. The same filter gives different results on each.
  • A filtered API response keeps a whole-site summary and puts the filtered totals in meta.counts. squirrel entities does the opposite: its summary describes what survived the filter. A script reading summary.nodeCount after filtering gets a different number from each.

A hosted map is also a projection, capped at 750 entities and five declaring pages per node rather than the local 50, so the page-related caveats are sharper there.

One code change

--page's help text said "matching this URL or prefix". The implementation calls String.includes, so --page /blog has always matched /tag/blog too. Corrected to say what it does.

Verification

A codex pass fact-checked every claim, number, field name, flag and table row against the source. It found 18 errors, all fixed here: the database path, what the markdown and XML report sections really contain, the mermaid cap bounding declared nodes only, four key shapes rather than three, a sameAs string never dangling, unlisted properties being discarded rather than kept, pages being 2xx-only, and the API summary semantics above.

make validate passes. A filesystem link check over all 2,785 internal links in the docs tree finds one dead link, pre-existing and unrelated, filed as #344.

https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP

nc9 added 2 commits September 13, 2026 16:40
Completes the Entity map group: index and fixing from #338, mcp from #342, and
now the three that were missing.

**cli.mdx** — where the map appears in each of the six report formats and what
each one actually carries, `squirrel entities` with every flag and format, the
diff, and the three store tables with the queries worth knowing. The one worth
calling out is `entity_occurrences`: a node's `pages` array is capped at 50, so
"every page that declares this Organization" is answerable from that table or
from the document's own uncapped page index, and never from the node.

**format.mdx** — the version 1 document, the JSON-LD export and the change set,
with a real sample of each from an audit of docs.squirrelscan.com. Covers the
four key shapes, what can and cannot dangle, and why `coverage` on a gainedId
row needs both of its halves.

**cloud.mdx** — the dashboard Entities page, its filters and exports, and the
two API endpoints. Two differences from the local behaviour are documented
rather than left to be discovered: the API's `page` filter is a prefix match
where the CLI's is a substring match, and a filtered API response keeps a
whole-site `summary` with the filtered totals in `meta.counts`, which is the
opposite of what `squirrel entities` returns.

Also corrects `--page`'s own help text, which claimed a prefix match. It has
always been a substring match.

Every page cross-links the others. `make validate` passes, and a filesystem
link check over all 2,785 internal links finds none dead in this group.

Claude-Session: https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP
Signed-off-by: Nik Cubrilovic <[email protected]>
The flag's help text has always said "matching this URL or prefix". The
implementation calls `String.includes`, so `--page /blog` matches
`/tag/blog` too. Say what it does.

Claude-Session: https://claude.ai/code/session_01T8w822GqnrviVMytnAsKFP
Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the feat/2098-entity-map-docs branch from 20d2442 to 1ce474b Compare September 13, 2026 06:41
@nc9
nc9 merged commit 97d2a28 into main Sep 13, 2026
14 checks passed
@nc9
nc9 deleted the feat/2098-entity-map-docs branch September 13, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant