the-hit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThe Hit: Execution and Parallel Coding
The Hit:执行与并行编码
Overview
概述
Soldiers and Capos implement the Work Packages defined in the War Plan. Crews work simultaneously on their assigned territories, providing Tributes (status updates) to the Underboss.
Soldiers和Capos落实作战计划(War Plan)中定义的工作包(Work Packages)。各个团队在各自负责的领域同时开展工作,向Underboss提交Tribute(状态更新)。
Trigger
触发条件
Invoked after the Don approves the War Plan (Resource Development complete).
在Don批准作战计划(资源开发阶段完成后)启动。
Process
流程
Step 1: Underboss Distributes Work Packages
步骤1:Underboss分配工作包
For each territory, the Underboss sends the Capo:
- The territory definition
- The assigned Work Packages (ordered by dependency)
- The relevant Contract sections
- The applicable Constitution rules
针对每个领域,Underboss向Capos发送以下内容:
- 领域定义
- 分配的工作包(按依赖关系排序)
- 相关合同(Contract)条款
- 适用的规范(Constitution)规则
Step 2: Capos Dispatch Soldiers
步骤2:Capos派遣Soldiers
Each Capo (invoke ) processes their Work Packages:
gangsta:the-capo-
For each independent Work Package, dispatch a Soldier subagent with:
- The Work Package brief
- The Contract clause being implemented
- Applicable Negative Constraints
- Territory conventions
-
Soldiers work in parallel within their territory (up to the allocated Soldier count)
每个Capo(调用)处理其负责的工作包:
gangsta:the-capo-
针对每个独立工作包,派遣Soldier子代理,附带以下内容:
- 工作包简介
- 待实现的合同条款
- 适用的负面约束条件
- 领域约定
-
Soldiers在各自领域内并行工作(不超过分配的Soldier数量上限)
Step 3: TDD Enforcement
步骤3:TDD强制实施
Every Soldier MUST follow — the full Red-Green-Refactor cycle:
gangsta:drill-tdd- Write failing test — Based on the acceptance criteria
- Run test — Verify it fails for the right reason
- Write minimal implementation — Just enough to pass the test
- Run test — Verify it passes
- Report — Return Tribute to Capo
A Soldier that writes implementation before tests has its Tribute REJECTED.
每个Soldier必须遵循——完整的红-绿-重构循环:
gangsta:drill-tdd- 编写失败测试——基于验收标准
- 运行测试——验证测试因正确原因失败
- 编写最小化实现代码——仅满足通过测试的必要代码
- 运行测试——验证测试通过
- 汇报——向Capo提交Tribute
先编写实现代码再写测试的Soldier,其Tribute将被驳回。
Step 4: Tribute Collection
步骤4:Tribute收集
Each Soldier returns a Tribute:
markdown
undefined每个Soldier返回一份Tribute:
markdown
undefinedTribute: <WP-ID>
Tribute: <WP-ID>
Status: success | failure | blocked
TDD Cycle:
- Test written: YES/NO
- Test failed first: YES/NO
- Implementation written: YES/NO
- Test passes: YES/NO Changes:
- <file path>: <created/modified> Test Output:
<actual test output>Notes: <issues, concerns, deviations>
undefinedStatus: success | failure | blocked
TDD Cycle:
- Test written: YES/NO
- Test failed first: YES/NO
- Implementation written: YES/NO
- Test passes: YES/NO Changes:
- <file path>: <created/modified> Test Output:
<actual test output>Notes: <issues, concerns, deviations>
undefinedStep 5: Capo Reviews Tributes
步骤5:Capo审核Tribute
The Capo reviews each Tribute (invoke ):
gangsta:the-capo- Acceptance criteria met?
- TDD cycle followed?
- Tests passing?
- Convention compliance?
Accept, reject with feedback, or escalate.
Capo审核每份Tribute(调用):
gangsta:the-capo- 是否满足验收标准?
- 是否遵循TDD循环?
- 测试是否通过?
- 是否符合约定规范?
可选择接受、附带反馈驳回或升级上报。
Step 6: Status Rollup
步骤6:状态汇总
Capos report territory status to the Underboss. The Underboss synthesizes for the Don:
markdown
undefinedCapos向Underboss汇报各自领域的状态。Underboss汇总后向Don汇报:
markdown
undefinedHeist Progress: <Heist Name>
Heist Progress: <Heist Name>
| Territory | Completed | In Progress | Failed | Budget Used |
|---|---|---|---|---|
| Frontend | 3/5 | 1 | 1 | 60% |
| Backend | 4/4 | 0 | 0 | 45% |
| ... |
Overall: <N>/<Total> Work Packages complete
undefined| Territory | Completed | In Progress | Failed | Budget Used |
|---|---|---|---|---|
| Frontend | 3/5 | 1 | 1 | 60% |
| Backend | 4/4 | 0 | 0 | 45% |
| ... |
Overall: <N>/<Total> Work Packages complete
undefinedStep 7: Escalation Handling
步骤7:升级处理
When a Soldier fails:
- Capo retries — Fresh Soldier, same Work Package
- Capo escalates to Underboss — If retry fails or Contract is ambiguous
- Underboss mini-Grilling — Single-round: Devils-Advocate attacks the proposed fix, Don weighs in, Synthesizer produces revised Contract clause
- Underboss escalates to Don — If beyond operational scope
当Soldier执行失败时:
- Capo重试——派遣新的Soldier执行同一工作包
- Capo向Underboss升级上报——如果重试失败或合同条款不明确
- Underboss开展小型评审——单轮:魔鬼代言人(Devils-Advocate)针对提议的修复方案提出质疑,Don参与决策,合成器(Synthesizer)生成修订后的合同条款
- Underboss向Don升级上报——如果超出运营范围
Step 8: Completion
步骤8:完成
When all Capos report territory completion:
- Underboss verifies: all Work Packages accepted, all tests passing
- Present to Don: "The Hit is complete. All <N> Work Packages implemented. Ready for Laundering?"
当所有Capos汇报各自领域完成时:
- Underboss验证:所有工作包已被接受,所有测试通过
- 向Don汇报:"The Hit已完成。全部<N>个工作包已实现。是否进入Laundering阶段?"
Checkpoint
检查点
Write checkpoint after each significant batch of Work Packages completes (not just at the end):
yaml
---
heist: <heist-name>
phase: the-hit
status: in-progress | completed
timestamp: <ISO 8601>
next-action: <Continue Hit | Proceed to Laundering>
completed-wps: [WP-001, WP-002, ...]
pending-wps: [WP-003, ...]
failed-wps: [WP-004, ...]
artifacts:
- <list of modified/created files>
---在每一批重要工作包完成后(而非仅在最终阶段)编写检查点:
yaml
---
heist: <heist-name>
phase: the-hit
status: in-progress | completed
timestamp: <ISO 8601>
next-action: <Continue Hit | Proceed to Laundering>
completed-wps: [WP-001, WP-002, ...]
pending-wps: [WP-003, ...]
failed-wps: [WP-004, ...]
artifacts:
- <list of modified/created files>
---Omerta Compliance
Omerta合规性
- Introduction Rule: Soldiers dispatched through Capos, no direct Soldier communication
- Rule of Truth: Tributes include actual test output, not claims
- Rule of Tribute: Token usage tracked per Soldier dispatch
- Spec is Law: Every implementation traces to a Contract clause via Work Package
- Rule of Availability: Checkpoint updated after each batch
- 引入规则:Soldiers必须通过Capos派遣,禁止Soldier之间直接沟通
- 真实规则:Tribute需包含实际测试输出,而非主观声明
- 汇报规则:跟踪每个Soldier派遣的Token使用情况
- 规范即法律:每一项实现都需通过工作包追溯到合同条款
- 可用性规则:每一批工作包完成后更新检查点