Borrowing it
Nothing to install: this file belongs to kaiwood/kward. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kaiwood/kward/main/AGENTS.mdgit clone --depth 1 https://github.com/kaiwood/kwardWrote 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.
[](https://agentmods.dev/instructions/kaiwood/kward/agents-md)<a href="https://agentmods.dev/instructions/kaiwood/kward/agents-md"><img src="https://agentmods.dev/badge/instructions/kaiwood/kward/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.
<a href="https://agentmods.dev/instructions/kaiwood/kward/agents-md"><img src="https://agentmods.dev/badge/instructions/kaiwood/kward/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03590 | $0.03590 |
| Opus 5.5 | $0.01436 | $0.01436 |
| Sonnet 5.5 | $0.00718 | $0.00718 |
| Haiku 4.5 | $0.00359 | $0.00359 |
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 — 129 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.
- Internal requires should target canonical implementations under domain folders. Keep the documented public
plugin_registry.rbentrypoint. - 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/prompt_interface.rbandlib/kward/prompt_interface/- terminal UI state, rendering, input, and built-in editor mechanics.lib/kward/sessions/store.rb- authoritative JSONL session persistence and conversation reconstruction.lib/kward/sessions/catalog.rb- rebuildable, fingerprint-validated session-list summary cache; JSONL sessions remain authoritative.lib/kward/tabs/driver.rb- session and plugin tab-driver boundary used by interactive tabs.lib/kward/plugins/registry.rb,lib/kward/plugins/actions.rb,lib/kward/plugins/host.rb,lib/kward/plugins/http_server.rb,lib/kward/plugins/codex_responses.rb,lib/kward/plugins/resources.rb,lib/kward/plugins/chat_runtime.rb, andlib/kward/tools/plugin_tool.rb- trusted plugin registration, typed command/action/startup-option contracts, identified-plugin host services, managed loopback HTTP and Codex Responses access, owned task/cleanup lifecycles, frontend-neutral plugin-chat execution, and model-callable plugin-tool adaptation.examples/plugins/openrouter_proxy/- example local OpenRouter Chat Completions proxy backed by Kward's normal Codex provider client, plus deterministic local fake embeddings.lib/kward/workspace/git_worktree_manager.rb- Git worktree discovery, creation, validation, and removal mechanics.lib/kward/tools/workspace_targets.rb- host-scoped workspace-role routing for model tools in linked worktree tabs.lib/kward/cli/worktrees.rb- interactive session-tab worktree binding and workspace re-rooting orchestration.lib/kward/shell/kwsh.rb,lib/kward/shell/kwshrc.rb, andlib/kward/shell/persistent_session.rb- embedded-shell command routing, declarative rc parsing, state, protocol, and PTY lifecycle.lib/kward/pty/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/transcripts/- shared Markdown, HTML, and safe-path transcript export mechanics.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 Changed · +2 lines · +211 tokens per session 7312b3a0d1be
- 6d ago Changed · +1 lines · +141 tokens per session 41a96baa7d1c
- 1mo ago Changed · +7 lines · +831 tokens per session f9e314724efe
- 2mo ago Changed · +4 lines · +126 tokens per session 24ecb2d81c72
- 2mo 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 (10 stars, last pushed 3d ago), licensed MIT. It adds 3,590 tokens to every session, about $0.0144 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.
kward AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kward AGENTS.mdkaiwood/kward | Instructions file | 10 | 3d ago | MIT | A | 3,590 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |