claude-dev-env 8.1.0 → 8.2.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 (78) hide show
  1. package/.agents/agents/clean-coder.md +4 -4
  2. package/.agents/agents/code-quality-agent.md +4 -4
  3. package/.agents/agents/plan-packet-validator.md +2 -2
  4. package/.agents/agents/session-advisor.md +1 -1
  5. package/.agents/skills/cert-classification-rule/SKILL.md +3 -3
  6. package/.agents/skills/e-code-review/SKILL.md +2 -2
  7. package/.agents/skills/e-code-review/reference/fix.md +1 -1
  8. package/.agents/skills/e-code-review/reference/loop.md +1 -1
  9. package/.agents/skills/e-code-review/reference/medium.md +4 -4
  10. package/.agents/skills/e-code-review/reference/xhigh.md +5 -5
  11. package/.agents/skills/everything-search/SKILL.md +3 -3
  12. package/.agents/skills/issue-tracker/SKILL.md +1 -1
  13. package/.agents/skills/orchestrator/SKILL.md +3 -3
  14. package/.agents/skills/orchestrator/reference/consult-the-orchestrator.md +1 -1
  15. package/.agents/skills/orchestrator/reference/executor-consult-block.md +1 -1
  16. package/.agents/skills/orchestrator-refresh/SKILL.md +2 -2
  17. package/.agents/skills/plugin-eval-standalone-skill/SKILL.md +96 -0
  18. package/.agents/skills/plugin-eval-standalone-skill/reference/graders-and-commands.md +108 -0
  19. package/.agents/skills/privacy-hygiene/SKILL.md +5 -6
  20. package/.agents/skills/privacy-hygiene/reference/sweep-procedure.md +5 -6
  21. package/.agents/skills/repairing-hook-boundaries/SKILL.md +1 -1
  22. package/.agents/skills/syncing-submodules/SKILL.md +1 -1
  23. package/.agents/skills/team-advisor/SKILL.md +9 -7
  24. package/.agents/skills/team-advisor/reference/advisor-docs-review.md +28 -1
  25. package/.agents/skills/usage-pause/SKILL.md +3 -3
  26. package/_shared/advisor/advisor-protocol.md +7 -3
  27. package/_shared/advisor/reference/advisor-block.md +8 -1
  28. package/audit-rubrics/category_rubrics/category-f-silent-failures.md +2 -2
  29. package/audit-rubrics/category_rubrics/category-i-concurrency.md +1 -1
  30. package/audit-rubrics/category_rubrics/category-m-producer-consumer-cardinality.md +1 -1
  31. package/audit-rubrics/category_rubrics/category-n-test-name-scenario-verifier.md +5 -5
  32. package/audit-rubrics/category_rubrics/category-o-docstring-vs-impl-drift.md +5 -5
  33. package/audit-rubrics/category_rubrics/category-p-name-vs-behavior-contract.md +3 -3
  34. package/audit-rubrics/category_rubrics/category-q-cross-surface-claims.md +1 -1
  35. package/audit-rubrics/prompts/category-a-api-contracts.md +2 -2
  36. package/audit-rubrics/prompts/category-b-selector-engine-compat.md +3 -3
  37. package/audit-rubrics/prompts/category-c-resource-cleanup.md +3 -3
  38. package/audit-rubrics/prompts/category-d-scoping-and-ordering.md +1 -1
  39. package/audit-rubrics/prompts/category-e-dead-code.md +3 -3
  40. package/audit-rubrics/prompts/category-f-silent-failures.md +12 -12
  41. package/audit-rubrics/prompts/category-g-bounds-and-overflow.md +2 -2
  42. package/audit-rubrics/prompts/category-h-security-boundaries.md +4 -4
  43. package/audit-rubrics/prompts/category-i-concurrency.md +6 -6
  44. package/audit-rubrics/prompts/category-j-code-rules-compliance.md +5 -5
  45. package/audit-rubrics/prompts/category-m-producer-consumer-cardinality.md +1 -1
  46. package/audit-rubrics/prompts/category-n-test-name-scenario-verifier.md +7 -7
  47. package/audit-rubrics/prompts/category-o-docstring-vs-impl-drift.md +2 -2
  48. package/audit-rubrics/prompts/category-p-name-vs-behavior-contract.md +3 -3
  49. package/audit-rubrics/prompts/category-q-cross-surface-claims.md +2 -2
  50. package/bin/ever-shipped-skills.mjs +1 -0
  51. package/bin/ever-shipped-skills.test.mjs +4 -0
  52. package/docs/BDD_SCENARIO_QUALITY.md +2 -2
  53. package/docs/CODE_RULES.md +7 -7
  54. package/docs/TEST_QUALITY.md +1 -1
  55. package/docs/nas-ssh-invocation.md +1 -1
  56. package/docs/references/advisor-tool.md +2 -2
  57. package/docs/references/prose-style-enforcement.md +1 -1
  58. package/docs/references/team-advisor-skill.md +2 -2
  59. package/docs/references/weak-executor-advisor.md +1 -1
  60. package/hooks/blocking/test_code_rules_enforcer_magic_allowlist.py +1 -1
  61. package/package.json +1 -1
  62. package/rules/archiving-agent-config.md +5 -8
  63. package/rules/long-horizon-autonomy.md +1 -1
  64. package/scripts/active_capability_references.py +74 -19
  65. package/scripts/banned_prose_words.py +159 -0
  66. package/scripts/dev_env_scripts_constants/active_capability_constants.py +12 -10
  67. package/scripts/dev_env_scripts_constants/banned_prose_word_constants.py +95 -0
  68. package/scripts/policy_lint/adapter_retired_hook_prose.py +17 -7
  69. package/scripts/policy_lint/adapters.py +6 -6
  70. package/scripts/policy_lint/config/constants.py +8 -0
  71. package/scripts/policy_lint/registry.py +1 -1
  72. package/scripts/sync_to_cursor/rules.py +1 -1
  73. package/scripts/test_active_capability_references.py +100 -33
  74. package/scripts/tests/test_banned_prose_words.py +103 -0
  75. package/scripts/tests/test_engine.py +1 -1
  76. package/scripts/tests/test_policy_lint_rules_retired_hook_prose.py +46 -0
  77. package/scripts/tests/test_rules.py +12 -1
  78. package/system-prompts/software-engineer.xml +7 -7
