grounded-knowledge-engine: Instructions file for Codex

AGENTS.md

grounded-knowledge-engine AGENTS.md is an instructions file for Codex, OpenCode from dimosgit/grounded-knowledge-engine. It costs 2,989 tokens per session, scanned A, original, MIT.

Repository instructions for a local-first knowledge engine that stores Markdown files as its source material and builds a searchable index from them. It also describes how coding agents should use the project's command-line and local document tools.

In plain words
What is it for?
Answering questions from stored documents, resuming named projects, searching the knowledge base, and following the repository's architecture, authorship, attribution, and publishing rules.
Why use it?
They give agents one agreed way to work with project documents, research, decisions, and handoffs. They also prevent duplicated rules and help protect information before changes are committed publicly.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is dimosgit/grounded-knowledge-engine's own configuration. It tells Codex and OpenCode how to work on grounded-knowledge-engine 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 grounded-knowledge-engine configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dimosgit/grounded-knowledge-engine. 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/dimosgit/grounded-knowledge-engine/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/dimosgit/grounded-knowledge-engine

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 grounded-knowledge-engine AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dimosgit/grounded-knowledge-engine/agents-md"><img src="https://agentmods.dev/badge/instructions/dimosgit/grounded-knowledge-engine/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,989 This file is loaded in full into every session.
When invoked 2,989 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.02989 $0.02989
Opus 5.5 $0.01196 $0.01196
Sonnet 5.5 $0.00598 $0.00598
Haiku 4.5 $0.00299 $0.00299

Measured 26d ago against content hash 20ea99d87ab7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

grounded-knowledge-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 26d 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 · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Guide

Canonical guidance for coding agents (Claude Code, Codex, Gemini CLI) working in this repository. CLAUDE.md and GEMINI.md import this file — edit here, not there.

GKE is a local-first grounded knowledge engine: Markdown files are the source of truth, the retrieval index (BM25 / SQLite FTS5) is derived and disposable, and the same engine core is exposed through a CLI, a local MCP server, and the optional Operator Cockpit web preview. This repo is public — see Sanitization below before committing anything.

Agent operating contract

This file is the repository's agent contract. Do not create a second contract file with overlapping rules.

  • Use the connected GKE MCP server first when a request depends on the user's documents, a named workspace or client, previous research, project state, decisions, or handoffs. For ordinary grounded Q&A use kb.answer_and_capture; for a named project use kb.resume_project; use kb.search only for evidence-only retrieval and kb.get_record only for an explicitly requested record.
  • Do not use GKE MCP merely to inspect or debug this repository's source code. The checked-out files and tests are authoritative for implementation work.
  • If a task should use GKE but no kb.* tools are visible, say that the MCP connection is unavailable, run npm run setup:mcp -- --client <client> when local configuration is in scope, and remind the operator that clients must be restarted to reload their tool catalog. Do not silently pretend an ungrounded answer came from GKE.
  • MCP tools are model-controlled: registration makes them available but does not force a call. These routing rules are therefore mandatory for applicable tasks.
  • A change request authorizes ordinary reversible edits and verification only inside the requested repository scope. Preserve unrelated work and untracked private KB files.
  • Publishing, deployment, pushing, release, external communication, production credentials, and destructive or broad data operations require explicit user authority. Preview and confine writes wherever the command supports it.
  • Stop and ask when the required target is ambiguous, instructions conflict, private data may be exposed, an unrelated change would be overwritten, or the next step needs authority beyond the request. Report evidence honestly; never claim an unrun or failed gate passed.

Read the full file on GitHub · 226 lines

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. 26d ago Changed · +21 lines · +301 tokens per session 20ea99d87ab7
  2. 2mo ago Changed · +15 lines · +239 tokens per session 2a04b49b31c4
  3. 2mo ago First seen · 190 lines · 2,449 tokens per session scan A ffec3f28d1e4

Subscribe to this mod's changes

grounded-knowledge-engine AGENTS.md is an instructions file published in the GitHub repository dimosgit/grounded-knowledge-engine (5 stars, last pushed 27d ago), licensed MIT. It adds 2,989 tokens to every session, about $0.0120 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

grounded-knowledge-engine AGENTS.md compared with instructions from other repositories

grounded-knowledge-engine AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grounded-knowledge-engine AGENTS.mddimosgit/grounded-knowledge-engineInstructions file527d agoMITA2,989Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode