claude-dev-env 2.13.0 → 2.14.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 (263) hide show
  1. package/AGENTS.md +135 -0
  2. package/CLAUDE.md +1 -57
  3. package/_shared/AGENTS.md +15 -0
  4. package/_shared/CLAUDE.md +1 -15
  5. package/_shared/advisor/AGENTS.md +22 -0
  6. package/_shared/advisor/CLAUDE.md +1 -22
  7. package/_shared/pr-loop/AGENTS.md +27 -0
  8. package/_shared/pr-loop/CLAUDE.md +1 -27
  9. package/_shared/pr-loop/scripts/AGENTS.md +35 -0
  10. package/_shared/pr-loop/scripts/CLAUDE.md +1 -35
  11. package/_shared/pr-loop/scripts/code_rules_gate_parts/AGENTS.md +42 -0
  12. package/_shared/pr-loop/scripts/code_rules_gate_parts/CLAUDE.md +1 -42
  13. package/_shared/pr-loop/scripts/pr_loop_shared_constants/AGENTS.md +26 -0
  14. package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -26
  15. package/_shared/pr-loop/scripts/tests/AGENTS.md +44 -0
  16. package/_shared/pr-loop/scripts/tests/CLAUDE.md +1 -44
  17. package/_shared/process-tree/AGENTS.md +41 -0
  18. package/_shared/process-tree/CLAUDE.md +1 -41
  19. package/agents/AGENTS.md +26 -0
  20. package/agents/CLAUDE.md +1 -31
  21. package/agents/clean-coder.md +6 -6
  22. package/agents/test_agent_frontmatter.py +11 -11
  23. package/audit-rubrics/AGENTS.md +43 -0
  24. package/audit-rubrics/CLAUDE.md +1 -43
  25. package/audit-rubrics/category_rubrics/AGENTS.md +37 -0
  26. package/audit-rubrics/category_rubrics/CLAUDE.md +1 -37
  27. package/audit-rubrics/prompts/AGENTS.md +37 -0
  28. package/audit-rubrics/prompts/CLAUDE.md +1 -37
  29. package/bin/AGENTS.md +112 -0
  30. package/bin/CLAUDE.md +1 -112
  31. package/bin/ever-shipped-skills.mjs +1 -0
  32. package/bin/install-constants.mjs +6 -7
  33. package/bin/install.mjs +24 -5
  34. package/bin/install.test.mjs +34 -0
  35. package/commands/AGENTS.md +13 -0
  36. package/commands/CLAUDE.md +1 -23
  37. package/docs/AGENTS.md +32 -0
  38. package/docs/CLAUDE.md +1 -32
  39. package/docs/CODE_RULES.md +1 -1
  40. package/docs/imagegen.md +22 -0
  41. package/docs/references/AGENTS.md +17 -0
  42. package/docs/references/CLAUDE.md +1 -17
  43. package/hooks/AGENTS.md +31 -0
  44. package/hooks/CLAUDE.md +1 -31
  45. package/hooks/_gh_pr_author_swap_utils.py +14 -0
  46. package/hooks/advisory/AGENTS.md +16 -0
  47. package/hooks/advisory/CLAUDE.md +1 -16
  48. package/hooks/blocking/AGENTS.md +123 -0
  49. package/hooks/blocking/CLAUDE.md +1 -123
  50. package/hooks/blocking/claude_md_orphan_file_blocker_parts/AGENTS.md +28 -0
  51. package/hooks/blocking/claude_md_orphan_file_blocker_parts/CLAUDE.md +1 -28
  52. package/hooks/blocking/code_rules_banned_identifiers.py +1 -1
  53. package/hooks/blocking/code_rules_dead_module_constant.py +149 -37
  54. package/hooks/blocking/code_rules_probe_chains.py +6 -2
  55. package/hooks/blocking/config/AGENTS.md +10 -0
  56. package/hooks/blocking/config/CLAUDE.md +1 -10
  57. package/hooks/blocking/gh_pr_author_restore.py +7 -2
  58. package/hooks/blocking/intent_only_ending_blocker.py +11 -16
  59. package/hooks/blocking/inventory_intent_records/AGENTS.md +26 -0
  60. package/hooks/blocking/inventory_intent_records/CLAUDE.md +1 -26
  61. package/hooks/blocking/package_inventory_stale_blocker_parts/AGENTS.md +26 -0
  62. package/hooks/blocking/package_inventory_stale_blocker_parts/CLAUDE.md +1 -26
  63. package/hooks/blocking/pii_prevention_blocker_parts/AGENTS.md +24 -0
  64. package/hooks/blocking/pii_prevention_blocker_parts/CLAUDE.md +1 -24
  65. package/hooks/blocking/tdd_enforcer_parts/AGENTS.md +30 -0
  66. package/hooks/blocking/tdd_enforcer_parts/CLAUDE.md +1 -30
  67. package/hooks/blocking/test_claude_md_orphan_file_blocker.py +1 -1
  68. package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +1 -1
  69. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +171 -0
  70. package/hooks/blocking/test_code_rules_enforcer_magic_allowlist.py +1 -1
  71. package/hooks/blocking/test_gh_pr_author_restore.py +2 -1
  72. package/hooks/blocking/test_intent_only_ending_blocker.py +4 -0
  73. package/hooks/diagnostic/AGENTS.md +75 -0
  74. package/hooks/diagnostic/CLAUDE.md +1 -43
  75. package/hooks/diagnostic/hook_log_extractor.py +2 -2
  76. package/hooks/diagnostic/hook_log_init.py +2 -2
  77. package/hooks/diagnostic/migrations/AGENTS.md +16 -0
  78. package/hooks/diagnostic/migrations/CLAUDE.md +1 -16
  79. package/hooks/diagnostic/queries/AGENTS.md +19 -0
  80. package/hooks/diagnostic/queries/CLAUDE.md +1 -19
  81. package/hooks/diagnostic/test_hook_log_extractor.py +2 -2
  82. package/hooks/git-hooks/AGENTS.md +31 -0
  83. package/hooks/git-hooks/CLAUDE.md +1 -31
  84. package/hooks/git-hooks/git_hooks_constants/AGENTS.md +21 -0
  85. package/hooks/git-hooks/git_hooks_constants/CLAUDE.md +1 -21
  86. package/hooks/git-hooks/git_hooks_constants/__init__.py +4 -6
  87. package/hooks/git-hooks/pre_push.py +47 -34
  88. package/hooks/git-hooks/test_pre_push.py +111 -7
  89. package/hooks/hooks_constants/AGENTS.md +104 -0
  90. package/hooks/hooks_constants/CLAUDE.md +1 -104
  91. package/hooks/hooks_constants/hook_log_extractor_constants.py +1 -2
  92. package/hooks/hooks_constants/task_list_loop_starter_constants.py +4 -3
  93. package/hooks/hooks_constants/working_style_prompt_constants.py +29 -20
  94. package/hooks/lifecycle/AGENTS.md +18 -0
  95. package/hooks/lifecycle/CLAUDE.md +1 -18
  96. package/hooks/observability/AGENTS.md +20 -0
  97. package/hooks/observability/CLAUDE.md +1 -20
  98. package/hooks/session/AGENTS.md +33 -0
  99. package/hooks/session/CLAUDE.md +1 -33
  100. package/hooks/session/gh_pr_author_session_cleanup.py +7 -2
  101. package/hooks/session/task_list_loop_starter.py +3 -3
  102. package/hooks/session/test_gh_pr_author_session_cleanup.py +2 -1
  103. package/hooks/session/test_task_list_loop_starter.py +10 -2
  104. package/hooks/session/test_working_style_prompt.py +9 -4
  105. package/hooks/validation/AGENTS.md +20 -0
  106. package/hooks/validation/CLAUDE.md +1 -20
  107. package/hooks/validators/AGENTS.md +51 -0
  108. package/hooks/validators/CLAUDE.md +1 -51
  109. package/hooks/validators/health_check.py +52 -19
  110. package/hooks/validators/python_style_checks.py +1 -1
  111. package/hooks/validators/test_health_check.py +112 -27
  112. package/hooks/workflow/AGENTS.md +16 -0
  113. package/hooks/workflow/CLAUDE.md +1 -16
  114. package/installable-surfaces.manifest.json +1 -0
  115. package/output-styles/AGENTS.md +15 -0
  116. package/output-styles/CLAUDE.md +1 -15
  117. package/package.json +2 -1
  118. package/rules/AGENTS.md +61 -0
  119. package/rules/CLAUDE.md +1 -61
  120. package/rules/code-standards.md +5 -9
  121. package/rules/doc-prose-cuts.md +1 -1
  122. package/scripts/AGENTS.md +62 -0
  123. package/scripts/CLAUDE.md +1 -62
  124. package/scripts/codex_compat_materializer.py +4 -0
  125. package/scripts/dev_env_scripts_constants/AGENTS.md +21 -0
  126. package/scripts/dev_env_scripts_constants/CLAUDE.md +1 -21
  127. package/scripts/sync_to_cursor/AGENTS.md +23 -0
  128. package/scripts/sync_to_cursor/CLAUDE.md +1 -23
  129. package/scripts/test_active_capability_references.py +2 -2
  130. package/scripts/test_validate_instruction_pairs.py +90 -0
  131. package/scripts/test_verify_installable_package.py +5 -1
  132. package/scripts/tests/AGENTS.md +33 -0
  133. package/scripts/tests/CLAUDE.md +1 -33
  134. package/scripts/tests/test_codex_compat_materializer.py +36 -1
  135. package/scripts/validate_instruction_pairs.py +183 -0
  136. package/skills/AGENTS.md +72 -0
  137. package/skills/CLAUDE.md +1 -72
  138. package/skills/_shared/AGENTS.md +44 -0
  139. package/skills/_shared/CLAUDE.md +1 -44
  140. package/skills/_shared/advisor/AGENTS.md +9 -0
  141. package/skills/_shared/advisor/CLAUDE.md +1 -9
  142. package/skills/_shared/pr-loop/AGENTS.md +50 -0
  143. package/skills/_shared/pr-loop/CLAUDE.md +1 -50
  144. package/skills/_shared/pr-loop/prompts/AGENTS.md +9 -0
  145. package/skills/_shared/pr-loop/prompts/CLAUDE.md +1 -9
  146. package/skills/_shared/pr-loop/scripts/AGENTS.md +35 -0
  147. package/skills/_shared/pr-loop/scripts/CLAUDE.md +1 -35
  148. package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +24 -0
  149. package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +1 -24
  150. package/skills/anthropic-plan/AGENTS.md +34 -0
  151. package/skills/anthropic-plan/CLAUDE.md +1 -34
  152. package/skills/anthropic-plan/SKILL.md +1 -1
  153. package/skills/anthropic-plan/scripts/AGENTS.md +11 -0
  154. package/skills/anthropic-plan/scripts/CLAUDE.md +1 -11
  155. package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/AGENTS.md +16 -0
  156. package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/CLAUDE.md +1 -16
  157. package/skills/anthropic-plan/templates/AGENTS.md +13 -0
  158. package/skills/anthropic-plan/templates/CLAUDE.md +1 -13
  159. package/skills/anthropic-plan/test_skill_contract.py +8 -6
  160. package/skills/anthropic-plan/workflow/AGENTS.md +14 -0
  161. package/skills/anthropic-plan/workflow/CLAUDE.md +1 -14
  162. package/skills/auditing-claude-config/AGENTS.md +21 -0
  163. package/skills/auditing-claude-config/CLAUDE.md +1 -21
  164. package/skills/autoconverge/AGENTS.md +36 -0
  165. package/skills/autoconverge/CLAUDE.md +1 -36
  166. package/skills/autoconverge/reference/AGENTS.md +16 -0
  167. package/skills/autoconverge/reference/CLAUDE.md +1 -16
  168. package/skills/autoconverge/workflow/AGENTS.md +26 -0
  169. package/skills/autoconverge/workflow/CLAUDE.md +1 -26
  170. package/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +16 -0
  171. package/skills/autoconverge/workflow/autoconverge_report_constants/CLAUDE.md +1 -16
  172. package/skills/bugteam/AGENTS.md +30 -0
  173. package/skills/bugteam/CLAUDE.md +1 -30
  174. package/skills/bugteam/reference/AGENTS.md +20 -0
  175. package/skills/bugteam/reference/CLAUDE.md +1 -20
  176. package/skills/bugteam/reference/obstacles/AGENTS.md +24 -0
  177. package/skills/bugteam/reference/obstacles/CLAUDE.md +1 -24
  178. package/skills/bugteam/scripts/AGENTS.md +30 -0
  179. package/skills/bugteam/scripts/CLAUDE.md +1 -30
  180. package/skills/bugteam/scripts/bugteam_scripts_constants/AGENTS.md +18 -0
  181. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +1 -18
  182. package/skills/closeout/reference/handoff-prompt-template.md +1 -1
  183. package/skills/codex-review/AGENTS.md +46 -0
  184. package/skills/codex-review/CLAUDE.md +1 -46
  185. package/skills/codex-review/reference/AGENTS.md +15 -0
  186. package/skills/codex-review/reference/CLAUDE.md +1 -15
  187. package/skills/codex-review/scripts/codex_review_scripts_constants/AGENTS.md +18 -0
  188. package/skills/codex-review/scripts/codex_review_scripts_constants/CLAUDE.md +1 -18
  189. package/skills/codex-review/test_skill_scaffold.py +3 -3
  190. package/skills/copilot-review/AGENTS.md +18 -0
  191. package/skills/copilot-review/CLAUDE.md +1 -18
  192. package/skills/everything-search/AGENTS.md +17 -0
  193. package/skills/everything-search/CLAUDE.md +1 -17
  194. package/skills/fresh-branch/AGENTS.md +14 -0
  195. package/skills/fresh-branch/CLAUDE.md +1 -14
  196. package/skills/grok-spawn/AGENTS.md +28 -0
  197. package/skills/grok-spawn/CLAUDE.md +1 -28
  198. package/skills/pr-converge/AGENTS.md +32 -0
  199. package/skills/pr-converge/CLAUDE.md +1 -32
  200. package/skills/pr-converge/pr_converge_skill_constants/AGENTS.md +26 -0
  201. package/skills/pr-converge/pr_converge_skill_constants/CLAUDE.md +1 -26
  202. package/skills/pr-converge/reference/AGENTS.md +28 -0
  203. package/skills/pr-converge/reference/CLAUDE.md +1 -28
  204. package/skills/pr-converge/reference/obstacles/AGENTS.md +23 -0
  205. package/skills/pr-converge/reference/obstacles/CLAUDE.md +1 -23
  206. package/skills/pr-converge/scripts/AGENTS.md +46 -0
  207. package/skills/pr-converge/scripts/CLAUDE.md +1 -46
  208. package/skills/pr-converge/scripts/pr_converge_scripts_constants/AGENTS.md +18 -0
  209. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -18
  210. package/skills/pr-converge/workflows/AGENTS.md +16 -0
  211. package/skills/pr-converge/workflows/CLAUDE.md +1 -16
  212. package/skills/prototype/SKILL.md +1 -2
  213. package/skills/prototype/reference/honest-limitations.md +1 -1
  214. package/skills/prototype/reference/promotion-tasks.md +1 -1
  215. package/skills/prototype/workflows/promotion.md +1 -1
  216. package/skills/rebase/AGENTS.md +32 -0
  217. package/skills/rebase/CLAUDE.md +1 -32
  218. package/skills/recall/AGENTS.md +30 -0
  219. package/skills/recall/CLAUDE.md +1 -30
  220. package/skills/remember/AGENTS.md +31 -0
  221. package/skills/remember/CLAUDE.md +1 -31
  222. package/skills/reviews/SKILL.md +1 -1
  223. package/skills/session-log/AGENTS.md +32 -0
  224. package/skills/session-log/CLAUDE.md +1 -32
  225. package/skills/session-tidy/AGENTS.md +36 -0
  226. package/skills/session-tidy/CLAUDE.md +1 -36
  227. package/skills/skill-builder/AGENTS.md +49 -0
  228. package/skills/skill-builder/CLAUDE.md +1 -49
  229. package/skills/skill-builder/references/AGENTS.md +25 -0
  230. package/skills/skill-builder/references/CLAUDE.md +1 -25
  231. package/skills/skill-builder/references/deterministic-elements.md +1 -1
  232. package/skills/skill-builder/templates/AGENTS.md +14 -0
  233. package/skills/skill-builder/templates/CLAUDE.md +1 -14
  234. package/skills/skill-builder/workflows/AGENTS.md +19 -0
  235. package/skills/skill-builder/workflows/CLAUDE.md +1 -19
  236. package/skills/task-build/AGENTS.md +29 -0
  237. package/skills/task-build/CLAUDE.md +1 -29
  238. package/skills/update/AGENTS.md +38 -0
  239. package/skills/update/CLAUDE.md +1 -38
  240. package/system-prompts/AGENTS.md +17 -0
  241. package/system-prompts/CLAUDE.md +1 -17
  242. package/system-prompts/software-engineer.xml +3 -3
  243. package/agents/caveman.md +0 -73
  244. package/agents/clasp-deployment-orchestrator.md +0 -608
  245. package/agents/code-advisor.md +0 -23
  246. package/agents/deep-research.md +0 -152
  247. package/agents/docs-agent.md +0 -85
  248. package/commands/commit.md +0 -28
  249. package/commands/docupdate.md +0 -322
  250. package/commands/hook-log-extract.md +0 -70
  251. package/commands/hook-log-init.md +0 -76
  252. package/commands/implement.md +0 -102
  253. package/commands/plan.md +0 -14
  254. package/commands/pr-comments.md +0 -47
  255. package/commands/review-plan.md +0 -5
  256. package/commands/right-size.md +0 -15
  257. package/commands/sum.md +0 -30
  258. package/skills/imagegen/SKILL.md +0 -21
  259. package/skills/imagegen/scripts/config/__init__.py +0 -1
  260. package/skills/imagegen/scripts/config/constants.py +0 -28
  261. package/skills/imagegen/scripts/imagegen.py +0 -45
  262. package/skills/imagegen/scripts/imagegen_core.py +0 -528
  263. package/skills/imagegen/scripts/test_imagegen.py +0 -204
