claude-dev-env 1.68.0 → 1.69.1

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 (122) 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_dead_config_field.py +284 -50
  19. package/hooks/blocking/code_rules_docstrings.py +97 -0
  20. package/hooks/blocking/code_rules_enforcer.py +4 -0
  21. package/hooks/blocking/config/CLAUDE.md +22 -0
  22. package/hooks/blocking/test_code_rules_enforcer_class_docstring_methods.py +262 -0
  23. package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +336 -3
  24. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +36 -0
  25. package/hooks/blocking/test_code_rules_enforcer_file_global_constants.py +9 -0
  26. package/hooks/diagnostic/CLAUDE.md +43 -0
  27. package/hooks/diagnostic/migrations/CLAUDE.md +16 -0
  28. package/hooks/diagnostic/queries/CLAUDE.md +19 -0
  29. package/hooks/git-hooks/CLAUDE.md +28 -0
  30. package/hooks/git-hooks/git_hooks_constants/CLAUDE.md +21 -0
  31. package/hooks/hooks_constants/CLAUDE.md +60 -0
  32. package/hooks/hooks_constants/blocking_check_limits.py +2 -0
  33. package/hooks/lifecycle/CLAUDE.md +18 -0
  34. package/hooks/observability/CLAUDE.md +16 -0
  35. package/hooks/session/CLAUDE.md +21 -0
  36. package/hooks/validation/CLAUDE.md +19 -0
  37. package/hooks/validators/CLAUDE.md +49 -0
  38. package/hooks/workflow/CLAUDE.md +22 -0
  39. package/package.json +1 -1
  40. package/rules/CLAUDE.md +46 -0
  41. package/rules/docstring-prose-matches-implementation.md +1 -1
  42. package/scripts/CLAUDE.md +34 -0
  43. package/scripts/dev_env_scripts_constants/CLAUDE.md +14 -0
  44. package/scripts/sync_to_cursor/CLAUDE.md +23 -0
  45. package/scripts/tests/CLAUDE.md +18 -0
  46. package/skills/CLAUDE.md +66 -0
  47. package/skills/_shared/CLAUDE.md +11 -0
  48. package/skills/_shared/pr-loop/CLAUDE.md +27 -0
  49. package/skills/_shared/pr-loop/prompts/CLAUDE.md +9 -0
  50. package/skills/_shared/pr-loop/scripts/CLAUDE.md +23 -0
  51. package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +19 -0
  52. package/skills/anthropic-plan/CLAUDE.md +34 -0
  53. package/skills/anthropic-plan/SKILL.md +1 -1
  54. package/skills/anthropic-plan/scripts/CLAUDE.md +11 -0
  55. package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/CLAUDE.md +16 -0
  56. package/skills/anthropic-plan/templates/CLAUDE.md +13 -0
  57. package/skills/anthropic-plan/workflow/CLAUDE.md +14 -0
  58. package/skills/auditing-claude-config/CLAUDE.md +20 -0
  59. package/skills/autoconverge/CLAUDE.md +30 -0
  60. package/skills/autoconverge/reference/CLAUDE.md +12 -0
  61. package/skills/autoconverge/workflow/CLAUDE.md +23 -0
  62. package/skills/autoconverge/workflow/autoconverge_report_constants/CLAUDE.md +16 -0
  63. package/skills/bdd-protocol/CLAUDE.md +26 -0
  64. package/skills/bdd-protocol/references/CLAUDE.md +10 -0
  65. package/skills/bg-agent/CLAUDE.md +17 -0
  66. package/skills/bugteam/CLAUDE.md +30 -0
  67. package/skills/bugteam/reference/CLAUDE.md +22 -0
  68. package/skills/bugteam/reference/obstacles/CLAUDE.md +24 -0
  69. package/skills/bugteam/scripts/CLAUDE.md +36 -0
  70. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +20 -0
  71. package/skills/caveman/CLAUDE.md +15 -0
  72. package/skills/code/CLAUDE.md +17 -0
  73. package/skills/copilot-review/CLAUDE.md +17 -0
  74. package/skills/deep-research/CLAUDE.md +17 -0
  75. package/skills/doc-gist/CLAUDE.md +25 -0
  76. package/skills/doc-gist/references/CLAUDE.md +9 -0
  77. package/skills/doc-gist/references/examples/CLAUDE.md +25 -0
  78. package/skills/doc-gist/scripts/CLAUDE.md +27 -0
  79. package/skills/doc-gist/scripts/doc_gist_scripts_constants/CLAUDE.md +10 -0
  80. package/skills/everything-search/CLAUDE.md +17 -0
  81. package/skills/findbugs/CLAUDE.md +20 -0
  82. package/skills/fixbugs/CLAUDE.md +19 -0
  83. package/skills/fresh-branch/CLAUDE.md +15 -0
  84. package/skills/gh-paginate/CLAUDE.md +18 -0
  85. package/skills/gotcha/CLAUDE.md +33 -0
  86. package/skills/implement/CLAUDE.md +27 -0
  87. package/skills/implement/scripts/CLAUDE.md +22 -0
  88. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +22 -0
  89. package/skills/logifix/CLAUDE.md +36 -0
  90. package/skills/logifix/scripts/CLAUDE.md +16 -0
  91. package/skills/monitor-open-prs/CLAUDE.md +34 -0
  92. package/skills/monitor-open-prs/scripts/CLAUDE.md +17 -0
  93. package/skills/pr-consistency-audit/CLAUDE.md +34 -0
  94. package/skills/pr-consistency-audit/reference/CLAUDE.md +16 -0
  95. package/skills/pr-converge/CLAUDE.md +29 -0
  96. package/skills/pr-converge/pr_converge_skill_constants/CLAUDE.md +26 -0
  97. package/skills/pr-converge/reference/CLAUDE.md +27 -0
  98. package/skills/pr-converge/reference/obstacles/CLAUDE.md +23 -0
  99. package/skills/pr-converge/scripts/CLAUDE.md +36 -0
  100. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +17 -0
  101. package/skills/pr-converge/workflows/CLAUDE.md +16 -0
  102. package/skills/pr-review-responder/CLAUDE.md +35 -0
  103. package/skills/pre-compact/CLAUDE.md +24 -0
  104. package/skills/qbug/CLAUDE.md +40 -0
  105. package/skills/rebase/CLAUDE.md +32 -0
  106. package/skills/recall/CLAUDE.md +30 -0
  107. package/skills/refine/CLAUDE.md +44 -0
  108. package/skills/refine/templates/CLAUDE.md +17 -0
  109. package/skills/remember/CLAUDE.md +31 -0
  110. package/skills/research-mode/CLAUDE.md +35 -0
  111. package/skills/session-log/CLAUDE.md +31 -0
  112. package/skills/session-tidy/CLAUDE.md +36 -0
  113. package/skills/skill-builder/CLAUDE.md +45 -0
  114. package/skills/skill-builder/references/CLAUDE.md +19 -0
  115. package/skills/skill-builder/templates/CLAUDE.md +14 -0
  116. package/skills/skill-builder/workflows/CLAUDE.md +17 -0
  117. package/skills/structure-prompt/CLAUDE.md +42 -0
  118. package/skills/structure-prompt/reference/CLAUDE.md +28 -0
  119. package/skills/task-build/CLAUDE.md +28 -0
  120. package/skills/update/CLAUDE.md +38 -0
  121. package/skills/verified-build/CLAUDE.md +33 -0
  122. package/system-prompts/CLAUDE.md +17 -0
