SPB Git

Repository Public

SOURCE_HEADER_POLICY.md 4.6 KB

# SP Boucher Source Header Policy

Version 1.0 — maintained by Simon-Pierre Boucher (dev@spboucher.ai). Enforced by spb-header.

# 1. Purpose

Every eligible first-party source file carries one standard header that states the project, the maintainer, the verified rights holder, the license and the right contact. The header is metadata: it never changes what a program computes, what a paper says, or who owns anything.

# 2. Rules

  1. One header per file, inserted by the tool, never typed by hand.
  2. Verified facts only. A field that cannot be verified is omitted, not guessed. No SPDX identifier unless the license text matches exactly. No license is added to a repository that has none.
  3. Ownership is never invented. The rights holder comes from the repository's license file, or from a sole-author history for non-research software. Research and teaching repositories without a license file carry a neutral notice until the author confirms the holder (see COPYRIGHT_POLICY.md).
  4. Third-party material is preserved untouched: vendored code, files with another holder's copyright or license notice, generated files, lockfiles, data, models, binaries.
  5. Anonymous submissions stay anonymous. Nothing is written under soumission/, submission/, anonymous/, blind/ and similar directories, nor into files named *anonym* / *blind*.
  6. A change is a pure splice. The engine inserts one comment block after the mandatory first lines of the format (shebang, encoding line, swift-tools-version, //go:build, % !TEX, # syntax=, test-environment pragmas). Bytes outside the header are never re-encoded, re-wrapped or reformatted; line endings and BOM are kept. Files that are not valid UTF-8 are left alone.
  7. Reversible and idempotent. Removing the header gives back the baseline byte for byte; running the tool twice changes nothing.
  8. No private information in a header: no local path, private host, internal address or secret.

# 3. Variants

Variant Used for Content
SPB-FULL first-party source (Python, Go, C/C++, Kotlin…) outside research canonical full header
SPB-APPLE Swift, Objective-C full header in // comments
SPB-RESEARCH source and scripts of research / teaching repositories maintainer, affiliation disclaimer, authorship and data notice
SPB-LATEX .tex, .sty, .cls, .bst 12-line LaTeX header
SPB-BIB .bib no e-mail address (BibTeX reads @ as an entry)
SPB-WEB JavaScript / TypeScript medium header, no classification block
SPB-INFRA shell, Dockerfile, Makefile, MacLustr and infrastructure code medium header, security contact
SPB-MINIMAL CSS, SQL, YAML, TOML, Vue/Svelte, files served to browsers as-is compact attribution
SPB-THIRD-PARTY third-party files preservation only: nothing is written
SPB-GENERATED generated files nothing is written; change the generator
notebook metadata .ipynb metadata.spboucher only; cells, outputs, ids untouched

Description and Created are carried over from a previous identity block or module docstring; Created / Last Modified otherwise come from version-control history and are kept stable once written. Version is not stamped per file unless the repository policy pins it.

# 4. Formats without an in-file header

JSON, Markdown/MDX, HTML, SVG, XML, plist, entitlements, string catalogs, Xcode project files, CSV and other data, lockfiles, source maps, images, fonts, archives, model weights, checkpoints. They are covered by the repository policy file .spb-source-governance.toml. HTML is excluded on purpose: a comment would change the bytes served to browsers.

Also never edited: checksummed schema migrations (migrations/, drizzle/, prisma/…), test fixtures and snapshots, computed LaTeX tables and figures (tables/, results/, figures/…), LaTeX files typeset verbatim by another file, scripts that read their own source by line number, files over 1.5 MB, minified files, empty files.

# 5. Repository policy file

.spb-source-governance.toml at the root of each onboarded repository states project name, category, contact, classification, rights holder, license and extra exclusions. It is the only place to change those values; spb-header apply --repo . then refreshes the headers.

# 6. Workflow

  • New or modified file: spb-header apply --repo . --files <path>.
  • Verification (hook, CI): spb-header check --repo . — reports missing, stale or duplicate headers.
  • New repository: docs/ONBOARDING.md. Removal: docs/ROLLBACK.md.
Files main
Menu

Theme