Skip to content

feat(prompt): compose explicit backend sections - #171

Merged
owainlewis merged 1 commit into
mainfrom
codex/167-explicit-prompt-sections
Jul 30, 2026
Merged

feat(prompt): compose explicit backend sections#171
owainlewis merged 1 commit into
mainfrom
codex/167-explicit-prompt-sections

Conversation

@owainlewis

@owainlewis owainlewis commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Compose conversation and job requests through one component with explicit Push policy, user identity, resolved path, and fresh context sections. JSON framing keeps identity, message metadata, current content, and bounded history inside their owned sections while Claude Code, Codex, and Pi retain their native system-prompt mechanisms. Fresh, resumed, and rebuilt sessions now share the same context schema.

Why

The previous path, identity, policy, and rehydration strings were assembled separately, which made ownership and precedence harder to verify. This gives all three adapters one documented semantic boundary without adding a generic instruction handbook or changing ordinary reply delivery.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo build --locked
  • cargo test --locked (349 unit, 1 docs, 12 init CLI, and 3 manual crash tests passed)
  • GitHub CI run #251 passed on Ubuntu, macOS, and docs
  • Fresh subagent review approved after both findings were addressed
  • No PR comments or review threads were present after CI completed

Risks

Prompt text changes for every conversation and job. Unit, gateway, job, and adapter contract tests cover the boundary, but live invocation against installed Claude Code, Codex, and Pi binaries was not performed.

Related issue

Closes #167

@owainlewis
owainlewis marked this pull request as ready for review July 30, 2026 13:13
@owainlewis
owainlewis merged commit 08fd740 into main Jul 30, 2026
3 checks passed
@owainlewis
owainlewis deleted the codex/167-explicit-prompt-sections branch July 30, 2026 13:13
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.

Compose backend instructions from explicit prompt sections

1 participant