core/docs/adr/ADR-0151-auto-proposal-pipeline.md
Shay 54e6bfc0d0
docs: reorganize docs landscape
Implements the 4-phase documentation reorganization master plan.

- Consolidation: Merged brief/, handoff/, planning/, and decisions/ into briefs/, handoffs/, plans/, and adr/ respectively (101 ADRs relocated)
- Root Cleanup: Relocated HANDOFF-gpt55-*.md and key top-level docs (runtime_contracts.md, etc.) to canonical folders. Added superseded alerts.
- Indices & Navigation: Created docs/README.md navigation document, docs/sessions/README.md index, docs/adr/README.md index
- Note: Also includes prior commit adding ADR-0200+ corpus hygiene governance (ADR-0225, dependency map, backfilled cross-references)
2026-06-30 16:59:36 -07:00

1.5 KiB

ADR-0151 — Auto-Proposal Pipeline at Load

Status: Accepted Date: 2026-05-25

Context

ADR-0150 stores enriched DiscoveryCandidate records in engine state at checkpoint. Those candidates can already be converted into TeachingChainProposal records through teaching.proposals.propose_from_candidate, which applies the existing eligibility gate, replay-equivalence gate, and append-only ProposalLog.

Decision

When RuntimeConfig.auto_proposal_enabled is true, ChatRuntime._load_engine_state() attempts to propose from loaded pending discovery candidates. The pipeline runs at load, not checkpoint, so turn completion remains a pure engine-state checkpoint and proposal construction happens when persisted candidates re-enter the runtime.

Each auto-generated proposal is stamped with:

source.kind = "contemplation"
source.source_id = candidate.candidate_id

The proposal remains in review_state="pending" unless the replay gate rejects it for regression. Operators still ratify accepted memory through core teaching review; this path never auto-accepts.

Determinism Contract

TeachingChainProposal.proposal_id is deterministic over (candidate_id, proposed_chain). Re-loading the same engine state therefore reaches the same proposal id, and ProposalLog idempotency prevents duplicate created events.

Trust Boundary

Auto-proposal writes only to the append-only proposal log. It never writes the active teaching corpus. Corpus mutation remains review-gated through accept_proposal.