agentleFS
NagiliantNagiliant/Genesis-Legacy-V2/skills/genesis-closure/SKILL.md

Closure

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Git closure — push the branch and open a PR. The ONLY step that performs git operations. Never auto-merges.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Every pipeline commit carries a subject prefix that matches what the diff actually touches:

    line 13
  2. Very specific:

    Read project-state.md (active feature, mode) and approvals/master.json to detect which closure this is:

    line 23
  3. Very specific:

    Pre-flight: Verify you are on the feature branch ({NNN}-{feature-name}) and that there are commits to push.

    line 30
  4. Very specific:

    Optional cleanup (--cleanup, post-merge only): verify the PR is merged (refuse if not), then git checkout main && git pull, git branch -d …

    line 37
  5. Distinctive:

    MUST NOT merge. The human merges.

    line 41
  6. Distinctive:

    MUST NOT run during a dirty mid-phase state — closure assumes the work it is pushing is already committed and accepted.

    line 42
  7. Distinctive:

    MUST scope the push to the feature branch.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 review record yet. PR targets the feature branch. Title: {feature} G{N} — {group title}.
  • Feature closure (end of feature): a review record exists. PR targets main. Title: {feature-name}.

Process

  1. Pre-flight. Verify you are on the feature branch ({NNN}-{feature-name}) and that there are commits to push.
  2. Push: git push -u origin {branch-name} (skip with a note if already up to date).
  3. 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).
  4. Create the PR: gh pr create --title "{title}" --body "{body}" --base {target} — base is the feature branch for group closure, main for feature closure. Never auto-merge.
  5. Report the PR URL, title, base, and changed-file count.
  6. 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"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.