architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseArchitect
架构设计
Design before implementing. Sketch types, function signatures, class shapes, and module boundaries with bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. If implementation proves the sketch wrong, throw it out and redesign.
not implemented先设计再实现。使用体和伪代码草拟类型、函数签名、类结构以及模块边界。综合多种模型视角,然后根据选定的草图填充代码。如果实现过程证明草图存在错误,就废弃并重新设计。
not implementedStart
启动步骤
Open a todolist with one entry per phase before starting. Autonomous mode without checkpoints needs the list to show phase position and keep phases from silently disappearing.
- Ground
- Sketch
- Agree
- Implement
- Scrap
开始前创建一个待办清单,每个阶段对应一项任务。无检查点的自主模式需要该清单来显示当前所处阶段,防止阶段任务被悄无声息地跳过。
- 问题梳理
- 草图绘制
- 确认(可选)
- 代码实现
- 架构废弃
Phase A: Ground the problem
阶段A:梳理问题
Build a real mental model of every system the new code touches. Run the how skill over the relevant subsystems. Critique mode if existing structure is the constraint or the design must push back on it.
Naming a file isn't grounding. Produce the traced model prescribes. If the design redefines ownership or layering, also run the why skill on the existing shape so the rationale becomes a constraint, not a guess.
howSkip Phase A only when the work is genuinely greenfield with no surrounding system to integrate.
为新代码涉及的每个系统建立清晰的心智模型。针对相关子系统运行how技能。如果现有结构是约束条件,或者设计需要对其进行调整,则启用批判模式。
仅命名文件不算完成问题梳理。需生成技能指定的追踪模型。如果设计重新定义了职责归属或分层结构,还需针对现有架构运行why技能,让设计依据成为明确的约束条件而非猜测。
how只有当任务是完全从零开始、无需集成任何现有系统时,才可跳过阶段A。
Phase B: Sketch
阶段B:绘制草图
Run the arena skill with the design-sketch task and the Phase A grounding artifacts. Pass as each runner's prompt. Each candidate produces a design package shaped per : the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it.
references/runner-prompt.mdreferences/rationale-template.mdUse these runner slugs: , , , and .
claude-opus-4-8-thinking-xhighgpt-5.3-codex-high-fastgpt-5.5-high-fastcomposer-2.5-fastThis is the exhaust-the-design-space principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.
Arena returns one synthesized design package. The synthesis decision populates the rationale's "Synthesis decision" section.
结合设计草图任务和阶段A的梳理成果运行arena技能。将作为每个运行器的提示语。每个候选模型需生成符合格式的设计包:先编写调用方的使用示例,再依次提供类型草图、函数签名、模块映射以及基于这些内容的文字说明。
references/runner-prompt.mdreferences/rationale-template.md使用以下运行器标识:, , , and 。
claude-opus-4-8-thinking-xhighgpt-5.3-codex-high-fastgpt-5.5-high-fastcomposer-2.5-fast这是exhaust-the-design-space(穷尽设计空间)原则技能的具体落地方式。需提供完整架构的替代方案,而非对单一架构进行局部修正。
Arena会返回一个综合后的设计包。综合决策内容需填入说明文档的“Synthesis decision”部分。
Phase C: Agree (opt-in)
阶段C:确认(可选)
Default: proceed directly to implementation with the synthesized design. No human checkpoint.
Opt in to a checkpoint when the invoker explicitly asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.
The synthesis can ship as its own commit either way. That's the "scaffold first" mode of the foundational-thinking principle skill; subsequent commits read as filling in bodies against a stable contract. Planned and scoped breakage during fill-in is fine, per the outcome-oriented-execution principle skill. For adversarial pressure on the design before implementing, run the interrogate skill on the synthesized sketch.
If the human pushes back on the shape (in a checkpoint or after the fact), treat that as Phase A evidence. Re-ground and re-run Phase B before writing more code.
默认流程:直接基于综合后的设计进行实现,无需人工检查点。
当调用者明确要求时,可启用检查点,比如输入"/architect with checkpoint," "stop and show me before implementing,"或类似指令。此时需展示综合后的设计并暂停,等待确认。
无论是否启用检查点,综合设计都可作为独立提交。这是foundational-thinking(基础思维)原则技能的“先搭骨架”模式;后续提交则是基于稳定的契约填充具体内容。根据outcome-oriented-execution(结果导向执行)原则技能,在填充过程中进行计划内、有范围限制的架构调整是允许的。若要在实现前对设计进行严格校验,可针对综合草图运行interrogate技能。
如果人工对架构提出异议(无论是在检查点还是事后),需将其视为阶段A的补充信息。在继续编写代码前,重新梳理问题并再次运行阶段B。
Phase D: Implement against the sketch
阶段D:基于草图实现
Replace bodies with code, pseudocode with logic. The synthesized sketch is the contract.
not implementedDeviations from the sketch are signal worth surfacing, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. Surface it; don't bolt it on.
将体替换为实际代码,将伪代码替换为具体逻辑。综合后的草图即为契约。
not implemented偏离草图的情况是值得关注的信号,而非需要默默消化的阻碍。如果某个函数需要草图中未提及的参数,需确认是草图存在错误、遗漏了需求,还是实现超出了范围。要将问题提出来,而非直接硬加进去。
Phase E: Scrap when the architecture is wrong
阶段E:架构错误时废弃
If implementation keeps producing friction the sketch can't absorb, throw the sketch out. Don't bolt fixes onto a wrong design, per the redesign-from-first-principles and fix-root-causes principle skills.
The signal is a pattern, not single instances. Tells:
- The same shape of workaround appearing repeatedly across unrelated code.
- Multiple unrelated edge cases that all need special-case branches.
- Types that need escape hatches (, casts, optional fields always set in practice) to compile.
any - The "we need a lock" reflex when the sketch said the state wasn't shared.
- Callers having to know the abstraction's internal rules to use it.
- Two or more independent Phase D deviations of the same shape across the implementation. Surfacing deviations is Phase D's job; a repeated pattern of them is Phase E's trigger.
Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex; complexity in the data is not complexity in the design. The rewrite signal is repeated friction of the same shape, not single hard cases.
When you scrap:
- Re-run the how skill over what's been built. The implementation lessons enter the new design as inputs, not vibes.
- Redesign as if the new constraints had been day-one assumptions, per redesign-from-first-principles.
- Subtract before adding, per the subtract-before-you-add principle skill. The new sketch should be smaller than the old one before it grows.
- Return to Phase B and re-run arena.
如果实现过程中不断出现草图无法适配的问题,就废弃该草图。根据redesign-from-first-principles(从根源重新设计)和fix-root-causes(修复根本原因)原则技能,不要在错误的设计上硬加补丁。
信号是一种模式,而非单个案例。以下是判断信号:
- 不相关的代码中反复出现同类临时解决方案。
- 多个不相关的边缘场景都需要特殊分支处理。
- 类型需要规避手段(如类型、强制类型转换、实际总是被赋值的可选字段)才能编译通过。
any - 草图中声明状态无需共享,但却出现“需要加锁”的本能反应。
- 调用方必须了解抽象的内部规则才能使用它。
- 实现过程中出现两处或更多独立的同类阶段D偏离情况。暴露偏离是阶段D的任务;而反复出现的同类偏离则是触发阶段E的信号。
需运用判断能力。少数边缘场景不足以否定整个架构。有些问题本身确实复杂;数据的复杂性不等于设计的复杂性。需要重写的信号是反复出现的同类问题,而非单个棘手案例。
废弃架构时需执行以下步骤:
- 针对已构建的内容重新运行how技能。将实现过程中的经验教训作为新设计的输入,而非仅凭感觉。
- 根据redesign-from-first-principles原则,重新设计时要将新的约束条件视为从一开始就存在的假设。
- 根据subtract-before-you-add(先做减法再做加法)原则技能,先删减再新增。新草图在扩展前应比旧草图更简洁。
- 返回阶段B,重新运行arena技能。
Outputs
输出内容
The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes; module map plus type definitions for larger work. The rationale ships alongside, shaped per , including the usage sketch and the synthesis decision.
references/rationale-template.md先编写调用方的使用示例,再基于此生成类型草图。小改动只需一个包含新类型和签名的文件;大型任务则需提供模块映射和类型定义。同时需附带符合格式的说明文档,其中包含使用示例草图和综合决策内容。
references/rationale-template.md