rein-agentic-kit 2.1.2__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. {rein_agentic_kit-2.1.2/rein_agentic_kit.egg-info → rein_agentic_kit-2.2.0}/PKG-INFO +36 -6
  2. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/README.md +35 -5
  3. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/.claude-plugin/plugin.json +1 -1
  4. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/.codex-plugin/plugin.json +1 -1
  5. rein_agentic_kit-2.2.0/plugins/rein/ENTRY.md +31 -0
  6. {rein_agentic_kit-2.1.2/plugins/rein/skills/quick → rein_agentic_kit-2.2.0/plugins/rein}/PROVIDERS.md +9 -8
  7. rein_agentic_kit-2.2.0/plugins/rein/SHIP-WATCH.md +55 -0
  8. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/bin/rein +80 -22
  9. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/flow.config.example.json +7 -2
  10. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/affected.py +53 -6
  11. rein_agentic_kit-2.2.0/plugins/rein/lib/angular_impact.py +426 -0
  12. rein_agentic_kit-2.2.0/plugins/rein/lib/delivery.py +78 -0
  13. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/failure_triage.py +38 -0
  14. rein_agentic_kit-2.2.0/plugins/rein/lib/gate_cache.py +331 -0
  15. rein_agentic_kit-2.2.0/plugins/rein/lib/gate_execution.py +223 -0
  16. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/gate_log.py +11 -1
  17. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/gate_run.py +83 -18
  18. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/guard.py +63 -3
  19. rein_agentic_kit-2.2.0/plugins/rein/lib/integration_ready.py +223 -0
  20. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/orca_client.py +30 -7
  21. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/plan.py +2 -0
  22. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/plan_check.py +13 -0
  23. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/quick.py +17 -5
  24. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/quick_driver.py +166 -33
  25. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/quota.py +64 -5
  26. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship.py +836 -75
  27. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship_answer.py +23 -0
  28. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship_decide.py +412 -34
  29. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship_state.py +48 -0
  30. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship_watch.py +11 -6
  31. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/token_report.py +591 -40
  32. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/verify.py +135 -47
  33. rein_agentic_kit-2.2.0/plugins/rein/lib/worker_leases.py +235 -0
  34. {rein_agentic_kit-2.1.2/plugins/rein → rein_agentic_kit-2.2.0/plugins/rein/skills/answer}/PROVIDERS.md +9 -8
  35. {rein_agentic_kit-2.1.2/plugins/rein/skills/rein-audit → rein_agentic_kit-2.2.0/plugins/rein/skills/quick}/PROVIDERS.md +9 -8
  36. {rein_agentic_kit-2.1.2/plugins/rein/skills/answer → rein_agentic_kit-2.2.0/plugins/rein/skills/rein-audit}/PROVIDERS.md +9 -8
  37. rein_agentic_kit-2.2.0/plugins/rein/skills/rein-discover/PROVIDERS.md +43 -0
  38. rein_agentic_kit-2.2.0/plugins/rein/skills/rein-plan/PROVIDERS.md +43 -0
  39. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-plan/SKILL.md +11 -12
  40. rein_agentic_kit-2.2.0/plugins/rein/skills/rein-role/PROVIDERS.md +43 -0
  41. rein_agentic_kit-2.2.0/plugins/rein/skills/ship/PROVIDERS.md +43 -0
  42. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/ship/SKILL.md +10 -9
  43. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/pyproject.toml +1 -1
  44. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0/rein_agentic_kit.egg-info}/PKG-INFO +36 -6
  45. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/rein_agentic_kit.egg-info/SOURCES.txt +17 -0
  46. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_affected.py +82 -0
  47. rein_agentic_kit-2.2.0/tests/test_angular_impact.py +213 -0
  48. rein_agentic_kit-2.2.0/tests/test_capacity_wait.py +181 -0
  49. rein_agentic_kit-2.2.0/tests/test_check_evidence.py +90 -0
  50. rein_agentic_kit-2.2.0/tests/test_delivery.py +315 -0
  51. rein_agentic_kit-2.2.0/tests/test_gate_execution.py +450 -0
  52. rein_agentic_kit-2.2.0/tests/test_gate_scope.py +188 -0
  53. rein_agentic_kit-2.2.0/tests/test_hook_tracker_snapshot.py +202 -0
  54. rein_agentic_kit-2.2.0/tests/test_host_workers.py +213 -0
  55. rein_agentic_kit-2.2.0/tests/test_integration_ready.py +154 -0
  56. rein_agentic_kit-2.2.0/tests/test_model_policy.py +441 -0
  57. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_orca_client.py +51 -21
  58. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_driver.py +54 -1
  59. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_review_fixes.py +128 -0
  60. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_round5.py +4 -2
  61. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship.py +5 -1
  62. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_async_gates.py +6 -6
  63. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_decide.py +174 -5
  64. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_hunt.py +26 -2
  65. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_ux.py +4 -3
  66. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_watch.py +2 -1
  67. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_skill_budget.py +14 -11
  68. rein_agentic_kit-2.2.0/tests/test_task_base.py +143 -0
  69. rein_agentic_kit-2.2.0/tests/test_token_report.py +709 -0
  70. rein_agentic_kit-2.2.0/tests/test_verification_reuse.py +142 -0
  71. rein_agentic_kit-2.1.2/plugins/rein/ENTRY.md +0 -29
  72. rein_agentic_kit-2.1.2/plugins/rein/SHIP-WATCH.md +0 -74
  73. rein_agentic_kit-2.1.2/plugins/rein/lib/gate_cache.py +0 -177
  74. rein_agentic_kit-2.1.2/plugins/rein/skills/rein-discover/PROVIDERS.md +0 -42
  75. rein_agentic_kit-2.1.2/plugins/rein/skills/rein-plan/PROVIDERS.md +0 -42
  76. rein_agentic_kit-2.1.2/plugins/rein/skills/rein-role/PROVIDERS.md +0 -42
  77. rein_agentic_kit-2.1.2/plugins/rein/skills/ship/PROVIDERS.md +0 -42
  78. rein_agentic_kit-2.1.2/tests/test_token_report.py +0 -229
  79. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/LICENSE +0 -0
  80. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/IMPACT.md +0 -0
  81. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/NATIVE-CLOSURE.md +0 -0
  82. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/__init__.py +0 -0
  83. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/detect.py +0 -0
  84. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/evidence.py +0 -0
  85. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/gate.py +0 -0
  86. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/gate_env.py +0 -0
  87. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/impact.py +0 -0
  88. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/launch_profile.py +0 -0
  89. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/migrate_config.py +0 -0
  90. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/quick_inbox.py +0 -0
  91. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/roles.py +0 -0
  92. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/routing.py +0 -0
  93. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/serve.py +0 -0
  94. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/ship_done.py +0 -0
  95. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/startup_dialog.py +0 -0
  96. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/lib/tmproot.py +0 -0
  97. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/answer/IMPACT.md +0 -0
  98. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/answer/SKILL.md +0 -0
  99. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/quick/IMPACT.md +0 -0
  100. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/quick/SKILL.md +0 -0
  101. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-audit/IMPACT.md +0 -0
  102. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-audit/SKILL.md +0 -0
  103. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-discover/IMPACT.md +0 -0
  104. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-discover/SKILL.md +0 -0
  105. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-plan/IMPACT.md +0 -0
  106. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-role/IMPACT.md +0 -0
  107. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/rein-role/SKILL.md +0 -0
  108. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/plugins/rein/skills/ship/IMPACT.md +0 -0
  109. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/rein_agentic_kit.egg-info/dependency_links.txt +0 -0
  110. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/rein_agentic_kit.egg-info/entry_points.txt +0 -0
  111. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/rein_agentic_kit.egg-info/top_level.txt +0 -0
  112. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/setup.cfg +0 -0
  113. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_baseline.py +0 -0
  114. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_baseline_cli.py +0 -0
  115. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_blocked_launch.py +0 -0
  116. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_capability_scope.py +0 -0
  117. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_claimable.py +0 -0
  118. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_cli_presentation.py +0 -0
  119. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_cli_resolution.py +0 -0
  120. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_detect.py +0 -0
  121. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_discovery_v2.py +0 -0
  122. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_doctor_cli.py +0 -0
  123. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_downgrade_expiry.py +0 -0
  124. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_failed_start.py +0 -0
  125. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_failure_triage.py +0 -0
  126. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_fix_verification.py +0 -0
  127. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate.py +0 -0
  128. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_cache.py +0 -0
  129. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_cleanup.py +0 -0
  130. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_cli.py +0 -0
  131. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_decision.py +0 -0
  132. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_env.py +0 -0
  133. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_log.py +0 -0
  134. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_prepare.py +0 -0
  135. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_run.py +0 -0
  136. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_tiers.py +0 -0
  137. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_gate_timeouts.py +0 -0
  138. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_graph_index.py +0 -0
  139. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard.py +0 -0
  140. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard_attribution.py +0 -0
  141. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard_fail_closed.py +0 -0
  142. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard_outside.py +0 -0
  143. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard_robust.py +0 -0
  144. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_guard_strict_read.py +0 -0
  145. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_impact.py +0 -0
  146. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_impact_eval_oracle.py +0 -0
  147. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_launch_profile.py +0 -0
  148. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_migrate_config.py +0 -0
  149. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_mise_runner.py +0 -0
  150. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_monorepo.py +0 -0
  151. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_native_done.py +0 -0
  152. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_native_skills.py +0 -0
  153. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_owner_decisions.py +0 -0
  154. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_packaging.py +0 -0
  155. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_plan.py +0 -0
  156. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_plan_check_decision.py +0 -0
  157. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_plan_check_repos.py +0 -0
  158. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_plan_self_check.py +0 -0
  159. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_python39_compat.py +0 -0
  160. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick.py +0 -0
  161. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_cli.py +0 -0
  162. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_close_record.py +0 -0
  163. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_env.py +0 -0
  164. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_inbox.py +0 -0
  165. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_record_lock.py +0 -0
  166. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_report.py +0 -0
  167. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quick_resend.py +0 -0
  168. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quota.py +0 -0
  169. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quota_evolution.py +0 -0
  170. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_quota_guard_freshness.py +0 -0
  171. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_readme_is_current.py +0 -0
  172. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_regenerable.py +0 -0
  173. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_reserved_names.py +0 -0
  174. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_resume_old_state.py +0 -0
  175. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_review_artifact.py +0 -0
  176. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_roles.py +0 -0
  177. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_round2.py +0 -0
  178. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_round3.py +0 -0
  179. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_round4.py +0 -0
  180. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_round6.py +0 -0
  181. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_routing.py +0 -0
  182. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_routing_v2.py +0 -0
  183. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_run_duration.py +0 -0
  184. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_serve_probe.py +0 -0
  185. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_setup_tabs.py +0 -0
  186. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_agent_flag.py +0 -0
  187. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_done.py +0 -0
  188. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_env.py +0 -0
  189. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_inbox.py +0 -0
  190. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_resilience.py +0 -0
  191. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_state.py +0 -0
  192. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_ship_tiers.py +0 -0
  193. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_single_subproject.py +0 -0
  194. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_skill_names.py +0 -0
  195. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_stalled_worker.py +0 -0
  196. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_startup_dialog.py +0 -0
  197. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_temp_root.py +0 -0
  198. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_v2_surface.py +0 -0
  199. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_verify_commands.py +0 -0
  200. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_verify_plan.py +0 -0
  201. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_verify_policy.py +0 -0
  202. {rein_agentic_kit-2.1.2 → rein_agentic_kit-2.2.0}/tests/test_version_lock.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rein-agentic-kit
