Maintenance
JanusLM includes a suite of tools for keeping the knowledge base healthy, consistent, and well-organized. All maintenance operations are recorded in the deterministic log system.
Maintenance commands

| Command | What it does |
|---|---|
| lint | Find orphan pages, broken wikilinks, missing entities, tag mismatches, content gaps |
| health | Structural integrity checks — empty pages, index sync, log coverage, tag validation |
| heal | Auto-fix issues found by health and lint (creates missing pages, repairs links) |
| stats | Wiki dashboard — page counts by type, tag distribution, link density |
| forget | Remove a project, entity, or concept from the wiki (with safety confirmation) |
| /scaffold | Check project structure and recreate any missing directories or scaffold files |
Heal mechanism
The heal command finds and fixes wiki problems: orphan pages, broken wikilinks, missing entities, tag mismatches, incomplete pages. It works as a persistent state machine — first it detects all issues and queues them, then the agent processes them in batches.
Progress is saved in heal_queue.json, so you can interrupt and resume across sessions. Each item is marked as completed or skipped with a reason, giving you a clear audit trail of what was fixed and what was left untouched.
try it
“Run lint and heal all the issues”
Project self-heal
If something breaks in the project structure — a missing folder, a deleted scaffold file — the agent can fix it automatically. Running /scaffold checks every expected directory and file against the project blueprint, and recreates whatever is missing without touching existing content.
The agent also runs this on its own when it encounters a missing path error during normal operations, so most structural problems are resolved before you even notice them.
Forget with safety lock
The forget command removes information from the wiki — a whole project, a single entity, or a concept. Before any deletion, the agent checks a safety flag. When wiki protection is on, all destructive operations are blocked — no exceptions. This prevents accidental data loss during normal work.
Turn protection off explicitly when you're ready to prune, then turn it back on when you're done.
Wiki permission flags
Two independent safety flags control destructive operations:
can_modify
Controls direct wiki edits outside workflows. Defaults to off.
can_forget
Controls deletions via the forget workflow. Defaults to off.
You can check or toggle them at any time — “lock the wiki”, “enable modifications”, “turn off protection” all work in natural language.
Deterministic log system
Every wiki operation — ingest, heal, lint, graph — is recorded in wiki/log.md through a centralized log writer. The format is structured and machine-parseable: each entry carries a timestamp, operation type, title, and project tag.
Only validated operations are accepted, and only authorized workflows can write to the log. A separate report tool can query the history and produce structured summaries filtered by operation, tag, or time range.
Wiki statistics
Running stats gives you a dashboard of the wiki's current state: page counts by type (sources, entities, concepts), tag distribution across projects, link density, orphan count, and overall coverage metrics. A quick way to understand how the knowledge base is growing and where the gaps are.