/interlock:docs-digestfrom Interlock
Compresses a repo's docs and OpenSpec specs into a token-dense agent-only primer at .claude/graph/DOCS_DIGEST.md. Use when docs context is too large to load or after substantial docs/spec edits.
Ships in Interlock. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Produce one agent-only primer that lets a fresh agent understand this repo's documented domain without reading docs/ end to end.
GRAPH_REPORT.md answers what connects to what. This answers what this project means. They are siblings, both under .claude/graph/.
Inputs: docs/** and openspec/specs/**, via the deterministic index.
Output: .claude/graph/DOCS_DIGEST.md, overwritten in place.
Never indexed: openspec/changes/**. Active change artifacts are read directly, not digested.
Run this when: the digest is missing or stale, docs or living specs changed substantially, or the user asks to rebuild it. Do not run it per query — interactive skills should read an existing fresh digest, not regenerate one.
interlock-graph docs-index . --write
Writes .claude/graph/docs-index.json covering docs/ and openspec/specs/, with a sha256 and heading spans per file.
If the index is empty, stop and report that: a repo with no docs/ and no openspec/specs/ has nothing to digest, and inventing one is worse than having none.
If .claude/graph/DOCS_DIGEST.md exists, compare its frontmatter source_hashes against each files[].sha256 in the index. All match, and the user didn't force a refresh? Report fresh and stop.
Rebuild when: hashes mismatch, the digest is missing, or the user says rebuild / refresh / force.
Read .claude/graph/docs-index.json in full. It is an inventory, not the corpus.
Then read section spans only (offset/limit from each entry's startLine/endLine), highest signal first. Rank the index entries yourself using these signals, in order:
readme, architecture, overview, getting-started, contributing, or adr — these state intent and structure.openspec/specs/*/spec.md capability gets at least its title and requirement blurbs — the capability map is the single most useful thing in the digest.Drop first under token pressure: long analysis or research write-ups, changelogs, meeting notes, anything whose blurb already conveys the point, and peripheral spec capabilities. For those, use the index blurb instead of reading a span.
Rank what the repo actually contains. Do not assume any particular filename exists.
Forbidden: find docs -exec cat, reading every docs/**/*.md or openspec/specs/**/*.md end to end, reading anything under openspec/changes/, and writing output anywhere under docs/ or openspec/.
Overwrite .claude/graph/DOCS_DIGEST.md with exactly this contract:
---
audience: agent-only
target_tokens: 2500
generated_at: <ISO-8601>
source_hashes:
<path>: <sha256>
# one entry per indexed file
---
# docs-digest
## map
- <short-key> → <path>
## facts
- <dense telegraphic facts; ;-joined clauses fine>
## workflows
- <agent-relevant workflows and constraints>
## specs
- <capability> → key requirements / constraints (telegraphic, pointer-heavy)
## pointers
- <path>#<heading> Lstart-Lend
Omit ## specs entirely when the index contains no openspec/specs/ files.
Style — this is read by agents, not people. Telegraphic. Abbreviations fine. Lists and →. No tutorial tone, no narrative padding, no worked examples. Prefer a pointer over a paraphrase whenever the reader could drill down with interlock-graph context or a Read span.
Budgets: soft cap ~2500 tokens (ceil(chars/4)), hard stop ~3200. Drop lowest-priority content first. Never state a fact that isn't in the index or a span you actually read.
Output path, token estimate, file count split by docs/ vs openspec/specs/, fresh-vs-rebuilt, and a reminder that humans should keep reading docs/ — this artifact is not for them.
| Need | Use |
|---|---|
| Prose bootstrap / domain primer | This digest (DOCS_DIGEST.md) |
| Structural bootstrap | GRAPH_REPORT.md, interlock-graph query |
| Task-specific cited excerpts | interlock-graph context / docs |
| Active change artifacts | Read openspec/changes/<name>/ directly — never this digest |
| TOC and hashes for this skill | interlock-graph docs-index |
Follow ${CLAUDE_PLUGIN_ROOT}/shared/TOOL-ECONOMY.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/bootstrapOnboard a brownfield project into OpenSpec — analyze the existing codebase with parallel explorer agents, write an initial architecture document, then generate one spec per discovered feature describing what is already built. Use when adopting spec-driven development on a repo that has code but no specs./commitCreate a single feature-level commit after a change is implemented. Reads the OpenSpec change artifacts to write a verb-phrase conventional-commit message with an outcome summary and optional issue reference. Commit only — never runs tests, typecheck, lint or build, and never pushes./dispatchRoute a request to the right interlock skill, after one batched pre-flight that loads git state, OpenSpec status, open tasks and graph presence in a single pass. Use when you are not sure which skill applies, or at the start of a session to orient before doing anything else./evalsAuthor an Interlock eval case from an observed model-behaviour failure, and read a completed eval results run. Use when you have a reproduced failure — an archived proposal, a changelog entry, a run artifact, or a transcript — worth regression-testing against a real model, or when an eval run has finished and you need to know whether it is a regression, run-to-run variance, or no signal. Authoring needs cited evidence; the verdict comes from `interlock evals triage`, never from your own reading./explain-codeExplain code to a beginner in that stack — either a module walkthrough (what each function does, how calls link, where data flows, which patterns recur) or a commit teach-in (why each file changed, what changed, blast radius, what would break if it were left out). Use when asked to explain code, walk through a directory, or explain the last commit./exploreDeep codebase reconnaissance with parallel read-only investigators — fans out automatically when a question spans multiple subsystems, options, or cross-cutting concerns, then synthesizes one coherent picture. Use before designing a change, when tracing how something works end to end, or when you need to know the blast radius of touching a shared value.npx claudepluginhub renzrollon/interlock --plugin interlockOther plugins' skills for the same job