Orchestrate a multi-phase implementation workflow for this repository with artifact files under .ai/<project-name>/<letter>/ using Codex subagents instead of shell-spawned child processes. Use when the user wants one prompt to drive context gathering, planning, plan assessment, implementation, build verification, and review with persistent artifacts, clear phase handoffs, and a thin parent thread. Prefer spawn_agent/send_input/wait_agent, keep heavy pre-build work delegated when possible, and avoid pulling timed-out phases back into the main session.
Run a full implementation workflow with repository artifacts and clear phase boundaries.
Collect:
If screenshots are attached in UI but not present as files, write a brief textual summary into the task artifacts before spawning fresh subagents so later phases can read the requirements without inheriting the whole parent thread.
The workflow is organized around projects. Each project lives in .ai/<project-name>/ and can contain multiple sequential tasks (labeled a, b, c, ... z).
Project structure:
.ai/<project-name>/
about.md # Single source of truth for the entire project
a/ # First task
context.md # Gathered codebase context for this task
plan.md # Implementation plan
review1.md # Code review documents (up to 3 iterations)
review2.md
review3.md
logs/
phase-*.prompt.md
phase-*.progress.md
phase-*.result.md
b/ # Follow-up task
context.md
plan.md
review1.md
logs/
...
c/ # Another follow-up task
...
about.md is the project-level blueprint: a single comprehensive document describing what this project does and how it works, written as if everything is already fully implemented. It contains no temporal state ("current state", "pending changes", "not yet implemented"). It is rewritten, not appended to, each time a new task starts, incorporating the new task's changes as if they were always part of the design.a/, b/, ...) contains self-contained files for that task. The task's context.md carries all task-specific information: what specifically needs to change, the delta from the current codebase, gathered file references, and code patterns. Planning, implementation, and review phases should rely on the current task folder.Create and maintain:
.ai/<project-name>/about.md.ai/<project-name>/<letter>/context.md.ai/<project-name>/<letter>/plan.md.ai/<project-name>/<letter>/review<R>.md (up to 3 review iterations).ai/<project-name>/<letter>/logs/phase-<name>.prompt.md.ai/<project-name>/<letter>/logs/phase-<name>.progress.md for delegated phases.ai/<project-name>/<letter>/logs/phase-<name>.result.mdEach phase-<name>.result.md should capture a concise outcome summary: whether the phase completed, which files it touched, and any follow-up notes or blockers.
Each delegated phase-<name>.progress.md should act as a heartbeat: a tiny monotonic counter plus current step, files being read or edited, concrete findings so far, and the next checkpoint. It is not a final artifact; it exists so the parent can distinguish active research from a truly stuck subagent without rereading large context.
Run these phases sequentially:
about.md and context.md. Use Phase 1F for follow-up tasks.plan.md with numbered steps grouped into phases.Use the phase prompt templates in PROMPTS.md.
Use Codex subagents as the primary orchestration mechanism.
context.md once after Phase 1 and plan.md once after Phase 3. After that, prefer narrow shell checks, file existence checks, and status-line reads instead of rereading full documents or diffs.worker for phases that write files. Use explorer only for narrow read-only questions that unblock your next local step.fork_context off by default. Pass the phase prompt and explicit file paths instead of the whole thread unless the phase truly needs prior conversational context or thread-only attachments.model: gpt-5.4 and reasoning_effort: xhigh for spawned phase agents. If overrides are unavailable, inherit the current session settings.logs/phase-<name>.prompt.md file before you delegate. Use the same prompt file as a checklist if you later need to fall back to same-session execution.logs/phase-<name>.progress.md heartbeat before deep work. The subagent should create or update it early, keep it tiny, and refresh it sparingly: preferably at natural milestones, and otherwise only after a longer quiet stretch such as roughly 5-10 minutes.none. Detailed reasoning belongs in .ai/ artifacts, not in the chat reply.logs/phase-<name>.result.md.wait_agent with a 5-minute timeout by default while a phase is still clearly in progress. Successful completion may wake earlier, so this does not add latency to finished phases.Mark complete only when:
Xh Ym Zs, omitting zero components)context.md or plan.md is not written properly by a phase, rerun that phase in a fresh subagent with more specific instructions. Do not repair it locally before build unless delegation was unavailable from the start.Use plain language with the skill name in the request, for example:
Use local task-think skill with subagents: make sure FileLoadTask::process does not create or read QPixmap on background threads; use QImage with ARGB32_Premultiplied instead.
For follow-up tasks on an existing project:
Use local task-think skill with subagents: my-project also handle the case where the file is already cached
If screenshots are relevant, include file paths in the same prompt when possible.
wait_agent only when the next step is blocked on the result. While the delegated phase runs, do small non-overlapping local tasks such as validating directory structure or preparing the next prompt file.codex exec child processes from this skill.