@@ -1,44 +1 @@
1
- # _shared/pr-loop/scripts/tests
2
-
3
- pytest suite for the scripts and constants in `_shared/pr-loop/scripts/`. Each test file covers one script or one constants module.
4
-
5
- ## Test files
6
-
7
- | File | Covers |
8
- |---|---|
9
- | `test__claude_permissions_common.py` | Internal helpers in `_claude_permissions_common.py` (legacy underscore prefix) |
10
- | `test_claude_permissions_common.py` | Public API of `_claude_permissions_common.py` |
11
- | `test_claude_permissions_constants.py` | `pr_loop_shared_constants/claude_permissions_constants.py` |
12
- | `test_claude_settings_keys_constants.py` | `pr_loop_shared_constants/claude_settings_keys_constants.py` |
13
- | `test_code_rules_gate.py` | `code_rules_gate.py` gate logic |
14
- | `test_terminology_sweep.py` | `terminology_sweep.py` near-miss detection and exit codes |
15
- | `test_code_rules_gate_constants.py` | `pr_loop_shared_constants/code_rules_gate_constants.py` |
16
- | `test_fix_hookspath.py` | `fix_hookspath.py` repair logic |
17
- | `test_fix_hookspath_constants.py` | `pr_loop_shared_constants/fix_hookspath_constants.py` |
18
- | `test_grant_project_claude_permissions.py` | `grant_project_claude_permissions.py` end-to-end |
19
- | `test_post_audit_thread.py` | `post_audit_thread.py` review-posting flow |
20
- | `test_post_audit_thread_constants.py` | `pr_loop_shared_constants/post_audit_thread_constants.py` |
21
- | `test_preflight.py` | `preflight.py` pre-flight checks |
22
- | `test_preflight_constants.py` | `pr_loop_shared_constants/preflight_constants.py` |
23
- | `test_preflight_self_heal.py` | `preflight_self_heal.py` hooks-path repair |
24
- | `test_reviews_disabled.py` | `reviews_disabled.py` opt-out gate parsing |
25
- | `test_copilot_quota.py` | `copilot_quota.py` end-to-end: account resolution, premium-quota classification, exit codes, and skip logging |
26
- | `test_copilot_quota_constants.py` | `pr_loop_shared_constants/copilot_quota_constants.py` |
27
- | `test_reviewer_availability.py` | `reviewer_availability.py` end-to-end: Copilot and Bugbot availability, opt-out via `CLAUDE_REVIEWS_DISABLED`, and every Copilot quota outcome |
28
- | `test_reviewer_availability_constants.py` | `pr_loop_shared_constants/reviewer_availability_constants.py` |
29
- | `test_revoke_project_claude_permissions.py` | `revoke_project_claude_permissions.py` end-to-end |
30
- | `test_stale_worktree_rule_sweep.py` | `stale_worktree_rule_sweep.py` sweep and deduplication end-to-end |
31
- | `test_stale_worktree_rule_sweep_constants.py` | `pr_loop_shared_constants/stale_worktree_rule_sweep_constants.py` worktrees-root resolution and rule-format readers |
32
- | `test_agent_config_carveout.py` | Agent-config deny-rule carve-out logic |
33
- | `conftest.py` | Shared pytest fixtures |
34
-
35
- ## Fixtures
36
-
37
- `fixtures/copilot_internal_user_example.json` — a captured `gh api
38
- copilot_internal/user` response driving `test_copilot_quota.py`.
39
-
40
- ## Running
41
-
42
- ```bash
43
- python -m pytest packages/claude-dev-env/_shared/pr-loop/scripts/tests/
44
- ```
1
+ @AGENTS.md
@@ -0,0 +1,41 @@
1
+ # _shared/process-tree
2
+
3
+ One home for ending a spawned process together with every descendant it
4
+ started. Callers that capture a CLI's output import it so a grandchild can
5
+ never outlive the run and hold the capture pipe open.
6
+
7
+ ## Consumers
8
+
9
+ | Caller | Use |
10
+ |---|---|
11
+ | `scripts/grok_headless_runner.py` | Kills a timed-out worker's tree between drain attempts |
12
+ | `skills/codex-review/scripts/run_codex_review.py` | Kills the review tree on timeout, then drains |
13
+ | `skills/codex-review/scripts/codex_usage_probe.py` | Tears the app-server tree down after the rate-limits exchange |
14
+
15
+ A skill script reaches this home the way the bugteam scripts reach
16
+ `_shared/pr-loop/scripts`: it puts the directory on `sys.path` and imports by
17
+ module name. `bin/install.mjs` copies `_shared` and `scripts` together, and
18
+ every install group that carries a consumer carries `_shared`, so the import
19
+ resolves in the repository and under `~/.claude` alike.
20
+
21
+ ## Key files
22
+
23
+ | File | Purpose |
24
+ |---|---|
25
+ | `scripts/process_tree_kill.py` | `terminate_process_tree` (poll, platform tree kill, re-poll, `Popen.kill()` fallback), `kill_process_tree_by_identifier`, and `should_start_new_session` for the matching `Popen` flag |
26
+ | `scripts/test_process_tree_kill.py` | Behavioral tests for every public entry point here, each platform branch, each failure the helper swallows, and the `Popen.kill()` fallback |
27
+ | `scripts/config/process_tree_scripts_constants/process_tree_kill_constants.py` | The taskkill command, its `/T`, `/F`, and `/PID` flags, and the bound on the kill command |
28
+ | `scripts/pyproject.toml` | mypy configuration; `check.ps1` runs it under the `mypy-process-tree` label |
29
+
30
+ ## Platform guard
31
+
32
+ Both the branch selector and the POSIX helper compare `sys.platform` against
33
+ the literal `"win32"`. That literal is what mypy narrows on: behind a named
34
+ constant, `os.getpgid`, `os.killpg`, and `signal.SIGKILL` fail type checking on
35
+ Windows.
36
+
37
+ ## Pairing rule
38
+
39
+ `os.killpg` signals a whole process group, so a child sharing the caller's
40
+ group takes the caller down with it. Every `Popen` whose tree this module ends
41
+ passes `start_new_session=should_start_new_session()`.
@@ -1,41 +1 @@
1
- # _shared/process-tree
2
-
3
- One home for ending a spawned process together with every descendant it
4
- started. Callers that capture a CLI's output import it so a grandchild can
5
- never outlive the run and hold the capture pipe open.
6
-
7
- ## Consumers
8
-
9
- | Caller | Use |
10
- |---|---|
11
- | `scripts/grok_headless_runner.py` | Kills a timed-out worker's tree between drain attempts |
12
- | `skills/codex-review/scripts/run_codex_review.py` | Kills the review tree on timeout, then drains |
13
- | `skills/codex-review/scripts/codex_usage_probe.py` | Tears the app-server tree down after the rate-limits exchange |
14
-
15
- A skill script reaches this home the way the bugteam scripts reach
16
- `_shared/pr-loop/scripts`: it puts the directory on `sys.path` and imports by
17
- module name. `bin/install.mjs` copies `_shared` and `scripts` together, and
18
- every install group that carries a consumer carries `_shared`, so the import
19
- resolves in the repository and under `~/.claude` alike.
20
-
21
- ## Key files
22
-
23
- | File | Purpose |
24
- |---|---|
25
- | `scripts/process_tree_kill.py` | `terminate_process_tree` (poll, platform tree kill, re-poll, `Popen.kill()` fallback), `kill_process_tree_by_identifier`, and `should_start_new_session` for the matching `Popen` flag |
26
- | `scripts/test_process_tree_kill.py` | Behavioral tests for every public entry point here, each platform branch, each failure the helper swallows, and the `Popen.kill()` fallback |
27
- | `scripts/config/process_tree_scripts_constants/process_tree_kill_constants.py` | The taskkill command, its `/T`, `/F`, and `/PID` flags, and the bound on the kill command |
28
- | `scripts/pyproject.toml` | mypy configuration; `check.ps1` runs it under the `mypy-process-tree` label |
29
-
30
- ## Platform guard
31
-
32
- Both the branch selector and the POSIX helper compare `sys.platform` against
33
- the literal `"win32"`. That literal is what mypy narrows on: behind a named
34
- constant, `os.getpgid`, `os.killpg`, and `signal.SIGKILL` fail type checking on
35
- Windows.
36
-
37
- ## Pairing rule
38
-
39
- `os.killpg` signals a whole process group, so a child sharing the caller's
40
- group takes the caller down with it. Every `Popen` whose tree this module ends
41
- passes `start_new_session=should_start_new_session()`.
1
+ @AGENTS.md
@@ -0,0 +1,26 @@
1
+ # agents
2
+
3
+ Agent definition files installed into `~/.claude/agents/` by `bin/install.mjs`. Each `.md` file defines a named subagent: its description (shown in the Claude Code UI), allowed tools, and behavioral instructions.
4
+
5
+ ## Agent files
6
+
7
+ | File | Agent name | Role |
8
+ |---|---|---|
9
+ | `clean-coder.md` | Clean Coder | Primary code-writing agent; links the review contract, CODE_RULES, and enforcer; task-local discovery and gate-clean first writes |
10
+ | `code-quality-agent.md` | Code Quality Agent | Multi-file code quality review across an entire diff or set of files |
11
+ | `git-commit-crafter.md` | Git Commit Crafter | Stages changes, writes conventional commit messages, creates commits |
12
+ | `issue-tracker.md` | Issue Tracker | Primary handler for one GitHub issue action per spawn; loads the issue-tracker skill (plain-brief); returns issue numbers and URLs |
13
+ | `plan-packet-validator.md` | Plan Packet Validator | Fresh-context validator for workflow-generated plan packets under `docs/plans/` |
14
+ | `pr-description-writer.md` | PR Description Writer | Drafts PR descriptions and comments from the current diff using the canonical description and comment guides |
15
+ | `session-advisor.md` | Session Advisor | Standing multi-consumer reviewer; SendMessage only; returns endorse/correction/plan/stop |
16
+ | `skill-writer-agent.md` | Skill Writer Agent | Authors SKILL.md and companion files to skill-builder conventions; caller-agnostic authoring specialist |
17
+
18
+ ## Format
19
+
20
+ Each file uses YAML frontmatter (`name`, `description`, `tools`, optional `color`) followed by a Markdown body with the agent's behavioral instructions. The `description` field appears in the Claude Code agent picker. An agent definition carries no `model` key — the caller supplies the model on each spawn.
21
+
22
+ ## Adding an agent
23
+
24
+ 1. Create a new `.md` file in this directory with valid frontmatter.
25
+ 2. Run `bin/install.mjs` to copy it to `~/.claude/agents/`.
26
+ 3. Restart Claude Code to pick up the new agent.
package/agents/CLAUDE.md CHANGED
@@ -1,31 +1 @@
1
- # agents
2
-
3
- Agent definition files installed into `~/.claude/agents/` by `bin/install.mjs`. Each `.md` file defines a named subagent: its description (shown in the Claude Code UI), allowed tools, and behavioral instructions.
4
-
5
- ## Agent files
6
-
7
- | File | Agent name | Role |
8
- |---|---|---|
9
- | `caveman.md` | Caveman Agent | Terse voice and smallest-possible artifacts; questions premise before building |
10
- | `clasp-deployment-orchestrator.md` | Clasp Deployment Orchestrator | Creates and deploys Google Apps Script projects with multiple files |
11
- | `clean-coder.md` | Clean Coder | Primary code-writing agent; links AGENTS.md / CODE_RULES / enforcer; task-local discovery and gate-clean first writes |
12
- | `code-advisor.md` | Code Advisor | Single-executor mid-run advisor (PLAN/CORRECTION/STOP as final text); distinct from session-advisor |
13
- | `code-quality-agent.md` | Code Quality Agent | Multi-file code quality review across an entire diff or set of files |
14
- | `deep-research.md` | Deep Research | Citation-grounded research with web search |
15
- | `docs-agent.md` | Docs Agent | Documentation authoring and maintenance |
16
- | `git-commit-crafter.md` | Git Commit Crafter | Stages changes, writes conventional commit messages, creates commits |
17
- | `issue-tracker.md` | Issue Tracker | Primary handler for one GitHub issue action per spawn; loads the issue-tracker skill (plain-brief); returns issue numbers and URLs |
18
- | `plan-packet-validator.md` | Plan Packet Validator | Fresh-context validator for workflow-generated plan packets under `docs/plans/` |
19
- | `pr-description-writer.md` | PR Description Writer | Drafts PR descriptions and comments from the current diff using the canonical description and comment guides |
20
- | `session-advisor.md` | Session Advisor | Standing multi-consumer reviewer; SendMessage only; returns endorse/correction/plan/stop |
21
- | `skill-writer-agent.md` | Skill Writer Agent | Authors SKILL.md and companion files to skill-builder conventions; caller-agnostic authoring specialist |
22
-
23
- ## Format
24
-
25
- Each file uses YAML frontmatter (`name`, `description`, `tools`, optional `color`) followed by a Markdown body with the agent's behavioral instructions. The `description` field appears in the Claude Code agent picker. An agent definition carries no `model` key — the caller supplies the model on each spawn.
26
-
27
- ## Adding an agent
28
-
29
- 1. Create a new `.md` file in this directory with valid frontmatter.
30
- 2. Run `bin/install.mjs` to copy it to `~/.claude/agents/`.
31
- 3. Restart Claude Code to pick up the new agent.
1
+ @AGENTS.md
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: clean-coder
3
- description: "Use PROACTIVELY for ALL code generation — features, fixes, refactors, hooks, automation, and any task that produces code. Links repo-root AGENTS.md and the CODE_RULES / enforcer / rules map; task-local discovery; high-signal gotchas so write gates pass on the first attempt."
3
+ description: "Use PROACTIVELY for ALL code generation — features, fixes, refactors, hooks, automation, and any task that produces code. Links the project review contract and the CODE_RULES / enforcer / rules map; task-local discovery; high-signal gotchas so write gates pass on the first attempt."
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob, Task, Skill, SendMessage
5
5
  color: green
