From 1cf898f2b32cb480955c67a195e432d6c4ff3f9a Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Sat, 3 Oct 2026 19:19:33 +0900 Subject: [PATCH] Chore: Name branches feat/ and delete them once merged The maintainer's instruction (2026-10-03): feature branches are feat/, never work/; a merge deletes its branch (gh pr merge --delete-branch) along with the local branch and worktree; and merged branches are swept periodically so only main, release and develop stand, release-* snapshots excepted. AGENTS.md section 4 says so, and tests.yml runs on pushes to feat/** instead of work/**. python-multiplatform did the same in its PR #100. documentation corrected: AGENTS.md section 4. ci: tests.yml push trigger moves to feat/**. Tests unchanged. Refs #58 --- .github/workflows/tests.yml | 2 +- AGENTS.md | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 143b9a4..c6a9f07 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: pull_request: branches: [develop] push: - branches: ['work/**'] + branches: ['feat/**'] workflow_dispatch: # Daily against python-multiplatform develop as it is that day: the binder's contract moves under # this package without a pull request here, and #41 found out only at the next PR. diff --git a/AGENTS.md b/AGENTS.md index 3df1803..62da9d2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,8 +47,8 @@ build caches, model weights, `node_modules`) into every worktree is how 86 workt | Branch | Who writes to it | |---|---| -| `work/` | You. All work happens here. | -| `develop` | Merged into from work branches after verification. Never commit to it directly. | +| `feat/` | You. All work happens here; never `work/`. Deleted once merged. | +| `develop` | Merged into from feature branches after verification. Never commit to it directly. | | `release` | **CI only.** Not a standing branch: CI regenerates it from every push to `develop`, in the main-only file layout, and opens the PR into `main`. It may not exist. Never write to it. | | `main` | **Pull request from `release` only.** Never push or merge to it directly. | @@ -56,6 +56,11 @@ build caches, model weights, `node_modules`) into every worktree is how 86 workt root, and `docs/` keeps only its subdirectories (no Markdown files directly under `docs/`). CI runs `tools/release/sync-release.sh` (`.github/workflows/release-sync.yml`) to produce that layout; do not hand-edit `release` or `main`. +Only `main`, `release` and `develop` stand. A feature branch is deleted when it merges, with its +local branch and worktree. Sweep periodically: delete every remote and local branch that +`git branch -r --merged origin/develop` lists (keep `release-*` snapshots), and land or report any +unmerged branch that has gone stale. + ### Issues and pull requests Every new feature goes through an issue and a pull request: @@ -63,10 +68,10 @@ Every new feature goes through an issue and a pull request: 1. Before starting, search the repository's issues (`gh issue list --state all --search ""`). 2. If no issue covers the work, open one (`gh issue create`) stating what and why, and the completion criterion — which tests must pass. -3. Work on a `work/` branch, push every commit, and open a pull request into `develop` +3. Work on a `feat/` branch, push every commit, and open a pull request into `develop` whose body contains `Closes #`. -4. Merge into `develop` through that pull request (`gh pr merge`), not by a local merge, so the - issue is linked. +4. Merge into `develop` through that pull request (`gh pr merge --merge --delete-branch`), not by a + local merge, so the issue is linked and the branch goes; remove the local branch and worktree too. 5. Then close the issue yourself: `gh issue close --comment "Landed in develop via #"`. GitHub's `Closes #N` only fires when a pull request merges into the default branch (`main`), and these pull requests merge into `develop`.