# Fixity Pilot Client

## Status

Issue #28 pilot evidence.

## What Was Checked

The Reforge reference is lifecycle-driven: it installs Claude Code
`SessionStart`, `PreToolUse`, `PostToolUse`, and `Stop` hooks; retrieves
bounded learned facts/rules at session or tool boundaries; captures tool
errors and file changes; and extracts repeated-error rules when enough
episodes share a signature.

CCD already has adjacent workflow-signal and behavioral-drift surfaces. Those
are useful lifecycle consumers, but the repeated-failure / prevention /
constraint semantics are not CCD continuity semantics. This pilot treats them
as a separate client family attached through Lifeloop.

## Lifeloop Mapping

The pilot crate lives at `crates/fixity-pilot/` and depends on `lifeloop`.
`lifeloop` does not depend on it.

The binary `lifeloop-fixity-pilot` consumes one `DispatchEnvelope` over stdin
and writes one `CallbackResponse` to stdout. It observes payload delivery in
the transport envelope:

- inline `payloads[].body` values are summarized into bounded excerpts;
- `payloads[].body_ref` values are recorded as references and are not
  dereferenced;
- client-owned cues such as `known_avoidance`, `solution_hint`, and
  `error_signal` are emitted only inside Fixity artifacts and Fixity payloads.

For session and frame-opening events, the client may return a
`fixity.context_signal` payload with `pre_prompt_frame` as a preferred
placement. For observation-only events it can still write side-channel
evidence while returning a valid delivered response.

## Evidence

The committed fixture `tests/fixtures/fixity/frame_opening_dispatch.json`
contains a payload-bearing `frame.opening` dispatch. The corresponding
side-channel evidence is pinned in
`tests/fixtures/fixity/frame_opening_artifact.jsonl`.

The automated test `tests/fixity_pilot_event_invoke.rs` drives:

```text
lifeloop event invoke --client-cmd lifeloop-fixity-pilot ...
```

and asserts that:

- the synthesized receipt is valid and delivered;
- the incoming payload is represented in `payload_receipts`;
- the Fixity artifact observed the inline payload body through the
  `DispatchEnvelope` payload plane.

The conformance fixture
`tests/conformance/clients/fixity_pilot_shape.json` pins the client-class
shape for the v1 freeze corpus.

## Boundary

No Fixity or Reforge semantics enter Lifeloop core. Lifeloop only provides the
event vocabulary, payload transport, callback response validation, and receipt
synthesis. Repeated-signal classification, prevention cues, and future durable
storage belong to the client family.

The #26 profile abstraction remains the host-asset rendering path for
installing a client profile. This pilot proves the runtime callback and
payload-delivery surface that such a profile would target.
