mcpField
C
codex-readiness-integration-test

codex-readiness-integration-test

github.com/openai测试与质量28.4k60 次安装18 周前更新
代码仓库

关于 codex-readiness-integration-test

codex-readiness-integration-test 是一项使用 Codex CLI 在仓库中测试 Agent 执行流程的技能,随后运行构建和测试命令并进行评估。执行前须经用户批准任务提示词,并生成供审查的产物。

主要功能

  1. 01通过 Codex CLI 执行 Agent 流程
  2. 02用户批准任务提示词
  3. 03在仓库中运行构建与测试
  4. 04收集证据并进行确定性检查
  5. 05LLM 评估与摘要

适用场景

  1. 01测试 Agent 的仓库变更流程
  2. 02编辑后验证构建与测试命令
  3. 03审查执行证据与评估结果

MCP 相关

除非显式配置,否则该技能不会调用 MCP 服务或工具。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/openai/skills --skill codex-readiness-integration-test

安装后在 Claude Code 中输入/codex-readiness-integration-test确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

LICENSE.txt
references/
agentic_loop_eval.md
change_quality.md
checks.json
generate_prompt.md
json_fix.md
llm_eval_schema.json
scripts/
collect_evidence.py
deterministic_rules.py
run_agentic_loop.py
run_integration_test.py
run_llm_eval.py
run_plan.py
scoring.py
tests/
test_planning_signal_rule.py
test_verification_after_code_changes.py

详细介绍

LLM Codex 就绪度集成测试

此技能会运行多阶段集成测试,以验证 Agent 式执行质量。它始终以执行模式运行(无只读模式)。

输出

每次运行都会将输出写入 .codex-readiness-integration-test/<timestamp>/,并更新 .codex-readiness-integration-test/latest.json。

每次运行新增的输出:

  • agentic_summary.json 和 logs/agentic.log(Agent 式循环执行)
  • llm_results.json(自动 LLM 评估)
  • summary.txt(人类可读的摘要)

前置条件(必需)

  • 运行测试前,使用仓库本地的 HOME 对 Codex CLI 进行身份验证。 在你自己的终端中运行以下命令(不要通过集成测试运行): HOME=$PWD/.codex-home XDG_CACHE_HOME=$PWD/.codex-home/.cache codex login HOME=$PWD/.codex-home XDG_CACHE_HOME=$PWD/.codex-home/.cache codex login status
  • 集成测试会在第一步创建 {repo_root}/.codex-home 和 {repo_root}/.codex-home/.cache/codex。

工作流

  1. 询问用户如何提供任务。
    • 明确提供两个选项:(a) 用户提供自定义任务/提示词,或 (b) 自动生成任务。
    • 在用户选择选项之前,不要运行入口点。
  2. 生成或加载 {out_dir}/prompt.pending.json。
    • 使用集成测试预期的提示词路径,而不是仓库根目录下的 prompt.json。
    • 使用默认输出目录时,路径为 .codex-readiness-integration-test/prompt.pending.json。
    • 如果提供了 --seed-task,则将其用作起始任务。
    • 如果未提供,则使用 skills/codex-readiness-integration-test/references/generate_prompt.md 生成任务,并将 JSON 保存到 {out_dir}/prompt.pending.json。
    • 执行前,用户必须批准提示词(不支持自动批准模式)。请求用户批准时,务必输出提示词摘要。
  3. 通过 Codex CLI 执行 Agent 式循环(使用 AGENTS.md 和 change_prompt)。
  4. 通过 skills/codex-readiness-integration-test/scripts/run_plan.py,运行提示词计划中的构建/测试命令。
  5. 收集证据(evidence.json)和确定性检查,并通过 Codex CLI 运行自动 LLM 评估。
  6. 评分并生成报告及摘要输出。

配置

{out_dir}/prompt.pending.json 中的可选字段:

  • agentic_loop:配置 Agent 式循环的 Codex CLI 调用。
  • llm_eval:配置自动评估的 Codex CLI 调用。

省略这些字段时,将使用默认值。

要求

  • 如果证据中提到短语 Context compaction enabled,LLM 评估器必须判定失败。
  • 使用定性方式评估上下文用量(不设严格阈值)。

此测试能很好地覆盖的内容

  • 针对真实仓库根目录运行 Codex CLI,生成真实的文件系统修改和 git 差异。
  • 执行已批准的变更提示词,然后在仓库内运行构建/测试计划。
  • 收集证据、确定性检查结果和 LLM 评估产物,供审查。

此测试无法体现的内容

  • Agent 式循环可能使用非默认标志(例如,绕过批准/沙箱),因此交互式防护措施会有所不同。
  • 使用专用 HOME(.codex-home),这可能导致身份验证/配置/缓存与常规 CLI 使用情况不同。
  • 自动生成的提示词和一次性执行无法模拟交互式指导。
  • 除非显式配置,否则不会调用 MCP 服务/工具。

备注

  • skills/codex-readiness-integration-test/references/ 中的提示词要求严格遵循 JSON 格式。
  • 使用 skills/codex-readiness-integration-test/references/json_fix.md 修复无效的 JSON 输出。
  • 此技能会调用 codex CLI。请确保已安装该 CLI 且可通过 PATH 使用,或在 {out_dir}/prompt.pending.json 中覆盖命令。
  • 如果 Agent 式循环检测到工具访问被沙箱阻止,现在会将 requires_escalation: true 写入 {run_dir}/agentic_summary.json,并以代码 3 退出。在这种情况下,请使用提升后的权限重新运行集成测试。

评论

支持 Markdown