SPB Git

Repository Public

POLICY.md 3.8 KB

# Git governance policy (SP Boucher development standard v1.0.0)

Forge. SPB Git — https://git.spboucher.ai — is the official remote of every eligible SP Boucher project. It is a directory of bare repositories on the gateway (SSH alias gitsrv): srv/git/<slug>.git is public (served by the forge), srv/git-private/<slug>.git is reachable over SSH only. It is not GitHub, GitLab or Gitea; repositories are created over SSH with the existing keys/agent (no token in any file). Config: config.json.

Defaults. New eligible project → sp-git init: git on main, .gitignore, README, public repository https://git.spboucher.ai/<kebab-slug>, headers, secret scan, first commit, push, verification. Description and topics are always set (sp-git init --description … --topics … or sp-git meta).

Not public (keep local with --no-remote, or --private, and say why): explicit request, confidential project, personal data, protected or unpublished research whose release is not authorised, co-authors' or students' work, non-redistributable third-party code, protected institutional information, infrastructure secrets, uncertain publication rights. An existing private repository is never made public; an existing origin is never replaced; no duplicate repository is created (sp-git init refuses a slug that already has history unless --adopt).

Cycle. analyze → implement → headers → review the diff → relevant tests → secret scan → license check → commit → push → verify remote → continue. One atomic Conventional Commit (English) per finished step, pushed at once: <type>(<scope>): <description> with types feat, fix, perf, refactor, security, docs, test, style, build, ci, chore, release, revert. Only the files of the step are staged; foreign local changes are never swept in.

Integrity. Forbidden without Simon-Pierre Boucher's explicit authorization: force push, remote history rewriting, repository or remote-branch deletion, destructive reset/clean over uncommitted work, replacing a remote, changing visibility or access rights, removing legitimate attribution. The PreToolUse hook denies these; after an explicit authorization given in the conversation the command is re-run prefixed with SP_AUTHORIZED=1.

Security. sp-security-scan runs before every commit (changes) and push (unpushed commits) — in sp-git and in the PreToolUse hook for raw git commit / git push. High-severity findings block publication and the control is never bypassed; reviewed false positives go to .sp-security-allow (rule:<id>, path:<glob>, or a regex) or carry sp-allow-secret on the line.

Push failures. Local work is preserved; network errors are retried; a rejected push triggers fetch + rebase of the local commits when the tree is clean, aborted on conflict; nothing is ever forced; a push is reported successful only after git ls-remote shows the local HEAD on origin.

Releases. Semantic Versioning, tag vMAJOR.MINOR.PATCH: sp-git release <version> [--test-cmd "…"] requires a CHANGELOG section, a clean tree, compliant headers and a clean scan, then commits release: prepare version X, tags, pushes commit and tag and verifies both. Binary assets: forge CLI spbgit release upload <repo> <tag> <file>.

# Commands

bash
sp-git init [--name slug] [--description "…" --topics a,b --website url] [--private|--no-remote] [--adopt]
sp-git status [--json]      sp-git commit -m "type(scope): …" [files…|--all] [--push]
sp-git push [--tags]        sp-git verify        sp-git sync        sp-git audit [--json]
sp-git release <version> [--test-cmd "…"]        sp-git meta --description … --topics …
sp-git doctor               sp-git version
sp-security-scan [--changes|--staged|--unpushed|--tree|--files f…] [--all] [--strict] [--json]
Files main
Menu

Theme