# RFCs

This directory holds CCD architecture decision records, captured as RFCs following the convention shared with the [`pituitary`](https://github.com/dusk-network/pituitary/tree/main/docs/rfcs) project, with three CCD-specific extensions (draft status, explicit supersession, and a consequences section). Those extensions are proposed upstream in [pituitary#318](https://github.com/dusk-network/pituitary/issues/318); if adopted there, the two projects stay in sync.

## Boundary With Specs

RFCs decide. Specs contract.

Use an RFC when CCD needs to record a product or architecture decision: what is
being changed, why it is worth doing, which alternatives were rejected, and what
tradeoffs the project accepts. RFCs are allowed to be directional and
argumentative because they preserve decision context.

Use a spec when CCD needs an implementable contract: command surfaces, runtime
fields, provider protocols, state invariants, conformance requirements, and
testable behavior. Specs should not independently redesign a primitive already
owned by an RFC.

When an RFC supersedes a spec idea, keep the old spec only as historical
context and give it a forward pointer. When an accepted RFC needs implementation
precision, distill only the stable contract into a spec and link back to the RFC
for rationale.

## Conventions

- **Filename:** `NNNN-short-slug.md`. Zero-padded four-digit number; numbers are unique and frozen once assigned.
- **Required sections:**
  - `## Status` — `Accepted`, `Proposed`, `Draft`, or `Superseded by: RFC NNNN (<path>)`
  - `## Date` — YYYY-MM-DD of the decision, not the last edit
  - `## Related` — links to issues and sibling RFCs
  - `## Summary`
  - `## Context`
  - `## Options Considered` (when genuine alternatives existed)
  - `## Decision`
  - `## Consequences`
- **Supersession:** once an RFC lands on `main`, do not delete it. Set `## Status` to `Superseded by: RFC NNNN (<path>)` and keep the file so readers of the old RFC have a forward pointer.

## Index

### Accepted

- [RFC 0001 · Continuity Threads and Channels](0001-continuity-threads-and-channels.md) — Immortal threads as umbrella; 5-item kernel-center list; recall adapters and automatic session renewal as supporting kernel.
- [RFC 0002 · Backlog Extraction to `ccd-extensions`](0002-backlog-extraction-to-ccd-extensions.md) — CCD core reduced to the continuity kernel; backlog ships from a sibling repo.
- [RFC 0003 · Threads as First-Class](0003-threads-as-first-class.md) — continuity thread promoted from emergent concept to a named, addressable kernel artifact with identity, lifecycle, and resumption semantics.
- [RFC 0004 · Automatic Session Renewal](0004-automatic-session-renewal.md) — kernel-side design for the renewal loop sketched in RFC 0001: `renew` signal on `session_boundary`, heartbeat and renewal leases, two-phase kernel primitive with single-action realization.
- [RFC 0007 · Thread Curls](0007-thread-curls.md) — bounded work-arc records inside continuity threads; compact history for decision provenance, memory evidence, runtime chat naming, and later analysis without raw transcript archiving.
- [RFC 0009 · Post-Slimdown CCD Shape](0009-post-slimdown-ccd-shape.md) — CCD is continuity-only; Lifeloop and external clients own lifecycle, memory, telemetry, and integration glue.

### Draft

- [RFC 0005 · Shared Continuity Snapshot](0005-shared-continuity-snapshot.md) — portable snapshot artifact and minimum-viable file-based transport for moving a continuity thread between machines; closes the machine-locality pointer from RFC 0003 §2.
- [RFC 0006 · Pod Layer Collapse](0006-pod-layer-collapse.md) — retire the pod layer; collapse policy into profile, delete pod-memory ceremony outright, relocate machine identity and presence one step flatter; compat-alias window and non-destructive migration tool.
- [RFC 0008 · Lifeloop](0008-lifeloop.md) — provider-neutral lifecycle normalization layer for AI harnesses; CCD becomes the first continuity client rather than hiding harness lifecycle normalization inside CCD-specific ceremonies.

### Superseded

_none yet_
