Add AGENTS.md with agent instructions for replication-backend#211
Closed
Copilot wants to merge 2 commits into
Closed
Add AGENTS.md with agent instructions for replication-backend#211Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Co-authored-by: sleidig <1682541+sleidig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Start implementation of agents documentation
Add AGENTS.md with agent instructions for replication-backend
Feb 23, 2026
| @@ -0,0 +1,101 @@ | |||
| # Agent Instructions | |||
Contributor
| @@ -0,0 +1,101 @@ | |||
| # Agent Instructions | |||
|
|
|||
| This file provides guidance for AI coding agents working on the **replication-backend** repository. | |||
Contributor
|
|
||
| ## Project Overview | ||
|
|
||
| This is a [NestJS](https://nestjs.com/) backend service (Node.js / TypeScript) that acts as a |
Contributor
| Key source directories: | ||
|
|
||
| | Path | Purpose | | ||
| |---|---| |
Contributor
| | `src/` | Application source code | | ||
| | `src/auth/` | Authentication (JWT, Basic, Cookie) | | ||
| | `src/permissions/` | CASL permission rules and evaluation | | ||
| | `src/restricted-endpoints/` | Proxied CouchDB endpoints with permission checks | |
Contributor
|
|
||
| - Look up error events or issues captured in the production or staging Sentry project. | ||
| - Investigate stack traces and breadcrumbs to understand the root cause of a bug. | ||
| - Correlate a user-reported error with a specific Sentry event before making code changes. |
Contributor
|
|
||
| ## Architecture Notes | ||
|
|
||
| - The service overrides selected CouchDB endpoints (`_bulk_docs`, `_changes`, `_all_docs`, etc.) |
Contributor
| - The service overrides selected CouchDB endpoints (`_bulk_docs`, `_changes`, `_all_docs`, etc.) | ||
| to filter documents based on the requesting user's CASL rules. | ||
| - Permission rules are stored as documents in a dedicated CouchDB database (`PERMISSION_DB`). | ||
| They are loaded and cached by `RulesService`, which watches for changes via the `_changes` feed. |
Contributor
| to filter documents based on the requesting user's CASL rules. | ||
| - Permission rules are stored as documents in a dedicated CouchDB database (`PERMISSION_DB`). | ||
| They are loaded and cached by `RulesService`, which watches for changes via the `_changes` feed. | ||
| - The `_changes` endpoint is extended with a `lostPermissions` array so that clients know which |
Contributor
| - The `_changes` endpoint is extended with a `lostPermissions` array so that clients know which | ||
| documents to purge locally when they lose read access. | ||
| - Authentication supports JWT (bearer token), HTTP Basic, and cookie-based sessions. | ||
| - CouchDB is also exposed as a transparent reverse proxy at `/couchdb/` for admin tooling. |
Contributor
Member
|
Those details are mostly covered in the README.md already. Recent research shows that an AGENTS.md is not adding value in that case. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No
AGENTS.mdexisted to guide AI coding agents working on this repo, resulting in agents lacking project-specific context for architecture, tooling, and available MCP integrations.Changes
AGENTS.md(new): Root-level agent instruction file covering:npmdev commands (build, test, lint, format)TestingModulesetup, mock injection viauseValue,jest.spyOn,authGuardMockProvidersfor controller teststest/dir, Supertest against full app)lostPermissionsfeed extension,RulesServicechange-watching, auth methods,/couchdb/proxy,/api/Swagger UIOriginal prompt
Start implementation
The user has attached the following file paths as relevant context:
- AGENTS.md
[Chronological Review: The conversation began with the user requesting a review of the Agents.md file based on the latest models and best practices. The user outlined specific needs for agents, including fleshing out user requirements, troubleshooting, planning technical implementation, and generating tests. The user then questioned the value of certain items in the list, such as whether to skip specific Angular versions and the necessity of Claude-specific workflow instructions. The conversation continued with requests to add Sentry.io and GitHub MCP server details, as well as discussions about linking relevant instruction files and whether to cover unit and e2e test patterns in Agents.md. The user finally requested to start implementation, then canceled that request to delegate to a cloud agent, and subsequently asked to create a new branch from the master branch for changes.][Intent Mapping:
masterbranch for these changes."][Technical Inventory: Technologies mentioned include Angular (latest version), Sentry.io for error tracking, GitHub for issue and PR management, and various AI models like Claude Sonnet and Opus. The conversation also discussed the structure of the Agents.md file and the potential need for specialized agents.]
[Code Archaeology: The user is currently working on the file located at /home/sleidig/Projects/ndb-core/src/app/core/basic-datatypes/entity/entity-block/entity-block.component.ts. Specific code changes were not detailed in the conversation.]
[Progress Assessment: The user has outlined the requirements for agents and discussed potential improvements to the Agents.md file. They have not yet implemented any changes but have expressed a desire to start.]
[Context Validation: All critical information for continuation is captured, including user requests for specific changes to the Agents.md file and the need for a new branch for changes.]
[Recent Commands Analysis:
masterbranch for these changes."1. Conversation Overview: - Primary Objectives: The user requested a review and improvement of the Agents.md file, questioning the necessity of certain content and suggesting additional details to include. - Session Context: The conversation flowed from an initial review request to specific inquiries about content duplication, versioning, and linking instructions, culminating in a request to create a new branch for changes. - User Intent Evolution: The user shifted from seeking a review to questioning the value of specific content, ultimately focusing on practical implementation steps.- Technical Foundation:
- Angular: Latest version to be referenced in documentation.
- Sentry.io: For error tracking and troubleshooting.
- GitHub: For issue and PR management.
- Codebase Status:
- File Name: entity-block.component.ts
- Purpose: Part of the core application handling basic data types.
- Current State: User is preparing to implement changes based on discussions.
- Key Code Segments: Not specified in the conversation.
- Dependencies: Related to the overall architecture of the application.
- Problem Resolution:
- Issues Encountered: Questions about the value of certain instructions and potential duplication in documentation.
- Solutions Implemented: Suggestions for improvements to the Agents.md file and the structure of agent instructions.
- Debugging Context: No specific debugging issues were mentioned.
- Lessons Learned: Importance of clarity and relevance in documentation.
- Progress Tracking:
- Completed Tasks: None yet; discussions are ongoi...
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.