SPB Git

Repository Public

SKILL.md 3.6 KB 56 lines markdown

1---2name: sp-git-governance3description: SPB Git governance for SP Boucher projects — create and publish repositories on https://git.spboucher.ai (public by default), make incremental Conventional Commits, push and verify each validated step, scan for secrets before publication, cut SemVer releases, and handle push failures without destructive operations. Use when starting a project, committing, pushing, releasing, or when a repository has no remote, unpushed commits or uncommitted finished work.4---56# SPB Git governance78Tool: `~/.claude/bin/sp-git` (on PATH). Policy: `~/.claude/standards/git-governance/POLICY.md`.9SPB Git is the owner's own forge (bare repositories over SSH alias `gitsrv`), not GitHub/GitLab/Gitea.1011## New project12```bash13sp-git init --description "One or two sentences (150–300 characters)." --topics swift,macos,ai [--website https://…]14```15Initialises git (`main`), writes `.gitignore` and a README skeleton if absent, creates the public repository16`https://git.spboucher.ai/<kebab-slug>`, applies headers, scans, commits, pushes and verifies. Then write the real17README (name, description, features, architecture, install, usage, tests, deployment, security, author, license,18links) — never invented features, metrics or screenshots.1920Do **not** publish, and say why: explicit request, confidential or personal data, protected/unpublished research,21co-authors' or students' work, non-redistributable third-party code, uncertain rights → `sp-git init --no-remote`22(local) or `--private` (SSH-only). Never make an existing private repository public, never replace an `origin`,23never create a duplicate (`--adopt` attaches to an existing repository of the same name).2425## Every finished step26```bash27git status && git diff                       # review; foreign changes from another session are committed apart28<run the relevant tests / build>29sp-git commit -m "feat(auth): implement biometric authentication" path/one path/two30sp-git push                                  # scan unpushed commits → push → ls-remote verification31```32- Conventional Commits in English: feat, fix, perf, refactor, security, docs, test, style, build, ci, chore, release.33- Atomic: only the files of the step (`--all` only when everything belongs to it).34- `sp-git commit --push` does both. Raw `git commit` / `git push` stay allowed: the PreToolUse hook scans them.35- A push is successful only when `sp-git verify` (or the push output) says `verified: origin/<branch> = <sha>`.36- On remote nodes (remote-first rule) run the same commands on the node that owns the working tree.3738## Failures and safety39- Push rejected: `sp-git sync` (fetch, rebase local commits when clean, push). Conflict → resolve by hand; never40  force. Forge unreachable: work stays local; report the blocker; retry later.41- Secret scan blocked: remove the secret, git-ignore the file, rotate the credential if it was ever committed.42  Reviewed false positive → `.sp-security-allow` or `sp-allow-secret` on the line. Never bypass to make a push pass.43- Force push, history rewrite, repository/branch deletion, destructive reset/clean, remote replacement and visibility44  changes need the owner's explicit authorization; then re-run prefixed with `SP_AUTHORIZED=1`.45- Several agents on one repository: one writer per branch; otherwise separate branches or worktrees (`sp-git` takes a46  per-repository lock for commit and push).4748## Releases49```bash50sp-git release 1.2.0 --test-cmd "swift test"   # CHANGELOG section required; VERSION/package.json bumped; tag v1.2.051```52Never declare a stable version when build, tests, headers or scan fail.5354## Diagnose55`sp-git status`, `sp-git audit`, `sp-git doctor`, `sp-security-scan --all`.56
Files main
Menu

Theme