6
6
  ---
7
7
 
8
8
  # Clean Coder — Zero-Defect Code Generation
9
9
 
10
- You are the definitive code-writing agent. You produce code so clean that reviewers find nothing. **Canonical policy is repository-root `AGENTS.md` when present.** `../docs/CODE_RULES.md` is its compact projection; `../hooks/blocking/code_rules_enforcer.py` is hand-maintained write-time enforcement. Do not restate those rules with divergent wording — link them.
10
+ You are the definitive code-writing agent. You produce code so clean that reviewers find nothing. **Use the repository's checked-in review contract when present.** `../docs/CODE_RULES.md` is its compact projection; `../hooks/blocking/code_rules_enforcer.py` is hand-maintained write-time enforcement. Link these references and keep their wording authoritative.
11
11
 
12
- **Announce at start:** "Using clean-coder agent — AGENTS.md / CODE_RULES via canonical refs."
12
+ **Announce at start:** "Using clean-coder agent — review contract / CODE_RULES via canonical refs."
13
13
 
14
14
  ## First Action (MANDATORY)
15
15
 
@@ -39,7 +39,7 @@ Paths are relative to this agent file (`agents/`).
39
39
 
40
40
  | Concern | Canonical source |
41
41
  |---|---|
42
- | Full review criteria | Repo-root `AGENTS.md` (when the target repo has one) |
42
+ | Full review criteria | Project review contract (when the target repo provides one) |
43
43
  | Compact generation checklist | `../docs/CODE_RULES.md` |
