nodeskclaw / rules
Cursor rule757 starsChanged 5 months agoApache-2.0View on GitHub
设计文档写作规范 — 重架构轻代码
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/admin-portal-boundary.mdcCursor rule
- .cursor/rules/auto-plan-review.mdcCursor rule
- .cursor/rules/ce-ee-boundary.mdcCursor rule
- .cursor/rules/coding-style.mdcCursor rule
- .cursor/rules/community-pr-review.mdcCursor rule
- .cursor/rules/docs-first-workflow.mdcCursor rule
- .cursor/rules/figma-rate-limit.mdcCursor rule
- .cursor/rules/first-principles.mdcCursor rule
- .cursor/rules/gene-skill-sync.mdcCursor rule
- .cursor/rules/git-conventions.mdcCursor rule
- .cursor/rules/grep-search-discipline.mdcCursor rule
- .cursor/rules/k8s-cluster-operations.mdcCursor rule
- .cursor/rules/plan-no-line-numbers.mdcCursor rule
- .cursor/rules/plan-ui-summary.mdcCursor rule
- .cursor/rules/proxy-no-proxy.mdcCursor rule
- .cursor/rules/runtime-provider-awareness.mdcCursor rule
- .cursor/rules/sensitive-info-policy.mdcCursor rule
- release-deploySkill
The file
Files
---
description: 设计文档写作规范 — 重架构轻代码
globs: ee/docs/**/*.md
alwaysApply: false
---
# 设计文档写作规范
## 核心原则
文档的目的是**讲清楚设计决策和架构**,不是提前写代码。代码到实现阶段再写。
## 该写什么
- 架构图、流程图(ASCII / Mermaid)
- 模块职责划分、分层关系
- 数据模型(ER 图、字段表格)
- API 接口约定(路径、请求/响应 Schema)
- 调用链路、时序关系
- 关键设计决策和取舍理由
- 配置项、环境变量清单
## 不该写什么
- 完整的类/函数实现代码
- 超过 10 行的代码块
- 逐行注释的代码示例
## 代码使用原则
- 代码只用于**说明接口签名或数据结构**,不写实现逻辑
- 每个代码块不超过 10 行,只展示关键签名
- 用伪代码或文字描述代替完整实现
```python
# ✅ 好 — 只展示接口签名
class K8sClientManager:
async def get_or_create(cluster_id, kubeconfig_enc) -> ApiClient: ...
async def rebuild(cluster_id, kubeconfig_enc) -> ApiClient: ...
async def remove(cluster_id): ...
# ❌ 坏 — 在文档里写完整实现
class K8sClientManager:
def __init__(self, crypto):
self._crypto = crypto
self._entries = {}
self._lock = asyncio.Lock()
async def get_or_create(self, cluster_id, kubeconfig_enc):
async with self._lock:
entry = self._entries.get(cluster_id)
if entry is None:
entry = await self._create_entry(...)
# ... 50 more lines ...
```
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

