agentleFS
willink-osswillink-oss/willink-claude-kit/skills/codex-build/SKILL.md

codex-build

Skill0 starsChanged 4 months agoMITView on GitHub

i-Willink 標準開発フローを Codex で実行するための 5 phase adapter。Claude Code の /build と同期し、Codex subagents はユーザーが明示した場合のみ使う。

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. 0 are common, 10 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read skills/dev-standards/SKILL.md before starting substantial work.

    line 12
  2. Very specific:

    If the task touches UI, also read skills/a11y-standards/SKILL.md.

    line 13
  3. Very specific:

    If present in a downstream repository, read .claude/skills/project-standards/SKILL.md for project-specific conventions.

    line 15
  4. Very specific:

    If reviewing a diff in a downstream repository, read .claude/agent-memory/dev-reviewer/MEMORY.md when present.

    line 16
  5. Very specific:

    Treat commands/build.md and the four Claude role contracts in agents/ as canonical:

    line 17
  6. Distinctive:

    Use Codex subagents only when the user explicitly asks for sub-agents, delegation, or parallel agent work.

    line 26
  7. Distinctive:

    When subagents are authorized, keep delegated tasks concrete, bounded, and read-only unless the user explicitly asked for parallel …

    line 27
  8. Very specific:

    Prefer rg / rg --files for search, preserve unrelated user changes, and verify with the repo's actual commands.

    line 28
  9. Very specific:

    Follow the dev-explorer contract.

    line 36
  10. Very specific:

    Follow the dev-planner contract when the change is non-trivial: more than one file, more than about 50 lines, or meaningful architectural …

    line 46
  11. Distinctive:

    If the user explicitly requested agent delegation, a read-only planning subtask may be delegated, but the main Codex agent owns the final …

    line 50
  12. Distinctive:

    Follow the plan unless new repo facts require a change.

    line 63
  13. Distinctive:

    Keep edits scoped to the task.

    line 64
  14. Distinctive:

    Avoid unrelated refactors and speculative abstractions.

    line 66
  15. Very specific:

    Run dev-tester and dev-reviewer behavior after implementation.

    line 70
  16. Distinctive:

    Run all configured quality gates, even when an earlier command fails.

    line 78
  17. Distinctive:

    Read the full diff and changed files in context.

    line 85
  18. Distinctive:

    Check spec adherence, code quality, error handling, security, accessibility, tests, standards, and scope discipline.

    line 86
  19. Distinctive:

    Use Conventional Commits if the user asks Codex to commit.

    line 99
  20. Very specific:

    When started as /build --from oneshot/state.json (a person interrupted an unattended /oneshot run with oneshot/STOP, Ctrl-C, or an …

    line 104
  21. Very specific:

    If status is still running, first confirm with the user that oneshot/STOP was placed.

    line 107

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

codex-build — Codex Adapter For The 5 Phase Flow

This skill adapts the canonical Claude Code /build flow in commands/build.md for Codex. The Claude Code files remain the source of truth; this skill explains the Codex execution model where platform behavior differs.

Canonical Inputs

  • Read skills/dev-standards/SKILL.md before starting substantial work.
  • If the task touches UI, also read skills/a11y-standards/SKILL.md. Accessibility is decided in Phase 2, not audited afterwards.
  • If present in a downstream repository, read .claude/skills/project-standards/SKILL.md for project-specific conventions. Do not create a separate Codex copy.
  • If reviewing a diff in a downstream repository, read .claude/agent-memory/dev-reviewer/MEMORY.md when present. Keep that Claude path as shared project memory.
  • Treat commands/build.md and the four Claude role contracts in agents/ as canonical:
    • dev-explorer
    • dev-planner
    • dev-tester
    • dev-reviewer

Codex Operating Rules

  • Codex stays on the main critical path for implementation and fixes. Phase 3 and Phase 5 are not delegated.
  • Use Codex subagents only when the user explicitly asks for sub-agents, delegation, or parallel agent work. If the user did not authorize that, execute the same role behavior locally.
  • When subagents are authorized, keep delegated tasks concrete, bounded, and read-only unless the user explicitly asked for parallel implementation with disjoint ownership.
  • Prefer rg / rg --files for search, preserve unrelated user changes, and verify with the repo's actual commands.
  • A person is in the loop: state a one-line plan before the first action, and end with a short recap — what changed, what verified it (command and exit code), and what is needed from the user. Put status notes in the same message as the next action; stop to ask only when you cannot continue without the user, or before anything irreversible (deleting data, force-pushing, changing anything outside the repository).

Phase 1: Impact Exploration

Follow the dev-explorer contract. Run this phase only when the task spans 3+ independent areas; otherwise inspect locally.

Codex mapping:

  • Without explicit subagent authorization: search and read the relevant areas in the main Codex session.
  • With authorization: spawn up to 3 explorer agents for orthogonal read-only questions, then continue useful local work while they run.

Return only decision-useful context: summary, key files, conventions observed, open questions, and recommended follow-up.

Phase 2: Implementation Planning

Follow the dev-planner contract when the change is non-trivial: more than one file, more than about 50 lines, or meaningful architectural risk.

Codex mapping:

  • Build the plan in the main Codex session by default.
  • If the user explicitly requested agent delegation, a read-only planning subtask may be delegated, but the main Codex agent owns the final implementation decisions.

The plan must identify files to change, existing utilities to reuse, implementation steps, tests, and rollback path.

For UI work the plan must also state, per new/changed interactive element, its accessible name, role and state, plus how the layout behaves at 200% text. Write "a11y: N/A (no UI change)" when it does not apply — a blank section reads as "not considered".

Phase 3: Implementation

The main Codex agent implements the change. Do not delegate sequential implementation to another agent.

Implementation rules:

  • Follow the plan unless new repo facts require a change.
  • Keep edits scoped to the task.
  • Reuse existing helpers and local patterns.
  • Avoid unrelated refactors and speculative abstractions.

Phase 4: Verification

Run dev-tester and dev-reviewer behavior after implementation.

Codex mapping:

  • Without explicit subagent authorization: run quality gates and perform the code review locally.
  • With authorization: verification may run in parallel through read-only agents while the main Codex session handles non-overlapping follow-up work.

Tester behavior:

  • Detect the stack from repo files.
  • Run all configured quality gates, even when an earlier command fails.
  • For UI diffs, also run the a11y static gate (python3 scripts/a11y-static-check.py --root . [--baseline .a11y-baseline.json]) and the project's a11y tests. Exit 3 means zero files were scanned — that is UNKNOWN, never a pass.
  • Report PASS, PARTIAL, or FAIL with commands run, failures, skipped tests, and suggested fix scope.

Reviewer behavior:

  • Read the full diff and changed files in context.
  • Check spec adherence, code quality, error handling, security, accessibility, tests, standards, and scope discipline. On UI diffs, a missing accessible name or role is CRITICAL, not a nitpick.
  • List as findings only the problems that block the merge, each with file:line, why it is wrong, and how to show it fails (a reproduction or the test that would go red); prefix each with BLOCKER. Anything that cannot be shown failing, and every improvement idea, goes under "Not blocking".
  • Report PASS, CONDITIONAL, or FAIL. PASS only when the reviewer would merge it (zero blocking findings).

Phase 5: Fixes And Commit

The main Codex agent fixes issues surfaced in Phase 4.

  • Address tester/reviewer findings one by one.
  • Repeat Phase 4 up to 2 loops when needed.
  • Use Conventional Commits if the user asks Codex to commit.
  • Split large changes into logical commits when committing.

Resuming From An Interrupted /oneshot

When started as /build --from oneshot/state.json (a person interrupted an unattended /oneshot run with oneshot/STOP, Ctrl-C, or an escalation), keep the same worktree, branch, and intermediate commits — do not discard them.

  • If status is still running, first confirm with the user that oneshot/STOP was placed; do not edit the worktree while the unattended run is still going.
  • Summarize on one screen first, with denominators: goal, open dod items (result other than green, M of N), violations, note, blocker, interrupted (round, phase, time), pr.
  • Resume by phase: preflight / explore / plan → Phase 2; implement / loop → Phase 3; verify / mutate → Phase 4; deliver / escalate → Phase 5.
  • From here a person is in the loop; the unattended standing instruction of /oneshot does not apply.
  • The contract's DoD still works as verification: python3 <kit>/scripts/oneshot-preflight.py round exit 0 means the DoD is green (never self-report it).

Skip Table

Task typePhase 1Phase 2Phase 4
typo fixskipskiptester only when useful
one-function bug fixskipskiptester + reviewer behavior
small featureskipruntester + reviewer behavior
large featurerunruntester + reviewer behavior
refactorrunruntester + reviewer behavior
docs onlyskipskipskip unless docs validation exists

Failure Modes To Guard Against

  • Early victory: never treat a partial command run as a pass.
  • Telephone game: do not hand off sequential implementation/fix work.
  • Options flooding: keep role mapping to the four canonical contracts.
  • Same-file parallel edits: only parallelize read-only work unless ownership is explicit and disjoint.
  • Context pollution: ask subagents for compact reports, not long transcripts.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.