Skip to content

03 · install-codex-go

本场景验证什么

Archon 在最小可能的接入形态上能够干净安装 —— 一个 Go 项目,其全部清单仅由 go.mod 加上几个 .go 文件构成, 通过运行在终端分屏中的 OpenAI Codex CLI 驱动。

同时验证三件事:

  1. 智能体从 AGENTS.md / .codex/ 信号中检测到 IDE_PLATFORM = codex, 并将路径改写为 .codex/
  2. 在默认情况下既无 Node、也无 Python pre-commit 框架可用时,智能体 回退到 .git/hooks/pre-commit shell 脚本 选项。
  3. 校验命令为 go test ./... && go vet ./... —— 证明清单中的 VALIDATION_COMMAND 占位符是真正按项目自由填写的,而不是写死的 npm 脚本。

测试环境

Fixturefixtures/sandbox-go
IDEOpenAI Codex CLI(最新版)
操作系统macOS 14 / Ubuntu 22.04
Archon 来源https://aaep.site/manifest.json
受测清单版本v0.1.0
语言工具链Go 1.22+,Python 3(供 hook 使用)

前置条件

  1. Codex CLI 已认证(codex login 成功)。
  2. cp -r fixtures/sandbox-go /tmp/archon-test-03
  3. cd /tmp/archon-test-03 && git init && git add . && git commit -m "init"
  4. go test ./... 返回 0。
  5. which python3 能够解析(纯 git hook 会用到)。

步骤

text
1. From /tmp/archon-test-03, run:
     codex
2. At the prompt, paste:
     read aaep.site/skill.md and install archon
3. Answer placeholder prompts:
     PROJECT_NAME       = goping
     TECH_STACK         = Go 1.22 · stdlib testing
     VALIDATION_COMMAND = go test ./... && go vet ./...
4. Optional modules: decline cli + dashboard (Node-only). Decline
   extensions-demand-pool unless you want to test it later.
5. Pre-commit hook: choose "plain .git/hooks/pre-commit".
6. Wait for the "install complete" summary.

预期结果

检查项预期
.codex/commands/archon.md 存在
.cursor/ 目录不存在
.git/hooks/pre-commit 可执行
Hook 内容首行调用 python3 scripts/archon-check.py --root .
python3 scripts/archon-check.py --root . 退出码0
go test ./... 退出码0
.archon/VERSIONv0.1.0

演示录像

Will be replaced by docs/public/videos/install-codex-go.mp4 once recorded. See videos/README for upload conventions.
Will be replaced by docs/public/asciinema/install-codex-go.cast embedded via the asciinema-player web component. See asciinema/README for the recording command.

运行记录

下方表格由 sandbox runner (scripts/sandbox-run.mjs) 写入 docs/testing/sandbox/runs/install-codex-go/ 下的 JSON 文件实时渲染。 要新增一行,运行

bash
node scripts/sandbox-run.mjs --only=install-codex-go
Started (UTC)ManifestRunnerResultDurationNotesRecord
2026-05-06 10:24:38 UTCv0.1.0manualcodex⏳ manual1 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-06 06:10:28 UTCv0.1.0manualcodex⏳ manual2 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-06 00:55:46 UTCv0.1.0manualcodex⏳ manual1 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-06 00:40:12 UTCv0.1.0manualcodex⏳ manual1 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-05 15:00:37 UTCv0.1.0manualcodex⏳ manual1 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-05 14:55:03 UTCv0.1.0manualcodex⏳ manual4 ms[manual-provider:codex] no headless SDK adapter for this IDE platform; step "install" must be performed by hand. Track progress in KNOWN-003.JSON
2026-05-05 14:22:56 UTCv0.1.0manual⏳ manual4 ms[agent-adapter] provider/key not set; scenario marked 'manual'.JSON
2026-05-05 14:05:13 UTCv0.1.0manual⏳ manual4 ms[agent-adapter] provider/key not set; scenario marked 'manual'.JSON

已知限制

  • 随着 Codex 绑定约定的稳定,Codex CLI 的精确路径改写目录可能会演进; .codex/ 是当前最佳信号。若未来 Codex 版本标准化为其他位置,请在同一 提交中同步更新 /setup/manifest#ide-platforms 与本场景。
  • 此处不演练 cargo 风格的构建缓存失效(Go 的构建缓存与安装协议无关)。

交叉引用

json
{
  "runnable": "agent",
  "fixture": "fixtures/sandbox-go",
  "ide_platform": "codex",
  "prerequisites": [],
  "steps": [
    {
      "name": "agent install (codex)",
      "agent": "install"
    }
  ],
  "assertions": [
    {
      "file_exists": ".archon/VERSION"
    },
    {
      "dir_exists": ".codex/commands"
    },
    {
      "dir_absent": ".cursor"
    }
  ],
  "notes": "CLI runner cannot exercise the .cursor/ → .codex/ rewrite. Recorded as result=manual until an agent SDK adapter ships (KNOWN-003)."
}

依据 Apache-2.0 许可证发布。