claude-dev-env 2.11.0 → 2.13.0

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 (203) hide show
  1. package/_shared/advisor/reference/sol-rung.md +5 -2
  2. package/_shared/advisor/reference/warm-up.md +1 -0
  3. package/_shared/advisor/scripts/codex_sol_advisor.py +96 -31
  4. package/_shared/advisor/scripts/config/advisor_scripts_constants/sol_advisor_constants.py +5 -0
  5. package/_shared/advisor/scripts/tests/test_codex_sol_advisor.py +173 -11
  6. package/_shared/pr-loop/scripts/code_rules_gate.py +2 -3
  7. package/_shared/pr-loop/scripts/test_code_rules_gate.py +0 -26
  8. package/agents/CLAUDE.md +1 -2
  9. package/agents/pr-description-writer.md +11 -81
  10. package/bin/install.mjs +48 -9
  11. package/bin/install.prune.test.mjs +26 -0
  12. package/bin/install.settings-defaults.test.mjs +60 -33
  13. package/bin/install.test.mjs +2 -4
  14. package/commands/CLAUDE.md +1 -0
  15. package/commands/sr-loop.md +52 -0
  16. package/docs/CLAUDE.md +0 -1
  17. package/docs/references/CLAUDE.md +0 -1
  18. package/hooks/CLAUDE.md +1 -1
  19. package/hooks/blocking/CLAUDE.md +2 -27
  20. package/hooks/blocking/config/CLAUDE.md +1 -13
  21. package/hooks/blocking/conventional_pr_title_gate.py +1 -2
  22. package/hooks/blocking/send_user_file_open_locally_blocker.py +1 -1
  23. package/hooks/blocking/stop_dispatcher.py +4 -4
  24. package/hooks/blocking/test_bash_pre_tool_use_dispatcher.py +0 -3
  25. package/hooks/blocking/test_pre_tool_use_dispatcher.py +6 -7
  26. package/hooks/blocking/test_send_user_file_open_locally_blocker.py +4 -3
  27. package/hooks/blocking/test_shared_stdin_adoption.py +0 -2
  28. package/hooks/diagnostic/CLAUDE.md +3 -3
  29. package/hooks/diagnostic/hook_log_extractor.py +2 -36
  30. package/hooks/diagnostic/hook_log_stop_wrapper.py +6 -155
  31. package/hooks/diagnostic/test_hook_log_extractor.py +8 -21
  32. package/hooks/diagnostic/test_hook_log_stop_wrapper.py +3 -331
  33. package/hooks/git-hooks/git_hooks_constants/__init__.py +0 -6
  34. package/hooks/git-hooks/pre_push.py +3 -85
  35. package/hooks/git-hooks/test_pre_push.py +0 -130
  36. package/hooks/hooks.json +0 -35
  37. package/hooks/hooks_constants/CLAUDE.md +0 -9
  38. package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +0 -11
  39. package/hooks/hooks_constants/convergence_branch_constants.py +0 -1
  40. package/hooks/hooks_constants/fable_spawn_gate_constants.py +3 -4
  41. package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +0 -8
  42. package/hooks/hooks_constants/send_user_file_open_locally_blocker_constants.py +1 -6
  43. package/hooks/hooks_constants/stop_dispatcher_constants.py +0 -1
  44. package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +1 -26
  45. package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +0 -5
  46. package/hooks/hooks_constants/test_stop_dispatcher_constants.py +0 -1
  47. package/hooks/lifecycle/CLAUDE.md +1 -3
  48. package/package.json +1 -1
  49. package/rules/CLAUDE.md +0 -2
  50. package/rules/gh-cli-conventions.md +0 -1
  51. package/rules/git-workflow.md +1 -3
  52. package/scripts/CLAUDE.md +0 -1
  53. package/scripts/_code_review_test_support.py +0 -95
  54. package/scripts/dev_env_scripts_constants/code_review_constants.py +9 -98
  55. package/scripts/dev_env_scripts_constants/test_code_review_constants.py +1 -44
  56. package/scripts/invoke_code_review.py +8 -451
  57. package/scripts/test_invoke_code_review.py +5 -61
  58. package/scripts/test_invoke_code_review_cli.py +1 -45
  59. package/scripts/test_invoke_code_review_contract.py +1 -118
  60. package/settings.json +1 -10
  61. package/skills/CLAUDE.md +8 -0
  62. package/skills/autoconverge/reference/CLAUDE.md +1 -1
  63. package/skills/autoconverge/reference/convergence.md +7 -7
  64. package/skills/autoconverge/reference/gotchas.md +3 -10
  65. package/skills/autoconverge/workflow/converge.contract.test.mjs +53 -1388
  66. package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +4 -3
  67. package/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +33 -493
  68. package/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +15 -97
  69. package/skills/autoconverge/workflow/converge.mjs +201 -238
  70. package/skills/autoconverge/workflow/converge.precatch.test.mjs +1 -1
  71. package/skills/bugteam/CONSTRAINTS.md +1 -1
  72. package/skills/bugteam/SKILL.md +9 -0
  73. package/skills/bugteam/reference/audit-and-teammates.md +10 -6
  74. package/skills/bugteam/test_skill_additions.py +9 -0
  75. package/skills/comments/SKILL.md +65 -0
  76. package/skills/descriptions/SKILL.md +51 -0
  77. package/skills/emergencies/SKILL.md +42 -0
  78. package/skills/imagegen/SKILL.md +21 -0
  79. package/skills/imagegen/scripts/config/__init__.py +1 -0
  80. package/skills/imagegen/scripts/config/constants.py +28 -0
  81. package/skills/imagegen/scripts/imagegen.py +45 -0
  82. package/skills/imagegen/scripts/imagegen_core.py +528 -0
  83. package/skills/imagegen/scripts/test_imagegen.py +204 -0
  84. package/skills/orchestrator/SKILL.md +2 -4
  85. package/skills/plan-to-pr/SKILL.md +6 -7
  86. package/skills/plan-to-pr/reference/final-validation-tasks.md +1 -1
  87. package/skills/plan-to-pr/reference/process-inventory.md +2 -2
  88. package/skills/plan-to-pr/reference/review-loop.md +2 -2
  89. package/skills/plan-to-pr/reference/run-record.schema.json +1 -1
  90. package/skills/plan-to-pr/reference/task-seeds.md +1 -1
  91. package/skills/plan-to-pr/reference/task-ticket.md +3 -4
  92. package/skills/plan-to-pr/scripts/config/constants.py +1 -2
  93. package/skills/plan-to-pr/scripts/test_validate_protocol.py +1 -1
  94. package/skills/plan-to-pr/test_skill_contract.py +2 -2
  95. package/skills/pr-converge/SKILL.md +13 -16
  96. package/skills/pr-converge/reference/progress-checklist.md +6 -5
  97. package/skills/pr-converge/reference/state-schema.md +1 -27
  98. package/skills/pr-loop-cloud-transport/SKILL.md +1 -1
  99. package/skills/pr-loop-cloud-transport/reference/identity-and-hooks.md +3 -3
  100. package/skills/pr-loop-lifecycle/SKILL.md +1 -1
  101. package/skills/pr-loop-lifecycle/reference/teardown-publish-permissions.md +1 -1
  102. package/skills/prototype/SKILL.md +4 -4
  103. package/skills/prototype/reference/honest-limitations.md +4 -4
  104. package/skills/prototype/reference/promotion-tasks.md +2 -2
  105. package/skills/prototype/workflows/promotion.md +4 -6
  106. package/skills/reviews/SKILL.md +85 -0
  107. package/skills/small-cl/SKILL.md +52 -0
  108. package/skills/usage-pause/SKILL.md +1 -1
  109. package/skills/usage-pause/scripts/resolve_usage_window.py +32 -4
  110. package/skills/usage-pause/scripts/test_resolve_usage_window.py +26 -0
  111. package/skills/usage-pause/scripts/usage_pause_constants/resolve_usage_window_constants.py +3 -1
  112. package/agents/code-verifier.md +0 -74
  113. package/docs/PR_DESCRIPTION_GUIDE.md +0 -157
  114. package/docs/references/code-review-enforcement.md +0 -132
  115. package/hooks/blocking/code_review_enforcement_config_bootstrap.py +0 -53
  116. package/hooks/blocking/code_review_gate_deny.py +0 -74
  117. package/hooks/blocking/code_review_pr_create_gate.py +0 -198
  118. package/hooks/blocking/code_review_push_gate.py +0 -145
  119. package/hooks/blocking/code_review_stamp_directory_write_blocker.py +0 -348
  120. package/hooks/blocking/code_review_stamp_store.py +0 -233
  121. package/hooks/blocking/code_review_stamp_write_blocker_parts/__init__.py +0 -7
  122. package/hooks/blocking/code_review_stamp_write_blocker_parts/conftest.py +0 -15
  123. package/hooks/blocking/code_review_stamp_write_blocker_parts/obfuscated_stamp_path_reference.py +0 -212
  124. package/hooks/blocking/code_review_stamp_write_blocker_parts/split_directory_change_into_stamp.py +0 -138
  125. package/hooks/blocking/code_review_stamp_write_blocker_parts/test_obfuscated_stamp_path_reference.py +0 -49
  126. package/hooks/blocking/code_review_stamp_write_blocker_parts/test_split_directory_change_into_stamp.py +0 -38
  127. package/hooks/blocking/code_verifier_spawn_preflight_gate.py +0 -483
  128. package/hooks/blocking/config/code_review_enforcement_constants.py +0 -143
  129. package/hooks/blocking/config/test_code_review_enforcement_constants.py +0 -166
  130. package/hooks/blocking/config/verified_commit_constants.py +0 -160
  131. package/hooks/blocking/config/verified_commit_context_constants.py +0 -21
  132. package/hooks/blocking/config/verified_commit_gate_output_constants.py +0 -14
  133. package/hooks/blocking/conftest.py +0 -123
  134. package/hooks/blocking/convergence_gate_blocker.py +0 -310
  135. package/hooks/blocking/pr_converge_bugteam_enforcer.py +0 -170
  136. package/hooks/blocking/pr_description_body_audit.py +0 -148
  137. package/hooks/blocking/pr_description_command_parser.py +0 -237
  138. package/hooks/blocking/pr_description_enforcer.py +0 -227
  139. package/hooks/blocking/pr_description_pr_number.py +0 -155
  140. package/hooks/blocking/pr_description_proof_of_work.py +0 -385
  141. package/hooks/blocking/pr_description_readability.py +0 -364
  142. package/hooks/blocking/reviewer_spawn_gate.py +0 -182
  143. package/hooks/blocking/test_code_review_enforcement_config_bootstrap.py +0 -62
  144. package/hooks/blocking/test_code_review_gate_deny.py +0 -54
  145. package/hooks/blocking/test_code_review_pr_create_gate.py +0 -199
  146. package/hooks/blocking/test_code_review_push_gate.py +0 -205
  147. package/hooks/blocking/test_code_review_stamp_directory_write_blocker.py +0 -199
  148. package/hooks/blocking/test_code_review_stamp_store.py +0 -205
  149. package/hooks/blocking/test_code_verifier_spawn_preflight_gate.py +0 -710
  150. package/hooks/blocking/test_code_verifier_tools_contract.py +0 -28
  151. package/hooks/blocking/test_convergence_gate_blocker.py +0 -428
  152. package/hooks/blocking/test_pr_converge_bugteam_enforcer.py +0 -311
  153. package/hooks/blocking/test_pr_converge_bugteam_enforcer_state_tolerance.py +0 -184
  154. package/hooks/blocking/test_pr_description_enforcer.py +0 -221
  155. package/hooks/blocking/test_pr_description_enforcer_body_audit.py +0 -247
  156. package/hooks/blocking/test_pr_description_enforcer_body_rules.py +0 -493
  157. package/hooks/blocking/test_pr_description_enforcer_command_parser.py +0 -366
  158. package/hooks/blocking/test_pr_description_enforcer_pr_number.py +0 -159
  159. package/hooks/blocking/test_pr_description_enforcer_proof_gate.py +0 -175
  160. package/hooks/blocking/test_pr_description_enforcer_readability.py +0 -443
  161. package/hooks/blocking/test_pr_description_proof_of_work.py +0 -313
  162. package/hooks/blocking/test_reviewer_spawn_gate.py +0 -230
  163. package/hooks/blocking/test_verdict_directory_write_blocker.py +0 -804
  164. package/hooks/blocking/test_verification_verdict_store.py +0 -974
  165. package/hooks/blocking/test_verified_commit_config_bootstrap.py +0 -67
  166. package/hooks/blocking/test_verified_commit_docs_delta.py +0 -176
  167. package/hooks/blocking/test_verified_commit_gate.py +0 -581
  168. package/hooks/blocking/test_verified_commit_gate_additional_context.py +0 -134
  169. package/hooks/blocking/test_verified_commit_message_accuracy_blocker.py +0 -131
  170. package/hooks/blocking/test_verifier_verdict_minter.py +0 -299
  171. package/hooks/blocking/tests/test_verified_commit_gate.py +0 -41
  172. package/hooks/blocking/verdict_directory_write_blocker.py +0 -687
  173. package/hooks/blocking/verification_verdict_store.py +0 -1039
  174. package/hooks/blocking/verified_commit_config_bootstrap.py +0 -63
  175. package/hooks/blocking/verified_commit_gate.py +0 -113
  176. package/hooks/blocking/verified_commit_gate_parts/CLAUDE.md +0 -28
  177. package/hooks/blocking/verified_commit_gate_parts/__init__.py +0 -1
  178. package/hooks/blocking/verified_commit_gate_parts/command_tokenization.py +0 -174
  179. package/hooks/blocking/verified_commit_gate_parts/deny_payload.py +0 -53
  180. package/hooks/blocking/verified_commit_gate_parts/deny_reason.py +0 -80
  181. package/hooks/blocking/verified_commit_gate_parts/directory_resolution.py +0 -170
  182. package/hooks/blocking/verified_commit_gate_parts/gated_invocations.py +0 -217
  183. package/hooks/blocking/verified_commit_gate_parts/tests/conftest.py +0 -10
  184. package/hooks/blocking/verified_commit_gate_parts/tests/test_command_tokenization.py +0 -94
  185. package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_payload.py +0 -17
  186. package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_reason.py +0 -38
  187. package/hooks/blocking/verified_commit_gate_parts/tests/test_directory_resolution.py +0 -71
  188. package/hooks/blocking/verified_commit_gate_parts/tests/test_gated_invocations.py +0 -96
  189. package/hooks/blocking/verified_commit_message_accuracy_blocker.py +0 -167
  190. package/hooks/blocking/verifier_verdict_minter.py +0 -280
  191. package/hooks/hooks_constants/code_verifier_spawn_preflight_gate_constants.py +0 -64
  192. package/hooks/hooks_constants/convergence_gate_blocker_constants.py +0 -53
  193. package/hooks/hooks_constants/pr_converge_bugteam_enforcer_constants.py +0 -55
  194. package/hooks/hooks_constants/pr_converge_bugteam_enforcer_state.py +0 -67
  195. package/hooks/hooks_constants/pr_description_enforcer_constants.py +0 -167
  196. package/hooks/hooks_constants/pr_description_proof_of_work_constants.py +0 -107
  197. package/hooks/hooks_constants/reviewer_spawn_gate_constants.py +0 -41
  198. package/hooks/hooks_constants/test_pr_description_enforcer_constants.py +0 -292
  199. package/hooks/lifecycle/pr_converge_bugteam_skill_tracker.py +0 -198
  200. package/hooks/lifecycle/test_pr_converge_bugteam_skill_tracker.py +0 -283
  201. package/rules/proof-of-work-pr-comments.md +0 -22
  202. package/rules/verified-commit-gate-skip.md +0 -4
  203. package/scripts/Show-Asset.ps1 +0 -106
