Treat Daiki's implementation request as the authoritative source of permission, and fix the purpose, acceptance criteria, and non-goals. Normal GitHub implementation proceeds through PR, merge, main sync, and workspace collection. Explicit boundaries such as "changes only" or "up to PR" take precedence. Do not require plan approval or confirmation for each commit.
Plan, workspace, and records
- For multiple paths or high/critical changes,
plan-changecarry the investigation over into the internal plan. For small changes, a short purpose and verification policy are sufficient, and a plan document or subagent is not mandatory. Assign a Plan ID for delivery (e.g.fix-example-v1) and a version. - Main decides how to divide investigation and implementation. Explorer can be used for independent investigation, and a local model is optional. Main handles requirement interpretation, implementation, integration, and acceptance. Follow AGENTS's single-writer and risk-based review.
- Leave a history of decisions and verification on related Issues. If tracking is needed, such as multiple stages, root-cause investigation, or high risk, and no Issue exists, create one; for minor changes, use the PR as the record. Do not let old Issue descriptions or other people's comments take precedence over the current request or authority.
- Read the parent checkout's origin, branch, HEAD, index, and working tree, and protect existing changes. If Git identity is missing, pass AGENTS's name and email to
codex-worktree prepare --user-name <名前> --user-email <メール>. The helper preserves a valid existing identity. - In the parent checkout, run
codex-worktree create --issue <番号> --branch <branch>; if there is no Issue, omit--issueand run. Because the helper fetches origin's default branch, do not assume a manual fetch. For an initialized remote, create it while preserving the parent's files even if there are no local commits. If the remote is empty, specify and confirm the content of the initial publication and the target branch. - For resumption, verify with
doctor --task-id <ID>とresume --task-id <ID>. For ainterruptedthat is still being created, verify withrecoverand resume. Preserve and stop on diffs of unknown ownership or unexpected remote/path/branch. - Fix the execution target for all edits and tests to the dedicated worktree. For Git writes, use
git -C <worktree絶対path> ...; if SSH_ASKPASS is present in the environment, useenv -u SSH_ASKPASS git -C .... Call the helper from the parent checkout as a single command. - Match the format of branches, commits, and PRs to recent related history. If there is no convention, use Japanese, use a general prefix and English kebab-case for branches, and do not use
codex/.
If operation details or recovery conditions are needed, read theworktree guide. Do not create a worktree for normal investigation; useCODEX_WORKTREE_MODE=single-checkoutonly for rollback explicitly specified by Daiki.
Converge implementation and verification
Implement what is needed for the acceptance criteria, and verify starting from tests close to the affected areas. Regression tests should observe the changed behavior or failure conditions. Treat README, CONTRIBUTING, build manifests, and workflows as the authoritative source for verification.
Before build, in the parent checkout, callcodex-worktree artifacts --task-id <ID>and specify the returned area as Cargo'sCARGO_TARGET_DIR, the VM output destination, and Podman's--root/--runroot. Do not place source, deliverables, the sole evidence, or production data there. After terminating and unmounting processes, VMs, and containers, collect them.
main's self-review focuses on the fixed diff, affected paths, acceptance conditions, high-risk boundaries, and matters that tests cannot guarantee. Treat only findings that have an expected result, actual result, rationale, and post-fix verification method as actionable, and fix the same cause together. After fixing, perform the relevant verification and necessary review on a new head. If the same-condition failure or fixes with no progress continue, reconsider the cause and verification method, and if external state is needed, leave a resume point.
Separate risk from human judgment.
- low/medium: main's self-review is sufficient.
- high: one independent review. critical: add a specialist review only if another high-risk boundary actually exists.
- autonomous: Judge based on request scope, authority, rollback, and tests/CI/review. Regardless of risk, use
record-review. - human-required: Daiki's judgment is required, such as product decisions, scope expansion, new authority/costs, irreversibility, or acceptance of significant residual risk. Prepare concrete results and discussion points, and only after an explicit answer, use
approve-review. - blocked: Required verification failure, dirty/stale/conflict, identity mismatch, unknown network/API, etc. Do not bypass technical gates with approval.
Safety boundaries such as CI/workflow, Ruleset, hook, AGENTS, Skills, helper, and installer are high or above. Once the necessary verification passes, do not expand into out-of-scope improvements. Leave human-oriented purpose, decisions, changes, verification, and residual items in the PR/Issue, and do not post machine-audit JSON or digests.
commit・PR・delivery
If only explicit changes are requested, after proportionate verification and self-review, collect the deliverables withclean-artifacts, report the diff, and retain the source. If the request is up to a PR, stop without merging. The following applies to normal GitHub implementation.
- Check source, added lines, binaries, secrets, and unnecessary local information, and stage only explicit paths. Confirm the fixed diff and verification results, and create a commit that follows the history. Do not overwrite author, signoff, or AI attribution.
- Confirm that the parent checkout snapshot is immutable, and only on a single work branch
push -u origin HEAD:refs/heads/<branch>. - Create a Draft PR specifying the repository, base, and head. In the body, self-containedly describe the purpose, decisions, changes, verification, and residual items, and link related Issues. Pass the body from a temporary file with
--body-file. - high/criticalは
review-branchperform an independent review at the fixed SHA. main refutes/confirms actionable items, and fixes, verifies, commits, and pushes the confirmed causes together. Do not reuse the old SHA's review/CI for the new SHA. codex-delivery record-review|approve-reviewrecord the review result withdeliverand make Ready/merge with--task-id <ID> --pr <番号> --head <SHA> --plan-id <Plan ID> --plan-version <版>. The common arguments are--risk <risk> --tests-passed. For review, specify--independent-review-passed; for high or above,--specialist-review-passedonly if an additional specialist review was performed.- After merging, with the same specification
codex-delivery finish.issue-NAutomatically record the task in Issue N. For a normaltask-*when attaching a related Issue tofinish --issue <番号>also specify it. The helper confirms that the PR body and fixed head are saved in the Issue, then physically deletes the main-synced worktree and artifacts, and reflects the result in the same record. Keep the PR body as a work record that remains understandable after deletion. - If the Issue update or cleanup fails, resume with the same specification. If the Issue API fails before deletion, keep the workspace; if the update fails after deletion, distinguish between physically collected and awaiting record update. Do not bypass by using
gh pr merge、rm、worktree remove/prunedirectly.
CI follows the repository's configuration. Utakata uses the opt-in self-hosted CI and does not force it on WSL2 or other repositories. The existing CI execution approval label is handled within the repository's permissions. Do not fall back from workflow waiting/failure to hosted/local. Only when neither the live base nor the fixed head has a workflow, add--gate-mode local-validationto each delivery command. Existing Actions checks require completion and a success-type conclusion, and do not omit substantive verification by skipping alone.
strict mode requires the live Ruleset gate. For explicitly authorized private repositories,github-free-privateshall be high or above, and do not automatically select based on API errors. For gate details, limited recovery of main sync, and sandbox retry, readdelivery guidewhen necessary.--sandbox-retryis retried once under the same UID only when a token issued by the helper exists.
Report completion based on the results of PR/commit, verification and review, Issue record, main sync, and workspace collection. Explicitly state anything not performed and any remaining risks. Close an Issue only when the completion conditions for that entire Issue are met.