Project source file header template =================================== Place this block at the top of each source unit (after optional shebang / ` on files in HEAD, then `git commit --amend --no-edit` Pre-commit contributor (email auto-filled from git when missing): export HEADER_CONTRIBUTOR="Your Name" # adds git user.email export HEADER_CONTRIBUTOR="Name " # used as-is export HEADER_CONTRIBUTOR_EMAIL="you@mail" # optional override Placeholders ------------ __PACKAGE_NAME_PLACEHOLDER__ Java/AIDL: `package com.example.foo;` C/C++/PHP: `/* package path/relative/to/repo/file.ext */` __FILENAME_PLACEHOLDER__ Short filename only (e.g. MainActivity.java) __DATE_PLACEHOLDER__ First commit time (human-readable + timezone) __UPDATE_DATE_PLACEHOLDER__ Last change time; pre-commit refreshes on staged edits __COMMIT_PLACEHOLDER__ Git commit SHA for this revision (post-commit hook; not in Digest) __CONTRIBUTOR__ `Name ` when known (git log/config); else `Name` __CLASS_NAME_PLACEHOLDER__ ` * class Foo` / interface / enum — omitted if none __CONTRIBUTORS_LIST_PLACEHOLDER__ Sorted by commits, then blamed lines; `Name ` from git / @author tags Includes Cursor Agent (project assistant, no email) __DIGEST__ `Digest: SHA256\t` of file without this line; omitted if N/A Example (PHP) ------------- * Commit: abcdef1234567890... * Contributors: * - Name (1 commits, 10 lines) * - Cursor Agent (project assistant) * Digest: SHA256 abc123... */ declare(strict_types=1); Pure PHP keeps a single after the comment, then HTML/markup. Example (Java) -------------- package com.foxx.androidcast; /********************************************************************* * MainActivity.java * Created at: Wed 20 May 2026 12:00:00 +0300 * Updated at: Wed 20 May 2026 15:00:00 +0300 by Anton Afanasyeu * Commit: abcdef1234567890... * class MainActivity * Contributors: * - Anton Afanasyeu (29 commits, 120 lines) * - Cursor Agent (project assistant) * Digest: SHA256 abc123... **********************************************************************/