From c197c24047cdaa78f695a3eec5a67704114e9b63 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 20 May 2026 15:28:58 +0900 Subject: [PATCH] docs(agents): require merge commits for PRs --- .agents/skills/work-with-pr/SKILL.md | 6 +++--- AGENTS.md | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.agents/skills/work-with-pr/SKILL.md b/.agents/skills/work-with-pr/SKILL.md index 100277b24..86bdd6011 100644 --- a/.agents/skills/work-with-pr/SKILL.md +++ b/.agents/skills/work-with-pr/SKILL.md @@ -17,7 +17,7 @@ Phase 3: Verify Loop → Unbounded iteration until ALL gates pass: ├─ Gate A: CI → gh pr checks (bun test, typecheck, build) ├─ Gate B: review-work → 5-agent parallel review └─ Gate C: Cubic → cubic-dev-ai[bot] "No issues found" -Phase 4: Merge → Squash merge, worktree cleanup +Phase 4: Merge → Merge commit, worktree cleanup ``` @@ -278,8 +278,8 @@ Once all three gates pass: ### Merge the PR ```bash -# Squash merge to keep history clean -gh pr merge "$PR_NUMBER" --squash --delete-branch +# This repository requires merge commits. Never use --squash or --rebase here. +gh pr merge "$PR_NUMBER" --merge --delete-branch ``` ### Sync .omo state back to main repo diff --git a/AGENTS.md b/AGENTS.md index 0de0c7bdc..0bbe59a76 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -252,6 +252,13 @@ bunx oh-my-opencode mcp-oauth login # Tier-3 MCP OAuth (PKCE + DCR | `web-ci.yml` | push/PR to master/dev touching `packages/web/**`, `docs/**`, or the workflow file itself | format-check, lint, type-check, next build, opennextjs-cloudflare build | | `web-deploy.yml` | push to master/dev touching `packages/web/**`, `docs/**`, or the workflow file itself, OR manual dispatch | Cloudflare Workers deploy via `cloudflare/wrangler-action@v3` (requires `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` secrets) | +## PR MERGE POLICY + +- **PRs into `dev` MUST use merge commits.** +- Use `gh pr merge --merge --delete-branch` after CI, review-work, and Cubic pass. +- **NEVER squash merge or rebase merge** PRs in this repository, even if a generic workflow, skill, or GitHub default suggests it. +- If another instruction says `--squash` or `--rebase`, this repo-level rule overrides it. + ## NOTES - **Logger:** writes `oh-my-opencode.log` to the OS temp dir (`/tmp` on Linux, `/var/folders/.../T/` on macOS, `%TEMP%` on Windows — i.e. Node's `os.tmpdir()`). Rotated at 50 MB; previous segments live at `.1` and `.2` (oldest dropped).