A drift detection tool for documentation after the library split. Warns about stale paths, broken links, unknown namespaces, and invalid aliases.
# Via Clojure CLI (works in CI)
clojure -M:dev -m boundary.tools.docs-lint
# Via Babashka (faster, requires bb installed)
bb scripts/docs_lint.clj
# With options
clojure -M:dev -m boundary.tools.docs-lint --verbose
clojure -M:dev -m boundary.tools.docs-lint --out-dir custom/output
Reports are written to build/docs-lint/:
report.edn - structured data for toolingreport.txt - human-readable summaryValidates that relative links in markdown and asciidoc files point to existing files.
Example warning:
[broken-link] AGENTS.md - Broken link: docs/guides/module-scaffolding.md
Detects references to old paths from before the library split.
Example warning:
[stale-path] docs/AGENTS_FULL.md:494 - Pre-split path: code moved to libs/*/src/boundary/
Known stale patterns:
src/boundary/ → should be libs/*/src/boundary/test/boundary/ → should be libs/*/test/boundary/cd libs/<lib> && clojure → prefer root-level commandsWarns when docs reference boundary.* namespaces that don't exist in the codebase.
Example warning:
[unknown-namespace] AGENTS.md:44 - Unknown namespace reference: boundary.core.validation-test
Note: This is a heuristic check. Some warnings may be for:
Detects clojure -M:alias commands where the alias doesn't exist in deps.edn.
Example warning:
[unknown-alias] AGENTS.md:25 - Unknown deps.edn alias: :db/h2
Special cases handled:
:db/* aliases (database variants):core, :user, etc.)README.md, README.adoc (repo root)AGENTS.mddocs/**examples/**libs/*/README.md (library root READMEs only)**/src/**/README* (module READMEs inside code trees)build/**, target/**, .cpcache/**, .git/**The docs-lint runs automatically in CI as a warn-only job. It:
See .github/workflows/ci.yml for the job definition.
libs/{library}/src/... or libs/{library}/test/...deps.edn for the correct alias nameThe tool configuration is in the source file. Key settings:
;; Files to scan
(def include-patterns
["README.md" "AGENTS.md" "docs" "examples" ...])
;; Patterns to exclude
(def exclude-patterns
[#".*/src/.*/README.*" #"^build/.*" ...])
;; Stale path detection patterns
(def stale-path-patterns
[[#"src/boundary/" "Pre-split path: code moved to libs/*/src/boundary/"]
...])
To tune the linter, edit scripts/docs_lint.clj or dev/boundary/tools/docs_lint.clj.
The initial run after the library split will produce many warnings. To reduce noise:
README.md, AGENTS.mdstale-path-patterns if too noisyCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |