Skip to content

Surface: host hooks as a Bedside delivery path #12

Description

@tig

Summary

Ship host hooks as an optional Bedside surface, not as a redefinition of the standard.

Bedside stays three layers:

Layer Job
Contract Normative manners (how to treat the operator)
Surface Tools that encode those manners (ask, step, …)
Eval Score sessions so manners do not rot

A hook is one more encoder for surface rules on a given agent host (Claude Code, Cursor, etc.): same tenets, same exit/record semantics where applicable, different wiring.

Today adoption is pin + domain notes + verbs + fixtures. Agents are asked to follow the contract via AGENTS.md. Hooks would intercept a few high-value moments so manners hold even when prose is skimmed.

Motivation

Several tenets map cleanly to event interception:

Tenet / surface Hook-shaped?
No walls of shell or choice Yes — pre-response / pre-tool lint
Human acts dumb-simple; confirm in their words Yes — gate before irreversible tools
Prefer structured ask / host picker Yes — rewrite free-text multi-choice into a gate
No silent work Partial — wrap long tools with progress
Prefer doing over instructing Hard as a hook (model behavior)
Compound what you learn Memory/product, not a hook
Offline R1–R11 scoring Post-session job that calls eval

Without a hook pack, surface enforcement depends entirely on the model reading the contract.

Goals

  1. Document hooks as a surface adapter, not a fourth normative layer or a soft-fork of tenets.
  2. Provide installable hook packs (or a generator) for at least one real host, e.g. Claude Code.
  3. Wire hooks to existing surface cores where possible:
    • structured choice → bedside ask (or host picker with the same contract)
    • body/browser act → bedside step
    • session-end optional → bedside eval on a transcript fixture shape
  4. Keep command cores UI-agnostic (commands/); hooks call them or emit the same Record: lines.
  5. Never copy or rewrite tenets into hook scripts; hooks only implement surface rules and point at the pinned contract.

Non-goals

  • Redefining Bedside as "a hook."
  • Host-specific soft-forks of the contract.
  • Claiming hooks can enforce the whole contract (stance, prefer-doing, compound learning stay prose + product).
  • Supporting every agent host on day one.
  • Replacing offline fixture eval with live interception only.

Proposed shape

Bedside (standard)
  contract/     ← what "good" means
  surface/      ← how tools encode it
    CLI ask/step/doctor/eval
    hooks/      ← optional host adapters (this issue)
  eval/         ← prove it did not rot

Suggested operator path:

bedside hook install --host claude   # or cursor, etc.
bedside hook doctor                  # plain-language: installed? points at pin?

Example policy events (host-dependent names):

  • Session start — ensure contract path / domain notes are visible to the agent (or remind to pin).
  • Pre-tool (scary / irreversible) — require confirm-in-their-words / step before proceeding.
  • Pre-response or pre-tool (choice / shell walls) — prefer structured ask or host picker; refuse unexplained multi-command dumps where detectable.
  • Session end (optional) — score transcript with focus tenets via bedside eval when a fixture-shaped log exists.

Exact event map is host-specific and should live under surface/hooks/<host>/ (or docs + templates) with a short "what this enforces / what it cannot."

Acceptance criteria

  • surface/ (or surface/hooks/) documents: hooks are adapters; contract remains normative; no tenet soft-fork.
  • At least one host pack ships with install instructions and a plain-language "what fires when."
  • Install path is agent-first (bedside hook install … or documented copy of templates); doctor (or hook doctor) reports hook health in operator language.
  • Gates reuse ask / step semantics (exit codes 0 / 10 / 30, stable ids, fixture-friendly records) where the host allows.
  • Optional post-session path can feed bedside eval without inventing a second rubric.
  • Domain notes stay in product BEDSIDE.md; hook pack does not own persona examples.
  • pytest -q and bedside eval stay green; any new fixtures under known-good/known-bad if we claim hook-related manners.
  • Adoption docs (docs/adopting.md and/or surface checklist) mention hooks as optional surface work.

Open questions

  1. First host: Claude Code hooks only, or abstract template + one concrete pack?
  2. How much static lint (regex / heuristics) vs "nudge the model" is acceptable without false positives that strand operators?
  3. Should hooks be vendored with third_party/bedside or installed into host config outside the product tree?
  4. Does v0.3 bump, or a minor after v0.2 with no contract renumber?

References

Internal framing from design discussion: Bedside is not a hook; a hook pack is a Bedside surface for a given host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions