The base branch sets the rules.
Ghost reads policy from the protected branch, so a contributor cannot weaken the threshold inside the same pull request.
Source attribution and final-diff AI policy enforcement for open source projects.
Repo owners define the policy. Contributors keep working with their agents. Ghost records surviving AI-authored lines and lets CI block only what would actually land in the pull request.
curl -sSL https://raw.githubusercontent.com/farhankhan197/ghost/main/install.sh | bashGhost repository policy initialized
policy: ghost.yml
enforcement: scope=final_diff history=warn
binaries: ghost, ghost-checkpoint
owner policy will be read from the base branch during PR checks
Golden flow
Ghost reads policy from the protected branch, so a contributor cannot weaken the threshold inside the same pull request.
OpenCode, Codex, Claude Code, Cursor, and Antigravity edits are captured into repo-bound attribution sessions.
Boilerplate that disappears before merge becomes history context, not a false blocker for the current PR state.
Git notes and signed policy checks preserve who or what authored surviving lines over time.
Enforcement
Ghost now defaults to final PR diff enforcement. Historical AI use remains visible in audit output, but merge blocking follows the code that survives into the branch being reviewed.
threshold: 80% required: false on_exceed: block enforcement: scope: final_diff history: warn
ghost verify-pr origin/main..HEAD --base origin/mainOpen source provenance