kody-eve-template
AGENTS.md13 starsChanged 21 days agoMITView on GitHub
Guidance for AI coding agents working in this repository. Kody, a GitHub maintainer agent built on the eve agent framework. A weekly schedule composes a digest email of the configured repo's open issues and sends it through the Resend MCP connection; recipients reply to act on it (for example "create Linear issues for #1 and #2"), and replies come back in through the resend channel. Kody reads and triages GitHub issues through the github tools (GitHub Tools SDK via Vercel…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- digest-formatSkill
- github-linear-bridgingSkill
- triaging-issuesSkill
- writing-qualitySkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
After editing, check LSP diagnostics / pnpm typecheck and fix type errors before moving on.
- Very specific: line 45
Document exported config with TSDoc (@remarks, @param, @returns, @defaultValue, @see).
- Very specific: line 53
If you ever build a RegExp from data, escape it (literal match) and bound the input length.
- Very specific: line 60
No secrets, node_modules, or build output (.eve, .vercel, .output) staged.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Guidance for AI coding agents working in this repository.
Project overview
Kody, a GitHub maintainer agent built on the eve agent framework. A weekly schedule composes a digest email of the configured repo's open issues and sends it through the Resend MCP connection; recipients reply to act on it (for example "create Linear issues for #1 and #2"), and replies come back in through the resend channel. Kody reads and triages GitHub issues through the github tools (GitHub Tools SDK via Vercel Connect), creates and cross-references issues through the Linear MCP connection, and answers when @mentioned on GitHub issues/PRs or in Linear Agent Sessions. Per-user preferences live in Vercel Blob. Its workflow lives in agent/instructions.ts.
The whole agent is defined under agent/. eve discovers capabilities from the filesystem. See ARCHITECTURE.md for the component map, data flow, and boundaries.
Setup & commands
pnpm install # install dependencies (Node 24.x)
pnpm dev # eve dev — local TUI; run /model once to link a model provider
pnpm typecheck # tsc (TypeScript, no emit)
pnpm check # ultracite (Biome) lint + format check
pnpm fix # ultracite (Biome) auto-fix
pnpm build # eve build
eve deploy # deploy to Vercel production (use this, not raw `vercel deploy`)
npx eve info # print the discovered surface + discovery diagnostics
pnpm validate # check + typecheck + eve info in one commandThere is no unit-test suite. Verify changes with pnpm validate (lint, typecheck, and discovery diagnostics must all report 0 errors / 0 warnings), then exercise the agent in the pnpm dev TUI.
eve conventions
- Read the relevant guide in
node_modules/eve/docs/before writing code. Don't invent framework APIs; confirm them against the docs. - Identity comes from the filesystem, never a
namefield. A tool atagent/tools/research.tsis the toolresearch; an extension mounted atagent/extensions/github.tsprefixes its tools withgithub__; a connection atagent/connections/linear.tsregisters aslinear. - Authored slots:
agent/agent.ts(model),agent/instructions.ts(defineInstructions, the system prompt; resolved at build time, injectingRESEND_FROM_ADDRESSinto the sending-email rule),agent/tools/*.ts(defineTool, ordefineWorkflowToolfor durable workflows),agent/extensions/*.ts(mounted extensions),agent/connections/*.ts,agent/channels/*.ts,agent/schedules/*.ts(cron-triggered sessions),agent/skills/<name>/SKILL.md,agent/subagents/<id>/agent.ts(defineAgent),agent/sandbox.ts. - Channels:
github(eve GitHub channel via Vercel Connect, botName "Kody"; a customonCommenthook keeps the built-in mention and ignore rules but dispatches only when the commenter'sauthor_associationis OWNER, MEMBER, or COLLABORATOR, so untrusted accounts can't drive the agent; anonPullRequesthook posts a summary comment with a changed-files table on every newly opened PR, skipping bot authors but deliberately not association-gated since summarizing outside PRs is the point),linear(eve Linear channel via Connect; Linear Agent Sessions, where users delegate or mention the agent; a customonAgentSessionhook injects the requester's email as session context),resend(Chat SDK channel using@resend/chat-sdk-adapterwith Redis state and streaming off; email in and out), plus theeveroute-auth channel. - Tools run in the app runtime (full
process.env), one default export per file. Gate destructive tools withapprovalfromeve/tools/approval(here:clear_user_preferences). Thegithubextension (agent/extensions/github.ts,@github-tools/eve-extension) exposes the GitHub Toolsmaintainerpreset asgithub__<tool>tools with credentials via Vercel Connect (the deprecated@github-tools/sdk/connect/eveone-liner no longer works: eve skips its tools at runtime); issue-conversation writes (addIssueComment,addLabels,closeIssue,createIssue,removeLabel) setrequireApproval: "never"because the email surface cannot render an approval prompt, while higher-impact writes keep the extension's approval-by-default. Theresearchtool is adefineWorkflowToolthat opens a session with theresearchersubagent viactx.agent()and requests structured output per turn (defineAgentno longer takesoutputSchema). - Connections are MCP servers:
linear(https://mcp.linear.app/mcp, app-scoped auth shared throughlinearAuthinagent/lib/constants.tswith scopesread,write,issues:create,comments:create) andresend(https://mcp.resend.com/mcp, static bearer token fromRESEND_API_KEYviaauth.getToken— a static token works in every session including the cron run, which has no signed-in user, and the Resend connector cannot issue app-scoped tokens; list/send emails, templates, contacts). Connections accept the sameapprovalfield as tools if a write needs gating; neither passes one today. - Schedules:
agent/schedules/weekly-digest.tsruns cron0 9 * * 1(Mondays 09:00 UTC) in markdown task mode: the prompt tells the agent to fetch open issues onDIGEST_REPOwith the GitHub tools and send the digest toDIGEST_EMAILitself with the Resend MCP tools, which gives it control of the subject line (the chat-sdk Resend adapter cannot set a subject on outbound-initiated threads).DIGEST_REPO,DIGEST_EMAIL, andRESEND_FROM_ADDRESSare required at module load viarequireEnv, so a missing value fails discovery instead of producing a schedule that cannot send. The digest's structure lives in thedigest-formatskill; the schedule prompt carries only the run-specific facts (repo, recipient, sender, subject). Replies to the digest reach the agent through the resend channel's inbound webhook. - Skills are load-on-demand. A packaged skill (
<name>/SKILL.md) requiresdescriptionfrontmatter; that description is the routing hint. The skills here arewriting-quality,digest-format,triaging-issues, andgithub-linear-bridging. - Subagents are declared under
agent/subagents/<id>/agent.ts(defineAgent, requireddescription— the routing hint). The directory name is the identity and the lowered tool name (no namespace; it must not collide with a tool name, and eve's build still rejects the collision even when the subagent setstool: false, so a wrapping tool needs its own name, likeresearch). A declared subagent runs in a fresh child session and inherits nothing from the root (no skills, connections, tools, or sandbox), so the caller passes everything it needs in themessage. The one subagent here isresearcher; it setstool: falseand is reached only through theresearchworkflow tool. - After editing, check LSP diagnostics /
pnpm typecheckand fix type errors before moving on.
Code style
- Linting and formatting are handled by Ultracite (a Biome preset). Run
pnpm checkbefore finishing andpnpm fixto auto-fix. Config is inbiome.jsonc; the kebab-case filename rule is disabled there because eve tools use snake_case names. - TypeScript strict; ESM with
NodeNextresolution (relative imports need a.jsextension). Preferconst, arrow functions, optional chaining / nullish coalescing. - Validate tool input/output with
zodschemas. - Document exported config with TSDoc (
@remarks,@param,@returns,@defaultValue,@see). Avoid inline//comments — put rationale in the TSDoc block instead. - Prose in markdown files is not hard-wrapped: write each paragraph or bullet as one line.
- Agent-facing text (instructions, skill bodies, tool and subagent descriptions) follows the "How you write" rules in
agent/instructions.ts: no em dashes, no machine-made words, no bold for emphasis. It carries behavior only, never framework plumbing (sign-in flows, how approvals render) or references to tools and skills the reading agent can't access.
Security
- Never ask the user for API keys, client secrets, or any other credentials.
- Never commit secrets.
.env*is gitignored. Connector UIDs are read from env (GITHUB_CONNECTOR,LINEAR_CONNECTOR); GitHub and Linear auth is brokered by Vercel Connect (Linear is app-scoped throughlinearAuth; tokens are resolved per call and never exposed to the model) and Blob auth is via the project's OIDC token. The Resend MCP connection and the Resend chat-sdk adapter authenticate withRESEND_API_KEY(plusRESEND_WEBHOOK_SECRETfor inbound), read from env and never committed. Other config comes from env too:DIGEST_REPO,DIGEST_EMAIL,RESEND_FROM_ADDRESSand optionalRESEND_FROM_NAME(the sender identity, resolved at build time; the name falls back to "Kody"),REDIS_URLfor@chat-adapter/state-redis. The email channel reads the same two sender variables, so channel replies and agent-sent mail share one identity. - If you ever build a
RegExpfrom data, escape it (literal match) and bound the input length. - Gate irreversible or high-impact actions behind
approval(here:clear_user_preferences). - For per-user storage, derive the key from the resolved principal (
ctx.session.auth.current), never from model input — seeagent/lib/user-preferences.ts. The preference files live under the reserveduser-preferences/Blob prefix, reachable only through the principal-scoped preference tools.
Before committing
pnpm validatepasses (Ultracite check,tsc, andeve infowith 0 errors / 0 warnings).- No secrets,
node_modules, or build output (.eve,.vercel,.output) staged.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

