Borrowing it
Nothing to install: this file belongs to coderifts/api-governance. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/coderifts/api-governance/main/copilot/.github/copilot-instructions.mdgit clone --depth 1 https://github.com/coderifts/api-governanceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/coderifts/api-governance/copilot-instructions)<a href="https://agentmods.dev/instructions/coderifts/api-governance/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/coderifts/api-governance/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/coderifts/api-governance/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/coderifts/api-governance/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.01148 | $0.01148 |
| Opus 5.5 | $0.00459 | $0.00459 |
| Sonnet 5.5 | $0.00230 | $0.00230 |
| Haiku 4.5 | $0.00115 | $0.00115 |
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 1mo ago.
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 — 48 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 same context fields the preflight was made under — operation, environment, repository, branch, pull_request — at the top level of the arguments (a context object is also accepted), AND target_id set to decision_result.artifact_digest from the decision you are acting under, AND the decision_result exactly as received. Without target_id: currently_authorized:false, authz_reason target_not_stated — a missing input, not a refusal.
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.
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.
- 1mo ago Changed · +53 tokens per session 0f7d5850677c
- 1mo ago Changed · +2 lines · +63 tokens per session 57f7784e2c7a
- 2mo ago 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 28d ago), licensed MIT. It adds 1,148 tokens to every session, about $0.0046 per session on Opus 5.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.
api-governance copilot-instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| api-governance copilot-instructions.mdcoderifts/api-governance | Instructions file | 0 | 28d ago | MIT | A | 1,148 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |