| name | build |
| description | Execute all phases from BRIEF.md sequentially by orchestrating Codex. Invoke when the user writes "build" or "$build". Claude designs prompts and orchestrates; Codex implements, reviews, and fixes code. No approval gates โ all phases run automatically. Claude never writes code directly.
|
| allowed-tools | Bash, Read, Grep, Glob, Edit, Write, Agent |
Build
Orchestrate Codex execution of phases from tasks/<slug>/BRIEF.md.
Claude is the orchestrator: reads files, crafts prompts, communicates with
the user, reads Codex output, and manages state. Codex is the executor:
writes code, runs tests, produces phase reports.
Hard Rules
- Claude never writes code directly. All code changes go through Codex.
- If no
BRIEF.md exists or Phases is empty, stop and suggest $plan.
- All phases run sequentially without pause. Do not ask for approval
between phases. Execute every remaining phase in one invocation.
- Codex must write a
PHASE_REPORT_<NN>.md after each phase (enforced in
the prompt template).
- Claude must read the previous phase report before crafting the next prompt.
- If Codex execution fails, report the failure. Do not implement as Claude.
- Session resumption: read
BRIEF.md Status + Log + all existing
PHASE_REPORT_*.md files, then continue from where it left off.
Codex Plugin Skills (์ธ์
๋น 1ํ ๋ก๋)
Build ์์ ์ Skill ๋๊ตฌ๋ก ์๋ ํ๋ฌ๊ทธ์ธ ์คํฌ์ ๋ก๋ํ๋ค:
codex:gpt-5-4-prompting โ ํ๋กฌํํธ ๊ตฌ์กฐ, XML ๋ธ๋ก ๊ท์น, ๋ ์ํผ
codex:codex-cli-runtime โ Codex ํธ์ถ ๋ช
๋ น์ด, ํ๋๊ทธ, ์คํ ๊ท์น
๋ก๋๋ ์คํฌ์ด ์ ๊ณตํ๋ ํธ์ถ ๊ณ์ฝ๊ณผ ํ๋กฌํํธ ๊ท์น์ ๋ฐ๋ฅธ๋ค.
Build Loop (Per Phase)
0. Bootstrap โ Codex plugin skills ๋ก๋ (์ธ์
๋น 1ํ)
1. Read โ BRIEF.md + previous PHASE_REPORT_*.md
2. Craft โ Draft Codex prompt
3. Log โ ์คํํ ํ๋กฌํํธ ์์ฝ์ ํ ์ค๋ก ์ถ๋ ฅ
4. Execute โ Invoke Codex (codex:codex-cli-runtime ๊ณ์ฝ์ ๋ฐ๋ผ)
5. Review โ Read Codex output + PHASE_REPORT
5.5 Browser QA โ UI ํ์ผ ๋ณ๊ฒฝ ์ ์๋ธ์์ด์ ํธ QA (conditional)
6. Update โ Update BRIEF.md Status + Log
7. Next โ ๋จ์ ํ์ด์ฆ๊ฐ ์์ผ๋ฉด Step 1๋ก ์๋ ๋ณต๊ท
Step 1: Read
- Read
tasks/<slug>/BRIEF.md, identify the current phase from Status.
- Read all existing
tasks/<slug>/PHASE_REPORT_*.md files.
- Read reference documents listed in
BRIEF.md References section.
Step 2: Craft
codex:gpt-5-4-prompting์ XML ๋ธ๋ก ๊ท์น๊ณผ
${SKILL_DIR}/references/codex-prompt-template.md์ ๋ณ์ ๊ตฌ์กฐ๋ฅผ ๊ฒฐํฉํ์ฌ
Codex ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ค.
Fill variables:
PHASE_PURPOSE โ BRIEF Phase "Purpose"
REFERENCE_CONTEXT โ compressed previous phase reports + relevant doc
excerpts + BRIEF decisions/context (target: under 500 tokens accumulated)
PHASE_GOAL โ BRIEF Phase "Done when" expanded into actionable goal
DONE_CRITERIA โ BRIEF Phase "Done when" + "Verification" merged
PHASE_REPORT_PATH โ tasks/<slug>/PHASE_REPORT_<NN>.md
VERIFICATION_COMMANDS โ BRIEF Phase "Verification"
Step 3: Log
์น์ธ ์์ด ๋ฐ๋ก ์คํํ๋ค. ์คํ ์ ํ ์ค ์์ฝ๋ง ์ถ๋ ฅ:
โถ Phase N: <Name> โ <Purpose ์์ฝ>
Step 4: Execute
codex:codex-cli-runtime์์ ๋ก๋๋ ํธ์ถ ๊ณ์ฝ์ ๋ฐ๋ผ Codex๋ฅผ ์คํํ๋ค.
--write ํ๋๊ทธ๋ก ์ฐ๊ธฐ ๊ฐ๋ฅ ๋ชจ๋๋ก ์คํ.
Step 5: Review
- Read Codex stdout for immediate results.
- Read
tasks/<slug>/PHASE_REPORT_<NN>.md that Codex was instructed to write.
- If the phase report is missing, extract key facts from Codex stdout as
fallback and warn the user.
- Present a summary to the user: what was done, verification result, any
open issues.
Step 5.5: Browser QA (conditional)
PHASE_REPORT์ Files Changed ํ
์ด๋ธ์์ UI ํ์ผ ๋ณ๊ฒฝ ์ฌ๋ถ๋ฅผ ํ์ธํ๋ค.
ํจํด: \.(tsx|jsx|vue|svelte|html|css|scss|sass|less|styled)\b (create-mr๊ณผ ๋์ผ)
UI ํ์ผ์ด ์์ผ๋ฉด ์ด ์คํ
์ ๊ฑด๋๋ด๋ค.
UI ํ์ผ์ด ์์ผ๋ฉด:
package.json scripts์์ dev server ๋ช
๋ น์ด ํ์ธ (dev > start > serve ์ฐ์ ์์)
skills/_shared/references/browser-qa-prompt-template.md์ ๋ณ์๋ฅผ ์นํํ์ฌ ํ๋กฌํํธ ์์ฑ
Agent(subagent_type="general-purpose")๋ก ์๋ธ์์ด์ ํธ ์ํ
- general-purpose ํ์
์ด์ด์ผ Claude in Chrome MCP ๋๊ตฌ(
mcp__claude-in-chrome__*) ์ ๊ทผ ๊ฐ๋ฅ
- ์๋ธ์์ด์ ํธ๊ฐ
tasks/<slug>/QA_REPORT_<NN>.md์ QA ๋ฆฌํฌํธ ์์ฑ
- QA ๋ฆฌํฌํธ๋ฅผ ์ฝ๊ณ ์ต์ข
์์ฝ์ ํฌํจ
QA ๊ฒฐ๊ณผ๋ ์ ๋ณด ์ ๊ณต์ฉ์ด๋ค. ์ด์๊ฐ ๋ฐ๊ฒฌ๋์ด๋ phase ์๋ฃ๋ฅผ ์ฐจ๋จํ์ง ์๊ณ
๋ค์ ํ์ด์ฆ๋ก ์๋ ์งํํ๋ค.
Step 6: Update
- Update
BRIEF.md Status: move completed phase to done, advance current.
- Append to
BRIEF.md Log: date + what was completed + any issues.
Step 7: Next
๋จ์ ํ์ด์ฆ๊ฐ ์์ผ๋ฉด Step 1๋ก ์๋ ๋ณต๊ทํ์ฌ ๋ค์ ํ์ด์ฆ๋ฅผ ์คํํ๋ค.
๋ชจ๋ ํ์ด์ฆ ์๋ฃ ์ ์ต์ข
์์ฝ์ ์ฌ์ฉ์์๊ฒ ์ถ๋ ฅํ๋ค:
- ์๋ฃ๋ ํ์ด์ฆ ๋ชฉ๋ก
- ๊ฐ ํ์ด์ฆ ๊ฒ์ฆ ๊ฒฐ๊ณผ
- ๋ฏธํด๊ฒฐ ์ด์ (์๋ ๊ฒฝ์ฐ)
Reference Document Integration
- Read all documents listed in
BRIEF.md References before each prompt.
- For Socratic design docs: extract "Chosen Direction", "Decisions", "Risks",
and "Constraints" sections.
- For previous phase reports: compress to key facts. Most recent 2-3 in detail;
older ones as 1-2 lines each. Target: under 500 tokens accumulated.
- Users can add arbitrary reference documents to
BRIEF.md References.
Phase Report Format
See skills/build/references/phase-report-format.md for the full spec.
Codex writes tasks/<slug>/PHASE_REPORT_<NN>.md after each phase.
Error Handling
- Codex timeout: Report timeout. Suggest retrying with adjusted prompt or
splitting the phase.
- Codex failure: Report the error. Do not fall back to Claude implementation.
- Phase report missing: Warn user. Extract what's available from stdout.
- Verification failure reported by Codex: Present the failure. Ask user
whether to retry (re-invoke Codex with fix instructions) or mark blocked.
- Browser QA ์คํจ: dev server ๋ฏธ๊ธฐ๋, Chrome ๋ฏธ์ฐ๊ฒฐ ๋ฑ์ผ๋ก QA๋ฅผ ์ํํ ์ ์์ผ๋ฉด
๊ฒฝ๊ณ ๋ง ํ์ํ๊ณ ๋ค์ ์คํ
์ผ๋ก ์งํํ๋ค. phase ์๋ฃ๋ฅผ ์ฐจ๋จํ์ง ์๋๋ค.
Session Resumption
Read BRIEF.md Status + Log + all PHASE_REPORT_*.md โ identify where to
resume โ continue from that phase.