agentleFS
intent-driven-devintent-driven-dev/intent-driven-template/.agents/skills/openspec-git-discipline/SKILL.md

openspec-git-discipline

Skill185 starsChanged 32 days agoMITView on GitHub

Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. intent-driven-dev/skills★ 9100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every OpenSpec state change must cross main before the next lifecycle phase depends on it.

    line 12
  2. Distinctive:

    Never create commits, branches, or merges unless the user explicitly asks.

    line 18
  3. Very specific:

    Verify openspec/changes/<change>/ has no uncommitted proposal files.

    line 36
  4. Distinctive:

    Verify the proposal change exists on main before applying from any branch/worktree.

    line 37
  5. Distinctive:

    Use this language if the proposal has not reached main:

    line 39
  6. Distinctive:

    Run git branch --show-current and git status --short.

    line 45
  7. Distinctive:

    Stop if not on main.

    line 46
  8. Distinctive:

    Stop if implementation work has not been merged back to main.

    line 47
  9. Distinctive:

    All of these mean: pause, explain the boundary, and ask the user to make the git state explicit.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

OpenSpec Git Discipline

Core Rule

Every OpenSpec state change must cross main before the next lifecycle phase depends on it.

  • Propose/continue artifacts may be drafted on a branch, but must be committed and merged to main before apply starts.
  • Apply may run on main, a branch, or a worktree only if that exact proposal change is already available on main.
  • Archive may run only from main after implementation is merged back.

Never create commits, branches, or merges unless the user explicitly asks.

Gates

MomentGate
Before proposePrefer main; if not, warn and ask whether to continue intentionally.
During continueBefore creating the next artifact, ask the user to commit completed artifact changes or explicitly continue without that checkpoint.
After proposeAsk the user to commit proposal artifacts; offer to create a PR branch for review.
Before applyConfirm the proposal change is committed on main; then apply may run from main, a branch, or a worktree.
Before archiveStop unless implementation is merged back to main and archive is running from main.
After archiveAsk the user to commit archive/spec sync changes.

Required Checks

Before apply:

  1. Run git status --short.
  2. Verify openspec/changes/<change>/ has no uncommitted proposal files.
  3. Verify the proposal change exists on main before applying from any branch/worktree.

Use this language if the proposal has not reached main:

I should not apply this yet because the proposal change has not reached main. A proposal can be drafted on a branch, but apply must start only after that proposal state is available on main. Please merge or commit the proposal to main first, then I can apply from main, a branch, or a worktree.

Before archive:

  1. Run git branch --show-current and git status --short.
  2. Stop if not on main.
  3. Stop if implementation work has not been merged back to main.

Use this language:

I should not archive this yet because archive must run from main after implementation is merged back. Verify makes a change eligible to merge; it does not replace the merge.

Red Flags

  • Applying a proposal that exists only on the current branch/worktree.
  • Treating worktree visibility as proof that the proposal reached main.
  • Creating the next continue artifact without asking about committing the previous one.
  • Archiving from a feature branch or before implementation is merged to main.
  • Auto-committing, branching, or merging without explicit user approval.

All of these mean: pause, explain the boundary, and ask the user to make the git state explicit.

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.