Skip to content

Rewrite the agent instructions and split them by folder - #327

Merged
wasimxyz merged 1 commit into
stagingfrom
rewrite-agents-md
Oct 16, 2026
Merged

wasimxyz merged 1 commit into
stagingfrom
rewrite-agents-md

Conversation

@wasimxyz

Copy link
Copy Markdown
Member

What changes

  • Root AGENTS.md: rewritten to hold only the rules every task needs: secrets in commits, the changelog, generated snapshots, docs, testing before you call a change done, the Python 3.12 floor, how to load skills, and a pointer for Cursor Cloud.
  • New AGENTS.md files next to the code they cover: web/lib/api, web/lib/db, web/lib/mcp, web/components, web/tests, web/mcp-apps, lambda, infra, and packages/shared.
  • Rewritten: web, watcher, and docs/site.
  • Skills: 31 agent skills are named in the file nearest the code they help with.
    • The four community skills (nuqs, zod, drizzle-orm-patterns, tanstack-form) are pinned to reviewed commits.
    • Agents ask before installing anything else.
  • External docs: each service the code calls (Slack, Linear, Vercel, Better Auth, Drizzle, MCP, AWS) is linked from the nearest file, using its llms.txt.
  • Next.js block: agentRules: false in web/ and docs/site/ stops next dev from writing its block into AGENTS.md. Our own Next.js 16 line replaces it.
  • Deleted files:
    • web/CLAUDE.md, because Claude Code 2.1.277 and later reads AGENTS.md directly.
    • The two Cursor-only rules in .cursor/rules/.
  • Cursor Cloud notes: moved to docs/developer/cursor-cloud.md. It now covers a VM where Postgres isn't installed, and includes a recommended install script for the Cloud environment.
  • Stale developer docs fixed:
    • the Node.js version (24 with npm 11);
    • the local DATABASE_URL, which the reset and seed scripts refused;
    • the old parse_s3_event claim;
    • the make check description;
    • the missing infra-validate.yml section;
    • a broken link to the MCP Apps spec.

Why

How I checked

  • Every path, make target, and npm script named in the files exists, and every URL returns 200.
  • All 31 skills resolve with npx skills add <source> --list. Each pinned skill loads from its commit, and a made-up commit fails.
  • /_next/mcp, which next-dev-loop uses, still responds under make dev with agentRules: false.
  • make check passes, and the MCP docs bundle is unchanged.
  • Fresh agents answered 8 scripted questions correctly using only the repo: an MCP schema change, a zod upgrade, a watcher bug fix, a machine-only route, Postgres on Cursor Cloud, regenerating the Better Auth schema, the nuqs skill, and today's changelog entry. One gap, the exact command for a pinned skill, was fixed, and the question passed when asked again.

After merging

  • Add the install and start scripts from docs/developer/cursor-cloud.md to the Cloud environment in the Cursor dashboard, so agents stop installing Postgres and uv by hand.
  • Follow-up, not changed here: _LAMBDA_PRESET_SCOPES in lambda/tests/integration/test_lambda_api.py is missing runs:read, which the lambda preset in web/lib/api/scope-catalog.ts includes.

There's no changelog entry, because this changes only agent instructions and developer docs. There's no watcher version bump, because nothing under watcher/src/ changed.

The root AGENTS.md now holds only the rules every task needs. Each folder
with its own conventions gets a short AGENTS.md next to its code. The rules
come from the last 25 pull requests and were checked against the code, and
each file names the agent skills and external docs for the code it covers.

Also turns off the AGENTS.md block that Next.js writes on every `next dev`,
removes web/CLAUDE.md and the Cursor-only rules, moves the Cursor Cloud
notes to docs/developer/cursor-cloud.md, and fixes stale developer docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
data-hub Ready Ready Preview Oct 16, 2026 10:48pm UTC
data-hub-docs Ready Ready Preview Oct 16, 2026 10:48pm UTC

Request Review

@wasimxyz wasimxyz self-assigned this Oct 16, 2026
@wasimxyz
wasimxyz merged commit 3ca35fc into staging Oct 16, 2026
9 checks passed
@wasimxyz
wasimxyz deleted the rewrite-agents-md branch October 16, 2026 22:52

This branch was successfully deployed

2 active deployments
Preview – data-hub — 06de36b8 Deployed Oct 16, 2026 by vercel[bot]
Preview – data-hub-docs — 06de36b8 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant