claude-dev-env 2.10.0 → 2.12.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 (39) hide show
  1. package/CLAUDE.md +1 -1
  2. package/_shared/advisor/CLAUDE.md +3 -2
  3. package/_shared/advisor/advisor-protocol.md +74 -108
  4. package/_shared/advisor/reference/advisor-block.md +37 -0
  5. package/_shared/advisor/reference/cli-chain.md +45 -0
  6. package/_shared/advisor/reference/consult-format.md +41 -0
  7. package/_shared/advisor/reference/lifecycle.md +21 -0
  8. package/_shared/advisor/reference/sol-rung.md +34 -0
  9. package/_shared/advisor/reference/spawn-walk-log.md +31 -0
  10. package/_shared/advisor/reference/third-party-bind.md +30 -0
  11. package/_shared/advisor/reference/warm-up.md +34 -0
  12. package/_shared/advisor/scripts/codex_sol_advisor.py +514 -0
  13. package/_shared/advisor/scripts/config/advisor_scripts_constants/advisor_route_constants.py +21 -0
  14. package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +19 -17
  15. package/_shared/advisor/scripts/config/advisor_scripts_constants/sol_advisor_constants.py +33 -0
  16. package/_shared/advisor/scripts/model_tier_run_validator.py +32 -9
  17. package/_shared/advisor/scripts/tests/test_codex_sol_advisor.py +636 -0
  18. package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +79 -0
  19. package/_shared/advisor/scripts/tests/test_tier_model_ids.py +39 -17
  20. package/_shared/advisor/scripts/tier_model_ids.py +24 -0
  21. package/commands/CLAUDE.md +1 -0
  22. package/commands/sr-loop.md +48 -0
  23. package/docs/references/CLAUDE.md +2 -1
  24. package/docs/references/advisor-tool.md +26 -8
  25. package/docs/references/team-advisor-skill.md +3 -3
  26. package/docs/references/weak-executor-advisor.md +91 -0
  27. package/hooks/blocking/test_fable_spawn_gate.py +18 -11
  28. package/package.json +1 -1
  29. package/skills/_shared/advisor/CLAUDE.md +1 -1
  30. package/skills/_shared/advisor/scripts/README.md +2 -0
  31. package/skills/grokify/SKILL.md +1 -1
  32. package/skills/grokify/templates/handoff-template.md +2 -2
  33. package/skills/orchestrator/SKILL.md +5 -4
  34. package/skills/team-advisor/SKILL.md +7 -4
  35. package/skills/team-advisor/reference/advisor-docs-review.md +207 -0
  36. package/skills/usage-pause/SKILL.md +1 -1
  37. package/skills/usage-pause/scripts/resolve_usage_window.py +32 -4
  38. package/skills/usage-pause/scripts/test_resolve_usage_window.py +26 -0
  39. package/skills/usage-pause/scripts/usage_pause_constants/resolve_usage_window_constants.py +3 -1
