architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTechnical design interview → in the living doc → adversarial review. Pipeline: explore → define → [design] → architect → plan.
## Technical DesignPhase: Engineering. User is technical. Architecture, data models, APIs, build phasing.
技术设计面试 → 在活文档中生成章节 → 对抗式评审。流程:探索 → 定义 → [设计] → 架构设计 → 规划。
## Technical Design阶段:工程实现。用户为技术人员。涉及架构、数据模型、API、分阶段构建。
Starting
启动阶段
Before asking anything:
- Read the living doc (). If multiple
./plans/*.mdfiles found in.md, list them via./plans/and ask which feature to work on. Check forAskUserQuestion,## Scope(including## Requirements),### Glossary. Use glossary terms for data models, APIs, modules. UX flows map to behavior specs; screens map to frontend architecture.## UX Design- has content → this takes priority. Skip steps 2-3, resume only affected domains, clear after resolving.
## Rollback Notes - already populated → skip interview, go to Adversarial Review.
## Technical Design - No AND Requirements introduce 3+ domain nouns not in codebase → generate glossary silently under
### Glossary, then use canonical terms throughout.## Requirements
- Explore codebase — tech stack, patterns, data models, auth, API conventions, testing, deployment.
- Search for architecture docs, ADRs, domain glossaries. If docs and code disagree, note discrepancy to surface during interview.
If prior sections exist: "I've read the requirements, UX spec, and explored the codebase. Requirements call for [items]. UX defines [N flows] across [N screens]. Stack uses [tech]. First: [question]."
No Requirements? Works — but note that defined requirements make for a better design. No UX? Interview covers frontend concerns as needed.
在提问之前,请完成以下步骤:
- 读取活文档()。如果在
./plans/*.md中找到多个./plans/文件,通过.md列出所有文件并询问用户要处理哪个功能。检查文档中是否存在AskUserQuestion、## Scope(包括## Requirements)、### Glossary章节。数据模型、API、模块的命名请遵循术语表中的规范。UX流程对应行为规格,页面对应前端架构。## UX Design- 若章节有内容 → 优先处理该部分。跳过步骤2-3,仅恢复受影响的领域,问题解决后清空该章节内容。
## Rollback Notes - 若章节已填充内容 → 跳过面试环节,直接进入对抗式评审。
## Technical Design - 若不存在且需求中引入了3个以上代码库中未出现的领域名词 → 自动在
### Glossary下生成术语表,之后全程使用标准术语。## Requirements
- 若
- 探索代码库 — 技术栈、设计模式、数据模型、认证机制、API规范、测试策略、部署流程。
- 查找架构文档、ADRs(架构决策记录)、领域术语表。如果文档与代码存在不一致,记录差异并在面试中提出。
若已有前置章节内容:"我已阅读需求、UX规格并探索了代码库。需求要求实现[具体事项]。UX定义了[N个流程],覆盖[N个页面]。技术栈采用[具体技术]。首先:[问题]。"
若无需求文档?可以继续处理 — 但需说明明确的需求能产出更优质的设计。若无UX文档?面试环节将按需覆盖前端相关问题。
Interview Protocol
面试流程规范
Use for every question — header (≤12 chars), 2–4 options, one marked "(Recommended)". When user can't decide: state recommendation, record as assumption, move on.
AskUserQuestionCode-first: explore codebase before asking questions it could answer. Present as confirmation: "I found the project handles auth via [pattern] in . I'll follow the same approach unless you say otherwise."
[file]每个问题都需使用工具 — 标题(≤12字符)、2-4个选项,其中一个标记为"(Recommended)"。若用户无法决定:给出推荐方案,记录为假设,继续推进。
AskUserQuestion代码优先:先探索代码库,再提出代码无法解答的问题。以确认的方式表述:"我发现项目在中通过[模式]处理认证。除非您另有指示,我将遵循相同的实现方式。"
[文件路径]Completeness tracking
完整性跟踪
Resolve decisions across these domains depth-first — exhaust sub-questions before moving on. Only ask what the codebase can't answer.
- Architecture & patterns — boundaries, APIs, new components, fit with existing
- Data & state — models, schemas, migrations, state locations (DB/cache/session/client)
- Core behavior — implementation approach per user story. What happens in the system when the user acts?
- Edge cases & failure modes — race conditions, partial failures, validation, error handling
- Integration & dependencies — external systems, third-party APIs, integration contracts
- Operational & rollout — backward compat, feature flags, migrations, monitoring, cost
- Security & access — permissions, trust boundaries, sensitive data, abuse prevention
- Testing strategy — unit/integration/e2e per component, test data, mocking
- Code design & boundaries — interfaces, abstractions, dependency direction, coupling tradeoffs
- Phased build plan — vertical slices, dependency ordering, acceptance criteria per phase
按以下领域深度优先推进决策 — 穷尽子问题后再进入下一个领域。仅询问代码库无法解答的问题。
- 架构与模式 — 边界划分、API设计、新增组件、与现有系统的适配性
- 数据与状态 — 模型、Schema、迁移、状态存储位置(数据库/缓存/会话/客户端)
- 核心行为 — 每个用户故事的实现方案。用户操作时系统会发生什么?
- 边缘场景与故障模式 — 竞态条件、部分失败、校验机制、错误处理
- 集成与依赖 — 外部系统、第三方API、集成契约
- 运维与发布 — 向后兼容性、功能开关、迁移方案、监控、成本
- 安全与访问控制 — 权限、信任边界、敏感数据、防滥用机制
- 测试策略 — 各组件的单元测试/集成测试/E2E测试、测试数据、模拟方案
- 代码设计与边界 — 接口、抽象、依赖方向、耦合权衡
- 分阶段构建计划 — 垂直切片、依赖顺序、各阶段验收标准
Dependencies, conflicts, rollback
依赖、冲突与回滚
Resolve upstream decisions before downstream. When code/docs/intent conflict, surface and classify: stale docs, incomplete implementation, intentional divergence, or unclear ownership.
When a design decision invalidates upstream sections, append (trigger, affected domains, decisions to preserve). Data model breaks UX → . Architectural constraint breaks product assumption → or . Roll back only as far as necessary.
## Rollback Notes/design/define/explore先解决上游决策再处理下游问题。当文档、代码与预期存在冲突时,记录并分类:文档过时、实现不完整、有意偏离或责任归属不明确。
若某个设计决策导致上游章节失效,追加章节(触发原因、受影响领域、需保留的决策)。若数据模型设计与UX冲突 → 跳转至环节。若架构约束与产品假设冲突 → 跳转至或环节。仅回滚到必要的阶段。
## Rollback Notes/design/define/exploreProducing the spec
生成规格文档
When every domain is fully resolved, write using the template in . If Requirements exist, verify every FR and user story maps to a behavior spec or build phase — surface gaps. Then proceed to Adversarial Review.
## Technical Designassets/technical-design-template.md当所有领域的决策都确定后,使用中的模板编写章节。若存在需求文档,验证每个功能需求和用户故事都对应到行为规格或构建阶段 — 指出遗漏的内容。之后进入对抗式评审环节。
assets/technical-design-template.md## Technical DesignAdversarial Review
对抗式评审
Work silently — user sees only the verdict.
- Understand: Read . Note anything underspecified, inconsistent, or surprising.
## Technical Design - Verify against reality: Check claims against code/docs. If exists: all stories addressed? Unjustified scope creep? If
## Requirementsexists: tackles out-of-scope items? Misses v1 items?## Scope - Pressure-test: Apply adversarial lenses from . Skip empty lenses, order findings by severity.
references/review-lenses.md
静默执行该环节 — 用户仅能看到评审结果。
- 理解文档:阅读章节。记录任何描述不充分、不一致或异常的内容。
## Technical Design - 与实际情况校验:对照代码与文档验证文档中的声明。若存在章节:所有用户故事是否都已覆盖?是否存在无依据的范围扩张?若存在
## Requirements章节:是否处理了超出范围的内容?是否遗漏了v1版本的核心功能?## Scope - 压力测试:应用中的对抗式评审视角。跳过空视角,按严重程度排序发现的问题。
references/review-lenses.md
Verdict
评审结论
Scale response to severity — solid spec gets short review.
Format: followed by Strengths (2-4 bullets), Issues (severity-ordered: category, description, why it matters, what to do), Risks, Recommended next step (one sentence).
### Verdict: Ready / Revise / RethinkReady: "Design is ready. Run to decompose into implementation issues."
/planRevise: "Let's work through these issues." Group by subsection. Each turn: restate issues, propose resolution, accept/modify/skip. Skipped items become open items. After all resolved, update in single write, re-run review. No re-exploration, no scope expansion, no re-interview. Batch aggressively if user accepts unchanged.
## Technical DesignRethink: Recommend re-interview from affected domains. If findings invalidate product assumptions (not just tech), append and direct to or .
## Rollback Notes/define/exploreUpdate with design decisions. Update with architect row.
## Decisions Log## Pipeline Status根据问题严重程度调整回复内容 — 优质的规格文档仅需简短评审。
格式: 后跟随优势(2-4个要点)、问题(按严重程度排序:类别、描述、影响、解决方案)、风险、推荐下一步动作(一句话)。
### Verdict: Ready / Revise / RethinkReady:"设计已就绪。执行命令将其分解为可实现的任务。"
/planRevise:"让我们一起解决这些问题。" 按子章节分组讨论。每次讨论:重述问题、提出解决方案、用户可选择接受/修改/跳过。跳过的问题将记录为未解决项。所有问题解决后,一次性更新章节内容,重新执行评审。此阶段不重新探索、不扩展范围、不重新面试。若用户接受所有方案,可批量处理。
## Technical DesignRethink:建议从受影响的领域重新启动面试。若评审发现的问题推翻了产品假设(而非仅技术问题),追加章节并引导至或环节。
## Rollback Notes/define/explore在中更新设计决策。在中更新架构设计环节的状态。
## Decisions Log## Pipeline Status