@@ -1,4 +1,4 @@
1
- """CLI JSON output for in-session, error, effort, and record-stamp paths."""
1
+ """CLI JSON output for in-session, error, and effort paths."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -9,8 +9,6 @@ import pytest
9
9
 
10
10
  import invoke_code_review as invoker
11
11
  from _code_review_test_support import (
12
- DriftingReview,
13
- EFFORT_LOW,
14
12
  FIXTURE_CHAIN_CONFIG_ERROR_MESSAGE,
15
13
  FIXTURE_HOST_PROFILE_ERROR_MESSAGE,
16
14
  FIXTURE_SESSION_OPUS,
@@ -19,8 +17,6 @@ from _code_review_test_support import (
19
17
  REJECTED_ULTRA_EFFORT,
20
18
  init_git_repository,
21
19
  install_seams,
22
- prepared_surface_repo,
23
- run_record_stamp_cli,
24
20
  run_review_cli,
25
21
  )
26
22
  from claude_chain_runner import ChainConfigurationError
@@ -32,17 +28,12 @@ from dev_env_scripts_constants.code_review_constants import (
32
28
  HOST_PROFILE_ERROR_RETURNCODE,
33
29
  IN_SESSION_RETURNCODE,
34
30
  INVALID_EFFORT_RETURNCODE,
35
- MAXIMUM_STAMP_MINT_PASSES,
36
31
  MODE_CHAIN,
37
32
  MODE_IN_SESSION,
38
- RESULT_KEY_BOUND_HASH,
39
33
  RESULT_KEY_DIRTY_TREE,
40
34
  RESULT_KEY_MODE,
41
- RESULT_KEY_PASS_COUNT,
42
35
  RESULT_KEY_RETURNCODE,
43
36
  RESULT_KEY_SERVED_COMMAND,
44
- RESULT_KEY_STAMP_MINTED,
45
- STAMP_DID_NOT_CONVERGE_RETURNCODE,
46
37
  )
47
38
  from dev_env_scripts_constants.grok_worker_constants import CWD_FLAG
48
39
 
@@ -103,7 +94,6 @@ def test_cli_emits_json_on_chain_configuration_error(
103
94
  returncode=CHAIN_CONFIG_ERROR_EXIT_CODE,
104
95
  is_dirty_tree=False,
105
96
  )
106
- assert invoker.is_code_review_clean_stamp_allowed(config_error_outcome) is False
107
97
 
108
98
 
109
99
  def test_cli_emits_json_on_host_profile_value_error(
@@ -156,37 +146,3 @@ def test_cli_rejects_ultra_effort_with_nonzero_exit(
156
146
  )
157
147
  assert exit_code == INVALID_EFFORT_RETURNCODE
158
148
  assert REJECTED_ULTRA_EFFORT in capsys.readouterr().err
159
-
160
-
161
- def test_cli_record_stamp_returns_non_convergence_code_on_cap(
162
- monkeypatch: pytest.MonkeyPatch,
163
- tmp_path: Path,
164
- capsys: pytest.CaptureFixture[str],
165
- ) -> None:
166
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
167
- monkeypatch.setattr(invoker, "invoke_code_review", DriftingReview())
168
- exit_code = run_record_stamp_cli(working_directory, effort=EFFORT_LOW)
169
- assert exit_code == STAMP_DID_NOT_CONVERGE_RETURNCODE
170
- parsed_payload = json.loads(capsys.readouterr().out)
171
- assert parsed_payload[RESULT_KEY_STAMP_MINTED] is False
172
- assert parsed_payload[RESULT_KEY_PASS_COUNT] == MAXIMUM_STAMP_MINT_PASSES
173
- assert parsed_payload[RESULT_KEY_BOUND_HASH] is None
174
-
175
-
176
- def test_cli_record_stamp_reports_missing_store_dependency(
177
- monkeypatch: pytest.MonkeyPatch,
178
- tmp_path: Path,
179
- capsys: pytest.CaptureFixture[str],
180
- ) -> None:
181
- def raise_missing_store(*all_args: object, **all_keywords: object) -> object:
182
- del all_args, all_keywords
183
- raise ModuleNotFoundError("store missing", name="code_review_stamp_store")
184
-
185
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
186
- monkeypatch.setattr(invoker, "load_code_review_stamp_store", raise_missing_store)
187
- exit_code = run_record_stamp_cli(working_directory, effort=EFFORT_LOW)
188
- assert exit_code == INVALID_EFFORT_RETURNCODE
189
- captured = capsys.readouterr()
190
- assert "stamp store" in captured.err
191
- parsed_payload = json.loads(captured.out)
192
- assert parsed_payload[RESULT_KEY_STAMP_MINTED] is False
@@ -1,4 +1,4 @@
1
- """Argument contract, encoding, clean-stamp rules, effort tokens, and stamps."""
1
+ """Argument contract, outcome encoding, and effort-token behavior."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -8,40 +8,30 @@ import pytest
8
8
 
