See what a change affects
Before editing a page, the question is what depends on it. Grep answers part of it: which pages link here by path. It misses the page that reaches this one through a shared concept. It also misses the page that links to a heading you are about to rename.
manni graph traverse answers the whole question, because it walks edges rather
than matching text.
This is Maya’s page, M19.
What reaches this page
Section titled “What reaches this page”$ manni graph traverse https://example.com/dd/doc/docs/configuration.md --reversehttps://example.com/dd/doc/docs/configuration.md — Configuration https://example.com/dd/doc/docs/getting-started.md — Getting started https://example.com/dd/activity/build
3 nodes, 2 hops, 0 excluded--reverse follows inbound edges: who points at this node. One hop, which is
the default depth, so this is the direct answer: the pages that link here or
name the same concept.
The build activity is in the list because the graph records what produced it.
Narrow with --predicates when the provenance nodes are noise (below).
Transitive reach
Section titled “Transitive reach”$ manni graph traverse <page IRI> --impact--impact is transitive inbound reach: what a change here affects, not just
what points at it directly. It raises the default depth from 1 to 3. The
interesting answer is two or three hops out: the page that links to the page
that shares your concept.
Read the count line. 3 nodes, 5 hops, 0 excluded says how much of the graph
was reached and how many edges were walked to reach it. A page with a large
impact set is a page to change carefully, and that is the sentence the command
exists to produce.
Controlling the walk
Section titled “Controlling the walk”| Flag | What it does |
|---|---|
-d, --depth <n> | Maximum hops. Default 1, or 3 under --impact. 0 is allowed and means the node itself, which is a real answer. |
--reverse | Follow inbound edges instead of outbound. |
--impact | Transitive inbound reach, with depth 3. |
--predicates <list> | Only follow these predicates, comma-separated and given once. |
--limit <n> | Stop after this many nodes. |
Depth is the knob that matters. Depth 2 on a small corpus already reaches sections, concepts, agents and the scheme:
$ manni graph traverse <page IRI> --depth 2...18 nodes, 25 hops, 0 excludedThat is the whole neighbourhood, which is rarely the question. Narrow it:
$ manni graph traverse <page IRI> --predicates dcterms:subjecthttps://example.com/dd/doc/docs/configuration.md — Configuration https://example.com/dd/concept/reference
2 nodes, 1 hop, 0 excludedA CURIE holds no comma, so --predicates is comma-separated and given once.
Useful sets:
dcterms:references, hyperlinks only. The grep answer, but correct about extensionless and index paths.dcterms:subject, shared concepts. The edges grep cannot see.dcterms:hasPart, the page’s own sections.
Scoping
Section titled “Scoping”Three filters narrow the walk to one slice of a multi-product, multi-locale corpus:
| Flag | What it filters on |
|---|---|
--variant <variant> | A product variant, by IRI, title, or slug. |
--software-subject <subject> | A software subject. |
--lang <tag> | A BCP-47 language tag, matched in any case. |
The count line’s excluded number is how many nodes the scope removed. A walk
that reports 0 excluded with a filter set means the filter matched nothing,
which is usually a spelling rather than an empty answer.
Finding the node to start from
Section titled “Finding the node to start from”traverse takes an IRI or a CURIE, not a file path. Two ways to get one:
$ manni graph search "configuration" --limit 5$ manni graph query --object "Configuration"Or read it off the pattern. A document node is the base IRI plus doc/ plus
the repository-relative path. With graph.baseIri: https://example.com/dd/, the
page docs/configuration.md is
https://example.com/dd/doc/docs/configuration.md.
In a review
Section titled “In a review”The value of this is that the comment “this breaks the install tutorial” arrives before the change, from your own terminal. Two habits:
- Before a rename,
--reverseon the page, andgraph statsafter it. A rename that orphans a page shows up in the orphan list; one that breaks an anchor shows up under broken section refs. - Before splitting a page,
--depth 2 --predicates dcterms:subject, to see which concepts the page currently owns and therefore what the split has to keep owning.
Related
Section titled “Related”- Explore the graph, for the other questions: orphans, concepts, coverage.
- CLI reference, for every flag.
- Run it in CI, where the broken links this finds become a gate.