Git Flow Procedure
All development follows the project's Git Workflow.
Full spec: see GIT_WORKFLOW.md in the project's standards (.agents/ or skeleton).
Branch Creation
Before writing any code, create a branch.
Direct-Commit Mode check (first): Read .memory/CONFIG.md. If Direct-Commit Mode | on, OR the user's current request is prefixed with direct:, verify the change qualifies (see refusal list in docs/AUTONOMY-MODES.md):
- If it qualifies → skip this section entirely. Stay on
[DEFAULT_BRANCH]. Surface theDIRECT-COMMIT MODE ACTIVE — committing directly to [DEFAULT_BRANCH] (no PR).banner. Jump to Commit Messages. - If it does NOT qualify → surface
Refusing Direct-Commit Mode — <reason>; switching to full flow.and continue with branch creation as normal.
Otherwise (mode off, or user did not prefix direct:) — proceed with branch creation:
- [ ] Switch to
[DEFAULT_BRANCH]and pull latest:
```
git checkout [DEFAULT_BRANCH] && git pull
```
- [ ] Create a new branch with the correct naming convention:
- Ticket given:
BOARD-XXXX-kebab-description - Tech debt fix (no ticket):
debt-id-kebab-description
```
git checkout -b <branch-name>
```
- [ ] Never push directly to
[DEFAULT_BRANCH].
Commit Messages
- Ticket work:
[BOARD-XXXX] short description - Tech debt:
[DEBT-ID] short description - Commits must describe the change clearly.
- No empty commits. No WIP commits on shared branches.
Commit Granularity
- Default: one commit per logical change. A "logical change" is a single coherent unit that could stand on its own in
git log— one bug fix, one new function, one refactor pass, one doc update. Not one giant end-of-workflow commit. - Honor user-specified commit granularity for the duration of the workflow. If the user says "smaller commits", "atomic commits", "commit per file", "commit per logical unit", or equivalent, that granularity persists until the workflow ends — it is not a one-shot instruction for the next commit only. The workflow plan must include a
Commit granularity:line stating the chosen strategy so it stays visible across steps. - When user instruction is ambiguous ("smaller" — smaller than what?), ask once for clarification before the first commit. Don't guess.
- Defer to existing conventions in the project's GIT_WORKFLOW.md when there is a conflict, but only after surfacing the conflict to the user.
Opening a PR
When implementation is complete.
Direct-Commit Mode check (first): If Direct-Commit Mode was active for this task (verified in Branch Creation), skip this entire section. The commit was made directly to [DEFAULT_BRANCH]; there is no feature branch to push and no PR to open. Push directly:
git push origin [DEFAULT_BRANCH]
Then jump to the end-of-turn summary. Task-completion still runs in full.
Otherwise — proceed with the PR flow:
- [ ] Push the feature branch:
```
git push -u origin <branch-name>
```
- [ ] Open a PR to
[DEFAULT_BRANCH]with: - Title:
[BOARD-XXXX] short descriptionor[DEBT-ID] short description - Body: what changed, why, how to test, risk level
- [ ] Do NOT merge — a human reviewer must approve.
- [ ] Squash merge policy applies to feature/bug/chore branches.
- [ ] Present each PR URL on its own line in the end-of-turn summary — one URL per line, format
PR #N: <url>or just<url>. Never comma-separate or pack into a paragraph; the user needs to click each independently. When a turn opens multiple PRs (memory branch + main branch is the common case), list both:
```
PR #42 (memory): https://github.com/.../pull/42
PR #43 (main): https://github.com/.../pull/43
```
Rules
- Never merge your own PR.
- Minimum 1 approval + CI pass before merge.
- No changes during discussion — wait for explicit "go ahead" / "implement" / "yes".
- No commits without an implementation instruction from the user.
- When implementation is authorised, execute the full flow end-to-end
(branch → implement → commit → PR) without pausing for additional approval.
Autonomy Modes (Direct-Commit, Autopilot)
agentskel has two modes that reduce friction during agent work, toggled in .memory/CONFIG.md:
- Direct-Commit Mode — skips the branch + PR ceremony for trivial work. Agent commits directly to
[DEFAULT_BRANCH]. One-shot prefixdirect:available. - Autopilot Mode — after a plan is approved, agent proceeds within the plan's scope without per-step approval prompts. Significant changes, destructive ops, and out-of-scope work still pause.