SR&ED Audit-Proof Commit Message Writing (Claude Code memory tested)
Source: Notion | Last edited: 2025-07-25 | ID: 23b2d2dc-3ef...
APCF: Audit-Proof Commit Format for SR&ED Evidence Generation
Section titled “APCF: Audit-Proof Commit Format for SR&ED Evidence Generation”- First get the current ‘America/Vancouver’ time using:
TZ='America/Vancouver' date "+%A %Y-%m-%d %H:%M:%S %Z %z"Tool Usage Preferences
Section titled “Tool Usage Preferences”- File Operations: Prefer
Read,LS,Glob,Grepover MCP filesystem tools (broader access)
Usage: Claude Code Interaction
Section titled “Usage: Claude Code Interaction”When you request “APCF”, I will analyze ALL changes:
- Staged files (
git diff --cached) - ready to commit - Modified files (
git diff) - unstaged changes - Untracked files (
git status --porcelain) - new files - Auto-derive SR&ED evidence from complete change analysis
- Generate logical commit grouping and sequencing strategy
- Create audit-proof commit messages for each logical group Workflow: Make changes → Request “APCF” → I analyze everything → Suggest commit strategy
Format Template
Section titled “Format Template”- Each commit in the sequence uses this format: auto-generated from workspace analysis
- Quote in backticks (`) any technical noun or proper noun per Markdown/GitHub style: package, library, tool, command, file, directory, language, class, function, config key, or other technical term; do not quote pronouns or non-technical nouns.
type(scope): description
- Knowledge Gap: [Auto-derived from file patterns + technical domain uncertainty + failed approaches]- Motivation: [Auto-derived from commit intent + workspace changes + timeline context]- Hypothesis: [Auto-derived from commit intent + proposed technical approach + risk factors]- Investigation: [Auto-derived from workspace analysis + systematic methodology + failures/iterations]- Result: [Auto-derived from changes + technical advancement + specific measurements]- Authenticity: [Developer notes + work timestamps + debugging context for CRA contemporaneous compliance]
The follow footer section display the lines of libraries involved seperated by commas and spaces. The lines are shown only if the pertaining libraries are involved:
- PyOpen: {Publicly available third-party Python libraries (on PyPI)}- PyPriv: {Private or internal Python libraries not on PyPI}- PyOthr: {Third-party programming libraries that are not Python, e.g. C++, JavaScript, Java, etc.}
Here in this line, the last line in the commit message, we display the result of the current 'America/Vancouver' time.Commit Grouping Logic
Section titled “Commit Grouping Logic”Logical Sequencing Strategy:
- Emergency First (
hotfix:,revert:) - Critical fixes and risk mitigation - Infrastructure First (
build:,config:,deps:,ci:) - Foundation changes - Core Implementation (
feat:,refactor:,perf:) - Main functionality - Quality Assurance (
test:,fix:,security:) - Validation and corrections - Documentation (
docs:) - Knowledge capture - Release Management (
release:) - Deployment readiness - Maintenance (
style:,chore:) - Process improvements - Work in Progress (
wip:) - Development snapshots (avoid in production) Atomic Grouping Rules:
- Related files together - Files that implement the same feature
- Dependency respect - Infrastructure before features that depend on it
- Audit trail clarity - Each commit tells complete SR&ED story
- Rollback safety - Each commit is independently functional
Auto-Derivation Intelligence (Workspace State → SR&ED Evidence)
Section titled “Auto-Derivation Intelligence (Workspace State → SR&ED Evidence)”File Pattern → Domain Detection
Section titled “File Pattern → Domain Detection”.py, *.ipynb→ Algorithm/ML Development.js, *.ts, *.jsx→ Frontend/API Innovation.sql, *.db→ Database Architecture Research.yaml, *.json, *.toml→ Configuration Investigationtest_*, *.test.*→ Validation MethodologyDockerfile, *.sh→ Infrastructure Innovation.md, docs/→ Knowledge Capture Investigation
Workspace Analysis → SR&ED Scope & Priority
Section titled “Workspace Analysis → SR&ED Scope & Priority”- Single file change → Focused technical uncertainty
- Multiple related files → Comprehensive investigation
- Cross-domain changes → System-wide innovation
- New file additions → Experimental development
- Dependency changes → Technology integration research
APCF Evidence Standards
Section titled “APCF Evidence Standards”- Specificity: Use actual counts, technology names, file types (“modified 3 files” not “comprehensive changes”)
- Facts over Interpretation: State direct technical actions (“what was built” not “how well it performs”)
- CRA Compliance: Include failure documentation, work-commit timestamps for contemporaneous evidence
- Avoid derived metrics: No “efficiency ratios”, “performance improvements”, or calculated benefits
Search & Audit Trail Integration
Section titled “Search & Audit Trail Integration”- Every commit becomes searchable audit evidence
- Cross-repository SR&ED pattern recognition
- Automatic evidence chain building for quarterly reports
- Government audit trail with direct commit verification