3
- Version: 2.1.2
3
+ Version: 2.2.0
4
4
  Summary: Rein — keep your Claude Code agents lean and in control. Token-lean, stack-aware agentic dev flow.
5
5
  Author: Luis Farfan
6
6
  License: MIT
@@ -134,6 +134,34 @@ Quick delegates a small change when requested. Ship coordinates a plan when
134
134
  parallel work or recovery justifies it. Answer and Watch surface decisions back
135
135
  to the initiating session. [Operational details](docs/reference.md).
136
136
 
137
+ ## Choosing how to run a task
138
+
139
+ These are options, not phases. A prompt that already carries findings, decisions and
140
+ criteria goes straight to a quick check and then implementation.
141
+
142
+ | Use | When |
143
+ | --- | --- |
144
+ | **Native** (default) | One session can do the work |
145
+ | **Native + delegation** | The main session decides and integrates; native subagents on cheaper models do separable work big enough to repay the coordination (it did not save in [one small, uncontrolled run](docs/research/2026-11-29-native-first/RESULTS.md)) |
146
+ | **Discover / Plan** | An open question could change the solution / requirements or dependencies need a checkable plan |
147
+ | **Quick** | You want one separate worker for a small change |
148
+ | **Ship** | Parallel tasks, several providers, recovery or saved state are worth the coordination |
149
+
150
+ **Models.** Name the model on every subagent call. In Claude Code, a subagent with no
151
+ model in its call or definition and no `CLAUDE_CODE_SUBAGENT_MODEL` runs on the main
152
+ session's model. For Quick and Ship, [`ship.models`](docs/reference.md#model-policy)
153
+ lists the choices you allow to implement, escalate and audit.
154
+
155
+ **Verification.** The project owns its test policy, certification, integration and
156
+ deployment. `flow.config.json` sets the commands. With an eligible
157
+ [`gate.integrationReady`](docs/reference.md#configuration) handoff, Ship runs the
158
+ task-tier check and leaves the full one to your pipeline. Without it, the full gate
159
+ runs locally. Missing evidence never counts as a pass.
160
+
161
+ **Long sessions.** Each turn re-reads the session's whole context, and models with a
162
+ native 1M window compact at about 967K tokens by default. Start a new session for
163
+ unrelated work, or set a lower limit with Claude Code's `/autocompact`.
164
+
137
165
  ## Getting started
138
166
 
139
167
  ### 1. Make the skills available to your agent
@@ -213,9 +241,9 @@ or `pipx install rein-agentic-kit`. Your project's test and build tools are
213
241
  installed separately.
214
242
 
215
243
  Quick and Ship require **Orca**, its CLI, and repositories registered there.
216
- For Ship supervision, collect `rein watch <change> --root <root> --timeout 60`
217
- and renew `WAITING` checkpoints in the same agent turn; a background process alone
218
- does not resume a finished conversation. See [provider details](plugins/rein/SHIP-WATCH.md).
244
+ Ship needs no supervising agent. `rein watch <change> --root <root>` waits without
245
+ model turns, and questions stay pending until you answer them. Whether a session
246
+ wakes up by itself depends on the host: see [supervision](plugins/rein/SHIP-WATCH.md).
219
247
  Ship runs inside an Orca terminal; `rein ship <change> --detach` opens that
220
248
  terminal. Local checks such as `doctor`, `detect`, and `gate` work without Orca.
221
249
 
@@ -272,8 +300,10 @@ Keep these limits in mind:
272
300
  valid data arrives, but cannot guarantee that the source refreshes or that
273
301
  enough capacity remains to finish a task.
274
302
 
275
- Consumption measurement remains available through `token-report`, `ledger`, and
276
- `baseline`. Token reports read Claude Code transcripts; they are not complete
303
+ To see where tokens go, run `rein token-report --sessions --days 30`: it shows totals
304
+ by kind of session, model and what triggered each turn, with no conversation content.
305
+ The [latest measurement](docs/research/2026-11-29-native-first/RESULTS.md) also fixes an
306
+ earlier double count. `ledger` and `baseline` keep run history. Token reports read Claude Code transcripts; they are not complete
277
307
  accounting for all Codex sessions. Historical studies are linked from the research
278
308
  documentation.
279
309
 
@@ -114,6 +114,34 @@ Quick delegates a small change when requested. Ship coordinates a plan when
114
114
  parallel work or recovery justifies it. Answer and Watch surface decisions back
115
115
  to the initiating session. [Operational details](docs/reference.md).
116
116
 
117
+ ## Choosing how to run a task
118
+
119
+ These are options, not phases. A prompt that already carries findings, decisions and
120
+ criteria goes straight to a quick check and then implementation.
121
+
122
+ | Use | When |
123
+ | --- | --- |
124
+ | **Native** (default) | One session can do the work |
125
+ | **Native + delegation** | The main session decides and integrates; native subagents on cheaper models do separable work big enough to repay the coordination (it did not save in [one small, uncontrolled run](docs/research/2026-11-29-native-first/RESULTS.md)) |
126
+ | **Discover / Plan** | An open question could change the solution / requirements or dependencies need a checkable plan |
127
+ | **Quick** | You want one separate worker for a small change |
128
+ | **Ship** | Parallel tasks, several providers, recovery or saved state are worth the coordination |
129
+
130
+ **Models.** Name the model on every subagent call. In Claude Code, a subagent with no
131
+ model in its call or definition and no `CLAUDE_CODE_SUBAGENT_MODEL` runs on the main
132
+ session's model. For Quick and Ship, [`ship.models`](docs/reference.md#model-policy)
133
+ lists the choices you allow to implement, escalate and audit.
134
+
135
+ **Verification.** The project owns its test policy, certification, integration and
136
+ deployment. `flow.config.json` sets the commands. With an eligible
137
+ [`gate.integrationReady`](docs/reference.md#configuration) handoff, Ship runs the
138
+ task-tier check and leaves the full one to your pipeline. Without it, the full gate
139
+ runs locally. Missing evidence never counts as a pass.
140
+
141
+ **Long sessions.** Each turn re-reads the session's whole context, and models with a
142
+ native 1M window compact at about 967K tokens by default. Start a new session for
143
+ unrelated work, or set a lower limit with Claude Code's `/autocompact`.
144
+
117
145
  ## Getting started
118
146
 
119
147
  ### 1. Make the skills available to your agent
@@ -193,9 +221,9 @@ or `pipx install rein-agentic-kit`. Your project's test and build tools are
193
221
  installed separately.
194
222
 
195
223
  Quick and Ship require **Orca**, its CLI, and repositories registered there.
196
- For Ship supervision, collect `rein watch <change> --root <root> --timeout 60`
197
- and renew `WAITING` checkpoints in the same agent turn; a background process alone
198
- does not resume a finished conversation. See [provider details](plugins/rein/SHIP-WATCH.md).
224
+ Ship needs no supervising agent. `rein watch <change> --root <root>` waits without
225
+ model turns, and questions stay pending until you answer them. Whether a session
226
+ wakes up by itself depends on the host: see [supervision](plugins/rein/SHIP-WATCH.md).
199
227
  Ship runs inside an Orca terminal; `rein ship <change> --detach` opens that
200
228
  terminal. Local checks such as `doctor`, `detect`, and `gate` work without Orca.
201
229
 
@@ -252,8 +280,10 @@ Keep these limits in mind:
252
280
  valid data arrives, but cannot guarantee that the source refreshes or that
253
281
  enough capacity remains to finish a task.
254
282
 
255
- Consumption measurement remains available through `token-report`, `ledger`, and
256
- `baseline`. Token reports read Claude Code transcripts; they are not complete
283
+ To see where tokens go, run `rein token-report --sessions --days 30`: it shows totals
284
+ by kind of session, model and what triggered each turn, with no conversation content.
285
+ The [latest measurement](docs/research/2026-11-29-native-first/RESULTS.md) also fixes an
286
+ earlier double count. `ledger` and `baseline` keep run history. Token reports read Claude Code transcripts; they are not complete
257
287
  accounting for all Codex sessions. Historical studies are linked from the research
258
288
  documentation.
259
289
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rein",
3
3
  "description": "Rein \u2014 keep your Claude Code agents lean and in control. A deterministic plan / ship / audit method on top of Orca: fresh workers, gated tasks, independent review, and real per-model token measurement.",
4
- "version": "2.1.2",
4
+ "version": "2.2.0",
5
5
  "author": {
6
6
  "name": "Luis Farfan"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rein",
3
3
  "description": "Shared engineering workflows for Claude Code and Codex, with deterministic gates and Orca execution.",
4
- "version": "2.1.2",
4
+ "version": "2.2.0",
5
5
  "author": {
6
6
  "name": "Luis Farfan"
7
7
  },
@@ -0,0 +1,31 @@
1
+ ## REIN task entry
2
+
3
+ Start from what the prompt already settles. A researched prompt (findings, decisions,
4
+ criteria) replaces Discover and Plan: spot-check the claims the change depends on,
5
+ investigate only the gaps, then implement. Never re-ask an authorized decision; report
6
+ stale assumptions and conflicts. Otherwise inspect relevant code and tests first.
7
+ Reuse findings instead of repeating reads.
8
+
9
+ Work natively by default. Length, file count or several repositories never justify a
10
+ workflow. Delegate separable work to native subagents when it saves time or cost: name
11
+ an economical model on every call (the default may inherit this session's), give a
12
+ bounded brief, isolate concurrent edits, and take back a short result. Keep decisions
13
+ and integration here. Let commands do the waiting; never poll.
14
+
15
+ - `rein-discover`: an open question could change correctness or scope. Resolve it
16
+ before that implementation. Investigation-only requests stay read-only; at the
17
+ limit, report the missing evidence instead of guessing.
18
+ - `rein-plan`: requirements or dependencies need a verifiable plan.
19
+ - Quick: requested delegation. Ship: durable state, recovery or cross-provider
20
+ coordination worth its cost.
21
+
22
+ Run targeted checks while working. Final certification belongs to the project's
23
+ pipeline; without one, verify locally. Missing tools, capacity or evidence are never
24
+ approval. Changes to security/permissions, money, durable state, concurrency or service
25
+ contracts need an independent audit, however small; never approve your own
26
+ implementation. Preserve evidence freshness, worktree isolation, authorization and
27
+ quota brakes; unknown/unusable capacity cannot authorize new workers.
28
+
29
+ Load only the selected skill and its provider guide. `rein route` is optional. Iterate
30
+ only when requested, with limits and a success check. Reconsider affected conclusions
31
+ when code or assumptions change.
@@ -24,14 +24,15 @@ scope, gates, guard checks, review independence, or authorization.
24
24
  `<plugin-root>/NATIVE-CLOSURE.md` for the manifest and recovery.
25
25
  Identify each repo ID, worktree, branch and integration target explicitly; never
26
26
  fabricate Ship state. An Orca completed card does not mean cleanup completed.
27
- - A background process is not a host wake subscription. For Ship, use
28
- `rein watch <change> --root <root> --timeout 60`, retain and collect its process
29
- handle, and renew WAITING checkpoints in the same active agent turn. A Codex
30
- `session_id` needs `write_stdin`; a yielded exec cell needs `functions.wait`.
31
- Claude must collect its Bash task through the available wait/task-output tool.
32
- Only a verified host wake mechanism permits ending the supervising turn before
33
- completion. Never promise unattended delivery from a process id alone. Recovery
34
- and provider details live in `<plugin-root>/SHIP-WATCH.md`.
27
+ - A background process is not a host wake subscription. Ship needs no supervising agent: use one
28
+ untimed `rein watch <change> --root <root>` in the background only when your shell
29
+ tool itself promises to re-invoke you on exit. Otherwise leave the run detached and
30
+ say so. Never poll in a loop or promise unattended delivery. See
31
+ `<plugin-root>/SHIP-WATCH.md`.
32
+ - Native subagents: pass the model on every call. Without one, a definition or a
33
+ configured default, a Claude Code subagent runs on the main session's model. Use
34
+ agent definitions the project already has; REIN ships none. Concurrent editors each
35
+ need their own worktree.
35
36
  - Audit requires a session independent of the implementer. The fallback to
36
37
  reviewing the five axes yourself applies to that independent reviewer session.
37
38
  No missing Claude reviewer plugin permits self-approval.
@@ -0,0 +1,55 @@
1
+ # Ship supervision from Claude Code or Codex
2
+
3
+ The driver owns workers, gates, retries and capacity waits. It needs no supervising
4
+ model. `rein watch` only observes: it never consumes worker deliveries, answers
5
+ decisions or starts workers. Its 15-second loop is plain code, so one untimed run
6
+ waits through normal progress without a model turn.
7
+
8
+ ## Waiting
9
+
10
+ | Host | What to do |
11
+ | --- | --- |
12
+ | The shell tool's own description promises to re-invoke this session when a background command exits (some Claude Code sessions) | Run `rein watch <change> --root <root>` once in the background, with no timeout, and end the turn. Read its output when re-invoked |
13
+ | No such promise: Codex, headless runs, unknown hosts | Leave the run detached and end the turn. Say that nothing will wake this session. The owner checks with `rein ship <change> --status` or `rein answer <change> --root <root>` |
14
+ | The owner explicitly asks for attended supervision | Keep one untimed watch and collect it with the longest wait the host allows. Each host yield can cost a model turn, so say so first |
15
+
16
+ A process id, a UI event or a past notification is not a promise. Claude Code's
17
+ public docs do not guarantee that an idle session wakes when a background shell
18
+ command ends, and background commands are not restored when a session is resumed.
19
+ Time limits can apply in unattended sessions. If a watch dies or the session is
20
+ resumed, run a fresh one for the **same root and change**. Its first poll prints
21
+ every open, unqueued gate as PENDING, so an unanswered question is not lost. Pass
22
+ remembered `--skip` ids only for gates the owner still defers. Never restart Ship
23
+ to recover attention. REIN installs no daemon or automation and injects no
24
+ terminal input.
25
+
26
+ `--timeout <seconds>` (positive, at most 300) stays for hosts that cannot hold a long
27
+ command, and for existing callers. At its end it prints `WAITING` and exits 0, after
28
+ finishing any pending driver liveness check, which can extend the window. `WAITING`
29
+ needs no decision. **Never loop on it**: that spends a model turn, and re-reads the
30
+ whole context, to learn nothing. `--once` is a single poll and cannot be combined
31
+ with `--timeout`.
32
+
33
+ ## What needs reasoning
34
+
35
+ | State | Who handles it |
36
+ | --- | --- |
37
+ | Worker or gate running, capacity wait (`status:` lines), bounded retry | Driver only |
38
+ | `task_gate`, `repo_gate`, `repo_gate_inconclusive`: the environment or the evidence, not proven code | Owner. `retry` runs the check again; no worker starts unless the answer is `fix` |
39
+ | `QUESTION` / `PENDING` | Agent explains it; the owner decides |
40
+ | `FINISHED`, `STOPPED` | Agent reports once |
41
+
42
+ ## Decisions
43
+
44
+ - `QUESTION` / `PENDING`: inspect every listed gate, explain the decision and relay
45
+ the owner's actual answer through `rein answer ... --gate <id>`. Never infer an
46
+ approval from silence, a timeout, a worker's final prose or a missing gate.
47
+ - If the owner defers a gate, start the next watch with `--skip <ids>`. Those gates
48
+ stay unanswered.
49
+ - If an answer is refused or its gate is gone, read the current state again. Never
50
+ forward an old answer to whichever worker runs next.
51
+ - `FINISHED`: report tasks, audit and delivery as they are. `delivery queued` is not
52
+ integrated; `rein ship <change> --status` refreshes it. It authorizes no push or
53
+ cleanup.
54
+ - `STOPPED`: explain it and get the owner's decision to resume. Never start a
55
+ duplicate driver.
@@ -56,7 +56,8 @@ Subcommands:
56
56
  rein close <id> tick a task's checkbox in the plan
57
57
  rein next the DETERMINISTIC gate: is there a task to claim, and may it be
58
58
  rein review record / check a review episode (approval is state-bound)
59
- rein token-report real per-model token accounting for the last agent run
59
+ rein token-report real per-model token accounting for the last agent run;
60
+ --sessions [--days N] aggregates local Claude transcripts (read-only)
60
61
  rein ledger summary of recorded runs (per project / per session);
61
62
  --json returns {"runs": [...]}
62
63
  rein baseline mark/show/clear the reference run compared against
@@ -68,6 +69,11 @@ Subcommands:
68
69
  its .rein/ state on reboot: ship refuses it unless --allow-temp-root;
69
70
  quick and plan-check warn.
70
71
  --detach opens a new Orca tab that runs the loop, then returns
72
+ --stop-wait [--task <id> | --repo <name>]: stop the automatic
73
+ capacity waits of a running driver; each becomes an admission gate
74
+ --status: where the change is (implemented, reviewed, queued,
75
+ verifying, integrated, published), per repo; never "integrated"
76
+ without the queue's word or the commits in the integration branch
71
77
  exit 0 shipped and approved / 1 failed tasks or rejected audit /
72
78
  2 usage / 126 preflight or environment. Never pushes or merges
73
79
  rein answer [<change>] ["<text>"] [--gate <id>] [--root <plan repo>]
@@ -166,10 +172,11 @@ import json
166
172
  import os
167
173
  import shutil
168
174
  import signal
175
+ import subprocess
169
176
  import sys
170
177
  import time
171
178
 
172
- VERSION = "2.1.2"
179
+ VERSION = "2.2.0"
173
180
 
174
181
  HERE = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
175
182
  PLUGIN_ROOT = os.path.dirname(HERE)
@@ -179,6 +186,7 @@ import detect as _detect # noqa: E402
179
186
  import gate as _gate # noqa: E402
180
187
  import gate_cache as _gate_cache # noqa: E402
181
188
  import gate_env as _gate_env # noqa: E402
189
+ import gate_execution as _execution # noqa: E402
182
190
  import gate_log as _gate_log # noqa: E402
183
191
  import gate_run as _gate_run # noqa: E402
184
192
  import guard as _guard # noqa: E402
@@ -227,6 +235,16 @@ def cmd_detect(argv: list[str]) -> int:
227
235
  return 0
228
236
 
229
237
 
238
+ def _install_command_stop_handlers():
239
+ """Synchronous CLI checks own process groups that do not receive the CLI's signals."""
240
+ def stop(signum, _frame):
241
+ _verify.kill_running()
242
+ os._exit(128 + signum)
243
+
244
+ for sig in (signal.SIGTERM, signal.SIGINT):
245
+ signal.signal(sig, stop)
246
+
247
+
230
248
  def cmd_verify(argv: list[str]) -> int:
231
249
  """Run every resolved command for real -- an inference is not a fact (D2).
232
250
 
@@ -248,6 +266,7 @@ def cmd_verify(argv: list[str]) -> int:
248
266
  running `build` (or the whole `test` suite a second time) in the
249
267
  operator's main checkout before Isolate.
250
268
  """
269
+ _install_command_stop_handlers()
251
270
  root = _positional(argv) or "."
252
271
  timeout_raw = _opt(argv, "timeout", str(_verify.DEFAULT_TIMEOUT))
253
272
 
@@ -278,8 +297,33 @@ def cmd_verify(argv: list[str]) -> int:
278
297
  else:
279
298
  print(f"rein verify --plan: {err}")
280
299
  return 2
300
+ default_repo = _opt(argv, "repo") or _gate_env.repo_name_of(resolved_root)
301
+ declared_roots = (cfg.get("plan") or {}).get("repos") or {}
302
+ targets = {}
303
+
304
+ def verification_target(task):
305
+ repo = task.get("repo") or default_repo
306
+ if repo not in targets:
307
+ where = resolved_root
308
+ if repo != default_repo:
309
+ configured = declared_roots.get(repo) if isinstance(declared_roots, dict) else None
310
+ if not isinstance(configured, str) or not configured.strip():
311
+ raise ValueError("plan.repos must explicitly select a linked worktree for %s" % repo)
312
+ where = os.path.realpath(os.path.join(resolved_root, os.path.expanduser(configured)))
313
+ command = ["git", "-C", where, "rev-parse", "--path-format=absolute",
314
+ "--show-toplevel", "--git-dir", "--git-common-dir"]
315
+ found = subprocess.run(command, capture_output=True, text=True, check=False)
316
+ paths = found.stdout.splitlines()
317
+ if (found.returncode or len(paths) != 3 or os.path.realpath(paths[0]) != where
318
+ or os.path.realpath(paths[1]) == os.path.realpath(paths[2])):
319
+ raise ValueError("plan.repos[%s] must point to the root of a linked Git worktree" % repo)
320
+ current = cfg if where == resolved_root else _detect.resolve(where)
321
+ env = _gate_env.for_worktree(where, repo=repo, env_root=resolved_root, resolved=current)
322
+ targets[repo] = where, env, _execution.settings(current), current.get("commands") or {}
323
+ return targets[repo]
324
+
281
325
  report = _verify.verify_plan(resolved_root, plan_doc.get("tasks") or [], timeout=timeout,
282
- env=_gate_env.for_worktree(resolved_root, repo=_opt(argv, "repo")))
326
+ target=verification_target)
283
327
  if "--json" in argv:
284
328
  print(json.dumps(report, indent=2))
285
329
  else:
@@ -295,11 +339,13 @@ def cmd_verify(argv: list[str]) -> int:
295
339
  if report["unusable"]:
296
340
  print(f"\n UNUSABLE: {', '.join(report['unusable'])} — these cannot confirm their "
297
341
  f"own criteria, so an implementer would 'pass' without proving anything")
298
- else:
342
+ elif not report["waiting"]:
299
343
  print("\n every verification can prove something (failing is fine; proving nothing is not)")
300
- # Non-zero ONLY for unusable. A verification that fails before the work
301
- # exists is the normal state of a plan and must not stop anything.
302
- return 0 if report["allUsable"] else 1
344
+ if report["waiting"]:
345
+ print(f"\n WAITING FOR CAPACITY: {', '.join(report['waiting'])} — rerun when the scheduler has capacity")
346
+ # A normal failing assertion is expected before implementation. Capacity
347
+ # waits have a separate exit and can be retried without editing the plan.
348
+ return 1 if report["unusable"] else (_execution.QUEUE_EXIT if report["waiting"] else 0)
303
349
  try:
304
350
  timeout = float(timeout_raw)
305
351
  except ValueError:
@@ -352,13 +398,7 @@ def cmd_gate(argv: list[str]) -> int:
352
398
  # `--root` instead would have failed silently: `_positional` skips
353
399
  # anything starting with `-`, so `rein gate --root=/elsewhere` would have
354
400
  # resolved `.` and reported a confident verdict about the wrong repo.
355
- # Stopped by the driver (a gate nobody needs, or one past its bound): take the running check
356
- # down with it -- it runs in its own process group, which killing this process does not reach.
357
- def _stop(signum, _frame):
358
- _verify.kill_running()
359
- os._exit(128 + signum)
360
- for _sig in (signal.SIGTERM, signal.SIGINT):
361
- signal.signal(_sig, _stop)
401
+ _install_command_stop_handlers()
362
402
 
363
403
  root = _positional(argv) or "."
364
404
  resolved = _detect.resolve(root)
@@ -378,7 +418,7 @@ def cmd_gate(argv: list[str]) -> int:
378
418
  require_review = "--require-review" in argv
379
419
  tier = _opt(argv, "tier")
380
420
  if tier not in _gate_run.TIERS:
381
- print(f"gate: --tier must be task or full, got {tier!r}")
421
+ print(f"gate: --tier must be task, integration, release or full, got {tier!r}")
382
422
  return 2
383
423
 
384
424
  env = _gate_env.for_worktree(resolved["root"], repo=_opt(argv, "repo"),
@@ -397,8 +437,9 @@ def cmd_gate(argv: list[str]) -> int:
397
437
  prepare = _gate_env.prepare_command(resolved, resolved["root"], history_repo or _opt(argv, "repo"))
398
438
  report = _gate_run.run_steps(resolved["root"], planned["steps"], budget, env=env,
399
439
  cache="--no-cache" not in argv, history_repo=history_repo,
400
- skipped=planned["skipped"], prepare=prepare)
440
+ skipped=planned["skipped"], prepare=prepare, resolved=resolved)
401
441
  report["env"] = sorted(env) # names only: the values are the repo's business
442
+ report["envDigest"] = _gate_cache.env_digest(env) # binds the report to them without writing them
402
443
  report["tier"] = tier or "default"
403
444
  if planned["affected"] is not None:
404
445
  info = planned["affected"]
@@ -427,11 +468,12 @@ def cmd_gate(argv: list[str]) -> int:
427
468
 
428
469
  tools_raw = _opt(argv, "browser-tools")
429
470
  policy = dict(resolved.get("verifyPolicy") or {})
430
- if "--unit-only" in argv or tier:
471
+ if ("--unit-only" in argv or tier) and "--keep-policy" not in argv:
431
472
  # A per-task gate asks "do the commands pass", not "was the UI
432
473
  # rendered": render evidence belongs to `Type: verification` tasks.
433
474
  # It also narrows the run to the unit slots: no `testIntegration`.
434
- # The driver's tiers (task, full) are command gates too.
475
+ # The driver's tiers (task, full) are command gates too. --keep-policy
476
+ # (a verification task's task tier) keeps the render demand.
435
477
  policy["mode"] = "unit"
436
478
  if tools_raw:
437
479
  policy["tools"] = [t.strip() for t in tools_raw.split(",") if t.strip()]
@@ -440,7 +482,7 @@ def cmd_gate(argv: list[str]) -> int:
440
482
 
441
483
  decision = _gate.decide_gate(report, review=review, require_review=require_review,
442
484
  verify_policy=policy, serve=serve, render=render,
443
- allow_empty=tier == "task")
485
+ allow_empty=tier == "task" and "--keep-policy" not in argv)
444
486
  unprepared = next((r.get("error") for r in report["results"].values()
445
487
  if str(r.get("error") or "").startswith("gate.prepare failed")), "")
446
488
  if unprepared and decision["decision"] == _gate.GATE_SETUP:
@@ -458,8 +500,12 @@ def cmd_gate(argv: list[str]) -> int:
458
500
  print(f"gate: {resolved['root']}")
459
501
  for slot, res in report["results"].items(): # run order
460
502
  code = res["exitCode"] if res["exitCode"] is not None else "-"
461
- cached = " cached" if res.get("cached") else ""
462
- print(f" {slot:<10} [{res['outcome']:<13}] exit={code} {res['elapsedMs']}ms{cached} $ {res['command']}")
503
+ cached = (" evidence reused" if res.get("reusedEvidence") else " cached" if res.get("cached") else "")
504
+ timing = (f" queue={res['queueMs']}ms run={res['runMs']}ms"
505
+ if "queueMs" in res else f" {res['elapsedMs']}ms")
506
+ print(f" {slot:<10} [{res['outcome']:<13}] exit={code}{timing}{cached} $ {res['command']}")
507
+ if res.get("executionState") and res.get("error"):
508
+ print(f" {res['error']}")
463
509
  for line in res["outputHead"][:5]:
464
510
  print(f" | {line}")
465
511
  if "affected" in report:
@@ -1062,7 +1108,18 @@ def cmd_ship(argv: list[str]) -> int:
1062
1108
  Put the change name first: `_positional` treats the word after a bare flag
1063
1109
  as that flag's value, so `--dry-run <change>` is filtered out below.
1064
1110
  """
1065
- change = _positional([a for a in argv if a not in ("--dry-run", "--detach", "--allow-temp-root")])
1111
+ change = _positional([a for a in argv if a not in ("--dry-run", "--detach", "--allow-temp-root", "--stop-wait",
1112
+ "--status")])
1113
+ if "--status" in argv:
1114
+ if not change:
1115
+ print("usage: rein ship <change> --status [--root <plan repo>]")
1116
+ return 2
1117
+ return _ship.delivery_status(_opt(argv, "root", "."), change, _ship.OrcaClient())
1118
+ if "--stop-wait" in argv:
1119
+ if not change or _flag_missing_value(argv, ("--task", "--repo")) or (_opt(argv, "task") and _opt(argv, "repo")):
1120
+ print("usage: rein ship <change> --stop-wait [--task <id> | --repo <name>] [--root <plan repo>]")
1121
+ return 2
1122
+ return _ship.stop_wait(_opt(argv, "root", "."), change, task=_opt(argv, "task"), repo=_opt(argv, "repo"))
1066
1123
  agent, model = _opt(argv, "agent"), _opt(argv, "model")
1067
1124
  detach = "--detach" in argv
1068
1125
  usage = ("usage: rein ship <change> [--root <plan repo>] [--agent <id> [--model <m>]] "
@@ -1397,6 +1454,7 @@ def cmd_quick(argv: list[str]) -> int:
1397
1454
  print(usage)
1398
1455
  return 2
1399
1456
  if sentence == "done":
1457
+ _install_command_stop_handlers()
1400
1458
  return _quick.done_quick(cwd=".", client=_quick.OrcaClient(), accept_outside="--accept-outside" in argv,
1401
1459
  accept_paths=accept_paths, accept_commits=accept_commits,
1402
1460
  accept_hooks=accept_hooks)
@@ -29,20 +29,25 @@
29
29
  },
30
30
 
31
31
  "ship": {
32
- "$comment": "rein ship tuning (all optional; these are the defaults). claudeWeeklyThreshold: Claude weekly usage % above which workers go to Codex (or to Antigravity when Codex reaches brakePercent). brakePercent: session or weekly usage % that brakes a provider in ship and quick; number >0 and <=100, default 90; 100 only brakes at 100% usage. Invalid values keep the default. maxConcurrentWorkers: live workers at once. maxRetries: fresh retries of a red task. maxAuditRounds: fix-and-reaudit rounds before escalating. taskTimeoutMinutes: wall time per task before a gate opens. stallMinutes: a worker (ship) or quick agent with no sign of work this long after its launch (no commit, no edit, no question) -- typically stuck on a startup dialog that swallowed its brief -- asks the owner: ship opens a `stalled` gate (wait | resend | retry), `rein quick watch` prints STALLED; 0 = never. trustProbeSeconds: when Orca aborts a worker's start on an agent dialog (Codex's hooks review), Rein asks the owner once, opens a terminal with the agent in the worktree, and probes with a fresh start after this many seconds (doubling, up to 16x) until it is no longer aborted. launchProfile: \"default\" or \"lean\" -- lean puts a gitignored .claude/settings.local.json (your user plugins off, the tools a worker never uses denied, never ToolSearch) in the worktree before a Claude implementer starts there, and puts the owner's file back before the audit and at the end; auditors always run on the default; check it with `rein benchmark startup`. reviewDir: where a Human review task's review-<task>.md goes, relative to the plan root (default: the plan's openspec change folder, else .rein/review/<change>). gateTimeoutSeconds: per-command timeout for the gate run on each task (raise it for a slow test suite). largeChangeFiles: changed-file count that routes the audit to Opus. riskyPaths: globs that also route the audit to Opus.",
32
+ "$comment": "rein ship tuning (all optional; these are the defaults). claudeWeeklyThreshold: Claude weekly usage % above which workers go to Codex (or to Antigravity when Codex reaches brakePercent). brakePercent: session or weekly usage % that brakes a provider in ship and quick; number >0 and <=100, default 90; 100 only brakes at 100% usage. Invalid values keep the default. maxConcurrentWorkers: live workers at once, in this run. hostMaxWorkers: live agent workers at once on this host across every ship run (leases under $REIN_STATE_DIR or ~/.local/state/rein/workers; env REIN_HOST_MAX_WORKERS overrides; 0 = unlimited). maxRetries: fresh retries of a red task. maxAuditRounds: fix-and-reaudit rounds before escalating. taskTimeoutMinutes: wall time per task before a gate opens. admissionWaitMinutes: how long a gate the gate.execution engine did not admit (queue timeout) is re-run by itself, with backoff and no retry spent, before the owner is asked; 0 = ask at once. stallMinutes: a worker (ship) or quick agent with no sign of work this long after its launch (no commit, no edit, no question) -- typically stuck on a startup dialog that swallowed its brief -- asks the owner: ship opens a `stalled` gate (wait | resend | retry), `rein quick watch` prints STALLED; 0 = never. trustProbeSeconds: when Orca aborts a worker's start on an agent dialog (Codex's hooks review), Rein asks the owner once, opens a terminal with the agent in the worktree, and probes with a fresh start after this many seconds (doubling, up to 16x) until it is no longer aborted. launchProfile: \"default\" or \"lean\" -- lean puts a gitignored .claude/settings.local.json (your user plugins off, the tools a worker never uses denied, never ToolSearch) in the worktree before a Claude implementer starts there, and puts the owner's file back before the audit and at the end; auditors always run on the default; check it with `rein benchmark startup`. reviewDir: where a Human review task's review-<task>.md goes, relative to the plan root (default: the plan's openspec change folder, else .rein/review/<change>). gateTimeoutSeconds: per-command timeout for the gate run on each task (raise it for a slow test suite). largeChangeFiles: changed-file count that routes the audit to Opus. riskyPaths: globs that also route the audit to Opus. auditExclude: provider ids (claude, codex, antigravity; case-insensitive, unknown ids are warned about and ignored) never picked to audit, for a project that allows only some providers; excluding claude also rules out Opus; it adds to the providers Orca refused in this run and, unlike those, a retry never clears it; when it excludes every provider the owner is asked (retry | skip), and a retry reads it again; an auditor Orca swaps for an excluded provider is stopped.",
33
33
  "claudeWeeklyThreshold": 60,
34
34
  "brakePercent": 90,
35
35
  "maxConcurrentWorkers": 3,
36
+ "hostMaxWorkers": 4,
36
37
  "maxRetries": 2,
37
38
  "maxAuditRounds": 2,
38
39
  "taskTimeoutMinutes": 45,
40
+ "admissionWaitMinutes": 120,
39
41
  "stallMinutes": 10,
40
42
  "trustProbeSeconds": 30,
41
43
  "launchProfile": "default",
42
44
  "reviewDir": "",
43
45
  "gateTimeoutSeconds": 900,
44
46
  "largeChangeFiles": 25,
45
- "riskyPaths": ["**/auth/**", "**/payments/**", "**/migrations/**"]
47
+ "riskyPaths": ["**/auth/**", "**/payments/**", "**/migrations/**"],
48
+ "auditExclude": [],
49
+ "$models": "Optional. Authorized choices per responsibility, in order of preference, as \"agent/model\" (agents: claude, codex, antigravity). implement: workers (Claude still yields above claudeWeeklyThreshold when another entry exists). escalate: a task whose code failed its checks twice, only with measured capacity, never for infrastructure. audit: normal reviews. auditRisky: risky or large changes (and quick audits). A responsibility left out keeps the built-in routing. A malformed value launches nothing. Example: {\"implement\": [\"claude/sonnet\", \"codex/<model>\"], \"escalate\": [\"claude/opus\"], \"auditRisky\": [\"claude/opus\"]}",
50
+ "models": {}
46
51
  },
47
52
 
48
53
  "gate": {
@@ -18,6 +18,10 @@ from flow.config.json, per language, or is detected:
18
18
  `*.spec.ts`) or `{files}` (changed source files).
19
19
  - `testOne` (detected when only `commands.testOne` is known): mapped test files
20
20
  (sibling `*.spec.*`/`*.test.*`, and the python mapping) through `testOne`.
21
+ - `angular` (opt in): isolated changed specs, or a bounded TypeScript and
22
+ Angular component resource graph, through the native Angular builder.
23
+ Unknown inputs, shared setup and provider scope require the full suite.
24
+ Repos can route larger selections through `commands.testAffected`.
21
25
  - `full` (the default for anything else): the `test` slot.
22
26
 
23
27
  Nothing selected runs nothing at task level (lint and typecheck still run).
@@ -34,7 +38,11 @@ import re
34
38
  import shlex
35
39
  import subprocess
36
40
 
41
+ import angular_impact
42
+
37
43
  DEFAULT_MAX = 40
44
+ ANGULAR_ITERATION_MAX = 40
45
+ _TARGET_WORD = re.compile(r"(?:--[a-z][a-z0-9-]*=)?\{target\}")
38
46
 
39
47
  _SKIP_DIRS = {".git", "node_modules", ".venv", "venv", "env", "__pycache__", ".rein", "dist", "build",
40
48
  ".tox", ".nox", ".mypy_cache", ".pytest_cache", ".ruff_cache", "site-packages", ".next",
@@ -49,7 +57,7 @@ _JS_GLOBAL_RE = re.compile(r"^(package\.json|package-lock\.json|pnpm-lock\.yaml|
49
57
  _ALIASES = {"node": ("node", "typescript", "javascript", "ts", "js"), "python": ("python", "py")}
50
58
  _EXEC = {"pnpm": "pnpm exec", "yarn": "yarn", "bun": "bunx", "npm": "npx"}
51
59
 
52
- STRATEGIES = ("pytest", "vitest", "jest", "testOne", "full")
60
+ STRATEGIES = ("pytest", "vitest", "jest", "testOne", "angular", "full")
53
61
 
54
62
 
55
63
  def settings(resolved: dict) -> dict:
@@ -448,6 +456,14 @@ def expand_target(template: str, targets: list) -> str:
448
456
  return "".join(out)
449
457
 
450
458
 
459
+ def split_target_template(template: str) -> tuple[str, str] | None:
460
+ """Command prefix and optional flag prefix for an unquoted final target word."""
461
+ before, sep, word = template.rpartition(" ")
462
+ if before and _TARGET_WORD.fullmatch(word):
463
+ return before + sep, word[:-len("{target}")]
464
+ return None
465
+
466
+
451
467
  def _relative(changed: list, sub: str) -> list:
452
468
  if not sub:
453
469
  return [posixpath.normpath(p) for p in changed]
@@ -455,7 +471,7 @@ def _relative(changed: list, sub: str) -> list:
455
471
  return [posixpath.normpath(p[len(prefix):]) for p in changed if p.startswith(prefix)]
456
472
 
457
473
 
458
- def compute(root: str, resolved: dict, changed: list) -> dict:
474
+ def compute(root: str, resolved: dict, changed: list, *, base_ref: str = "") -> dict:
459
475
  """What the task-level test step runs for `changed` (paths relative to the repo root).
460
476
 
461
477
  `mode`: "none" (nothing selected: run no tests), "run" (`command` selects the
@@ -486,6 +502,36 @@ def compute(root: str, resolved: dict, changed: list) -> dict:
486
502
 
487
503
  if how == "full":
488
504
  return full("no affected-test strategy for this repo (gate.affected)")
505
+ if how == "angular":
506
+ one = commands.get("testOne") or ""
507
+ if "{target}" not in one or len(rel) != len(changed):
508
+ return full("Angular test target or paths outside the configured project are uncertain")
509
+ if len(rel) > min(DEFAULT_MAX, cap):
510
+ return full("Angular change exceeds the input limit (%d paths)" % min(DEFAULT_MAX, cap))
511
+ if not rel:
512
+ return run([], "", one)
513
+ if sub:
514
+ return full("Angular source impact currently requires a workspace-root project")
515
+ targets, why, evidence = angular_impact.source_targets(base, rel, base_ref)
516
+ if why:
517
+ return full(why)
518
+ out["reason"] = evidence
519
+ gate = resolved.get("gate")
520
+ gate = gate if isinstance(gate, dict) else {}
521
+ broad = commands.get("testAffected")
522
+ if broad or "angularIterationMax" in gate:
523
+ limit = gate.get("angularIterationMax", ANGULAR_ITERATION_MAX)
524
+ if type(limit) is not int or limit < 1:
525
+ return full("gate.angularIterationMax must be a positive integer")
526
+ if limit < len(targets) <= cap:
527
+ if (not isinstance(broad, str) or _has_shell_syntax(broad)
528
+ or broad.count("{target}") != 1
529
+ or not split_target_template(broad.strip())
530
+ or broad.strip() in (one.strip(), (commands.get("test") or "").strip())):
531
+ return full("large Angular selection needs a separate commands.testAffected ending in {target}")
532
+ one = broad
533
+ out["reason"] += "; using the larger affected-test command (over %d specs)" % limit
534
+ return run(targets, expand_target(one, targets), one)
489
535
  if how in ("pytest", "testOne"):
490
536
  one = commands.get("testOne") or ""
491
537
  if "{target}" not in one:
@@ -519,8 +565,9 @@ def compute(root: str, resolved: dict, changed: list) -> dict:
519
565
  return full(why)
520
566
  targets = sorted(set(targets) | set(py))
521
567
  return run(targets, how.replace("{tests}", _quoted(targets)), how)
522
- sources = [p for p in rel if os.path.isfile(os.path.join(base, p))]
523
- return run(sources, how.replace("{files}", _quoted(sources)), how)
568
+ if any(not os.path.isfile(os.path.join(base, path)) for path in rel):
569
+ return full("the affected-test command cannot represent removed or missing paths")
570
+ return run(rel, how.replace("{files}", _quoted(rel)), how)
524
571
  return full("unknown gate.affected strategy %r" % how)
525
572
 
526
573
 
@@ -538,7 +585,7 @@ def changed_files(root: str, base: str) -> list:
538
585
  """Everything changed in `root` since `base`: commits (`base...HEAD`), uncommitted edits and
539
586
  new files, repo-relative and sorted. Rein's own `.rein/` is not a change. RuntimeError when
540
587
  git cannot say (an unknown base, not a checkout)."""
541
- found = set(_git_lines(root, "diff", "--name-only", "%s...HEAD" % base))
542
- found.update(_git_lines(root, "diff", "--name-only", "HEAD"))
588
+ found = set(_git_lines(root, "diff", "--no-renames", "--name-only", "%s...HEAD" % base))
589
+ found.update(_git_lines(root, "diff", "--no-renames", "--name-only", "HEAD"))
543
590
  found.update(_git_lines(root, "ls-files", "--others", "--exclude-standard"))
544
591
  return sorted(f for f in found if not f.startswith(".rein/"))