A lola module with two skills for keeping technical project documentation on track, current, and consistent. Nothing auto-invokes — every behavior is reached through an explicit slash command.
Status: pre-1.0; see
CHANGELOG.md for releases. Maintained by the
lolables organization.
🤖 LLM/AI WARNING 🤖
This project was written with LLM (AI) assistance.
docs-discipline ships two independent skills for AI coding assistants:
- docs-organization — manages README and
docs/layout, detects drift between code and documentation, validates mermaid diagrams against a house style (palette + WCAG contrast). - adr — manages Architectural Decision Records in the MADR 4.0 format, with an inline self-review pass on creation and a review pass on demand, run by a context-isolated subagent.
Behavior reaches the agent only through six explicit slash commands:
/docs-init, /docs-audit, /docs-update, /diagram-test, /adr-new,
/adr-review.
Prerequisites: git, Node.js 20 or newer, bash 4 or newer, and
uv. If you lack
uv, install it with Astral's script:
curl -LsSf https://astral.sh/uv/install.sh | sh-
Install lola once:
uv tool install git+https://github.com/LobsterTrap/[email protected]
-
Register and install this module:
lola mod add -n docs-discipline https://github.com/lolables/lola-mod-project-docs.git lola install docs-discipline -a claude-code --scope user
That is the whole install: the module's npm dependencies ship pre-bundled,
so there is no npm install and no follow-up step. Version pins, macOS
bash, scripted installs, and uninstall are in
Getting started.
In a project with the module installed, type these into your AI assistant's prompt (they are slash commands, not shell commands):
-
/docs-init— scaffold README,docs/, and.gitignore. -
/docs-audit— find drift between code and docs (read-only). -
/docs-update— apply the audit's fixes interactively. Every audit saves its report under$XDG_CACHE_HOME/docs-audit/(default~/.cache/docs-audit/) and ends with aReport saved:line. An audit with more than 50 findings prints only its Blockers; pass the saved path, as itsFull report:line shows:/docs-update ~/.cache/docs-audit/4f9c1a07be52/20261111-093012-Hq2xZa/report.md. A re-run reuses the earlier Lane 6 results whose inputs did not change, and the report'sMode:line says how many (Lane 6: 24 jobs, 21 from cache). Limits:- After you switch the subagent model, or when a result looks wrong, run
/docs-audit --no-cache. - With
--fetch, cited-source drift checks always re-run. DOCS_AUDIT_SESSION_CACHE_MAXof 0 or 1 turns reuse off.
A docs repo that holds no code of its own can name the checkouts it describes:
/docs-audit --code-root ../api --code-root ../workerDrift findings then cite code by root number (
root 2: src/cli.py:40), never by repo name. A claim the roots do not cover is "not verifiable", not drift. A path that is not a git checkout reportsCODE_ROOT_MISSINGand skips drift. Staleness stays unassessed in a docs-only repo. - After you switch the subagent model, or when a result looks wrong, run
-
/diagram-test— lint every mermaid diagram. -
/adr-new "Use Postgres for primary storage"— draft an ADR with an inline self-review. It writes anNNNN-*.mdfile underdocs/dev/adr/(ordocs/adr/if that directory already exists), numbered with the next free four digits. -
/adr-review 0001— independent rubric review of that ADR; pass the number from its filename.
Everything else you can do, such as auditing one file, is in Getting started.
Want a different diagram palette? See Diagram palettes.
- Top-level
README.mdalways self-sufficient for basic user onboarding. - Developer documentation under
docs/dev/. docs/superpowers/— working specs and plans that planning skills such as superpowers write there — is in.gitignoreand never committed (checked once adocs/tree exists; a repo without one isn't using it yet).- ADRs in
docs/dev/adr/(ordocs/adr/for legacy layouts). - Every mermaid diagram begins with the house-style init header (the
%%{init}%%block for one of the four palettes in Diagram palettes) and uses palette classes with WCAG-verified contrast. - Every reader has a door. The README links each reader's entry point that
exists (
docs/usage/,docs/dev/,SECURITY.md,LICENSE, …), every page underdocs/is reachable from the README and links back, and the README carries aStatusline.
Markdown and AsciiDoc, each with its own README name. Every check —
structure, staleness, readability, references, content-drift chunking,
citations, mermaid lint, and palette swap — runs on both. See
reference/supported-formats.md
for the exact extensions and README names each format claims.
In AsciiDoc, mermaid diagrams are [mermaid] or [source,mermaid] blocks,
and the scripts check include:: targets exist but never read them.
/docs-init writes Markdown templates and leaves an existing README.adoc
alone.
- Using the module: Getting started and Diagram palettes.
- Maintainers and contributors:
docs/dev/architecture.md(how it works),docs/dev/maintaining.md(procedures),docs/dev/vendoring.md(bundled dependencies), anddocs/dev/project-structure.md(repository layout).AGENTS.mdholds the house-voice rules and protected names for AI assistants. - Operators:
CHANGELOG.mdlists what changed in each release. - Security:
SECURITY.mdexplains how to report a vulnerability. - Help:
SUPPORT.mdsays where to ask questions and report bugs. - For the lola module format: see https://lobstertrap.org/lola/
- For MADR: see https://adr.github.io/madr/
Apache License 2.0. See LICENSE.