@@ -79,7 +79,7 @@ Load only the group that matches the task. Keep session policy details in these
79
79
 
80
80
  Material implementation questions must return to the caller for `AskUserQuestion` handling; do not ask in plain text or guess.
81
81
 
82
- Type-ignore rule (AGENTS Types): avoid `# type: ignore`; remove it and use a typed boundary or real type.
82
+ Type-ignore rule (AGENTS Types): avoid `# type: ignore`; remove it and use a typed boundary or type.
83
83
 
84
84
  Constants (AGENTS Magic values): use named constants from the target layout. Search its constants module first. Do not force a generic `config/` layout. Example:
85
85
 
@@ -101,7 +101,7 @@ def fetch_with_retries(fetch_text: Callable[[str], str], url: str) -> str:
101
101
  - **No secrets in context.** Never open `.env` / `.env.*` / credential files. The sensitive-file protector blocks editing them.
102
102
  - **No lock-file hand edits.** Do not edit lock files by hand; regenerate with the package manager.
103
103
  - **No unasked scratch files.** Follow the target repo's policy for scratch, planning, and image files. Do not create temporary scratch files or working docs. Keep valid plan packets under `docs/plans/` as uncommitted working files when the task calls for them. Store required images in the durable artifacts release, not the repository tree.
104
- - **Pre-check before Write.** Run `python <managed-root>/hooks/blocking/code_rules_enforcer.py --check <candidate> --as <real destination>` (install path; monorepo: `packages/claude-dev-env/hooks/blocking/code_rules_enforcer.py`) until clean, then Write/Edit once. Use the real `--as` path; a wrong path can hide violations. This is the mechanical CODE_RULES check; it does not run tests, ruff, mypy, or the full quality gate.
104
+ - **Pre-check before Write.** Run `python <managed-root>/hooks/blocking/code_rules_enforcer.py --check <candidate> --as <destination>` (install path; monorepo: `packages/claude-dev-env/hooks/blocking/code_rules_enforcer.py`) until clean, then Write/Edit once. Use the `--as` path; a wrong path can hide violations. This is the mechanical CODE_RULES check; it does not run tests, ruff, mypy, or the full quality gate.
105
105
  - **Candidate check vs full gate.** The pre-check tests CODE_RULES only. The full project gate runs over the complete diff and all required checks. `code_rules_enforcer.py --check` checks one candidate file before a write; a clean candidate enforcer check is not the full gate.
106
106
  - **Windows shell.** Author multi-line scripts with the Write or PowerShell tool; avoid bash heredocs that mangle paths.
107
107
  - **`gh` bodies.** Always `--body-file`; never use `--body` or `-b` with markdown.
@@ -113,7 +113,7 @@ def fetch_with_retries(fetch_text: Callable[[str], str], url: str) -> str:
113
113
 
114
114
  Every behavior change follows Red-Green-Refactor:
115
115
 
116
- 1. **RED** — write a failing test first against the real production path, with real data; run it red and keep the failure as evidence.
116
+ 1. **RED** — write a failing test first against the production path, with production data; run it red and keep the failure as evidence.
117
117
  2. **GREEN** — write the minimum production change, then run the focused test.
118
118
  3. **REFACTOR** — change structure only after GREEN, then run the focused test again.
119
119
 
@@ -121,7 +121,7 @@ Do not write production behavior before RED, skip the red run, or call a green t
121
121
 
122
122
  ## Hook-specific workflow
123
123
 
124
- For a hook change, use the target package's active managed root for installed files, not the current working directory. The default is `~/.claude`; `--target` or `CLAUDE_CONFIG_DIR` selects another managed root. Read `<managed-root>/hooks/AGENTS.md` (default: `~/.claude/hooks/AGENTS.md`; source fallback: `packages/claude-dev-env/hooks/AGENTS.md`), each closer `AGENTS.md` and `CLAUDE.md`, and the registered hook entry before editing. Trace the lifecycle event, stdin JSON, output contract, exit code, and registration. Reuse the target hook area's constants package. Run `<managed-root>/scripts/check.ps1` (default: `~/.claude/scripts/check.ps1`; source fallback: `packages/claude-dev-env/scripts/check.ps1`) and drive the real production entry point with event payloads. The RED test covers each allow and deny outcome. Run every applicable test file and suite for the hook, then the full quality gates required by the affected package.
124
+ For a hook change, use the target package's active managed root for installed files, not the current working directory. The default is `~/.claude`; `--target` or `CLAUDE_CONFIG_DIR` selects another managed root. Read `<managed-root>/hooks/AGENTS.md` (default: `~/.claude/hooks/AGENTS.md`; source fallback: `packages/claude-dev-env/hooks/AGENTS.md`), each closer `AGENTS.md` and `CLAUDE.md`, and the registered hook entry before editing. Trace the lifecycle event, stdin JSON, output contract, exit code, and registration. Reuse the target hook area's constants package. Run `<managed-root>/scripts/check.ps1` (default: `~/.claude/scripts/check.ps1`; source fallback: `packages/claude-dev-env/scripts/check.ps1`) and drive the production entry point with event payloads. The RED test covers each allow and deny outcome. Run every applicable test file and suite for the hook, then the full quality gates required by the affected package.
125
125
 
126
126
  ## Session advisor
127
127
 
@@ -127,7 +127,7 @@ evidence, report an evidence gap or open question.
127
127
 
128
128
  `id` uses the form `loop<N>-<K>` when the orchestrator supplies a loop prefix and `find<K>` for standalone audit calls. Honor the prefix supplied in the prompt.
129
129
 
130
- **The `failure_mode` field is the audit-to-fix handoff.** State the failing line, the desired post-fix property, and a one-line validation the fix agent can run to confirm correctness. The fix agent reads `failure_mode` without re-running your audit — make it self-sufficient.
130
+ **The `failure_mode` field is the audit-to-fix handoff.** State the failing line, the desired post-fix property, and a one-line validation the fix agent can run to confirm correctness. The fix agent reads `failure_mode` without re-running your audit — make it stand on its own.
131
131
 
