DSH familySearch GitHub

One turn

The harness

From the queue to the close, and the  seam where a plugin of this family can stand in it.

The claim

The default turn already has every slot. Only the slots are empty.

The family documents 5 of the 20 seam on this path and registers arms at 4 more, so the lit stages below are where it actually listens. Every page about the family is a comparison against this one.

Stage
12
In one turn
Seam
20
On the path
Documented
5
With a README hook
Lit
9
Where the family listens

The turn

A turn is zero or more steps, and a step is one model request plus the tools it calls. One entry per stage, in the order the turn reaches it; a seam the family uses is lit, and a seam it does not use stays quiet.

  1. 01

    Queue

    Enters
    the message the user sends
    Leaves
    an inbox entry, announced live
    • agent/inbox/inserted
  2. 02

    Claim

    Enters
    the pending input and one queued message
    Leaves
    a durable turn start and one claim per message
    • agent/inbox/claimed
  3. 03

    Assemble

    Enters
    the agent, the model selection, and a cancellation signal
    Leaves
    the step tool set, the prompt sections, and the admitted tool schemas
  4. 04

    Pre-step

    Enters
    the claimed messages and the model selection
    Leaves
    an authoritative decision: reject, or enter with messages
    • agent/pre-step
  5. 05

    Request

    Enters
    the accepted messages
    Leaves
    a durable step start and the adjusted request controls
    • agent/request
  6. 06

    Bind

    Enters
    the call configuration and a cancellation signal
    Leaves
    a prepared call capability that governs prompt admission

    no seam here

  7. 07

    Admit

    Enters
    the prepared call capability
    Leaves
    durable system and user messages, and a frozen request derived from the log

    no seam here

  8. 08

    Stream

    Enters
    the bound prepared call
    Leaves
    stream chunks, republished as live start, chunk, and end frames
  9. 09

    Settle

    Enters
    the stream outcome
    Leaves
    a durable assistant message, or a durable attempt on failure
    • agent/request-error
  10. 10

    Execute

    Enters
    the tool calls the model asked for
    Leaves
    a durable call and result per settled tool
  11. 11

    Close step

    Enters
    the settled tool batch
    Leaves
    a durable step end, then a fresh claim or the stopping checkpoint

    no seam here

  12. 12

    Close turn

    Enters
    the stopping condition
    Leaves
    a durable turn end, an idle status, and a persisted session

The rail names what enters each stage and what leaves it, so the turn reads as a chain of inputs and outputs rather than a list of names.

The same turn twice: what the harness does alone, and what changes when the family listens at a seam.
the harness alone with the family
  1. Queue agent/inbox/inserted passes through
  2. Claim agent/inbox/claimed passes through
  3. Assemble system-prompt/assemble hook-dsh-live-containers
  4. Pre-step agent/pre-step passes through
  5. Request agent/request passes through
  6. Bind no seam passes through
  7. Admit no seam passes through
  8. Stream llm/stream hook-dsh-normalize-dash, hook-dsh-normalize-ellipsis, hook-dsh-normalize-fullwidth, hook-dsh-normalize-invisible, hook-dsh-normalize-quotes, hook-dsh-normalize-spaces
  9. Settle agent/request-error passes through
  10. Execute tools/pre-execute hook-dsh-workspace-govern, hook-dsh-workspace-operate, hook-dsh-ccr, hook-dsh-comment-filter, hook-dsh-convention-suggester, hook-dsh-doc-suggester, hook-dsh-edit-suggester, hook-dsh-graph-suggester, hook-dsh-replay-suggester, hook-dsh-search-suggester, hook-dsh-test-suggester, hook-dsh-tool-coach
  11. Close step no seam passes through
  12. Close turn agent/turn-stopping hook-dsh-lesson-nudge

The call

