Codework
Use codework when the user wants the full coding delivery cycle, not just a plan or a patch.
Default Outcome
Deliver one merge-ready PR automatically, then stop for human-in-the-loop
approval before merging.
Do not merge on standing authority alone. Even if the user says "merge까지",
"끝까지", "ship it", or invokes codework in a repo where prior standing
instructions allow merge, ask a final HITL merge question after review and
checks pass. Merge and sync only after the user gives an affirmative response
to that final question in the current thread/session.
If the user does not approve, declines, or is unavailable, stop at a
merge-ready PR with review and CI evidence.
Delivery Grain
Treat one user goal as one PR by default.
Use multiple focused commits inside that PR when it improves reviewability:
planning docs, implementation, tests, review fixes, CI fixes, and small
follow-up documentation can all belong to the same goal PR.
Do not split review feedback, test fixes, DCO/CI fixes, or small follow-up
adjustments into a new PR merely because a commit already exists. Keep fixing
the active PR until the goal is review-clean and check-clean.
Split only when the next change has a different user-facing goal, independent
release or rollback value, materially different risk, a blocking external
decision, or explicit user instruction to stack/split PRs.
Workflow Spine
codework is not a mini planning shortcut. Its normal path is:
$ralplan -> $ultragoal or $ultrawork -> PR -> $code-review -> CI/DCO -> HITL merge approval -> merge/sync
Use the real workflow surfaces whenever they are available:
- In an attached OMX CLI/tmux runtime, invoke the corresponding OMX workflows
(
omx ralplan, omx ultragoal or omx ultrawork, and code review).
- In Codex App or another non-tmux surface, load and follow the named skills
directly as native skill workflows.
- Do not replace the ralplan gate with a casual local summary for normal
codework. A compact inline plan is only a fallback for tiny, reversible
changes or when the full workflow surface is unavailable.
Loop
Next Goal
- If the user gives a concrete goal, use it.
- If the goal is optional or says "next", choose the next highest-leverage repo task from current evidence: recent analysis, TODOs, failing checks, PR comments, roadmap docs, review findings, or obvious maintainability debt.
- Do not invent product direction that depends on taste, business priority, credentials, production access, or destructive changes. For those, ask one concise question.
- State the chosen goal, why it is next, and the stop condition.
Evaluation / Ralplan
- Run the real
$ralplan gate before editing by default.
- The gate must produce the desired outcome, constraints, rejected options,
risks, acceptance criteria, verification commands, and stop condition.
- Use a compact inline ralplan only for truly tiny, reversible changes where
a full gate would add ceremony without improving safety.
- If architecture, security, migrations, public behavior, workflow contracts,
release metadata, or ambiguous scope are involved, mini-ralplan is not
enough.
Implementation Lane
- Use
$ultragoal after ralplan when the work has sequential stories,
durable checkpoints, or finish-until-done pressure.
- Use
$ultrawork after ralplan when independent implementation, test,
docs, or review lanes can run in parallel.
- Execute directly only for tiny single-file fixes, and state why the
ultragoal/ultrawork lane is unnecessary while preserving this skill's
verification, review, PR, CI, and merge gates.
- Keep commits reviewable. Prefer multiple small signed commits over one noisy commit.
Verification
- Run targeted tests first, then broader gates appropriate to the repo.
- For Python repos, typical gates are unit tests,
compileall, generated-doc checks, and git diff --check.
- If a check fails, fix root cause and rerun the failing check before continuing.
- Record any validation gap explicitly.
PR
- Create a branch with the default
codex/ prefix unless the repo says otherwise.
- Commit with DCO/signoff when required.
- Push and open one PR for the cycle automatically.
- PR body must include summary, verification, review expectations, and any known risks.
- Keep later review/CI fixes for this same goal in the same PR as additional focused commits.
Code Review
- Run the real
$code-review against the PR or branch diff before merge.
- In an attached OMX CLI/tmux runtime, use the repo's OMX code-review
surface. In Codex App or another non-tmux surface, load and follow the
$code-review skill directly.
- If independent review lanes are unavailable, report that review is unavailable and do not call the PR merge-ready unless the user explicitly waives review.
- Fix actionable review findings, push updates, rerun verification, and rerun review when the diff materially changes.
CI / DCO / Merge
- Wait for required checks, including DCO.
- If checks fail, inspect logs, fix, push, and wait again.
- When local verification passed, review is clear or waived, required checks pass, and the branch is mergeable, ask a final HITL merge question before merging.
- The HITL question must summarize the PR URL, review result, CI/DCO result, local verification, merge strategy, and local sync plan, then ask whether to merge now.
- Do not merge until the user gives an affirmative response to that final HITL question. If the user declines, defers, or does not answer, stop at the merge-ready PR.
- Prefer merge commits when preserving commit structure matters; use squash only if repo policy or user request says so.
- After merge, push or fetch the merged
main as needed so local main and the default remote agree.
- Sync the user's local runnable surface when the repo ships a CLI, plugin, app, or generated tool the user runs from this machine. Use the repo's established local install/update command; for Loop, run
npm install -g . from the repo root.
- Confirm the synced local command or app starts and reports the expected version/help/status, then confirm a clean worktree.
Stop Conditions
Stop with a concise report when one of these is true:
- PR is merged, remote/default
main and local main agree, the user's local runnable surface is synced when applicable, and the worktree is clean.
- PR is merge-ready and awaiting HITL merge approval.
- PR is merge-ready and the user declined or deferred merge approval.
- A blocker requires user authority, credentials, destructive action, production access, or a materially branching decision.
- The same blocking condition repeats after reasonable fix attempts.
Final Report
Include:
- Goal chosen and why.
- PR URL and merge commit, if merged.
- HITL merge approval status.
- Remote/default branch sync result.
- Local runnable sync result, when applicable.
- Changed files or high-level change summary.
- Review result.
- CI/DCO status.
- Local verification commands.
- Remaining risks or next suggested
codework goal.
1---2name: codework3description: Run the recurring repo delivery loop: choose or clarify the next goal, run the real ralplan gate, implement through ultragoal or ultrawork, open a PR, run code review, wait for CI/DCO, fix failures, then ask for human-in-the-loop merge approval before merging and syncing. Use when the user says codework, asks for the next implementation cycle, or wants planning-to-PR automation with explicit HITL before merge.4---56# Codework78Use `codework` when the user wants the full coding delivery cycle, not just a plan or a patch.910## Default Outcome1112Deliver one merge-ready PR automatically, then stop for human-in-the-loop13approval before merging.1415Do not merge on standing authority alone. Even if the user says "merge까지",16"끝까지", "ship it", or invokes `codework` in a repo where prior standing17instructions allow merge, ask a final HITL merge question after review and18checks pass. Merge and sync only after the user gives an affirmative response19to that final question in the current thread/session.2021If the user does not approve, declines, or is unavailable, stop at a22merge-ready PR with review and CI evidence.2324## Delivery Grain2526Treat one user goal as one PR by default.2728Use multiple focused commits inside that PR when it improves reviewability:29planning docs, implementation, tests, review fixes, CI fixes, and small30follow-up documentation can all belong to the same goal PR.3132Do not split review feedback, test fixes, DCO/CI fixes, or small follow-up33adjustments into a new PR merely because a commit already exists. Keep fixing34the active PR until the goal is review-clean and check-clean.3536Split only when the next change has a different user-facing goal, independent37release or rollback value, materially different risk, a blocking external38decision, or explicit user instruction to stack/split PRs.3940## Workflow Spine4142`codework` is not a mini planning shortcut. Its normal path is:4344`$ralplan -> $ultragoal` or `$ultrawork -> PR -> $code-review -> CI/DCO -> HITL merge approval -> merge/sync`4546Use the real workflow surfaces whenever they are available:4748- In an attached OMX CLI/tmux runtime, invoke the corresponding OMX workflows49 (`omx ralplan`, `omx ultragoal` or `omx ultrawork`, and code review).50- In Codex App or another non-tmux surface, load and follow the named skills51 directly as native skill workflows.52- Do not replace the ralplan gate with a casual local summary for normal53 codework. A compact inline plan is only a fallback for tiny, reversible54 changes or when the full workflow surface is unavailable.5556## Loop57581. **Next Goal**59 - If the user gives a concrete goal, use it.60 - If the goal is optional or says "next", choose the next highest-leverage repo task from current evidence: recent analysis, TODOs, failing checks, PR comments, roadmap docs, review findings, or obvious maintainability debt.61 - Do not invent product direction that depends on taste, business priority, credentials, production access, or destructive changes. For those, ask one concise question.62 - State the chosen goal, why it is next, and the stop condition.63642. **Evaluation / Ralplan**65 - Run the real `$ralplan` gate before editing by default.66 - The gate must produce the desired outcome, constraints, rejected options,67 risks, acceptance criteria, verification commands, and stop condition.68 - Use a compact inline ralplan only for truly tiny, reversible changes where69 a full gate would add ceremony without improving safety.70 - If architecture, security, migrations, public behavior, workflow contracts,71 release metadata, or ambiguous scope are involved, mini-ralplan is not72 enough.73743. **Implementation Lane**75 - Use `$ultragoal` after ralplan when the work has sequential stories,76 durable checkpoints, or finish-until-done pressure.77 - Use `$ultrawork` after ralplan when independent implementation, test,78 docs, or review lanes can run in parallel.79 - Execute directly only for tiny single-file fixes, and state why the80 ultragoal/ultrawork lane is unnecessary while preserving this skill's81 verification, review, PR, CI, and merge gates.82 - Keep commits reviewable. Prefer multiple small signed commits over one noisy commit.83844. **Verification**85 - Run targeted tests first, then broader gates appropriate to the repo.86 - For Python repos, typical gates are unit tests, `compileall`, generated-doc checks, and `git diff --check`.87 - If a check fails, fix root cause and rerun the failing check before continuing.88 - Record any validation gap explicitly.89905. **PR**91 - Create a branch with the default `codex/` prefix unless the repo says otherwise.92 - Commit with DCO/signoff when required.93 - Push and open one PR for the cycle automatically.94 - PR body must include summary, verification, review expectations, and any known risks.95 - Keep later review/CI fixes for this same goal in the same PR as additional focused commits.96976. **Code Review**98 - Run the real `$code-review` against the PR or branch diff before merge.99 - In an attached OMX CLI/tmux runtime, use the repo's OMX code-review100 surface. In Codex App or another non-tmux surface, load and follow the101 `$code-review` skill directly.102 - If independent review lanes are unavailable, report that review is unavailable and do not call the PR merge-ready unless the user explicitly waives review.103 - Fix actionable review findings, push updates, rerun verification, and rerun review when the diff materially changes.1041057. **CI / DCO / Merge**106 - Wait for required checks, including DCO.107 - If checks fail, inspect logs, fix, push, and wait again.108 - When local verification passed, review is clear or waived, required checks pass, and the branch is mergeable, ask a final HITL merge question before merging.109 - The HITL question must summarize the PR URL, review result, CI/DCO result, local verification, merge strategy, and local sync plan, then ask whether to merge now.110 - Do not merge until the user gives an affirmative response to that final HITL question. If the user declines, defers, or does not answer, stop at the merge-ready PR.111 - Prefer merge commits when preserving commit structure matters; use squash only if repo policy or user request says so.112 - After merge, push or fetch the merged `main` as needed so local `main` and the default remote agree.113 - Sync the user's local runnable surface when the repo ships a CLI, plugin, app, or generated tool the user runs from this machine. Use the repo's established local install/update command; for Loop, run `npm install -g .` from the repo root.114 - Confirm the synced local command or app starts and reports the expected version/help/status, then confirm a clean worktree.115116## Stop Conditions117118Stop with a concise report when one of these is true:119120- PR is merged, remote/default `main` and local `main` agree, the user's local runnable surface is synced when applicable, and the worktree is clean.121- PR is merge-ready and awaiting HITL merge approval.122- PR is merge-ready and the user declined or deferred merge approval.123- A blocker requires user authority, credentials, destructive action, production access, or a materially branching decision.124- The same blocking condition repeats after reasonable fix attempts.125126## Final Report127128Include:129130- Goal chosen and why.131- PR URL and merge commit, if merged.132- HITL merge approval status.133- Remote/default branch sync result.134- Local runnable sync result, when applicable.135- Changed files or high-level change summary.136- Review result.137- CI/DCO status.138- Local verification commands.139- Remaining risks or next suggested `codework` goal.