Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions ai-guidelines/templates/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# AGENTS.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we could instruct agents to reference this repo (engineering-general) for general guidelines, with each project being able to add override configurations on top


## Project Overview

[One sentence: language/framework, key versions, what makes this repo architecturally non-standard]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Idea: add a prompt that we could use to populate this section using agents. Something like:

You are an expert software developer performing a codebase audit.
Your task: populate the "Project Overview" section of `AGENTS.md`.

Browse the repository and document:
- Primary language(s) and frameworks
- Full tech stack (runtime, build tools, test frameworks, infrastructure, etc.)
- Architectural patterns or notable conventions
- Anything else that would help an agentic model navigate, modify, or extend this codebase effectively

Be specific and concise. Prefer facts over generalities.


## Tech Stack

- Framework: `[ie. Next.js 15 (App Router + Pages Router hybrid)]`
- Language: `[ie. TypeScript]`
- Package Manager: `[ie. pnpm (always use pnpm, never npm)]`

## Key Commands

- Install: `[command]`
- Dev server: `[command]`
- Run all tests: `[command]`
- Run one test: `[command with path/pattern flag]`
- Lint: `[command]`
- Build/compile: `[command]` _(if applicable)_

## Non-Obvious Patterns

### [Pattern name]

[1–3 sentences explaining the mechanism, not just the rule]

## Code Style

- [Convention or constraint]
- [Convention or constraint]

## Testing Rules

- Write tests for all new functionality.
- [Mocking/stubbing convention for this repo]
- [External service strategy: VCR cassettes / webmock / pytest-httpretty / MSW / etc.]
- Run `[test command]` before marking any task complete.
- Tests must be deterministic and isolated — no order-dependent state.

## Boundaries

### Always fine

- Read files and list directory contents
- Run lint, typecheck, and single test files
- Add or edit tests

### Ask first

- Install or remove dependencies (Gemfile, package.json, requirements.txt)
- Delete files
- Make schema or migration changes
- Open PRs or push to any branch

### Never

- Commit `.env`, secrets, credentials, or API keys
- Force push to `main` or any protected branch
- Modify generated or vendored directories: `vendor/`, `dist/`, `build/`, `node_modules/`, `app/assets/builds/`
- [Any repo-specific protected paths — e.g., Solr config, IIIF schema files]

## Project Structure

- `[path]` — [why it's worth calling out]
- `[path]` — [why it's worth calling out]