claude-dev-env 4.3.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/.agents/agents/pr-description-writer.md +2 -2
  2. package/.agents/agents/test_agent_frontmatter.py +2 -2
  3. package/.agents/agents/test_pr_description_writer_style.py +1 -3
  4. package/.agents/skills/e-code-review/SKILL.md +12 -12
  5. package/.agents/skills/e-code-review/preflight-proposal.contract.test.mjs +20 -0
  6. package/.agents/skills/e-code-review/reference/fix.md +15 -17
  7. package/.agents/skills/e-code-review/reference/loop.md +35 -39
  8. package/.agents/skills/e-code-review/reference/mode-contract.test.mjs +2 -1
  9. package/.agents/skills/e-code-review/reference/preflight-proposal.md +44 -9
  10. package/.agents/skills/e-code-review/reference/runner-selection.md +13 -14
  11. package/.agents/skills/issue-tracker/SKILL.md +5 -4
  12. package/.agents/skills/pull-request/SKILL.md +11 -13
  13. package/.agents/skills/pull-request/reference/publication-tasks.md +3 -3
  14. package/.agents/skills/pull-request/scripts/github_pr_command_constants/config/constants.py +9 -1
  15. package/.agents/skills/pull-request/scripts/pull_request.py +33 -44
  16. package/.agents/skills/pull-request/scripts/test_github_pr_command_constants.py +9 -0
  17. package/.agents/skills/pull-request/scripts/test_pull_request.py +1 -3
  18. package/.agents/skills/skill-builder/SKILL.md +3 -196
  19. package/_shared/pr-loop/scripts/pr_loop_shared_constants/terminology_sweep_constants.py +6 -0
  20. package/_shared/pr-loop/scripts/terminology_sweep.py +64 -19
  21. package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +59 -0
  22. package/bin/install.agents-home.test.mjs +15 -13
  23. package/bin/install.mjs +28 -0
  24. package/bin/install.policy-lint.test.mjs +78 -0
  25. package/bin/install.prune.test.mjs +59 -20
  26. package/bin/install.pstack-plugin.test.mjs +114 -0
  27. package/bin/install.test.mjs +37 -0
  28. package/bin/refresh-pstack-plugin-skills.test.mjs +211 -0
  29. package/hooks/advisory/pr_done_reminder.py +342 -0
  30. package/hooks/advisory/test_pr_done_reminder.py +249 -0
  31. package/hooks/blocking/bash_post_call_dispatcher.py +53 -6
  32. package/hooks/blocking/code_rules_paired_test.py +22 -15
  33. package/hooks/blocking/test_bash_post_call_dispatcher.py +65 -4
  34. package/hooks/blocking/test_code_rules_enforcer_paired_test.py +36 -29
  35. package/hooks/blocking/test_code_rules_js_resume_task_enumeration.py +4 -4
  36. package/hooks/blocking/test_code_rules_js_returns_object_schemaless.py +5 -5
  37. package/hooks/blocking/test_pre_tool_use_dispatcher.py +68 -133
  38. package/hooks/blocking/test_pre_tool_use_dispatcher_native.py +20 -51
  39. package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +18 -18
  40. package/hooks/git-hooks/git_hooks_constants/staged_policy_lint.py +12 -0
  41. package/hooks/git-hooks/pre_commit.py +52 -11
  42. package/hooks/git-hooks/test_installed_policy_lint.py +159 -0
  43. package/hooks/git-hooks/test_native_policy_commit.py +87 -0
  44. package/hooks/git-hooks/test_pre_commit.py +246 -0
  45. package/hooks/hooks.json +1 -1
  46. package/hooks/hooks_constants/bash_post_call_dispatcher_constants.py +14 -1
  47. package/hooks/hooks_constants/pr_done_reminder_constants.py +98 -0
  48. package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +10 -43
  49. package/hooks/hooks_constants/test_bash_post_call_dispatcher_constants.py +19 -2
  50. package/hooks/hooks_constants/test_pr_done_reminder_constants.py +40 -0
  51. package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +20 -32
  52. package/package.json +2 -2
  53. package/rules/durable-post-artifacts.md +2 -1
  54. package/rules/git-workflow.md +6 -6
  55. package/scripts/check.ps1 +0 -1
  56. package/{.agents/skills/run-claude-dev-env/driver.mjs → scripts/ci/installer-lifecycle.mjs} +3 -28
  57. package/scripts/ci/installer-lifecycle.test.mjs +26 -0
  58. package/scripts/ci/windows-installer-lifecycle.ps1 +1 -11
  59. package/scripts/dev_env_scripts_constants/shared_tree_constants.py +4 -5
  60. package/{.agents/skills/_shared/pr-loop/scripts → scripts}/durable_post_lint.py +5 -41
  61. package/{.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/durable_post_lint_constants.py → scripts/durable_post_lint_config/config/constants.py} +0 -10
  62. package/{.agents/skills/_shared/pr-loop/scripts/test_durable_post_lint_constants.py → scripts/durable_post_lint_config/config/test_constants.py} +1 -1
  63. package/scripts/policy_lint/adapter_detectors.py +13 -6
  64. package/scripts/policy_lint/adapters.py +7 -4
  65. package/scripts/policy_lint/config/constants.py +5 -0
  66. package/scripts/policy_lint/engine.py +48 -4
  67. package/scripts/policy_lint/model.py +1 -0
  68. package/scripts/policy_lint/registry.py +1 -1
  69. package/scripts/policy_lint/selection.py +2 -1
  70. package/scripts/policy_lint/selection_git.py +2 -0
  71. package/scripts/refresh_pstack_plugin_skills.mjs +200 -0
  72. package/scripts/shared_tree_paths.py +32 -3
  73. package/scripts/test_shared_tree_paths.py +33 -0
  74. package/scripts/tests/test_policy_lint_rules_archive.py +120 -0
  75. package/scripts/tests/test_policy_lint_rules_engine.py +25 -4
  76. package/scripts/tests/test_policy_lint_rules_installed_loader.py +29 -0
  77. package/scripts/tests/test_policy_lint_rules_registry.py +227 -13
  78. package/scripts/tests/test_policy_lint_selection.py +25 -2
  79. package/scripts/tests/test_policy_lint_selection_native_index.py +30 -0
  80. package/scripts/tests/test_rules.py +3 -7
  81. package/.agents/skills/_shared/pr-loop/.claude/CLAUDE.md +0 -1
  82. package/.agents/skills/_shared/pr-loop/AGENTS.md +0 -1
  83. package/.agents/skills/_shared/pr-loop/audit-contract.md +0 -5
  84. package/.agents/skills/_shared/pr-loop/audit-reply-template.md +0 -5
  85. package/.agents/skills/_shared/pr-loop/code-rules-gate.md +0 -5
  86. package/.agents/skills/_shared/pr-loop/fix-protocol.md +0 -5
  87. package/.agents/skills/_shared/pr-loop/gh-payloads.md +0 -5
  88. package/.agents/skills/_shared/pr-loop/portable-driver.md +0 -149
  89. package/.agents/skills/_shared/pr-loop/post-audit-thread-contract.md +0 -5
  90. package/.agents/skills/_shared/pr-loop/precatch-rubric.md +0 -5
  91. package/.agents/skills/_shared/pr-loop/preflight-proposal.contract.test.mjs +0 -119
  92. package/.agents/skills/_shared/pr-loop/preflight-proposal.md +0 -5
  93. package/.agents/skills/_shared/pr-loop/prompts/.claude/CLAUDE.md +0 -1
  94. package/.agents/skills/_shared/pr-loop/prompts/AGENTS.md +0 -1
  95. package/.agents/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +0 -324
  96. package/.agents/skills/_shared/pr-loop/scripts/.claude/CLAUDE.md +0 -1
  97. package/.agents/skills/_shared/pr-loop/scripts/AGENTS.md +0 -1
  98. package/.agents/skills/_shared/pr-loop/scripts/RUNTIME_SCRIPTS.md +0 -29
  99. package/.agents/skills/_shared/pr-loop/scripts/_cli_utils.py +0 -22
  100. package/.agents/skills/_shared/pr-loop/scripts/_path_resolver.py +0 -186
  101. package/.agents/skills/_shared/pr-loop/scripts/_xml_utils.py +0 -20
  102. package/.agents/skills/_shared/pr-loop/scripts/audit_category_schema.py +0 -355
  103. package/.agents/skills/_shared/pr-loop/scripts/build_audit_prompt.py +0 -289
  104. package/.agents/skills/_shared/pr-loop/scripts/build_converge_task_list.py +0 -310
  105. package/.agents/skills/_shared/pr-loop/scripts/build_fix_prompt.py +0 -292
  106. package/.agents/skills/_shared/pr-loop/scripts/init_loop_state.py +0 -134
  107. package/.agents/skills/_shared/pr-loop/scripts/portable_converge_driver.py +0 -1646
  108. package/.agents/skills/_shared/pr-loop/scripts/preflight_worktree.py +0 -392
  109. package/.agents/skills/_shared/pr-loop/scripts/select_converge_pacer.py +0 -215
  110. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/.claude/CLAUDE.md +0 -1
  111. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +0 -1
  112. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/__init__.py +0 -0
  113. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/audit_category_schema_constants.py +0 -37
  114. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/converge_task_list_constants.py +0 -56
  115. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/handoff_constants.py +0 -45
  116. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/pacer_constants.py +0 -47
  117. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/path_resolver_constants.py +0 -157
  118. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/portable_driver_constants.py +0 -177
  119. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/preflight_constants.py +0 -70
  120. package/.agents/skills/_shared/pr-loop/scripts/teardown_worktrees.py +0 -172
  121. package/.agents/skills/_shared/pr-loop/scripts/test__path_resolver.py +0 -106
  122. package/.agents/skills/_shared/pr-loop/scripts/test_audit_category_schema.py +0 -94
  123. package/.agents/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +0 -499
  124. package/.agents/skills/_shared/pr-loop/scripts/test_build_converge_task_list.py +0 -140
  125. package/.agents/skills/_shared/pr-loop/scripts/test_build_fix_prompt.py +0 -262
  126. package/.agents/skills/_shared/pr-loop/scripts/test_init_loop_state.py +0 -71
  127. package/.agents/skills/_shared/pr-loop/scripts/test_portable_converge_driver.py +0 -1119
  128. package/.agents/skills/_shared/pr-loop/scripts/test_preflight_worktree.py +0 -287
  129. package/.agents/skills/_shared/pr-loop/scripts/test_select_converge_pacer.py +0 -207
  130. package/.agents/skills/_shared/pr-loop/scripts/test_teardown_worktrees.py +0 -59
  131. package/.agents/skills/_shared/pr-loop/scripts/test_write_handoff.py +0 -201
  132. package/.agents/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +0 -182
  133. package/.agents/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +0 -206
  134. package/.agents/skills/_shared/pr-loop/scripts/write_handoff.py +0 -309
  135. package/.agents/skills/_shared/pr-loop/state-schema.md +0 -5
  136. package/.agents/skills/_shared/pr-loop/worker-spawn.md +0 -5
  137. package/.agents/skills/autoconverge/.claude/CLAUDE.md +0 -1
  138. package/.agents/skills/autoconverge/AGENTS.md +0 -1
  139. package/.agents/skills/autoconverge/SKILL.md +0 -431
  140. package/.agents/skills/autoconverge/reference/.claude/CLAUDE.md +0 -1
  141. package/.agents/skills/autoconverge/reference/AGENTS.md +0 -1
  142. package/.agents/skills/autoconverge/reference/closing-report.md +0 -93
  143. package/.agents/skills/autoconverge/reference/convergence-gates.md +0 -31
  144. package/.agents/skills/autoconverge/reference/convergence.md +0 -219
  145. package/.agents/skills/autoconverge/reference/copilot-findings.md +0 -51
  146. package/.agents/skills/autoconverge/reference/gotchas.md +0 -66
  147. package/.agents/skills/autoconverge/reference/headless-safety.md +0 -44
  148. package/.agents/skills/autoconverge/reference/multi-pr.md +0 -128
  149. package/.agents/skills/autoconverge/reference/self-closing-loop.md +0 -84
  150. package/.agents/skills/autoconverge/reference/stop-conditions.md +0 -127
  151. package/.agents/skills/autoconverge/test_portable_pacer_gate.py +0 -54
  152. package/.agents/skills/autoconverge/workflow/.claude/CLAUDE.md +0 -1
  153. package/.agents/skills/autoconverge/workflow/AGENTS.md +0 -1
  154. package/.agents/skills/autoconverge/workflow/aggregate_runs.py +0 -371
  155. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/.claude/CLAUDE.md +0 -1
  156. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +0 -1
  157. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/__init__.py +0 -0
  158. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/render_report_constants.py +0 -250
  159. package/.agents/skills/autoconverge/workflow/converge.clean-audit.test.mjs +0 -665
  160. package/.agents/skills/autoconverge/workflow/converge.codex-gate.test.mjs +0 -472
  161. package/.agents/skills/autoconverge/workflow/converge.contract.test.mjs +0 -64
  162. package/.agents/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +0 -1009
  163. package/.agents/skills/autoconverge/workflow/converge.fix-progress.test.mjs +0 -107
  164. package/.agents/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +0 -33
  165. package/.agents/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +0 -15
  166. package/.agents/skills/autoconverge/workflow/converge.mjs +0 -3132
  167. package/.agents/skills/autoconverge/workflow/converge.p2-advance.test.mjs +0 -202
  168. package/.agents/skills/autoconverge/workflow/converge.path-aware.test.mjs +0 -47
  169. package/.agents/skills/autoconverge/workflow/converge.precatch.test.mjs +0 -152
  170. package/.agents/skills/autoconverge/workflow/converge.run-input.test.mjs +0 -116
  171. package/.agents/skills/autoconverge/workflow/converge_multi.mjs +0 -169
  172. package/.agents/skills/autoconverge/workflow/converge_multi.run-input.test.mjs +0 -173
  173. package/.agents/skills/autoconverge/workflow/convergence_summary.py +0 -110
  174. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a11d903476b803493.jsonl +0 -2
  175. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a26213978adeef6fb.jsonl +0 -2
  176. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a3def0d15ed9d9110.jsonl +0 -2
  177. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a41f41b1b708ee3b7.jsonl +0 -2
  178. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a758b880abecc3ff7.jsonl +0 -2
  179. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a8897b89656b1bd16.jsonl +0 -2
  180. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ab1c2d3e4f5a6b7c8.jsonl +0 -2
  181. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-abd463d744a1437bc.jsonl +0 -2
  182. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ad19d027ae8ee1816.jsonl +0 -2
  183. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/workflows/wf_881252e6-700.json +0 -266
  184. package/.agents/skills/autoconverge/workflow/render_report.py +0 -1024
  185. package/.agents/skills/autoconverge/workflow/test_aggregate_runs.py +0 -134
  186. package/.agents/skills/autoconverge/workflow/test_convergence_summary.py +0 -149
  187. package/.agents/skills/autoconverge/workflow/test_render_report.py +0 -812
  188. package/.agents/skills/hitl/SKILL.md +0 -45
  189. package/.agents/skills/pr-cleanup/SKILL.md +0 -140
  190. package/.agents/skills/pr-cleanup/reference/process-inventory.md +0 -17
  191. package/.agents/skills/pr-cleanup/reference/task-seeds.md +0 -22
  192. package/.agents/skills/pr-name-by-capability/SKILL.md +0 -73
  193. package/.agents/skills/pr-name-by-capability/reference/fetch-commands.md +0 -29
  194. package/.agents/skills/pr-name-by-capability/reference/offense-examples.md +0 -32
  195. package/.agents/skills/pr-name-by-capability/reference/report-template.md +0 -29
  196. package/.agents/skills/pr-name-by-capability/reference/rule-checklist.md +0 -38
  197. package/.agents/skills/pr-name-by-capability/reference/task-seeds.md +0 -10
  198. package/.agents/skills/pr-plain-language-cleanup/SKILL.md +0 -93
  199. package/.agents/skills/pr-refinement/SKILL.md +0 -31
  200. package/.agents/skills/pr-shared-extraction/SKILL.md +0 -177
  201. package/.agents/skills/pr-shared-extraction/reference/examples.md +0 -46
  202. package/.agents/skills/pr-shared-extraction/reference/offense-taxonomy.md +0 -100
  203. package/.agents/skills/pr-small-cl/SKILL.md +0 -52
  204. package/.agents/skills/pr-title-description/SKILL.md +0 -96
  205. package/.agents/skills/prototype/SKILL.md +0 -85
  206. package/.agents/skills/prototype/reference/honest-limitations.md +0 -23
  207. package/.agents/skills/prototype/reference/promotion-tasks.md +0 -23
  208. package/.agents/skills/prototype/scripts/build_sandbox_settings.py +0 -249
  209. package/.agents/skills/prototype/scripts/conftest.py +0 -15
  210. package/.agents/skills/prototype/scripts/launch_sandbox.py +0 -205
  211. package/.agents/skills/prototype/scripts/probe_sandbox_safety.py +0 -311
  212. package/.agents/skills/prototype/scripts/prototype_scripts_constants/__init__.py +0 -1
  213. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/__init__.py +0 -0
  214. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/build_sandbox_settings_constants.py +0 -41
  215. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/launch_sandbox_constants.py +0 -23
  216. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/probe_sandbox_safety_constants.py +0 -45
  217. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/prototype_common_constants.py +0 -10
  218. package/.agents/skills/prototype/scripts/test_build_sandbox_settings.py +0 -275
  219. package/.agents/skills/prototype/scripts/test_launch_sandbox.py +0 -303
  220. package/.agents/skills/prototype/scripts/test_probe_sandbox_safety.py +0 -312
  221. package/.agents/skills/prototype/workflows/promotion.md +0 -25
  222. package/.agents/skills/prototype/workflows/sandbox.md +0 -35
  223. package/.agents/skills/rebase/.claude/CLAUDE.md +0 -1
  224. package/.agents/skills/rebase/AGENTS.md +0 -1
  225. package/.agents/skills/rebase/SKILL.md +0 -178
  226. package/.agents/skills/review-router/SKILL.md +0 -51
  227. package/.agents/skills/review-router/reference/route-policy.json +0 -7
  228. package/.agents/skills/review-router/reference/task-seeds.md +0 -1
  229. package/.agents/skills/review-router/scripts/conftest.py +0 -4
  230. package/.agents/skills/review-router/scripts/review_router.py +0 -50
  231. package/.agents/skills/review-router/scripts/review_router_cli.py +0 -211
  232. package/.agents/skills/review-router/scripts/review_router_constants/__init__.py +0 -1
  233. package/.agents/skills/review-router/scripts/review_router_constants/config/__init__.py +0 -0
  234. package/.agents/skills/review-router/scripts/review_router_constants/config/constants.py +0 -13
  235. package/.agents/skills/review-router/scripts/test_review_router.py +0 -23
  236. package/.agents/skills/review-router/scripts/test_review_router_cli.py +0 -47
  237. package/.agents/skills/review-tier/SKILL.md +0 -56
  238. package/.agents/skills/review-tier/reference/task-seeds.md +0 -1
  239. package/.agents/skills/review-tier/reference/tier-policy.json +0 -9
  240. package/.agents/skills/review-tier/scripts/conftest.py +0 -4
  241. package/.agents/skills/review-tier/scripts/review_tier.py +0 -359
  242. package/.agents/skills/review-tier/scripts/review_tier_constants/__init__.py +0 -1
  243. package/.agents/skills/review-tier/scripts/review_tier_constants/config/__init__.py +0 -0
  244. package/.agents/skills/review-tier/scripts/review_tier_constants/config/constants.py +0 -29
  245. package/.agents/skills/review-tier/scripts/test_generation.py +0 -159
  246. package/.agents/skills/review-tier/scripts/test_review_tier.py +0 -33
  247. package/.agents/skills/run-claude-dev-env/SKILL.md +0 -84
  248. package/.agents/skills/session-log/.claude/CLAUDE.md +0 -1
  249. package/.agents/skills/session-log/AGENTS.md +0 -1
  250. package/.agents/skills/session-log/SKILL.md +0 -170
  251. package/.agents/skills/session-log/templates/frontmatter.md +0 -40
  252. package/.agents/skills/session-tidy/.claude/CLAUDE.md +0 -1
  253. package/.agents/skills/session-tidy/AGENTS.md +0 -1
  254. package/.agents/skills/session-tidy/SKILL.md +0 -191
  255. package/.agents/skills/skill-builder/references/.claude/CLAUDE.md +0 -1
  256. package/.agents/skills/skill-builder/references/AGENTS.md +0 -1
  257. package/.agents/skills/skill-builder/references/delegation-map.md +0 -130
  258. package/.agents/skills/skill-builder/references/description-field.md +0 -111
  259. package/.agents/skills/skill-builder/references/deterministic-elements.md +0 -218
  260. package/.agents/skills/skill-builder/references/progressive-disclosure.md +0 -122
  261. package/.agents/skills/skill-builder/references/self-audit-checklist.md +0 -126
  262. package/.agents/skills/skill-builder/references/skill-modularity.md +0 -111
  263. package/.agents/skills/skill-builder/references/skill-types.md +0 -232
  264. package/.agents/skills/skill-builder/references/thariq-x-post-skills.json +0 -33
  265. package/.agents/skills/skill-builder/templates/.claude/CLAUDE.md +0 -1
  266. package/.agents/skills/skill-builder/templates/AGENTS.md +0 -1
  267. package/.agents/skills/skill-builder/templates/gap-analysis.md +0 -87
  268. package/.agents/skills/skill-builder/workflows/.claude/CLAUDE.md +0 -1
  269. package/.agents/skills/skill-builder/workflows/AGENTS.md +0 -1
  270. package/.agents/skills/skill-builder/workflows/improve-skill.md +0 -136
  271. package/.agents/skills/skill-builder/workflows/new-skill.md +0 -179
  272. package/.agents/skills/skill-builder/workflows/polish-skill.md +0 -139
  273. package/.agents/skills/source-command-sr-loop/SKILL.md +0 -82
  274. package/.agents/skills/update/.claude/CLAUDE.md +0 -1
  275. package/.agents/skills/update/AGENTS.md +0 -1
  276. package/.agents/skills/update/SKILL.md +0 -190
  277. package/_shared/pr-loop/AGENTS.md +0 -1
  278. package/_shared/pr-loop/CLAUDE.md +0 -1
  279. package/_shared/pr-loop/audit-contract.md +0 -183
  280. package/_shared/pr-loop/audit-reply-template.md +0 -151
  281. package/_shared/pr-loop/code-rules-gate.md +0 -65
  282. package/_shared/pr-loop/fix-protocol.md +0 -60
  283. package/_shared/pr-loop/gh-payloads.md +0 -75
  284. package/_shared/pr-loop/post-audit-thread-contract.md +0 -51
  285. package/_shared/pr-loop/precatch-rubric.md +0 -66
  286. package/_shared/pr-loop/preflight-proposal.md +0 -56
  287. package/_shared/pr-loop/scripts/post_audit_thread.py +0 -1242
  288. package/_shared/pr-loop/scripts/pr_loop_shared_constants/post_audit_thread_constants.py +0 -199
  289. package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +0 -1115
  290. package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +0 -129
  291. package/_shared/pr-loop/state-schema.md +0 -45
  292. package/_shared/pr-loop/worker-spawn.md +0 -189
  293. /package/{.agents/skills/_shared/pr-loop/scripts → scripts}/test_durable_post_lint.py +0 -0
