Skip to content

docs(adaptive-context): fresh spec + four-phase plan, retire the 2026-07 bundle#692

Merged
macanderson merged 1 commit into
mainfrom
worktree-adaptive-context-respec
Jul 26, 2026
Merged

docs(adaptive-context): fresh spec + four-phase plan, retire the 2026-07 bundle#692
macanderson merged 1 commit into
mainfrom
worktree-adaptive-context-respec

Conversation

@macanderson

Copy link
Copy Markdown
Owner

Replaces the six-document, ~7,700-line adaptive-context bundle with two documents and a four-phase plan.

Net: +801 / −9,007. No Rust changed.

Why

Phases 0 and 1 shipped — nine ADRs, ~3,200 lines of tested domain types, an inert settings block — and the product did not move. Meanwhile the bundle rotted factually within days: it pins a workspace version 58 patch releases stale, a store schema two migrations behind, a dependency rev that already moved, and ~40 file:line anchors into files since rewritten. It also plans two subsystems that would duplicate ones already shipping.

What's here

docs/design/adaptive-context.md The spec — goal, what already ships, what's actually missing, invariants
docs/design/adaptive-context-plan.md Four phases, each observable, each shippable alone
docs/adr/0010-… Proposed — amends ADR 0005

Deleted: the implementation plan, both lifecycle drafts, the build prompt, the Phase 0 baseline, and fleet.plan.toml. All recoverable from git history.

Findings that changed the plan

  • A lexical adaptive loop already ships, on by default, and the spec never mentions it. Reflection lessons cluster into candidate skills written to disk — capped per session, no-clobber, filtered against tombstones from two surfaces. Old Phase 5+6 are a migration with a behavior-compatibility obligation, not a greenfield build.
  • The receipts plane is ~80% of the proposed CompiledContextFrame — already ordered, content-addressed, digest-verified, byte-exactly reconstructable. The plan extends the step manifest instead of building an aggregate that could disagree with it. The real gap is narrower: four block kinds are defined and never emitted, so recall collapses into one undifferentiated block.
  • Fixed per-section prompt budgets are load-bearing for provider cache stability. A dynamic allocator over the system prefix would re-cause an incident the guard comments already document. Now rejected permanently, not deferred.
  • Four defects sit underneath every remaining gap — unbounded candidate generation, a point-in-time cutoff that reaches adjacency only, no supersede path in the plane that owns the data, and duplicate-on-edit memory identity. Phase 1 is defect repair and ships without a flag.
  • A live hole worth fixing regardless: workspace memory files are baked into the system prompt with no tombstone filter, so stella memory forget doesn't stop one shipping. That's a gap in a guarantee feat(memory): stella memory forget/restore, as a tombstone that survives re-learning #671 already made.

ADR 0010

Keeps ADR 0005's authority model, replaces its big-bang cutover with incremental transfer — new record kinds born canonical, legacy rows transferred on write, optional resumable backfill. Takes the roadmap's self-described "single riskiest step" off the critical path. Its cost (two coexisting regimes, possibly indefinitely) is written down rather than hand-waved.

ADRs 0001 and 0009 keep their references to the retired bundle — they're accurate records of what was decided and when.

Gates

check-doc-citations (47 citations resolve), check-normative-home, check-no-scratch, check-file-size — all pass. No Rust touched, so no compile surface.

Needs a decision

  1. Ratify or reject ADR 0010. Blocks Phase 3.
  2. Do node/edge transfer authority at all? Recommend no. Decides whether the lineage column lands on two tables or five.
  3. Point-in-time recall — apply the cutoff everywhere, or refuse the query? Recommend apply.
  4. Epic P1: Epic: adaptive context lifecycle #469 and phase issues Phase 2: migration — context_records as canonical authority, legacy tables as projections #474Phase 10: CGP protocol export adapter (deferred; gated on local replay + a 2nd provider) #482 no longer map onto this plan. Left untouched; adaptive-context-plan.md carries an old→new disposition table.

…-07 bundle

The previous bundle was six documents and ~7,700 lines specifying an
eleven-phase roadmap. Phases 0 and 1 shipped — nine ADRs, ~3,200 lines of
tested domain types, an inert settings block — and the product did not move.
The bundle also planned two subsystems that would duplicate ones already
running, and had rotted factually within days of being written: it pinned a
workspace version 58 patch releases stale, a store schema version two
migrations behind, a dependency rev that had already moved, and ~40 file:line
anchors into files since rewritten.

Replace it with two documents:

  docs/design/adaptive-context.md       what and why, plus invariants
  docs/design/adaptive-context-plan.md  four phases, each observable

Three rules drove the rewrite. No coordinates — line numbers, version
constants and pins rot faster than they can be maintained, so decisions live
in ADRs and positions live in the code. Extend before inventing — a parallel
implementation of a shipped mechanism is a defect, not a phase. Every phase
changes something a user can see.

What the fresh survey of the code found, and the plan now accounts for:

- A lexical adaptive loop already ships, on by default, undocumented by the
  spec: reflection lessons cluster into candidate skills that are written to
  disk, capped per session, no-clobber, filtered against tombstones from two
  surfaces. Replacing it is a migration with a behavior-compatibility
  obligation, not a greenfield build.
- The receipts plane already emits an ordered, content-addressed,
  digest-verified record of what each turn saw. That is ~80% of the proposed
  CompiledContextFrame. The plan extends the step manifest rather than
  building an aggregate that could disagree with it.
- Fixed per-section prompt budgets are load-bearing for provider cache
  stability. A dynamic allocator over the system prefix is now rejected
  permanently, not deferred.
- Four defects sit underneath every remaining gap: recall considers the whole
  corpus per query, the point-in-time cutoff reaches adjacency only, there is
  no supersede path in the plane that owns the data, and editing a memory
  mints a duplicate. Phase 1 is defect repair and ships without a flag.

Also adds ADR 0010 (Proposed), which amends ADR 0005: it keeps the authority
model and replaces the big-bang cutover with incremental transfer, taking the
roadmap's self-described riskiest step off the critical path. ADR 0005 gains
an amendment notice. ADRs 0001 and 0009 keep their references to the retired
bundle — they are accurate records of what was decided and when, and
rewriting them to cite a later document would falsify the record.

Deletions are recoverable from git history. Inbound links repaired in
docs/README.md, docs/context-pr.md, docs/adr/README.md, stella-fleet/README.md
and scripts/check-file-size.sh. No Rust changed.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
stella-cli-docs Ignored Ignored Jul 26, 2026 7:03am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant