← ClaudeAtlas

engine-apilisted

The LLM-facing contract for the deterministic claude-wiki-pages Bun engine — how ANY agent should call it. Documents each subcommand (verify, fix, heal, doctor, config, migrate, search; plus planned index/link-suggest), its `--json` output shape, exit codes, and when to call it on a write-path. Trigger when an agent or user asks "how do I call the engine", "what does the engine return", "how do I verify/heal programmatically", or invokes /claude-wiki-pages:engine-api. This is reference material, not an action — it teaches the tool surface.
odere-pro/claude-wiki-pages-plugin · ★ 1 · AI & Automation · score 60
Install: claude install-skill odere-pro/claude-wiki-pages-plugin
# Engine API — the deterministic tool surface The engine is a Bun CLI invoked through `scripts/engine.sh <command> [--target <vault>] [--json]`. It is the source of truth for anything that must be exact (the wikilink graph, frontmatter, MOC integrity). Agents call it and reason over its structured output instead of eyeballing the vault. **Always pass `--json` for machine use.** ## Invocation ```sh bash "${CLAUDE_PLUGIN_ROOT}/scripts/engine.sh" <command> --target <vault> --json ``` If Bun is missing, the bridge prints a warning and exits 0 — degrade to the bash verifiers (`verify-ingest.sh`) rather than failing. ## Commands ### `verify` — read-only integrity check Ports `verify-ingest.sh` CHECK 0–3. Returns a report; **exit 1 when any error**, else 0. ```json { "command": "verify", "vault": "docs/vault", "findings": [ { "severity": "error|warn|info", "check": "schema|index-duplicates|sources-format|moc|orphan-sources|topic-folder", "message": "…", "file": "…" } ], "errors": 0, "warnings": 0, "clean": true } ``` Call it: before trusting the vault, and after every write-path as the closing gate. ### `fix` — deterministic safe repairs (idempotent) Repairs only what has one correct value: index duplicates, missing `_index.md`, `_index.md` children drift. Never touches body prose, schema_version, or sources semantics. Running twice changes nothing. Exit 0. ```json { "command": "fix", "vault": "…", "changes": [ { "file": "…", "action": "dedupe-index|create-index|sync