9
9
  import invoke_code_review as invoker
10
10
  from _code_review_test_support import (
11
- DriftingReview,
12
11
  EFFORT_LOW,
13
12
  FIXTURE_CHAIN_RETURNCODE,
14
13
  FIXTURE_FAILED_RETURNCODE,
15
14
  FIXTURE_SERVED_COMMAND,
16
15
  FIXTURE_SESSION_OPUS,
17
16
  HOST_PROFILE_THIRD_PARTY,
18
- MISSING_STORE_FILE_NAME,
19
17
  REJECTED_ULTRA_EFFORT,
20
- SINGLE_PASS_CAP,
21
18
  claude_failed,
22
19
  init_git_repository,
23
20
  install_seams,
24
- prepared_surface_repo,
25
21
  run_review,
26
- stable_clean_review,
27
- surface_changing_review,
28
22
  )
29
23
  from dev_env_scripts_constants.code_review_constants import (
30
24
  CODE_REVIEW_MODEL_ALIAS,
31
25
  DEFAULT_CODE_REVIEW_EFFORT,
32
26
  IN_SESSION_RETURNCODE,
33
- MAXIMUM_STAMP_MINT_PASSES,
34
27
  MODE_CHAIN,
35
28
  MODE_IN_SESSION,
36
29
  REVIEW_PERMISSION_MODE as PERMISSION_MODE_BYPASS,
37
30
  PERMISSION_MODE_FLAG,
38
- RESULT_KEY_BOUND_HASH,
39
31
  RESULT_KEY_DIRTY_TREE,
40
32
  RESULT_KEY_MODE,
41
- RESULT_KEY_PASS_COUNT,
42
33
  RESULT_KEY_RETURNCODE,
43
34
  RESULT_KEY_SERVED_COMMAND,
44
- RESULT_KEY_STAMP_MINTED,
45
35
  )