@@ -0,0 +1,27 @@
1
+ # pr-loop
2
+
3
+ Shared infrastructure for the PR audit-fix loop used by `bugteam` and `pr-converge`. Provides the XML prompt template, Python runtime scripts, and named constants that both skills invoke during each loop tick.
4
+
5
+ ## Subdirectories
6
+
7
+ | Directory | Role |
8
+ |---|---|
9
+ | `prompts/` | XML agent prompt templates. |
10
+ | `scripts/` | Python scripts for loop state management, prompt building, outcome recording, path resolution, and preflight checks. |
11
+
12
+ ## Key files
13
+
14
+ | File | Role |
15
+ |---|---|
16
+ | `prompts/pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. |
17
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/build_audit_prompt.py` | Assembles the audit agent prompt from loop state and the constants module. |
18
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings. |
19
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/init_loop_state.py` | Initializes the per-PR loop state JSON file. |
20
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/write_audit_outcomes.py` | Writes the per-loop audit outcome XML into the workspace. |
21
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/write_fix_outcomes.py` | Writes the per-loop fix outcome XML into the workspace. |
22
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/preflight_worktree.py` | Verifies the working directory is a healthy worktree for the target PR's repo. |
23
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/teardown_worktrees.py` | Removes loop worktrees on clean exit. |
24
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/_path_resolver.py` | Resolves workspace and worktree paths from PR metadata. |
25
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/_cli_utils.py` | Shared CLI argument parsing helpers. |
26
+ | `packages/claude-dev-env/skills/_shared/pr-loop/scripts/_xml_utils.py` | XML serialization helpers. |
27
+ | `scripts/skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
@@ -0,0 +1,9 @@
1
+ # prompts
2
+
3
+ XML agent prompt templates for the PR audit-fix loop.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. Defines the agent role, scope anchors, a ten-rule detection workflow, and output format. `bugteam` and `pr-converge` both inject this prompt when running the consistency audit step. |
@@ -0,0 +1,23 @@
1
+ # scripts
2
+
3
+ Python scripts that run the PR audit-fix loop at runtime. Both `bugteam` and `pr-converge` invoke these scripts during each loop tick.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `build_audit_prompt.py` | Assembles the audit agent prompt from loop state and category constants. |
10
+ | `build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings XML. |
11
+ | `init_loop_state.py` | Initializes the per-PR `loop-state.json` file in the workspace directory. |
12
+ | `write_audit_outcomes.py` | Writes per-loop audit outcome XML into the workspace. |
13
+ | `write_fix_outcomes.py` | Writes per-loop fix outcome XML into the workspace. |
14
+ | `preflight_worktree.py` | Verifies the working directory is a healthy git worktree for the target PR's repo. Supports `--mode strict` to abort when the repo does not match. |
15
+ | `teardown_worktrees.py` | Removes per-PR worktrees after a clean loop exit. |
16
+ | `_path_resolver.py` | Resolves workspace and worktree paths from PR owner, repo, and number. |
17
+ | `_cli_utils.py` | Shared CLI argument parsing helpers (argparse wrappers). |
18
+ | `_xml_utils.py` | XML serialization helpers for outcome files. |
19
+ | `skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
20
+
21
+ ## Tests
22
+
23
+ Each script has a paired test file (`test_build_audit_prompt.py`, `test_build_fix_prompt.py`, etc.) in this directory. Run with `python -m pytest` from the repo root.
@@ -0,0 +1,19 @@
1
+ # skills_pr_loop_constants
2
+
3
+ Python package of named constants for the `pr-loop` shared scripts. All constants are `UPPER_SNAKE_CASE` module-level names imported by the sibling scripts.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `__init__.py` | Package marker. |
10
+ | `path_resolver_constants.py` | Path template strings and format constants: workspace directory naming, worktree directory name, diff patch filename pattern, outcome XML filename patterns, loop state filename, fix status values, audit constraint texts, audit category entries, fix execution steps, fix constraint texts, and XML serialization settings. |
11
+ | `preflight_constants.py` | Constants used by `preflight_worktree.py` for exit codes and output marker strings. |
12
+
13
+ ## Usage
14
+
15
+ Scripts import directly from the package:
16
+
17
+ ```python
18
+ from skills_pr_loop_constants.path_resolver_constants import LOOP_STATE_FILENAME
19
+ ```
@@ -0,0 +1,34 @@
1
+ # anthropic-plan
2
+
3
+ **Trigger:** `/anthropic-plan`, `/plan`, "plan this first", "think before coding", "make a plan", "scope this out", "don't code yet", and non-trivial requests that need source-grounded design before build work.
4
+
5
+ Creates a repo-local plan packet under `docs/plans/<slug>/` by running the `plan-packet.mjs` workflow. The packet holds context, spec, implementation steps, validation, and a handoff prompt for the build agent. The skill stops before any production code changes.
6
+
7
+ ## Subdirectories
8
+
9
+ | Directory | Role |
10
+ |---|---|
11
+ | `scripts/` | Python validator (`validate_packet.py`) that checks the packet's required files, placeholders, and consistency. |
12
+ | `templates/` | Template files the workflow renders when building the packet (`README.md`, `build-prompt.md`, `reuse-audit.md`, `source-map.md`, `visual-plan.template.html`). |
13
+ | `workflow/` | The `.mjs` workflow scripts and their test files. |
14
+
15
+ ## Key files
16
+
17
+ | File | Role |
18
+ |---|---|
19
+ | `SKILL.md` | Entry point. Full planning protocol, workflow contract, packet shape, and validation rules. |
20
+ | `workflow/plan-packet.mjs` | Main workflow script. Reads repo context, writes the packet, runs the validator, spawns `plan-packet-validator`, runs the reuse audit, builds the visual HTML, and returns the packet path. |
21
+ | `workflow/plan-packet.contract.test.mjs` | Contract tests for the workflow script. |
22
+ | `packages/claude-dev-env/skills/anthropic-plan/scripts/validate_packet.py` | Deterministic validator: checks required files, open questions, source-map strength, TDD coverage, and `packet.json` consistency. Exits with code 2 on failure. |
23
+ | `templates/visual-plan.template.html` | Template for the single-file offline visual HTML the workflow builds after validation. |
24
+
25
+ ## Entry point
26
+
27
+ ```js
28
+ Workflow({
29
+ scriptPath: "$HOME/.claude/skills/anthropic-plan/workflow/plan-packet.mjs",
30
+ args: { task: "<user request>", cwd: "<working directory>" }
31
+ })
32
+ ```
33
+
34
+ The session must be in a worktree (path has `.claude/worktrees/`) before calling the workflow.
@@ -41,7 +41,7 @@ The workflow handles the full planning loop:
41
41
  2. Read project instructions, rules, relevant skills, manifests, docs, tests, hooks, agents, commands, configs, and workflows.
