Skip to content

Add AGENTS.md#1647

Draft
djstrong wants to merge 1 commit intomainfrom
agents-md
Draft

Add AGENTS.md#1647
djstrong wants to merge 1 commit intomainfrom
agents-md

Conversation

@djstrong
Copy link
Contributor

@djstrong djstrong commented Feb 17, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  • Add AGENTS.md to the repository root with coding conventions and project context for AI agents.
  • Covers monorepo structure, tech stack, testing conventions, documentation/DRY principles, code comment rules, error handling, and workflow.

Why


Testing


Notes for Reviewer (Optional)


Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

Copilot AI review requested due to automatic review settings February 17, 2026 20:42
@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

⚠️ No Changeset found

Latest commit: abbaaff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Feb 17, 2026 8:42pm
ensnode.io Ready Ready Preview, Comment Feb 17, 2026 8:42pm
ensrainbow.io Ready Ready Preview, Comment Feb 17, 2026 8:42pm

@djstrong djstrong changed the title docs: add AGENTS.md Add AGENTS.md Feb 17, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

A new monorepo overview document (AGENTS.md) has been added to the ENSNode project. It outlines the project structure, technology stack, testing conventions, documentation standards, error handling philosophy, and development workflow expectations using changesets.

Changes

Cohort / File(s) Summary
Monorepo Documentation
AGENTS.md
New comprehensive overview file documenting the monorepo's scope, structure (apps and packages layout), core tech stack (TypeScript, pnpm, Hono, Ponder, Zod, Drizzle, Biome, Vitest, tsup/tsx), testing conventions, documentation stance, code comment guidelines, error handling principles, and changesets workflow requirements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop! A guidebook appears, so neat and so clear,
With monorepo maps and tech stacks we hold dear,
From Hono to Zod, from Drizzle to tests,
ENSNode's now documented—we've done our best!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a blank template with no actual content filled in; all sections (Summary, Why, Testing, Notes, and Checklist) lack the required information. Complete all required sections: add 1-3 bullets summarizing the AGENTS.md file content, explain why this documentation is needed, describe testing/validation approach, and check the blocking checklist items.
Title check ❓ Inconclusive The title 'Add AGENTS.md' is vague and generic, describing only that a file was added without conveying what the file's purpose or significance is. Consider using a more descriptive title like 'docs: Add AGENTS.md with monorepo guidelines and architecture documentation' to better communicate the change's intent.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agents-md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new root-level AGENTS.md to document high-level ENSNode repository context and contribution conventions for automated agents and contributors working in the monorepo.

Changes:

  • Introduces AGENTS.md describing monorepo layout, tech stack, testing conventions, and review guidance.
  • Adds workflow guidance around changesets (currently contains a policy mismatch vs existing contributing docs).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## Workflow

- All changes require changesets: https://ensnode.io/docs/contributing/prs/#changesets
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement "All changes require changesets" is inconsistent with the repo’s documented changeset policy. The contributing docs explicitly say changesets should not be created for every PR/logical change, and that a PR with no qualifying logical changes should not include a changeset. Please reword this bullet to match the criteria (e.g., “Add a changeset when your PR includes a logical change that should bump versions or be communicated in release notes”).

Suggested change
- All changes require changesets: https://ensnode.io/docs/contributing/prs/#changesets
- Add a changeset when your PR includes a logical change that should bump versions or be communicated in release notes: https://ensnode.io/docs/contributing/prs/#changesets

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djstrong This looks like good feedback from Copilot.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 56-58: Update the "Error Handling" section (the "Fail fast and
loudly" guidance) to be explicit and actionable: specify the preferred
validation approach (e.g., use zod.parse(...) to throw on invalid input vs
zod.safeParse(...) when a non-throwing flow is required), state whether to use
plain Error or a typed/custom error hierarchy (e.g., AppError / ValidationError
classes) and when to instantiate them, and define how errors must surface at API
boundaries (HTTP status codes mapping, structured JSON error responses with
fields like code/message/details). Include short examples of the expected
pattern for validation, throwing, and API response handling so agents have
concrete behavior to implement.
- Around line 37-43: Add a new "Commands" section to AGENTS.md that provides
explicit, runnable commands for agents and devs to validate changes: include
install (pnpm install), run all tests (pnpm test), run package-scoped tests
(pnpm --filter <package-name> test), lint/format with Biome (pnpm lint and pnpm
lint:ci), and type checking (pnpm typecheck); ensure the section header is
"Commands" and mention Biome as the linter/formatter so agents know which script
to call and adjust any commands to match the root package.json script names if
they differ.

Comment on lines +37 to +43
## Testing

- Tests are colocated with source files (e.g. `foo.test.ts` next to `foo.ts`).
- Use the `*.test.ts` naming convention. Do not use `*.spec.ts`.
- Use `describe`/`it` blocks with `expect` assertions.
- Use `vi.mock()` for module mocking and `vi.fn()` for function stubs.
- Each app and package has its own `vitest.config.ts`.
Copy link

@coderabbitai coderabbitai bot Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and examine the AGENTS.md file
find . -name "AGENTS.md" -type f

Repository: namehash/ensnode

Length of output: 71


🏁 Script executed:

# Get root package.json scripts
cat package.json | head -50

Repository: namehash/ensnode

Length of output: 2122


🏁 Script executed:

# Look at app package examples
fd "package.json" apps/ | head -3 | xargs -I {} sh -c 'echo "--- {} ---"; head -30 {}'

Repository: namehash/ensnode

Length of output: 3023


🏁 Script executed:

# Read the full AGENTS.md file
cat AGENTS.md

Repository: namehash/ensnode

Length of output: 3031


🏁 Script executed:

# Count lines to confirm structure
wc -l AGENTS.md

Repository: namehash/ensnode

Length of output: 72


Add a "Commands" section — AI agents need explicit commands to self-verify changes.

AGENTS.md is consumed by AI coding agents that need executable commands to validate their work. The testing conventions are documented but there's no guidance on how to invoke them, and Biome is listed in the tech stack but never explained how to run.

Add a section like:

Suggested Commands section
## Commands

# Install dependencies
pnpm install

# Run all tests
pnpm test

# Run tests for a specific package
pnpm --filter <package-name> test

# Lint and format (Biome)
pnpm lint                  # auto-fix all files
pnpm lint:ci               # CI mode (fails if changes needed)

# Type check
pnpm typecheck

Adjust exact commands to match the root package.json scripts or add per-package examples if needed. The key is making invocation explicit so agents (and developers) don't have to guess.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 37 - 43, Add a new "Commands" section to AGENTS.md
that provides explicit, runnable commands for agents and devs to validate
changes: include install (pnpm install), run all tests (pnpm test), run
package-scoped tests (pnpm --filter <package-name> test), lint/format with Biome
(pnpm lint and pnpm lint:ci), and type checking (pnpm typecheck); ensure the
section header is "Commands" and mention Biome as the linter/formatter so agents
know which script to call and adjust any commands to match the root package.json
script names if they differ.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djstrong Appreciate your advice on this suggestion from coderabbit.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djstrong Thank you. Happy to get started with whatever you suggest here and then we can continue refining in the future.

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.

2 participants

Comments