know-code AGENTS.md

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

Install

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.

agentmods
npx agentmods add instructions/chtnnh/know-code/agents-md
Clone the repo
git clone --depth 1 https://github.com/chtnnh/know-code

Made for: Codex, OpenCode.

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. Scan, not verified.
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 $0.00362 $0.00362
Opus 5 $0.00181 $0.00181
Sonnet 5 $0.00072 $0.00072
Haiku 4.5 $0.00036 $0.00036

Measured yesterday against content hash 2c32a8cc107f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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.jsonknow-code quiz validateknow-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. yesterday 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 2d ago), licensed MIT. It adds 362 tokens to every session, about $0.0018 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.