forked from bchanot/claude
job1: F1 density pass — gitflow section 36→24 lines, all constraints preserved
This commit is contained in:
@@ -163,40 +163,28 @@ All web API endpoints must be versioned from day one: `/api/v1/...`.
|
||||
|
||||
## Version control — gitflow (universal)
|
||||
|
||||
Every git action follows gitflow — inside a skill AND for ad-hoc commits made
|
||||
outside one on direct request. The model is universal across all projects.
|
||||
Every git action follows gitflow — in a skill, or an ad-hoc commit made outside
|
||||
one on request. `main` (prod) · `develop` (integration, off main) · `feature/*`
|
||||
`bugfix/*` + `chore/*` (off develop → develop; `chore/*` = memory/doc
|
||||
maintenance, e.g. standalone `/capitalize` `/close` `/prune-memory`
|
||||
`/reconcile`) · `release/*` (off develop → main + back-merge develop) ·
|
||||
`hotfix/*` (off main → main + develop [+ any open release/*]). `master`→`main`
|
||||
everywhere.
|
||||
|
||||
### Branch model
|
||||
`main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*` +
|
||||
`chore/*` (off develop → develop; `chore/*` = memory/doc maintenance, e.g.
|
||||
standalone `/capitalize` `/prune-memory` `/reconcile`) · `release/*` (off develop →
|
||||
main + back-merge develop) · `hotfix/*` (off main → main + develop [+ any open
|
||||
release/*]). `master`→`main` everywhere.
|
||||
|
||||
### Rules for every git action
|
||||
- **Never commit code directly on `main` or `develop`.** Branch first from the
|
||||
correct base, named `<type>/<name>`. (`.claude/**` memory/config commits are
|
||||
hook-exempt — they follow the work; but *standalone* memory/doc skills branch to
|
||||
`chore/*` via the aiguillage rather than lean on that exemption.)
|
||||
- **Branch + merge via the lib, never by hand** — the directed-merge + hotfix
|
||||
fan-out logic lives there once:
|
||||
`bash ~/.claude/lib/gitflow.sh start <type> <name>` · `… finish`.
|
||||
- **`gitflow finish` (merge) only on an explicit human signal** ("merge it",
|
||||
"feature OK") — never because tests pass, a plan step says "merge", or a verb
|
||||
("ship") implied it.
|
||||
- **Assistance flows** (`/feat` `/bugfix` `/hotfix`) AND **standalone memory/doc
|
||||
skills** (`/capitalize` `/close` `/prune-memory` `/reconcile`, type `chore`)
|
||||
auto-branch on a protected base (the aiguillage); on a working branch they commit
|
||||
in place, never finish.
|
||||
- **New/onboarded projects** get the model + the versioned pre-commit hook via
|
||||
`gitflow init` (init-project STEP 5f, onboard STEP 2.6).
|
||||
|
||||
### Enforcement layers
|
||||
Advisory — it can be forgotten on a long conversation (no reliable oracle). The
|
||||
deterministic backstops are the per-repo **pre-commit hook** (`gitflow init`
|
||||
installs it: blocks code commits on main/develop, exempts `.claude/**` + merges +
|
||||
the root commit) and **Gitea branch protection** on `main`/`develop` (set up by
|
||||
the migration). Don't lean on `--no-verify` to bypass them.
|
||||
Never commit code directly on `main` or `develop`: branch first from the
|
||||
correct base as `<type>/<name>` (`.claude/**` memory/config commits are
|
||||
hook-exempt, following the work). Branch/merge only via the lib, never by hand:
|
||||
`bash ~/.claude/lib/gitflow.sh start <type> <name>` · `… finish`. Run `finish`
|
||||
(merge) only on an explicit human signal ("merge it", "feature OK"), never
|
||||
because tests pass, a plan step says "merge", or "ship" implied it. Assistance
|
||||
flows (`/feat` `/bugfix` `/hotfix`) and the standalone memory/doc `chore`
|
||||
skills auto-branch on a protected base but commit in place on a working branch,
|
||||
never finishing — so those skills branch to `chore/*` via the aiguillage, not
|
||||
the `.claude/**` exemption. New/onboarded projects get the model + the
|
||||
versioned pre-commit hook via `gitflow init`. Advisory, so two deterministic
|
||||
backstops apply: the per-repo pre-commit hook (blocks code commits on
|
||||
main/develop, exempts `.claude/**` + merges + the root commit) and Gitea branch
|
||||
protection on `main`/`develop`. Don't lean on `--no-verify` to bypass them.
|
||||
|
||||
## Security — non-negotiable defaults
|
||||
|
||||
|
||||
Reference in New Issue
Block a user