kw-engine AGENTS.md

Repository instructions for kw-engine, a tool that turns research papers into structured knowledge and searches it by problem structure. They define the required commands, data model, validation rules, and source-of-truth files.

In plain words
What is it for?
Use them before changing the engine, rebuilding its SQLite database or index, checking status and invariants, or running its tests, linting, and type checks.
Why use it?
They prevent contributors from editing generated data directly or violating project rules about identifiers, validation, module boundaries, and required checks.

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/chenpg2/kw-engine/agents-md
Clone the repo
git clone --depth 1 https://github.com/chenpg2/kw-engine

Made for: Codex, OpenCode.

Per session 188 This file is loaded in full into every session.
When invoked 188 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.00188 $0.00188
Opus 5 $0.00094 $0.00094
Sonnet 5 $0.00038 $0.00038
Haiku 4.5 $0.00019 $0.00019

Measured 2d ago against content hash 70aece0105ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kw-engine 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 23 lines

What it actually says

AGENTS.md

kw-engine: methodology evolution engine substrate. Distill → abstract → synthesize → search by problem structure.

Commands

uv run kw reindex --memory-dir path   # rebuild SQLite + index.json from markdown
uv run kw verify --memory-dir path    # run SCHEMA §6 invariants
uv run kw status --memory-dir path    # show counts + pending/stale state
uv run pytest                          # all tests
uv run ruff check .                    # lint
uv run mypy src/                       # type check

Conventions

  • Markdown is truth; SQLite + index.json are derived (kw reindex rebuilds both)
  • Paper id = PDF filename stem
  • Principle id = P-#### (zero-padded)
  • All models in models.py; store/ never imports from cli.py
  • No silent fallback: validation errors raise, never coerce.
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. 2d ago First seen · 23 lines · 188 tokens per session scan A 70aece0105ef

Subscribe to this mod's changes

kw-engine AGENTS.md is an instructions file published in the GitHub repository chenpg2/kw-engine (11 stars, last pushed 2mo ago), licensed MIT. It adds 188 tokens to every session, about $0.0009 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-30.

Related

Other instructions, from other repositories

charm-os AGENTS.md

Instructions for tonydzi/charm-os, covering agents.md — working in this repo, what this repo is, stack and layout, how to verify a change and conventions.

tonydzi/charm-os · 895 tokens

codex-autoresearch AGENTS.md

Instructions for TheGreenCedar/codex-autoresearch, covering agents.md, purpose and scope, canonical sources, stable product boundaries and source and package boundaries.

TheGreenCedar/codex-autoresearch · 2,034 tokens

autoharness AGENTS.md

Instructions for tigerless-labs/autoharness: This repo uses Open Knowledge — collaborative markdown via MCP. .open-knowledge/config.yml (with optional /.open-knowledge/config.yml; CLI/env may override) is the path contract: content.dir is the root for relative paths; content.include lists globs that add markdown…

tigerless-labs/autoharness · 2,201 tokens

SoDam-WikiMate AGENTS.md

Instructions for sodam-ai/SoDam-WikiMate, covering wikimate 작업 규칙 (크로스툴 — claude code · codex · gemini 공용), 문체, 자동 동작 (자연어 트리거 — 강제 호출 불필요), 접근 규칙 (자동 감지 — 특정 도구에 한정하지 않음) and obsidian 규칙.

sodam-ai/SoDam-WikiMate · 1,936 tokens

soia-open-skills AGENTS.md

Instructions for soia-team/soia-open-skills, covering agents.md - soia-open-skills, repository purpose, safety rules, validation and git workflow(本仓特有:默认分支是 main).

soia-team/soia-open-skills · 1,325 tokens

Polaris AGENTS.md

Instructions for sponge-b0b/Polaris, covering agents.md, purpose and authority, domain vocabulary, coding conduct and secrets.

sponge-b0b/Polaris · 1,873 tokens