Skip to content

feat: add repl command layer#137

Merged
rlippmann merged 6 commits into
mainfrom
codex/repl-command-layer
May 23, 2026
Merged

feat: add repl command layer#137
rlippmann merged 6 commits into
mainfrom
codex/repl-command-layer

Conversation

@rlippmann
Copy link
Copy Markdown
Owner

@rlippmann rlippmann commented May 23, 2026

What changed

  • Added REPL command-layer commands on top of controller APIs: state, preview , and step .
  • Kept bare REPL input behavior unchanged.
  • Routed REPL progression and preview through controller exports to preserve engine authority.
  • Allowed read-only observational commands during pending clarification while still blocking non-confirmation mutating progression.
  • Removed explain alias to keep the command surface small.
  • Added and updated REPL tests for command parsing, pending behavior, and preview non-mutation behavior.
  • Added concise README API coverage for public controller exports and decision-kind constants.

Why this was needed

  • Establishes the 0.7 REPL/controller command semantics before JSON-mode output.
  • Hardens boundaries so hosts use stable controller/runtime queries instead of checkpoint internals.
  • Keeps a minimal, explicit command surface for predictable scripting and future TS parity.

Closes #84

@rlippmann
Copy link
Copy Markdown
Owner Author

Added a small follow-up test coverage pass for user-facing REPL behavior:

  • step no while pending clarification
  • interactive preview while pending
  • interactive help while pending
  • idempotent preview reports would_mutate: no

@rlippmann
Copy link
Copy Markdown
Owner Author

Added targeted contract tests to fix the REPL coverage gate failure.

Result: src/context_compiler/repl.py now reaches 100% coverage in the contract slice (pytest -m "contract" --cov=context_compiler.repl --cov-fail-under=100).

@rlippmann rlippmann merged commit 75043f5 into main May 23, 2026
12 checks passed
@rlippmann rlippmann deleted the codex/repl-command-layer branch May 23, 2026 03:08
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.

enhancement: REPL preview/state commands and reusable controller (no engine changes)

1 participant