Goal
Repair monorepo instructions so repository-wide rules remain at the root while package-specific rules stay within their appropriate scopes.
Repository Context
This repository contains a web application, API, and shared UI package.
platform/
├── AGENTS.md
├── apps/
│ ├── web/
│ │ └── AGENTS.md
│ └── api/
│ └── AGENTS.md
├── packages/
│ └── ui/
│ └── AGENTS.md
└── package.json
Repository-wide rules:
- Use
pnpm. - Run validation relevant to the affected workspace.
- Shared contracts must remain backward compatible unless a breaking change is explicitly planned.
Web-specific rules:
- Follow the Next.js App Router architecture.
- Prefer Server Components unless client-side behavior is required.
API-specific rules:
- Keep HTTP handling in routes.
- Keep business logic in services.
UI-specific rules:
- Shared components must not import application-specific code.
Current AGENTS.md
The current instructions are:
=== /AGENTS.md ===
# Project Instructions
- Use `pnpm`.
- Follow the Next.js App Router architecture.
- Keep HTTP handling in routes.
- Shared UI components must not import application-specific code.
- Run validation relevant to the affected workspace.
=== /apps/web/AGENTS.md ===
# Web Instructions
- Use `pnpm`.
=== /apps/api/AGENTS.md ===
# API Instructions
- Use `pnpm`.
=== /packages/ui/AGENTS.md ===
# UI Instructions
- Use `pnpm`.
Your Task
Reorganize the instructions according to their scope.
Keep repository-wide guidance at the root and move web, API, and shared-UI guidance into their corresponding nested AGENTS.md sections.
Avoid unnecessarily duplicating root instructions in nested files.