[codex] Consolidate shared prompts in codex-prompts (#25151)

## Why

`codex_core` is consistently a bottleneck for incremental builds during
iteration. The simplest fix is to make the crate smaller.

## Summary

`codex-core` owns several reusable prompt renderers and static prompt
assets, which makes the crate harder to split apart.

Rename `codex-review-prompts` to `codex-prompts` and move shared review,
goal, permissions, compaction, realtime, hierarchical AGENTS.md, and
`apply_patch` prompts into it. Move prompt-only tests and update
consumers and `CODEOWNERS`.

## Validation

- `just test -p codex-prompts -p codex-apply-patch`
- `just test -p codex-core prompt_caching`
- Bazel builds for the affected crates
This commit is contained in:
Adam Perry @ OpenAI
2026-06-01 18:45:07 +00:00
committed by GitHub
parent 88c7a4ff07
commit ba2b67f9cd
55 changed files with 814 additions and 740 deletions
+14 -1
View File
@@ -2550,6 +2550,7 @@ dependencies = [
"codex-network-proxy",
"codex-otel",
"codex-plugin",
"codex-prompts",
"codex-protocol",
"codex-response-debug-context",
"codex-rmcp-client",
@@ -2574,7 +2575,6 @@ dependencies = [
"codex-utils-pty",
"codex-utils-stream-parser",
"codex-utils-string",
"codex-utils-template",
"codex-windows-sandbox",
"core_test_support",
"csv",
@@ -3453,6 +3453,19 @@ dependencies = [
"pretty_assertions",
]
[[package]]
name = "codex-prompts"
version = "0.0.0"
dependencies = [
"anyhow",
"codex-execpolicy",
"codex-git-utils",
"codex-protocol",
"codex-utils-absolute-path",
"codex-utils-template",
"pretty_assertions",
]
[[package]]
name = "codex-protocol"
version = "0.0.0"