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.
npx agentmods add instructions/kaiwood/kward/agents-mdgit clone --depth 1 https://github.com/kaiwood/kwardWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02281 | $0.02281 |
| Opus 5 | $0.01141 | $0.01141 |
| Sonnet 5 | $0.00456 | $0.00456 |
| Haiku 4.5 | $0.00228 | $0.00228 |
Grade A, and why
kward 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.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for AI coding agents working in this repository.
This is a living document. If significant changes to the codebase, architecture, commands, workflows, or project conventions occur, update this file so future agents start with accurate guidance.
Project overview
Kward is an extendable Ruby CLI coding agent. It supports interactive and one-shot chat, local workspace tools, configurable prompts/skills, image attachments, web search, OpenAI OAuth/API-key authentication, session persistence, and a JSON-RPC backend for UI clients.
Working style
- Make the smallest correct change for the request.
- Inspect relevant files before editing, and preserve existing style and naming.
- Prefer straightforward Ruby from the standard library unless an existing dependency is already used.
- Keep user-facing behavior consistent with existing docs and tests.
- Do not introduce broad rewrites, formatting-only churn, or unrelated cleanup.
- Do not split large orchestration files such as
RPC::SessionManagerorModel::Clientjust because they are large; extract only when a behavior change exposes a clear, tested ownership boundary. - Be careful with auth tokens, API keys, config files, session data, user prompts, and workspace file contents. Do not log secrets.
Important paths
lib/main.rb- executable entrypoint.lib/kward/cli.rb- command-line flow and interactive chat orchestration.lib/kward/session_store.rb- authoritative JSONL session persistence and conversation reconstruction.lib/kward/session_catalog.rb- rebuildable, fingerprint-validated session-list summary cache; JSONL sessions remain authoritative.lib/kward/tab_driver.rb- session and plugin tab-driver boundary used by interactive tabs.lib/kward/git_worktree_manager.rb- Git worktree discovery, creation, validation, and removal mechanics.lib/kward/cli/worktrees.rb- interactive session-tab worktree binding and workspace re-rooting orchestration.lib/kward/kwsh.rb,lib/kward/kwshrc.rb, andlib/kward/persistent_shell_session.rb- embedded-shell command routing, declarative rc parsing, state, protocol, and PTY lifecycle.lib/kward/detached_run.rb- shared lifecycle for commands detached from terminal ownership while remaining owned by a tab.lib/kward/shell_prompt.rbandlib/kward/shell_prompt_session.rb- transient shell-agent prompt context and scoped actions.lib/kward/agent.rb- agent loop and tool execution flow.lib/kward/model/- model provider HTTP client and stream parsing behavior.lib/kward/auth/- OAuth providers and auth credential file helpers.lib/kward/tools/registry.rb- tool dispatch and schema exposure.lib/kward/tools/- individual tool implementations, one file per tool.lib/kward/mcp/- local MCP client transports and configured server clients.lib/kward/transport.rbandlib/kward/transport/- frontend-neutral transport contracts, host, session gateway, persistent state, lifecycle manager, and foreground runtime.lib/kward/cli/transports.rb- transport listing, status, and foreground-run commands.lib/kward/rpc/- JSON-RPC backend.lib/kward/prompts.rb- system prompt and skill catalog prompt assembly.lib/kward/config_files.rb- config path handling.lib/kward/skills/- Agent Skills discovery, parsing, validation, activation reads, and saved-session skill capture.test/- Minitest coverage.doc/- user documentation and generated docs source pages.doc/api.md- curated API reference overview used as the API docs landing page.doc/platform-support.md- supported operating systems, terminals, and sandbox backends.CONTRIBUTING.md,SECURITY.md, andCODE_OF_CONDUCT.md- contribution workflow and project trust policies.templates/default/kward_navigation.rb- shared generated-docs navigation data for guide/API dropdowns.templates/default/layout/- YARD layout templates for normal generated docs pages.templates/default/fulldoc/- YARD templates for generated full-list pages such as class, method, and file indexes.
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.
- 2d ago First seen · 115 lines · 2,281 tokens per session scan A 6e3008283e15
kward AGENTS.md is an instructions file published in the GitHub repository kaiwood/kward (5 stars, last pushed 2d ago), licensed MIT. It adds 2,281 tokens to every session, about $0.0114 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.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.