claude-dev-env 1.68.0 → 1.69.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 (120) hide show
  1. package/_shared/CLAUDE.md +13 -0
  2. package/_shared/pr-loop/CLAUDE.md +24 -0
  3. package/_shared/pr-loop/scripts/CLAUDE.md +30 -0
  4. package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +21 -0
  5. package/_shared/pr-loop/scripts/tests/CLAUDE.md +32 -0
  6. package/agents/CLAUDE.md +29 -0
  7. package/audit-rubrics/CLAUDE.md +41 -0
  8. package/audit-rubrics/category_rubrics/CLAUDE.md +36 -0
  9. package/audit-rubrics/prompts/CLAUDE.md +36 -0
  10. package/bin/CLAUDE.md +28 -0
  11. package/commands/CLAUDE.md +25 -0
  12. package/docs/CLAUDE.md +28 -0
  13. package/docs/references/CLAUDE.md +13 -0
  14. package/hooks/CLAUDE.md +31 -0
  15. package/hooks/advisory/CLAUDE.md +16 -0
  16. package/hooks/blocking/CLAUDE.md +107 -0
  17. package/hooks/blocking/code_rules_constants_config.py +7 -4
  18. package/hooks/blocking/code_rules_docstrings.py +97 -0
  19. package/hooks/blocking/code_rules_enforcer.py +4 -0
  20. package/hooks/blocking/config/CLAUDE.md +22 -0
  21. package/hooks/blocking/test_code_rules_enforcer_class_docstring_methods.py +262 -0
  22. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +36 -0
  23. package/hooks/blocking/test_code_rules_enforcer_file_global_constants.py +9 -0
  24. package/hooks/diagnostic/CLAUDE.md +43 -0
  25. package/hooks/diagnostic/migrations/CLAUDE.md +16 -0
  26. package/hooks/diagnostic/queries/CLAUDE.md +19 -0
  27. package/hooks/git-hooks/CLAUDE.md +28 -0
  28. package/hooks/git-hooks/git_hooks_constants/CLAUDE.md +21 -0
  29. package/hooks/hooks_constants/CLAUDE.md +60 -0
  30. package/hooks/hooks_constants/blocking_check_limits.py +2 -0
  31. package/hooks/lifecycle/CLAUDE.md +18 -0
  32. package/hooks/observability/CLAUDE.md +16 -0
  33. package/hooks/session/CLAUDE.md +21 -0
  34. package/hooks/validation/CLAUDE.md +19 -0
  35. package/hooks/validators/CLAUDE.md +49 -0
  36. package/hooks/workflow/CLAUDE.md +22 -0
  37. package/package.json +1 -1
  38. package/rules/CLAUDE.md +46 -0
  39. package/rules/docstring-prose-matches-implementation.md +1 -1
  40. package/scripts/CLAUDE.md +34 -0
  41. package/scripts/dev_env_scripts_constants/CLAUDE.md +14 -0
  42. package/scripts/sync_to_cursor/CLAUDE.md +23 -0
  43. package/scripts/tests/CLAUDE.md +18 -0
  44. package/skills/CLAUDE.md +66 -0
  45. package/skills/_shared/CLAUDE.md +11 -0
  46. package/skills/_shared/pr-loop/CLAUDE.md +27 -0
  47. package/skills/_shared/pr-loop/prompts/CLAUDE.md +9 -0
  48. package/skills/_shared/pr-loop/scripts/CLAUDE.md +23 -0
  49. package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +19 -0
  50. package/skills/anthropic-plan/CLAUDE.md +34 -0
  51. package/skills/anthropic-plan/SKILL.md +1 -1
  52. package/skills/anthropic-plan/scripts/CLAUDE.md +11 -0
  53. package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/CLAUDE.md +16 -0
  54. package/skills/anthropic-plan/templates/CLAUDE.md +13 -0
  55. package/skills/anthropic-plan/workflow/CLAUDE.md +14 -0
  56. package/skills/auditing-claude-config/CLAUDE.md +20 -0
  57. package/skills/autoconverge/CLAUDE.md +30 -0
  58. package/skills/autoconverge/reference/CLAUDE.md +12 -0
  59. package/skills/autoconverge/workflow/CLAUDE.md +23 -0
  60. package/skills/autoconverge/workflow/autoconverge_report_constants/CLAUDE.md +16 -0
  61. package/skills/bdd-protocol/CLAUDE.md +26 -0
  62. package/skills/bdd-protocol/references/CLAUDE.md +10 -0
  63. package/skills/bg-agent/CLAUDE.md +17 -0
  64. package/skills/bugteam/CLAUDE.md +30 -0
  65. package/skills/bugteam/reference/CLAUDE.md +22 -0
  66. package/skills/bugteam/reference/obstacles/CLAUDE.md +24 -0
  67. package/skills/bugteam/scripts/CLAUDE.md +36 -0
  68. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +20 -0
  69. package/skills/caveman/CLAUDE.md +15 -0
  70. package/skills/code/CLAUDE.md +17 -0
  71. package/skills/copilot-review/CLAUDE.md +17 -0
  72. package/skills/deep-research/CLAUDE.md +17 -0
  73. package/skills/doc-gist/CLAUDE.md +25 -0
  74. package/skills/doc-gist/references/CLAUDE.md +9 -0
  75. package/skills/doc-gist/references/examples/CLAUDE.md +25 -0
  76. package/skills/doc-gist/scripts/CLAUDE.md +27 -0
  77. package/skills/doc-gist/scripts/doc_gist_scripts_constants/CLAUDE.md +10 -0
  78. package/skills/everything-search/CLAUDE.md +17 -0
  79. package/skills/findbugs/CLAUDE.md +20 -0
  80. package/skills/fixbugs/CLAUDE.md +19 -0
  81. package/skills/fresh-branch/CLAUDE.md +15 -0
  82. package/skills/gh-paginate/CLAUDE.md +18 -0
  83. package/skills/gotcha/CLAUDE.md +33 -0
  84. package/skills/implement/CLAUDE.md +27 -0
  85. package/skills/implement/scripts/CLAUDE.md +22 -0
  86. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +22 -0
  87. package/skills/logifix/CLAUDE.md +36 -0
  88. package/skills/logifix/scripts/CLAUDE.md +16 -0
  89. package/skills/monitor-open-prs/CLAUDE.md +34 -0
  90. package/skills/monitor-open-prs/scripts/CLAUDE.md +17 -0
  91. package/skills/pr-consistency-audit/CLAUDE.md +34 -0
  92. package/skills/pr-consistency-audit/reference/CLAUDE.md +16 -0
  93. package/skills/pr-converge/CLAUDE.md +29 -0
  94. package/skills/pr-converge/pr_converge_skill_constants/CLAUDE.md +26 -0
  95. package/skills/pr-converge/reference/CLAUDE.md +27 -0
  96. package/skills/pr-converge/reference/obstacles/CLAUDE.md +23 -0
  97. package/skills/pr-converge/scripts/CLAUDE.md +36 -0
  98. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +17 -0
  99. package/skills/pr-converge/workflows/CLAUDE.md +16 -0
  100. package/skills/pr-review-responder/CLAUDE.md +35 -0
  101. package/skills/pre-compact/CLAUDE.md +24 -0
  102. package/skills/qbug/CLAUDE.md +40 -0
  103. package/skills/rebase/CLAUDE.md +32 -0
  104. package/skills/recall/CLAUDE.md +30 -0
  105. package/skills/refine/CLAUDE.md +44 -0
  106. package/skills/refine/templates/CLAUDE.md +17 -0
  107. package/skills/remember/CLAUDE.md +31 -0
  108. package/skills/research-mode/CLAUDE.md +35 -0
  109. package/skills/session-log/CLAUDE.md +31 -0
  110. package/skills/session-tidy/CLAUDE.md +36 -0
  111. package/skills/skill-builder/CLAUDE.md +45 -0
  112. package/skills/skill-builder/references/CLAUDE.md +19 -0
  113. package/skills/skill-builder/templates/CLAUDE.md +14 -0
  114. package/skills/skill-builder/workflows/CLAUDE.md +17 -0
  115. package/skills/structure-prompt/CLAUDE.md +42 -0
  116. package/skills/structure-prompt/reference/CLAUDE.md +28 -0
  117. package/skills/task-build/CLAUDE.md +28 -0
  118. package/skills/update/CLAUDE.md +38 -0
  119. package/skills/verified-build/CLAUDE.md +33 -0
  120. package/system-prompts/CLAUDE.md +17 -0
@@ -0,0 +1,33 @@
1
+ # gotcha skill
2
+
3
+ Captures an obstacle encountered during a skill run and records it as a gotcha entry in the relevant skill file, then opens a draft PR via the `fresh-branch` skill.
4
+
5
+ **Trigger:** `/gotcha`, "add a gotcha", "document this gotcha", "record this obstacle".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full workflow: collect obstacle details, delegate to `bg-agent`, confirm to user |
12
+
13
+ ## Workflow
14
+
15
+ 1. Distill the obstacle into: which skill file was affected, what happened, what the user did to resolve it, and what to do differently next time.
16
+ 2. Invoke `/bg-agent` with a self-contained prompt that instructs the agent to use `/fresh-branch` (branch name `gotcha/<short-slug>`), append to or create a `## Gotchas` section at the bottom of the skill file, commit, push, and open a draft PR.
17
+ 3. Confirm to the user that the recording is running in the background.
18
+
19
+ ## Gotcha entry format
20
+
21
+ Each entry is a bullet under `## Gotchas`:
22
+
23
+ ```markdown
24
+ - **<title>:** <what happens>. <what to do instead>.
25
+ ```
26
+
27
+ ## Repo routing
28
+
29
+ | Skill location | Target repo |
30
+ |---|---|
31
+ | `packages/claude-dev-env/skills/<name>/` | `jl-cmd/claude-code-config` |
32
+ | `~/.claude/skills/<name>/` | `jl-cmd/claude-code-config` |
33
+ | Project `.claude/skills/<name>/` | That project's repo |
@@ -0,0 +1,27 @@
1
+ # Spec Execution Skill
2
+
3
+ This skill (`implement`) runs a spec end-to-end while maintaining a sidecar `implementation-notes.html` that records design decisions, deviations, tradeoffs, and open questions made during the build.
4
+
5
+ **Trigger:** `/implement [path-to-spec]`, "build out this plan and keep notes".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full workflow: resolve spec, run it, write notes via `append_note.py` |
12
+ | `packages/claude-dev-env/skills/implement/scripts/append_note.py` | CLI that creates or appends to `implementation-notes.html` |
13
+ | `packages/claude-dev-env/skills/implement/scripts/implement_scripts_constants/notes_constants.py` | Section slugs → headings and default filename |
14
+
15
+ ## Subdirectories
16
+
17
+ | Directory | Role |
18
+ |---|---|
19
+ | `scripts/` | Python CLI and constants for the notes file |
20
+
21
+ ## Conventions
22
+
23
+ - The spec is taken from `$ARGUMENTS` (path) or the most recent plan in conversation context. If neither is present, the skill asks via `AskUserQuestion`.
24
+ - Notes are appended as decisions are made — not batched at the end.
25
+ - The `append_note.py` CLI accepts `--section decisions|deviations|tradeoffs|questions`, `--about`, `--note`, and optionally `--file`. When `--file` is omitted, the script writes to `./implementation-notes.html`.
26
+ - `$CLAUDE_SKILL_DIR` is substituted by Claude Code at runtime so the bundled script is found regardless of the current working directory.
27
+ - The notes file structure must not be hand-edited — `append_note.py` locates sections by `<section id="...">` markers and the first `</ul>` after each.
@@ -0,0 +1,22 @@
1
+ # scripts (spec-build skill)
2
+
3
+ Support scripts for the spec-build (`implement`) skill. These scripts create and append to the `implementation-notes.html` sidecar file the skill maintains during a spec build.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `append_note.py` | CLI that creates `implementation-notes.html` with four sections on first run and appends a `<li>` to a named section on later runs |
10
+ | `test_append_note.py` | Tests for `append_note.py` |
11
+
12
+ ## Subdirectories
13
+
14
+ | Directory | Role |
15
+ |---|---|
16
+ | `implement_scripts_constants/` | Section slug → heading map and default filename constant |
17
+
18
+ ## Conventions
19
+
20
+ - `append_note.py` imports section metadata from `implement_scripts_constants.notes_constants`.
21
+ - HTML-escaping of `--about` and `--note` is handled by the script; callers pass raw text.
22
+ - The script is invoked as `python "${CLAUDE_SKILL_DIR}/scripts/append_note.py"` from within the skill, where `$CLAUDE_SKILL_DIR` resolves to the installed skill directory at runtime.
@@ -0,0 +1,22 @@
1
+ # implement_scripts_constants
2
+
3
+ Constants module for the `implement` skill's `append_note.py` script.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `__init__.py` | Package marker |
10
+ | `notes_constants.py` | `HEADING_BY_SLUG` dict (section slugs → display headings) and `DEFAULT_NOTES_FILENAME` |
11
+
12
+ ## Exported constants
13
+
14
+ | Constant | Value | Used by |
15
+ |---|---|---|
16
+ | `HEADING_BY_SLUG` | `{"decisions": "Design decisions", "deviations": "Deviations", "tradeoffs": "Tradeoffs", "questions": "Open questions"}` | `append_note.py` — maps `--section` slug to the `<h2>` heading in the HTML file |
17
+ | `DEFAULT_NOTES_FILENAME` | `"implementation-notes.html"` | `append_note.py` — default output path when `--file` is omitted |
18
+
19
+ ## Conventions
20
+
21
+ - This module is imported directly by `append_note.py` in the parent `scripts/` directory.
22
+ - Adding a new section requires a new entry in `HEADING_BY_SLUG` and a matching branch in `append_note.py`.
@@ -0,0 +1,36 @@
1
+ # logifix skill
2
+
3
+ Restores the Logitech Gaming Software (LCore) tray icon when it disappears on Windows. Runs a PowerShell script that reproduces the verified recovery procedure.
4
+
5
+ **Trigger:** `/logifix`, "logitech tray icon missing", "LCore tray gone", "logitech is not loaded".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full procedure description, invocation options, fallback steps |
12
+ | `scripts/logifix.ps1` | PowerShell script that runs the recovery procedure |
13
+
14
+ ## Subdirectories
15
+
16
+ | Directory | Role |
17
+ |---|---|
18
+ | `scripts/` | The PowerShell recovery script |
19
+
20
+ ## What the script does
21
+
22
+ 1. Takes a state snapshot (Explorer instances, Logitech services, LCore process).
23
+ 2. Stops LCore in user context.
24
+ 3. Runs one elevated UAC step: starts `LogiRegistryService`, stops `explorer.exe`, and lets Windows shell auto-respawn rebuild it (does **not** call `Start-Process explorer` from the elevated block).
25
+ 4. Waits for shell auto-respawn (default 5 seconds).
26
+ 5. Confirms exactly one Explorer in the user's session.
27
+ 6. Runs `LCoreRelaunchAttemptCount` full stop-then-launch cycles of `LCore.exe /minimized` (default 2). Always runs the full count.
28
+ 7. Takes a final state snapshot.
29
+
30
+ ## Invocation
31
+
32
+ ```
33
+ /logifix
34
+ ```
35
+
36
+ Optional parameters: `-ExplorerAutoRespawnWaitSeconds`, `-LCoreInitializationWaitSeconds`, `-LCoreRelaunchAttemptCount`.
@@ -0,0 +1,16 @@
1
+ # logifix/scripts
2
+
3
+ PowerShell recovery script for the `logifix` skill.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `logifix.ps1` | Restores the LCore tray icon: stops LCore, runs one elevated UAC step (starts `LogiRegistryService`, stops explorer, lets Windows auto-respawn), then re-launches LCore a configurable number of times |
10
+
11
+ ## Conventions
12
+
13
+ - The script accepts three optional parameters: `-ExplorerAutoRespawnWaitSeconds` (default 5), `-LCoreInitializationWaitSeconds` (default 5), `-LCoreRelaunchAttemptCount` (default 2).
14
+ - The full relaunch count always runs — an early-exit on a responsive LCore is intentional behavior per the recovery procedure.
15
+ - The elevated block does **not** call `Start-Process explorer`; Windows shell auto-respawn handles that to avoid a duplicate admin-context Explorer.
16
+ - Run directly as: `pwsh -File "$HOME\.claude\skills\logifix\scripts\logifix.ps1"`.
@@ -0,0 +1,34 @@
1
+ # monitor-open-prs skill
2
+
3
+ Discovers every open pull request across the `jl-cmd/*` and `JonEcho/*` owner scopes, dispatches `/bugteam` on each with the `--bugbot-retrigger` flag, and polls for new Cursor bugbot replies after each bugteam run.
4
+
5
+ **Trigger:** `/monitor-open-prs`, "sweep the open PRs", "audit the open PR backlog".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full workflow: refusal cases, discovery, dispatch, post-convergence polling, final report |
12
+ | `test_skill_contract.py` | Contract tests for the skill |
13
+ | `packages/claude-dev-env/skills/monitor-open-prs/scripts/discover_open_prs.py` | Shells out to `gh search prs` per owner scope and flattens results to a uniform dict shape |
14
+ | `packages/claude-dev-env/skills/monitor-open-prs/scripts/test_discover_open_prs.py` | Tests for the discovery helper |
15
+
16
+ ## Subdirectories
17
+
18
+ | Directory | Role |
19
+ |---|---|
20
+ | `scripts/` | Discovery helper and its tests |
21
+
22
+ ## Workflow summary
23
+
24
+ 1. Call `discover_open_prs.discover_open_prs(all_owners=["jl-cmd", "JonEcho"])` to get the full open-PR list.
25
+ 2. For each PR, invoke `/bugteam --bugbot-retrigger <pr_number>` (omit `--bugbot-retrigger` if `CLAUDE_REVIEWS_DISABLED` has `bugbot`).
26
+ 3. After each bugteam run, poll for new bugbot comments on a 60s → 120s → 240s → 480s → 960s backoff. Re-invoke bugteam if new findings appear.
27
+ 4. Emit a sweep summary when all PRs exit polling.
28
+
29
+ ## Refusals (checked first)
30
+
31
+ - `CLAUDE_REVIEWS_DISABLED` has `bugteam` → stop with a message.
32
+ - GitHub API not accessible → stop.
33
+ - Uncommitted changes in the caller's repo → stop.
34
+ - Required subagent types missing (`code-quality-agent`, `clean-coder`) → stop.
@@ -0,0 +1,17 @@
1
+ # monitor-open-prs/scripts
2
+
3
+ Discovery helper for the `monitor-open-prs` skill.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `discover_open_prs.py` | Queries `gh search prs` for each owner scope and flattens results to a uniform list of dicts |
10
+ | `test_discover_open_prs.py` | Tests for the discovery helper |
11
+
12
+ ## Conventions
13
+
14
+ - `discover_open_prs(all_owners: list[str]) -> list[dict]` is the single entry point. It shells out to `gh search prs --owner <owner> --state open --json number,repository,url,headRefName,baseRefName` once per owner and merges the results.
15
+ - Each returned dict has keys: `number`, `owner`, `repo`, `head_ref`, `base_ref`, `url`.
16
+ - An empty scope or an empty sweep returns an empty list and exits cleanly with no errors.
17
+ - The module is stateless and has no filesystem side effects.
@@ -0,0 +1,34 @@
1
+ # pr-consistency-audit skill
2
+
3
+ Audits a PR for cross-file inconsistencies: wrong argument names, missing required args, references to files or scripts that do not exist, stale feature remnants, docstring-vs-code mismatches, placeholder text, cross-file contradictions, parameter naming convention violations, and cross-platform bugs.
4
+
5
+ **Trigger:** "audit this PR", "find inconsistencies", "cross-reference docs against scripts", "check for stale references", "PR consistency audit".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full process: build manifest, find canonical sources, run 10 detection rules, produce summary |
12
+ | `reference/detection-rules.md` | All 10 detection rules with procedures |
13
+ | `reference/illustrations.md` | Concrete examples of findings with why-they-matter explanations |
14
+
15
+ ## Subdirectories
16
+
17
+ | Directory | Role |
18
+ |---|---|
19
+ | `reference/` | Detection rules and worked illustrations |
20
+
21
+ ## Process overview
22
+
23
+ 1. **Build manifest** — read every changed file; track argparse args, MCP tool calls, shell commands, file path references, named constants, and docstring claims. Write to a temp JSON file.
24
+ 2. **Find canonical sources** — note which files define the ground truth for each concept (schemas, payloads, config files, `.py` sources).
25
+ 3. **Run all 10 detection rules** — write each finding at once to a temp CSV with `file_path | line_number | rule_id | severity | what_is_wrong | what_it_should_be | evidence_path | evidence_detail`.
26
+ 4. **Produce summary** — print totals by rule and severity; list top findings; cite the CSV and manifest paths.
27
+
28
+ ## Severity
29
+
30
+ | Severity | Meaning |
31
+ |---|---|
32
+ | P0 | Runtime failure — the command or tool call will error |
33
+ | P1 | Confusing or wrong — will mislead but not crash |
34
+ | P2 | Cleanup — stale references, docs out of sync |
@@ -0,0 +1,16 @@
1
+ # pr-consistency-audit/reference
2
+
3
+ Reference material for the `pr-consistency-audit` skill. These files define the detection rules the skill runs and show worked examples of findings.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `detection-rules.md` | All 10 detection rules, each with a procedure for how to run it |
10
+ | `illustrations.md` | Concrete examples of findings with explanations of why each matters |
11
+
12
+ ## Conventions
13
+
14
+ - The skill reads `detection-rules.md` during Step 3 (run detection rules). Every rule must run against every file; none are skippable.
15
+ - Rule 1 (canonical-source cross-reference) is the highest-signal rule. The skill runs it first.
16
+ - `illustrations.md` is for reviewers and skill authors, not for the skill's runtime process.
@@ -0,0 +1,29 @@
1
+ # pr-converge skill
2
+
3
+ Drives a draft PR to convergence by looping Cursor Bugbot, a code-review pass, a second-opinion bug audit (`bugteam`), and Copilot — applying TDD fixes, posting inline replies, and re-triggering reviewers each tick until all reviewers are clean on the same HEAD and the PR is mergeable.
4
+
5
+ **Trigger:** `/pr-converge`, "drive PR to convergence", "loop bugbot and bugteam", "babysit bugbot and bugteam", "until both are clean", "converge this PR".
6
+
7
+ ## Key files
8
+
9
+ | File | Purpose |
10
+ |---|---|
11
+ | `SKILL.md` | Full tick workflow, pre-flight checks, state schema, budget-aware tick boundaries, stop conditions |
12
+ | `pr_converge_skill_constants/constants.py` | Runtime and API constants (bot logins, review states, GH API path templates, regex patterns) |
13
+
14
+ ## Subdirectories
15
+
16
+ | Directory | Role |
17
+ |---|---|
18
+ | `pr_converge_skill_constants/` | Importable constants module shared by skill scripts |
19
+ | `reference/` | Per-tick steps, convergence gates, fix protocol, obstacle runbooks, state schema, stop conditions, examples |
20
+ | `scripts/` | Python helpers (bugbot check, convergence check, Copilot review fetcher, fix-reply poster, reflow tool) and their tests |
21
+ | `workflows/` | ScheduleWakeup loop pacing specification |
22
+
23
+ ## Conventions
24
+
25
+ - Each invocation runs one tick. The next tick is scheduled via `ScheduleWakeup` unless convergence or a stop condition has been reached.
26
+ - Loop state persists to `$CLAUDE_JOB_DIR/pr-converge-state.json` between ticks.
27
+ - The pre-flight gate requires `EnterWorktree` before any file read or API call, and confirms `ScheduleWakeup` is in the tool list.
28
+ - All findings and PR reports state verified facts only — no hedging language.
29
+ - The GitHub MCP (`pull_request_read`, `pull_request_review_write`) is the primary path for PR inspection; `gh api` is the fallback.
@@ -0,0 +1,26 @@
1
+ # pr_converge_skill_constants
2
+
3
+ Importable Python constants module for the `pr-converge` skill. Script-specific constants (CLI args, markdown patterns, reflow settings) live in `scripts/pr_converge_scripts_constants/` and import from here.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `__init__.py` | Package marker |
10
+ | `constants.py` | All runtime and API constants: bot logins, review states, GH API path templates, bugbot/bugteam detection patterns, exit codes |
11
+
12
+ ## Exported constants (selected)
13
+
14
+ | Constant | Purpose |
15
+ |---|---|
16
+ | `CURSOR_BOT_LOGIN` | Login string for the Cursor bugbot reviewer |
17
+ | `COPILOT_REVIEWER_LOGIN` | Login string for the Copilot reviewer bot |
18
+ | `ALL_COPILOT_CLEAN_REVIEW_STATES` | Tuple of review states that count as clean for Copilot |
19
+ | `BUGBOT_DIRTY_BODY_REGEX` | Regex that matches a bugbot review body reporting findings |
20
+ | `GH_REVIEWS_PATH_TEMPLATE` | `gh api` path template for PR reviews |
21
+ | `GH_INLINE_COMMENTS_PATH_TEMPLATE` | `gh api` path template for PR inline comments |
22
+
23
+ ## Conventions
24
+
25
+ - All path templates use `str.format(**kwargs)` with keys `owner`, `repo`, `number`.
26
+ - `packages/claude-dev-env/skills/pr-converge/scripts/pr_converge_scripts_constants/pr_converge_constants.py` re-exports everything here via `from pr_converge_skill_constants.constants import ...` so scripts can import from either location.
@@ -0,0 +1,27 @@
1
+ # pr-converge/reference
2
+
3
+ Reference documents for the `pr-converge` skill. These files define the per-tick step sequence, convergence gates, fix protocol, stop conditions, state schema, multi-PR orchestration, and examples.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `per-tick.md` | Step-by-step procedure for one tick (resolve HEAD, run BUGBOT, CODE_REVIEW, BUGTEAM, COPILOT_WAIT phases, schedule next wakeup) |
10
+ | `convergence-gates.md` | Six gates that must all pass before the PR is marked ready for review |
11
+ | `fix-protocol.md` | How to apply fixes: TDD first, one commit per fix round, reply to each finding inline |
12
+ | `ground-rules.md` | Non-negotiable constraints for the convergence loop |
13
+ | `stop-conditions.md` | Conditions that end the loop without convergence (cap reached, stuck, user stop) |
14
+ | `state-schema.md` | Fields in `pr-converge-state.json` and their meanings |
15
+ | `multi-pr-orchestration.md` | How to run the loop across multiple PRs in parallel |
16
+ | `examples.md` | Worked examples of tick sequences |
17
+
18
+ ## Subdirectories
19
+
20
+ | Directory | Role |
21
+ |---|---|
22
+ | `obstacles/` | Per-obstacle runbooks for known failure modes in the convergence loop |
23
+
24
+ ## Conventions
25
+
26
+ - `per-tick.md` is the primary reference loaded during each tick. The pacing workflow lives in `../workflows/schedule-wakeup-loop.md`.
27
+ - Every gate in `convergence-gates.md` must produce evidence before the next gate runs.
@@ -0,0 +1,23 @@
1
+ # pr-converge/reference/obstacles
2
+
3
+ Per-obstacle runbooks for known failure modes in the `pr-converge` convergence loop. Each file covers one specific obstacle: what causes it, how to detect it, and how to recover.
4
+
5
+ ## Files
6
+
7
+ | File | Obstacle |
8
+ |---|---|
9
+ | `fix-post-replies.md` | Posting inline review replies fails or posts to the wrong thread |
10
+ | `fix-publish-summary.md` | Publishing the bugteam summary comment fails |
11
+ | `fix-push.md` | `git push` fails during a fix commit |
12
+ | `fix-read-filelines.md` | Reading file line ranges for a fix fails |
13
+ | `fix-reset-state.md` | State JSON becomes corrupt or inconsistent between ticks |
14
+ | `fix-resolve-threads.md` | Resolving inline comment threads via GraphQL fails |
15
+ | `fix-spawn-clean-coder.md` | Spawning the `clean-coder` subagent fails or produces no output |
16
+ | `fix-stage-commit.md` | Staging or committing a fix fails |
17
+ | `fix-trigger-bugbot.md` | Triggering Cursor Bugbot via an issue comment fails |
18
+ | `fix-write-test.md` | Writing a failing test before a fix fails |
19
+
20
+ ## Conventions
21
+
22
+ - Each runbook is loaded on demand when the convergence loop hits that specific obstacle.
23
+ - Runbooks do not overlap with `per-tick.md`; they cover edge cases and recovery paths that fall outside the normal tick flow.
@@ -0,0 +1,36 @@
1
+ # pr-converge/scripts
2
+
3
+ Python helper scripts for the `pr-converge` skill, plus their tests and a PowerShell/AutoHotkey toolset for advancing Cursor agents.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `check_bugbot_ci.py` | Checks bugbot CI check-run status on a given SHA |
10
+ | `check_convergence.py` | Evaluates whether all convergence gates pass on the current HEAD |
11
+ | `check_pending_reviews.py` | Fetches pending review requests and reviewer states |
12
+ | `fetch_copilot_reviews.py` | Fetches Copilot reviewer reviews filtered to the current HEAD |
13
+ | `post_fix_reply.py` | Posts an inline reply to a review comment thread |
14
+ | `reflow_skill_md.py` | Reformats `SKILL.md` to enforce a line width limit |
15
+ | `README.md` | MCP tool reference for PR operations used by the scripts |
16
+ | `test_check_bugbot_ci.py` | Tests for `check_bugbot_ci.py` |
17
+ | `test_check_convergence.py` | Tests for `check_convergence.py` |
18
+ | `test_cursor_agents_continue.py` | Tests for the cursor-agents-continue toolset |
19
+ | `test_reflow_skill_md.py` | Tests for `reflow_skill_md.py` |
20
+ | `caller-window-pid.ps1` | Gets the PID of the calling terminal window |
21
+ | `cursor-agents-continue.ahk` | AutoHotkey script to advance Cursor agent prompts |
22
+ | `cursor-agents-continue.cmd` | CMD wrapper for the AHK script |
23
+ | `cursor-agents-continue-stop-others.ps1` | Stops other Cursor agents before advancing one |
24
+ | `cursor-agents-continue-caller.cmd` | Caller-side CMD wrapper |
25
+
26
+ ## Subdirectories
27
+
28
+ | Directory | Role |
29
+ |---|---|
30
+ | `pr_converge_scripts_constants/` | Script-specific constants (re-exports skill constants plus adds reflow/CLI constants) |
31
+
32
+ ## Conventions
33
+
34
+ - Scripts import constants from `pr_converge_scripts_constants.pr_converge_constants`, which re-exports everything from `pr_converge_skill_constants.constants`.
35
+ - Run scripts as `python ~/.claude/skills/pr-converge/scripts/<script>.py --owner <O> --repo <R> --pr-number <N>`.
36
+ - The `reflow_skill_md.py` script targets `SKILL.md` in the parent skill directory (resolved via `TARGET_SKILL_PATH` in `pr_converge_scripts_constants/reflow_skill_md_constants.py`).
@@ -0,0 +1,17 @@
1
+ # pr_converge_scripts_constants
2
+
3
+ Constants module for the `pr-converge` skill's Python scripts. Re-exports all runtime/API constants from the skill-level module and adds script-specific constants for CLI arguments, markdown patterns, and reflow settings.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `__init__.py` | Package marker |
10
+ | `pr_converge_constants.py` | Re-exports all constants from `pr_converge_skill_constants.constants` plus adds script-specific values |
11
+ | `reflow_skill_md_constants.py` | Constants for `reflow_skill_md.py`: line width limit, list item patterns, `TARGET_SKILL_PATH` |
12
+
13
+ ## Conventions
14
+
15
+ - `pr_converge_constants.py` uses `from pr_converge_skill_constants.constants import ...` (with `# noqa: F401`) to re-export everything so script files can import from one location.
16
+ - `reflow_skill_md_constants.py` resolves `TARGET_SKILL_PATH` from its own `__file__` path, pointing to `SKILL.md` three directories up.
17
+ - Script-specific regex patterns (ordered list items, bullet list items, unfinished markdown link targets, markdown reference definitions) live in `reflow_skill_md_constants.py`.
@@ -0,0 +1,16 @@
1
+ # pr-converge/workflows
2
+
3
+ Pacing workflow specification for the `pr-converge` loop.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `schedule-wakeup-loop.md` | Specifies `ScheduleWakeup` call parameters, delays, and stop/convergence conditions for each tick |
10
+
11
+ ## Conventions
12
+
13
+ - `per-tick.md` (in `../reference/`) references this file for Step 4 (schedule next wakeup). Read it before running Step 4.
14
+ - Default delay: `delaySeconds: 360`. Exception: BUGBOT inline-lag branch uses `delaySeconds: 90`.
15
+ - On convergence or a hard stop condition, omit the `ScheduleWakeup` call entirely.
16
+ - The `reason` field in each `ScheduleWakeup` call names what is being awaited, including the current `phase` and `bugbot_clean_at` SHA when set.
@@ -0,0 +1,35 @@
1
+ # pr-review-responder
2
+
3
+ Mandatory systematic protocol for responding to GitHub PR review comments.
4
+
5
+ **Trigger:** "address feedback", "fix review comments", "respond to code review", "handle PR feedback", "reply to reviewer".
6
+
7
+ ## Purpose
8
+
9
+ Prevents missed review comments by enforcing a strict fetch-then-checklist-then-fix order. The skill is declared `MANDATORY` — any PR review response that skips it is an automatic failure per the skill body.
10
+
11
+ ## Key files
12
+
13
+ | File | Purpose |
14
+ |---|---|
15
+ | `SKILL.md` | Hub — the seven mandatory rules and the final report format |
16
+ | `EXAMPLES.md` | Concrete good and bad reply examples |
17
+ | `PRINCIPLES.md` | Design rationale behind the protocol |
18
+ | `README.md` | Overview for readers new to the skill |
19
+ | `TESTING.md` | Testing guidance for the skill |
20
+
21
+ ## Seven mandatory rules
22
+
23
+ 1. Fetch ALL review comments with `per_page=100` before touching any file.
24
+ 2. Create a `TodoWrite` checklist — one item per comment — before any fix.
25
+ 3. Fix one comment at a time, marking each todo complete before moving on.
26
+ 4. Write reply text for every comment; never post directly.
27
+ 5. Create ONE new commit for all fixes from this review round; never squash with the original.
28
+ 6. Push — the git pre-push hook fires automatically.
29
+ 7. Verify the draft count matches the comment count before reporting done.
30
+
31
+ ## Conventions
32
+
33
+ - GitHub MCP (`pull_request_read`) with `per_page=100` is the required fetch path.
34
+ - Draft replies are presented for the user to post; Claude never posts them directly.
35
+ - The pre-push hook (`npx claude-dev-env`) runs on `git push` with no manual invocation.
@@ -0,0 +1,24 @@
1
+ # pre-compact
2
+
3
+ Composes the `/compact` focus directive for the current session and copies the full `/compact <directive>` string to the clipboard.
4
+
5
+ **Trigger:** `/pre-compact` or any request to "prep for compaction".
6
+
7
+ ## Purpose
8
+
9
+ `/compact [instructions]` accepts a directive that steers the compaction summarizer toward high-signal content. This skill builds that directive from live session state — validated against the actual git branch, PR, HEAD SHA, and worktree path — and delivers it ready to paste.
10
+
11
+ ## Key files
12
+
13
+ | File | Purpose |
14
+ |---|---|
15
+ | `SKILL.md` | The complete skill — five steps (confirm intent, validate live state, write directive, copy to clipboard, hand off). No companion files. |
16
+
17
+ ## How the skill runs
18
+
19
+ 1. Asks the operator what they plan to work on next (via `AskUserQuestion`).
20
+ 2. Reads each identifier live (`git branch --show-current`, `git rev-parse --short HEAD`, `gh pr view`, `pwd`) rather than relying on conversation context.
21
+ 3. Produces a `Preserve:` block scoped to what the next task actually needs.
22
+ 4. Writes the full `/compact <directive>` string to a temp file, copies it via `pwsh Set-Clipboard`, then cleans up.
23
+
24
+ `disable-model-invocation: true` is set — this skill runs without a secondary LLM call; it is pure procedural text assembly.
@@ -0,0 +1,40 @@
1
+ # qbug
2
+
3
+ Quick baseline PR audit: one clean-coder subagent loops audit → fix → commit → push until the PR is clean or stuck.
4
+
5
+ **Trigger:** `/qbug`, "quick bug audit", "solo bug audit", "baseline PR review", "bugteam without a team".
6
+
7
+ ## Purpose
8
+
9
+ `/qbug` is the required baseline review for every new PR. It runs the same A–N bug category rubric and CODE_RULES gate as `/bugteam` but with a single persistent subagent (no TeamCreate, no per-loop clean-room, no loop cap). Escalate to `/bugteam` when bias isolation across loops matters.
10
+
11
+ ## Key files
12
+
13
+ | File | Purpose |
14
+ |---|---|
15
+ | `SKILL.md` | The complete skill — four steps (pre-flight, resolve PR scope, spawn subagent cycle, final report). Self-contained with full subagent XML prompt inline. |
16
+
17
+ ## Shared artifacts (referenced by path, not copied)
18
+
19
+ The skill references shared scripts from `../_shared/pr-loop/scripts/`:
20
+
21
+ | Script | Role |
22
+ |---|---|
23
+ | `preflight.py` | Git hooks path check, pytest, optional pre-commit |
24
+ | `code_rules_gate.py` | CODE_RULES gate run before every AUDIT |
25
+ | `post_audit_thread.py` | Posts one GitHub review per loop (APPROVE or REQUEST_CHANGES) |
26
+ | `audit-reply-template.md` | Unified reply body shape for resolved threads |
27
+
28
+ Bug category rubric A–N lives at `../bugteam/PROMPTS.md`. Audit contract (finding schema, proof-of-absence, Haiku secondary, self-audit) lives at `../bugteam/reference/audit-contract.md`.
29
+
30
+ ## Subagent structure
31
+
32
+ - **Primary:** `clean-coder` — runs the full audit → fix → commit → push cycle internally.
33
+ - **Secondary:** `code-quality-agent` (Haiku model) — audit-only, read-only; findings merged before FIX step.
34
+ - No `TeamCreate`. No loop cap. Exits on `converged`, `stuck`, or `error`.
35
+
36
+ ## Conventions
37
+
38
+ - The lead resolves the temp directory via Python's `tempfile.gettempdir()` and passes the absolute path to the subagent.
39
+ - Each loop: one `code_rules_gate.py` pre-audit, one GitHub review posted, one commit on fix.
40
+ - Self-PR toggle: `post_audit_thread.py` detects author-equals-reviewer and switches to an alternate `gh` account automatically.
@@ -0,0 +1,32 @@
1
+ # rebase
2
+
3
+ Rebase a branch onto its base ref with verification gates that catch logically broken results before pushing.
4
+
5
+ **Trigger:** `/rebase`, "rebase this branch", "PR has merge conflicts", "rebase onto main", force-push to update remote branch history.
6
+
7
+ ## Purpose
8
+
9
+ The default failure mode for a rebase is shipping code that compiled but does not run. This skill prevents that by running real import checks, test collection, and symbol scans after every rebase — not just syntax validation.
10
+
11
+ ## Key files
12
+
13
+ | File | Purpose |
14
+ |---|---|
15
+ | `SKILL.md` | The complete skill — four phases (pre-rebase analysis, during rebase, verification gates, push). No companion files. |
16
+
17
+ ## Four phases
18
+
19
+ | Phase | Key actions |
20
+ |---|---|
21
+ | 1 — Pre-rebase analysis | Resolve base via `gh pr view`, classify scenario (stacked/squash/long-lived), fetch fresh, scan commit messages for deleted/renamed symbols |
22
+ | 2 — During rebase | Verify `--skip` with a diff, audit auto-merged files with `git diff --name-only --diff-filter=M ORIG_HEAD` |
23
+ | 3 — Verification gates | `python -m compileall`, `pytest --collect-only -q`, targeted test run, reference scan for removals |
24
+ | 4 — Push | Explicit authorization required; `--force-with-lease=<branch>:<sha>` only; verify mergeability after push |
25
+
26
+ ## Conventions
27
+
28
+ - Force-push requires explicit operator authorization every time — auto mode does not bypass this.
29
+ - `--force-with-lease=<branch>:<sha>` only; bare `--force` is refused.
30
+ - Never force-push `main`, `master`, `release/*`, `production`, or any multi-author branch.
31
+ - Symbol scans prefer Serena (`find_referencing_symbols`) then the Grep tool, then shell grep as a last resort.
32
+ - `ORIG_HEAD` is the correct ref for auto-merged file audits mid-rebase; `HEAD@{1}` shifts per step.
@@ -0,0 +1,30 @@
1
+ # recall
2
+
3
+ Retrieves prior session context and decisions from the Obsidian vault for the current project.
4
+
5
+ **Trigger:** `/recall [search query or project name]`.
6
+
7
+ ## Purpose
8
+
9
+ Surfaces relevant session reports, decision notes, and research from the Obsidian vault before starting work. Prevents repeating decisions already made or missing known gotchas.
10
+
11
+ ## Key files
12
+
13
+ | File | Purpose |
14
+ |---|---|
15
+ | `SKILL.md` | The complete skill — six steps (resolve query, frontmatter search, content search, read top matches, present with attribution, handle no results). No companion files. |
16
+
17
+ ## How the skill runs
18
+
19
+ 1. Uses `$ARGUMENTS` as the search query, or infers the project name from conversation context.
20
+ 2. Searches by frontmatter first (`mcp__obsidian__search_notes` with `searchFrontmatter: true`) to catch session reports and decision notes tagged with the project.
21
+ 3. Falls back to content keyword search when frontmatter search returns few results.
22
+ 4. Reads the top 3 most relevant notes via `mcp__obsidian__read_note`, preferring recent notes and decision summaries over raw research.
23
+ 5. Reports each note with its path, date, relevant excerpts, and whether any decisions are marked `status: Superseded`.
24
+ 6. States clearly when no vault history exists — never infers or invents history.
25
+
26
+ ## Conventions
27
+
28
+ - `disable-model-invocation: true` is not set; this skill does invoke the model to synthesize results.
29
+ - The skill is read-only: it never writes to the vault.
30
+ - Companion to `/remember` (which writes decisions) and `/session-log` (which writes session reports).