git-flow
Project git flow (branches, PR/MR, position check before dev). Use when starting or finishing a dev, branching, opening a PR/MR, merging, or to know which branch to work from.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 20
- Forks
- 7
01 前言 Front Matter
- name
- git-flow
- description
- Project git flow (branches, PR/MR, position check before dev). Use when starting or finishing a dev, branching, opening a PR/MR, merging, or to know which branch to work from.
03 SKILL.md 正文
Git flow
Simplified vanilla git flow. This documents project usage, not git itself.
Business / technical backlogs: see docs/agents/business-backlog.md and
docs/agents/issue-tracker.md (source of truth for the tooling).
What we keep
main: prod, protected; no direct merge (hotfix excepted).develop: global integration; every dev branches from it and merges back into it.integration/<business-ref>-<slug>: integration branch for one business user story, from up-to-datedevelop. Named after the business user story (its reference + a slug), becausegrill-with-docscreates it during grilling — before/to-specgenerates the spec on the technical backlog (so NOT the spec number). The session writes its grilling output (CONTEXT.md, ADRs) here; the integration branch then accumulates the story's sub-tickets.ready-for-agentsub-tickets auto-merge into it after a green local check (build + tests + green Feature Path (FP));integration -> developstays a human decision (where the HP suite is run). Deleted once it merges todevelop— see Cleanup.feature/<ticket-ref>-<slug>: one dev = one branch, from up-to-datedevelop— or from theintegration/*of the business story when the dev implements a sub-ticket of a grilled story.hotfix/<slug>: frommain, on explicit request, PR + manual validation, then ported back ontodevelop.- No
releasebranch until there's a pre-prod.
Workflow
We speak of MR/PR (depending on the technical backlog, see docs/agents/issue-tracker.md). On the git side:
-
New dev: from up-to-date
develop->feature/<ticket-ref>-<slug>; or, if the dev implements a sub-ticket of a grilled business story, fromintegration/*->feature/<ticket-ref>-<slug>. Unless stated otherwise, it ties to one or more business stories (-> technical tickets); if none is known, ask. -
Business story (integration branch):
grill-with-docscreatesintegration/<business-ref>-<slug>from up-to-datedevelop(named after the business story, before/to-spec) and writes its grilling output there./to-specthen creates the spec, then/to-ticketspushes the integration branch and creates the sub-tickets based on it.ready-for-agentsub-tickets PR ->integration/*and auto-merge once the local check is green (project build + tests + the FP green via/agentic-tests, no blocking finding). Keep the integration branch in sync withdevelop(it is long-lived); once it merges todevelop, delete it (see Cleanup).No CI wired by default in the skeleton: the auto-merge gate is the agent running build + tests + the FP locally and merging only if everything is green. An agentic test needs an agent to drive the app: the day a CI exists, it doesn't run the test itself, it triggers an agent — and then it holds the gate.
-
End of dev: PR toward the branch the dev started from (
--base develop, or--base <integration/*>for a sub-ticket), assigning the responsible reviewer (<reviewer to define>); comment the PR link on the business story (moved to "in review"). The agent never merges intodevelop/main: the responsible human validates and merges. Only exception: the auto-merge of aready-for-agentsub-ticket into itsintegration/*(green local check). -
integration/*->develop: human decision. Before the PR, the agent runs the HP suite (/agentic-tests HP) and pastes the result into the PR (pass/fail + findings); if the feature warrants it, it proposes co-creating an HP — at most 3 HP (otherwise: merge two journeys, drop a non-critical one, or graft drive-by). The PR lists the included tickets for a readable batch review. The agent opens the PR and gives the link; never merges. Once a human merges it, the integration branch is done — clean it up (see Cleanup). -
develop->main: human decision. On request, the agent opens the PR and gives the link; never merges.
Cleanup — delete a merged integration branch
An integration/* branch is throwaway: it accumulates one story's sub-tickets, and once it
merges to develop its history is preserved there. Delete it then — a stale integration branch
invites new work onto a branch that is already merged.
- Enable platform auto-delete. Turn on "automatically delete head branches after merge" (GitHub
repo setting) or set "delete source branch" as the MR default (GitLab), so the merge to
developremoves the branch with no manual step. - Otherwise, the agent offers cleanup. When it detects a merged
integration/*branch, it proposes deleting the local and remote branch, and does so only after you approve. Guided, not gated: it offers, never forces (feature branches are out of scope here — this is about the long-lived integration branch).
Detect a merged integration branch, then delete after approval:
git branch --merged develop | grep 'integration/' # local, already merged into develop
git branch -r --merged develop | grep 'integration/' # remote counterpart
git branch -d <branch> # delete local (after approval)
git push origin --delete <branch> # delete remote (after approval)
Before coding — check your position
On the 1st act of dev (code meant to be committed):
git rev-parse --abbrev-ref HEAD # where am I?
git branch --merged develop # already-merged branch = stale
git status -sb # upstream 'gone' = stale; clean tree?
On main, on a stale branch, or on a feature/* unrelated to the requested dev: don't pile on. Explain the cleanest placement (back to up-to-date develop + a new branch) and why, then ask for approval before acting (especially if there are uncommitted changes).
04 同仓库更多 Skills
test-extension-cli
How to drive the internal test extension of PDO from a node session, with `pdo ext test`.
visual-diff
Compare before/after screenshots pixel by pixel and flag the regions that moved.
playwright-capture
Capture full-page screenshots of a local web app with Playwright, at desktop and mobile widths.
annotate-screenshots
Annotate app screenshots with Pillow — boxes, arrows and numbered callouts on what changed.
a11y-audit
Run an axe-core accessibility audit on each page and list the violations by impact.
verify-factory
Re-runnable health check for the factory wiring in this repo. Probes both backlogs, triage labels, tooling auth, the agentic driver, the build-factory scaffold and context, that the factory artifacts are versioned (not gitignored), git-flow health, and the US template; reports pass/fail, offers to fix or create what's missing, and signposts the next step. Guided, not gated — it never blocks. Run it anytime to see where the factory stands.