Contributing

August 11, 2026 ยท View on GitHub

Thank you for helping improve Context Guard.

Development contract

  • Keep the Hook runtime free of third-party runtime dependencies.
  • Add a focused regression test for every behavior change or bug fix.
  • Preserve fail-closed handling for state integrity, evidence outcomes, supersession ambiguity, and delegated authority.
  • Do not add raw prompts, transcripts, plugin-private state, credentials, local paths, generated caches, or private handoff artifacts to the repository.
  • Do not duplicate Codex-native Plan, Goal, compaction, subagent, worktree, or memory controllers.
  • Configure both the Git author and committer as a GitHub-provided @users.noreply.github.com address. CI audits every candidate commit while redacting any rejected identity value from its logs.
  • A Hook definition, state schema, or observable runtime behavior change requires a plugin version change and release-note entry.

Validation

Run from the repository root:

python scripts/validate_public_repo.py .
python scripts/audit_public_tree.py .
python scripts/audit_commit_identity.py .
python -m unittest discover -s tests -p "test_*.py"
ruff check .

Installed lifecycle changes also require python scripts/smoke_installed.py against an isolated installed cache and a fresh Codex task without trust bypass.

On each clone, including Windows, configure identity at repository scope before the first commit so a machine-level default cannot leak into public history:

git config --local user.name "Your GitHub display name"
git config --local user.email "your-account@users.noreply.github.com"
git config --local user.useConfigOnly true
git var GIT_AUTHOR_IDENT
git var GIT_COMMITTER_IDENT
python scripts/audit_commit_identity.py . --base origin/main --head HEAD

The remote CI audit is authoritative because environment variables can override local Git configuration and local hooks are not installed automatically.

Upstream policy

This public repository is maintained independently from the author's private Codex configuration repository. Changes are transferred manually and reviewed; there is no automatic bidirectional synchronization. Contributions retain their original authorship when manually integrated.