engine-apilisted
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