Agent Orchestration Spike Testing Sequence¶
Purpose: run the Codex CLI spike from a clean sandbox worktree that mirrors the source repo, using Poetry for dependencies.
Preconditions¶
- Python 3.12.4 available
- Poetry installed
- Codex CLI installed + authenticated (for
--agent codex) - Source repo path:
.../tnh-scholar
1) Create sandbox worktree (one-time)¶
2) Sync sandbox to source repo (every run)¶
Run from the source repo root:
./scripts/sync-sandbox.sh \
--sandbox /path/to/tnh-scholar-sandbox \
--source-repo /path/to/tnh-scholar \
--branch <branch>
Notes:
- This resets/cleans the sandbox worktree and applies the source repo diff.
- The branch must exist in the sandbox worktree.
3) Install deps in sandbox (when lockfile changes)¶
4) Run the spike (Codex CLI)¶
poetry run python -m tnh_scholar.cli_tools.tnh_conductor_spike.tnh_conductor_spike \
--agent codex \
--task "List files in src/"
Artifacts are written to .tnh-gen/runs/<run_id>/ in the sandbox worktree:
transcript.mdtranscript.raw.logdiff.patchresponse.txtrun.jsonevents.ndjson