132
132
  Each audit→fix→audit cycle in the calling skill adds wall-clock latency. A vague `failure_mode` forces another cycle to clarify; a precise `failure_mode` lets the fix land in one cycle. Word choice in this field directly controls how many cycles the loop takes.
133
133
 
@@ -165,9 +165,9 @@ not a Shape B entry.
165
165
 
166
166
  ## Collection before filtering
167
167
 
168
- Report every real finding at its true severity. Collection retains P0, P1, and
168
+ Report every finding at the severity it warrants. Collection retains P0, P1, and
169
169
  P2 findings with file, line, evidence (`excerpt` / `failure_mode`), and
170
- category. Do not drop lower-severity real findings during collection so a later
170
+ category. Do not drop lower-severity findings during collection so a later
171
171
  consumer can filter. Severity or action filtering is a separate stage after the
172
172
  collection record is complete.
173
173
 
@@ -197,7 +197,7 @@ When the primary and adversarial passes flag the same file:line:
197
197
 
198
198
  - Merge into a single Shape A finding using max-wins severity (P0 > P1 > P2).
199
199
  - Concatenate the `failure_mode` strings (separator: " // adversarial: ") so both pass narratives survive.
200
- - For Shape B entries on the same category, keep every distinct `adversarial_probe` from both passes — collapsing them would drop information that was actually found.
200
+ - For Shape B entries on the same category, keep every distinct `adversarial_probe` from both passes — collapsing them would drop information that was found.
201
201
 
202
202
  The merge runs at the end of the adversarial pass, before constructing the output. The output preamble's `Total: N` counts merged findings, not pre-merge total.
203
203
 
@@ -20,7 +20,7 @@ You validate plan packets. You are not the planner and you do not repair docs.
20
20
  1. Read `README.md`, `packet.json`, `context/source-map.md`, `implementation/steps.md`, `implementation/tdd-plan.md`, `spec/acceptance.md`, and `handoff/build-prompt.md`.
21
21
  2. Read or search the source files named in `source-map.md` and `packet.json`.
22
22
  3. Verify referenced paths exist unless the packet clearly labels them as new files.
23
- 4. Verify source facts match actual files.
23
+ 4. Verify source facts match the files.
24
24
  5. Verify the implementation steps are enough for a blind build agent.
25
25
  6. Verify the TDD sequence starts with failing tests and names the behavior those tests prove.
26
26
  7. Verify scope matches the user request and non-goals.
@@ -30,4 +30,4 @@ You validate plan packets. You are not the planner and you do not repair docs.
30
30
 
31
31
  ## Output
32
32
 
33
- Return the requested structured schema. Set `allPassed` to true only when every check is clean. Each finding must name the packet file, the check, and the exact source-grounded problem.
33
+ Return the requested structured schema. Set `allPassed` to `true` only when every check is clean. Each finding must name the packet file, the check, and the exact source-grounded problem.
@@ -16,7 +16,7 @@ Many different consumers may reach you over one shared transcript — a coordina
16
16
  Reply with exactly one of four signals, named on the first line:
17
17
 
18
18
  - **ENDORSE** — the plan, or the finished work, holds up, with nothing worth flagging. A clean yes.
19
- - **CORRECTION** — something needs attention before the plan or the finished work is genuinely done: a wrong assumption or step, or a risk worth naming and closing. Name the specific problem(s) and the precise fix(es) or mitigation(s). A risk you would otherwise have mentioned in passing belongs here, not folded into an ENDORSE.
19
+ - **CORRECTION** — something needs attention before the plan or the finished work is done: a wrong assumption or step, or a risk worth naming and closing. Name the specific problem(s) and the precise fix(es) or mitigation(s). A risk you would otherwise have mentioned in passing belongs here, not folded into an ENDORSE.
20
20
  - **PLAN** — the current approach needs to change. Give concrete ordered steps the session can run with its own tools, naming files, commands, and decision points.
21
21
  - **STOP** — no path satisfies the task as assigned (contradictory constraints, missing access, a rule that forbids every way through). Say why, and report your reasoning with cited proof and examples.
22
22
 
@@ -135,7 +135,7 @@ truthful note, because it becomes the pasted sentence for those classes.
135
135
 
136
136
  Do **not** fabricate a "Samsung confirmed" claim. State only what is true. The shipped Gallery
137
137
  note is true because Samsung Support did confirm that issue; a new pattern for a different
138
- issue must not borrow that wording unless the confirmation actually happened.
138
+ issue must not borrow that wording unless the confirmation happened.
139
139
 
140
140
  ## How to add the paired production-path test
141
141
 
@@ -143,7 +143,7 @@ Every new unfixable pattern gets a paired test in
143
143
  `shared_utils/samsung_utils/tests/test_cert_failure_classifier.py` that drives the production
144
144
  path:
145
145
 
