← ClaudeAtlas

coherence-checklisted

Advisory citation-coherence sweep over the direct-edit WORKSPACE corpus (/foundry:coherence-check). Builds the citation graph FRESH every run (no cache trust), then reports broken citations vs out-of-scope citations as deterministic JSON with a tri-state fail-closed exit. ADVISORY, NOT a merge gate — not part of the merge floor (ci.yml + btb-gates), not a branch-protection required status, never reads a PR-merged diff. Trigger to sweep the workspace corpus for dangling/malformed citations.
lukasrepublic/agentic-foundry · ★ 1 · AI & Automation · score 67
Install: claude install-skill lukasrepublic/agentic-foundry
# /foundry:coherence-check An operator/agent **ADVISORY** sweep that walks the **direct-edit WORKSPACE corpus** (`docs/`, `foundry/`, `specs/` markdown) and reports citation coherence. It builds the citation graph **fresh in-memory on every run** — it does NOT read the committed `.foundry/graph.json` (no cache trust, no `is_stale` branch, single `fresh-walk` provenance shape). ```bash python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry-coherence-check.py" # override the scope (repeatable); default is the canonical docs/ foundry/ specs/: python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry-coherence-check.py" --scope specs --scope docs ``` ## Output (deterministic JSON, single document on stdout) ```jsonc { "provenance": {"source": "fresh-walk", "scope": ["docs","foundry","specs"], "corpus_root": "/abs/root", "node_count": 42}, "findings": [ {"src","target","resolved","reason"} ], // broken; reason ∈ {malformed, target_missing} "out_of_scope": [ {"src","target","resolved"} ], // resolve to a real .md outside scope — NOT broken "counts": {"broken": N, "out_of_scope": M} } ``` `findings` are sorted by `(reason, src, target)`; `out_of_scope` by `(src, target)`. On an operational failure `provenance.source == "error"` and an `error` key carries the cause. ## Tri-state, fail-CLOSED exit (LOAD-BEARING) - **`0`** — ran, **zero** broken citations. - **`1`** — ran, **≥1** broken citation. This is **ADVISORY only**. - **`2`** — **operational f