agentleFS
yueheng-rgbyueheng-rgb/codex-factory/skills/product-architecture/SKILL.md

product-architecture

Skill100 starsChanged 2 months agoMITView on GitHub

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We found no rules to list in this file: it reads as prose or reference rather than instructions.

Files
SKILL.md

Product Architecture

用途

把用户需求拆解为:用户角色、页面结构、数据实体、交互流程、权限边界、第一版最小闭环。 不要直接写代码。 先出设计。

使用场景

  • 应用类型确定后
  • 开始写代码之前
  • 需要在脑中有完整蓝图

拆解步骤

1. 用户角色

  • 列出所有用户角色(如:管理员、普通用户、审核员)
  • 每个角色的核心目标是什么
  • 第一版最少需要哪些角色

2. 页面结构

  • 画出页面树(从入口到所有叶子页面)
  • 标注哪些页面在第一版做,哪些不做
  • 每个页面的核心 UI 元素(不画细节,只列关键组件)

3. 数据实体

  • 列出核心实体(表)
  • 实体之间的关系(1:1 / 1:N / M:N)
  • 每个实体的核心字段(5-10 个,不列全部)
  • 审计字段(id, created_at, updated_at)

4. 交互流程

  • 用户完成一个核心目标的完整路径
  • 正常路径 + 失败路径
  • 边界情况:空数据、重复操作、权限不足

5. 权限边界

  • 每个角色能做什么、不能做什么
  • 权限检查在服务端哪一层做

6. 第一版最小闭环

  • 只选 1-2 个核心用户场景
  • 一个用户能在第一版完成什么真实任务

常见错误

  • ❌ 跳过用户角色分析,直接设计页面
  • ❌ 页面结构太复杂(第一版不超过 5 个页面)
  • ❌ 数据实体太多(第一版不超过 5 张表)
  • ❌ 交互流程只画成功路径,忽略失败
  • ❌ 不做权限分析

输出格式

## 产品架构设计稿

### 用户角色
- [角色1]:[目标]
- [角色2]:[目标]

### 页面结构(第一版)
/ → [页面名]
  /child → [子页面]
(标注 🔜 表示后续版本)

### 数据实体(第一版)
- [实体1]:核心字段...
  - [实体2]:核心字段...

### 核心交互流程
[用户] → [操作] → [结果]
失败路径:...

### 权限边界
- [角色] 可以 [操作] [资源]
- [角色] 不能 [操作] [资源]
- 权限校验位置:[中间件/Service]

### 第一版最小闭环
用户能完成:[真实目标]
涉及页面:[1-3 个]
涉及 API:[1-3 个]

### 暂不实现
- ...

### 风险点
- ...

### 需要确认
- ...

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.