Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: "Closure" description: Git closure — push the branch and open a PR. The ONLY step that performs git operations. Never auto-merges. argument-hint: "[feature] [--cleanup]"
Closure — Git
Closure is the only step that performs git operations. It exists precisely because Accept must do no git. Closure does three things: push the branch, compose a PR description, and open the PR. It never auto-merges — the human merges when ready. Branch cleanup is a separate, optional, post-merge step.
Commit message discipline
Every pipeline commit carries a subject prefix that matches what the diff actually touches:
- Spec-only (no source code) —
brainstorm:/design:/specify:/micro:/northstar:/accept: - Code-touching —
implement: - Both (e.g. an amendment editing spec + code) — the prefix matching the dominant change.
The prefix must not lie about the diff. A spec-only prefix on a commit that also changed source code is a labeling mismatch — fix it with git commit --amend or a rebase, never force past it. You can enforce this with an optional git pre-commit hook (see docs/extending.md), but the discipline stands on its own.
Context detection
Read project-state.md (active feature, mode) and approvals/master.json to detect which closure this is:
- Group closure (mid-feature): no
reviewrecord yet. PR targets the feature branch. Title:{feature} G{N} — {group title}. - Feature closure (end of feature): a
reviewrecord exists. PR targets main. Title:{feature-name}.
Process
- Pre-flight. Verify you are on the feature branch (
{NNN}-{feature-name}) and that there are commits to push. - Push:
git push -u origin {branch-name}(skip with a note if already up to date). - Compose the PR body from the micro specs and commit history:
- Group PR: group title · micro specs implemented (id + one-line summary) · requirements covered (FR/AC from spec frontmatter) · audit results (A1–A5 clean / N findings fixed) ·
git diff --stat. - Feature PR: feature name · 2–3 sentence summary · per-group breakdown · total requirements coverage · audit summary · stats (N specs, N audit cycles, N commits).
- Create the PR:
gh pr create --title "{title}" --body "{body}" --base {target}— base is the feature branch for group closure,mainfor feature closure. Never auto-merge. - Report the PR URL, title, base, and changed-file count.
- Optional cleanup (`--cleanup`, post-merge only): verify the PR is merged (refuse if not), then
git checkout main && git pull,git branch -d {branch},git push origin --delete {branch}. Idempotent.
Constraints
- MUST NOT merge. The human merges.
- MUST NOT run during a dirty mid-phase state — closure assumes the work it is pushing is already committed and accepted.
- MUST scope the push to the feature branch; never push directly to
main.
Natural language triggers
- "close this out"- "push and open a PR"- "ship the group"- "create the pull request"