overall-designer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Overall Design Generator

总体设计生成器

Output: Background + Database Overview + Core Flow + Phased Iteration Plan.
Before starting: Check if
PROJECT_MAP.md
exists at project root. If yes, read it first.
输出内容:背景 + 数据库概览 + 核心流程 + 分阶段迭代计划。
开始前:检查项目根目录是否存在
PROJECT_MAP.md
文件。如果存在,请先阅读该文件。

Step 1: Understand & Clarify

步骤1:理解与澄清

1.1 Decompose Requirement

1.1 需求拆解

  • Parse requirement, extract every business concept and action verb
  • For each concept: does it exist in current system? Which table/service/module?
  • For each action: which systems involved? Data flow?
  • Mark: "known" / "to investigate (code)" / "need user confirmation"
  • 解析需求,提取所有业务概念和动作动词
  • 针对每个概念:它是否存在于现有系统中?对应哪个表/服务/模块?
  • 针对每个动作:涉及哪些系统?数据流是怎样的?
  • 标记:"已知" / "需调研(代码)" / "需用户确认"

1.2 Explore Current System

1.2 探索现有系统

bash
SHARED="$(dirname "${CLAUDE_SKILL_DIR}")/_shared/scripts"
bash "$SHARED/detect-project-type.sh" .
bash "$SHARED/detect-tech-stack.sh" .
bash "$SHARED/scan-dependencies.sh" .
  • Find related existing features, trace data flows
  • Identify reusable capabilities (existing APIs, services, queues)
bash
SHARED="$(dirname "${CLAUDE_SKILL_DIR}")/_shared/scripts"
bash "$SHARED/detect-project-type.sh" .
bash "$SHARED/detect-tech-stack.sh" .
bash "$SHARED/scan-dependencies.sh" .
  • 查找相关的现有功能,追踪数据流
  • 识别可复用的能力(现有API、服务、队列)

1.3 Clarify with User (mandatory)

1.3 与用户确认(必填)

  • Compile all "need confirmation" questions, prioritize
  • Ask the user, wait for answers before proceeding
  • If answers raise new questions → keep asking
  • 整理所有“需确认”的问题,并按优先级排序
  • 询问用户,等待回复后再继续
  • 如果回复引发新问题 → 继续询问

1.4 Verify Understanding

1.4 验证理解

  • Can you explain the full picture: what problem, which systems, how data flows?
  • Can you list the core challenges/risks?
  • If not → keep exploring.
  • 你能否完整阐述整体情况:要解决什么问题、涉及哪些系统、数据流如何?
  • 你能否列出核心挑战/风险?
  • 如果不能 → 继续探索。

Step 2: Design

步骤2:设计

2.1 Database Model Overview

2.1 数据库模型概览

For each new/modified table:
  • Table name + one-sentence purpose
  • Core business fields only (name + type + description)
  • Table relationships diagram:
    b_lead (1) ──── (1) b_lead_element
       └── sany_lead_id ──── inquiry_id (inquiry-service)
  • Mark: [New] / [Modify existing]
针对每个新增/修改的表:
  • 表名 + 一句话用途说明
  • 仅包含核心业务字段(名称 + 类型 + 描述)
  • 表关系图:
    b_lead (1) ──── (1) b_lead_element
       └── sany_lead_id ──── inquiry_id (inquiry-service)
  • 标记:[新增] / [修改现有]

2.2 Core Flow Diagrams

2.2 核心流程图

For each key path (normal flow, async callback, error flow):
┌──────────────────────────────────────────────────────┐
│ [System]: [Module] [Status: New/Modify/Existing]     │
├──────────────────────────────────────────────────────┤
│  Responsibility: one sentence                        │
│  Input: key data     Output: key data                │
│  Steps:                                              │
│      ├── Step 1: description                         │
│      └── Step 2: description                         │
└────────────────────────┬─────────────────────────────┘
                         │ [HTTP/MQ/Callback/Method call]
Mark new/changed parts with ★.
针对每个关键路径(正常流程、异步回调、错误流程):
┌──────────────────────────────────────────────────────┐
│ [System]: [Module] [Status: New/Modify/Existing]     │
├──────────────────────────────────────────────────────┤
│  Responsibility: one sentence                        │
│  Input: key data     Output: key data                │
│  Steps:                                              │
│      ├── Step 1: description                         │
│      └── Step 2: description                         │
└────────────────────────┬─────────────────────────────┘
                         │ [HTTP/MQ/Callback/Method call]
用★标记新增/修改的部分。

2.3 Data Trace (internal only)

2.3 数据追踪(内部使用)

Trace 2+ data sets through flows. Fix design issues. Not in output.
通过流程追踪2组以上的数据集。修复设计问题。不包含在输出内容中。

Step 3: Phased Iteration Plan (Core Output)

步骤3:分阶段迭代计划(核心输出)

Split by end-to-end verifiable features, not by tech layers.
Each Phase:
  • Number and name
  • Goal: one sentence
  • Deliverable: what user/system can do after this Phase
  • Systems involved
  • Steps: system, change summary, verification method, dependencies
  • ★ Milestone: one sentence
Dependency diagram:
Phase 1: [name]
  ├── Step 1.1 ← no deps
  ├── Step 1.2 ← Step 1.1
  └── Step 1.3 ← Step 1.2
  ★ Milestone: [deliverable]
Phase 2: [name] ...
Verify: all DB models and flows are covered by Phases.
可端到端验证的功能拆分,而非按技术层拆分。
每个阶段包含:
  • 阶段编号与名称
  • 目标:一句话说明
  • 交付成果:本阶段完成后,用户/系统可实现的功能
  • 涉及系统
  • 步骤:系统、变更摘要、验证方法、依赖项
  • ★ 里程碑:一句话说明
依赖关系图:
Phase 1: [name]
  ├── Step 1.1 ← no deps
  ├── Step 1.2 ← Step 1.1
  └── Step 1.3 ← Step 1.2
  ★ Milestone: [deliverable]
Phase 2: [name] ...
验证:所有数据库模型和流程均被各阶段覆盖。

Output Template

输出模板

markdown
undefined
markdown
undefined

[Feature] - 初步设计方案

[功能名称] - 初步设计方案

一、背景与问题

一、背景与问题

二、总体方案 (overview diagram + design principles)

二、总体方案 (概览图 + 设计原则)

三、数据库模型概要

三、数据库模型概要

四、核心流程链路 (ASCII flows)

四、核心流程链路 (ASCII流程图)

五、迭代实施计划 (Phases + dependency diagram)

五、迭代实施计划 (阶段 + 依赖关系图)

六、关键设计决策 (table: decision + rationale)

六、关键设计决策 (表格:决策 + 理由)

七、待确认事项

七、待确认事项

undefined
undefined

Thinking Discipline

思考规范

After each step, apply thinking discipline.
每个步骤完成后,应用思考规范