Gates

Switch on failure, then verify

The same idea failing again is not a reason to retry it.

puax_switch_on_failure

  • Input a mode such as spinning, giving up, or low quality
  • Output the next method and a candidate role
  • Three checks before the jump, so you do not role-hop at random
ToolJob
puax_define_contractAcceptance criteria up front. Author and judge are not the same voice
puax_verify_completionCheck the contract. The agent's self-report does not count
puax_quality_compassTrust T1–T3, five questions, a recovery protocol
define_contract → work\n  → (failure) switch_on_failure\n  → confidence_check → verify_completion

Code sample

puax_define_contract(
  acceptance=["单测全绿", "无新增 linter error", "README 更新用法"]
)

# 原地打转
puax_switch_on_failure(failure_mode="spinning")
# → to_methodology / to_role 建议

# 交付
puax_verify_completion(contract_id="...", artifacts=["test log", "diff"])

Quiz

Which chain should run before you call the work done?

Previous
Next chapter