44
44
  | Write-time gates | `../hooks/blocking/code_rules_enforcer.py` |
45
45
  | Policy surface map | `../rules/code-standards.md` |
@@ -47,7 +47,7 @@ Paths are relative to this agent file (`agents/`).
47
47
  | Windows rmtree / mkdir | `../rules/windows-filesystem-safe.md` |
48
48
  | `gh` body files | `../rules/gh-cli-conventions.md` |
49
49
  | Plain illustrative docstrings | `../rules/plain-illustrative-docstrings.md` |
50
- | TDD / right-size | `AGENTS.md` Tests + Design; `CODE_RULES.md` §7–§8 |
50
+ | TDD / right-size | Review contract Tests + Design; `CODE_RULES.md` §7–§8 |
51
51
 
52
52
  Type-ignore rule (AGENTS Types): a `# type: ignore` needs a second trailing `#` justification of at least five characters. Prefer a real type when available.
53
53
 
@@ -88,7 +88,7 @@ def fetch_with_retries(url: str) -> str:
88
88
  ## Scope, TDD, and outcomes
89
89
 
90
90
  - **Scope:** only lines the task needs. Surface out-of-scope CODE_RULES drift after the task, do not expand silently.
91
- - **TDD:** when tests are in scope, red → green → refactor (`AGENTS.md` Tests / `CODE_RULES` §8).
91
+ - **TDD:** when tests are in scope, red → green → refactor (review contract Tests / `CODE_RULES` §8).
92
92
  - **Outcome:** code that passes `/check` and the write gates on the first write; self-documenting names; paired tests for new production paths.
