prototype-first
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrototype First
先做原型
Prototype risky steps early instead of discovering failure in the middle of implementation.
尽早对高风险步骤制作原型,而非在实现过程中才发现失败。
When To Use
使用场景
- A plan contains an unclear or high-risk step.
- Multiple implementation strategies seem plausible.
- Success depends on interacting subsystems, external tools, packages, or flaky libraries.
- A bug fix already required several attempts.
- The next change may force meaningful plan changes if the assumption is wrong.
- 计划中包含不明确或高风险的步骤。
- 存在多种看似可行的实现策略。
- 成功与否取决于相互关联的子系统、外部工具、包或不稳定的库。
- 某个bug修复已尝试多次仍未解决。
- 如果假设错误,下一步变更可能会导致计划发生重大调整。
Default Approach
默认方法
- Isolate the risky assumption.
- Run the smallest useful prototype or spike that can confirm or reject the approach.
- Capture only the useful outcome: chosen approach, key rejected approaches when relevant, constraints, and required setup.
- Update the plan if needed, then proceed with real implementation.
- 分离高风险假设。
- 运行最小化的有效原型或探索性测试,以验证或否决该方法。
- 仅记录有用的结果:选定的方法、相关的被否决方法(如有)、约束条件和所需的配置。
- 必要时更新计划,然后进行正式实现。
Delegation Rule
委托规则
Prefer a separate subagent when the prototype is likely to create noisy context: failed attempts, dead ends, environment tweaking, or broad exploration.
Keep prototyping in the main agent only when it is small, fast, and unlikely to generate irrelevant detail.
The main agent should retain the final working idea, not the full trial-and-error history.
当原型可能产生大量无关信息(如失败尝试、死胡同、环境调整或广泛探索)时,优先使用独立的子Agent。
仅当原型规模小、速度快且不太可能产生无关细节时,才在主Agent中进行原型制作。
主Agent应保留最终可行方案,而非完整的试错历史。
Avoid
注意事项
- Turning exploratory patches into production code without cleanup or deliberate reimplementation.
- Continuing ad hoc fixes after signals that the approach is not understood yet.
- Letting prototype results sit outside the implementation decision.
- 不要将探索性补丁直接转为生产代码,而不进行清理或重新设计实现。
- 在已有信号表明尚未理解问题时,不要继续临时修复。
- 不要让原型结果脱离实现决策。
Examples
示例
Example: Packaging .deb
and .rpm
artifacts across repos, distros, and x86_64
/arm64
.
.deb.rpmx86_64arm64示例:跨仓库、发行版及x86_64
/arm64
架构打包.deb
和.rpm
制品。
x86_64arm64.deb.rpmUse before implementation. First prototype the packaging and test flow in isolation: build inside distro-specific containers, validate dependency availability, and check which architecture combinations can be tested locally. If the host architecture does not match the target, prefer a separate subagent to research and prototype the viable path: native containers, extensive web research, cross-compilation, or remote/CI builds, depending on context and available tools/hardware capabilities. Return only the working matrix, rejected approaches, required environment setup, and constraints. Then update the plan if needed and implement the real packaging workflow.
prototype-first在实现前使用“先做原型”策略。首先单独原型化打包和测试流程:在特定发行版的容器内构建,验证依赖可用性,检查哪些架构组合可在本地测试。如果主机架构与目标架构不匹配,优先使用独立的子Agent来研究并原型化可行方案:原生容器、大量网络调研、交叉编译或远程/CI构建,具体取决于上下文和可用工具/硬件能力。仅返回可行的矩阵、被否决的方案、所需的环境配置和约束条件。然后根据需要更新计划,再实施正式的打包工作流。
Example: An authentication or API-flow bug has already resisted several fixes.
示例:认证或API流程的bug已多次修复仍未解决。
Use before trying another patch. Isolate the failing assumption and create a small reproduction or spike outside the main implementation path. Prefer a separate subagent if debugging will involve noisy trial-and-error across logs, environment settings, network behavior, or library internals. Return only the confirmed root cause, the working fix strategy, constraints, and any setup needed to verify it. Then update the plan if needed and apply the real fix cleanly instead of continuing ad hoc patches.
prototype-first在尝试下一个补丁前使用“先做原型”策略。分离失败的假设,在主实现路径之外创建小型复现案例或探索性测试。如果调试涉及大量试错(如日志、环境设置、网络行为或库内部机制),优先使用独立的子Agent。仅返回已确认的根本原因、可行的修复策略、约束条件以及验证所需的配置。然后根据需要更新计划,再干净地应用正式修复,而非继续临时补丁。