skills/distill/SKILL.md
Compress large markdown artifacts into a dense inline digest that preserves every fact, verified by round-trip reconstruction. Use this whenever an agent writes a markdown file that sub-agents will re-read in later sessions.
npx skillsauth add pdlc-os/pdlc distillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Human-facing PDLC artifacts (PRDs, design docs, episodes, OVERVIEW, DECISIONS) are written as readable prose — that's what the writing-clearly-and-concisely skill is for. But those same artifacts are also re-read repeatedly by sub-agents in later sessions, and full-prose reads cost significant tokens each time.
Distillation produces a dense structured digest appended to the same file (inline, not a sidecar). Humans keep reading the prose; sub-agents read only the digest section. A round-trip verification step proves the digest preserves every fact from the source.
This skill is the counterpart to writing-clearly-and-concisely:
An agent authoring a markdown file invokes this skill when any of these is true:
The always-distill whitelist — regardless of size, these files always get a digest because they accumulate over the project's lifetime and are read on every phase:
docs/pdlc/memory/OVERVIEW.mddocs/pdlc/memory/DECISIONS.mddocs/pdlc/memory/DEPLOYMENTS.mddocs/pdlc/memory/ROADMAP.mddocs/pdlc/memory/episodes/index.mddocs/pdlc/memory/episodes/*.mdThe size gate is crossed — for everything else, distill when the file exceeds the distill threshold (default: 800 tokens; overridable in CONSTITUTION.md Section 9) and the file is expected to be re-read by sub-agents in later sessions. Good candidates:
docs/pdlc/prds/PRD_*.mddocs/pdlc/design/[feature]/*.mddocs/pdlc/prds/plans/plan_*.mdDo not distill:
Append the digest as the last section of the file, preceded by a horizontal rule:
[... original prose content ...]
---
## Distilled Digest
<!-- pdlc-distill
source-checksum: sha256:abc123def456...
distilled-at: 2026-04-21T14:32:00Z
distilled-by: Atlas
source-tokens: ~2400
digest-tokens: ~520
To refresh: delete this section and re-run distill.
-->
**Purpose:** [1 sentence]
**Audience:** [who reads this]
**Key facts:**
- [dense bullet, one fact per line]
- [IDs, paths, numbers kept verbatim]
- [no narrative prose]
**Structured data:**
| [tables preserved exactly] |
Rules for the metadata comment:
source-checksum — sha256 of all file content before the ## Distilled Digest heading (ignore trailing newlines). Computed so downstream agents can detect staleness.distilled-at — UTC ISO 8601 timestamp.distilled-by — the agent name that produced the digest.source-tokens / digest-tokens — rough counts for telemetry.Compute the checksum:
python3 -c "import hashlib, sys; s=open(sys.argv[1]).read().split('\n## Distilled Digest')[0].rstrip(); print('sha256:' + hashlib.sha256(s.encode()).hexdigest())" <file>
Apply passes in order: (1) Syntactic → (2) Structural → (3) Abbreviations. Round-trip verification catches any fact loss regardless of pass.
Apply the full skills/condense/SKILL.md ruleset to the prose regions that will feed into the digest. Condense drops articles, filler, pleasantries, hedging, connective fluff, imperative softeners, and redundant phrasing, and shortens verb choice. It leaves code blocks, inline code, URLs, file paths, IDs, numbers, proper nouns (agent names, services, people), quoted error messages, frontmatter, table structure, and heading text untouched. This pass runs in memory only — condense never writes to disk on distill's behalf.
See skills/condense/SKILL.md for the canonical rule list, examples, and "never modify" guarantees. Any fact accidentally lost in this pass is caught by the round-trip verification step below.
Keep verbatim (these must survive intact):
Compress aggressively:
Structure over prose:
| Option | Chosen | Reason |Only where unambiguous in PDLC context:
Target compression after all three passes: 4–6× reduction in tokens with zero information loss (up from 3–5× before the syntactic pass).
Compression without verification is just lossy summarization. The round trip proves no fact was dropped.
Protocol:
"Reconstruct the original document from this digest. Be complete — every fact, ID, path, number, and decision should appear. Output markdown prose."
The goal is not that the reconstruction equals the source word-for-word — it's that no fact is lost in compression. Phrasing drift is fine; missing facts are not.
Digests become stale when the source changes.
How to detect staleness:
## Distilled Digest heading.source-checksum in the digest's metadata comment.Who regenerates:
Never silently trust a stale digest. Always check the checksum before consuming.
When an orchestrating agent dispatches a sub-agent that needs context from a large distilled file:
"Read the
## Distilled Digestsection ofdocs/pdlc/prds/PRD_foo.md. Do not read the full file unless you need information that's missing from the digest."
Read with grep or section-anchored offset to grab just that section.The size gate threshold is defined in docs/pdlc/memory/CONSTITUTION.md Section 9:
**Distill threshold (tokens):** 800
Projects can override this. Set it higher if your context budget is comfortable and you want less distillation overhead. Set it lower if context pressure is acute.
The always-distill whitelist is fixed at the skill level, not per-project — OVERVIEW, DECISIONS, DEPLOYMENTS, ROADMAP, episodes/index, and individual episode files always get distilled regardless of size.
skills/condense/SKILL.md — the syntactic compression ruleset invoked as distill's Pass 1 (see above). Also usable standalone when a prose block needs to shrink in place without the full digest flow.skills/writing-clearly-and-concisely/SKILL.md — for authoring readable prose (invoked before distillation, not after). The source content you distill should already be clear.agents/jarvis.md — Jarvis is the keeper of distilled quality across the project; Jarvis verifies OVERVIEW/DECISIONS/episode digests during Reflect.Every agent that writes a markdown file checks: does this file need a digest? If yes (whitelist or size gate), distill it inline, verify via round-trip, and record the source checksum so staleness is detectable. Sub-agents read digests, not full prose, unless the digest proves insufficient for their task.
data-ai
Run a feature autonomously from approved-PRD to shipped, evaluated by a per-turn Sentinel hook. Requires bypass-permissions mode and Agent Teams mode.
development
# Variant Convergence **Topic slug:** `variant-convergence` **Triggers:** - **Inception path — Brainstorm Design Step 10.7:** after Step 10.6 (Design-Laws Audit) completes, before Step 11 (PRD design-doc link updates) and the Step 12 design approval gate. Variants are HTML mockups Muse generates. - **Construction path — Build Review Step 12.5:** after Party Review (Step 12) writes its review file and Muse appends the *As-Built Audit* section to `ux-review.md`, before the Step 13 Review approval
data-ai
Force-release a stuck roadmap-level feature claim (admin command)
devops
Bypass the deploy-before-Operation guardrails block with a single confirmation