Claude
Skills
Sign in
Back

distill

Included with Lifetime
$97 forever

Distill a session-tethered working context into a self-contained portable handoff a fresh zero-memory agent can execute from. Closes deictic, grounding, relevance, provenance, and compression gaps, then emits a prose channel plus a schema-versioned TaskStateBlock. Type: (ContextTethered, AI, DISTILL, WorkingContext) → PortableHandoff. Alias: Diylisis(διύλισις).

AI Agents

What this skill does


# Diylisis Protocol

Distill a session-tethered working context into a self-contained portable handoff through deictic, grounding, relevance, provenance, and compression closure, resolving context-tethered residue into a handoff a fresh zero-memory agent can execute from. Type: `(ContextTethered, AI, DISTILL, WorkingContext) → PortableHandoff`.

## Definition

**Diylisis** (διύλισις: refining, distillation): A dialogical act of distilling a session-tethered working context — the accumulated context window of one working session, carrying undefined jargon, metric tokens, author process traces, tool state, and dangling task identifiers — into a self-contained portable handoff that a fresh recipient with no access to the author session can execute from. The protocol's lexical verb is `/distill`. The author session declares a handoff contract, normalizes each session-local pointer (deixis) to a canonical reference, audits each item for self-containment, judges each item's recipient-relevance and transformation-provenance, compresses to the minimal-complete set, gates the result against a zero-memory comprehension standard, loops until a monotone hygiene measure reaches its fixed point, and emits the handoff across a prose channel and a schema-versioned task-state channel.