146
- 1. Load the real patterns with `load_unfixable_patterns()` (no path argument, so it reads the
146
+ 1. Load the patterns with `load_unfixable_patterns()` (no path argument, so it reads the
147
147
  shipped config).
148
148
  2. Build the report HTML with the live must-fix title text, run it through
149
149
  `extract_issue_titles`, then `classify_failure`, and assert the result is `unfixable`.
@@ -153,7 +153,7 @@ path:
153
153
 
154
154
  Use the exact title strings Samsung's report produces. The existing
155
155
  `TestClassifyFailure::test_gallery_regex_matches_all_known_variants` shows the shape: a list of
156
- real title variants, each asserted as `unfixable` through `classify_failure`.
156
+ title variants, each asserted as `unfixable` through `classify_failure`.
157
157
 
158
158
  Run the tests from the `shared_utils` directory (its pytest config is anchored there):
159
159
 
@@ -24,7 +24,7 @@ Proposal mode selects the review level and records finding outcomes. The downstr
24
24
  ## Gotchas
25
25
 
26
26
  - **`low` stays single-pass.** No subagents, no full-file reads: one read pass per target item, one findings pass.
27
- - **Collection reports every real finding.** Keep every CONFIRMED or PLAUSIBLE finding at its assigned severity (`blocker`, `high`, `medium`, `low`, `nit`). Do not drop low or nit findings during collection. Severity or action filtering is a separate consumer stage after the collection record is complete (`scripts/finding_pipeline.py`).
27
+ - **Collection reports every finding.** Keep every CONFIRMED or PLAUSIBLE finding at its assigned severity (`blocker`, `high`, `medium`, `low`, `nit`). Do not drop low or nit findings during collection. Severity or action filtering is a separate consumer stage after the collection record is complete (`scripts/finding_pipeline.py`).
28
28
  - **`medium` favors precision, `xhigh` favors recall.** At `medium` (8 angles) assign severity carefully so a later filter can pick maintainer-action findings. At `xhigh` (10 angles plus a gap sweep) a single non-REFUTED vote carries the finding; do not drop on uncertainty.
29
29
  - **Every retained finding carries `severity` and `verdict`.** Severity is one of `blocker`, `high`, `medium`, `low`, `nit`. Verdict is `CONFIRMED` or `PLAUSIBLE`. Drop REFUTED candidates only; never emit an unclassified retained finding.
30
30
  - **`--fix` applies findings once.** Load `reference/fix.md` and follow it. That file owns the fix agent, the code-rules gate, skip logging, and outcome reporting. Commits are lead-owned; fix agents never commit or push.
@@ -74,7 +74,7 @@ Detail: `reference/effort-evaluation.md`.
74
74
  | `reference/preflight-proposal.md` | Isolated local review, immutable SHAs, proposal evidence, and mutation boundary |
75
75
  | `reference/effort-evaluation.md` | Effort evaluation fixtures, evidence, and skill defaults |
76
76
  | `reference/runner-selection.md` | Runner selection map |
77
- | `scripts/finding_pipeline.py` | Collect every real finding; filter severity only later |
77
+ | `scripts/finding_pipeline.py` | Collect every finding; filter severity only later |
78
78
  | `scripts/test_finding_pipeline.py` | Collection and filter-stage behavioral tests |
79
79
  | `scripts/e_code_review_scripts_constants/finding_pipeline_constants.py` | Named constants for the collect-then-filter pipeline |
80
80
  | `scripts/effort_evaluation.py` | Effort rows, recommendation, skill default resolver |
@@ -66,7 +66,7 @@ After fixes land, report the same findings list again through the structured
66
66
  findings-report call, the call that renders this review's results as a typed
67
67
  list in the host UI, with each finding now carrying an `outcome`:
68
68
  `fixed`, `no_change_needed` (the finding was wrong or already handled), or
69
- `skipped` (real but not applied). Do not repeat the findings as text in the
69
+ `skipped` (the finding stands but no fix was applied). Do not repeat the findings as text in the
70
70
  response body; the structured call is the record the host UI reads, and the
71
71
  batched skip list from above goes in the prose that follows it.
72
72
 
@@ -183,7 +183,7 @@ round's progress report. Then take the one case that matches the round's
183
183
  findings.
184
184
 
185
185
  - Any bug-severity finding: validate each bug with an advisor before touching
186
- code. Confirm it's real and confirm the intended fix, then fix every
186
+ code. Confirm the bug exists and confirm the intended fix, then fix every
187
187
  validated bug and every nit on the review target. A refuted bug removes only
188
188
  itself from the round's work; the nits are fixed either way.
189
189
  - Nits only, with at least one nit present: fix all of them on the review
@@ -2,7 +2,7 @@
2
2
 
3
3
  You are reviewing for **precision** at medium effort: assign severity carefully
4
4
  so a later consumer can select maintainer-action findings. **Collection
5
- reports every real finding** (including `low` and `nit`); do not drop by
5
+ reports every finding** (including `low` and `nit`); do not drop by
6
6
  severity during collection. Severity filtering is a separate consumer stage
7
7
  after the collection record is complete.
8
8
 
@@ -44,7 +44,7 @@ wrong-variable copy-paste, error swallowed in catch, unescaped regex metachars.
44
44
  For every line the diff DELETES or replaces, name the invariant or behavior it
45
45
  enforced, then search the new code for where that invariant is re-established.
46
46
  If you can't find it, that's a candidate: a removed guard, a dropped error
47
- path, a narrowed validation, a deleted test that was covering a real case.
47
+ path, a narrowed validation, a deleted test that was covering a case.
48
48
 
49
49
  ### Angle C — cross-file tracer
50
50
 
@@ -115,7 +115,7 @@ file(s), and the candidate, and have it return exactly one of:
115
115
 
116
116
  - **CONFIRMED** — can name the inputs/state that trigger it and the wrong
117
117
  output or crash. Quote the line.
118
- - **PLAUSIBLE** — mechanism is real, trigger is uncertain (timing, env,
118
+ - **PLAUSIBLE** — mechanism is present in the code, trigger is uncertain (timing, env,
119
119
  config). State what would confirm it.
120
120
  - **REFUTED** — factually wrong (code doesn't say that) or guarded elsewhere.
121
121
  Quote the line that proves it.
@@ -126,7 +126,7 @@ Keep candidates where the vote is CONFIRMED or PLAUSIBLE.
126
126
 
127
127
  **Collection stage first.** Keep every CONFIRMED or PLAUSIBLE finding in the
128
128
  collection record, including `low` and `nit`. Drop only REFUTED candidates.
129
- Do not drop a real finding because its severity is low.
129
+ Do not drop a finding because its severity is low.
130
130
 
131
131
  Report this review's results — `{level, findings}` — through the structured
132
132
  findings-report call: the mechanism that renders a review's results as a typed
@@ -1,7 +1,7 @@
1
1
  `xhigh effort → 5+5 angles → 1-vote verify → sweep`
2
2
 
3
- You are reviewing for **recall** at extra-high effort: catch every real bug. At
4
- this level, catching real bugs matters more than avoiding false positives — a
3
+ You are reviewing for **recall** at extra-high effort: catch every bug. At
4
+ this level, catching bugs matters more than avoiding false positives — a
5
5
  missed bug ships. Err on the side of surfacing.
6
6
 
7
7
  ## Phase 0 — Gather the diff
@@ -42,7 +42,7 @@ wrong-variable copy-paste, error swallowed in catch, unescaped regex metachars.
42
42
  For every line the diff DELETES or replaces, name the invariant or behavior it
43
43
  enforced, then search the new code for where that invariant is re-established.
44
44
  If you can't find it, that's a candidate: a removed guard, a dropped error
45
- path, a narrowed validation, a deleted test that was covering a real case.
45
+ path, a narrowed validation, a deleted test that was covering a case.
46
46
 
47
47
  ### Angle C — cross-file tracer
48
48
 
@@ -65,7 +65,7 @@ adapter): check that every method routes to the wrapped instance and not back
65
65
  through a registry/session/global — e.g. a caching provider holding a
66
66
  `delegate` field that resolves IDs via `session.get(...)` instead of
67
67
  `delegate.get(...)` will re-enter the cache or recurse. Also check that the
68
- wrapper forwards all the methods the callers actually use.
68
+ wrapper forwards all the methods the callers use.
69
69
 
70
70
  ### Reuse
71
71
 
@@ -125,7 +125,7 @@ file(s), and the candidate, and have it return exactly one of:
125
125
 
126
126
  - **CONFIRMED** — can name the inputs/state that trigger it and the wrong
127
127
  output or crash. Quote the line.
128
- - **PLAUSIBLE** — mechanism is real, trigger is uncertain (timing, env,
128
+ - **PLAUSIBLE** — mechanism is present in the code, trigger is uncertain (timing, env,
129
129
  config). State what would confirm it.
130
130
  - **REFUTED** — factually wrong (code doesn't say that) or guarded elsewhere.
131
131
  Quote the line that proves it.
@@ -152,16 +152,16 @@ Run separate searches for each extension type:
152
152
 
153
153
  ### Junctions, Symlinks & Drive Mapping
154
154
 
155
- Everything indexes REAL paths only, not junctions or mapped drives.
155
+ Everything indexes paths only, not junctions or mapped drives.
156
156
 
157
157
  | Drive | Type | Indexed? | Action |
158
158
  |-------|------|----------|--------|
159
- | Y:\ | Real NTFS | Yes | Use this path |
159
+ | Y:\ | NTFS | Yes | Use this path |
160
160
  | Z:\ | Junction to Y: | No | Use Y:\ instead |
161
161
 
162
162
  **If search returns empty:**
163
163
  1. Check if the path is a junction/symlink
164
- 2. Find the real path and search that instead
164
+ 2. Find the path the junction targets and search that instead
165
165
  3. Or use Glob tool as fallback (works on any path)
166
166
 
167
167
  **Common drive mappings:**
@@ -79,7 +79,7 @@ GitHub closes the sub-issue when someone **merges** a pull request into the **de
79
79
 
80
80
  **Preferred on commits:** also put `Closes #N` in the first commit message when the fix starts. Commit alone is backup; the PR body is the contract.
81
81
 
82
- **Stacked / intermediate PRs** that do not merge into the default branch: use a plain `#N` reference in the body so the issue links without a false close promise. Put `Closes #N` only on the PR that actually lands on the default branch.
82
+ **Stacked / intermediate PRs** that do not merge into the default branch: use a plain `#N` reference in the body so the issue links without a false close promise. Put `Closes #N` only on the PR that lands on the default branch.
83
83
 
84
84
  **Not enough:** a Development "related" link with no closing keyword. **Not enough:** closing the PR without merging.
85
85
 
@@ -255,8 +255,8 @@ Routing rules:
255
255
  detection system, with no second one.
256
256
  - Resume a warm workflow agent before creating a new workflow run when
257
257
  the warm agent holds the relevant context.
258
- - Review and verification workflows apply the [review guide](../reviews/SKILL.md#review-workflow).
259
- - PR-description workflows include the actual changed-file list in the
258
+ - Review and verification workflows apply the [review guide](../e-code-review/SKILL.md).
259
+ - PR-description workflows include the changed-file list in the
260
260
  prompt and verify the final body against that file list before posting
261
261
  or returning it.
262
262
  - Exploration workflows return file paths, line numbers, and direct
@@ -274,7 +274,7 @@ Routing rules:
274
274
  background spawn — keep the `agentId` (format `a...-...`) from the
275
275
  spawn result so `SendMessage` can reach that agent later.
276
276
  - **Spawn a fresh agent only when** no existing agent holds relevant
277
- context, or a genuine task switch needs a clean context.
277
+ context, or a task switch needs a clean context.
278
278
  - **Reuse is a cost rule, not a correctness dependency.** The run
279
279
  artifacts keep every executor replaceable (Run state section).
280
280
  - **Name the agent to resume.** When a PLAN from this session fits
@@ -21,7 +21,7 @@ The first consult is complete. It carries:
21
21
  - Assignment and desired outcome
22
22
  - Constraints and exclusions
23
23
  - Actions taken in order
24
- - Real output and current state
24
+ - Output and current state
25
25
  - Live decision or blocker
26
26
  - Validation evidence
27
27
  - Unresolved risks
@@ -31,7 +31,7 @@ Fill `<orchestrator-name>` with the name the executor can address.
31
31
  > failure repeats or progress has stalled, and when the chosen approach
32
32
  > is being reconsidered.
33
33
  > The first consult carries: assignment, desired outcome, constraints
34
- > and exclusions, actions taken in order, real output and current
34
+ > and exclusions, actions taken in order, output and current
35
35
  > state, live decision or blocker, validation evidence, unresolved
36
36
  > risks, load-bearing paths or excerpts, and who is asking. Later
37
37
  > consults carry only changed evidence.
@@ -70,7 +70,7 @@ reports and adds nothing further.
70
70
  executor has no `in_progress` task naming it as owner; a finished
71
71
  executor's task is still open (or was closed without its result
72
72
  merged); the next phase you will dispatch has no pending task; a
73
- `blockedBy` link contradicts the actual run order. Fix every mismatch
73
+ `blockedBy` link contradicts the run order. Fix every mismatch
74
74
  with TaskCreate / TaskUpdate in this same firing — never defer.
75
75
  2. **You are the orchestrator.** Orchestrate and hold the user
76
76
  conversation; spawn executor subagents for every code edit and build
@@ -89,7 +89,7 @@ reports and adds nothing further.
89
89
  to orchestration and light verification reads.
90
90
  4. **Resume before you spawn.** `SendMessage` an existing *executor* by
91
91
  name or `agentId` before a cold spawn.
92
- 5. **Fresh spawn only for a genuine task switch.** Never tell an agent
92
+ 5. **Fresh spawn only for a task switch.** Never tell an agent
93
93
  to compact for a clean context.
94
94
  6. **Single-pending re-arm only.** Same protocol as the orchestrator
95
95
  skill (host-agnostic; **create then claim**):
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: plugin-eval-standalone-skill
3
+ description: >-
4
+ Run `claude plugin eval` against a standalone skill that is not a plugin, by wrapping the skill in a plugin folder, writing trigger and must-not-trigger cases, and reading the with-skill minus without-skill delta. Triggers: eval a skill, plugin eval, claude plugin eval, test my skill, skill eval, eval a standalone skill.
5
+ ---
6
+
7
+ # Plugin eval for a standalone skill
8
+
9
+ ## Contents
10
+
11
+ - Principle
12
+ - Gotchas
13
+ - When this applies
14
+ - Process
15
+ - Files
16
+
17
+ ## Principle
18
+
19
+ `claude plugin eval` runs plugins only. Wrap the skill in a plugin folder whose layout keeps every
20
+ relative link working. Grade behavior only the skill produces. Judge the skill by the delta between
21
+ the arm with the plugin and the arm without it.
22
+
23
+ ## Gotchas
24
+
25
+ - A `.claude-plugin/plugin.json` under any skills directory turns that folder into a
26
+ `<name>@skills-dir` plugin in every session. Build the wrapper outside every skills directory.
27
+ - The run sandbox gets a throwaway home and config. User settings, hooks, CLAUDE.md, MCP servers,
28
+ memory, and other skills are absent. Plugin items carry a prefix, such as `<plugin>:session-advisor`.
29
+ - `claude plugin eval init` with no arguments is interactive and needs a terminal. From an agent
30
+ shell, run `claude plugin eval init --bare <case-name>`.
31
+ - A prompt that starts with `/skill-name` loads the skill with no `Skill` tool call, so
32
+ `tool_used: Skill` always fails on a slash case.
33
+ - A plain-words case triggers only when the skill allows model invocation. Leave
34
+ `disable-model-invocation` unset in the copied frontmatter.
35
+ - Write, Edit, SendMessage, and Bash need `--allow-tools` on the command line. Bash and PowerShell
36
+ grants refuse the run on native Windows, which has no sandbox backend. Run those cases under WSL2.
37
+ - Writes under a loaded `--plugin-dir` are denied in dontAsk mode. That skews the with-plugin arm
38
+ only, so keep every working and output folder outside the plugin root.
39
+ - A metric built from tool_use attempts reports success even when every write was denied. Read each
40
+ run's `permission_denials` and final result before you compare arms.
41
+ - A score under `--ablation none` says nothing about what the skill adds. Run the baseline once
42
+ before you claim the skill helps.
43
+ - The sandbox disables feature-flag fetching. Flag-gated features such as the built-in `advisor()`
44
+ tool are off, and `/advisor` replies "isn't available in this environment". No env var or plugin
45
+ setting turns them on. Plugin `settings.json` accepts only `agent` and `subagentStatusLine`. Test
46
+ such a feature with the `claude -p` recipe in `reference/graders-and-commands.md`.
47
+ - `--keep-temp` on Windows warns that it cannot seal the folder. Delete that folder when done with
48
+ PowerShell `Remove-Item -Recurse -Force -LiteralPath <path>`.
49
+
50
+ ## When this applies
51
+
52
+ Use this skill to measure whether a skill that is not packaged as a plugin triggers and changes
53
+ behavior. It needs Claude Code 2.1.269 or later. Source doc: https://code.claude.com/docs/en/plugin-evals
54
+
55
+ ## Process
56
+
57
+ Register one session task per numbered step through the host task tool. Use `TaskCreate`, else
58
+ `TodoWrite`. Where the host has no task tool, say so and work the steps in order.
59
+
60
+ 1. Run `claude --version` and confirm 2.1.269 or later.
61
+ 2. Create the wrapper folder outside every skills directory:
62
+
63
+ ```text
64
+ <wrapper>/
65
+ ├── .claude-plugin/
66
+ │ └── plugin.json
67
+ ├── skills/
68
+ │ └── <name>/
69
+ ├── agents/
70
+ └── <each shared doc, at the path the skill's relative links expect>
71
+ ```
72
+
73
+ `plugin.json` holds `name`, `version`, and `description`.
74
+ 3. Copy the skill, every agent it spawns, and every shared doc it links. Copy from a tree at
75
+ `origin/main`, not from a stale worktree. Resolve each relative link in the copied skill against
76
+ the wrapper root.
77
+ 4. In the wrapper root, run `claude plugin eval init --bare <case-name>` once per case.
78
+ 5. Write `evals/<case>/prompt.md` and `evals/<case>/graders/*.md` for each case. Frontmatter keys,
79
+ grader types, and the case set are in `reference/graders-and-commands.md`.
80
+ 6. Re-copy the skill from `origin/main`, then run the smoke command from the reference file.
81
+ 7. Read each run's `permission_denials` and final result. Fix any denial that the case needs.
82
+ 8. Re-copy the skill, then run the full eval. Read the delta in `aggregate-result.json`.
83
+ 9. Delete any `--keep-temp` sandbox folder.
84
+
85
+ ## Files
86
+
87
+ - `SKILL.md`. Wrapper layout, gotchas, and process.
88
+ - `reference/graders-and-commands.md`. Prompt frontmatter, grader types, case set, eval commands,
89
+ and the `claude -p` recipe for flag-gated features.
90
+
91
+ ```text
92
+ plugin-eval-standalone-skill/
93
+ ├── SKILL.md
94
+ └── reference/
95
+ └── graders-and-commands.md
96
+ ```
@@ -0,0 +1,108 @@
1
+ # Graders and commands
2
+
3
+ ## Contents
4
+
5
+ - Prompt frontmatter
6
+ - Grader types
7
+ - Case set
8
+ - Eval commands
9
+ - Results
10
+ - Flag-gated features outside plugin eval
11
+
12
+ ## Prompt frontmatter
13
+
14
+ `evals/<case>/prompt.md` takes these frontmatter keys.
15
+
16
+ | Key | Use |
17
+ | --- | --- |
18
+ | `max_turns` | Default 10. Set about 40 for a skill that spawns agents. |
19
+ | `timeout_seconds` | Wall-clock cap for one run. |
20
+ | `allowed_tools` | Read-only set: Read, Glob, Grep, Skill, Agent, TodoWrite, and the task tools. |
21
+
22
+ Write, Edit, SendMessage, and Bash go on the command line through `--allow-tools`, not in
23
+ `allowed_tools`.
24
+
25
+ ## Grader types
26
+
27
+ Each file in `evals/<case>/graders/` is one grader.
28
+
29
+ | Type | Fields | Checks |
30
+ | --- | --- | --- |
31
+ | `regex` | `target`: `last_message`, `trace`, `files`, or `{source: file, path}` | A pattern in the chosen text |
32
+ | `tool_used` | `tool`, `input_match`, `min`, `max`, `arm` | How many calls to a tool, filtered by an input regex |
33
+ | `tool_order` | `before`, `after`, each a tool name or `{tool, input_match}` | One call lands before another |
34
+ | `file_exists` | `path` glob, `exists` | A file created during the run matches, or none does with `exists: false` |
35
+ | `llm` | The body is the rubric, `focus` | A judge panel votes, and 2 of 3 decide |
36
+ | `baseline` | `baseline_file`, `criteria` | A judge rates the run at least as good as a reference `.jsonl` transcript |
37
+
38
+ Source doc: https://code.claude.com/docs/en/plugin-evals
39
+
40
+ ## Case set
41
+
42
+ Write at least these three shapes.
43
+
44
+ **Slash case.** The prompt starts with `/<name>`. No `Skill` call happens, so grade what only the
45
+ skill produces:
46
+
47
+ - `tool_used` with `tool: Agent` and an `input_match` on the agent name the skill spawns.
48
+ - `tool_order` with that `Agent` spawn before the first `Write`.
49
+
50
+ **Plain-words case.** The prompt asks for the job in ordinary words. Vary the wording, and do not
51
+ copy the exact phrase from the skill description into the only trigger case. Grade the trigger with:
52
+
53
+ ```text
54
+ tool: Skill
55
+ input_match: '"skill"\s*:\s*"(?:[\w-]+:)?<name>"'
56
+ ```
57
+
58
+ **Must-not-trigger case.** The prompt uses a verb near the triggers in its ordinary sense. Grade
59
+ with `tool_used`, `tool: Skill`, `min: 0`, `max: 0`, `arm: both`.
60
+
61
+ Grade on skill behavior. A grader keyed to a transport token that upstream may remove breaks on an
62
+ upgrade with no change in the skill.
63
+
64
+ ## Eval commands
65
+
66
+ Run every command from the wrapper root.
67
+
68
+ Smoke run, one case:
69
+
70
+ ```text
71
+ claude plugin eval . --case <name> --runs 1 --ablation none --max-cost-usd 2 --no-publish --trust-plugin --allow-tools Write SendMessage
72
+ ```
73
+
74
+ `--trust-plugin` is needed when stdin is not a terminal. `--case` takes one glob. Only the last
75
+ `--case` flag takes effect, so match several cases with one glob.
76
+
77
+ Full run: drop `--runs` and `--ablation`. The default is 3 runs with the plugin and 3 runs without.
78
+ The delta, with minus without, measures what the skill adds. A smoke score under `--ablation none`
79
+ has no without-plugin arm, so it measures nothing about contribution.
80
+
81
+ Add `--keep-temp` to keep the sandbox. Its trace is `out/trace.jsonl`.
82
+
83
+ ## Results
84
+
85
+ Each run writes `evals/results/<timestamp>/report.html` and `aggregate-result.json`.
86
+
87
+ Before you compare arms, read each run's `permission_denials` and its final result. A run whose
88
+ writes were all denied still shows the tool_use attempts.
89
+
90
+ ## Flag-gated features outside plugin eval
91
+
92
+ The sandbox cannot turn on a flag-gated feature. Test it with `claude -p`, once with the wrapper
93
+ loaded and once without:
94
+
95
+ ```text
96
+ claude -p "<task>" --advisor <model> --plugin-dir <wrapper> --setting-sources project --strict-mcp-config --allowedTools "<list>" --permission-mode dontAsk --output-format stream-json --verbose
97
+ ```
98
+
99
+ Drop `--plugin-dir <wrapper>` for the second arm.
100
+
101
+ - Keep the user's config. An empty `CLAUDE_CONFIG_DIR` drops the login and the run reports
102
+ "Not logged in". `--setting-sources project` keeps user settings out.
103
+ - Count the feature in the stream. For the advisor, count content blocks with `type`
104
+ `server_tool_use` and `name` `advisor` on the main thread only.
105
+ - Before you read a zero count, run a positive control whose prompt asks for the feature by name. A
106
+ zero can mean the feature was not attached, rather than not chosen.
107
+ - Keep the run's working folder outside the wrapper root, since writes under `--plugin-dir` are
108
+ denied in dontAsk mode.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: privacy-hygiene
3
- description: Full-repo sweep for personal data and secrets before commit or durable GitHub post. Use when preparing a PR, cleaning a leak, or when `pii_prevention_blocker` denies a write, post, or commit. Triggers on "privacy hygiene", "personal data", "secret sweep", "sanitize repository", "/privacy-hygiene".
3
+ description: Full-repo sweep for personal data and secrets before commit or durable GitHub post. Use when preparing a PR or cleaning a leak. Triggers on "privacy hygiene", "personal data", "secret sweep", "sanitize repository", "/privacy-hygiene".
4
4
  ---
5
5
 
6
6
  # privacy-hygiene
7
7
 
8
8
  ## Overview
9
9
 
10
- Find and remove personal data and high-confidence secrets before they land in git history or a durable GitHub post. The `pii_prevention_blocker` hook blocks the common cases at write, post, and commit time. This skill is the full sweep when you need a broader pass or a remediation plan.
10
+ Find and remove personal data and high-confidence secrets before they land in git history or a durable GitHub post. No write-time hook scans for these; `pii_prevention_blocker` was retired. This skill is the sweep.
11
11
 
12
12
  **Announce at start:** "Running privacy-hygiene sweep."
13
13
 
@@ -40,8 +40,7 @@ Run the full-tree sweep in
40
40
  run the ripgrep pass for the four high-confidence pattern families (email, home
41
41
  path, LAN address, secret), review each hit against the ignore list, and
42
42
  remediate. It also lists the accepted residual — what to leave in place rather
43
- than over-scrub. The ripgrep command is the only full-tree pass; the write-time
44
- `pii_prevention_blocker` scans one payload at a time.
43
+ than over-scrub. The ripgrep command is the only pass over the tree.
45
44
 
46
45
  ## Enable on any machine / public repository
47
46
 
@@ -56,9 +55,9 @@ Hooks register via `hooks/hooks.json` into `~/.claude/settings.json`. Once insta
56
55
 
57
56
  ## Open knobs
58
57
 
59
- - **NAS / LAN allowlist:** Unlisted private IPs are blocked. The scanner resolves your NAS host from `CLAUDE_NAS_HOST`, then `~/.claude/local-identity.json` (`nas.host`), and allowlists it when it is a private address, so the committed tree holds no real host. `ALL_ALLOWLISTED_PRIVATE_IP_ADDRESSES` in `hooks_constants` holds the static allowlist for any host every machine must share.
58
+ - **NAS / LAN allowlist:** Unlisted private IPs are blocked. The scanner resolves your NAS host from `CLAUDE_NAS_HOST`, then `~/.claude/local-identity.json` (`nas.host`), and allowlists it when it is a private address, so the committed tree holds no host address. `ALL_ALLOWLISTED_PRIVATE_IP_ADDRESSES` in `hooks_constants` holds the static allowlist for any host every machine must share.
60
59
  - **Commit-scan exempt repositories:** named owner/repo slugs skip the staged-commit PII scan only. Set `CLAUDE_PII_EXEMPT_REPOS` (comma-separated `owner/repo` values) or list them under `pii_exempt_repositories` in `~/.claude/local-identity.json`. Matching uses the repository's `remote.origin.url` and accepts only the exact host `github.com` (https, ssh scheme, or scp-style). A repository with no readable origin is never exempt (fail-closed to scanning). Write / Edit / MultiEdit and durable post bodies still scan in every repository.
61
- - **Public maintainer identity:** when a real email or name is intentional product surface, keep it and note that in the PR body so reviewers do not treat it as a leak.
60
+ - **Public maintainer identity:** when an email or name is intentional product surface, keep it and note that in the PR body so reviewers do not treat it as a leak.
62
61
 
63
62
  ## What this skill does not do
64
63
 
@@ -1,10 +1,9 @@
1
1
  # Full-tree PII sweep procedure
2
2
 
3
- The on-demand full-repository sweep for the `privacy-hygiene` skill — the
4
- complement to the write-time `pii_prevention_blocker`, which scans one payload at
5
- a time. The canonical per-payload patterns live in the hooks' `pii_scanner` and
6
- `pii_prevention_constants` modules; the ripgrep command below is the only
7
- full-tree pass. The hub ([`../SKILL.md`](../SKILL.md)) points here.
3
+ The on-demand full-repository sweep for the `privacy-hygiene` skill. The
4
+ per-payload patterns live in the hooks' `pii_scanner` and
5
+ `pii_prevention_constants` modules; the ripgrep command below is the only pass
6
+ over the tree. The hub ([`../SKILL.md`](../SKILL.md)) points here.
8
7
 
9
8
  ## 1. Scope the tree
10
9
 
@@ -40,7 +39,7 @@ Review each hit. Ignore:
40
39
 
41
40
  | Hit | Fix |
42
41
  |---|---|
43
- | Real email | Replace with `user@example.com` or remove |
42
+ | Email address | Replace with `user@example.com` or remove |
44
43
  | Home path | Use `Path.home()`, `~`, or `C:/Users/<you>/` |
45
44
  | LAN address | Remove, use a hostname, or — for your own NAS — set the host in `CLAUDE_NAS_HOST` or `~/.claude/local-identity.json`, both of which stay out of git |
46
45
  | Credential material | Remove from the tree; rotate the credential; load from env/secret store |
@@ -27,7 +27,7 @@ output envelope, and exit status as separate boundaries.
27
27
  Use this skill for Claude or Codex hook failures involving registered events,
28
28
  settings, launchers, imports, paths, payloads, output envelopes, or exit status.
29
29
 
30
- For installer-only work, say: `Use /run-claude-dev-env for installer work that has no hook-boundary failure.`
30
+ For installer-only work, say: `Installer work with no hook-boundary failure belongs outside this skill.`
31
31
 
32
32
  ## Process
33
33
 
@@ -31,7 +31,7 @@ Use this skill after committing inside a checked-out submodule when its parent r
31
31
  Refusals use the first matching line:
32
32
 
33
33
  - Clone, initialize, or check out a submodule: `Use Git's submodule commands. This skill records an existing submodule commit in its parent.`
34
- - Fast-forward `main`: `Use /update. This skill changes one parent submodule pointer.`
34
+ - Fast-forward `main`: `Use Git directly. This skill changes one parent submodule pointer.`
35
35
  - Make an ordinary commit or push: `Use /source-command-commit. This skill commits only a parent submodule pointer.`
36
36
 
37
37
  ## Process