From ac894356ae95872fafb35247a0177e8f4d6a00fe Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Sat, 25 Apr 2026 01:33:01 -0400 Subject: [PATCH 1/4] docs: refresh milestones roadmap structure --- docs/DescriptionAndMilestones.md | 88 ++++++++++++++++++++++++-------- 1 file changed, 68 insertions(+), 20 deletions(-) diff --git a/docs/DescriptionAndMilestones.md b/docs/DescriptionAndMilestones.md index af029c2..03a7d3d 100644 --- a/docs/DescriptionAndMilestones.md +++ b/docs/DescriptionAndMilestones.md @@ -63,38 +63,86 @@ The current authoritative state shape and directive semantics are defined in `Di After correcting or constraining the assistant once, the behavior remains consistent for the rest of the conversation. -### 0.6.9 — Precompiler Hardening + REPL Opt-In (implemented) +### M3 — Cross-Session Recall (implemented, engine-level / host-enabled) **Goal** -Harden experimental precompiler behavior while preserving core engine semantics. +Extend host-level workflows around persisted exported state safely and intentionally. + +**Core capability:** + +- Export current authoritative state +- Initialize a new engine from previously exported authoritative state +- Ensure restored authoritative state behaves identically to live state +- Support serialized continuation checkpoints for restoring both: + - authoritative state + - pending confirmation-required continuation state **Deliverables:** -- Reject-first precompiler classification behavior (`directive` / `no_directive` / `unknown`) -- Portable precompiler conformance fixtures for cross-language runners (TS-ready shape) -- REPL opt-in flag: `context-compiler --with-precompiler` -- No directive grammar expansion and no engine semantic changes +- Host-side storage/recovery patterns built on the existing import/export API +- Host-side storage/recovery patterns for checkpoint object/checkpoint JSON continuation restore **User-visible outcome:** -Safer precompiler behavior and explicit REPL opt-in without changing deterministic engine outcomes. -### M3 — Cross-Session Recall +Assistant remembers decisions across sessions without resurrecting contradictions. +Pending confirmation-required flows can be resumed when the host persists checkpoints. -**Goal** -Extend host-level workflows around persisted exported state safely and intentionally. +`export_json()` / `import_json()` remain authoritative-state only. +Checkpoint APIs are separate and represent runtime continuation. +Long-term memory remains a host persistence responsibility, not an engine-owned store. -**Core capability:** +### 0.6.x -- Export the current authoritative state -- Initialize a new engine from previously exported state -- Ensure restored state behaves identically to live state -- Support serialized continuation checkpoints for restoring both authoritative state and pending confirmation-required continuation state +The 0.6.x line completed checkpoint support, precompiler boundary hardening, and +regression/conformance surfaces that prepare the project for the next milestone. -**Deliverables:** +### 0.7 — Auditability & Boundary Hardening -- Host-side storage/recovery patterns built on the existing import/export API -- Host-side storage/recovery patterns for checkpoint object/JSON continuation restore +**Goal** +Make engine behavior inspectable and externally controllable without guessing. -**User-visible outcome:** +**Core capability:** -Assistant remembers decisions across sessions without resurrecting contradictions. +- State inspection +- Deterministic dry-run / preview +- Structural state diff +- Thin controller layer around step / preview / replay behavior +- Machine-readable REPL JSON output containing: + - `decision` + - `prompt_to_user` + - `state` +- JSON input for initial state only: + - `--initial-state-json` + - `--initial-state-file` +- REPL LLM fallback as explicit optional mode: + - `--with-llm-fallback` + - requires `--with-precompiler` + - never implicit + - inspectable via preview / JSON output +- Explicit precompiler policy for multi-line, multi-sentence, and conversational-prefix input + (for example `ok. prohibit peanuts`, `sure - use docker`, mixed conversational + directive content) + that is rule-based, fixture-covered, and inspectable + +**Constraints:** + +- No expansion of authoritative state model +- No implicit behavior +- No heuristic-heavy parsing +- Preserve separation between engine, precompiler, and host/controller layers + +### Post-0.7 Direction + +- Profile commands and workflow conveniences +- Additional tooling built on auditability surfaces +- Broader heuristic responsibility remains default-avoid unless tightly justified + +### 1.0 Target + +Conceptual completion is a stable minimal contract, not feature accumulation. + +- Stable minimal engine contract +- Deterministic and inspectable behavior +- Strict compiler / precompiler / host separation +- No implicit behavior +- No authoritative state-model expansion +- Cross-language consistency with Python as source of truth From 65923cfc43ac2f9f84944319c32787c2d429a488 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Sat, 25 Apr 2026 01:47:10 -0400 Subject: [PATCH 2/4] docs: clarify precompiler wording in readmes --- README.md | 2 +- examples/integrations/litellm/README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3bea6c..44932bb 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ These demonstrate deterministic clarification, state enforcement, and conflict h ## Optional: LLM Preprocessor (Experimental) -An optional host-side preprocessor can convert natural-language instructions +An optional host-side preprocessor can conservatively convert some natural-language instructions into canonical directives before compilation. It is designed to be conservative and must be used with validation: diff --git a/examples/integrations/litellm/README.md b/examples/integrations/litellm/README.md index a170ea2..d8e106c 100644 --- a/examples/integrations/litellm/README.md +++ b/examples/integrations/litellm/README.md @@ -48,6 +48,8 @@ print(handle_turn("set premise to concise replies", engine)) PY ``` +This near-miss input is expected to clarify rather than be canonicalized. + ## Environment configuration Required (normal `openai` mode): From bceeecb1fc72310baae382b4903de31b74aa01d6 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Sat, 25 Apr 2026 02:07:59 -0400 Subject: [PATCH 3/4] docs: add mixed-intent boundary policy milestone --- docs/DescriptionAndMilestones.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/DescriptionAndMilestones.md b/docs/DescriptionAndMilestones.md index 03a7d3d..9c80e21 100644 --- a/docs/DescriptionAndMilestones.md +++ b/docs/DescriptionAndMilestones.md @@ -122,6 +122,9 @@ Make engine behavior inspectable and externally controllable without guessing. - Explicit precompiler policy for multi-line, multi-sentence, and conversational-prefix input (for example `ok. prohibit peanuts`, `sure - use docker`, mixed conversational + directive content) that is rule-based, fixture-covered, and inspectable +- Define policy for directive-adjacent mixed-intent payloads + (for example `use docker and explain why containers matter`), + ensuring explicit, inspectable behavior without implicit interpretation **Constraints:** From 6df1d2aab3ea47fb7f739b30611ed86fd363f518 Mon Sep 17 00:00:00 2001 From: Robert Lippmann Date: Sat, 25 Apr 2026 02:10:39 -0400 Subject: [PATCH 4/4] chore: bump version to 0.6.9 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 55df306..5878d16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "context-compiler" -version = "0.6.8" +version = "0.6.9" description = "Deterministic conversational state engine for LLM applications." readme = "README.md" requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index 197ad90..6a594db 100644 --- a/uv.lock +++ b/uv.lock @@ -468,7 +468,7 @@ wheels = [ [[package]] name = "context-compiler" -version = "0.6.8" +version = "0.6.9" source = { editable = "." } [package.optional-dependencies]