```
── FLOW ──
Diylisis(W, recipient?, next_task?) → Detect(W) → tethered? →
  ¬tethered: → deactivate (handoff already self-contained)
  tethered:  pass_n=1, ledger = read(CorrectionDelta) | unknown, residuals = ∅, loop:
    F0 declare(recipient, next_task, allowed_sources, scope, stop) → contract                -- relevance + minimality premise
    F1 scan(deixis) → normalize(surface_token → canonical_ref, confidence, unresolved?) → SubstTable
       |unresolved tokens| > 0: append to residuals (reason: unresolved)
    F2 audit(item, self_containment) → classify(inline | stable-pointer | routed-residual)    -- no silent residual
    F3a relevance(item, contract.next_task) → keep_candidate?                                   -- F0 contract predicate
    F3b provenance(item, ledger) → Provenance →
         CorrectionDelta(KEEP, status≠provisional):  → CorrectedKeep  → KEEP
         else (ledger unknown ∨ no match ∨ provisional-only ∨ non-KEEP delta):  → Unknown → Constitution(ASK)   -- provenance authority is the KEEP hard line only; no KEEP inferred without a matching non-provisional KEEP delta
    F3  disposition(item) ← Disposition: KEEP(inline) | ROUTE(StableRef) | DROP                 -- KEEP from CorrectedKeep; ROUTE/DROP from F3a relevance or the Gate; Unknown ∨ conflict → Gate
    F4 compress(kept) → minimal_complete                                                        -- remove only if no contract/residual violation
    F5 comprehension_gate(minimal_complete, contract) → zero_memory_verdict →                    -- lint checklist or fresh subagent; no self-simulation
         Fail(blocking_items): append to residuals (reason: comprehension-gap), block fixed_point
         Pass:                 no new residual
       Gate Qd(disposition conflicts ∪ unknown-provenance ∪ unresolved residuals) → Stop → A    -- Constitution surfacing (both verdicts; residuals incl. comprehension-gap)
    F6 loop: measure(unresolved anchors, stop, schema, residual, leaked drops, unclean deltas) decreasing → fixed_point?  -- leak lint: DROP'd content absent from emit, incl. emit-ledger deltas under re-distillation (minimality dual of F5)
         ¬fixed_point: pass_n += 1, loop (one-pass + bounded audit/lint)
         fixed_point: → F7
    F7 emit(prose_channel, TaskStateBlock, correction_ledger?) → PortableHandoff → converge   -- leak_free across every emitted channel incl. the correction ledger; re-distillation hygienes the single canonical handoff in place + appends a CorrectionDelta line, never a supersede-chain file

── MORPHISM ──
WorkingContext, recipient?, next_task?
  → declare(recipient, next_task, allowed_sources, scope, verification, stop)  -- F0 HandoffContract; relevance and minimality undefined without it
  → normalize(surface_token, canonical_ref, confidence)                        -- F1 deictic closure: precedes grounding so each grounded item names a stable referent
  → audit(item, self_containment) → (inline | stable-pointer | routed-residual)-- F2 grounding closure: silent residual surfaced, never dropped unseen
  → select(item, contract.next_task)                                           -- F3a recipient-relevance predicate against the declared contract
  → attest(item, CorrectionDelta_ledger) → Provenance                          -- F3b read-only provenance; a matching non-provisional KEEP delta yields CorrectedKeep, every other ledger state yields Unknown; provenance authority is the KEEP hard line only, never an inferred disposition
  → dispose(item) → Disposition                                               -- F3 KEEP(inline) | ROUTE(StableRef) | DROP
  → compress(kept) → minimal_complete                                          -- F4 remove only what leaves no contract or residual-ledger violation
  → gate(minimal_complete, contract) → zero_memory_verdict                     -- F5 comprehension against a fresh recipient standard; Fail re-enters blocking items as residuals, no author self-simulation
  → settle(measure) → fixed_point                                             -- F6 bounded audit/lint loop on a monotone hygiene measure; fixed_point requires a Pass verdict ∧ leak_free (no DROP'd content in emit)
  → emit(prose_channel, TaskStateBlock, correction_ledger?)                    -- F7 channel separation; the task-state channel never overrides prose authority; under re-distillation (a prior canonical handoff for the contract exists) the emit hygienes that one file in place and appends each correction as a CorrectionDelta ledger line, never a versioned sibling
  → PortableHandoff
requires: context_tethered(W)                -- runtime checkpoint (Phase 0)
deficit:  ContextTethered                    -- activation precondition (Layer 1/2)
preserves: source_chain(W)                   -- W.items read-only; substitution, disposition, and provenance annotate, never mutate the originating context
invariant: Portability over Author Familiarity ∧ Single Canonical Handoff  -- one continuously-hygiene'd handoff file; re-distillation edits it in place + appends to the CorrectionDelta ledger, never a supersede-chain (v1→v2) file

── TYPES ──
W              = WorkingContext { items: List(ContextItem), session_ref: SessionRef, action: Handoff }
ContextItem    = { content: String, origin: Origin, surface_tokens: Set(String), downstream: List(TaskRef) }
Origin         ∈ {UserStatement, DocumentRead, ToolOutput, AIInference, PriorTask} ∪ Emergent(Origin)
recipient?     = Optional(RecipientProfile)                  -- defaults to "zero-memory fresh agent" when absent
next_task?     = Optional(String)                            -- declared at F0; absence forces F0 elicitation before relevance is defined
Detect         = W → (Bool, tethered_items if true)          -- F0 precheck for session-tethered residue
StableRef      = { kind: "path" | "url" | "id" | "command", locator: String }  -- a reference resolvable without the author session
InlineEvidence = { content: String }                         -- evidence carried inline rather than by reference
HandoffContract { recipient_profile: "zero-memory fresh agent"; next_task: String;
  allowed_sources: List(StableRef); execution_scope: String; verification_commands: List(String);
  stop_condition: String; residual_unknown_policy: Map(String, "KEEP" | "ROUTE" | "DROP" | "ASK") }
                 -- F0 output; the contract every later phase reads for relevance and minimality
SurfaceToken   = String                                      -- a session-local deictic token (undefined jargon, metric shorthand, "as above", a bare task id)
Substitution   = { surface_token: SurfaceToken; canonical_ref: StableRef | InlineEvidence | Null;
             

Related in AI Agents