stacked-mr
Autonomous AFK mode: build a stack of owner-scoped PRs/MRs, then batch-review them to the bar. Human merges. Use on /stacked-mr or 'stack PRs'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Autonomous AFK mode: build a stack of owner-scoped PRs/MRs, then batch-review them to the bar. Human merges. Use on /stacked-mr or 'stack PRs'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compatibility launcher for the code-review agent. Delegates a GitHub/GitLab PR review to Codex: deterministic preflight does recon, then Codex scores six axes into one artifact at .TerMinal/reviews/<pr>/<sha>.md (v2) or .reviews/<pr>/<sha>.md (legacy v1). Use on /code-review or 'review this PR'.
The evaluator role in a /loop. Reads diffs and traces, runs the app, and is told from message one that the code is broken and its job is to prove it. Grades the contract and scores taste. Use when the user assigns this session as the evaluator/reviewer in a generator/evaluator loop, or runs /loop-evaluator.
The generator role in a /loop. Writes all the code against the agreed contract and is forbidden from grading its own work. Use when the user assigns this session as the generator/implementer in a generator/evaluator loop, or runs /loop-generator.
Run an implementation session that accepts supervisor prompts in TerMinal loop-engineering workflows. Use when the user starts two parallel Claude/Codex sessions and says this one is the implementer, worker, coding agent, or should wait for supervisor/human-stand-in prompts.
The planner role in a /loop. Turns a vague human goal into a gradable contract of testable assertions and never touches code. Use when the user assigns this session as the planner in a generator/evaluator loop, or runs /loop-planner.
Run a long-running, self-driving agent loop (the 'let the model drive' pattern) with separated planner/generator/evaluator roles, an on-disk contract, and taste scoring. Use when the user runs /loop, says 'loop on this', 'let it run for a while', 'set up a generator/evaluator loop', or wants one agent to keep building-and-grading against a rubric until it converges. This is the operator entry point that sets up state and drives the cycle; the loop-planner, loop-generator, and loop-evaluator skills are the three roles it coordinates.
| name | stacked-mr |
| description | Autonomous AFK mode: build a stack of owner-scoped PRs/MRs, then batch-review them to the bar. Human merges. Use on /stacked-mr or 'stack PRs'. |
Builds a stack of PRs/MRs without reviewing each one immediately, then runs a
batch review pass at the end. The canonical owner, knowledge, artifact, and
follow-up contract is
docs/workflow/agent-process.md.
main
-> 0012-first-ticket PR #1 base: main
-> 0013-second-ticket PR #2 base: 0012-first-ticket
-> 0014-third PR #3 base: 0013-second-ticket
Each PR/MR diff is against its parent branch. The human merges bottom-up.
Merging caution (learning 0002): squash-merging the stack in a tight loop races GitHub's retargeting — children get auto-closed when a parent branch is deleted, or merge INTO the parent instead of main. Before each merge, wait until the PR's
baseRefNameis main and it isMERGEABLE(or retarget it explicitly withgh pr edit N --base main). Seedocs/learnings/0002-stacked-squash-merge-race.md.
For each runnable ticket:
now / next ticket by priority within the requested scope.in-progress.docs/workflow/agent-process.md.Do not run the code-review agent during this phase except for explicit
trust-critical escape hatches.
code-review agent pass per PR/MR in isolated worktrees.request-changes branches, re-review only affected PRs/MRs, and restack
children with --force-with-lease to feature branches only.The per-MR reviews above are the automated merge gate. They are not a human
read surface — a human would still open N diffs. Produce ONE combined
/digest over the whole stack so the human reviews the
batch once. Because each MR is stacked on the previous, the stack tip already
contains the union of the batch — the joint diff is free.
base=main, source = the stack-tip branch, as a
draft labeled do-not-merge:
# GitLab
glab mr create --target-branch main --source-branch "$STACK_TIP" --draft \
--label do-not-merge \
--title "[BATCH] <scope> — joint review (do not merge)" \
--description "Combined read surface for !#A..!#N. Members merge individually, bottom-up."
# GitHub: gh pr create --base main --head "$STACK_TIP" --draft --title ... --label do-not-merge
Record its number as $JOINT and the member MR numbers.code-review agent once on the joint MR (full main...stack-tip
diff). That same codex session also emits the /digest patch — no extra
model run. Around it run the deterministic digest stages with
--joint "<member-csv>" (see /digest Stages 1 + 3).The joint MR is never merged. Close it when the stack has fully landed (it's a
draft + do-not-merge; a future merge-sync extension can automate this).
stuck
with the artifact path and continue independent work.Stack of N PRs/MRs, merge bottom-up:
#1 0012-first-ticket base: main approve / tests pass
#2 0013-second-ticket base: 0012-first-ticket request-changes
Include PR/MR URLs, ticket ids, owners, bases, verdicts, test status, HITL items, delegated artifact paths, and follow-up tickets.
--force-with-lease.do-not-merge — a read surface only. Never merge it,
never let it gate the member MRs.