46
36
  from dev_env_scripts_constants.grok_worker_constants import (
47
37
  MODEL_FLAG,
@@ -109,16 +99,6 @@ def test_chain_failure_preserves_returncode(
109
99
  assert review_outcome.returncode == FIXTURE_FAILED_RETURNCODE
110
100
  assert review_outcome.is_dirty_tree is False
111
101
  assert invoker.is_successful_code_review(review_outcome) is False
112
- assert invoker.is_code_review_clean_stamp_allowed(review_outcome) is False
113
-
114
-
115
- def test_clean_stamp_allowed_only_on_successful_clean_serve() -> None:
116
- assert invoker.is_code_review_clean_stamp_allowed(CLEAN_SUCCESS_OUTCOME) is True
117
- assert invoker.is_code_review_clean_stamp_allowed(DIRTY_SUCCESS_OUTCOME) is False
118
- assert invoker.is_code_review_clean_stamp_allowed(FAILED_SERVE_OUTCOME) is False
119
- assert invoker.is_code_review_clean_stamp_allowed(IN_SESSION_READY_OUTCOME) is True
120
- assert invoker.is_successful_code_review(FAILED_SERVE_OUTCOME) is False
121
- assert invoker.is_successful_code_review(CLEAN_SUCCESS_OUTCOME) is True
122
102
 
123
103
 
124
104
  def test_encode_code_review_outcome_shape() -> None:
@@ -157,100 +137,3 @@ def test_validate_effort_token_rejects_unknown_token() -> None:
157
137
  def test_build_code_review_prompt_reads_as_slash_command() -> None:
158
138
  assert invoker.build_code_review_prompt(EFFORT_LOW) == "/code-review low --fix"
159
139
  assert invoker.build_code_review_prompt("xhigh") == "/code-review xhigh --fix"
160
-
161
-
162
- def test_encode_stamp_mint_outcome_includes_mint_metadata() -> None:
163
- review_outcome = invoker.CodeReviewOutcome(
164
- mode=MODE_CHAIN,
165
- served_command=FIXTURE_SERVED_COMMAND,
166
- returncode=FIXTURE_CHAIN_RETURNCODE,
167
- is_dirty_tree=False,
168
- )
169
- mint_outcome = invoker.StampMintOutcome(
170
- review_outcome=review_outcome,
171
- is_stamp_minted=True,
172
- pass_count=SINGLE_PASS_CAP,
173
- bound_hash="abc123",
174
- )
175
- encoded_payload = invoker.encode_stamp_mint_outcome(mint_outcome)
176
- assert encoded_payload[RESULT_KEY_STAMP_MINTED] is True
177
- assert encoded_payload[RESULT_KEY_PASS_COUNT] == SINGLE_PASS_CAP
178
- assert encoded_payload[RESULT_KEY_BOUND_HASH] == "abc123"
179
-
180
-
181
- def test_record_stamp_mints_on_surface_stable_clean_pass(
182
- monkeypatch: pytest.MonkeyPatch, tmp_path: Path
183
- ) -> None:
184
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
185
- monkeypatch.setattr(invoker, "invoke_code_review", stable_clean_review)
186
- mint_outcome = invoker.invoke_code_review_and_record_stamp(
187
- working_directory=working_directory,
188
- session_model=CODE_REVIEW_MODEL_ALIAS,
189
- timeout_seconds=DEFAULT_CODE_REVIEW_TIMEOUT_SECONDS,
190
- effort=EFFORT_LOW,
191
- )
192
- assert mint_outcome.is_stamp_minted is True
193
- assert mint_outcome.bound_hash is not None
194
- store_module = invoker.load_code_review_stamp_store()
195
- assert store_module.stamp_covers_surface(
196
- str(working_directory), mint_outcome.bound_hash, EFFORT_LOW
197
- )
198
-
199
-
200
- def test_record_stamp_does_not_mint_when_review_changes_surface(
201
- monkeypatch: pytest.MonkeyPatch, tmp_path: Path
202
- ) -> None:
203
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
204
- monkeypatch.setattr(invoker, "invoke_code_review", surface_changing_review)
205
- mint_outcome = invoker.invoke_code_review_and_record_stamp(
206
- working_directory=working_directory,
207
- session_model=CODE_REVIEW_MODEL_ALIAS,
208
- timeout_seconds=DEFAULT_CODE_REVIEW_TIMEOUT_SECONDS,
209
- effort=EFFORT_LOW,
210
- maximum_passes=SINGLE_PASS_CAP,
211
- )
212
- assert mint_outcome.is_stamp_minted is False
213
- assert mint_outcome.pass_count == SINGLE_PASS_CAP
214
- assert mint_outcome.bound_hash is None
215
-
216
-
217
- def test_record_stamp_hits_cap_without_minting(
218
- monkeypatch: pytest.MonkeyPatch, tmp_path: Path
219
- ) -> None:
220
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
221
- monkeypatch.setattr(invoker, "invoke_code_review", DriftingReview())
222
- mint_outcome = invoker.invoke_code_review_and_record_stamp(
223
- working_directory=working_directory,
224
- session_model=CODE_REVIEW_MODEL_ALIAS,
225
- timeout_seconds=DEFAULT_CODE_REVIEW_TIMEOUT_SECONDS,
226
- effort=EFFORT_LOW,
227
- maximum_passes=MAXIMUM_STAMP_MINT_PASSES,
228
- )
229
- assert mint_outcome.is_stamp_minted is False
230
- assert mint_outcome.pass_count == MAXIMUM_STAMP_MINT_PASSES
231
-
232
-
233
- def test_load_code_review_stamp_store_records_and_covers_surface(
234
- monkeypatch: pytest.MonkeyPatch, tmp_path: Path
235
- ) -> None:
236
- working_directory = prepared_surface_repo(monkeypatch, tmp_path)
237
- store_module = invoker.load_code_review_stamp_store()
238
- surface_hash = store_module.live_surface_hash(str(working_directory))
239
- assert surface_hash is not None
240
- stamp_path = store_module.record_clean_stamp(
241
- str(working_directory), surface_hash, EFFORT_LOW
242
- )
243
- assert stamp_path.exists()
244
- assert store_module.stamp_covers_surface(
245
- str(working_directory), surface_hash, EFFORT_LOW
246
- )
247
-
248
-
249
- def test_load_code_review_stamp_store_raises_when_file_absent(
250
- monkeypatch: pytest.MonkeyPatch,
251
- ) -> None:
252
- monkeypatch.setattr(
253
- invoker, "STAMP_STORE_MODULE_FILE_NAME", MISSING_STORE_FILE_NAME
254
- )
255
- with pytest.raises(ModuleNotFoundError):
256
- invoker.load_code_review_stamp_store()
package/settings.json CHANGED
@@ -1,10 +1 @@
1
- {
2
- "permissions": {
3
- "deny": [
4
- "Edit($HOME/.claude/verification/**)",
5
- "Write($HOME/.claude/code-review-stamps/**)",
6
- "Edit($HOME/.claude/code-review-stamps/**)",
7
- "MultiEdit($HOME/.claude/code-review-stamps/**)"
8
- ]
9
- }
10
- }
1
+ {}
package/skills/CLAUDE.md CHANGED
@@ -42,6 +42,14 @@ contracts, runtime scripts). Map: `skills/_shared/CLAUDE.md`. End-of-run gotchas
42
42
  - `pr-loop-lifecycle` — opens and closes a PR-loop run (grant, teardown, PR description, revoke, report)
43
43
  - `pr-loop-cloud-transport` — six-step transport workflow that lets any PR-loop skill run in a session whose `gh` CLI is absent or cannot act on the PR (MCP schema load, origin/HEAD fix, identity rules, the gh-to-MCP substitution matrix, the Copilot status rule, and the post self-check)
44
44
 
45
+ **Code review guides (Google eng-practices, adapted for an AI reviewer)**
46
+ - `small-cl` — the Small CLs guide; refs: handling reviewer comments
47
+ - `comments` — writing review comments and handling reviewer comments; refs: the review standard, pushback, respectful code reviews
48
+ - `reviews` — the reviewer guide: standard, what to look for, navigating a CL, speed, pushback; refs: CL descriptions, review comments, emergencies, style guides, the two guide indexes
49
+ - `descriptions` — writing good CL descriptions
50
+ - `emergencies` — what counts as an emergency change; refs: what to look for, speed
51
+ - Focused pull request guidance: [`small-cl/SKILL.md`](small-cl/SKILL.md)
52
+
45
53
  **Research and discovery**
46
54
  - `recall` — retrieves facts from memory files
47
55
  - `remember` — saves a decision, gotcha, or architectural choice to the Obsidian vault
@@ -9,7 +9,7 @@ Reference documentation for the `autoconverge` skill. The `converge.mjs` workflo
9
9
  | `convergence.md` | Round shape: the static sweep, the three parallel internal lenses (code-review, bug-audit, self-review), deduplication, the fix commit step, the terminal Bugbot, Copilot, and Codex gates, and the definition of a clean convergence. |
10
10
  | `copilot-findings.md` | The Copilot gate tiering, per-finding verification, and the `userReview` return contract. |
11
11
  | `stop-conditions.md` | Every condition that ends the run short of ready: budget cap, iteration cap, blocker exit, static-sweep stall, Bugbot, Copilot, and Codex bypass. |
12
- | `gotchas.md` | Hard-won lessons from failed runs: PR title validation, conflicting PRs, worktree branch lock, resumed sessions rerooting, and minter issues. |
12
+ | `gotchas.md` | Current operating guidance for PR title validation, conflicting PRs, worktree branch lock, resumed sessions, and commit or push failures. |
13
13
  | `closing-report.md` | The closing HTML convergence report the teardown step builds and publishes: data source, build steps, publishing. |
14
14
  | `multi-pr.md` | The several-PRs path: per-PR worktrees, the `converge_multi.mjs` launch, per-PR teardown. |
15
15
  | `self-closing-loop.md` | The deferred-PR generations the orchestrator converges after teardown, and the Conventional-Commit title rule on hardening PRs. |
@@ -5,9 +5,9 @@
5
5
  Before the first round, the workflow checks once whether the PR branch conflicts
6
6
  with `origin/main`. When GitHub reports a conflict (`mergeable` false or
7
7
  `mergeable_state` dirty), one `clean-coder` rebases the branch onto `origin/main`
8
- and resolves every conflict — gated the same way as every other code change: the
9
- edit leaves the rebase in the working tree, a `code-verifier` binds a verdict to
10
- it, and the commit step force-pushes with lease. The bug checks then run on a
8
+ and resolves every conflict — the edit remains in the working tree, review and
9
+ verification follow the [review guide](../../reviews/SKILL.md#review-workflow),
10
+ and the commit step force-pushes with lease. The bug checks then run on a
11
11
  conflict-free diff.
12
12
 
13
13
  A PR that merges cleanly skips the rebase. A conflict that surfaces mid-run, when
@@ -61,8 +61,8 @@ confirmation gates that are expected to return zero.
61
61
  the round re-runs, so the reading lenses only ever review sweep-clean code.
62
62
  3. Run three reading lenses in parallel on that HEAD, each over the full
63
63
  `origin/main...HEAD` diff. Each lens receives the preflight's changed-file
64
- list and diffstat and reads only the files it needs from that list rather than
65
- re-deriving the diff; each lens forms its own review judgment.
64
+ list and diffstat and reads only the files it needs from that list rather than
65
+ re-deriving the diff; each lens applies the [review guide](../../reviews/SKILL.md#review-judgment).
66
66
  - **Code-review lens** — a correctness-focused review pass (`code-quality-agent`),
67
67
  report-only workflow agent — see runCodeReviewLens in workflow/converge.mjs for its configuration.
68
68
  The built-in `/code-review` command is a separate surface outside this
@@ -113,8 +113,8 @@ When the already-deduped findings for a phase are all severity P2 (and not
113
113
  standards-only), the phase still applies the fixes once. If the fix does **not**
114
114
  move HEAD (for example `resolvedWithoutCommit`), the phase treats that HEAD as
115
115
  clean and advances forward. If the fix **does** move HEAD, the run re-enters
116
- CONVERGE on the fixed SHA so HEAD-bound CLEAN/review stamps rebuild before
117
- FINALIZE — those stamps are SHA-specific. The three CONVERGE reading lenses stay
116
+ CONVERGE on the fixed SHA so the current review state rebuilds before
117
+ FINALIZE. The three CONVERGE reading lenses stay
118
118
  parallel; the P2-only decision is a routing branch on the deduped set after
119
119
  `resolveRoundOutcome` / gate classification. Mixed P0/P1 findings keep the
120
120
  existing fix + re-converge path.
@@ -50,16 +50,9 @@ fails in a new way.
50
50
  account, pin the token with `--user <login>`; `gh auth token` alone can return
51
51
  another account's token after a switch.
52
52
 
53
- - **The verified-commit gate can block the fix from landing.** The fix lens
54
- commits and pushes through the `verified_commit_gate` hook, which denies a
55
- `git commit`/`git push` until a `code-verifier` verdict covers the branch
56
- surface. A run can reach a clean fix yet fail to land it — the push stays
57
- blocked when no verdict is minted for that surface. A manual override exists:
58
- a trailing `# verify-skip` comment on the commit or push command skips the
59
- gate for that one command. Autoconverge must never apply that override on its
60
- own. When landing a fix needs it, stop and tell the user the verified-commit
61
- gate is blocking the push and that going forward needs either a `# verify-skip`
62
- bypass or a switch to `/pr-converge`, then let the user decide.
53
+ - **Commit or push fails after a repair.** Read the hook or command output,
54
+ repair the named issue, and record the rerun. Apply the
55
+ [review guide](../../reviews/SKILL.md#review-workflow) before retrying.
63
56
 
64
57
  - **A Copilot "down" verdict is valid only after the full poll budget.** A
65
58
  successful review request means the review is in flight — Copilot typically