eve-content-agent-template
AGENTS.md28 starsChanged 21 days agoApache-2.0View on GitHub
Guidance for AI coding agents working in this repository. A Slack-based content assistant built on the eve agent framework. Writers @mention it in Slack; it loads a per-surface style skill, pulls source material from Notion (user-scoped OAuth via Vercel Connect), drafts in the house voice, and publishes approved pieces back to Notion. Files and assets are stored in Vercel Blob. The whole agent is defined under agent/. eve discovers capabilities from the filesystem. See ARCHITECTURE.md for the component map, data…
- 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 repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- blog-styleSkill
- linkedin-styleSkill
- newsletter-styleSkill
- release-notes-styleSkill
- x-styleSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 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.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Tools: run in the app runtime (full process.env), one default export per file.
- Very specific: line 69
After editing, check LSP diagnostics / pnpm typecheck and fix type errors before moving on.
- Very specific: line 83
Document exported config with TSDoc (@remarks, @param, @returns, @defaultValue, @see).
- Very specific: line 92
When building a RegExp from data, escape it (literal match) to avoid ReDoS.
- Very specific: line 107
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
A Slack-based content assistant built on the eve agent framework. Writers @mention it in Slack; it loads a per-surface style skill, pulls source material from Notion (user-scoped OAuth via Vercel Connect), drafts in the house voice, and publishes approved pieces back to Notion. Files and assets are stored in Vercel Blob.
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)
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 diagnosticsThere is no unit-test suite. Verify changes with pnpm typecheck and npx eve info
(both must 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/upload_asset.tsis the toolupload_asset; a connection atagent/connections/notion.tsregisters asnotion. - Authored slots:
agent/agent.ts(model),agent/instructions.md(system prompt),agent/tools/*.ts(defineTool, ordefineWorkflowToolfor durable tools such asresearch),agent/connections/*.ts,agent/channels/*.ts,agent/skills/<name>/SKILL.md,agent/subagents/<id>/agent.ts(defineAgent),agent/sandbox.ts(exportsenvironmentand adefineSandbox()default). - Tools run in the app runtime (full
process.env), one default export per file. Gate destructive tools withapprovalfromeve/tools/approval. Connections accept the sameapprovalfield — pass a policy that inspectstoolName/toolInputto gate specific tools (e.g.notiongatesnotion-create-pagesvia itsAPPROVAL_REQUIRED_TOOLSlist). - Skills are load-on-demand. A packaged skill (
<name>/SKILL.md) requiresdescriptionfrontmatter; that description is the routing hint. Adding a new surface is just a new<surface>-styleskill folder: theSURFACESenum thatlint_against_styleand the reviewer'sget_surface_rubricshare is generated from those folders intoagent/lib/surfaces.generated.tsbypnpm sync:shared, so there is no hand-edited enum to keep in step. Tool code can't read skill files at runtime (ctx.getSkill()is gone), so each skill'sreferences/banned-words.jsonis bundled intoagent/lib/banned-words.generated.tsby the same script. - Shared references live in
shared-references/(the source of truth).scripts/sync-shared.mjscopies them into every skill'sreferences/and regenerates the managed## Shared referencessection in eachSKILL.md(the bullet text lives in that script'sSHARED_FILES). Edit the source and runpnpm sync:shared(also run onpredev/prebuild); never edit the synced copies or that section. A skill's own## Referencessection is left untouched. - 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). 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. Here:researcherandreviewer(the reviewer carries its own generated rubric module +get_surface_rubrictool rather than inheriting the root's skills).defineAgentno longer takesoutputSchema, so both settool: falseand the root reaches them through theresearch/reviewworkflow tools, which callctx.agent("<id>").send(message, { outputSchema }). A tool can't share a subagent's name (the compiler rejects it even withtool: false), hence the different names. - 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. @biomejs/biomeis pinned to 2.5.x: Ultracite 8.0.x's preset still configures a nursery rule that Biome 2.6 renamed, so Biome 2.6 refuses the config. Bump both together once Ultracite supports 2.6 (pnpm exec ultracite doctorchecks the pairing).- Document exported config with TSDoc (
@remarks,@param,@returns,@defaultValue,@see). Avoid inline//comments — put rationale in the TSDoc block instead.
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 (SLACK_CONNECTOR,NOTION_CONNECTOR); Notion auth is per-user via Vercel Connect and Blob auth is via the project's OIDC token — there are no API keys in code. - When building a
RegExpfrom data, escape it (literal match) to avoid ReDoS; bound untrusted input length. - Gate irreversible or high-impact actions behind
approval: destructive tools (delete_asset,clear_writer_preferences) and connection writes (thenotionconnection gatesnotion-create-pages). - For per-user storage, derive the key from the resolved principal
(
ctx.session.auth.current), never from model input — seeagent/lib/writer-preferences.ts. The writer-preference files live under the reservedwriter-preferences/Blob prefix, which the general asset tools refuse so they can't read or overwrite another writer's file.
Before committing
pnpm typecheckpasses.pnpm check(Ultracite) passes.npx eve inforeports 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.

