-
-
Notifications
You must be signed in to change notification settings - Fork 3k
docs: add AGENTS.MD for AI and developer guidance #7348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
359ffae
docs: add AGENTS.MD for AI and developer guidance
JohnMcLear 3409e40
docs: update project name from Etherpad Lite to Etherpad
JohnMcLear b8c7987
docs: fix incorrect test directory path in AGENTS.MD
JohnMcLear 6a7d46b
docs: correct test stack description in AGENTS.MD (Mocha is primary)
JohnMcLear 1b656b4
docs: fix incorrect easysync documentation path in AGENTS.MD
JohnMcLear 8d43bf2
chore: add .pr_agent.toml to enable automatic PR review/description o…
JohnMcLear ec37d5d
docs: remove nodejs version from README and AGENTS.MD (prefer package…
JohnMcLear 240aaa2
docs: standardize all indentation to 2 spaces
JohnMcLear 2b36182
chore: update src/package.json node engine to match root (>=20.0.0)
JohnMcLear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [pr_reviewer] | ||
| run_on_pr_sync = true | ||
|
|
||
| [pr_description] | ||
| run_on_pr_sync = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Agent Guide - Etherpad | ||
|
|
||
| Welcome to the Etherpad project. This guide provides essential context and instructions for AI agents and developers to effectively contribute to the codebase. | ||
|
|
||
| ## Project Overview | ||
| Etherpad is a real-time collaborative editor designed to be lightweight, scalable, and highly extensible via plugins. | ||
|
|
||
| ## Technical Stack | ||
| - **Runtime:** Node.js | ||
| - **Package Manager:** pnpm | ||
| - **Languages:** TypeScript (primary), JavaScript, CSS, HTML | ||
| - **Backend:** Express.js, Socket.io | ||
| - **Frontend:** Legacy core (`src/static`), New UI (`ui/`), Admin UI (`admin/`) | ||
| - **Build Tools:** Vite (for `ui` and `admin`), custom scripts in `bin/` | ||
| - **Testing:** Mocha (Backend), Vitest, Playwright, custom backend test suite | ||
|
|
||
| ## Directory Structure | ||
| - `src/node/`: Backend logic, API, and database abstraction. | ||
| - `src/static/`: Core frontend logic (Legacy). | ||
| - `ui/`: Modern React-based user interface. | ||
| - `admin/`: Modern React-based administration interface. | ||
| - `bin/`: Utility and lifecycle scripts. | ||
| - `doc/`: Documentation in Markdown and Adoc formats. | ||
| - `src/tests/`: Test suites (backend, frontend, UI, admin). | ||
| - `var/`: Runtime data (logs, dirtyDB, etc. - ignored by git). | ||
| - `local_plugins/`: Directory for developing and testing plugins locally. | ||
|
|
||
| ## Core Mandates & Conventions | ||
|
|
||
| ### Coding Style | ||
| - **Indentation:** 2 spaces for all files (JS/TS/CSS/HTML). | ||
| - **No Tabs:** Use spaces only. | ||
| - **Comments:** Provide clear comments for complex logic. | ||
| - **Backward Compatibility:** Always ensure compatibility with older versions of the database and configuration files. | ||
|
|
||
| ### Development Workflow | ||
| - **Branching:** Work in feature branches. Issue PRs against the `develop` branch. | ||
| - **Commits:** Maintain a linear history (no merge commits). Use meaningful messages in the format: `submodule: description`. | ||
| - **Feature Flags:** New features should be placed behind feature flags and disabled by default. | ||
| - **Deprecation:** Never remove features abruptly; deprecate them first with a `WARN` log. | ||
|
|
||
| ### Testing & Validation | ||
| - **Requirement:** Every bug fix MUST include a regression test in the same commit. | ||
| - **Backend Tests:** Run `pnpm --filter ep_etherpad-lite run test` from the root. | ||
| - **Frontend Tests:** Accessible at `/tests/frontend` on a running instance. | ||
| - **Linting:** Run `pnpm run lint` to ensure style compliance. | ||
| - **Build:** Run `pnpm run build:etherpad` before production deployment. | ||
|
|
||
| ## Key Concepts | ||
|
|
||
| ### Easysync | ||
| The real-time synchronization engine. It is complex; refer to `doc/public/easysync/` before modifying core synchronization logic. | ||
|
|
||
| ### Plugin Framework | ||
| Most functionality should be implemented as plugins (`ep_...`). Avoid modifying the core unless absolutely necessary. | ||
|
|
||
| ### Settings | ||
| Configured via `settings.json`. A template is available at `settings.json.template`. Environment variables can override any setting using `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. | ||
|
|
||
| ## AI-Specific Guidance | ||
| AI/Agent contributions are explicitly welcomed by the maintainers, provided they strictly adhere to the guidelines in `CONTRIBUTING.md` and this guide. Always prioritize stability, readability, and compatibility. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Docs set html 2-space
📘 Rule violation✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools