claude-dev-env 1.93.1 → 1.95.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/CLAUDE.md +2 -2
- package/_shared/advisor/advisor-protocol.md +35 -27
- package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +3 -2
- package/_shared/advisor/scripts/model_tier_run_validator.py +23 -15
- package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +81 -17
- package/_shared/pr-loop/CLAUDE.md +1 -0
- package/_shared/pr-loop/audit-contract.md +1 -1
- package/_shared/pr-loop/gh-payloads.md +3 -3
- package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
- package/_shared/pr-loop/scripts/README.md +2 -2
- package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -69
- package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
- package/_shared/pr-loop/state-schema.md +3 -22
- package/bin/CLAUDE.md +11 -2
- package/bin/ever-shipped-skills.mjs +70 -0
- package/bin/install.mjs +138 -13
- package/bin/install.prune.test.mjs +457 -0
- package/bin/install.test.mjs +10 -4
- package/docs/CODE_RULES.md +1 -1
- package/hooks/blocking/CLAUDE.md +2 -0
- package/hooks/blocking/code_rules_enforcer.py +4 -0
- package/hooks/blocking/code_rules_shared.py +82 -0
- package/hooks/blocking/code_rules_test_layout.py +9 -3
- package/hooks/blocking/pii_commit_command.py +398 -0
- package/hooks/blocking/pii_payload_scan.py +133 -0
- package/hooks/blocking/pii_prevention_blocker.py +151 -449
- package/hooks/blocking/plain_language_blocker.py +138 -4
- package/hooks/blocking/sensitive_file_protector.py +114 -48
- package/hooks/blocking/tdd_enforcer.py +9 -2
- package/hooks/blocking/test_code_rules_enforcer_scratchpad.py +105 -0
- package/hooks/blocking/test_code_rules_shared.py +181 -0
- package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
- package/hooks/blocking/test_plain_language_blocker_allowlist.py +184 -0
- package/hooks/blocking/test_sensitive_file_protector.py +185 -0
- package/hooks/blocking/test_tdd_enforcer_scratchpad.py +105 -0
- package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
- package/hooks/hooks_constants/CLAUDE.md +4 -2
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
- package/hooks/hooks_constants/harness_scratchpad_constants.py +17 -0
- package/hooks/hooks_constants/local_identity.py +65 -15
- package/hooks/hooks_constants/pii_prevention_constants.py +16 -0
- package/hooks/hooks_constants/plain_language_blocker_constants.py +5 -0
- package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
- package/hooks/hooks_constants/sensitive_file_protector_constants.py +42 -0
- package/hooks/hooks_constants/test_local_identity.py +68 -0
- package/hooks/pyproject.toml +75 -4
- package/hooks/validators/CLAUDE.md +1 -1
- package/hooks/validators/README.md +2 -0
- package/hooks/validators/python_style_checks.py +114 -136
- package/hooks/validators/python_style_helpers.py +95 -0
- package/hooks/validators/test_python_style_checks.py +0 -164
- package/hooks/validators/test_python_style_checks_decorator_gap.py +119 -0
- package/hooks/validators/test_python_style_fixes.py +251 -0
- package/hooks/validators/test_python_style_helpers.py +125 -0
- package/package.json +1 -1
- package/rules/CLAUDE.md +1 -0
- package/rules/anti-corollary-tests.md +69 -0
- package/rules/bdd.md +1 -3
- package/rules/code-reviews.md +1 -1
- package/rules/gh-paginate.md +1 -1
- package/rules/plain-language.md +2 -0
- package/scripts/CLAUDE.md +10 -1
- package/scripts/Get-SessionAccount.ps1 +210 -0
- package/scripts/tests/CLAUDE.md +15 -1
- package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
- package/skills/CLAUDE.md +6 -27
- package/skills/anthropic-plan/SKILL.md +1 -13
- package/skills/autoconverge/CLAUDE.md +5 -2
- package/skills/autoconverge/SKILL.md +112 -387
- package/skills/autoconverge/reference/CLAUDE.md +4 -1
- package/skills/autoconverge/reference/closing-report.md +9 -2
- package/skills/autoconverge/reference/convergence.md +26 -22
- package/skills/autoconverge/reference/headless-safety.md +44 -0
- package/skills/autoconverge/reference/multi-pr.md +88 -0
- package/skills/autoconverge/reference/self-closing-loop.md +84 -0
- package/skills/autoconverge/reference/stop-conditions.md +21 -13
- package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
- package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
- package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
- package/skills/autoconverge/workflow/converge.mjs +286 -96
- package/skills/bugteam/CLAUDE.md +1 -1
- package/skills/bugteam/CONSTRAINTS.md +3 -3
- package/skills/bugteam/PROMPTS.md +8 -19
- package/skills/bugteam/SKILL.md +13 -14
- package/skills/bugteam/reference/CLAUDE.md +1 -1
- package/skills/bugteam/reference/README.md +2 -3
- package/skills/bugteam/reference/audit-and-teammates.md +2 -2
- package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
- package/skills/bugteam/reference/github-pr-reviews.md +56 -38
- package/skills/bugteam/reference/team-setup.md +11 -11
- package/skills/bugteam/scripts/CLAUDE.md +6 -6
- package/skills/bugteam/scripts/README.md +20 -8
- package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
- package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
- package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
- package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
- package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
- package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
- package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
- package/skills/closeout/SKILL.md +153 -0
- package/skills/closeout/reference/handoff-prompt-template.md +72 -0
- package/skills/closeout/reference/issue-body-templates.md +108 -0
- package/skills/closeout/reference/pii-redaction-checklist.md +36 -0
- package/skills/copilot-finding-triage/SKILL.md +80 -28
- package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
- package/skills/copilot-finding-triage/templates/notification.md +8 -3
- package/skills/everything-search/SKILL.md +1 -2
- package/skills/grokify/SKILL.md +58 -0
- package/skills/grokify/templates/handoff-template.md +92 -0
- package/skills/orchestrator/SKILL.md +35 -25
- package/skills/orchestrator-refresh/SKILL.md +15 -11
- package/skills/pr-converge/CLAUDE.md +1 -1
- package/skills/pr-converge/SKILL.md +132 -233
- package/skills/pr-converge/reference/convergence-gates.md +102 -66
- package/skills/pr-converge/reference/examples.md +37 -25
- package/skills/pr-converge/reference/fix-protocol.md +7 -7
- package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
- package/skills/pr-converge/reference/per-tick.md +64 -41
- package/skills/pr-converge/reference/state-schema.md +27 -2
- package/skills/pr-converge/scripts/CLAUDE.md +8 -0
- package/skills/pr-converge/scripts/README.md +4 -3
- package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
- package/skills/pr-converge/scripts/check_convergence.py +189 -645
- package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
- package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
- package/skills/pr-converge/scripts/conftest.py +8 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
- package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
- package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
- package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
- package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
- package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
- package/skills/pr-fix-protocol/SKILL.md +20 -20
- package/skills/privacy-hygiene/SKILL.md +4 -3
- package/skills/reviewer-gates/SKILL.md +26 -8
- package/skills/session-log/SKILL.md +11 -12
- package/skills/session-tidy/SKILL.md +40 -30
- package/skills/skill-builder/CLAUDE.md +13 -10
- package/skills/skill-builder/SKILL.md +31 -31
- package/skills/skill-builder/references/CLAUDE.md +10 -6
- package/skills/skill-builder/references/delegation-map.md +13 -4
- package/skills/skill-builder/references/description-field.md +113 -0
- package/skills/skill-builder/references/self-audit-checklist.md +21 -4
- package/skills/skill-builder/references/skill-modularity.md +113 -0
- package/skills/skill-builder/references/skill-types.md +4 -0
- package/skills/skill-builder/templates/CLAUDE.md +4 -4
- package/skills/skill-builder/templates/gap-analysis.md +25 -1
- package/skills/skill-builder/workflows/CLAUDE.md +6 -4
- package/skills/skill-builder/workflows/improve-skill.md +17 -16
- package/skills/skill-builder/workflows/new-skill.md +34 -10
- package/skills/skill-builder/workflows/polish-skill.md +59 -43
- package/skills/team-advisor/SKILL.md +15 -11
- package/skills/usage-pause/SKILL.md +10 -14
- package/system-prompts/software-engineer.xml +7 -6
- package/hooks/validators/test_verify_paths.py +0 -32
- package/hooks/validators/verify_paths.py +0 -57
- package/skills/bdd-protocol/CLAUDE.md +0 -26
- package/skills/bdd-protocol/SKILL.md +0 -30
- package/skills/bdd-protocol/references/CLAUDE.md +0 -10
- package/skills/bdd-protocol/references/anti-patterns.md +0 -26
- package/skills/bdd-protocol/references/example-mapping.md +0 -23
- package/skills/bg-agent/CLAUDE.md +0 -17
- package/skills/bg-agent/SKILL.md +0 -69
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
- package/skills/caveman/CLAUDE.md +0 -15
- package/skills/caveman/SKILL.md +0 -38
- package/skills/code/CLAUDE.md +0 -17
- package/skills/code/SKILL.md +0 -178
- package/skills/deep-research/CLAUDE.md +0 -17
- package/skills/deep-research/SKILL.md +0 -80
- package/skills/findbugs/CLAUDE.md +0 -20
- package/skills/findbugs/SKILL.md +0 -241
- package/skills/fixbugs/CLAUDE.md +0 -19
- package/skills/fixbugs/SKILL.md +0 -142
- package/skills/gh-paginate/CLAUDE.md +0 -18
- package/skills/gh-paginate/SKILL.md +0 -84
- package/skills/gotcha/CLAUDE.md +0 -33
- package/skills/gotcha/SKILL.md +0 -73
- package/skills/implement/CLAUDE.md +0 -27
- package/skills/implement/SKILL.md +0 -66
- package/skills/implement/scripts/CLAUDE.md +0 -22
- package/skills/implement/scripts/append_note.py +0 -133
- package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
- package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
- package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
- package/skills/implement/scripts/test_append_note.py +0 -191
- package/skills/log-audit/CLAUDE.md +0 -20
- package/skills/log-audit/SKILL.md +0 -66
- package/skills/log-audit/reference/CLAUDE.md +0 -9
- package/skills/log-audit/reference/charter.md +0 -52
- package/skills/log-audit/scripts/CLAUDE.md +0 -27
- package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
- package/skills/log-audit/scripts/collect_log_window.py +0 -199
- package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
- package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
- package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
- package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
- package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
- package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
- package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
- package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
- package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
- package/skills/logifix/CLAUDE.md +0 -36
- package/skills/logifix/SKILL.md +0 -69
- package/skills/logifix/scripts/CLAUDE.md +0 -16
- package/skills/logifix/scripts/logifix.ps1 +0 -205
- package/skills/monitor-open-prs/CLAUDE.md +0 -34
- package/skills/monitor-open-prs/SKILL.md +0 -88
- package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
- package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
- package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
- package/skills/monitor-open-prs/test_skill_contract.py +0 -27
- package/skills/post-audit-findings/SKILL.md +0 -80
- package/skills/pr-consistency-audit/CLAUDE.md +0 -34
- package/skills/pr-consistency-audit/SKILL.md +0 -116
- package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
- package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
- package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
- package/skills/pr-review-responder/CLAUDE.md +0 -35
- package/skills/pr-review-responder/EXAMPLES.md +0 -590
- package/skills/pr-review-responder/PRINCIPLES.md +0 -533
- package/skills/pr-review-responder/README.md +0 -168
- package/skills/pr-review-responder/SKILL.md +0 -203
- package/skills/pr-review-responder/TESTING.md +0 -350
- package/skills/pr-scope-resolve/SKILL.md +0 -45
- package/skills/pre-compact/CLAUDE.md +0 -24
- package/skills/pre-compact/SKILL.md +0 -134
- package/skills/qbug/CLAUDE.md +0 -40
- package/skills/qbug/SKILL.md +0 -387
- package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
- package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
- package/skills/refine/CLAUDE.md +0 -44
- package/skills/refine/SKILL.md +0 -262
- package/skills/refine/templates/CLAUDE.md +0 -17
- package/skills/refine/templates/implementation-notes-template.html +0 -56
- package/skills/refine/templates/plan-template.md +0 -60
- package/skills/research-mode/CLAUDE.md +0 -35
- package/skills/research-mode/SKILL.md +0 -53
- package/skills/structure-prompt/CLAUDE.md +0 -42
- package/skills/structure-prompt/SKILL.md +0 -44
- package/skills/structure-prompt/reference/CLAUDE.md +0 -28
- package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
- package/skills/structure-prompt/reference/block-classification.md +0 -27
- package/skills/structure-prompt/reference/canonical-case.md +0 -48
- package/skills/structure-prompt/reference/citation-depth.md +0 -70
- package/skills/structure-prompt/reference/cleanup.md +0 -33
- package/skills/structure-prompt/reference/constraints.md +0 -33
- package/skills/structure-prompt/reference/directives.md +0 -37
- package/skills/structure-prompt/reference/examples.md +0 -72
- package/skills/structure-prompt/reference/instantiation.md +0 -51
- package/skills/structure-prompt/reference/output-contract.md +0 -72
- package/skills/structure-prompt/reference/per-category.md +0 -23
- package/skills/structure-prompt/reference/persona.md +0 -38
- package/skills/structure-prompt/reference/research.md +0 -33
- package/skills/structure-prompt/reference/structure.md +0 -28
- package/skills/verified-build/CLAUDE.md +0 -33
- package/skills/verified-build/SKILL.md +0 -33
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: usage-pause
|
|
3
|
-
description:
|
|
4
|
-
Waits out the account's 5-hour usage window in ScheduleWakeup stages that keep
|
|
5
|
-
every agent context warm. Accepts a manual override like '/usage-pause
|
|
6
|
-
10:20pm' or '/usage-pause 74m'. Triggers: '/usage-pause', 'pause until the
|
|
7
|
-
usage window resets', 'wait out the usage limit', 'usage limit pause'.
|
|
3
|
+
description: 5-hour usage window, agent context warm, weekly limit is near its cap. Triggers: '/usage-pause', 'pause until the usage window resets', 'wait out the usage limit', 'usage limit pause', 'usage limit', 'pause usage', 'usage pause'.
|
|
8
4
|
argument-hint: "[reset time like 10:20pm | duration like 74m]"
|
|
9
5
|
---
|
|
10
6
|
|
|
@@ -37,27 +33,27 @@ On exit 0 the script prints one JSON object:
|
|
|
37
33
|
| `session_utilization` | Percent of the 5-hour window spent (null on override) |
|
|
38
34
|
| `weekly_utilization` | Percent of the weekly window spent (null on override) |
|
|
39
35
|
| `weekly_resets_at` | When the weekly window resets (null on override) |
|
|
40
|
-
| `weekly_near_cap` | True when the weekly meter is at or past
|
|
36
|
+
| `weekly_near_cap` | True when the weekly meter is at or past the warn threshold |
|
|
41
37
|
|
|
42
38
|
On exit 2 the script prints `{"error": ...}`. Ask the user for a manual reset time via AskUserQuestion (offer clock-time and duration examples), then rerun with `--override`.
|
|
43
39
|
|
|
44
40
|
### Probe mechanism
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
`scripts/resolve_usage_window.py` is the source of truth for live probe behavior. Endpoint URL, header names/values, credential path and token keys, response bucket keys, stage sizing, and the weekly warn threshold all live in `scripts/usage_pause_constants/resolve_usage_window_constants.py` — read those modules for the current values; do not restate them here.
|
|
47
43
|
|
|
48
|
-
Token sources, in order:
|
|
44
|
+
In short: the resolver picks a bearer token, probes the OAuth usage endpoint the interactive `/usage` panel uses, and returns the session and weekly buckets with utilization and reset times. Token sources, in order:
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
1. The Claude Code CLI's stored OAuth access token (honored only while unexpired).
|
|
47
|
+
2. The session ingress bearer token file named by `CLAUDE_SESSION_INGRESS_TOKEN_FILE` (cloud sessions).
|
|
52
48
|
|
|
53
|
-
Fallbacks, in order:
|
|
49
|
+
Fallbacks, in order: both token sources unavailable (expired/unreadable credential and no ingress file), a failed request, or a response with no readable session-window reset time all end in exit 2 — the manual-override ask above. The manual path works with no probe at all, so the skill functions even when both token sources are unavailable.
|
|
54
50
|
|
|
55
51
|
Why this probe and not the others:
|
|
56
52
|
|
|
57
53
|
- The interactive `/usage` panel shows the same data but has no scriptable output.
|
|
58
54
|
- `claude -p --output-format json` spends usage to answer and its metadata reports per-call token counts, not the account window clock.
|
|
59
55
|
- `anthropic-ratelimit-*` response headers cover API-key Messages traffic, not the subscription session window, and reading them also costs a request.
|
|
60
|
-
- Refreshing the OAuth token from a script is out of scope: token rotation would desync the refresh token the CLI has on disk and log the CLI out. The resolver only ever reads
|
|
56
|
+
- Refreshing the OAuth token from a script is out of scope: token rotation would desync the refresh token the CLI has on disk and log the CLI out. The resolver only ever reads tokens (credential file or session ingress file).
|
|
61
57
|
|
|
62
58
|
## Weekly limit guard
|
|
63
59
|
|
|
@@ -70,7 +66,7 @@ Before the first sleep:
|
|
|
70
66
|
1. List active recurring loops (CronList). Record each one's schedule and prompt, then cancel it (CronDelete). Carry the recorded list inside the wakeup prompts so the state survives every stage.
|
|
71
67
|
2. Schedule the first stage with ScheduleWakeup, using the first duration in `stages_seconds` and the stage prompt template below.
|
|
72
68
|
|
|
73
|
-
The stage plan keeps every stage
|
|
69
|
+
The stage plan (`stages_seconds` from the resolver) keeps every stage under the maximum stage length and ends with a short tail so the final firing lands just past the reset. Stage sizing constants live in `scripts/usage_pause_constants/resolve_usage_window_constants.py`; a leftover too short to stand alone folds into the tail.
|
|
74
70
|
|
|
75
71
|
Every wakeup does exactly three things — ping, record, schedule — and dispatches no new work. The cache rationale: an unpinged idle agent left past the cache window resumes cold and re-reads its whole transcript, so pings run tighter than the cache lifetime and keep each agent's next real invocation cheap.
|
|
76
72
|
|
|
@@ -110,7 +106,7 @@ Fill each `<slot>` at schedule time: `<remaining_stage_durations>` is the tail o
|
|
|
110
106
|
| `SKILL.md` | This flow: resolve, weekly guard, stage chain, templates |
|
|
111
107
|
| `scripts/resolve_usage_window.py` | The window resolver and stage planner CLI |
|
|
112
108
|
| `scripts/test_resolve_usage_window.py` | Behavioral tests for parsing, staging, token reading, extraction, CLI |
|
|
113
|
-
| `scripts/usage_pause_constants/resolve_usage_window_constants.py` | Endpoint, credential keys,
|
|
109
|
+
| `scripts/usage_pause_constants/resolve_usage_window_constants.py` | Endpoint, credential keys, stage sizing, thresholds, result keys |
|
|
114
110
|
|
|
115
111
|
## Gotchas
|
|
116
112
|
|
|
@@ -140,7 +140,8 @@
|
|
|
140
140
|
Apply an outside-in BDD reasoning protocol before writing any code. Outside-in BDD is the
|
|
141
141
|
required development protocol; apply it in place of any Red-Green-Refactor heuristic. The
|
|
142
142
|
full anti-pattern catalog, Example Mapping algorithm, and solo-developer guidance live in
|
|
143
|
-
the
|
|
143
|
+
the long-form BDD references (`~/.claude/docs/BDD_DISCOVERY_PROTOCOL.md`,
|
|
144
|
+
`~/.claude/docs/BDD_SCENARIO_QUALITY.md`); this section carries the core four-phase sequence.
|
|
144
145
|
|
|
145
146
|
Deliberate Discovery. Before writing any specification or code, reason explicitly about
|
|
146
147
|
what the code should do, what constraints apply, and what concrete examples demonstrate the
|
|
@@ -159,8 +160,9 @@
|
|
|
159
160
|
it pass. Assess each green state for structural improvement; refactor when a specific
|
|
160
161
|
naming, cohesion, or duplication problem is identified.
|
|
161
162
|
|
|
162
|
-
Reference
|
|
163
|
-
algorithm, and guidance on applying this
|
|
163
|
+
Reference `~/.claude/docs/BDD_SCENARIO_QUALITY.md` and `~/.claude/docs/BDD_DISCOVERY_PROTOCOL.md`
|
|
164
|
+
for Smart and Molak §7.6 patterns, the Example Mapping algorithm, and guidance on applying this
|
|
165
|
+
protocol in a solo-developer context.
|
|
164
166
|
</behavior_protocol>
|
|
165
167
|
|
|
166
168
|
<scope_discipline>
|
|
@@ -231,11 +233,10 @@
|
|
|
231
233
|
</agent_workflow>
|
|
232
234
|
|
|
233
235
|
<code_review_response>
|
|
234
|
-
When responding to GitHub PR review feedback, follow this mandatory protocol
|
|
235
|
-
pr-review-responder skill.
|
|
236
|
+
When responding to GitHub PR review feedback, follow this mandatory protocol.
|
|
236
237
|
|
|
237
238
|
Fetch all reviewer comments before making any fixes. Obtain the full comment set from the
|
|
238
|
-
PR using `gh pr view --comments
|
|
239
|
+
PR using `gh pr view --comments`.
|
|
239
240
|
|
|
240
241
|
Create a TodoWrite checklist with one item per comment.
|
|
241
242
|
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"""Tests for validator path verification script."""
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
from .verify_paths import extract_validator_paths
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def test_extract_validator_paths_finds_validator_references() -> None:
|
|
9
|
-
"""Test that validator references are extracted from markdown content."""
|
|
10
|
-
content = """
|
|
11
|
-
**Validator:** `validators/import_checks.py`
|
|
12
|
-
Some text here.
|
|
13
|
-
**Validator:** `validators/style_checks.py`
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
result = extract_validator_paths(content)
|
|
17
|
-
|
|
18
|
-
assert "import_checks.py" in result
|
|
19
|
-
assert "style_checks.py" in result
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def test_extract_validator_paths_deduplicates() -> None:
|
|
23
|
-
"""Test that duplicate validator references are deduplicated."""
|
|
24
|
-
content = """
|
|
25
|
-
**Validator:** `validators/import_checks.py`
|
|
26
|
-
**Validator:** `validators/import_checks.py`
|
|
27
|
-
**Validator:** `validators/import_checks.py`
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
result = extract_validator_paths(content)
|
|
31
|
-
|
|
32
|
-
assert result.count("import_checks.py") == 1
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"""Verify all validator paths referenced in SKILL.md exist."""
|
|
2
|
-
|
|
3
|
-
import re
|
|
4
|
-
import sys
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
SKILL_MD_PATH = Path(__file__).parent.parent.parent / "skills" / "pr-review-responder" / "SKILL.md"
|
|
9
|
-
VALIDATORS_DIR = Path(__file__).parent
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def extract_validator_paths(content: str) -> list[str]:
|
|
13
|
-
"""Extract validator file paths from SKILL.md content."""
|
|
14
|
-
pattern = r"validators[/\\](\w+\.py)"
|
|
15
|
-
matches = re.findall(pattern, content)
|
|
16
|
-
return list(set(matches))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def verify_validators() -> int:
|
|
20
|
-
"""Verify all referenced validators exist.
|
|
21
|
-
|
|
22
|
-
Returns:
|
|
23
|
-
Exit code: 0 if all exist, 1 if any missing
|
|
24
|
-
"""
|
|
25
|
-
if not SKILL_MD_PATH.exists():
|
|
26
|
-
print(f"ERROR: SKILL.md not found at {SKILL_MD_PATH}")
|
|
27
|
-
return 1
|
|
28
|
-
|
|
29
|
-
content = SKILL_MD_PATH.read_text(encoding="utf-8")
|
|
30
|
-
referenced_validators = extract_validator_paths(content)
|
|
31
|
-
|
|
32
|
-
print(f"Found {len(referenced_validators)} validator references in SKILL.md")
|
|
33
|
-
print()
|
|
34
|
-
|
|
35
|
-
missing = []
|
|
36
|
-
for validator_file in sorted(referenced_validators):
|
|
37
|
-
validator_path = VALIDATORS_DIR / validator_file
|
|
38
|
-
if validator_path.exists():
|
|
39
|
-
print(f" [OK] {validator_file}")
|
|
40
|
-
else:
|
|
41
|
-
print(f" [MISSING] {validator_file}")
|
|
42
|
-
missing.append(validator_file)
|
|
43
|
-
|
|
44
|
-
print()
|
|
45
|
-
|
|
46
|
-
if missing:
|
|
47
|
-
print(f"ERROR: {len(missing)} validator(s) missing:")
|
|
48
|
-
for validator_file in missing:
|
|
49
|
-
print(f" - {validator_file}")
|
|
50
|
-
return 1
|
|
51
|
-
|
|
52
|
-
print("All referenced validators exist.")
|
|
53
|
-
return 0
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if __name__ == "__main__":
|
|
57
|
-
sys.exit(verify_validators())
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# bdd-protocol
|
|
2
|
-
|
|
3
|
-
**Trigger:** `/bdd-protocol`, "Example Mapping", "BDD anti-patterns", "§7.6", writing executable specifications, BDD scenario quality, "the one where" discovery examples.
|
|
4
|
-
|
|
5
|
-
On-demand BDD depth layered on top of the always-on `<behavior_protocol>` in the system prompt. The skill adds the Example Mapping algorithm (Smart & Molak §6.4), the scenario quality catalog (§7.6), outside-in test layout, and solo BDD patterns.
|
|
6
|
-
|
|
7
|
-
## Subdirectories
|
|
8
|
-
|
|
9
|
-
| Directory | Role |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `references/` | Loaded reference docs: Example Mapping algorithm and the anti-patterns catalog. |
|
|
12
|
-
|
|
13
|
-
## Key files
|
|
14
|
-
|
|
15
|
-
| File | Role |
|
|
16
|
-
|---|---|
|
|
17
|
-
| `SKILL.md` | Entry point. `@`-imports both reference files so they load with the skill. Lists authorities and scope boundaries. |
|
|
18
|
-
| `references/example-mapping.md` | Example Mapping algorithm: core moves ("The one where …"), the chat algorithm for solo use, time-boxing guidance. Source: Smart & Molak §6.4. |
|
|
19
|
-
| `references/anti-patterns.md` | §7.6 scenario quality catalog: anti-patterns to avoid and the criteria for a good scenario. |
|
|
20
|
-
|
|
21
|
-
## What the skill adds
|
|
22
|
-
|
|
23
|
-
The base `<behavior_protocol>` (Deliberate Discovery → Illustrate → Formulate → Automate) is always active. This skill adds depth only when:
|
|
24
|
-
- The task needs Example Mapping steps or parking-lot question management.
|
|
25
|
-
- Scenarios need the §7.6 quality bar applied.
|
|
26
|
-
- Tests need outside-in layout using describe / when / should.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: bdd-protocol
|
|
3
|
-
description: >-
|
|
4
|
-
On-demand BDD depth: Example Mapping, scenario quality and anti-patterns, solo
|
|
5
|
-
minimal BDD, and outside-in test layout. Use when expanding `<behavior_protocol>`,
|
|
6
|
-
writing executable specifications, or giving 'the one where' examples.
|
|
7
|
-
Triggers: bdd-protocol, Example Mapping, BDD anti-patterns, §7.6.
|
|
8
|
-
---
|
|
9
|
-
@~/.claude/skills/bdd-protocol/references/example-mapping.md
|
|
10
|
-
@~/.claude/skills/bdd-protocol/references/anti-patterns.md
|
|
11
|
-
|
|
12
|
-
# BDD protocol (on-demand)
|
|
13
|
-
|
|
14
|
-
The always-on sequence lives in `~/.claude/system-prompts/software-engineer.xml` under `<behavior_protocol>` (Deliberate Discovery → Illustrate → Formulate → Automate). This skill adds **depth** you load when you need algorithms, catalogs, or layout guidance.
|
|
15
|
-
|
|
16
|
-
## When to use this skill
|
|
17
|
-
|
|
18
|
-
- The user or task needs **Example Mapping** steps, parking-lot questions, or "the one where …" phrasing.
|
|
19
|
-
- You are writing or reviewing **scenarios** and need the **§7.6** quality bar and anti-patterns.
|
|
20
|
-
- You are organizing **tests by behavior** (describe / when / should) or using **soap-opera personas** for solo work.
|
|
21
|
-
|
|
22
|
-
## Authority
|
|
23
|
-
|
|
24
|
-
- John Ferguson Smart & Jan Molak, *BDD in Action* 2e (Manning, 2023) — §2.3.7 outside-in, §5.4 Deliberate Discovery, §6.4 Example Mapping, §7.6 scenario quality, §16.5.5 test layout.
|
|
25
|
-
- Dan North, "Introducing BDD" (2006).
|
|
26
|
-
- John Ferguson Smart, Minimal BDD (learnbdd.com; Wayback-cited in tracking issue).
|
|
27
|
-
|
|
28
|
-
## What stays in the system prompt
|
|
29
|
-
|
|
30
|
-
Do not duplicate the four-phase sequence here; keep a single source of truth in `<behavior_protocol>`.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# references
|
|
2
|
-
|
|
3
|
-
Reference documentation loaded by the `bdd-protocol` skill. Both files are `@`-imported in `SKILL.md` and load when the skill activates.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `example-mapping.md` | Example Mapping algorithm (Smart & Molak §6.4). Covers core moves, the "The one where …" phrasing, probes, parking-lot questions, the solo chat algorithm, and time-boxing guidance. |
|
|
10
|
-
| `anti-patterns.md` | §7.6 scenario quality catalog. Lists anti-patterns to avoid and the criteria for a well-formed BDD scenario. |
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Scenario quality and anti-patterns (§7.6 and related)
|
|
2
|
-
|
|
3
|
-
Use this as a **checklist** when writing or reviewing scenarios and developer-facing specifications. Phrasing follows *BDD in Action* 2e and the catalog summarized in [claude-dev-env#82](https://github.com/jl-cmd/claude-dev-env/issues/82).
|
|
4
|
-
|
|
5
|
-
## Positive targets (what "good" looks like)
|
|
6
|
-
|
|
7
|
-
- **Declarative focus (§7.6.3):** Scenarios describe **business behavior** and user goals, not low-level UI click scripts.
|
|
8
|
-
- **Single-rule focus (§7.6.4):** One **business rule** per scenario; split when a scenario grows hard to read.
|
|
9
|
-
- **Meaningful actors (§7.6.5):** Personas can be **lightweight** (e.g. soap-opera introductions) when full UX research is unavailable — name + role, grow detail as scenarios demand.
|
|
10
|
-
- **Essential detail (§7.6.6):** Include data and columns that **change outcomes**; omit neutral or redundant columns.
|
|
11
|
-
- **State clarity (§7.6.6):** Make **initial** and **final** state explicit when data illustrates behavior.
|
|
12
|
-
- **Outcome description (§7.6.7):** Outcomes are **observable and measurable** — not hidden behind vague "verify" steps.
|
|
13
|
-
- **Independence (§7.6.8):** Each scenario sets up **its own** data and state so it can run alone.
|
|
14
|
-
|
|
15
|
-
## Anti-patterns to refuse or rewrite
|
|
16
|
-
|
|
17
|
-
- **Imperative scenarios** that read like automation scripts (especially pure UI step lists).
|
|
18
|
-
- **Multi-concern** scenarios that mix unrelated rules.
|
|
19
|
-
- **Incidental detail** that does not serve the rule under test.
|
|
20
|
-
- **Test scripts in disguise** — heavy use of **verify** / **check** without stating the business outcome.
|
|
21
|
-
- **Dependent scenarios** that only pass in order.
|
|
22
|
-
- **Gherkin without conversation** (BAs or testers writing scenarios in isolation) — structured specs are an **output** of discovery, not a substitute for it (Minimal BDD).
|
|
23
|
-
|
|
24
|
-
## Executable specs at the code level
|
|
25
|
-
|
|
26
|
-
Prefer **"should …"** phrasing in names (Dan North, 2006). Nest by **behavior context** (e.g. when / given groupings) rather than mirroring production file layout when that obscures intent (§16.5.5 attitude: tests as documentation).
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Example Mapping (Smart & Molak §6.4)
|
|
2
|
-
|
|
3
|
-
Lightweight, breadth-first discovery before code. Sessions are typically **25–30 minutes**.
|
|
4
|
-
|
|
5
|
-
## Core moves
|
|
6
|
-
|
|
7
|
-
- State **rules**, then ask for an **example of each** rule. Examples often use **"The one where …"** phrasing (Daniel Terhorst-North; sometimes called "Friends episode notation").
|
|
8
|
-
- For each example, probe with **"What if …?"**, **"Is this always the case?"**, **"Are there examples where this rule behaves differently?"** Probes can surface **new rules**; add examples for those rules.
|
|
9
|
-
- **Pink cards**: questions that cannot be answered yet — **park** them; do not pretend they are specifications.
|
|
10
|
-
|
|
11
|
-
## Chat algorithm (solo-friendly)
|
|
12
|
-
|
|
13
|
-
1. **Restate the rule or feature** until it is clearly defined.
|
|
14
|
-
2. Generate **3–5** "the one where …" examples from simple to complex.
|
|
15
|
-
3. For each example, run the **three probes** above.
|
|
16
|
-
4. If probes reveal a **new rule** or materially different behavior, add **2–3** examples for that rule and continue probing.
|
|
17
|
-
5. Repeat until examples for each rule are probed.
|
|
18
|
-
6. Compile **rules + examples + parked questions**; confirm with the user before automating tests.
|
|
19
|
-
7. **Time-box** discovery; proceed to failing tests only after the map is agreed.
|
|
20
|
-
|
|
21
|
-
## Parking lot discipline
|
|
22
|
-
|
|
23
|
-
Unanswered questions stay **out of automated tests** until resolved or explicitly accepted as follow-up work.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# bg-agent
|
|
2
|
-
|
|
3
|
-
Delegates a task to a background agent so the main session stays free. Triggered by `/bg-agent`, `bg-agent`, or `background agent for this`.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
This skill picks a suitable agent type for the task, spawns it via the `Agent` tool with `run_in_background: true`, and returns control at once. The spawned agent notifies on completion. Other skills (such as `gotcha`) invoke this skill to offload their own PR-creation steps.
|
|
8
|
-
|
|
9
|
-
## Key file
|
|
10
|
-
|
|
11
|
-
| File | Purpose |
|
|
12
|
-
|---|---|
|
|
13
|
-
| `SKILL.md` | Full instructions: how to parse the task argument, how to pick an agent type, how to write a self-contained spawn prompt, and how to report spawn to the user. |
|
|
14
|
-
|
|
15
|
-
## How this skill is invoked
|
|
16
|
-
|
|
17
|
-
The user types `/bg-agent <task description>` or a calling skill invokes it by name. The skill always spawns with `run_in_background: true` — it never runs the task inline in the main session.
|
package/skills/bg-agent/SKILL.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: bg-agent
|
|
3
|
-
description: Delegates a task to a background agent. Invoked as "bg-agent [task to do]". Claude picks a suitable agent type from the available agents list and spawns it via Agent with run_in_background: true. Triggers on "/bg-agent", "bg-agent", "background agent for this".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# bg-agent
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Delegates a task to a background agent so the main session can continue without waiting. This is the programmatic invocation path for background work — other skills (e.g. gotcha) and the user can both invoke it.
|
|
11
|
-
|
|
12
|
-
**Announce at start:** "Delegating to a background agent: `<one-line summary of task>`."
|
|
13
|
-
|
|
14
|
-
## Instructions
|
|
15
|
-
|
|
16
|
-
### Step 1 — Parse the task
|
|
17
|
-
|
|
18
|
-
The user (or calling skill) provides a task description after `bg-agent`. Example:
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
bg-agent add a gotcha to the rebase skill about force-push lease format
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Extract the full task description from the arguments.
|
|
25
|
-
|
|
26
|
-
### Step 2 — Select the right agent
|
|
27
|
-
|
|
28
|
-
Review the available agent types (listed in the system prompt's Agent tool description) and pick the most suitable one for the task:
|
|
29
|
-
|
|
30
|
-
- **Read-only tasks** (research, search, exploring code) → Explore agent or general-purpose agent.
|
|
31
|
-
- **Code authoring tasks** (writing/editing skill files, creating PRs) → general-purpose agent with `run_in_background: true`.
|
|
32
|
-
- **Specialized tasks** → pick the agent whose description best matches the task. For example, use `pr-description-writer` for PR descriptions, `git-commit-crafter` for commits.
|
|
33
|
-
|
|
34
|
-
If no specialized agent fits, use the general-purpose agent.
|
|
35
|
-
|
|
36
|
-
### Step 3 — Spawn the background agent
|
|
37
|
-
|
|
38
|
-
Use the `Agent` tool with `run_in_background: true`. Write a self-contained prompt that:
|
|
39
|
-
|
|
40
|
-
- States the exact goal and expected output.
|
|
41
|
-
- Lists the files or directories involved (from the caller's context).
|
|
42
|
-
- Includes any constraints (do not create a PR, do not push, etc.).
|
|
43
|
-
- Specifies what success looks like.
|
|
44
|
-
|
|
45
|
-
Example for a gotcha-adding task:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
Agent({
|
|
49
|
-
description: "Add gotcha to skill file",
|
|
50
|
-
prompt: "Add a gotcha entry to packages/claude-dev-env/skills/rebase/SKILL.md. The gotcha is: 'force-push --force-with-lease requires the full <branch>:<sha> format, not just the branch name.' Add it under the ## Gotchas section. If no ## Gotchas section exists, create one at the bottom of the file.",
|
|
51
|
-
subagent_type: "general-purpose",
|
|
52
|
-
run_in_background: true
|
|
53
|
-
})
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Step 4 — Report spawn
|
|
57
|
-
|
|
58
|
-
Confirm the agent was spawned and state its task in one sentence. The caller does not need to wait for completion — background agents notify on completion automatically.
|
|
59
|
-
|
|
60
|
-
## Constraints
|
|
61
|
-
|
|
62
|
-
- Always use `run_in_background: true`. This skill is specifically for background delegation.
|
|
63
|
-
- Never run the task inline in the main session. The point is to offload it.
|
|
64
|
-
- If the task requires a PR, the spawned agent handles the full flow (branch → commit → push → PR).
|
|
65
|
-
- Return control to the caller immediately after spawning. Do not poll for completion.
|
|
66
|
-
|
|
67
|
-
## Gotchas
|
|
68
|
-
|
|
69
|
-
See the gotcha reference at the bottom of this file. When a new gotcha is discovered during use, invoke `/gotcha` to add it here.
|
package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""Configuration constants for the bugteam CODE_RULES gate script."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import re
|
|
6
|
-
|
|
7
|
-
BUGTEAM_CODE_RULES_GATE_PREFIX: str = "bugteam_code_rules_gate: "
|
|
8
|
-
EXIT_CODE_ENFORCER_MISSING: int = 2
|
|
9
|
-
HUNK_HEADER_RAW_PATTERN: str = r"^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@"
|
|
10
|
-
MAXIMUM_ISSUES_TO_REPORT: int = 3
|
|
11
|
-
MAX_VIOLATIONS_PER_CHECK: int = 3
|
|
12
|
-
MAXIMUM_COLUMN_TUPLE_ELEMENT_COUNT: int = 2
|
|
13
|
-
PYTHON_FILE_EXTENSION: str = ".py"
|
|
14
|
-
VIOLATION_LINE_RAW_PATTERN: str = r"^Line (\d+):"
|
|
15
|
-
|
|
16
|
-
FUNCTION_LENGTH_VIOLATION_PATTERN: re.Pattern[str] = re.compile(
|
|
17
|
-
r"\(defined at line (\d+)\) is (\d+) lines"
|
|
18
|
-
)
|
|
19
|
-
FUNCTION_LENGTH_DEFINITION_LINE_GROUP_INDEX: int = 1
|
|
20
|
-
FUNCTION_LENGTH_SPAN_GROUP_INDEX: int = 2
|
|
21
|
-
|
|
22
|
-
ISOLATION_VIOLATION_PATTERN: re.Pattern[str] = re.compile(
|
|
23
|
-
r"\(defined at line (\d+), spanning (\d+) lines\)"
|
|
24
|
-
)
|
|
25
|
-
ISOLATION_DEFINITION_LINE_GROUP_INDEX: int = 1
|
|
26
|
-
ISOLATION_SPAN_GROUP_INDEX: int = 2
|
|
27
|
-
|
|
28
|
-
BANNED_NOUN_VIOLATION_PATTERN: re.Pattern[str] = re.compile(
|
|
29
|
-
r"\(binding span at line (\d+), spanning (\d+) lines\)"
|
|
30
|
-
)
|
|
31
|
-
BANNED_NOUN_DEFINITION_LINE_GROUP_INDEX: int = 1
|
|
32
|
-
BANNED_NOUN_SPAN_GROUP_INDEX: int = 2
|
|
33
|
-
|
|
34
|
-
INLINE_DUPLICATE_BODY_VIOLATION_PATTERN: re.Pattern[str] = re.compile(
|
|
35
|
-
r"\(inline duplicate body spans: helper at line (\d+) spanning (\d+) lines, "
|
|
36
|
-
r"enclosing at line (\d+) spanning (\d+) lines\)"
|
|
37
|
-
)
|
|
38
|
-
INLINE_DUPLICATE_BODY_HELPER_LINE_GROUP_INDEX: int = 1
|
|
39
|
-
INLINE_DUPLICATE_BODY_HELPER_SPAN_GROUP_INDEX: int = 2
|
|
40
|
-
INLINE_DUPLICATE_BODY_ENCLOSING_LINE_GROUP_INDEX: int = 3
|
|
41
|
-
INLINE_DUPLICATE_BODY_ENCLOSING_SPAN_GROUP_INDEX: int = 4
|
|
42
|
-
|
|
43
|
-
ALL_CODE_FILE_EXTENSIONS: frozenset[str] = frozenset(
|
|
44
|
-
{".py", ".js", ".ts", ".tsx", ".jsx"}
|
|
45
|
-
)
|
|
46
|
-
ALL_COLUMN_MAGIC_FALSE_VALUES: frozenset[str] = frozenset(
|
|
47
|
-
{"true", "false", "none", "null"}
|
|
48
|
-
)
|
|
49
|
-
ALL_GIT_DIFF_CACHED_ARGS: tuple[str, ...] = (
|
|
50
|
-
"git",
|
|
51
|
-
"diff",
|
|
52
|
-
"--cached",
|
|
53
|
-
"--name-only",
|
|
54
|
-
"-z",
|
|
55
|
-
)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"""Configuration constants for bugteam_fix_hookspath auto-remediation script."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
HOOKS_PATH_SUFFIX: str = "hooks/git-hooks"
|
|
6
|
-
|
|
7
|
-
ALL_CANONICAL_HOOKS_DIRECTORY_COMPONENTS: tuple[str, str, str] = (
|
|
8
|
-
".claude",
|
|
9
|
-
"hooks",
|
|
10
|
-
"git-hooks",
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
ALL_HOME_ENV_VAR_NAMES: tuple[str, str] = ("HOME", "USERPROFILE")
|
|
14
|
-
|
|
15
|
-
PREFLIGHT_NO_PYTEST_FLAG: str = "--no-pytest"
|
|
16
|
-
|
|
17
|
-
PREFLIGHT_REPO_ROOT_FLAG: str = "--repo-root"
|
|
18
|
-
|
|
19
|
-
ALL_GLOBAL_HOOKS_PATH_ARGUMENTS: tuple[str, ...] = (
|
|
20
|
-
"git",
|
|
21
|
-
"config",
|
|
22
|
-
"--global",
|
|
23
|
-
"--get",
|
|
24
|
-
"core.hooksPath",
|
|
25
|
-
)
|
|
26
|
-
GIT_DIRECTORY_NAME: str = ".git"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"""Configuration constants for the bugteam preflight check script."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
BUGTEAM_PREFLIGHT_SKIP_ENV_VAR_NAME: str = "BUGTEAM_PREFLIGHT_SKIP"
|
|
6
|
-
EXPECTED_HOOKS_PATH_SUFFIX: str = "hooks/git-hooks"
|
|
7
|
-
ENFORCEMENT_ABSENT_MESSAGE: str = (
|
|
8
|
-
"Git-side CODE_RULES enforcement is not active on this host.\n"
|
|
9
|
-
"Run: npx claude-dev-env .\n"
|
|
10
|
-
"Or set core.hooksPath at any scope, e.g.:\n"
|
|
11
|
-
" git config --global core.hooksPath ~/.claude/hooks/git-hooks"
|
|
12
|
-
)
|
|
13
|
-
PYTEST_EXIT_CODE_NO_TESTS_COLLECTED: int = 5
|
|
14
|
-
EXIT_CODE_HOOKS_PATH_CHECK_FAILED: int = 1
|
|
15
|
-
ALL_DISCOVERY_IGNORE_DIRECTORIES: frozenset[str] = frozenset(
|
|
16
|
-
{"site-packages", ".venv", "venv", "node_modules"}
|
|
17
|
-
)
|
|
18
|
-
BUGTEAM_PREFLIGHT_PREFIX: str = "bugteam_preflight: "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ALL_GIT_CONFIG_HOOKS_PATH_ARGUMENTS: tuple[str, ...] = (
|
|
22
|
-
"config",
|
|
23
|
-
"--get",
|
|
24
|
-
"core.hooksPath",
|
|
25
|
-
)
|
|
26
|
-
ALL_PRE_COMMIT_ARGUMENTS: tuple[str, ...] = (
|
|
27
|
-
"pre-commit",
|
|
28
|
-
"run",
|
|
29
|
-
"--all-files",
|
|
30
|
-
)
|
|
31
|
-
GIT_DIRECTORY_NAME: str = ".git"
|
|
32
|
-
PYTEST_INI_FILENAME: str = "pytest.ini"
|
|
33
|
-
PYPROJECT_FILENAME: str = "pyproject.toml"
|
|
34
|
-
PYPROJECT_PYTEST_SECTION_PREFIX: str = "[tool.pytest"
|
|
35
|
-
PRE_COMMIT_CONFIG_FILENAME: str = ".pre-commit-config.yaml"
|
package/skills/caveman/CLAUDE.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# caveman
|
|
2
|
-
|
|
3
|
-
Trims noise from conversational text in the current turn. Triggered by `/caveman`, `caveman this`, `trim this`, `make it terse`, or `caveman voice`.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
The inline counterpart to the `caveman` agent. When the user wants preamble, hedging, filler transitions, restatements, empty future-proofing, dead examples, or pleasantries stripped from the last assistant message or from text passed as an argument, this skill performs the trim directly in the main session — no `Agent` spawn. The entire reply is the trimmed text; no report, no commentary about what was cut.
|
|
8
|
-
|
|
9
|
-
Use the `caveman` agent (`subagent_type: caveman`) when the input is a file path, a multi-section artifact that needs a structured report, or a delegated workflow.
|
|
10
|
-
|
|
11
|
-
## Key file
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | Instructions: resolve the source (argument or prior message), noise categories to cut, what to preserve verbatim, and the escape hatch for load-bearing spans. |
|
package/skills/caveman/SKILL.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: caveman
|
|
3
|
-
description: "Inline counterpart to the caveman agent — trim noise from `$ARGUMENTS` (or the previous assistant message) and reply with the trimmed text only, no report, no Agent spawn. Triggers: /caveman, caveman this, trim this, make it terse, caveman voice."
|
|
4
|
-
argument-hint: "[text to trim, or omit and the model uses the previous assistant message]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Caveman
|
|
8
|
-
|
|
9
|
-
Inline counterpart to the `caveman` agent at `packages/claude-dev-env/agents/caveman.md`. Use this skill when the trim target is conversational text in the current turn rather than a separate file or multi-section artifact. The model performs the trim itself in the next reply — no `Agent` invocation, no structured report, just the trimmed text.
|
|
10
|
-
|
|
11
|
-
## Instructions
|
|
12
|
-
|
|
13
|
-
1. **Resolve the source.** If `$ARGUMENTS` is non-empty, that text is the trim source. Otherwise the source is the previous assistant message in the current conversation.
|
|
14
|
-
|
|
15
|
-
2. **Trim the same noise categories the agent trims:**
|
|
16
|
-
|
|
17
|
-
| Noise type | Example |
|
|
18
|
-
|---|---|
|
|
19
|
-
| Preamble / recap | "As discussed above, this skill will..." |
|
|
20
|
-
| Hedging | "This might, in some cases, potentially..." |
|
|
21
|
-
| Filler transitions | "Now, moving on to..." / "It's worth noting that..." |
|
|
22
|
-
| Restatement | the same point made twice in different words |
|
|
23
|
-
| Empty future-proofing | parameters, sections, or fields with no current consumer |
|
|
24
|
-
| Dead examples | examples that duplicate another example without adding coverage |
|
|
25
|
-
| Pleasantries | "Hope this helps." / "Feel free to..." |
|
|
26
|
-
| Vague qualifiers | "various", "several", "a number of" — replace with the actual count or cut |
|
|
27
|
-
|
|
28
|
-
3. **Preserve verbatim:** code, commands, paths, URLs, errors, JSON, schemas, frontmatter, counts, version strings, identifiers, safety/destructive-op language, and anything the user explicitly flagged as keep-as-is.
|
|
29
|
-
|
|
30
|
-
4. **Output only the trimmed text.** No `trimmed / removed / preserved-verbatim / flagged` report. No commentary about what was cut. No preamble like "Here is the trimmed version:". The trimmed text is the entire reply.
|
|
31
|
-
|
|
32
|
-
## Escape hatch
|
|
33
|
-
|
|
34
|
-
If trimming would drop a safety warning, collapse a deliberate distinction, or you are unsure whether a span is load-bearing, leave that span in place verbatim. Do not flag, narrate, or ask about the preserved span — instruction 4 still applies, so the trimmed text (with the preserved span included) remains the entire reply. Terse is for noise, not for substance.
|
|
35
|
-
|
|
36
|
-
## When NOT to use
|
|
37
|
-
|
|
38
|
-
Use the `caveman` agent (via `Task` / `Agent` tool with `subagent_type: caveman`) when the input is a file path, a multi-section artifact requiring the structured `trimmed / removed / preserved-verbatim / flagged` report, or any delegated workflow. This skill is for inline conversational text only.
|
package/skills/code/CLAUDE.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# code
|
|
2
|
-
|
|
3
|
-
Activates strict code standards for the entire implementation session. Triggered by `/code`, `code standards`, `strict code`, `enforce standards`, or `implement with standards`.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
Prepends a set of binary completion criteria to every implementation task: no `Any`, no `cast()`, no `# type: ignore`, treated-as-immutable TypedDicts with explicit `_encode_*`/`_decode_*` functions, 100% statement and branch coverage, zero mocks, zero stubs, zero fallbacks, and proper module structure. Every criterion is pass-or-fail; partial credit does not exist.
|
|
8
|
-
|
|
9
|
-
## Key file
|
|
10
|
-
|
|
11
|
-
| File | Purpose |
|
|
12
|
-
|---|---|
|
|
13
|
-
| `SKILL.md` | Sixteen numbered criteria (typing strictness, error handling, test coverage, DI hooks, DRY, TypedDict protocol, Redis boundary, TOML boundary, JSON recursive types, ASGI boundaries, dynamic import pattern, documentation, build infrastructure, lint gates, Protocol signature match, auth/credentials), plus gotchas for Windows PowerShell invocation and per-module `_test_hooks.py` placement. |
|
|
14
|
-
|
|
15
|
-
## Invocation note
|
|
16
|
-
|
|
17
|
-
Invoke at the start of an implementation task. The standards persist for the full session. The skill refuses research or planning tasks and redirects them to `/anthropic-plan`.
|