@@ -1,177 +0,0 @@
1
- ---
2
- name: pr-shared-extraction
3
- description: Audits pull requests and packages for general helpers living in workflow-specific code instead of shared_utils, then applies extraction fixes by default in small tested CLs. Use when reviewing PRs for architectural layering, migrating utilities out of cert_fix_queue/theme_dialer_pipeline/skills, auditing "similar offenses", or when the user mentions extraction audit, shared_utils migration, orchestration-only packages, thin wrappers, or layer inversions.
4
- ---
5
-
6
- # Shared Extraction Audit
7
-
8
- Audit PRs and packages for reusable behavior placed in workflow code. Keep **orchestration packages thin** and **shared_utils canonical**.
9
-
10
- ## When to use
11
-
12
- - User points at a PR (e.g. `#1954`, `#1965`) and asks for the same review loop
13
- - A package grew `fix_one`, `_default_*`, backup upload, rembg session, or residual gates alongside orchestration
14
- - Before merge: confirm consumers are adapters, not second implementations
15
-
16
- ## Mode routing
17
-
18
- Resolve the first matching mode before the audit steps:
19
-
20
- 1. `preflight-proposal` runs `pr-shared-extraction preflight-proposal <pr_number> --base-sha <base_sha> --head-sha <head_sha> --worktree <isolated_worktree>` under the [shared preflight proposal contract](../_shared/pr-loop/preflight-proposal.md). Record each finding with priority and target.
21
- 2. `audit-only` is report-only and ends after the findings report.
22
- 3. Normal mode follows the existing audit workflow and applies the prioritized fix band by default.
23
-
24
- ## Target architecture
25
-
26
- | Layer | Holds | Examples |
27
- |-------|--------|----------|
28
- | **shared_utils** | Reusable actions, I/O, DB flips, inference, constants used by 2+ workflows | `status_promotion`, `background_removal`, `drive_production_backup`, `stp_filenames` |
29
- | **Workflow package** | Orchestration, CLI, sweep loops, workflow-specific constants only | `cert_fix_queue/pipeline/queue_run.py`, `theme_dialer_pipeline` compose runners |
30
- | **Skills / scripts** | Operator entrypoints that **delegate** to shared_utils | No parallel rembg/session stacks |
31
-
32
- **Load-bearing rule:** If another package would import it, put it in `shared_utils`. After the move, every former caller imports the shared symbol and the old module is deleted.
33
-
34
- ## Audit workflow
35
-
36
- Register this checklist with `update_plan` and mark each step complete with evidence:
37
-
38
- ```
39
- Shared extraction audit:
40
- - [ ] 1. Scope the PR (base branch, changed packages, stated goal)
41
- - [ ] 2. Map canonical homes already in shared_utils
42
- - [ ] 3. Grep for offense patterns (see reference/offense-taxonomy.md)
43
- - [ ] 4. Write prioritized findings (P0–P3)
44
- - [ ] 5. Apply **Mode routing** after the report
45
- - [ ] 6. Extract in small CLs + move/adjust tests
46
- - [ ] 7. Run scoped pytest, then follow the selected mode's mutation boundary
47
- - [ ] 8. When the mode is `preflight-proposal`, record proposal evidence from the [shared preflight proposal contract](../_shared/pr-loop/preflight-proposal.md) and require downstream owner selection before reapplication
48
- ```
49
-
50
- ### Step 1 — Scope
51
-
52
- ```bash
53
- git fetch origin pull/<N>/head:pr-<N> # or checkout feature branch
54
- git diff <base>...<head> --stat
55
- git diff <base>...<head> --name-only | rg 'shared_utils|cert_fix_queue|theme_dialer|clean_room|\.claude/skills'
56
- ```
57
-
58
- Read the PR summary, then verify **what landed correctly** before listing offenses.
59
-
60
- ### Step 2 — Search patterns
61
-
62
- Run these greps on the PR diff scope:
63
-
64
- ```bash
65
- # Rename-only seams and re-export facades
66
- rg '_default_|def _.*_flipper|def _.*_one\b|promote_one|fix_one|backup_upload' <package> shared_utils
67
- rg '^from shared_utils\..* import \w+$' <package>
68
-
69
- # Layer inversions (shared importing consumer)
70
- rg 'from (cert_fix_queue|theme_dialer_pipeline|clean_room_theme_icons)\.' shared_utils/
71
-
72
- # Parallel stacks (second session/cache for same concern)
73
- rg 'new_session|lru_cache.*session|rembg\.remove' .claude/skills shared_utils
74
-
75
- # Duplicate constants
76
- rg 'ALPHA_CHANNEL_INDEX|RGBA_ALPHA|DEFAULT_.*_PREFIX|ONEUI_STP_BASENAME' --glob '*.py'
77
-
78
- # Duplicate test support
79
- rg 'fail_if_called|build_rejected_theme_row|preserve_supplied_alpha' --glob '**/tests/**'
80
- ```
81
-
82
- ### Step 3 — Classify offenses
83
-
84
- Use [reference/offense-taxonomy.md](reference/offense-taxonomy.md). Assign priority:
85
-
86
- | Priority | Meaning |
87
- |----------|---------|
88
- | **P0** | Layer inversion or duplicate production stack (must fix before merge) |
89
- | **P1** | General helper/constants/tests still in consumer package |
90
- | **P2** | Module shape, I/O overlap, monolith size |
91
- | **P3** | Stale names, docstrings, test attribute bugs |
92
-
93
- ### Step 4 — Report template
94
-
95
- ```markdown
96
- ## PR #<N> extraction audit
97
-
98
- ### Done well
99
- - [canonical modules and deletions]
100
-
101
- ### P0 — …
102
- | Offense | Where | Target module | Tests |
103
- |---------|-------|---------------|-------|
104
-
105
- ### Suggested fix order
106
- 1. …
107
- ```
108
-
109
- ## Fix workflow
110
-
111
- ### Extraction rules
112
-
113
- 1. **Move behavior** — delete the consumer copy; every caller imports the shared symbol
114
- 2. **Wire shared APIs at the call site** — e.g. `db_flipper=promote_theme_to_status` with `filename_prefix=...`
115
- 3. **Retarget every caller, then delete the old module** — grep the old import path; remove re-export facades
116
- 4. **Constants:** one source; workflow CLI keeps only workflow-specific names (`LEDGER_FILENAME`, exit codes)
117
- 5. **Tests move with behavior** — shared module gets shared tests; orchestration keeps integration tests only
118
- 6. **Small CLs** — one concern per commit; run scoped pytest after each
119
-
120
- ### Canonical target map (this repo)
121
-
122
- | Need | Home |
123
- |------|------|
124
- | Theme DB status flip | `shared_utils/theme_db/status_promotion.py` |
125
- | Account folder ↔ ThemeAccount | `shared_utils/theme_persistence/account_adapter.py` |
126
- | STP basename parsing | `shared_utils/samsung_utils/stp_filenames.py` |
127
- | Drive backup upload | `shared_utils/files/drive_production_backup.py` |
128
- | Timestamp scratch dirs | `shared_utils/files/timestamp_directory_retention.py` |
129
- | Foreground extraction | `shared_utils/theme_assets/background_removal.py` |
130
- | Cert fix / promote actions | `shared_utils/theme_assets/cert_closeout/` |
131
- | Fixed-STP promotion sweep | `shared_utils/samsung_utils/promote_fixed_stp_sweep.py` |
132
- | Cert queue orchestration only | `cert_fix_queue/pipeline/` (`queue_run`) and `run_cli` |
133
-
134
- See also `.claude/rules/reuse-existing-tooling.md` before adding helpers.
135
-
136
- ### Verification
137
-
138
- ```bash
139
- # Package under change (from its directory or shared_utils)
140
- cd shared_utils && python -m pytest path/to/tests -n 0 -q
141
- cd cert_fix_queue && python -m pytest tests/ -n 0 -q
142
-
143
- # After moving tests: bump CI collect floor in .github/workflows/standalone-packages-tests.yml if applicable
144
- ```
145
-
146
- Provide evidence: pytest output counts, not "should work".
147
-
148
- ### Git / PR
149
-
150
- - Branch: `cursor/<topic>-593d` or existing PR branch
151
- - Commit message: `Extract <what> from <package> into shared_utils`
152
- - Update PR body: architecture table + test counts
153
- - Do not merge; draft PR unless user says otherwise
154
-
155
- ## Anti-patterns (flag these)
156
-
157
- - `_default_*` adapter around a shared_utils function in a consumer module
158
- - Workflow module that only does `from shared_utils... import foo as foo`
159
- - `fix_one.py` / `promote_one.py` / `promote_run.py` / `backup_upload.py` in orchestration packages
160
- - `shared_utils` importing `theme_dialer_pipeline` or `cert_fix_queue`
161
- - Second rembg/BiRefNet session in a skill while `background_removal` exists
162
- - Identical `tests/support.py` in two packages
163
- - `config/constants.py` that only aliases extracted helpers
164
-
165
- ## Examples
166
-
167
- See [reference/examples.md](reference/examples.md) for cert_fix_queue (#1965) and background_removal (#1954) audits.
168
-
169
- ## File index
170
-
171
- | File | Purpose |
172
- |------|---------|
173
- | `SKILL.md` | Hub — architecture, routing, audit checklist, and fix workflow |
174
- | `reference/offense-taxonomy.md` | Offense signals and priority guide |
175
- | `reference/examples.md` | Audit examples and fix order |
176
- | `../_shared/pr-loop/preflight-proposal.md` | Shared isolated proposal mode and evidence record |
177
- | `../_shared/pr-loop/preflight-proposal.contract.test.mjs` | Cross-skill mode and contract test |
@@ -1,46 +0,0 @@
1
- # Audit examples (this repo)
2
-
3
- ## cert_fix_queue — PR #1965
4
-
5
- **Goal:** `cert_fix_queue` holds orchestration only; general cert-fix utilities in `shared_utils`.
6
-
7
- **Done well:**
8
- - `locate_cert_folder_for_row`, `select_production_stp`, atomic copy, drive staged upload → shared_utils
9
- - Deleted `fix_one.py`, `promote_one.py`, `backup_upload.py` from pipeline
10
-
11
- **Offenses found and fixed:**
12
- - `_default_db_flipper` in `fix_theme.py` → wire `db_flipper=promote_theme_to_status` at the call site; delete the wrapper
13
- - `production_backup.py` under cert_closeout → `shared_utils/files/drive_production_backup.py`
14
- - Duplicate test `support.py` → `shared_utils/theme_assets/testing/cert_fix_test_support.py`
15
- - `fix_queue_constants.py` misnamed → `fix_outcomes.py`
16
- - `_account_by_fixed_stps_folder` → `cert_failure_folder_to_theme_account_map()` in `account_adapter`
17
- - `_fresh_run_directories` / scratch helpers → `allocate_timestamp_run_directory()`
18
-
19
- **Pipeline after:**
20
- ```
21
- cert_fix_queue/pipeline/
22
- queue_run.py
23
- promote_run.py
24
- run_cli.py
25
- ```
26
-
27
- ---
28
-
29
- ## background_removal — PR #1954
30
-
31
- **Goal:** One BiRefNet CPU path in `shared_utils/theme_assets/background_removal.py`.
32
-
33
- **Done well:**
34
- - Deleted `clean_room_theme_icons/chroma.py`, dialer `art_masks.py`, `png_io.py`
35
- - Added `pixel_masks.py`, `png_canonical.py`
36
- - Clean-room and dialer call `extract_foreground` / `extract_foreground_file`
37
-
38
- **Remaining offenses (audit):**
39
- - P0: Residual gates in `theme_dialer_pipeline/pipeline/chroma_extract.py` (shared algorithm output)
40
- - P0: `_extract_component_foreground` wrapper; same pattern inlined in `compose_from_masters.py`
41
- - P0: Parallel rembg in `misc-asset-remaster/scripts/generated_alpha_mask.py`
42
- - P1: Duplicate extraction test fixtures (dialer conftest vs clean-room conftest)
43
- - P1: `ALPHA_CHANNEL_INDEX` duplicated across dialer/clean-room/color_constants
44
- - P2: Atomic write helpers inside 723-line `background_removal.py`; PNG path vs `png_canonical`
45
-
46
- **Suggested fix order:** residual gates → shared test fixtures → dedupe constants → migrate misc rembg → I/O split (optional).
@@ -1,100 +0,0 @@
1
- # Offense taxonomy
2
-
3
- ## O1 — General action in workflow package
4
-
5
- **Signal:** Per-item function named `*_one`, `fix_*`, `promote_*`, `upload_*` in orchestration tree.
6
-
7
- **Example:** `cert_fix_queue/pipeline/fix_one.py` → `shared_utils/.../fix_theme.py` (`fix_cert_rejected_theme`).
8
-
9
- **Fix:** Move module; consumer passes workflow-specific `filename_prefix` / folder ids at call site.
10
-
11
- ---
12
-
13
- ## O2 — Thin wrapper / default seam / re-export facade
14
-
15
- **Signal:** `_default_db_flipper`, `_default_*` that only renames kwargs and calls shared_utils. Also: a workflow module that only re-exports a shared symbol under the old path.
16
-
17
- **Example:** Wrapper around `promote_theme_to_status` with `db_flip_log_filename_prefix`. After a move, `clean_room_theme_icons.rebuild_nine_patch` still contains `from shared_utils... import rebuild_nine_patch`.
18
-
19
- **Fix:** Update every caller to the shared symbol (`filename_prefix`, `shared_utils.theme_assets.nine_patch_rebuild`, etc.) and delete the wrapper or facade.
20
-
21
- ---
22
-
23
- ## O3 — Layer inversion
24
-
25
- **Signal:** `shared_utils/...` imports from `cert_fix_queue`, `theme_dialer_pipeline`, `clean_room_theme_icons`, or `.claude/skills/...`.
26
-
27
- **Fix:** Move imported symbol into shared_utils; consumer imports shared.
28
-
29
- ---
30
-
31
- ## O4 — Parallel production stack
32
-
33
- **Signal:** Second implementation of same concern (rembg session, despill, STP walk, DB flip) in skill or sibling package.
34
-
35
- **Example:** `misc-asset-remaster/.../generated_alpha_mask.py` vs `background_removal.py`.
36
-
37
- **Fix:** Delegate to canonical module; delete duplicate constants and session cache.
38
-
39
- ---
40
-
41
- ## O5 — Validation/gates on shared output in consumer
42
-
43
- **Signal:** Functions that only inspect output of shared algorithm (residual alpha, edge green excess) live in dialer/clean-room.
44
-
45
- **Example:** `theme_dialer_pipeline/pipeline/chroma_extract.py` using `edge_green_excess_mask` from shared.
46
-
47
- **Fix:** `shared_utils/theme_assets/background_removal/residual_gates.py` (or sibling); optional `extract_foreground_gated`.
48
-
49
- ---
50
-
51
- ## O6 — Duplicate constants
52
-
53
- **Signal:** Same literal or semantic constant in workflow `config/constants.py` and shared config.
54
-
55
- **Examples:** `ALPHA_CHANNEL_INDEX`, `ONEUI_STP_BASENAME_RE`, two `DEFAULT_*_DB_FLIP_*` with same value.
56
-
57
- **Fix:** Single definition in shared config; delete consumer copies.
58
-
59
- ---
60
-
61
- ## O7 — Misplaced config module
62
-
63
- **Signal:** Constants named for workflow A live under package B's config (e.g. `fix_queue_constants` under `cert_closeout`).
64
-
65
- **Fix:** Rename/move to owning workflow or shared outcomes module; drop re-export-only facades.
66
-
67
- ---
68
-
69
- ## O8 — Duplicate test support
70
-
71
- **Signal:** Identical or near-identical `tests/support.py`, conftest bypass fixtures, synthetic PNG writers in multiple packages.
72
-
73
- **Fix:** `shared_utils/theme_assets/testing/` or `shared_utils/.../tests/fixtures.py`; one import path.
74
-
75
- ---
76
-
77
- ## O9 — General I/O in domain module
78
-
79
- **Signal:** Atomic staged writes, Drive upload, UTC helpers duplicated inside a 700-line domain file.
80
-
81
- **Fix:** `shared_utils/files/` (e.g. `drive_production_backup`, `timestamp_directory_retention`, `record_persist`).
82
-
83
- ---
84
-
85
- ## O10 — Stale identifiers
86
-
87
- **Signal:** Docstrings/tests still say `fix_one`, `promote_one`, `backup_upload` after rename.
88
-
89
- **Fix:** Update docs; no behavior change.
90
-
91
- ---
92
-
93
- ## Priority guide
94
-
95
- | Offense | Typical priority |
96
- |---------|------------------|
97
- | O3, O4 | P0 |
98
- | O1, O2, O5, O6, O7, O8 | P1 |
99
- | O9, monolith size | P2 |
100
- | O10 | P3 |
@@ -1,52 +0,0 @@
1
- ---
2
- name: pr-small-cl
3
- description: >-
4
- Scope or split a pull request into a self-contained reviewable increment. Use
5
- when a user asks to "split this PR", "make this change smaller", or "small CL".
6
- ---
7
-
8
- # Focused Pull Request Guide
9
-
10
- ## When to Use This Guide
11
-
12
- Use this guide to plan, assess, or split a pull request into a reviewable unit.
13
- The pull request boundary is conceptual: one coherent outcome that a reviewer
14
- can understand with its context and verification.
15
-
16
- ## What a Focused Pull Request Contains
17
-
18
- A focused pull request contains the implementation, related tests, documentation,
19
- and configuration needed for one outcome. It leaves the system in a usable state
20
- and gives the reviewer the information needed to assess the change.
21
-
22
- Use the [description guide](../descriptions/SKILL.md#required-content) to record
23
- the scope, verification, risks, and follow-up work.
24
-
25
- ## Splitting a Change
26
-
27
- Choose a split that gives each increment a coherent purpose and a clear test
28
- boundary. Useful seams include:
29
-
30
- - Preparation refactors followed by behavior changes.
31
- - Independent vertical features that each deliver a user-visible capability.
32
- - Layer-specific work when each layer remains independently understandable.
33
- - Stacked changes when each earlier change supplies the next change's stable
34
- foundation.
35
-
36
- State dependencies between related pull requests and keep each increment safe to
37
- merge or revert on its own.
38
-
39
- ## Reviewable Scope
40
-
41
- Ask to split a change when its breadth prevents a reliable assessment of design,
42
- behavior, or verification. Identify the first coherent increment and the
43
- remaining increments so the author has an actionable path forward.
44
-
45
- Use [reviews](../reviews/SKILL.md#evaluation-criteria) to evaluate the resulting
46
- scope and [emergencies](../emergencies/SKILL.md#emergency-classification) when an
47
- active incident sets the immediate boundary.
48
-
49
- ## Responding to Review
50
-
51
- Use the [comment guide](../comments/SKILL.md#responding-to-feedback) to respond
52
- to feedback and resolve pushback.
@@ -1,96 +0,0 @@
1
- ---
2
- name: pr-title-description
3
- description: Review one or more pull requests and write plain titles and descriptions from the full diff.
4
- disable-model-invocation: true
5
- ---
6
-
7
- Accept one or more pull request links as arguments. Apply the prompt below to each link.
8
-
9
- With no argument, use the current task, browser, worktree, or GitHub context to find the pull request or pull requests. If the context does not show a clear pull request, ask for a pull request link.
10
-
11
- Review this pull request: <PR link>
12
-
13
- Read the PR and its full diff. Do not use the branch name, commit message, labels, current title, or a shallow summary.
14
-
15
- ## Full-diff behavior standard
16
-
17
- Before writing, inventory every independently observable behavior in the full diff. A behavior is independent when a user, caller, operator, automation, output, error, exit status, fallback, or side effect can observe it separately. Lead with the central behavior for readability, then give every other behavior its own short paragraph or bullet.
18
-
19
- For each behavior, state the trigger or observer, the Before -> After result, the affected surface/caller when shared, and focused proof. Include important preserved behavior and fallback paths when they help a coder rule a regression in or out. Describe outcomes, not line-by-line implementation, and do not hide multiple behaviors under vague umbrella wording.
20
-
21
-
22
- Write like the reader is smart but knows nothing about this code. Pretend they asked you to explain it like they are five and feel stupid. If a word needs another sentence to explain it, replace the word — or turn it into a tiny story.
23
-
24
- Your job is not a dry API blurb. Your job is an illustrative before/after a person can picture.
25
-
26
- Gold voice for titles and “What this adds”:
27
-
28
- The theme package has a phone icon somewhere. We need to find it.
29
-
30
- Before: yell “anyone know how to find icons?” and wait for a hand.
31
-
32
- After: call the finder by its name tag: “icon finder, go.”
33
-
34
- That’s all “operation id” is — the finder’s name tag.
35
-
36
- Rules for that voice:
37
-
38
- Start from a concrete scene (what’s in someone’s hand, what they’re hunting for).
39
- Prefer Before / After when the change is “how you ask” or “how you look it up.”
40
- Use picture words: hand it, open, find, check, save, skip, stop, call by name, name tag.
41
- Prefer spoken results: “found it,” “missing,” “duplicated,” “couldn’t.”
42
- When the diff uses an abstract word (operation id, registry, envelope, adapter, digest, schema), do one of two things:
43
- Drop it and say what the person does with their hands, or
44
- Keep it once, then gloss it in the same breath with a name-tag / mailbox / checklist metaphor — like the “finder’s name tag” line above.
45
- Never leave jargon unexplained. Never write as if the reader already knows the jargon.
46
- Add a tiny concrete example in parentheses when a name is abstract (like “the phone icon”).
47
- Few words. Small words. Clear on first read.
48
- Return:
49
-
50
- Recommended title
51
-
52
- Few words. Small words. Clear on first read.
53
- Say what you hand it, what it does, and what you get back — or the Before/After of how you ask.
54
- Prefer picture words and spoken results.
55
- Good title: “Call the icon finder by its name tag instead of asking around”
56
- Good title: “Given a theme STP and an asset name, report whether that asset was found, missing, or duplicated”
57
- Bad title: anything that only says operation id / registry / typed envelope / adapter / digest / schema with no picture.
58
- Use “Add” only if it helps. Do not force it.
59
- No vague words like “improve,” “enhance,” or “update.”
60
- Return one title only.
61
- Why this title fits
62
-
63
- 1–2 short sentences in the same voice.
64
- If needed, one Before / After beat, then what you get back.
65
- If this section is needed to decode the title, rewrite the title.
66
- Evidence
67
-
68
- Key files or functions that support the title.
69
- If you cannot read the PR or full diff, say so and do not propose a title.
70
-
71
- Then write a short, paste-ready PR description.
72
-
73
- Use this structure:
74
-
75
- What this adds
76
-
77
- Why
78
- One short paragraph. Same plain level. Say who needs this and what goes wrong without it (the “yell and wait for a hand” problem). If this is needed to decode the feature, rewrite “What this adds.”
79
-
80
- Verification
81
- List only proof from the PR, CI, or your own checks.
82
-
83
- Reported in the PR
84
-
85
- …
86
- Checked by you / CI here
87
-
88
- …
89
- Rules:
90
-
91
- Few words. Small words. Clear on first read. ELI5 I-am-stupid mark.
92
- Do not invent behavior, tests, or benefits.
93
- Strip branch names, hashes, draft notes, agent notes, and merge notes.
94
- No vague words like “improve,” “enhance,” or “update.”
95
- Illustrative first. Abstract labels only if glossed in the same breath.
96
- Use the recommended title and paste-ready description to run `gh pr edit <PR link> --title ... --body-file ...`, then run `gh pr view <PR link> --json title,body` to confirm the saved title and body. Report the saved result.
@@ -1,85 +0,0 @@
1
- ---
2
- name: prototype
3
- description: >-
4
- Isolated hookless worktree sandbox for zero-friction proof-of-concept builds, then a clean-room re-verification that promotes a successful POC into a real deploy. Triggers: prototype, /prototype, proof of concept, POC, spike, throwaway build, build without hooks, sandbox this idea, hookless worktree, prototype then ship, promote the prototype.
5
- ---
6
-
7
- # Prototype
8
-
9
- ## Principle
10
-
11
- Give a build the freedom to move fast, then make it earn the right to ship. Two phases, one hard wall between them:
12
-
13
- - **Sandbox** — an isolated worktree where an agent runs under `claude --bare`, so the normal TDD, code-rules, plain-language, and stage hooks do not run. The agent builds a proof-of-concept with zero friction.
14
- - **Promotion** — back in the normal, fully-hooked session, the successful POC receives clean-room review and verification under the [review guide](../reviews/SKILL.md#review-workflow) before it becomes a commit and a pull request.
15
-
16
- Two safety gates stay live even in the sandbox: personal-data blocking and destructive-command blocking. A worktree shares the real repo's `.git` store and `rm` reaches the whole disk, so these are containment, not the "delays" the sandbox is meant to shed.
17
-
18
- ## Gotchas
19
-
20
- Highest-signal content. Append a bullet each time a run fails in a new way.
21
-
22
- - A `--settings` file's hooks still load under `--bare` (the file is passed explicitly). That is the mechanism for keeping the two safety gates, not a bug.
23
- - The two safety hooks must point at the real installed scripts and import their `*_constants` packages at runtime. `scripts/build_sandbox_settings.py` resolves each hook's command from the live `~/.claude/settings.json` and registers it on the matchers the sandbox needs — personal-data on Write, Edit, MultiEdit, and Bash; destructive-command on Bash — so the paths stay correct on any machine and both gates cover the write surface. Do not hand-write the hook paths or matchers, and do not inherit whatever matcher the live config happens to use (a personal-data gate wired only to a narrow tool leaves disk writes ungated).
24
- - Under `--dangerously-skip-permissions` an `ask` decision is auto-resolved, so only a hard `deny` blocks a destructive command. The settings file carries an `env` block that sets `CLAUDE_DESTRUCTIVE_DENY_MODE`, which turns the destructive gate's terminal `ask` into a `deny`. The probe runs the gate under that env block and passes only on the hard deny.
25
-
26
- **Refusal cases — first match wins:**
27
-
28
- - **Not in a git repository.** Respond: `Prototype needs a git repo to branch a worktree from. Run this from inside one.`
29
- - **The `fresh-branch` skill is not installed.** Respond: `Prototype composes fresh-branch to make the sandbox worktree, and it is not installed. Install claude-dev-env first.`
30
- - **The `claude` CLI is not on PATH.** Respond: `The sandbox launches a headless claude session, and the claude CLI is not on PATH.`
31
-
32
- ## Process
33
-
34
- Two phases. Run the sandbox phase first; run the promotion phase only when the POC succeeds and the user wants it shipped.
35
-
36
- ### Phase 1 — Sandbox
37
-
38
- Follow `workflows/sandbox.md`. In short:
39
-
40
- 1. Invoke the `fresh-branch` skill to create an isolated worktree off `origin/main`. Keep its returned `worktree_path` and `base_commit`.
41
- 2. Run `scripts/build_sandbox_settings.py` to emit the minimal safety settings (personal-data and destructive-command gates only).
42
- 3. Run `scripts/probe_sandbox_safety.py --settings <path>` and confirm both gates block. Do not continue on a non-zero exit.
43
- 4. Run `scripts/launch_sandbox.py` to start the hookless `claude -p --bare` session in the worktree with those settings and the POC task.
44
- 5. Read what the sandbox built. Decide whether the POC proves the idea.
45
-
46
- ### Phase 2 — Promotion
47
-
48
- Run only in the normal, fully-hooked session — never inside the sandbox. Follow `workflows/promotion.md`, which drives the clean-room task seeds in `reference/promotion-tasks.md`: fresh branch off live `origin/main`, POC content as an uncommitted diff, cleanup and privacy sweep, review and verification under the [review guide](../reviews/SKILL.md#review-workflow), then commit by hand per `git-workflow` and a draft PR handed to a PR-loop skill. State the two honest limitations from `reference/honest-limitations.md`.
49
-
50
- ## Task seeding
51
-
52
- At the start of Phase 2, register every item in `reference/promotion-tasks.md` as a session task (`TaskCreate`, or `TodoWrite` if that is the host tool). Work only from the task list. Mark each complete with evidence. Do not track promotion as a markdown checklist.
53
-
54
- ## Sub-skills
55
-
56
- | Skill / agent | When | Produces | If missing |
57
- |---|---|---|---|
58
- | `fresh-branch` | Sandbox step 1; Promotion step 2 | isolated worktree JSON (`worktree_path`, `base_commit`, `repo_root`) | Refuse — see refusal cases |
59
- | `privacy-hygiene` | Promotion step 5 | personal-data and secret sweep of the diff | Warn; do a manual review before continuing |
60
- | [Review guide](../reviews/SKILL.md#review-workflow) | Promotion step 6 | review and verification of the real diff | Stop and report the incomplete promotion |
61
- | `autoconverge` (default; `pr-converge` or `bugteam` as alternatives) | Promotion step 9 | the PR converged to ready | Stop after the draft PR; tell the user to converge manually |
62
-
63
- ## Degree of freedom
64
-
65
- Low on the skill's own mechanics — the launch flags and the promotion order are fragile with cliffs, so they live in scripts and a fixed task list, not in prose the agent reconstructs. High inside the sandbox — the sandboxed agent's build freedom is the whole point.
66
-
67
- ## File index
68
-
69
- | File | Purpose |
70
- |---|---|
71
- | `SKILL.md` | This hub — principle, gotchas, when-applies, process, sub-skills, file index |
72
- | `workflows/sandbox.md` | Phase 1 steps: worktree, safety settings, probe, hookless launch |
73
- | `workflows/promotion.md` | Phase 2 steps: the clean-room re-verification that drives the promotion task seeds |
74
- | `reference/promotion-tasks.md` | Task-seed catalog for the clean-room protocol (register via the task tool) |
75
- | `reference/honest-limitations.md` | The two fixed statements to make on every promotion |
76
- | `scripts/build_sandbox_settings.py` | Emit the minimal safety `--settings`: resolve each hook's command from live settings, register it on the required matchers |
77
- | `scripts/launch_sandbox.py` | Launch the hookless `claude -p --bare` sandbox session in the worktree |
78
- | `scripts/probe_sandbox_safety.py` | Prove both safety gates block before trusting the sandbox |
79
-
80
- ## Folder map
81
-
82
- - `SKILL.md` — hub.
83
- - `workflows/` — the two phase workflows.
84
- - `reference/` — promotion task seeds and the honest-limitation statements.
85
- - `scripts/` — the settings builder, the launcher, the safety probe, their `prototype_scripts_constants` package, and paired tests.
@@ -1,23 +0,0 @@
1
- # Honest limitations of a promoted prototype
2
-
3
- State both of these to the user, in these terms, whenever a proof-of-concept is promoted. Do not soften or drop them. They are the price of building without standards gates.
4
-
5
- ## 1. Write-time code rules never ran on this code
6
-
7
- `code_rules_enforcer` is a Write/Edit gate: it checks content as it is written. Prototype code is built under `--bare`, so that gate never fired, and content brought into promotion as a git diff (apply, checkout, cherry-pick) does not pass through it either.
8
-
9
- Promotion records the controls applied to the real diff:
10
-
11
- - review and verification under the [review guide](../../skills-archived/reviews/SKILL.md#review-workflow);
12
- - the `privacy-hygiene` sweep for personal data and secrets;
13
- - the pull-request review criteria and any PR-loop reviewers.
14
-
15
- Say plainly: the write-time rule engine did not see this code; the verifier and review are what cover it.
16
-
17
- ## 2. TDD ordering is waived on promoted prototype lines
18
-
19
- The sandbox agent wrote code first and tests, if any, after. Red-green-refactor ordering did not happen. So the honest claim on promoted prototype code is exactly this, and nothing more:
20
-
21
- > Review and verification completed, privacy swept — TDD ordering waived.
22
-
23
- Do not claim red-green compliance on these lines. A prototype is a reference build, not a test-first build. Promotion reviews and verifies the code against the current standards.
@@ -1,23 +0,0 @@
1
- # Promotion task seeds (clean-room protocol)
2
-
3
- Register every numbered item below as a session task (`TaskCreate`, or `TodoWrite` if that is the host tool) at the start of the promotion phase. Work only from the task list. Mark each complete only with evidence — a command result, a path, a verdict, or a skill's return. This is not a checkbox board; it is a seed catalog for the task tool.
4
-
5
- Promotion runs in the **normal, fully-hooked session** — never inside the `--bare` sandbox. Nothing from the sandbox history is carried; only its file content is re-applied and re-verified.
6
-
7
- 1. **Confirm the prototype is worth promoting.** The sandbox build works and the user (or the standing goal) wants it shipped. Evidence: the working behavior observed, one sentence on what the POC proves.
8
-
9
- 2. **Fresh branch off live upstream.** Re-fetch `origin/main` and branch from it via the `fresh-branch` skill. Evidence: the returned `base_commit` matches current `origin/main`. This starts clean history and keeps the work based on live upstream.
10
-
11
- 3. **Bring prototype content as an uncommitted working-tree diff, by allowlist.** Take the sandbox diff against its `base_commit` and copy only the product files you intend to ship into the fresh branch's working tree. Do NOT cherry-pick or merge the sandbox commits, and do NOT bulk-copy the worktree. Exclude the sandbox settings file (`.prototype-sandbox-settings.json`) and every scratch, debug, or artifact file the POC produced — name the files you are bringing, not the ones you are dropping. Evidence: the allowlist of copied paths; `git status` shows only those unstaged; `git log` shows no sandbox commits.
12
-
13
- 4. **Cleanup pass.** Remove every scratch file, debug dump, and temp helper the prototype created (see the `cleanup-temp-files` rule). Evidence: the removed paths, or a stated "none created".
14
-
15
- 5. **Privacy sweep.** Run the `privacy-hygiene` skill over the full applied working tree, not only the diff — a POC that pulled live data can leave a secret in a file the diff view hides. Evidence: its clean report, or the leak it found and how it was removed. If the skill is missing, do a manual PII and secret review and say so.
16
-
17
- 6. **Review and verify the real diff.** Apply the [review guide](../../skills-archived/reviews/SKILL.md#review-workflow). Evidence: the checks run and each required finding repaired. Do not rely on sandbox testing as promotion evidence.
18
-
19
- 7. **Commit and open a draft PR.** After the review and verification record is complete, commit by hand per the `git-workflow` rule, then open a draft PR. Evidence: the commit hash and the PR URL.
20
-
21
- 8. **State the honest limitations.** Post the two statements from `reference/honest-limitations.md` — write-time rules never ran; TDD ordering waived — in the PR body or to the user. Evidence: the text was included.
22
-
23
- 9. **Hand to a PR-loop skill.** Hand the PR to `autoconverge` by default — one autonomous run to ready. Reach for `pr-converge` when paced ticks fit better, or `bugteam` for an open-loop audit-fix. Evidence: the skill was invoked, or the user chose to converge manually.