agentleFS
Sapere-IASapere-IA/sdd-onboarding-kit/skills/optional/git-discipline/SKILL.md

git-discipline

Skill19 starsChanged 37 days agoMITView on GitHub

Work cleanly with branches, diffs, commits, and PR descriptions without risky git actions. Use when the developer asks for commits, branches, or PR text tied to SDD tasks.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-audit.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 4

    Distinctive

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    If a branch is needed, follow the project's naming convention.

    line 63
  2. Very specific:

    When review.md exists for the task, build the PR description from it instead of re-deriving:

    line 77
  3. Distinctive:

    Do not commit, push, merge, or open PRs unless asked.

    line 100
  4. Distinctive:

    Never force-push, rewrite shared history, or skip hooks without explicit approval recorded in the conversation.

    line 101
  5. Distinctive:

    Never commit secrets; check the diff for credentials before committing.

    line 103

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “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

Git discipline

Purpose

Produce clean, traceable git artifacts (branches, commits, PR descriptions, release notes) tied to SDD tasks, while keeping every mutating git action permission-gated. This skill supports the SDD workflow; it never bypasses it — no git text or operation substitutes for spec approval, review, or the documentation phase.

Rules

  1. Inspect git status (and the relevant diff) before changes — know what state the working tree is in before touching it.
  2. Never overwrite user changes. Uncommitted developer work is untouchable: no checkout/restore/stash over it, no edits that silently revert it. If it blocks the task, stop and ask.
  3. Do not commit unless asked.
  4. Do not push unless asked.
  5. Do not force-push unless explicitly approved — and document it (what was rewritten, why, and the approval) in the conversation and the task's review notes.
  6. Do not merge PRs unless explicitly instructed. Merging is a human decision (see also reference/autonomy-policy.md — never autonomous).
  7. When commits are requested, reference the task/spec (task ID, spec slug) in the message, following the project's convention from AGENTS.md / questions.md §8 answers.

A project may pre-authorize specific operations in its git policy (e.g. "commit after each task"); everything not pre-authorized stays ask-first.

When to use

  • The developer asks to commit, branch, or open a PR.
  • Writing a commit message, PR description, or release-note entry for completed SDD work.
  • Inspecting repository state before starting changes.

When not to use

  • As permission to perform git operations the developer did not request.
  • For resolving complex history surgery (interactive rebase, force-push recovery) — surface the situation and let the developer drive.

Required inputs

  • The task/spec reference the change traces to.
  • The project's git policy from AGENTS.md (branch naming, commit conventions, whether the agent may commit/push at all).
  • For PR descriptions: the task's review.md, when it exists.

Procedure

  1. Inspect git status and the diff before any action; never overwrite uncommitted developer changes.
  2. If a branch is needed, follow the project's naming convention; ask if none is defined.
  3. For commits, fill templates/commit-message.template: task/spec reference, what changed, why. Check the diff for secrets first.
  4. For PRs, fill templates/pr-description.md.template from the reviewer's output (see mapping below).
  5. For release notes/changelogs, fill templates/release-note.md.template — user-visible behavior only, no internal task mechanics.
  6. Confirm before each mutating operation unless the project's git policy explicitly pre-authorizes it.

Reviewer output → PR description

When review.md exists for the task, build the PR description from it instead of re-deriving:

PR template fieldSource in review.md
Summary / what changedTraceability table + findings resolved
Spec referenceThe spec slug the review belongs to
Checks runCommands run section
Review statusDecision section (+ deferred non-blocking findings)
Safety notesHigh-risk review record, visual verification, freshness evidence

A PR description must not claim more than the review supports — if the review is pending, say so rather than implying approval.

Output artifact

Commits, branches, PR descriptions, or release-note entries — only those explicitly requested — with traceable text generated from the templates in templates/ (copied from the kit's templates/git/ during onboarding and adapted to the project's conventions).

Safety constraints

  • Do not commit, push, merge, or open PRs unless asked.
  • Never force-push, rewrite shared history, or skip hooks without explicit approval recorded in the conversation.
  • Never commit secrets; check the diff for credentials before committing.
  • Respect protected branches and the project's git policy at all times.

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.