Repository Public
1---2name: sp-source-header3description: SP Boucher official source header — generate, validate, fix and audit the mandatory header of SP Boucher-owned source files (Swift, TypeScript, Python, Rust, Go, C/C++, Metal, SQL, HTML, shell, YAML and more) with the local `sp-header` engine. Use when creating or modifying source files, renaming files, auditing a repository's header compliance, or deciding whether a file may carry the header (ownership, third-party code, generated files).4---56# SP Boucher source header78The header is written by the engine, never by hand: `~/.claude/bin/sp-header` (also on PATH).9Canonical template: `~/.claude/standards/source-header/TEMPLATE.md`; rules: `~/.claude/standards/source-header/POLICY.md`.1011## What happens automatically12The PostToolUse hook runs after every Write/Edit: in a repository with established SP Boucher ownership it adds the13header to a new eligible file and refreshes `Last Modified` on an edited one. When it reports "header added", the14file changed on disk — re-read before the next edit and never add a second header. Files written through Bash or15other tools are not seen by the hook: run `sp-header fix <dir>` or `sp-header apply <file>` yourself.1617## Decide ownership before stamping18A header asserts that Simon-Pierre Boucher is the author. Stamp only SP Boucher-owned code.19- `sp-header inspect <file>` shows `ownership` (owned / unknown / foreign / restricted) and why.20- `unknown` (new project, no remote yet): if it is his project, `sp-git init` then headers apply; otherwise add none.21- `foreign` / `restricted` (third-party origin, co-authored paper, student or client work, repository under review,22 `"headers": false`): do not stamp. `--force-owner` exists only for a human-verified case.23- Never fabricate author, license, dates, website or repository. Unknown values stay `Not specified` / `Unknown`.2425## Commands26```bash27sp-header inspect <file> sp-header generate <file>28sp-header apply <file>… [--touch] [--new] [--upgrade]29sp-header check <dir> sp-header fix <dir> [--dry-run]30sp-header audit <dir> sp-header report <dir> [--out report.md]31```32- New file created outside Write/Edit: `sp-header apply --new <file>`.33- Substantive edit made outside Write/Edit: `sp-header apply --touch <file>`.34- Renamed or moved file, new remote, new LICENSE: `sp-header fix <dir>` refreshes File / Repository / License and35 keeps `Created`.36- Earlier SP Boucher variants (v1 `spb-header`) are valid and kept; convert one only on request with `--upgrade`.37- Before a commit: `sp-header check .` must exit 0 in an owned repository (`sp-git commit` does it for staged files).3839## Never stamped40JSON, lock files, generated or minified files, dependencies, build output, data, models, media, keys, `.env`,41migrations and fixtures, anonymous-submission folders, files with a third-party notice; LaTeX/BibTeX only by an42explicit `sp-header apply`. Per-repository exclusions: `.sp-standard.json` → `"exclude": ["glob"]`.43