# Kernel Contracts

These are the canonical contracts for CCD's core kernel.

They define the parts of CCD that should stay stable even as hosts, models, and recall providers change.

Each spec directory contains:

- `spec.toml` for machine-readable metadata
- `body.md` for the living contract

## Core Contracts

- [state-model-core](state-model-core/body.md): separates project truth, operator state, and workspace-local runtime state
- [repo-identity-linking](repo-identity-linking/body.md): bootstraps and links workspaces safely
- [runtime-state-contract](runtime-state-contract/body.md): defines clone-local runtime state and canonical startup surfaces
- [continuity-history-and-focus-recommendation](continuity-history-and-focus-recommendation/body.md): defines compact continuity history and one suggested next focus beyond the live handoff
- [session-workflow](session-workflow/body.md): defines the attach -> start -> checkpoint/radar loop
- [memory-entry-format](memory-entry-format/body.md): defines authored CCD memory structure
- [memory-promotion](memory-promotion/body.md): defines how lessons move into more durable scopes
- [memory-compaction-replay](memory-compaction-replay/body.md): defines replay-aware compaction and supersession
- [skill-sync-distribution](skill-sync-distribution/body.md): defines canonical skill sync and distribution

## Beyond The Kernel

CCD also ships deeper platform and integration contracts for runtime builders, autonomous hosts, and optional extensions.

Those surfaces still matter, but they are not the newcomer index.

- [autonomous-session-lifecycle](autonomous-session-lifecycle/body.md): defines the host-fulfilled lease, heartbeat, stale-session, and takeover contract for long-lived runtime sessions
- [extension-continuity-attachments](extension-continuity-attachments/body.md): drafts the transfer-capsule rail for bounded extension-owned context that must travel with a continuity thread
- [symbolic-prompt-dialect](symbolic-prompt-dialect/body.md): drafts the compact `CCD1` prompt-frame dialect for runtime-owned context injection

See [IMPLEMENTATION.md](IMPLEMENTATION.md) for the full implementation matrix across kernel, platform, memory-provider, and extension contracts.
