claude-dev-env 2.21.2 → 2.22.1
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.
- package/.agents/skills/orchestrator/SKILL.md +1 -0
- package/.agents/skills/pr-cleanup/SKILL.md +12 -2
- package/.agents/skills/pr-cleanup/reference/process-inventory.md +2 -0
- package/.agents/skills/pr-cleanup/reference/task-seeds.md +9 -7
- package/.agents/skills/team-advisor/SKILL.md +3 -0
- package/AGENTS.md +1 -1
- package/_shared/advisor/advisor-protocol.md +1 -0
- package/_shared/advisor/reference/sol-rung.md +2 -2
- package/_shared/advisor/reference/third-party-bind.md +12 -0
- package/_shared/advisor/scripts/codex_sol_advisor.py +16 -4
- package/_shared/advisor/scripts/config/advisor_scripts_constants/sol_advisor_constants.py +4 -0
- package/_shared/advisor/scripts/tests/test_codex_sol_advisor.py +4 -5
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ description: >-
|
|
|
6
6
|
correction, plan, or stop. Triggers: '/orchestrator', 'orchestrator
|
|
7
7
|
strategy', 'run with an orchestrator', 'executor-advisor mode',
|
|
8
8
|
'orchestrator enforcement', 'agent routing', 'orchestrate'.
|
|
9
|
+
disable-model-invocation: true
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Orchestrator Strategy
|
|
@@ -48,6 +48,7 @@ with the user.
|
|
|
48
48
|
| `pr-name-by-capability` | Find driver or motive words on reusable capability surfaces | Naming findings and rename directions |
|
|
49
49
|
| `pr-small-cl` | Choose one coherent pull request or an ordered replacement stack | Focused boundary and dependencies |
|
|
50
50
|
| `source-command-sr-loop` | Run `e-simplify`, then `e-code-review low --fix` until clean | Review passes, fixes, and validation |
|
|
51
|
+
| `pr-summarizer` (repo-local) | When the repository under cleanup ships `.claude/skills/pr-summarizer/`, run it after Ready and post the secret-gist preview comment | Preview URL and comment confirmation |
|
|
51
52
|
|
|
52
53
|
## Task seeding
|
|
53
54
|
|
|
@@ -89,7 +90,12 @@ review passes, fixes, skips, tests, and commit SHAs.
|
|
|
89
90
|
|
|
90
91
|
### 6. Promote and report
|
|
91
92
|
|
|
92
|
-
After the applicable gate passes,
|
|
93
|
+
After the applicable gate passes, when the repository under cleanup includes
|
|
94
|
+
`.claude/skills/pr-summarizer/SKILL.md`, load and run that skill for each pull
|
|
95
|
+
request promoted to Ready in this cleanup run. Post the secret gist preview as a
|
|
96
|
+
pull request comment before completing the [Finish report](#finish-report).
|
|
97
|
+
|
|
98
|
+
When the skill is absent, record `N/A` for the summary step and continue.
|
|
93
99
|
|
|
94
100
|
## Promotion gates
|
|
95
101
|
|
|
@@ -110,6 +116,9 @@ Reapply every relevant fix to the child. Rerun child tests, `e-simplify`, and
|
|
|
110
116
|
`e-code-review` after the merge. Record the new child head and every validation
|
|
111
117
|
result before promoting the child to Ready.
|
|
112
118
|
|
|
119
|
+
When the repository ships `pr-summarizer`, run it on the child after child Ready
|
|
120
|
+
promotion if the child is in scope for this cleanup run.
|
|
121
|
+
|
|
113
122
|
Use `reference/task-seeds.md` and `reference/process-inventory.md` to record promotion evidence.
|
|
114
123
|
|
|
115
124
|
## Finish report
|
|
@@ -118,6 +127,7 @@ Use `reference/task-seeds.md` and `reference/process-inventory.md` to record pro
|
|
|
118
127
|
- `pr-refinement` outcome.
|
|
119
128
|
- `source-command-sr-loop` passes, commits, and validation results.
|
|
120
129
|
- Parent-ready and child-ready SHAs when a child is promoted.
|
|
130
|
+
- `pr-summarizer` preview URLs and comment confirmation for each Ready pull request, or `N/A` when the repo does not ship the skill.
|
|
121
131
|
- Remaining hard block, or `null`.
|
|
122
132
|
|
|
123
133
|
## File index
|
|
@@ -125,5 +135,5 @@ Use `reference/task-seeds.md` and `reference/process-inventory.md` to record pro
|
|
|
125
135
|
| Path | Purpose |
|
|
126
136
|
|---|---|
|
|
127
137
|
| `SKILL.md` | Hub for refinement, cleanup convergence, promotion gates, and reporting |
|
|
128
|
-
| `reference/task-seeds.md` | Ordered session tasks for audits, delivery, validation, and
|
|
138
|
+
| `reference/task-seeds.md` | Ordered session tasks for audits, delivery, validation, promotion, and summary |
|
|
129
139
|
| `reference/process-inventory.md` | Process classes, evidence homes, and paired task checks |
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
| Apply or disposition findings | judgment | `SKILL.md` and `task-seed:reference/task-seeds.md` | Changed diff or exact disposition | task-tool |
|
|
9
9
|
| Validate parent head | deterministic | `task-seed:reference/task-seeds.md` | Scoped test and confirmation results | task-tool |
|
|
10
10
|
| Promote parent and record exact Ready SHA | deterministic | `task-seed:reference/task-seeds.md` | Remote parent Ready state and SHA | task-tool |
|
|
11
|
+
| Post parent PR summary gist comment | deterministic | `SKILL.md` and `task-seed:reference/task-seeds.md` | Preview URL, comment confirmation, or `N/A` | task-tool |
|
|
11
12
|
| Merge exact parent SHA into child | deterministic | `task-seed:reference/task-seeds.md` | Child merge commit and parent SHA | task-tool |
|
|
12
13
|
| Prove parent SHA ancestry | deterministic | `task-seed:reference/task-seeds.md` | `git merge-base --is-ancestor` exit code `0` | task-tool |
|
|
13
14
|
| Reapply relevant fixes to child | judgment | `SKILL.md` and `task-seed:reference/task-seeds.md` | Child diff and reapplication record | task-tool |
|
|
14
15
|
| Validate child and rerun confirmations | deterministic | `task-seed:reference/task-seeds.md` | New child-head tests, simplify, and review results | task-tool |
|
|
15
16
|
| Promote child and report | deterministic | `task-seed:reference/task-seeds.md` | Child Ready state and finish report | task-tool |
|
|
17
|
+
| Post child PR summary gist comment | deterministic | `SKILL.md` and `task-seed:reference/task-seeds.md` | Preview URL, comment confirmation, or `N/A` | task-tool |
|
|
@@ -11,10 +11,12 @@ each task with evidence from the stated gate.
|
|
|
11
11
|
6. Select, apply, validate, or exactly disposition every actionable preflight finding in the one-agent parent cleanup worktree.
|
|
12
12
|
7. Run parent scoped tests and cleanup/review confirmation checks.
|
|
13
13
|
8. Promote the parent to Ready and record the exact remote `parent_ready_sha`.
|
|
14
|
-
9.
|
|
15
|
-
10.
|
|
16
|
-
11.
|
|
17
|
-
12.
|
|
18
|
-
13.
|
|
19
|
-
14.
|
|
20
|
-
15.
|
|
14
|
+
9. When `.claude/skills/pr-summarizer/SKILL.md` exists in the repository under cleanup, run that skill on the parent and post the gist preview comment; otherwise record `N/A`.
|
|
15
|
+
10. Create the child from its intended pre-parent base and merge the exact `parent_ready_sha`.
|
|
16
|
+
11. Prove `parent_ready_sha` is an ancestor of the child head and record the exit code.
|
|
17
|
+
12. Reapply every relevant preflight fix to the child.
|
|
18
|
+
13. Run child scoped tests on the new child head.
|
|
19
|
+
14. Rerun `e-simplify` and `e-code-review` on the new child head.
|
|
20
|
+
15. Promote the child to Ready after all child evidence passes.
|
|
21
|
+
16. When the repository ships `pr-summarizer` and the child is in scope, run it on the child and post the gist preview comment; otherwise record `N/A`.
|
|
22
|
+
17. Write the finish report with SHAs, evidence, summary preview URLs, states, and hard blocks.
|
|
@@ -5,6 +5,7 @@ description: >-
|
|
|
5
5
|
it before substantive work, completion, commits, or when stuck. Triggers:
|
|
6
6
|
'team-advisor', 'team advisor', 'second opinion', 'advisor', 'consult',
|
|
7
7
|
'verify', 'validate', 'commit', 'push'.
|
|
8
|
+
disable-model-invocation: true
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# Team Advisor
|
|
@@ -29,6 +30,8 @@ One warm advisor at the strongest tier this session can reach. This session is t
|
|
|
29
30
|
5. Skip the multi-consumer "who you are" opener — sole consumer.
|
|
30
31
|
6. When the bind or reply path fails, fail closed and report to the user. On a third-party host, only the bound Claude advisor issues ENDORSE / CORRECTION / PLAN / STOP.
|
|
31
32
|
|
|
33
|
+
**GOTCHA (Cursor / ThirdParty + Sol):** when the walk reaches Sol or the user asks for Sol, first tool call is `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --enable-sol --cwd <repo-root>` with the charter on stdin — not Agent/Task, not a probe-path search. Details: [`third-party-bind.md`](../../_shared/advisor/reference/third-party-bind.md) GOTCHA and [`sol-rung.md`](../../_shared/advisor/reference/sol-rung.md).
|
|
34
|
+
|
|
32
35
|
Full walk, charter, consult packet, Sol routing, and drift re-bind live in the protocol read map and its authoritative `reference/` leaves.
|
|
33
36
|
|
|
34
37
|
## Consult
|
package/AGENTS.md
CHANGED
|
@@ -76,6 +76,7 @@ Assemble and paste each executor's Advisor block per the **Advisor block** secti
|
|
|
76
76
|
On a third-party (non-Claude, non-Codex) harness, the shared CLI Claude-chain is the one path to a Claude advisor: bind Fable through it, per [`reference/third-party-bind.md`](reference/third-party-bind.md).
|
|
77
77
|
The bound Claude session is the advisor; this third-party session stays the executor.
|
|
78
78
|
Walk `candidate_tiers = ["Fable"]`. When Fable is out of usage, the sol rung binds after Fable (`candidate_tiers = ["Fable", "Sol"]`).
|
|
79
|
+
**Cursor Sol first shot:** when the walk reaches Sol (or the user asks for Sol), bind through `codex_sol_advisor.py --bind --enable-sol` on the first tool call (see the GOTCHA in [`reference/third-party-bind.md`](reference/third-party-bind.md)) — not the Agent tool, and not a probe-path hunt.
|
|
79
80
|
**Fail closed:** when every candidate fails, set `selected_tier = null` and a `fallback_reason`, report that the advisor is unreachable, and **stop** — ENDORSE / CORRECTION / PLAN / STOP come only from a bound advisor.
|
|
80
81
|
Executors report to the orchestrating session; that session consults the bound advisor and relays the four-signal reply.
|
|
81
82
|
|
|
@@ -24,9 +24,9 @@ Flag on: run the Codex preflight first —
|
|
|
24
24
|
python ~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Repo home: `packages/claude-dev-env/_shared/pr-loop/scripts/`.
|
|
27
|
+
**GOTCHA — probe path:** that installed path is the only one. `codex_sol_advisor.resolve_usage_probe_path` builds `~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py` and stops. Do not hunt `skills/codex-review/`, Codex worktrees under `C:\dev\.codex\worktrees\`, or other copies. Repo home: `packages/claude-dev-env/_shared/pr-loop/scripts/`.
|
|
28
28
|
|
|
29
|
-
The shared entry point is `~/.claude/_shared/advisor/scripts/codex_sol_advisor.py`; it calls the installed probe and owns Sol bind or resume parsing. Bind with `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --cwd <repo-root>` and pipe the charter on stdin. Resume with `--resume <session_id>` and pipe the delta consult on stdin.
|
|
29
|
+
The shared entry point is `~/.claude/_shared/advisor/scripts/codex_sol_advisor.py`; it calls the installed probe and owns Sol bind or resume parsing. Bind with `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --enable-sol --cwd <repo-root>` and pipe the charter on stdin. Resume with `--resume <session_id>` and pipe the delta consult on stdin.
|
|
30
30
|
|
|
31
31
|
The gate passes only when the probe exits 0, `percent_left` is finite numeric data, and `percent_left` is strictly greater than `WEEKLY_USAGE_GATE_THRESHOLD_PERCENT` from the existing probe. The exact-threshold case fails closed when Fable did not bind.
|
|
32
32
|
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Detail behind the **Host profiles → Third-party host** section of [`advisor-protocol.md`](../advisor-protocol.md).
|
|
4
4
|
Open this when binding or re-binding the advisor from a third-party (non-Claude, non-Codex) harness.
|
|
5
5
|
|
|
6
|
+
## GOTCHA — Cursor Sol first shot
|
|
7
|
+
|
|
8
|
+
Cursor is a third-party host. When the walk reaches Sol (`ADVISOR_SOL=1` / `--enable-sol` after Fable is out of usage, or the user asks for Sol), bind Sol on the **first** tool call through the headless Codex helper. Do not use the Agent or Task tool, do not spawn Grok as a substitute, and do not search the filesystem for `codex_usage_probe.py`.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
python "$HOME/.claude/_shared/advisor/scripts/codex_sol_advisor.py" --bind --enable-sol --cwd <repo-root>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Pipe the standing-reviewer charter on stdin. Persist `session_id` from the JSON reply. Later consults: `--resume <session_id>` with the delta on stdin. Capture helper / `codex` stdout as UTF-8 on Windows (`encoding="utf-8"`, `errors="replace"`). Probe path and preflight: [`sol-rung.md`](sol-rung.md).
|
|
15
|
+
|
|
16
|
+
When the Sol flag is off, follow the Claude-chain steps below.
|
|
17
|
+
|
|
6
18
|
## Bind steps
|
|
7
19
|
|
|
8
20
|
1. Name the session identity first (protocol **Host profiles**). This path is for a ThirdParty profile.
|
|
@@ -34,6 +34,10 @@ from advisor_scripts_constants.sol_advisor_constants import ( # noqa: E402
|
|
|
34
34
|
CODEX_REASONING_CONFIG_TEMPLATE,
|
|
35
35
|
CODEX_RESUME_SUBCOMMAND,
|
|
36
36
|
CODEX_SANDBOX_FLAG,
|
|
37
|
+
USAGE_PROBE_FILENAME,
|
|
38
|
+
USAGE_PROBE_PACKAGE_DIRECTORY_NAME,
|
|
39
|
+
USAGE_PROBE_SCRIPTS_DIRECTORY_NAME,
|
|
40
|
+
USAGE_PROBE_SHARED_DIRECTORY_NAME,
|
|
37
41
|
SOL_BIND_FAILURE_REASON,
|
|
38
42
|
SOL_CODEX_TIMEOUT_REASON,
|
|
39
43
|
SOL_CODEX_TIMEOUT_SECONDS,
|
|
@@ -201,6 +205,14 @@ def resolve_advisor_effort(
|
|
|
201
205
|
def resolve_usage_probe_path(home_directory: Path) -> Path:
|
|
202
206
|
"""Return the installed Codex weekly usage probe path.
|
|
203
207
|
|
|
208
|
+
::
|
|
209
|
+
|
|
210
|
+
resolve_usage_probe_path(Path.home())
|
|
211
|
+
-> ~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py
|
|
212
|
+
|
|
213
|
+
This is the only probe path the Sol helper uses. Do not search worktrees
|
|
214
|
+
or archived ``skills/codex-review`` trees for a second copy.
|
|
215
|
+
|
|
204
216
|
Args:
|
|
205
217
|
home_directory: Home directory used to construct the path.
|
|
206
218
|
|
|
@@ -210,10 +222,10 @@ def resolve_usage_probe_path(home_directory: Path) -> Path:
|
|
|
210
222
|
return (
|
|
211
223
|
home_directory
|
|
212
224
|
/ CLAUDE_CONFIG_DIRECTORY_NAME
|
|
213
|
-
/
|
|
214
|
-
/
|
|
215
|
-
/
|
|
216
|
-
/
|
|
225
|
+
/ USAGE_PROBE_SHARED_DIRECTORY_NAME
|
|
226
|
+
/ USAGE_PROBE_PACKAGE_DIRECTORY_NAME
|
|
227
|
+
/ USAGE_PROBE_SCRIPTS_DIRECTORY_NAME
|
|
228
|
+
/ USAGE_PROBE_FILENAME
|
|
217
229
|
)
|
|
218
230
|
|
|
219
231
|
|
|
@@ -14,6 +14,10 @@ CODEX_EXEC_SUBCOMMAND: str = "exec"
|
|
|
14
14
|
CODEX_RESUME_SUBCOMMAND: str = "resume"
|
|
15
15
|
CODEX_SANDBOX_FLAG: str = "--sandbox"
|
|
16
16
|
CLAUDE_CONFIG_DIRECTORY_NAME: str = ".claude"
|
|
17
|
+
USAGE_PROBE_SHARED_DIRECTORY_NAME: str = "_shared"
|
|
18
|
+
USAGE_PROBE_PACKAGE_DIRECTORY_NAME: str = "pr-loop"
|
|
19
|
+
USAGE_PROBE_SCRIPTS_DIRECTORY_NAME: str = "scripts"
|
|
20
|
+
USAGE_PROBE_FILENAME: str = "codex_usage_probe.py"
|
|
17
21
|
SOL_SESSION_ID_METAVAR: str = "SESSION_ID"
|
|
18
22
|
SOL_CODEX_TIMEOUT_SECONDS: float = 120.0
|
|
19
23
|
SOL_USAGE_PROBE_TIMEOUT_SECONDS: float = 30.0
|
|
@@ -31,9 +31,8 @@ def _load_sol_module() -> ModuleType:
|
|
|
31
31
|
sol_advisor = _load_sol_module()
|
|
32
32
|
SCRIPTS_ROOT = Path(__file__).parent.parent
|
|
33
33
|
USAGE_PROBE_PATH = (
|
|
34
|
-
SCRIPTS_ROOT.parents[
|
|
35
|
-
/ "
|
|
36
|
-
/ "codex-review"
|
|
34
|
+
SCRIPTS_ROOT.parents[1]
|
|
35
|
+
/ "pr-loop"
|
|
37
36
|
/ "scripts"
|
|
38
37
|
/ "codex_usage_probe.py"
|
|
39
38
|
)
|
|
@@ -134,8 +133,8 @@ def test_resolve_usage_probe_path_uses_supplied_home_directory(tmp_path: Path) -
|
|
|
134
133
|
assert probe_path == (
|
|
135
134
|
tmp_path
|
|
136
135
|
/ ".claude"
|
|
137
|
-
/ "
|
|
138
|
-
/ "
|
|
136
|
+
/ "_shared"
|
|
137
|
+
/ "pr-loop"
|
|
139
138
|
/ "scripts"
|
|
140
139
|
/ "codex_usage_probe.py"
|
|
141
140
|
)
|