The model asks for a tool, and the harness decides 4 times: whether the call may run, what body runs, what the model reads back, and what is frozen as the record.
ModelAgentToolsTool bodyDisktool/callthe calltools/pre-executedispatchtools/executewritethe resultthe resulttools/post-executetool/result
7 messages between 5 participants, and 3 of them fire a seam. A solid message is one the log keeps; a dashed one exists only while the process runs.
  1. 01

    The gate

    tools/pre-execute
    Receives
    the call the model asked for, by name and arguments
    Decides
    • allow
    • deny
    • ask
    Branch approval/request

    An ask is one prompt, and the call waits on it: allowed once continues to the guards, and rejected, cancelled, or unavailable is a deny.

    The model reads nothing different unless the gate refuses, and then the body never runs and the refusal becomes the result the model reads.

  2. 02

    The body

    tools/execute
    Receives
    the allowed call, wrapped for timeout, retry, and metrics
    Decides
    the docs name none here

    Nothing here is rewritten: the family supplies two of the bodies that run, and a result the CCR hook stored comes back only through one of them.

  3. 03

    The result

    tools/post-execute
    Receives
    the result, before it becomes model content
    Decides
    • accept
    • block
    • replace
    • add context

    The model reads a one-line preview and a retrieval marker where the full result was, or a source file with its comments gone.

  4. 04

    The record

    tools/result
    Receives
    the frozen outcome, after normalization and the last content invariant
    Decides
    the docs name none here
    Plugin none of the four

    Nothing changes here: the outcome is frozen, so every change the family makes is already inside the content the model reads.

Decision

One row per decision the docs name, with what the harness does at that word and which of the four plugins can return it.

The decision vocabulary the tool pipeline names, what the harness does at each word, and the plugin that can return it
DecisionWhat the harness doesWhich plugin can return it
allowPasses the call to the registered guards, and then to the body.None of the four: a gate with nothing to say returns the downstream decision unchanged.
denySkips the guards and the body: the refusal becomes the result, and the call still reaches tools/post-execute and tools/result.hook-dsh-workspace-govern
askOpens approval/request, one prompt: allowed once continues to the guards, and rejected, cancelled, or unavailable is a deny.hook-dsh-workspace-govern
acceptThe result stands as the model will read it.hook-dsh-ccr and hook-dsh-comment-filter, carrying the content they rewrote.
blockThe result is withheld from the model.None of the four: no listener here blocks a result.
replaceThe result is replaced before it becomes model content.hook-dsh-ccr
add contextExtra context is appended to the batch after the recorded results.None of the four: no listener here adds context.

Who answers

One row per stage of the call, the seam it dispatches, and the plugins that answer there: the family's own, and the harness's where this site documents one.

Each stage of the tool pipeline, its seam, and the plugins that answer there
StageSeamFamilyHarness
The gatetools/pre-executeauto-review, hooks-claude-code, hooks-codex, liveshare, tool-jobs, workspace-changes
The bodytools/executenone
The resulttools/post-executeclaude-code-mods, hooks-claude-code, hooks-codex, repeat-tool-reminder, spill-policy, tool-fs-search
The recordtools/resultnonenone
  1. The gate tools/pre-execute 14%
  2. The body tools/execute 70%
  3. The result tools/post-execute 92%
  4. The record tools/result 100%
Each bar starts where the one above it ended. The widths are a share of the call, not a measured duration.

Every change the family makes to a call happens between the gate and the result: a call can be refused before it runs, and a result can be rewritten before it is read. A hook at either seam is a waterfall listener, so it calls the harness's next() and returns the payload the next listener sees.

The fate

The call's life is one line, and every way off it is an exit, not a step. A refusal leaves before the body runs, and a failure or a timeout leaves while it runs.

  1. proposed the model asked for the call
  2. gated a listener allowed it
  3. running the tool body is executing
  4. settled the result is the model's next input
  • denied a listener refused it from proposed
  • failed the body raised from running
  • background the body outlived its window from running

The conversation

