ktx AGENTS.md

An instruction file for ktx, an open-source context layer for data agents. It defines project rules for task tracking, reading files, Python environments, testing, code cleanup, and public API changes.

In plain words
What is it for?
Use it when developing ktx, especially for Python changes, running tests or pre-commit checks, managing multi-step tasks, or changing its public interfaces.
Why use it?
It gives the coding agent the repository-specific rules needed to make safe, testable changes. It also prevents assumptions about parts of the system that this project does not contain.

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/kaelio/ktx/agents-md
Clone the repo
git clone --depth 1 https://github.com/Kaelio/ktx

Made for: Codex, OpenCode.

Per session 6,702 This file is loaded in full into every session.
When invoked 6,702 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.06702 $0.06702
Opus 5 $0.03351 $0.03351
Sonnet 5 $0.01340 $0.01340
Haiku 4.5 $0.00670 $0.00670

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

Security

Grade A, and why

ktx 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 3d 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 · 594 lines

How it starts

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

ktx Development Notes

ktx is a standalone open-source context layer for data agents. These instructions apply to all agents working in this repository (Codex, Claude, Gemini, and similar tools). Do not assume an external app server, frontend, database migrations, ORPC contracts, or python-service/ layout exist here.

Critical Rules

Absolute Requirements

  • MUST: Use the active agent's task tracker for tasks with 3+ steps or complex operations (TodoWrite in Claude, update_plan in Codex).
  • MUST: Read files before editing them.
  • MUST: Complete all tracked tasks before finishing.
  • MUST: Activate .venv before running Python code when a local virtualenv exists. If no .venv exists, use uv run ... from the relevant project root.
  • MUST: After modifying Python files, run the relevant Python tests and run uv run pre-commit run --files [FILES] when a pre-commit config exists. If pre-commit cannot run because config or tool versions are missing, state that explicitly and run the closest available checks.
  • MUST: Remove dead code; do not leave commented-out code, unused wrappers, or empty directories.
  • MUST: Keep package/public API changes intentional. Do not add compatibility wrappers for old ktx names unless the user explicitly asks for a migration bridge.
  • MUST: Avoid compatibility shims for old ktx features, command shapes, configuration formats, or internal APIs. This rule does not prohibit compatibility support for third-party systems and libraries, such as Metabase version differences. Keep the ktx codebase clean instead of preserving stale ktx behavior.
  • MUST: Treat ktx as having no public users unless the user says otherwise. Legacy support is not necessary by default; prefer clean breaking changes over compatibility shims, migration bridges, or preserved stale behavior.

Absolute Prohibitions

  • MUST NOT: Use raw pip; use uv.
  • MUST NOT: Use npm or bun; use pnpm.
  • MUST NOT: Run destructive git cleanup commands (git clean, git reset --hard, git checkout .) unless the user explicitly requested that exact operation.
  • MUST NOT: Run git stash, git stash pop, git stash apply, or git stash drop without explicit user instruction. Prefer a branch plus commit when the user asks to save work in progress.
  • MUST NOT: Reintroduce external app conventions such as ORPC contracts, NestJS controllers, frontend routes, routeTree.gen.ts, or app database migration commands unless those systems are intentionally added to ktx later.

Read the full file on GitHub · 594 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. 3d ago First seen · 594 lines · 6,702 tokens per session scan A ddb4471ec95d

Subscribe to this mod's changes

ktx AGENTS.md is an instructions file published in the GitHub repository Kaelio/ktx (1,569 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 6,702 tokens to every session, about $0.0335 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.