工作台模板

TypeScript 单体仓库:根目录 AGENTS.md 与 .cursor/rules/monorepo.mdc

在 pnpm / npm / yarn workspace 里用 Cursor 写 TypeScript 的工程师。路径:AGENTS.md · .cursor/rules/monorepo.mdc

不是 Roo / Cline 模版。本站不托管安装包。订哪档去 /compare。

全部工作台模板 · 官方安装 · 订哪档

把下面两个文件放到仓库根目录。路径按 Cursor 字面量:AGENTS.md.cursor/rules/monorepo.mdc

先投下规则,再去 /compare 决定订哪档。本页不是 Roo / Cline / Continue / ChatGPT 模版;不要改成 .roo.clinerules。本站不托管 Cursor 安装包,装桌面走 /downloads

AGENTS.md
AGENTS.md
# AGENTS.md

This repository is a TypeScript monorepo. Read this file before editing.

## Layout

- `apps/` — deployable applications. Each app owns its `package.json`, tsconfig, and runtime.
- `packages/` — shared libraries consumed via the workspace protocol already used here.
- Do not add a new top-level code folder when the change belongs in `apps/` or `packages/`.

## Package manager

- Honor the lockfile already in the repo (`pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock`).
- Install with the matching command: `pnpm install` / `npm install` / `yarn`.
- Do not add a new npm package unless the task requires it and no workspace package already covers it.
- Internal dependencies use the same workspace protocol as existing packages (`workspace:*` or `*`).

## TypeScript

- Keep existing `compilerOptions` (strictness, `module`, `paths`). Do not weaken `strict`.
- Shared types live in `packages/`. Do not copy type files between apps.
- Apps import a package's public exports only. Do not reach into another package's `src` internals unless that is already the local convention.

## Changes

- Scope the diff to the app or package named in the request.
- Do not drive-by refactor unrelated files.
- Match local naming, comment style, and test layout.
- After edits, run the nearest `typecheck` / `lint` / unit test for the touched package.

## Secrets

- Never commit API keys, tokens, or `.env` values.
- `.cursor/mcp.json` must not contain secrets; use the process environment instead.

## What this file is

Root agent contract picked up from the repository root. Glob-scoped Cursor rules live in `.cursor/rules/*.mdc`.