One entry per part of the message the model reads, in the order it reads them, and the 4 seam that can change them.
  1. 01

    System

    The system prompt: the instructions, the step's admitted tool schemas, and every registered section, assembled fresh for each step.

    live-containers appends a live section at every assembly, and tool-coach appends a persistent coaching section once its ladder escalates.

  2. 02

    User

    The user messages: the batch the inbox delivers and the step claims, admitted as user/message before the request is frozen.

    Seam
    • agent/pre-step
    Plugin
    none

    unchanged

  3. 03

    Assistant

    The assistant messages: the text and reasoning the stream carries, settled as assistant/message and replayed as history.

    normalize-dash rewrites the dash family in each delta and in the assembled block before the stream is settled.

  4. 04

    Tool

    The tool results: what the pipeline returns for each call, before the result becomes model content.

    CCR replaces an oversized result with a preview and a retrieval marker, and tool-coach prepends a coaching note once a pattern repeats past its threshold.

The model never sees the harness, only the messages the log projects: every request has to be reconstructable from the log, so the seam that changes a message changes what the next request carries.

The composition

18 arms across 6 seam, in the order they run, and each one is registered twice, at the same seam in the same position.

tools/execute

1 arm
  1. 01 hook-dsh-live-containers plain wraps the tool body

The only arm around the tool body itself, which is where a timeout or a metric would attach.

tools/post-execute

6 arm
  1. 01 hook-dsh-ccr prepend compresses an oversized result into a preview and a marker
  2. 02 hook-dsh-comment-filter prepend strips comments from the result
  3. 03 hook-dsh-normalize-dash prepend normalizes the result's text
  4. 04 hook-dsh-tool-coach plain reads the result and records a lesson
  5. 05 hook-dsh-live-containers plain reads the result for its monitor
  6. 06 hook-dsh-workspace-govern plain observes the result of a call it allowed

The chain that matters: the three prepended arms run outside the plain listeners, so CCR compresses the bytes the normalizers already rewrote.

llm/stream

1 arm
  1. 01 hook-dsh-normalize-dash plain rewrites each chunk as it arrives

The last seam before the model's text becomes the transcript, and the one place a character can still change.

A prepended arm is registered outside the listeners that mount with the bundle, so its output is what the plain listeners see. Two arms do not compose at all: cost records every committed event, and the journal records every write.

The coverage

The turn runs left to right. A filled square is a plugin that changes what the model reads next at that seam, a hollow one records what happened there, and a dotted outline is neither.

The seams each plugin acts at, and whether it rewrites what the model reads or only records
Pluginsystem-prompt/assemblellm/streamtools/pre-executetools/post-executefs/observedsession/eventagent/status
hook-dsh-normalize-dash Deterministic outputrewrite at llm/streamrewrite at tools/post-execute
hook-dsh-ccr Bounded contextrewrite at tools/post-execute
hook-dsh-workspace-govern A write guardrewrite at tools/pre-executerecord at tools/post-execute
hook-dsh-workspace-operate A proposal surfacerecord at fs/observed
plugin-dsh-batch-edit A batched atomic editrewrite at tools/pre-executerecord at fs/observed
hook-dsh-comment-filter Comment-free resultsrewrite at tools/post-execute
plugin-dsh-cost Cost visibilityrecord at session/event
hook-dsh-workspace-journal A write journalrecord at fs/observed
hook-dsh-tool-coach Tool-use coachingrewrite at system-prompt/assemblerewrite at tools/pre-executerewrite at tools/post-execute
hook-dsh-live-containers Live state in the promptrewrite at system-prompt/assemblerecord at agent/status
  • rewrites what the model reads next
  • records what happened

10 plugin, one per family, read from source: the seam each stands at, whether the model sees something different, and what reaches the disk. Every row exists twice, and the twins agree on the seam and the ledger line; they differ in the wiring, where the Effect tree returns Effect envelopes and the Classic tree returns the dispatch envelope.