know-code: Instructions file for Codex

AGENTS.md

know-code AGENTS.md is an instructions file for Codex, OpenCode from chtnnh/know-code. It costs 362 tokens per session, scanned A, original, MIT.

A repository instruction file for know-code, a tool that checks whether contributors understand the code they change. It describes the required process of taking a quiz, grading the proposal, and recording approved commits.

In plain words
What is it for?
Use it when contributing to the know-code project: start a work range, answer generated questions, validate the quiz, review the grade, record commits, and seal the range before pushing.
Why use it?
It gives coding agents and humans a shared checklist for demonstrating understanding before changes are pushed. It also helps detect stale tool installations and diagnose process problems.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is chtnnh/know-code's own configuration. It tells Codex and OpenCode how to work on know-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything know-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to chtnnh/know-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/chtnnh/know-code/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/chtnnh/know-code

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for know-code AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chtnnh/know-code/agents-md/github.svg)](https://agentmods.dev/instructions/chtnnh/know-code/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/chtnnh/know-code/agents-md"><img src="https://agentmods.dev/badge/instructions/chtnnh/know-code/agents-md/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.

agentmods 80×15 button for know-code AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chtnnh/know-code/agents-md"><img src="https://agentmods.dev/badge/instructions/chtnnh/know-code/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 362 This file is loaded in full into every session.
When invoked 362 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00362 $0.00362
Opus 5.5 $0.00145 $0.00145
Sonnet 5.5 $0.00072 $0.00072
Haiku 4.5 $0.00036 $0.00036

Measured 1mo ago against content hash 2c32a8cc107f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

know-code AGENTS.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.

AGENTS.md · 29 lines

What it actually says

know-code

This repository dogfoods its own gate.

Required agent loop

  1. Human: know-code attest-init once
  2. know-code range begin at start of feature work (2+ commits before push)
  3. know-code-teach → human seals know-code taught
  4. Agent: know-code questions → write .know-code/quiz.json → know-code quiz validate → know-code ask
  5. Agent writes grade-proposal.json (see skills/know-code/references/grading-rubric.md)
  6. Human: know-code grade --review + pass
  7. know-code commit -m "…" per commit (quote the message)
  8. Human: know-code range seal → push

Debug: know-code status --json · know-code doctor

Quiz schema: docs/quiz · Grading: docs/grading

Never set KNOW_CODE_OVERRIDE or KNOW_CODE_ATTEST_PASSPHRASE from the agent.

Config: ~/.know-code/config.json + gitignored .know-code/config.json

CLI (always local build in this repo): npm run know-code -- …
After npm run build, keep bare know-code pointed here: npm link -w @chtnnh/know-code
(know-code doctor warns if PATH still hits a stale global.)

Docs: https://kc.chtnnhfoundation.org

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.

  1. 1mo ago First seen · 29 lines · 362 tokens per session scan A 2c32a8cc107f

Subscribe to this mod's changes

know-code AGENTS.md is an instructions file published in the GitHub repository chtnnh/know-code (3 stars, last pushed 1mo ago), licensed MIT. It adds 362 tokens to every session, about $0.0014 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.

Related

Other instructions, from other repositories