# A bounded multi-agent exercise / 有边界的多 Agent 练习

Checked against official documentation and CLI help on 2026-10-09. No model
run was performed during publication verification. 本材料只完成静态与本地测试,
未声称已运行真实模型委派。

## Set up / 放置

1. Make a new empty practice directory; put `collision-key.mjs` and
   `collision-key.test.mjs` there. Initialize a Git repository if you want
   diff tracking. 不要放真实私人文件。
2. Copy `config.toml` to `.codex/config.toml`; put the three role TOML files
   under `.codex/agents/`. In an existing project, merge instead of overwriting.
3. Read the files before trusting the project. `gpt-6-luna` and `gpt-6.1-sol`
   require account access. Substitute an available model and a supported
   reasoning effort when necessary; do not assume a Free account has both.
4. Run `node --test collision-key.test.mjs` (Node.js 18+). Two starter tests
   should pass. This does NOT establish the missing Unicode behavior.
5. Open Codex in that directory with workspace-write/on-request permissions.
   Read-only agent settings are defaults; current parent runtime overrides
   may be reapplied to children. Verify actual permissions before delegation.

## Task / 任务

Use two `repo_explorer` agents in parallel. One checks the collision-key
implementation; the other checks tests and edge cases. Both are read-only.
Wait for both summaries. Assign one `implementation_worker` to add NFC
normalization and regression tests, changing only the two `.mjs` files.
Then assign `reviewer` to inspect the actual diff and rerun the tests.
Do not commit, push, install packages, or rename any files.

派两个 repo_explorer 分别只读查实现和测试;等摘要齐全后, 一个
implementation_worker 增加 NFC 规范化及回归测试;最后 reviewer 独立检查
实际 diff 与测试。不提交、不推送、不安装包、不改真实文件名。

Acceptance / 验收:

- `collisionKey("café.txt") === collisionKey("cafe\u0301.txt")`.
- Surrounding whitespace and ASCII case tests still pass.
- Empty input returns an empty string; distinct names stay distinct.
- No filesystem reads or writes are added.
- No claim is made that NFC + lowercasing models every filesystem's
  collision rules. This is a string-key exercise, not a safe rename engine.

## A reference change / 一种参考改法

After trying it, compare the core line to:

```js
return name.trim().normalize("NFC").toLowerCase();
```

Add tests, inspect the diff, and record the actual commands and results.
The reference line is not a substitute for independent verification.

## Optional tools / 可选工具

No external MCP server or skill is required. To add official documentation
lookup to a role, append only after reviewing the endpoint:

```toml
[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
```

To change an installed skill's enabled state, use its real absolute path:

```toml
[[skills.config]]
path = "/absolute/path/to/installed-skill/SKILL.md"
enabled = true
```

The latter path is a placeholder, not an executable default. Omitted MCP
and skill settings inherit from the parent; adding one server does not
remove all others. A local sandbox does not revoke a connected service's
remote write permissions. 后一个路径需替换;不能把新增 server 当成工具白名单。
