Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/coderifts/api-governance/copilot-instructionsgit clone --depth 1 https://github.com/coderifts/api-governanceWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01032 | $0.01032 |
| Opus 5 | $0.00516 | $0.00516 |
| Sonnet 5 | $0.00206 | $0.00206 |
| Haiku 4.5 | $0.00103 | $0.00103 |
Grade A, and why
api-governance copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeRifts instructions for GitHub Copilot
Call preflight_change_set before merge, deploy, publish, or tool registration when a contract artifact changed (OpenAPI/Swagger, GraphQL, gRPC/protobuf, AsyncAPI, MCP manifest, or agent tool schemas).
Send the complete base-to-head change set: every changed contract artifact with full before and after content. Do not send a single-file subset when other contract files also change.
Branch on execution_action only. Do not branch on decision and do not branch on safe_for_agent (not_for_control_flow_use_execution_action). Canonical execution_action values: CONTINUE, CONTINUE_WITH_MONITORING, REQUEST_APPROVAL, STOP.
An unrecognised execution_action is not permission: fail closed (halt or re-preflight). Well-known code: not_permission_fail_closed.
When execution_action is REQUEST_APPROVAL or STOP, surface the detected patterns and the blast radius, and propose the safer path — deprecate-then-remove, an additive change, or a new version — rather than shipping the break.
CONTINUE_WITH_MONITORING requires a wired monitoring sink (monitoringSinkWired). It is not "proceed with caution" without monitoring.
Do not call preflight_change_set for: a documentation-only change (README, guides, comments) with no contract artifact content change; a static readiness score (a different capability, not a change-set decision); or to verify a receipt you already hold (that is verify_receipt — see the companion-tools rule).
If you already hold a chain receipt and only need authenticity/lifecycle: verify_receipt. If you need a past decision by id: get_decision_details. Neither replaces preflight for a new change set.
The CodeRifts MCP server exposes exactly three tools — preflight_change_set, verify_receipt, get_decision_details. Do not invent or assume others.
A receipt authorizes ONE operation: a merge receipt does not authorize a deploy. Before a different operation (deploy, publish), call preflight_change_set with context.operation set to that operation — reusing a differently-scoped receipt is not permitted and will fail at the gate.
A stale or superseded receipt on a changed head requires a NEW preflight — verify_receipt cannot re-diff.
For mutating tools, put only the guarded version in the agent's tool table; keep the raw handler host-only and unreachable from that table. How you name tools is yours — this is a reachability property, not a product rename of host tools. CodeRifts cannot see or stop a raw call the host makes outside the table it returns; adopt this as a host convention, not as a guarantee from the package.
CodeRifts reports a governance decision and execution_action; it does not by itself block merges. Blocking requires separate repository configuration (required status checks, enforcement) that this rule file does not set.
To act (mutate a contract, merge, deploy, or publish): call preflight_change_set with preflight_mode authorize. Analyze is informational — risk only, may_execute is always false — and is not permission. Read execution_action on the decision_result envelope.
Before acting under a held receipt: call verify_receipt with the intended context (operation, environment, repository, branch, pull_request) for THIS attempt. Do not act on a receipt whose scope does not match.
Act only when currently_authorized is true (control_envelope.receipt_view.currently_authorized). A valid-looking token is not permission if currently_authorized is false or omitted.
Commit / CAS evidence is a separate measurement (commit_observation on GuardOutcome). It is not a substitute for authorize + currently_authorized. Production hosts that want the fail-closed conjunction lock it with profile: ENFORCING_STRICT on withCodeRifts.
If the host requests an execution grant (opt-in include_execution_grant), the grant is bound to operation + target + after-payload (scope_hash) and is short-lived — never reuse it after the after-payload changes.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 46 lines · 1,032 tokens per session scan A 63e83e379e96
api-governance copilot-instructions.md is an instructions file published in the GitHub repository coderifts/api-governance (0 stars, last pushed yesterday), licensed MIT. It adds 1,032 tokens to every session, about $0.0052 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
Sync AGENTS.md
Instructions for stroland02/Sync, covering sync — working conventions, what this project is, latency is a design constraint, not a later optimisation, this is a data pipeline, and it obeys data-pipeline rules and non-negotiables.
Sync CLAUDE.md
Instructions for stroland02/Sync, covering sync, the governing principle, environment — these will break your session, non-negotiables and how we work.
pocketlantern CLAUDE.md
Instructions for pocketlantern/pocketlantern, covering claude.md, pocketlantern, project overview, card selection philosophy and current status.
knowpatch AGENTS.md
Instructions for Soju06/knowpatch, covering knowpatch, environment, project context, code conventions (key points) and quality gate.
vdiff CLAUDE.md
Claude Code instructions for mcurmi05/vdiff, covering claude.md, project: vdiff, behavioral guidelines, 1. think before coding and 2. simplicity first.
knowpatch CLAUDE.md
Instructions for Soju06/knowpatch, a project described as: LLM knowledge cutoff compensator for AI coding agents — corrects outdated versions, deprecated APIs, renamed packages, and removed CLI commands.