@recallnet/remark-lint-docs-reachability
v0.2.5
Published
Remark plugin that flags markdown docs not reachable from policy roots.
Readme
@recallnet/remark-lint-docs-reachability
Flags in-scope Markdown documents that are not reachable from policy-defined roots.
Install
npm install -D remark @recallnet/remark-lint-docs-reachabilityUse
import { remark } from "remark";
import remarkLintDocsReachability from "@recallnet/remark-lint-docs-reachability";
await remark()
.use(remarkLintDocsReachability, {
cwd: process.cwd(),
policyPath: "./docs/docs-policy.json",
})
.process({
path: "docs/architecture/cache.md",
value: "# Cache\n",
});What It Checks
- all in-scope Markdown files matched by
in_scope_paths - graph roots declared by docs policy
- repo-local Markdown links between in-scope docs
- policy allowlists for roots, legacy docs, and orphan exclusions
The rule reports messages such as:
Document is not reachable from policy roots: docs/architecture/orphan.mdOptions
cwdRepository root used to resolve the docs policy and scan in-scope docs.policyPathPath to the docs policy file relative tocwd. Defaults todocs/docs-policy.json.
Notes
- External links are ignored. Reachability is only about repo-owned docs.
- Missing local link targets are ignored here; link correctness belongs to
remark-validate-links. - Broken symlinks outside the docs graph are skipped instead of crashing the scan.
This package intentionally complements:
remark-validate-linksfor link validityremark-lint-frontmatter-schemafor frontmatter schema checks@recallnet/remark-lint-docs-taxonomyfor path and filename enforcement
