claude-dev-env 2.2.1 → 2.3.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.
- package/_shared/advisor/advisor-protocol.md +2 -2
- package/_shared/pr-loop/scripts/CLAUDE.md +1 -0
- package/_shared/pr-loop/scripts/grant_project_claude_permissions.py +306 -284
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -0
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/claude_permissions_constants.py +3 -3
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/stale_worktree_rule_sweep_constants.py +107 -0
- package/_shared/pr-loop/scripts/revoke_project_claude_permissions.py +5 -0
- package/_shared/pr-loop/scripts/stale_worktree_rule_sweep.py +107 -0
- package/_shared/pr-loop/scripts/tests/CLAUDE.md +2 -0
- package/_shared/pr-loop/scripts/tests/test_agent_config_carveout.py +55 -73
- package/_shared/pr-loop/scripts/tests/test_claude_permissions_constants.py +9 -15
- package/_shared/pr-loop/scripts/tests/test_grant_project_claude_permissions.py +91 -1
- package/_shared/pr-loop/scripts/tests/test_revoke_project_claude_permissions.py +88 -1
- package/_shared/pr-loop/scripts/tests/test_stale_worktree_rule_sweep.py +301 -0
- package/_shared/pr-loop/scripts/tests/test_stale_worktree_rule_sweep_constants.py +85 -0
- package/_shared/pr-loop/worker-spawn.md +1 -1
- package/agents/code-verifier.md +1 -1
- package/hooks/blocking/config/verified_commit_constants.py +11 -0
- package/hooks/blocking/test_code_verifier_tools_contract.py +28 -0
- package/hooks/blocking/test_verification_verdict_store.py +93 -0
- package/hooks/blocking/verification_verdict_store.py +91 -0
- package/package.json +1 -1
- package/scripts/CLAUDE.md +2 -1
- package/scripts/claude-chain.example.json +15 -3
- package/scripts/claude_chain_runner.py +130 -27
- package/scripts/claude_chain_usage.py +346 -0
- package/scripts/dev_env_scripts_constants/CLAUDE.md +4 -3
- package/scripts/dev_env_scripts_constants/claude_chain_constants.py +13 -1
- package/scripts/dev_env_scripts_constants/claude_chain_usage_constants.py +58 -0
- package/scripts/dev_env_scripts_constants/code_review_constants.py +1 -1
- package/scripts/dev_env_scripts_constants/timing.py +1 -1
- package/scripts/test_claude_chain_runner.py +412 -6
- package/scripts/test_claude_chain_usage.py +534 -0
- package/skills/orchestrator/SKILL.md +1 -20
- package/skills/orchestrator-refresh/SKILL.md +1 -1
- package/skills/pr-converge/SKILL.md +3 -3
- package/skills/pr-converge/reference/examples.md +3 -3
- package/skills/pr-converge/reference/fix-protocol.md +1 -1
- package/skills/pr-converge/reference/ground-rules.md +3 -3
- package/skills/pr-converge/reference/per-tick.md +5 -5
- package/skills/pr-converge/reference/progress-checklist.md +1 -1
- package/skills/pr-converge/test_step5_host_branch.py +1 -1
- package/skills/team-advisor/SKILL.md +3 -2
|
@@ -71,7 +71,7 @@ Capture `number`, `head.sha` (= `current_head`), owner/repo, branch.
|
|
|
71
71
|
|
|
72
72
|
The **PR worktree** is the local working tree of the PR's repo on its head
|
|
73
73
|
branch. Every local operation this tick runs there: the CODE_REVIEW static sweep
|
|
74
|
-
and `/code-review
|
|
74
|
+
and `/code-review xhigh --fix`, every `clean-coder` fix spawn, and every commit and
|
|
75
75
|
push. `/code-review` and `git` both act on the repo of the current working
|
|
76
76
|
directory, so the working directory must be the PR worktree before any local
|
|
77
77
|
work begins. Re-resolve it every tick — a rebase or a fresh HEAD can move the
|
|
@@ -180,7 +180,7 @@ CODE_REVIEW.
|
|
|
180
180
|
### `phase == CODE_REVIEW`
|
|
181
181
|
|
|
182
182
|
The entry phase of every convergence tick, re-entered after any fix push. It runs
|
|
183
|
-
a deterministic static sweep, then the built-in `/code-review
|
|
183
|
+
a deterministic static sweep, then the built-in `/code-review xhigh --fix` on the
|
|
184
184
|
full `origin/main...HEAD` diff at effort high on model opus. `/code-review`
|
|
185
185
|
produces no GitHub review artifact, so there are no code-review threads to
|
|
186
186
|
resolve.
|
|
@@ -196,7 +196,7 @@ a. **Static sweep — runs first, before `/code-review`.** Run the deterministic
|
|
|
196
196
|
`phase = CODE_REVIEW`, and re-run the sweep. When the sweep is clean, run
|
|
197
197
|
the host-aware review below.
|
|
198
198
|
|
|
199
|
-
b. Run the built-in `/code-review
|
|
199
|
+
b. Run the built-in `/code-review xhigh --fix` with OPUS on the FULL `origin/main...HEAD`
|
|
200
200
|
diff — every file the PR touches — via the
|
|
201
201
|
[local diff review](https://code.claude.com/docs/en/code-review#review-a-diff-locally).
|
|
202
202
|
The review always runs at effort high on model opus. It reviews the diff and
|
|
@@ -231,14 +231,14 @@ b. Run the built-in `/code-review high --fix` on the FULL `origin/main...HEAD`
|
|
|
231
231
|
Match the first mode whose predicate holds:
|
|
232
232
|
|
|
233
233
|
- **`mode == "in_session"`** (Claude host and session model is opus): run
|
|
234
|
-
`/code-review
|
|
234
|
+
`/code-review xhigh --fix` with OPUS in this session with no path arguments so it
|
|
235
235
|
audits the whole branch diff against `origin/main`. After it returns, a
|
|
236
236
|
non-empty `git status --porcelain` means fixes applied (`dirty_tree`
|
|
237
237
|
equivalent). Treat a failed in-session slash command the same as a failed
|
|
238
238
|
review: do not set `code_review_clean_at`.
|
|
239
239
|
- **`mode == "chain"`** (any other host, or a Claude session on any model
|
|
240
240
|
other than opus): the helper already ran the headless review
|
|
241
|
-
(`claude -p "/code-review
|
|
241
|
+
(`claude -p "/code-review xhigh --fix" --model opus` through the chain
|
|
242
242
|
runner) with cwd set to the PR worktree. Read `returncode`,
|
|
243
243
|
`served_command`, and `dirty_tree` from the JSON. A successful serve is
|
|
244
244
|
`returncode == 0` with a non-null `served_command`. `dirty_tree` true
|
|
@@ -91,7 +91,7 @@ round as converged. This rule holds every tick, every loop, every PR.
|
|
|
91
91
|
- [ ] **Static sweep fails** → apply shared fix protocol → push → reset markers
|
|
92
92
|
→ stay CODE_REVIEW → Step 5
|
|
93
93
|
- [ ] **`mode == in_session`** (Claude host, session model opus) → run
|
|
94
|
-
`/code-review
|
|
94
|
+
`/code-review xhigh --fix` in-session (no path args)
|
|
95
95
|
- [ ] **`mode == chain`** (any other host or non-opus session) → helper
|
|
96
96
|
already ran the headless review; read `returncode`,
|
|
97
97
|
`served_command`, and `dirty_tree` from JSON
|
|
@@ -32,7 +32,7 @@ NEVER_PUSHES_PHRASE = "never pushes"
|
|
|
32
32
|
EMPTY_STDIN_PHRASE = "empty"
|
|
33
33
|
CWD_FLAG = "--cwd"
|
|
34
34
|
OPUS_MODEL = "opus"
|
|
35
|
-
HIGH_EFFORT_SLASH = "/code-review
|
|
35
|
+
HIGH_EFFORT_SLASH = "/code-review xhigh --fix"
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def _read_markdown(markdown_path: Path) -> str:
|
|
@@ -30,8 +30,9 @@ the only consumer (skip the "who you are and your assignment" opener in each
|
|
|
30
30
|
consult; a single-consumer session doesn't need it).
|
|
31
31
|
|
|
32
32
|
**Third-party host:** bind a max-tier Claude advisor through the shared CLI Claude-chain
|
|
33
|
-
in the protocol (Fable max, then Opus max; `claude_chain_runner.py`
|
|
34
|
-
`~/.claude/claude-chain.json`
|
|
33
|
+
in the protocol (Fable max, then Opus max; `claude_chain_runner.py` ranks
|
|
34
|
+
`~/.claude/claude-chain.json` accounts by weekly remaining via `claude_chain_usage`
|
|
35
|
+
and fails over on usage limits). Consult via
|
|
35
36
|
`--resume <session_id>` on that bind. This session is the sole consumer of that
|
|
36
37
|
CLI advisor; skip the multi-consumer opener. When the chain cannot bind or
|
|
37
38
|
reply, fail closed and report to the user — do **not** answer ENDORSE /
|