42
42
  3. Build a source inventory and extract source facts into `context/source-map.md`.
43
43
  4. Write the packet under `docs/plans/<slug>/`.
44
- 5. Run `scripts/validate_packet.py`.
44
+ 5. Run `packages/claude-dev-env/skills/anthropic-plan/scripts/validate_packet.py`.
45
45
  6. Spawn `plan-packet-validator` in fresh context.
46
46
  7. Repair packet findings up to the workflow cap.
47
47
  8. Run the reuse audit: search the codebase for existing equivalents of each new file/symbol the packet introduces, write `validation/reuse-audit.md`, and gate approval on any unjustified reproduction.
@@ -0,0 +1,11 @@
1
+ # scripts
2
+
3
+ Python scripts for the `anthropic-plan` skill.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `validate_packet.py` | Deterministic packet validator. Checks that all required files exist under `docs/plans/<slug>/`, that no placeholder text remains, that `packet.json` is consistent with the folder contents, and that the TDD plan is present. Exits with code 2 on failure; the workflow treats a non-zero exit as a blocking finding. |
10
+ | `test_validate_packet.py` | Tests for `validate_packet.py`. |
11
+ | `anthropic_plan_scripts_constants/` | Named constants package (`validate_packet_constants.py`) that lists every required relative path the validator checks. |
@@ -0,0 +1,16 @@
1
+ # anthropic_plan_scripts_constants
2
+
3
+ Python package of named constants for `anthropic-plan/scripts/`.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `__init__.py` | Package marker. |
10
+ | `validate_packet_constants.py` | Defines `ALL_REQUIRED_RELATIVE_PATHS` — the tuple of every relative path that must exist inside a valid plan packet (e.g. `README.md`, `packet.json`, `context/source-map.md`, `implementation/tdd-plan.md`, `handoff/build-prompt.md`). Also defines `MARKDOWN_FILE_SUFFIX` and `EXIT_CODE_VALIDATION_FAILED`. |
11
+
12
+ ## Usage
13
+
14
+ ```python
15
+ from anthropic_plan_scripts_constants.validate_packet_constants import ALL_REQUIRED_RELATIVE_PATHS
16
+ ```
@@ -0,0 +1,13 @@
1
+ # templates
2
+
3
+ Template files the `plan-packet.mjs` workflow renders when building a plan packet.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `README.md` | Markdown template for the packet's top-level `README.md`. Placeholder slots for plan title, goal, status, packet map, and build path. |
10
+ | `build-prompt.md` | Template for `handoff/build-prompt.md` — the standalone prompt the build agent reads to start coding without needing the rest of the packet. |
11
+ | `reuse-audit.md` | Template for `validation/reuse-audit.md` — the per-item verdict table the workflow fills in during the reuse audit step. |
12
+ | `source-map.md` | Template for `context/source-map.md` — the inventory of source files and facts the planner extracts. |
13
+ | `visual-plan.template.html` | Single-file offline HTML template. The workflow fills this with packet data after validation to produce `visual-plan.html` beside the packet. Inlines all CSS and JavaScript; references no external assets. |
@@ -0,0 +1,14 @@
1
+ # workflow
2
+
3
+ Workflow scripts for the `anthropic-plan` skill.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `plan-packet.mjs` | Main workflow script. Resolves repo root, reads project context, builds the source inventory, writes the full packet under `docs/plans/<slug>/`, runs `validate_packet.py`, spawns `plan-packet-validator` in a fresh context, runs the reuse audit, builds the visual HTML from `templates/visual-plan.template.html`, and returns the packet path and validation state. |
10
+ | `plan-packet.contract.test.mjs` | Contract tests that verify the workflow script's interface and required steps without a live repo. |
11
+
12
+ ## Running
13
+
14
+ The `plan-packet.mjs` script runs via the `Workflow` tool — do not invoke it directly with Node. The skill's `SKILL.md` specifies the exact call signature and required `args`.
@@ -0,0 +1,20 @@
1
+ # auditing-claude-config
2
+
3
+ **Trigger:** `/auditing-claude-config`, reviewing the startup instruction load, `/memory` showing unexpected files, adding new rules, periodic config hygiene.
4
+
5
+ Audits a Claude Code setup — user `CLAUDE.md`, `~/.claude/rules/`, project `.claude/` — for context-budget waste: duplicate `@`-imports, always-on rules that could be path-scoped or turned into skills, and oversized files. Produces a migration table with line savings.
6
+
7
+ ## Key files
8
+
9
+ | File | Role |
10
+ |---|---|
11
+ | `SKILL.md` | Full audit protocol: inventory the always-loaded set, find duplicate imports, classify each rule, produce the migration table, stage recommendations by risk, and verify lazy-load behavior with an optional probe hook. |
12
+
13
+ ## What the skill produces
14
+
15
+ 1. **Baseline** — total always-loaded lines, broken down by file.
16
+ 2. **Migration table** — one row per rule: current lines, verdict, specific action, lines removed from preload.
17
+ 3. **Recommended next step** — the single highest-leverage change.
18
+ 4. **Open questions** — anything not verified by the probe hook.
19
+
20
+ No scripts or workflow files. The skill body holds all logic.
@@ -0,0 +1,30 @@
1
+ # autoconverge
2
+
3
+ **Trigger:** `/autoconverge`, "autoconverge this PR", "converge this PR in one run", "run the converge workflow", "drive the PR to ready autonomously".
4
+
5
+ Drives one draft PR to convergence in a single autonomous workflow run. Each round runs Cursor Bugbot, a code-review pass, and a bug-audit in parallel on the same HEAD, deduplicates findings, applies every fix in one commit, re-verifies, clears a Copilot wait-gate, and marks the PR ready on convergence. State lives in the workflow journal; no `ScheduleWakeup` ticks.
6
+
7
+ ## Subdirectories
8
+
9
+ | Directory | Role |
10
+ |---|---|
11
+ | `reference/` | Markdown docs the skill and workflow cite: round shape, stop conditions, gotchas, and closing report format. |
12
+ | `workflow/` | The `.mjs` convergence workflow, Python report scripts, test files, and the `autoconverge_report_constants/` package. |
13
+
14
+ ## Key files
15
+
16
+ | File | Role |
17
+ |---|---|
18
+ | `SKILL.md` | Full entry-point protocol: pre-flight steps, worktree setup, `Workflow` call, budget-aware round boundaries, teardown, and the per-round convergence loop summary. |
19
+ | `workflow/converge.mjs` | Main convergence workflow. Runs rounds, gates on Copilot, checks convergence, and marks the PR ready. |
20
+ | `workflow/aggregate_runs.py` | Merges every autoconverge journal for a PR into one deduped journal. |
21
+ | `workflow/convergence_summary.py` | Builds the convergence-summary agent prompt over the merged findings. |
22
+ | `workflow/render_report.py` | Builds the closing HTML report from the merged journal and summary. |
23
+ | `reference/convergence.md` | Round shape: the three parallel lenses, deduplication, fix commit, and the ready definition. |
24
+ | `reference/stop-conditions.md` | Every way the run ends short of ready. |
25
+ | `reference/gotchas.md` | Hard-won failure lessons. |
26
+ | `reference/closing-report.md` | Specification for the closing HTML report format. |
27
+
28
+ ## Entry point
29
+
30
+ Requires the `Workflow` tool. The `SKILL.md` body specifies the exact pre-flight sequence and `Workflow` call.
@@ -0,0 +1,12 @@
1
+ # reference
2
+
3
+ Reference documentation for the `autoconverge` skill. The `converge.mjs` workflow and the `SKILL.md` cite these files to define behavior precisely.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `convergence.md` | Round shape: the three parallel lenses (Bugbot, code-review, bug-audit), deduplication, the fix commit step, and the definition of a clean convergence. |
10
+ | `stop-conditions.md` | Every condition that ends the run short of ready: budget cap, iteration cap, blocker exit, Copilot bypass. |
11
+ | `gotchas.md` | Hard-won lessons from failed runs: PR title validation, conflicting PRs, worktree branch lock, resumed sessions rerooting, and minter issues. |
12
+ | `closing-report.md` | Specification for the closing HTML convergence report the teardown step builds and publishes. |
@@ -0,0 +1,23 @@
1
+ # workflow
2
+
3
+ Workflow scripts and report utilities for the `autoconverge` skill.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `converge.mjs` | Main convergence workflow script. Each round runs Bugbot, code-review, and bug-audit lenses in parallel, deduplicates findings, applies fixes, pushes, gates on Copilot, checks convergence, and marks the PR ready. Runs via the `Workflow` tool — not directly with Node. |
10
+ | `aggregate_runs.py` | Merges every autoconverge journal for a given PR (matched by run id) into one merged journal. Prints a JSON line with `mergedJournal`, `roundCount`, `finalSha`, and `findingCount`. |
11
+ | `convergence_summary.py` | Builds the convergence-summary agent prompt over the merged journal's findings. The teardown step spawns a `general-purpose` subagent on this prompt. |
12
+ | `render_report.py` | Builds the closing HTML insights report. Takes `--journal`, `--summary-file`, `--out`, `--pr`, `--final-sha`, and `--rounds`. Writes the HTML to `--out` and prints the output path on stdout. |
13
+ | `autoconverge_report_constants/` | Named constants package for `render_report.py` and `convergence_summary.py`. |
14
+ | `converge.contract.test.mjs` | Contract tests for `converge.mjs` — verify the workflow interface and step ordering. |
15
+ | `converge.clean-audit.test.mjs` | Tests the clean-audit path (all lenses clean on first round). |
16
+ | `converge.copilot-gate.test.mjs` | Tests Copilot gate behavior (bypass on quota exhaustion). |
17
+ | `converge.fix-progress.test.mjs` | Tests fix-progress tracking across rounds. |
18
+ | `converge.fix-recovery.test.mjs` | Tests recovery when a fix commit fails. |
19
+ | `converge.run-input.test.mjs` | Tests workflow input validation. |
20
+ | `test_aggregate_runs.py` | Tests for `aggregate_runs.py`. |
21
+ | `test_convergence_summary.py` | Tests for `convergence_summary.py`. |
22
+ | `test_render_report.py` | Tests for `render_report.py`. |
23
+ | `fixtures/` | Test fixture data for the workflow tests. |
@@ -0,0 +1,16 @@
1
+ # autoconverge_report_constants
2
+
3
+ Python package of named constants for `render_report.py` and `convergence_summary.py` in the `autoconverge/workflow/` directory.
4
+
5
+ ## Key files
6
+
7
+ | File | Role |
8
+ |---|---|
9
+ | `__init__.py` | Package marker. |
10
+ | `render_report_constants.py` | Named constants for the report renderer: structured output tool name, journal label prefixes (`resolve-head`, `lens:`, `fix:`, `copilot-gate`, `convergence-summary`), journal sibling directory names, default finding category and severity, date and SHA length constants, workflow name, projects directory name, merged run id prefix, summary detail character limit, and `onexc` Python version threshold. |
11
+
12
+ ## Usage
13
+
14
+ ```python
15
+ from autoconverge_report_constants.render_report_constants import LABEL_PREFIX_LENS
16
+ ```
@@ -0,0 +1,26 @@
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.
@@ -0,0 +1,10 @@
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. |
@@ -0,0 +1,17 @@
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.
@@ -0,0 +1,30 @@
1
+ # bugteam
2
+
3
+ Runs an audit-fix loop on an open pull request until all findings are resolved or the 20-loop cap is reached. Triggered by `/bugteam`, `run the bug team`, `auto-fix the PR until clean`, or `loop audit and fix`.
4
+
5
+ ## Purpose
6
+
7
+ Each loop: a `code-quality-agent` (fresh context, all A–P audit categories) produces an outcome XML; a `clean-coder` agent applies every fix; the lead commits, pushes, and posts a GitHub PR review (APPROVE on clean, REQUEST_CHANGES with inline anchored comments on dirty). Grants `.claude/**` write permissions at the start and revokes them at the end.
8
+
9
+ ## Key files
10
+
11
+ | File | Purpose |
12
+ |---|---|
13
+ | `SKILL.md` | Hub — pre-flight call, refusals, audit-posting protocol, progress checklist, and situation-to-reference table. Read this first. |
14
+ | `PROMPTS.md` | Spawn XML, A–P category bindings, outcome XML schemas. |
15
+ | `CONSTRAINTS.md` | Invariants — what the loop must never violate. |
16
+ | `EXAMPLES.md` | Exit scenarios: converged, cap-reached, stuck, refusal, mixed-outcome. |
17
+ | `sources.md` | Doc URLs and verbatim quotes cited in the skill body. |
18
+
19
+ ## Subdirectories
20
+
21
+ | Directory | Role |
22
+ |---|---|
23
+ | `reference/` | Expanded workflow detail loaded on demand (team setup, audit contract, GitHub PR review shape, teardown). |
24
+ | `scripts/` | Python scripts executed by the lead or teammates at runtime. |
25
+
26
+ ## Environment controls
27
+
28
+ - `CLAUDE_REVIEWS_DISABLED=bugteam` — disables the skill entirely (pre-flight exits 7).
29
+ - `BUGTEAM_PREFLIGHT_SKIP=1` — skips pytest in pre-flight.
30
+ - `BUGTEAM_REVIEWER_ACCOUNT=<login>` — names the alternate `gh` account for posting reviews when the PR author and reviewer identity match.
@@ -0,0 +1,22 @@
1
+ # bugteam/reference
2
+
3
+ Expanded workflow detail for the `bugteam` skill. Load a file from this directory when the orchestration stub in `SKILL.md` is not enough — for example, when debugging GitHub review shape, understanding gate semantics, or working through teardown edge cases.
4
+
5
+ ## Key files
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `README.md` | Index of all files in this directory with one-line domain summaries. |
10
+ | `team-setup.md` | Permissions grant, PR scope resolution, run name, temp dir, and loop state. |
11
+ | `audit-and-teammates.md` | Pre-audit CODE_RULES gate, full cycle numbering, AUDIT and FIX action detail. |
12
+ | `audit-contract.md` | Finding shape (Shape A / B), Haiku secondary merge rules, post-fix self-audit. |
13
+ | `github-pr-reviews.md` | Per-loop review posting, `jq`+`gh api` payloads, inline anchors, fallbacks, REST endpoints. |
14
+ | `teardown-publish-permissions.md` | Teardown steps, PR description rewrite via `pr-description-writer`, permission revoke, final report. |
15
+ | `design-rationale.md` | Why clean-room subagents, when `/bugteam` applies, refusal reasons. |
16
+ | `copilot-gap-analysis.md` | Historical gap analysis (reference only). |
17
+
18
+ ## Subdirectories
19
+
20
+ | Directory | Role |
21
+ |---|---|
22
+ | `obstacles/` | Per-step obstacle guides — one file per common failure point (e.g., write XML, resolve thread, push, test suite). |
@@ -0,0 +1,24 @@
1
+ # bugteam/reference/obstacles
2
+
3
+ Per-step obstacle guides for the `bugteam` skill. Each file addresses a specific failure point that can occur during an audit-fix loop. Load the matching file when a step fails rather than improvising a fix.
4
+
5
+ ## Files
6
+
7
+ | File | Obstacle it addresses |
8
+ |---|---|
9
+ | `audit-assign-ids.md` | Assigning stable finding IDs in the audit output. |
10
+ | `audit-capture-excerpts.md` | Capturing code excerpts for each finding. |
11
+ | `audit-walk-categories.md` | Walking all A–P categories without skipping. |
12
+ | `audit-write-xml.md` | Writing the outcome XML from an audit pass. |
13
+ | `fix-append-summary.md` | Appending the fix summary to the outcome XML. |
14
+ | `fix-apply-fixes.md` | Applying code fixes from the finding list. |
15
+ | `fix-git-add-commit.md` | Staging and committing the fixed files. |
16
+ | `fix-git-push.md` | Pushing the fix commit to the remote branch. |
17
+ | `fix-post-reply.md` | Posting inline replies to finding threads on the PR. |
18
+ | `fix-publish-summary.md` | Publishing the loop summary to the PR. |
19
+ | `fix-py-compile.md` | Verifying Python syntax after fixes. |
20
+ | `fix-read-files.md` | Reading the files referenced in a finding. |
21
+ | `fix-resolve-thread.md` | Resolving a finding's review thread on GitHub. |
22
+ | `fix-test-suite.md` | Running the test suite and interpreting failures. |
23
+ | `fix-violation-count.md` | Counting open violations after a fix pass. |
24
+ | `fix-write-xml.md` | Writing the per-fix XML record. |
@@ -0,0 +1,36 @@
1
+ # bugteam/scripts
2
+
3
+ Python scripts executed by the bugteam lead or teammates at runtime. These are not loaded into context as instructions — they run as subprocess calls from within the skill workflow.
4
+
5
+ ## Scripts
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `bugteam_preflight.py` | Run pytest and optional `pre-commit` before the first loop. Skips pytest when `BUGTEAM_PREFLIGHT_SKIP=1` or no test files exist. |
10
+ | `bugteam_fix_hookspath.py` | Auto-remediate a stale `core.hooksPath` override, set the canonical global value, re-run preflight. |
11
+ | `bugteam_code_rules_gate.py` | Run `validate_content` from `code_rules_enforcer.py` on PR-scoped files. Exit 1 on mandatory rule failures. |
12
+ | `grant_project_claude_permissions.py` | Grant Edit/Write/Read on `cwd/.claude/**` in `~/.claude/settings.json`. |
13
+ | `revoke_project_claude_permissions.py` | Remove the matching grant entries from `~/.claude/settings.json`. |
14
+ | `_bugteam_permissions_common.py` | Shared helpers for grant/revoke (atomic JSON writes, settings sections). |
15
+ | `windows_safe_rmtree.py` | Remove a directory tree on Windows by stripping ReadOnly attributes and retrying on failure. |
16
+ | `probe_code_rules_enforcer_check.py` | Load `code_rules_enforcer.py` and invoke a named check function against a fixture file. |
17
+ | `reflow_skill_md.py` | Reflow the bugteam SKILL.md body to fit line-length limits. |
18
+
19
+ ## Test files
20
+
21
+ | File | Tests |
22
+ |---|---|
23
+ | `test_bugteam_preflight.py` | `bugteam_preflight.py` |
24
+ | `test_bugteam_code_rules_gate.py` | `bugteam_code_rules_gate.py` |
25
+ | `test_bugteam_fix_hookspath.py` | `bugteam_fix_hookspath.py` |
26
+ | `test_bugteam_permissions_common.py` | `_bugteam_permissions_common.py` |
27
+ | `test__bugteam_permissions_common.py` | Internal helpers in `_bugteam_permissions_common.py` |
28
+ | `test_agent_config_carveout.py` | `.claude/**` grant/revoke carveout logic |
29
+ | `test_probe_code_rules_enforcer_check.py` | `probe_code_rules_enforcer_check.py` |
30
+ | `test_windows_safe_rmtree.py` | `windows_safe_rmtree.py` |
31
+
32
+ ## Subdirectories
33
+
34
+ | Directory | Role |
35
+ |---|---|
36
+ | `bugteam_scripts_constants/` | Named constants imported by the scripts above. |
@@ -0,0 +1,20 @@
1
+ # bugteam/scripts/bugteam_scripts_constants
2
+
3
+ Python package of named constants imported by the bugteam scripts. Each module holds the constants for one script; importing from this package keeps magic values out of the script bodies.
4
+
5
+ ## Modules
6
+
7
+ | File | Constants for |
8
+ |---|---|
9
+ | `bugteam_preflight_constants.py` | `bugteam_preflight.py` — env var name, hooks path suffix, exit codes, ignore dirs, argument tuples, config filenames. |
10
+ | `bugteam_code_rules_gate_constants.py` | `bugteam_code_rules_gate.py` — gate-related path and exit-code constants. |
11
+ | `bugteam_fix_hookspath_constants.py` | `bugteam_fix_hookspath.py` — canonical hooks path, remediation message strings. |
12
+ | `claude_permissions_common_constants.py` | `_bugteam_permissions_common.py` — settings JSON keys, glob patterns for the grant/revoke scripts. |
13
+ | `probe_code_rules_enforcer_check_constants.py` | `probe_code_rules_enforcer_check.py` — enforcer module path and function name constants. |
14
+ | `reflow_skill_md_constants.py` | `reflow_skill_md.py` — line-length and formatting constants. |
15
+ | `windows_safe_rmtree_constants.py` | `windows_safe_rmtree.py` — retry count and wait constants. |
16
+ | `__init__.py` | Empty package marker. |
17
+
18
+ ## Convention
19
+
20
+ Scripts import from this package at module scope. No constant is defined inline in a script body — the hook enforces this at write time.
@@ -0,0 +1,15 @@
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. |
@@ -0,0 +1,17 @@
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`.
@@ -0,0 +1,17 @@
1
+ # copilot-review
2
+
3
+ Spawns a background subagent that polls the GitHub Copilot reviewer on the current PR, fixes unaddressed findings, and re-requests review each tick until the PR is clean. Triggered by `/copilot-review`, `watch copilot`, `babysit copilot review`, or `keep re-requesting copilot`.
4
+
5
+ ## Purpose
6
+
7
+ The main session gathers PR context (number, HEAD SHA, owner/repo, branch), spawns a self-terminating background subagent with a fully filled-in prompt, and returns control at once. The subagent loops on a 5-minute `ScheduleWakeup` cadence: fetch Copilot's latest review, TDD-fix any inline findings, push a commit, reply inline, re-request review. It stops on convergence, a persistent blocker, `TaskStop`, or after 20 ticks.
8
+
9
+ ## Key file
10
+
11
+ | File | Purpose |
12
+ |---|---|
13
+ | `SKILL.md` | Four-step orchestration (opt-out check, gather PR context, spawn subagent, report to user), the verbatim subagent prompt template with all placeholders, fix protocol, stop conditions, and ground rules (one commit per tick, honor hooks, preserve draft state, use `copilot-pull-request-reviewer[bot]` with the `[bot]` suffix). |
14
+
15
+ ## Environment opt-out
16
+
17
+ Set `CLAUDE_REVIEWS_DISABLED=copilot` to disable. The skill checks this before spawning anything.
@@ -0,0 +1,17 @@
1
+ # deep-research
2
+
3
+ Runs an iterative multi-source research pipeline that produces a comprehensive Obsidian report with citations. Triggered by `/deep-research [topic]`.
4
+
5
+ ## Purpose
6
+
7
+ The skill operates in two phases. Phase 1 (main thread) turns the raw topic into a precise research brief through a short AskUserQuestion session covering audience, scope, recency, and depth. Phase 2 delegates to the `deep-research` agent with the confirmed brief and an iteration budget (8 / 15 / 25 based on depth preference). The agent handles iteration, state tracking, and Obsidian output.
8
+
9
+ ## Key file
10
+
11
+ | File | Purpose |
12
+ |---|---|
13
+ | `SKILL.md` | Phase 1 steps (classify, ask, construct `<research_brief>` XML, set iteration budget) and Phase 2 spawn instructions, including `mode: bypassPermissions` for unrestricted web access. |
14
+
15
+ ## Post-run cleanup
16
+
17
+ After the agent returns, the skill summarizes the Obsidian path, source counts, and any gaps, then deletes the `.deep-research-state.md` temp file.
@@ -0,0 +1,25 @@
1
+ # doc-gist
2
+
3
+ Designs fresh HTML artifacts and publishes them as secret GitHub gists with a shareable htmlpreview URL. Triggered by `/doc-gist`, `publish this`, `share as a gist`, `open this as a webpage`, `make me a writeup`, or any request ending in a shareable HTML preview URL.
4
+
5
+ ## Purpose
6
+
7
+ The skill ships transport, not templates. For each request the model designs a fresh HTML artifact suited to the work, marks it with `<!-- @publish-as-gist -->`, and writes it to disk. A PostToolUse hook (`hooks/workflow/doc_gist_auto_publish.py`) spots the marker, runs `packages/claude-dev-env/skills/doc-gist/scripts/gist_upload.py`, and prints the gist and htmlpreview URLs into the tool output for the user to click.
8
+
9
+ ## Key files
10
+
11
+ | File | Purpose |
12
+ |---|---|
13
+ | `SKILL.md` | Full instructions: the auto-publish hook flow, the transport script CLI, a gallery-to-artifact-type mapping table, and gotchas (`gh` auth, marker syntax, self-contained HTML only, secret-not-private note). |
14
+
15
+ ## Subdirectories
16
+
17
+ | Directory | Role |
18
+ |---|---|
19
+ | `references/` | Reference material — the example HTML gallery and related docs. |
20
+ | `scripts/` | The `gist_upload.py` transport script and its constants package. |
21
+
22
+ ## Auto-publish vs manual
23
+
24
+ - **Auto:** write HTML with `<!-- @publish-as-gist -->` anywhere in the file; the hook handles the rest.
25
+ - **Manual:** run `python scripts/gist_upload.py --input <path>` for an existing file or when the marker route does not apply.
@@ -0,0 +1,9 @@
1
+ # doc-gist/references
2
+
3
+ Reference material for the `doc-gist` skill.
4
+
5
+ ## Subdirectories
6
+
7
+ | Directory | Role |
8
+ |---|---|
9
+ | `examples/` | A gallery of 21 self-contained HTML artifact examples that show distinct shapes — annotated PR diff, design system swatches, slide deck, incident timeline, prompt tuner, decision sign-off, and more. Study these when designing a fresh artifact; do not copy them verbatim. |