بنقرة واحدة
architecture
架构设计方法(语言无关)——分层、模块边界、依赖方向、设计模式、何时不要抽象。具体技术栈选型见所用预设的 PRESET.md/rules。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
架构设计方法(语言无关)——分层、模块边界、依赖方向、设计模式、何时不要抽象。具体技术栈选型见所用预设的 PRESET.md/rules。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Execute the check workflow from this AI development team preset. Use when the user writes /check, asks for check, or wants the corresponding team process in Codex.
Execute the dev workflow from this AI development team preset. Use when the user writes /dev, asks for dev, or wants the corresponding team process in Codex.
Execute the fix workflow from this AI development team preset. Use when the user writes /fix, asks for fix, or wants the corresponding team process in Codex.
Execute the plan workflow from this AI development team preset. Use when the user writes /plan, asks for plan, or wants the corresponding team process in Codex.
Execute the project-preset workflow from this AI development team preset. Use when the user writes /project-preset, asks for project-preset, or wants the corresponding team process in Codex.
Execute the review-all workflow from this AI development team preset. Use when the user writes /review-all, asks for review-all, or wants the corresponding team process in Codex.
| name | architecture |
| description | 架构设计方法(语言无关)——分层、模块边界、依赖方向、设计模式、何时不要抽象。具体技术栈选型见所用预设的 PRESET.md/rules。 |
这是通用方法,不绑定语言/框架。具体技术栈的选型(如 web 用 Next.js/Hono/Prisma,AI 用 FastAPI/pgvector)见所用预设的
PRESET.md和rules/。 本技能是 Architect-Planner 在做架构决策时使用的方法库。
表现层 (Presentation) ← 入口:UI / API 路由 / CLI
↓ 只能向下依赖
业务层 (Business) ← 用例、领域逻辑(不依赖框架)
↓
数据层 (Data) ← 仓储、ORM、缓存
↓
基础设施 (Infra) ← DB / 队列 / 存储 / 外部服务
src/
├── features/ # 按业务功能切分
│ └── [feature]/
│ ├── ... # 该功能的组件/逻辑/数据访问/类型
│ └── index.ts # 模块的公共 API(对外只暴露这里)
├── shared/ # 跨功能复用的通用代码
└── app/ (或 main) # 应用入口、装配
各预设已给出推荐栈:web-fullstack 见其 PRESET.md(React/Next.js/Hono/Prisma 等);ai-app 见其 PRESET.md(Claude SDK/pgvector/FastAPI 或 Vercel AI SDK)。
| 模式 | 用途 |
|---|---|
| Repository | 隔离数据访问,业务层不碰具体存储 |
| Service / Use Case | 封装业务逻辑 |
| Middleware / Pipeline | 请求处理链(认证、日志、校验) |
| Factory | 复杂对象创建 |
| Observer / 事件 | 解耦的事件驱动 |
反模式(避免):过度抽象、单例滥用(优先依赖注入)、God Object(一个模块做太多事)、为"将来可能"提前抽象(YAGNI)。
架构决策产出 architecture.md(格式见 Architect-Planner agent),必须包含: