بنقرة واحدة
land
// Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.
// Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.
Create a well-formed git commit from current changes using session history for rationale and summary; use when asked to commit, prepare a commit message, or finalize staged work.
Investigate stuck runs and execution failures by tracing Symphony and Codex logs with issue/session identifiers; use when runs stall, retry repeatedly, or fail unexpectedly.
Use Symphony's `linear_graphql` client tool for raw Linear GraphQL operations such as comment editing and upload flows.
Pull latest origin/main into the current local branch and resolve merge conflicts (aka update-branch). Use when Codex needs to sync a feature branch with origin, perform a merge-based update (not rebase), and guide conflict resolution best practices.
Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
| name | land |
| description | Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion. |
gh CLI is authenticated.commit skill
and push with the push skill before proceeding.pull skill to fetch/merge origin/main and
resolve conflicts, then use the push skill to publish the updated branch.commit skill,
push with the push skill, and re-run checks.# Ensure branch and PR context
branch=$(git branch --show-current)
pr_number=$(gh pr view --json number -q .number)
pr_title=$(gh pr view --json title -q .title)
pr_body=$(gh pr view --json body -q .body)
# Check mergeability and conflicts
mergeable=$(gh pr view --json mergeable -q .mergeable)
if [ "$mergeable" = "CONFLICTING" ]; then
# Run the `pull` skill to handle fetch + merge + conflict resolution.
# Then run the `push` skill to publish the updated branch.
fi
# Preferred: use the Async Watch Helper below. The manual loop is a fallback
# when Python cannot run or the helper script is unavailable.
# Wait for review feedback: Codex reviews arrive as issue comments that start
# with "## Codex Review — <persona>". Treat them like reviewer feedback: reply
# with a `[codex]` issue comment acknowledging the findings and whether you're
# addressing or deferring them.
while true; do
gh api repos/{owner}/{repo}/issues/"$pr_number"/comments \
--jq '.[] | select(.body | startswith("## Codex Review")) | .id' | rg -q '.' \
&& break
sleep 10
done
# Watch checks
if ! gh pr checks --watch; then
gh pr checks
# Identify failing run and inspect logs
# gh run list --branch "$branch"
# gh run view <run-id> --log
exit 1
fi
# Squash-merge (remote branches auto-delete on merge in this repo)
gh pr merge --squash --subject "$pr_title" --body "$pr_body"
Preferred: use the asyncio watcher to monitor review comments, CI, and head updates in parallel:
python3 .codex/skills/land/land_watch.py
Exit codes:
gh pr checks and gh run view --log, then
fix locally, commit with the commit skill, push with the push skill, and
re-run the watch.origin/main if needed, add a real author commit, and force-push to retrigger
CI, then restart the checks loop.origin/main, merge, force-push, and rerun CI.UNKNOWN, wait and re-check.## Codex Review — <persona> issue comments (not job status) as the signal
that review feedback is available.git push --force-with-lease.## Codex Review — <persona> and include the reviewer’s
methodology + guardrails used. Treat these as feedback that must be
acknowledged before merge.gh api and reply with a prefixed comment.gh api repos/{owner}/{repo}/pulls/<pr_number>/comments
gh api repos/{owner}/{repo}/issues/<pr_number>/comments
gh api -X POST /repos/{owner}/{repo}/pulls/<pr_number>/comments \
-f body='[codex] <response>' -F in_reply_to=<comment_id>
in_reply_to must be the numeric review comment id (e.g., 2710521800), not
the GraphQL node id (e.g., PRRC_...), and the endpoint must include the PR
number (/pulls/<pr_number>/comments).[codex].[codex] and state whether you will address the feedback now or
defer it (include rationale).[codex] ...) as an inline reply to the original review comment using
the review comment endpoint and in_reply_to (do not use issue comments for
this).[codex] ...) in the same place
you acknowledged the feedback (issue comment for Codex reviews, inline reply
for review comments).[codex] issue comment is posted acknowledging the findings.[codex] inline
replies).[codex] Changes since last review:
- <short bullets of deltas>
Commits: <sha>, <sha>
Tests: <commands run>
[codex] update with a brief reason (e.g.,
out-of-scope, conflicts with intent, unnecessary).