claude-dev-env 8.40.1 → 8.42.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 (42) hide show
  1. package/.agents/agents/test_agent_frontmatter.py +17 -14
  2. package/.agents/agents-archived/clean-coder.md +4 -4
  3. package/.agents/agents-archived/pr-description-writer.md +1 -1
  4. package/.agents/skills/pr-lifecycle/SKILL.md +470 -0
  5. package/.agents/skills/privacy-hygiene/reference/sweep-procedure.md +1 -1
  6. package/bin/ever-shipped-skills.mjs +1 -0
  7. package/bin/ever-shipped-skills.test.mjs +4 -0
  8. package/bin/install.cursor-rules.test.mjs +2 -1
  9. package/docs/rule-guides/code-standards.md +1 -1
  10. package/docs/rule-guides/destructive-commands.md +1 -1
  11. package/hooks/blocking/pr_lifecycle_skill_gate.py +190 -0
  12. package/hooks/blocking/test_pr_lifecycle_skill_gate.py +163 -0
  13. package/hooks/hooks.json +25 -0
  14. package/hooks/hooks_constants/pr_lifecycle_skill_gate_constants.py +33 -0
  15. package/hooks/hooks_constants/skill_loaded_reminder_constants.py +0 -10
  16. package/hooks/hooks_constants/spawn_readiness_hook_constants.py +30 -12
  17. package/hooks/hooks_constants/test_pr_lifecycle_skill_gate_constants.py +12 -0
  18. package/hooks/hooks_constants/test_transcript_skill_scan_constants.py +7 -0
  19. package/hooks/hooks_constants/transcript_skill_scan_constants.py +7 -0
  20. package/hooks/routing/spawn_readiness_hook.py +118 -46
  21. package/hooks/routing/test_spawn_readiness_hook.py +113 -21
  22. package/hooks/routing/test_spawn_readiness_steps.py +2 -4
  23. package/hooks/session/skill_loaded_reminder.py +4 -51
  24. package/hooks/session/test_skill_loaded_reminder.py +4 -0
  25. package/hooks/test_transcript_skill_scan.py +58 -0
  26. package/hooks/transcript_skill_scan.py +93 -0
  27. package/package.json +1 -1
  28. package/rules/flag-non-breaking-findings.md +2 -2
  29. package/rules/shell-invocation.md +2 -14
  30. package/rules/skill-pointers.md +3 -0
  31. package/scripts/policy_lint/adapter_configuration.py +5 -0
  32. package/scripts/policy_lint/config/constants.py +1 -0
  33. package/scripts/tests/test_adapter_configuration.py +8 -0
  34. package/scripts/tests/test_banned_prose_words.py +1 -1
  35. package/scripts/tests/test_rule_load_scopes.py +1 -7
  36. package/rules/agent-merges-its-own-green-pull-request.md +0 -55
  37. package/rules/ci-owns-the-gate.md +0 -101
  38. package/rules/durable-post-artifacts.md +0 -76
  39. package/rules/gh-cli-conventions.md +0 -36
  40. package/rules/git-workflow.md +0 -121
  41. package/rules/re-stage-before-commit.md +0 -14
  42. package/rules/review-closure-is-a-check.md +0 -54
@@ -1,54 +0,0 @@
1
- # Review Closure Is a Check
2
-
3
- **When this applies:** Any pull request an agent drives, from the first review comment on it to the merge.
4
-
5
- ## Rule
6
-
7
- A review finding on the head is answered before the pull request merges. The agent driving it replies, pushes the fix, or both. The check named `Review closure` reads that state on every push, on every review event, and on every top-level comment, and reports red while a finding waits.
8
-
9
- One command prints the same verdict:
10
-
11
- ```
12
- python packages/claude-dev-env/scripts/review_closure.py <owner>/<name> <number>
13
- ```
14
-
15
- It prints `CLOSED` and exits 0 when every finding on the head is answered. It prints `OPEN`, one line per waiting finding, and exits 1. It exits 2 when the state could not be read.
16
-
17
- ## What closes a finding
18
-
19
- | The thread | Closed by |
20
- |---|---|
21
- | A review comment on code | A push that replaced the code it points at |
22
- | A review comment on code | A reply from the account driving the pull request |
23
- | A review comment on code | Resolution, where the comment carries no red circle |
24
- | A red-circle finding | A reply from the driving account, or a push that replaced the code |
25
- | A thread the driving account opened | Itself |
26
- | A blocking `Claude Approvals` row | A push, which moves the head the check reports on |
27
- | A top-level comment on the pull request | A later top-level comment from the driving account |
28
- | A bot notice: a review-skipped note, a pointer to an updated summary, a Graphite verdict mirror, a Qodo change summary, a Qodo in-progress placeholder, or a Qodo review that found no issues | Itself |
29
-
30
- A review bot rewrites its summary comment on each pass. Its edit leaves an answered summary closed, because each new finding it has arrives as a review thread or a new comment. An edit from a person reopens the comment.
31
-
32
- A red circle marks a finding a review states as blocking, so resolution in silence leaves it open. The reply says what changed or why the finding stands, and the reviewer reads it beside the diff.
33
-
34
- The driving account is the one that opened the pull request. Where the agent comments under a second login, `--driver-login <login>` names it, repeatably.
35
-
36
- A repository whose review bots post notices this package does not know passes each one's marker text with `--notice-marker <text>`, repeatably. A bot comment carrying that text closes itself, like the built-in notices above.
37
-
38
- ## Where the check runs
39
-
40
- `.github/workflows/review-closure.yml` runs it here on a push to a pull request, on a submitted or dismissed review, on a review comment, and on a top-level comment posted or edited on a pull request. Each run reports on the pull request's head commit, so a finding posted after the last push still turns the check red.
41
-
42
- A top-level comment arrives as an `issue_comment` event, and a run on that event belongs to the default branch commit. The comment job reads the pull request's head, runs the same command, and posts the verdict on that head through the Checks API as a `Review closure` check run. The token belongs to the GitHub Actions app, so that check run carries the same name and app as the pull request job's own, and the newest one on the head is the one branch rules read.
43
-
44
- A private repository that installs this package runs the same command from its own workflow, against the revision of this package that its workflow pins.
45
-
46
- A repository that merges through a merge queue also runs the check on `merge_group` and lists `Review closure` as a required check. The queue ref `gh-readonly-queue/<base>/pr-<number>-<sha>` names the pull request number the command takes. A finding posted while an entry waits in the queue then fails the queue build. Without that trigger, the entry merges on the verdict it carried when it joined the queue.
47
-
48
- ## Sibling rules
49
-
50
- | Rule | Role |
51
- |---|---|
52
- | [`agent-merges-its-own-green-pull-request.md`](agent-merges-its-own-green-pull-request.md) | The agent that drives a pull request merges it once its gate passes |
53
- | [`git-workflow.md`](git-workflow.md) | Open ready for review, and confirm each required context fired after the push |
54
- | [`correction-lens.md`](correction-lens.md) | A correction becomes a control at the highest layer that can hold it |