93
93
 
94
94
  ## When to use this agent
@@ -42,8 +42,8 @@ non-empty string, and a `name` equal to its file stem — a mapping that loads
42
42
  but binds `description` to nothing, or names an agent the file does not,
43
43
  registers a subagent the caller cannot spawn::
44
44
 
45
- ok: docs-agent.md -> name: docs-agent
46
- flag: docs-agent.md -> name: doc-manager <- wrong spawn id
45
+ ok: clean-coder.md -> name: clean-coder
46
+ flag: clean-coder.md -> name: doc-manager <- wrong spawn id
47
47
  flag: description: <- loads as None, loader needs text
48
48
 
49
49
  Every check above is parametrized over the definitions that yield a
@@ -52,8 +52,8 @@ and leave the suite green while unreadable. The block is what the fence lines
52
52
  delimit, so the file that opens no fence or never closes one is exactly the
53
53
  broken file these checks exist to catch::
54
54
 
55
- ok: docs-agent.md -> --- name/description --- <- block found
56
- flag: docs-agent.md -> --- name/description <- no closing fence,
55
+ ok: clean-coder.md -> --- name/description --- <- block found
56
+ flag: clean-coder.md -> --- name/description <- no closing fence,
57
57
  silently uncovered
58
58
 
59
59
  `test_every_agent_definition_yields_a_frontmatter_block` holds that floor: it