@@ -52,7 +52,6 @@ from advisor_scripts_constants.model_tier_run_validator_constants import ( # no
52
52
  ATTEMPT_ORDER_MISMATCH_MESSAGE,
53
53
  ATTEMPT_TIER_OUT_OF_SLICE_MESSAGE,
54
54
  CANDIDATE_TIERS_MISMATCH_MESSAGE,
55
- CLI_BIND_SUCCESS_TOKEN,
56
55
  CLI_INVALID_JSON_EXIT_CODE,
57
56
  CLI_MISSING_PATH_EXIT_CODE,
58
57
  CLI_SUCCESS_EXIT_CODE,
@@ -62,13 +61,18 @@ from advisor_scripts_constants.model_tier_run_validator_constants import ( # no
62
61
  MISSING_FALLBACK_REASON_MESSAGE,
63
62
  SELECTED_TIER_MISMATCH_MESSAGE,
64
63
  SELECTED_TIER_NOT_NULL_MESSAGE,
65
- SPAWN_OUTCOME_KEY,
66
- SPAWN_SUCCESS_TOKEN,
67
64
  THIRD_PARTY_CLI_ADVISOR_FLOOR_TIER,
68
65
  THIRD_PARTY_MODEL_TIER,
69
- TIER_KEY,
70
66
  UNKNOWN_OWN_TIER_MESSAGE,
71
67
  )
68
+ from advisor_scripts_constants.advisor_route_constants import ( # noqa: E402
69
+ ADVISOR_MODEL_TIER,
70
+ CODEX_BIND_SUCCESS_TOKEN,
71
+ CLI_BIND_SUCCESS_TOKEN,
72
+ SPAWN_OUTCOME_KEY,
73
+ SPAWN_SUCCESS_TOKEN,
74
+ TIER_KEY,
75
+ )
72
76
  from tier_model_ids import canonical_tier_name # noqa: E402
73
77
 
74
78
 
@@ -79,6 +83,7 @@ class ModelTierRun:
79
83
  attempts: list[dict[str, str]]
80
84
  selected_tier: str | None
81
85
  fallback_reason: str | None = None
86
+ is_sol_enabled: bool = False
82
87
 
83
88
 
84
89
  class ModelTierRunError(ValueError):
@@ -95,15 +100,22 @@ def _canonical_tier_list(all_tier_names: list[str]) -> list[str] | None:
95
100
  return all_canonical_tiers
96
101
 
97
102
 
98
- def _expected_candidate_tiers(own_tier: str) -> list[str]:
103
+ def _expected_candidate_tiers(
104
+ own_tier: str, is_sol_enabled: bool = False
105
+ ) -> list[str]:
99
106
  maybe_canonical_own_tier = canonical_tier_name(own_tier)
100
107
  if maybe_canonical_own_tier is None:
101
108
  raise ModelTierRunError(f"{UNKNOWN_OWN_TIER_MESSAGE}: {own_tier!r}")
109
+ if maybe_canonical_own_tier == ADVISOR_MODEL_TIER:
110
+ raise ModelTierRunError(f"{UNKNOWN_OWN_TIER_MESSAGE}: {own_tier!r}")
102
111
  if maybe_canonical_own_tier == THIRD_PARTY_MODEL_TIER:
103
112
  floor_index = ALL_MODEL_TIERS.index(THIRD_PARTY_CLI_ADVISOR_FLOOR_TIER)
104
- return list(ALL_MODEL_TIERS[: floor_index + 1])
105
- floor_index = ALL_MODEL_TIERS.index(maybe_canonical_own_tier)
106
- return list(ALL_MODEL_TIERS[: floor_index + 1])
113
+ else:
114
+ floor_index = ALL_MODEL_TIERS.index(maybe_canonical_own_tier)
115
+ all_expected_candidates = list(ALL_MODEL_TIERS[: floor_index + 1])
116
+ if is_sol_enabled:
117
+ all_expected_candidates.insert(0, ADVISOR_MODEL_TIER)
118
+ return all_expected_candidates
107
119
 
108
120
 
109
121
  def _is_successful_attempt_outcome(
@@ -112,6 +124,10 @@ def _is_successful_attempt_outcome(
112
124
  ) -> bool:
113
125
  if canonical_tier == THIRD_PARTY_MODEL_TIER:
114
126
  return False
127
+ if canonical_tier == ADVISOR_MODEL_TIER:
128
+ return outcome_token == CODEX_BIND_SUCCESS_TOKEN
129
+ if outcome_token == CODEX_BIND_SUCCESS_TOKEN:
130
+ return False
115
131
  if outcome_token == SPAWN_SUCCESS_TOKEN:
116
132
  return True
117
133
  if outcome_token == CLI_BIND_SUCCESS_TOKEN:
@@ -144,7 +160,10 @@ def validate_model_tier_run(run: ModelTierRun) -> None:
144
160
  Raises:
145
161
  ModelTierRunError: When any invariant is violated.
146
162
  """
147
- all_expected_candidates = _expected_candidate_tiers(run.own_tier)
163
+ all_expected_candidates = _expected_candidate_tiers(
164
+ run.own_tier,
165
+ is_sol_enabled=run.is_sol_enabled,
166
+ )
148
167
  maybe_canonical_candidates = _canonical_tier_list(run.candidate_tiers)
149
168
  if maybe_canonical_candidates != all_expected_candidates:
150
169
  raise ModelTierRunError(CANDIDATE_TIERS_MISMATCH_MESSAGE)
@@ -215,12 +234,16 @@ def load_model_tier_run_from_json_path(from_path: Path) -> ModelTierRun:
215
234
  TypeError: When a field has the wrong shape.
216
235
  """
217
236
  parsed_payload = json.loads(from_path.read_text(encoding="utf-8"))
237
+ raw_sol_enabled = parsed_payload.get("sol_enabled", False)
238
+ if not isinstance(raw_sol_enabled, bool):
239
+ raise TypeError("sol_enabled must be a boolean")
218
240
  return ModelTierRun(
219
241
  own_tier=parsed_payload["own_tier"],
220
242
  candidate_tiers=list(parsed_payload["candidate_tiers"]),
221
243
  attempts=list(parsed_payload["attempts"]),
222
244
  selected_tier=parsed_payload.get("selected_tier"),
223
245
  fallback_reason=parsed_payload.get("fallback_reason"),
246
+ is_sol_enabled=raw_sol_enabled,
224
247
  )
225
248
 
226
249