SP Boucher Development Standard
The installable implementation of the SP BOUCHER GLOBAL SOFTWARE ENGINEERING & GIT GOVERNANCE STANDARD for Claude Code: one official source header on every SP Boucher-owned source file, and every eligible project versioned on SPB Git with incremental, verified, secret-scanned commits and pushes.
It installs into the Claude Code user directory (~/.claude) of a machine and stays active in every session, every
project and every agent: a permanent directive in CLAUDE.md, five hooks in settings.json, three skills, four
command-line tools and the policy files they read. Python 3.8+ and git are the only requirements; nothing calls an
external API and no credential is stored anywhere.
What is installed
Path under ~/.claude |
Content |
|---|---|
CLAUDE.md |
marked block SP BOUCHER GLOBAL MANDATORY DEVELOPMENT STANDARD (existing content untouched) |
settings.json |
hooks SessionStart, PreToolUse (Bash), PostToolUse (Write/Edit), SubagentStop, Stop (existing hooks kept) |
bin/ |
sp-header, sp-git, sp-security-scan, sp-dev-doctor (linked into ~/.local/bin and Homebrew's bin) |
hooks/sp-source-header, hooks/sp-git-governance, hooks/sp-security |
hook entry points |
skills/sp-source-header, skills/sp-git-governance, skills/sp-development-standard |
global skills |
standards/ |
VERSION, identity.json, source-header/{TEMPLATE,POLICY}.md, languages.json, exclusions.json, git-governance/{POLICY.md,config.json}, engine lib/spstd/ |
tests/sp-development-standard/ |
the test suite |
backups/sp-development-standard/<timestamp>/ |
what was there before each install, update or removal |
Install, update, verify, remove
./install.sh # idempotent, non-interactive; backs up CLAUDE.md, settings.json and previous files first
./verify.sh [--quick] [--tests]
./update.sh # git pull --ff-only, install, verify
./uninstall.sh # removes tools, hooks, skills and the CLAUDE.md block; backups are kept
./uninstall.sh restore [--from <timestamp>] # put CLAUDE.md and settings.json back as they were
sp-dev-doctor [--quick] [--json] # any time, from anywhereMacLustr nodes (macOS and Linux, over the existing SSH aliases, in parallel):
./deploy-nodes.sh --detect M5M36 M3U96a M4M64a … # only where Claude Code is present
./deploy-nodes.sh --verify M5M36 M3U96a … # doctor onlyThe kit is copied to ~/.sp-development-standard on the node and installed there. No secret travels. The optional
machine-local file ~/.claude/standards/local/overrides.json (repositories whose attribution is under review, extra
secret patterns) is not part of this repository; deploy-nodes.sh copies the operator's copy when it exists.
The tools
sp-header inspect|generate <file> sp-header apply <file>… [--touch] [--new] [--upgrade]
sp-header check|fix|audit|report <dir> sp-header doctor|version
sp-git init [--name slug] [--description "…" --topics a,b] [--private|--no-remote] [--adopt]
sp-git status | commit -m "type(scope): …" [files…] [--push] | push | verify | sync | audit
sp-git release <MAJOR.MINOR.PATCH> [--test-cmd "…"] | meta | doctor | version
sp-security-scan [--changes|--staged|--unpushed|--tree|--files f…] [--all] [--strict] [--json]
sp-dev-doctor [--quick] [--json]- Header engine. Detects language, project root, git metadata, license and ownership; renders the canonical
header in the right comment syntax; keeps shebangs, encoding declarations,
<?php, doctype, build constraints, BOM, line endings, permissions; refuses generated, vendored, third-party, data and secret files; idempotent. Rules:payload/standards/source-header/POLICY.md, template:TEMPLATE.md. - Ownership gate. A header is an authorship claim. Automation stamps only on positive evidence (origin on SPB Git, or a policy file); third-party clones, repositories whose v1 policy does not assert Simon-Pierre Boucher's rights, and repositories under review are left alone.
- SPB Git. The forge is a directory of bare repositories on the gateway, public under
srv/git, SSH-only undersrv/git-private.sp-gitdrives it over SSH with the keys already in place and verifies every push withgit ls-remote. Rules:payload/standards/git-governance/POLICY.md. - Secret scanner. Provider API keys (Anthropic, OpenAI, OpenRouter, GitHub, AWS, Google, Stripe, Slack, Hugging
Face…), private keys, database URLs and URLs with credentials, JWTs, credential assignments,
.envand key files. Findings are masked. High severity blockssp-git commit,sp-git pushand, through the hook, rawgit commitandgit push.
The hooks
| Event | What it does |
|---|---|
| SessionStart | states the policy and the repository context (origin, ownership, uncommitted, unpushed, behind upstream) |
| PreToolUse — Bash | denies force push, remote deletion, history rewriting, origin replacement, destructive reset/clean over uncommitted work, deletion of a forge repository; runs the secret scan before git commit and git push |
| PostToolUse — Write, Edit | in an owned repository: adds the header to a new eligible file, refreshes Last Modified on an edited one; warns about secret files that are not git-ignored; otherwise says why nothing was stamped |
| SubagentStop | repairs headers of the files the session touched; reports secret risks to the subagent |
| Stop | lists edited files left uncommitted, commits left unpushed, repositories without a remote — once, never in a loop |
Limits, by design: hooks see Write/Edit, not files written by Bash or other processes (the Stop check and
sp-header fix cover those); an owner-authorized destructive operation is re-run prefixed with SP_AUTHORIZED=1;
the secret scan has no such override.
Tests
python3 tests/test_standard.py # 28 tests, temporary repositories, fictitious data, no networkCovered: Swift, TypeScript (byte-exact canonical layout), Python with shebang and encoding line, Rust, Metal, HTML, SQL, YAML; edit, rename, creation date kept, modification date refreshed; license detection; no duplication; third-party, generated, JSON, dependency and migration exclusions; CRLF, BOM, non-UTF-8, permissions; v1 variants and restricted policies; git initialisation, remote creation, duplicate refusal, incremental commits, push and verification; secret detection and blocked publication; private repositories; conflicts; network failure; releases; every hook; clean-environment installation, idempotence, fresh-process check, removal and restoration.
Version
1.0.0 — see CHANGELOG.md.
Author
Simon-Pierre Boucher — Professor of Finance, Université du Québec en Outaouais (UQO) SP Boucher · https://spboucher.ai · https://git.spboucher.ai
- Contact: contact@spboucher.ai
- Development: dev@spboucher.ai
- Support: support@spboucher.ai
- Security: admin@spboucher.ai
License
None specified (no license file in this repository). All rights reserved where applicable.