RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/NoDeskAI/browser-pilot

Cursor rule

.cursor/rules/build-from-user-perspective.mdc

写代码和改构建配置时,必须站在最小用户环境(CE 裸 clone)视角验证,不能只在自己的全量开发环境里通过

Cursor rules

Quality

51/100

Scores the file, not the repository.

Length

125 words

3 headings · 0 code blocks

Repository

34

— · pushed 25 days ago

Last changed

3 days ago

First indexed 3 days ago.
NoDeskAI/browser-pilot/.cursor/rules/build-from-user-perspective.mdcRawGitHub
1---
2description: 写代码和改构建配置时,必须站在最小用户环境(CE 裸 clone)视角验证,不能只在自己的全量开发环境里通过
3alwaysApply: true
4---
5 
6# 从用户视角写代码
7 
8开发者的环境 ≠ 用户的环境。开发者有子模块、有 .env、有本地缓存、有完整数据;用户可能只有 `git clone` 后的裸仓库、空数据库、零配置。**每一行代码都要假设运行在最小环境里。**
9 
10## 规则
11 
121. **可选依赖必须有降级路径**——EE 模块、第三方服务、特定环境变量、本地文件,任何不保证存在的东西,代码都必须处理"它不在"的情况。`import` 要有 try/except 或条件守卫,配置要有默认值,UI 要有空状态。
132. **可选组件显式 opt-in**——不能让功能隐式依赖可选组件的存在。默认路径必须是不含可选组件的最小版本(CE)。
143. **文件系统探测不可靠**——`mkdir -p` 会创建空目录骗过 `existsSync`,Docker COPY 会传播空目录。如果用文件存在性做判断,检查具体文件而非目录。
154. **构建期解析必须隔离可选模块**——`if (__EE__) import('@ee/...')` 不是 CE 构建隔离;Vite/Rollup 仍会解析 import 路径。所有 `@ee/*` import 在 CE 模式下都必须有可解析的 stub/alias。
165. **改完代码后做环境差异检查**——在脑中走一遍"CE 用户裸 clone → docker compose build → 首次启动"的完整路径:每一个 COPY / import / 路径引用 / API 调用,在裸环境里能工作吗?
17 
18## 本项目特定
19 
20- `ee/` 是 git 子模块,CE 用户没有。Dockerfile 用 `mkdir -p ee/frontend ee/backend` 保证 COPY 不报错,但 **版本检测必须通过 `EDITION` 环境变量**,不能靠 `ee/` 目录是否存在。
21- 前端 `vite.config.ts`:`process.env.EDITION` 优先,未设置时降级为 `existsSync(resolve(eeDir, 'index.ts'))`。CE 模式下 `@ee` 必须指向 `frontend/src/ee-stubs`,不能省略 alias。
22- 后端 `config.py`:`_env("EDITION", "")` 优先,未设置时降级为文件系统检测。
23- Docker 构建:`ARG EDITION=ce`,默认 CE。EE 通过 `.env` 中 `EDITION=ee` 或 `--build-arg EDITION=ee` 显式启用。
24- 涉及 EE import、前端构建配置、Dockerfile、可选模块时,必须至少跑一次 `EDITION=ce npm run build`;不能用本地带 `ee` submodule 的默认构建结果替代 CE 验证。
25 

Commands it names

  • git clone

Sections

  • 从用户视角写代码
  • 规则
  • 本项目特定

What it covers

buildsecurity

Stack — with the evidence

docker

(1.00)

node

(0.95)

python

(0.80)

vue

(0.70)

fastapi

(0.70)

postgres

(0.70)

tailwind

(0.70)

vite

(0.70)

aws

(0.70)

typescript

(0.60)

javascript

(0.50)

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
NoDeskAI
Language
—
License
—
Archived
no

All configs in this repo

Also in NoDeskAI/browser-pilot

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
NoDeskAI/browser-pilot.cursor/rules/debug-container.mdc · 34Cursor rulesdockerpython+9api65/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/deploy.mdc · 34Cursor rulesdockerpython+9no sections38/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/env-vars.mdc · 34Cursor rulesdockerpython+9setup63/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/fingerprint-popover-sync.mdc · 34Cursor rulesdockerpython+9no sections25/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/keyboard-shortcuts-ux.mdc · 34Cursor rulesdockerpython+9ui31/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/plan-ui-summary.mdc · 34Cursor rulesdockerpython+9ui54/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/tailwind-css-color-mix.mdc · 34Cursor rulesdockerpython+9ui50/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/ux-ui-daynight.mdc · 34Cursor rulesdockerpython+9lint-formatui54/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/verify-before-claim.mdc · 34Cursor rulesdockerpython+9no sections50/1003 days ago
Diff against .cursor/rules/debug-container.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/env-vars.mdc Diff against .cursor/rules/fingerprint-popover-sync.mdc Diff against .cursor/rules/keyboard-shortcuts-ux.mdc Diff against .cursor/rules/plan-ui-summary.mdc Diff against .cursor/rules/tailwind-css-color-mix.mdc Diff against .cursor/rules/ux-ui-daynight.mdc Diff against .cursor/rules/verify-before-claim.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack