Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
- name: Ruff (format)
run: uv run ruff format --check .

- name: Install mypy integration dependencies
run: uv pip install --python .venv/bin/python litellm pydantic
- name: Install mypy demo dependencies
run: uv pip install --python .venv/bin/python litellm

- name: Mypy
run: uv run mypy src examples evals/swe-bench demos
run: uv run mypy src examples demos

- name: Install Hypothesis for tests
run: uv pip install --python .venv/bin/python hypothesis
Expand Down
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,10 @@ test host-side state handling.
```bash
pip install context-compiler
context-compiler
context-compiler --with-preprocessor
```

`context-compiler` launches the interactive REPL.

`--with-preprocessor` enables the experimental preprocessor before each input
(simple rule-based checks plus conservative validation). For near-miss inputs,
the preprocessor does not rewrite the text. It passes the input to the engine,
and the engine can return `clarify`.

Preload options keep saved rules separate from in-progress confirmation state:
- `--initial-state-json` / `--initial-state-file` load saved state
(via exported state JSON).
Expand All @@ -215,9 +209,6 @@ context-compiler --json < input.txt
`--json` enables machine-readable NDJSON output for non-interactive usage
(one complete JSON object per processed input line).

You can combine `--with-preprocessor` with `--json` when you want the same
preprocessing path in non-interactive usage.

Preload options keep saved rules separate from in-progress confirmation state:
- `--initial-state-json` / `--initial-state-file` load saved state
(via exported state JSON).
Expand All @@ -237,10 +228,6 @@ pip install context-compiler
Packaging notes:
- Base install includes core engine modules and `examples/` artifacts.
- LLM demos require: `pip install "context-compiler[demos]"`.
- Optional preprocessor support: `pip install "context-compiler[experimental]"`.
- Integration-oriented dependency support: `pip install "context-compiler[integrations]"`.
- LiteLLM Proxy example dependency bundle: `pip install "context-compiler[litellm_proxy]"`.
- Host runtimes (for example, Open WebUI) are not installed by `integrations`.

### Development

Expand Down Expand Up @@ -541,11 +528,6 @@ For full directive grammar and edge-case behavior, see [DirectiveGrammarSpec.md]

- [examples](examples/) — minimal usage patterns and core integration primitives
- [demos](demos/) — concrete scenarios showing how behavior differs with and without the compiler
- [integrations](examples/integrations/) — production-style host integrations (OpenWebUI, LiteLLM, etc.)

Integration note: current OpenWebUI example pipes return deterministic local
acknowledgements for directive-only `update` decisions instead of forwarding
those turns to the downstream LLM.

---

Expand All @@ -560,24 +542,6 @@ those turns to the downstream LLM.

These invariants are verified through behavioral tests and Hypothesis-based property tests.

### Optional: LLM Preprocessor (Experimental)

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:

- reject-first; directive-adjacent unsafe forms abstain instead of rewriting
- all outputs must be validated with `parse_preprocessor_output(...)`
- no directive grammar expansion
- raw outputs must not be passed directly to the compiler

If `engine.has_pending_clarification()` is true, bypass preprocessing and pass raw input directly to `engine.step(...)`.
Boundary policy is false-negative-preferred: abstain rather than risk unsafe state mutation.

See [LLM preprocessor](docs/llm-preprocessor.md) and
[`experimental/preprocessor/`](experimental/preprocessor/) for details.

### Multiple engines

- [Multiple engines](docs/multi-engine.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/DesignPhilosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Context Compiler applies explicit state management to the modern LLM context, wi
- The LLM handles what it does well: language understanding, reasoning, generation, and ambiguity in user intent
- The deterministic engine handles what probabilistic systems handle poorly: keep explicit state across turns, enforce constraints, and make corrections replace prior state instead of competing with it

The preprocessor layer bridges the two: it uses the LLM's language understanding to translate natural language directive intent into canonical form, which the deterministic engine can then process reliably. Fuzzy where it needs to be fuzzy, deterministic where determinism matters.
If a host adds acquisition-layer drafting, that belongs outside the core authority package. Core stays deterministic; host-owned drafting stays non-authoritative.

This is not a workaround for LLM limitations. It is an appropriate allocation of responsibilities based on what each component is actually suited for.

Expand Down
6 changes: 0 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
- [Architecture boundaries](architecture.md)
- [Directive Grammar (exact command forms the engine accepts)](DirectiveGrammarSpec.md)

## Integrations
- [Open WebUI integration](../examples/integrations/openwebui/README.md)

## Preprocessor
- [LLM preprocessor](llm-preprocessor.md)

## Evaluation & Evidence
- [Demo results matrix](demos-results.md)
- [Demo outputs / scored scenarios](../demos/README.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Responsibilities:
- draft candidate directives without becoming a second authority

Examples:
- the optional heuristic/LLM preprocessor, including a future extracted directive drafter package
- external directive-drafter or host-owned drafting packages
- host-side input shaping before `engine.step(...)`

Out of scope:
Expand Down Expand Up @@ -85,9 +85,9 @@ Out of scope:
- current Context Compiler core behavior
- built-in coordination behavior

The preprocessor belongs to the Acquisition Layer. It is optional,
conservative, and never the source of truth. Context Compiler core belongs to
the Authority Layer. Host applications own Application Layer behavior.
Acquisition-layer drafting belongs outside Context Compiler core. Context
Compiler core belongs to the Authority Layer. Host applications own
Application Layer behavior.

Composition remains exploratory. It is a future possibility, not a planned 0.8
core change.
Expand Down
115 changes: 0 additions & 115 deletions docs/llm-preprocessor.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Examples

This directory contains small integration examples showing typical app-side usage of Context Compiler.
This directory contains small authority-layer examples showing typical app-side usage of Context Compiler.

These files are included in the base package install (`pip install context-compiler`).
Non-integration example files in this directory are standalone scripts and can be run directly.
Expand Down
58 changes: 0 additions & 58 deletions examples/integrations/README.md

This file was deleted.

Loading
Loading