@@ -79,7 +79,7 @@ import pytest
79
79
  import yaml
80
80
 
81
81
  ACCEPTED_FRONTMATTER_KEYS = frozenset({"name", "description", "tools", "color"})
82
- EXEMPT_MARKDOWN_FILENAME = "CLAUDE.md"
82
+ INSTRUCTION_ALIAS_FILENAMES = frozenset({"AGENTS.md", "CLAUDE.md"})
83
83
  FRONTMATTER_FENCE_LINE = "---"
84
84
  MATERIALIZER_MODULE_NAME = "codex_compat_materializer"
85
85
  MATERIALIZER_MODULE_PATH = (
@@ -113,20 +113,20 @@ def _extract_frontmatter_block(markdown_text: str) -> str | None:
113
113
 
114
114
  @cache
115
115
  def _agent_definition_candidate_paths() -> tuple[Path, ...]:
116
- """Return every markdown file in this directory that must be a definition.
116
+ """Return every markdown file in this directory that is an agent definition.
117
117
 
118
118
  This is the floor the parametrized checks are measured against: each of
119
119
  these files is expected to yield a frontmatter block, so one that does not
120
120
  is a broken definition rather than a file to pass over.
121
121
 
122
122
  Returns:
123
- Every `*.md` path in this directory except the exempt one, sorted.
123
+ Every agent-definition `*.md` path in this directory, sorted.
124
124
  """
125
125
  agents_directory = Path(__file__).parent
126
126
  return tuple(
127
127
  each_markdown_file
128
128
  for each_markdown_file in sorted(agents_directory.glob("*.md"))
129
- if each_markdown_file.name != EXEMPT_MARKDOWN_FILENAME
129
+ if each_markdown_file.name not in INSTRUCTION_ALIAS_FILENAMES
130
130
  )
131
131
 
132
132
 
@@ -218,8 +218,8 @@ def _agent_name_problem(parsed_frontmatter: object, expected_name: str) -> str |
218
218
  A subagent registers under the name in its frontmatter, so a name that is
219
219
  not the file stem is spawned by an id no caller uses::
220
220
 
221
- docs-agent.md -> name: docs-agent -> ok: None
222
- docs-agent.md -> name: doc-manager -> flag: wrong spawn id
221
+ clean-coder.md -> name: clean-coder -> ok: None
222
+ clean-coder.md -> name: doc-manager -> flag: wrong spawn id
223
223
 
224
224
  Args:
225
225
  parsed_frontmatter: Value `yaml.safe_load` produced for the block.
@@ -289,7 +289,7 @@ def test_agent_frontmatter_loads_as_a_yaml_mapping(
289
289
  @pytest.mark.parametrize(
290
290
  "agent_file_name",
291
291
  (
292
- "docs-agent.md",
292
+ "clean-coder.md",
293
293
  "issue-tracker.md",
294
294
  "skill-writer-agent.md",
295
295
  ),
@@ -0,0 +1,43 @@
1
+ # audit-rubrics
2
+
3
+ Audit rubrics for the PR-loop code-review suite. The rubrics define the 17 bug categories (A–Q), their sub-bucket decompositions, and the prompt templates agents use during an audit pass. Installed into `~/.claude/audit-rubrics/` by `bin/install.mjs`.
4
+
5
+ ## Key file
6
+
7
+ | File | Purpose |
8
+ |---|---|
9
+ | `audit-categories.json` | Machine-readable A-Q schema: id, title, slug, and sub-bucket id/axis pairs; single source for rubric and prompt skeleton parity |
10
+ | `source-material-section-types.md` | Lookup table for how to chunk an artifact into sections for an audit prompt; covers code PRs, docs, SQL schemas, config files, and more |
11
+
12
+ ## Subdirectories
13
+
14
+ | Entry | Description |
15
+ |---|---|
16
+ | `category_rubrics/` | One `.md` per category (A–Q): defines what the category audits, example findings, and a sub-bucket decomposition table |
17
+ | `prompts/` | One `.md` per category: the ready-to-use audit prompt template an agent inlines the artifact into |
18
+
19
+ ## Categories
20
+
21
+ | ID | Name |
22
+ |---|---|
23
+ | A | API contract verification |
24
+ | B | Selector engine compatibility |
25
+ | C | Resource cleanup |
26
+ | D | Scoping and ordering |
27
+ | E | Dead code |
28
+ | F | Silent failures |
29
+ | G | Bounds and overflow |
30
+ | H | Security boundaries |
31
+ | I | Concurrency |
32
+ | J | Code-rules compliance |
33
+ | K | Codebase conflicts |
34
+ | L | Behavior equivalence |
35
+ | M | Producer-consumer cardinality |
36
+ | N | Test name / scenario verifier |
37
+ | O | Docstring vs implementation drift |
38
+ | P | Name vs behavior contract |
39
+ | Q | Cross-surface claim consistency |
40
+
41
+ ## Breaking-change rule
42
+
43
+ Adding a sub-bucket to a category rubric requires updating `audit-categories.json` and the matching prompt template in `prompts/` in the same commit, then running `audit_category_schema.py --validate`. Skills that reference category IDs (`bugteam`, `findbugs`) rely on stable sub-bucket IDs (A1, A2, … Q-n). Worked examples stay in the rubric markdown only; they are outside the schema.
@@ -1,43 +1 @@
1
- # audit-rubrics
2
-
3
- Audit rubrics for the PR-loop code-review suite. The rubrics define the 17 bug categories (A–Q), their sub-bucket decompositions, and the prompt templates agents use during an audit pass. Installed into `~/.claude/audit-rubrics/` by `bin/install.mjs`.
4
-
5
- ## Key file
6
-
7
- | File | Purpose |
8
- |---|---|
9
- | `audit-categories.json` | Machine-readable A-Q schema: id, title, slug, and sub-bucket id/axis pairs; single source for rubric and prompt skeleton parity |
10
- | `source-material-section-types.md` | Lookup table for how to chunk an artifact into sections for an audit prompt; covers code PRs, docs, SQL schemas, config files, and more |
11
-
12
- ## Subdirectories
13
-
14
- | Entry | Description |
15
- |---|---|
16
- | `category_rubrics/` | One `.md` per category (A–Q): defines what the category audits, example findings, and a sub-bucket decomposition table |
17
- | `prompts/` | One `.md` per category: the ready-to-use audit prompt template an agent inlines the artifact into |
18
-
19
- ## Categories
20
-
21
- | ID | Name |
22
- |---|---|
23
- | A | API contract verification |
24
- | B | Selector engine compatibility |
25
- | C | Resource cleanup |
26
- | D | Scoping and ordering |
27
- | E | Dead code |
28
- | F | Silent failures |
29
- | G | Bounds and overflow |
30
- | H | Security boundaries |
31
- | I | Concurrency |
32
- | J | Code-rules compliance |
33
- | K | Codebase conflicts |
34
- | L | Behavior equivalence |
35
- | M | Producer-consumer cardinality |
36
- | N | Test name / scenario verifier |
37
- | O | Docstring vs implementation drift |
38
- | P | Name vs behavior contract |
39
- | Q | Cross-surface claim consistency |
40
-
41
- ## Breaking-change rule
42
-
43
- Adding a sub-bucket to a category rubric requires updating `audit-categories.json` and the matching prompt template in `prompts/` in the same commit, then running `audit_category_schema.py --validate`. Skills that reference category IDs (`bugteam`, `findbugs`) rely on stable sub-bucket IDs (A1, A2, … Q-n). Worked examples stay in the rubric markdown only; they are outside the schema.
1
+ @AGENTS.md
@@ -0,0 +1,37 @@
1
+ # audit-rubrics/category_rubrics
2
+
3
+ One rubric file per audit category (A–Q). Each file defines what the category covers, gives concrete examples of findings, and provides the sub-bucket decomposition an audit agent uses to structure its pass.
4
+
5
+ ## Files
6
+
7
+ | File | Category |
8
+ |---|---|
9
+ | `category-a-api-contracts.md` | A — API contract verification |
10
+ | `category-b-selector-engine-compat.md` | B — Selector engine compatibility |
11
+ | `category-c-resource-cleanup.md` | C — Resource cleanup |
12
+ | `category-d-scoping-and-ordering.md` | D — Scoping and ordering |
13
+ | `category-e-dead-code.md` | E — Dead code |
14
+ | `category-f-silent-failures.md` | F — Silent failures |
15
+ | `category-g-bounds-and-overflow.md` | G — Bounds and overflow |
16
+ | `category-h-security-boundaries.md` | H — Security boundaries |
17
+ | `category-i-concurrency.md` | I — Concurrency |
18
+ | `category-j-code-rules-compliance.md` | J — Code-rules compliance |
19
+ | `category-k-codebase-conflicts.md` | K — Codebase conflicts |
20
+ | `category-l-behavior-equivalence.md` | L — Behavior equivalence |
21
+ | `category-m-producer-consumer-cardinality.md` | M — Producer-consumer cardinality |
22
+ | `category-n-test-name-scenario-verifier.md` | N — Test name / scenario verifier |
23
+ | `category-o-docstring-vs-impl-drift.md` | O — Docstring vs implementation drift |
24
+ | `category-p-name-vs-behavior-contract.md` | P — Name vs behavior contract |
25
+ | `category-q-cross-surface-claims.md` | Q — Cross-surface claim consistency |
26
+
27
+ ## Rubric structure
28
+
29
+ Each file has:
30
+ - A plain-language description of what the category audits
31
+ - Concrete finding examples
32
+ - A companion-reference pointer to `../source-material-section-types.md`
33
+ - A sub-bucket decomposition table with stable IDs (A1, A2, …) and the concrete checks each bucket requires
34
+
35
+ ## Relationship to prompts/
36
+
37
+ `category_rubrics/` is the human-readable reference. `prompts/` holds the agent-ready prompt templates that inline the same sub-bucket list in a structured prompt format. Keep both in sync when sub-buckets change.
@@ -1,37 +1 @@
1
- # audit-rubrics/category_rubrics
2
-
3
- One rubric file per audit category (A–Q). Each file defines what the category covers, gives concrete examples of findings, and provides the sub-bucket decomposition an audit agent uses to structure its pass.
4
-
5
- ## Files
6
-
7
- | File | Category |
8
- |---|---|
9
- | `category-a-api-contracts.md` | A — API contract verification |
10
- | `category-b-selector-engine-compat.md` | B — Selector engine compatibility |
11
- | `category-c-resource-cleanup.md` | C — Resource cleanup |
12
- | `category-d-scoping-and-ordering.md` | D — Scoping and ordering |
13
- | `category-e-dead-code.md` | E — Dead code |
14
- | `category-f-silent-failures.md` | F — Silent failures |
15
- | `category-g-bounds-and-overflow.md` | G — Bounds and overflow |
16
- | `category-h-security-boundaries.md` | H — Security boundaries |
17
- | `category-i-concurrency.md` | I — Concurrency |
18
- | `category-j-code-rules-compliance.md` | J — Code-rules compliance |
19
- | `category-k-codebase-conflicts.md` | K — Codebase conflicts |
20
- | `category-l-behavior-equivalence.md` | L — Behavior equivalence |
21
- | `category-m-producer-consumer-cardinality.md` | M — Producer-consumer cardinality |
22
- | `category-n-test-name-scenario-verifier.md` | N — Test name / scenario verifier |
23
- | `category-o-docstring-vs-impl-drift.md` | O — Docstring vs implementation drift |
24
- | `category-p-name-vs-behavior-contract.md` | P — Name vs behavior contract |
25
- | `category-q-cross-surface-claims.md` | Q — Cross-surface claim consistency |
26
-
27
- ## Rubric structure
28
-
29
- Each file has:
30
- - A plain-language description of what the category audits
31
- - Concrete finding examples
32
- - A companion-reference pointer to `../source-material-section-types.md`
33
- - A sub-bucket decomposition table with stable IDs (A1, A2, …) and the concrete checks each bucket requires
34
-
35
- ## Relationship to prompts/
36
-
37
- `category_rubrics/` is the human-readable reference. `prompts/` holds the agent-ready prompt templates that inline the same sub-bucket list in a structured prompt format. Keep both in sync when sub-buckets change.
1
+ @AGENTS.md
@@ -0,0 +1,37 @@
1
+ # audit-rubrics/prompts
2
+
3
+ Agent-ready audit prompt templates, one per category (A–Q). An agent inlines the artifact under review into the `[INLINE THE FULL ARTIFACT HERE]` placeholder and runs the prompt as-is.
4
+
5
+ ## Files
6
+
7
+ | File | Category |
8
+ |---|---|
9
+ | `category-a-api-contracts.md` | A — API contract verification |
10
+ | `category-b-selector-engine-compat.md` | B — Selector engine compatibility |
11
+ | `category-c-resource-cleanup.md` | C — Resource cleanup |
12
+ | `category-d-scoping-and-ordering.md` | D — Scoping and ordering |
13
+ | `category-e-dead-code.md` | E — Dead code |
14
+ | `category-f-silent-failures.md` | F — Silent failures |
15
+ | `category-g-bounds-and-overflow.md` | G — Bounds and overflow |
16
+ | `category-h-security-boundaries.md` | H — Security boundaries |
17
+ | `category-i-concurrency.md` | I — Concurrency |
18
+ | `category-j-code-rules-compliance.md` | J — Code-rules compliance |
19
+ | `category-k-codebase-conflicts.md` | K — Codebase conflicts |
20
+ | `category-l-behavior-equivalence.md` | L — Behavior equivalence |
21
+ | `category-m-producer-consumer-cardinality.md` | M — Producer-consumer cardinality |
22
+ | `category-n-test-name-scenario-verifier.md` | N — Test name / scenario verifier |
23
+ | `category-o-docstring-vs-impl-drift.md` | O — Docstring vs implementation drift |
24
+ | `category-p-name-vs-behavior-contract.md` | P — Name vs behavior contract |
25
+ | `category-q-cross-surface-claims.md` | Q — Cross-surface claim consistency |
26
+
27
+ ## Prompt structure
28
+
29
+ Each template:
30
+ - Scopes the audit to one category only (skip the others)
31
+ - Lists all sub-buckets from the matching `category_rubrics/` file
32
+ - Requires each sub-bucket to produce at least one Shape A finding OR one Shape B proof-of-absence with three or more adversarial probes
33
+ - Uses `find` as the finding ID prefix (single-pass audits) rather than `loop<N>-<K>`
34
+
35
+ ## Relationship to category_rubrics/
36
+
37
+ `prompts/` is the executable form; `category_rubrics/` is the reference form. When a sub-bucket decomposition changes in a rubric, update the matching prompt in the same commit.
@@ -1,37 +1 @@
1
- # audit-rubrics/prompts
2
-
3
- Agent-ready audit prompt templates, one per category (A–Q). An agent inlines the artifact under review into the `[INLINE THE FULL ARTIFACT HERE]` placeholder and runs the prompt as-is.
4
-
5
- ## Files
6
-
7
- | File | Category |
8
- |---|---|
9
- | `category-a-api-contracts.md` | A — API contract verification |
10
- | `category-b-selector-engine-compat.md` | B — Selector engine compatibility |
11
- | `category-c-resource-cleanup.md` | C — Resource cleanup |
12
- | `category-d-scoping-and-ordering.md` | D — Scoping and ordering |
13
- | `category-e-dead-code.md` | E — Dead code |
14
- | `category-f-silent-failures.md` | F — Silent failures |
15
- | `category-g-bounds-and-overflow.md` | G — Bounds and overflow |
16
- | `category-h-security-boundaries.md` | H — Security boundaries |
17
- | `category-i-concurrency.md` | I — Concurrency |
18
- | `category-j-code-rules-compliance.md` | J — Code-rules compliance |
19
- | `category-k-codebase-conflicts.md` | K — Codebase conflicts |
20
- | `category-l-behavior-equivalence.md` | L — Behavior equivalence |
21
- | `category-m-producer-consumer-cardinality.md` | M — Producer-consumer cardinality |
22
- | `category-n-test-name-scenario-verifier.md` | N — Test name / scenario verifier |
23
- | `category-o-docstring-vs-impl-drift.md` | O — Docstring vs implementation drift |
24
- | `category-p-name-vs-behavior-contract.md` | P — Name vs behavior contract |
25
- | `category-q-cross-surface-claims.md` | Q — Cross-surface claim consistency |
26
-
27
- ## Prompt structure
28
-
29
- Each template:
30
- - Scopes the audit to one category only (skip the others)
31
- - Lists all sub-buckets from the matching `category_rubrics/` file
32
- - Requires each sub-bucket to produce at least one Shape A finding OR one Shape B proof-of-absence with three or more adversarial probes
33
- - Uses `find` as the finding ID prefix (single-pass audits) rather than `loop<N>-<K>`
34
-
35
- ## Relationship to category_rubrics/
36
-
37
- `prompts/` is the executable form; `category_rubrics/` is the reference form. When a sub-bucket decomposition changes in a rubric, update the matching prompt in the same commit.
1
+ @AGENTS.md