claude-dev-env 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +61 -0
- package/CLAUDE.md +1 -57
- package/_shared/AGENTS.md +15 -0
- package/_shared/CLAUDE.md +1 -15
- package/_shared/advisor/AGENTS.md +22 -0
- package/_shared/advisor/CLAUDE.md +1 -22
- package/_shared/pr-loop/AGENTS.md +27 -0
- package/_shared/pr-loop/CLAUDE.md +1 -27
- package/_shared/pr-loop/scripts/AGENTS.md +35 -0
- package/_shared/pr-loop/scripts/CLAUDE.md +1 -35
- package/_shared/pr-loop/scripts/code_rules_gate.py +2 -3
- package/_shared/pr-loop/scripts/code_rules_gate_parts/AGENTS.md +42 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/CLAUDE.md +1 -42
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/AGENTS.md +26 -0
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -26
- package/_shared/pr-loop/scripts/test_code_rules_gate.py +0 -26
- package/_shared/pr-loop/scripts/tests/AGENTS.md +44 -0
- package/_shared/pr-loop/scripts/tests/CLAUDE.md +1 -44
- package/_shared/process-tree/AGENTS.md +41 -0
- package/_shared/process-tree/CLAUDE.md +1 -41
- package/agents/AGENTS.md +31 -0
- package/agents/CLAUDE.md +1 -32
- package/agents/clean-coder.md +6 -6
- package/agents/pr-description-writer.md +11 -81
- package/agents/test_agent_frontmatter.py +4 -4
- package/audit-rubrics/AGENTS.md +43 -0
- package/audit-rubrics/CLAUDE.md +1 -43
- package/audit-rubrics/category_rubrics/AGENTS.md +37 -0
- package/audit-rubrics/category_rubrics/CLAUDE.md +1 -37
- package/audit-rubrics/prompts/AGENTS.md +37 -0
- package/audit-rubrics/prompts/CLAUDE.md +1 -37
- package/bin/AGENTS.md +112 -0
- package/bin/CLAUDE.md +1 -112
- package/bin/ever-shipped-skills.mjs +1 -0
- package/bin/install-constants.mjs +6 -7
- package/bin/install.mjs +71 -13
- package/bin/install.prune.test.mjs +26 -0
- package/bin/install.settings-defaults.test.mjs +60 -33
- package/bin/install.test.mjs +36 -4
- package/commands/AGENTS.md +23 -0
- package/commands/CLAUDE.md +1 -23
- package/commands/hook-log-extract.md +3 -3
- package/commands/sr-loop.md +9 -5
- package/docs/AGENTS.md +32 -0
- package/docs/CLAUDE.md +1 -33
- package/docs/CODE_RULES.md +1 -1
- package/docs/imagegen.md +22 -0
- package/docs/references/AGENTS.md +17 -0
- package/docs/references/CLAUDE.md +1 -18
- package/hooks/AGENTS.md +31 -0
- package/hooks/CLAUDE.md +1 -31
- package/hooks/_gh_pr_author_swap_utils.py +14 -0
- package/hooks/advisory/AGENTS.md +16 -0
- package/hooks/advisory/CLAUDE.md +1 -16
- package/hooks/blocking/AGENTS.md +123 -0
- package/hooks/blocking/CLAUDE.md +1 -148
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/AGENTS.md +28 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/CLAUDE.md +1 -28
- package/hooks/blocking/code_rules_banned_identifiers.py +1 -1
- package/hooks/blocking/code_rules_dead_module_constant.py +149 -37
- package/hooks/blocking/code_rules_probe_chains.py +6 -2
- package/hooks/blocking/config/AGENTS.md +10 -0
- package/hooks/blocking/config/CLAUDE.md +1 -22
- package/hooks/blocking/conventional_pr_title_gate.py +1 -2
- package/hooks/blocking/gh_pr_author_restore.py +7 -2
- package/hooks/blocking/intent_only_ending_blocker.py +11 -16
- package/hooks/blocking/inventory_intent_records/AGENTS.md +26 -0
- package/hooks/blocking/inventory_intent_records/CLAUDE.md +1 -26
- package/hooks/blocking/package_inventory_stale_blocker_parts/AGENTS.md +26 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/CLAUDE.md +1 -26
- package/hooks/blocking/pii_prevention_blocker_parts/AGENTS.md +24 -0
- package/hooks/blocking/pii_prevention_blocker_parts/CLAUDE.md +1 -24
- package/hooks/blocking/send_user_file_open_locally_blocker.py +1 -1
- package/hooks/blocking/stop_dispatcher.py +4 -4
- package/hooks/blocking/tdd_enforcer_parts/AGENTS.md +30 -0
- package/hooks/blocking/tdd_enforcer_parts/CLAUDE.md +1 -30
- package/hooks/blocking/test_bash_pre_tool_use_dispatcher.py +0 -3
- package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +171 -0
- package/hooks/blocking/test_code_rules_enforcer_magic_allowlist.py +1 -1
- package/hooks/blocking/test_gh_pr_author_restore.py +2 -1
- package/hooks/blocking/test_intent_only_ending_blocker.py +4 -0
- package/hooks/blocking/test_pre_tool_use_dispatcher.py +6 -7
- package/hooks/blocking/test_send_user_file_open_locally_blocker.py +4 -3
- package/hooks/blocking/test_shared_stdin_adoption.py +0 -2
- package/hooks/diagnostic/AGENTS.md +43 -0
- package/hooks/diagnostic/CLAUDE.md +1 -43
- package/hooks/diagnostic/hook_log_extractor.py +4 -38
- package/hooks/diagnostic/hook_log_stop_wrapper.py +6 -155
- package/hooks/diagnostic/migrations/AGENTS.md +16 -0
- package/hooks/diagnostic/migrations/CLAUDE.md +1 -16
- package/hooks/diagnostic/queries/AGENTS.md +19 -0
- package/hooks/diagnostic/queries/CLAUDE.md +1 -19
- package/hooks/diagnostic/test_hook_log_extractor.py +10 -23
- package/hooks/diagnostic/test_hook_log_stop_wrapper.py +3 -331
- package/hooks/git-hooks/AGENTS.md +31 -0
- package/hooks/git-hooks/CLAUDE.md +1 -31
- package/hooks/git-hooks/git_hooks_constants/AGENTS.md +21 -0
- package/hooks/git-hooks/git_hooks_constants/CLAUDE.md +1 -21
- package/hooks/git-hooks/git_hooks_constants/__init__.py +4 -12
- package/hooks/git-hooks/pre_push.py +49 -118
- package/hooks/git-hooks/test_pre_push.py +111 -137
- package/hooks/hooks.json +0 -35
- package/hooks/hooks_constants/AGENTS.md +104 -0
- package/hooks/hooks_constants/CLAUDE.md +1 -113
- package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +0 -11
- package/hooks/hooks_constants/convergence_branch_constants.py +0 -1
- package/hooks/hooks_constants/fable_spawn_gate_constants.py +3 -4
- package/hooks/hooks_constants/hook_log_extractor_constants.py +1 -2
- package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +0 -8
- package/hooks/hooks_constants/send_user_file_open_locally_blocker_constants.py +1 -6
- package/hooks/hooks_constants/stop_dispatcher_constants.py +0 -1
- package/hooks/hooks_constants/task_list_loop_starter_constants.py +4 -3
- package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +1 -26
- package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +0 -5
- package/hooks/hooks_constants/test_stop_dispatcher_constants.py +0 -1
- package/hooks/hooks_constants/working_style_prompt_constants.py +29 -20
- package/hooks/lifecycle/AGENTS.md +18 -0
- package/hooks/lifecycle/CLAUDE.md +1 -20
- package/hooks/observability/AGENTS.md +20 -0
- package/hooks/observability/CLAUDE.md +1 -20
- package/hooks/session/AGENTS.md +33 -0
- package/hooks/session/CLAUDE.md +1 -33
- package/hooks/session/gh_pr_author_session_cleanup.py +7 -2
- package/hooks/session/task_list_loop_starter.py +3 -3
- package/hooks/session/test_gh_pr_author_session_cleanup.py +2 -1
- package/hooks/session/test_task_list_loop_starter.py +10 -2
- package/hooks/session/test_working_style_prompt.py +9 -4
- package/hooks/validation/AGENTS.md +20 -0
- package/hooks/validation/CLAUDE.md +1 -20
- package/hooks/validators/AGENTS.md +51 -0
- package/hooks/validators/CLAUDE.md +1 -51
- package/hooks/validators/health_check.py +52 -19
- package/hooks/validators/python_style_checks.py +1 -1
- package/hooks/validators/test_health_check.py +112 -27
- package/hooks/workflow/AGENTS.md +16 -0
- package/hooks/workflow/CLAUDE.md +1 -16
- package/installable-surfaces.manifest.json +1 -0
- package/output-styles/AGENTS.md +15 -0
- package/output-styles/CLAUDE.md +1 -15
- package/package.json +2 -1
- package/rules/AGENTS.md +61 -0
- package/rules/CLAUDE.md +1 -63
- package/rules/code-standards.md +5 -9
- package/rules/doc-prose-cuts.md +1 -1
- package/rules/gh-cli-conventions.md +0 -1
- package/rules/git-workflow.md +1 -3
- package/scripts/AGENTS.md +62 -0
- package/scripts/CLAUDE.md +1 -63
- package/scripts/_code_review_test_support.py +0 -95
- package/scripts/codex_compat_materializer.py +4 -0
- package/scripts/dev_env_scripts_constants/AGENTS.md +21 -0
- package/scripts/dev_env_scripts_constants/CLAUDE.md +1 -21
- package/scripts/dev_env_scripts_constants/code_review_constants.py +9 -98
- package/scripts/dev_env_scripts_constants/test_code_review_constants.py +1 -44
- package/scripts/invoke_code_review.py +8 -451
- package/scripts/sync_to_cursor/AGENTS.md +23 -0
- package/scripts/sync_to_cursor/CLAUDE.md +1 -23
- package/scripts/test_invoke_code_review.py +5 -61
- package/scripts/test_invoke_code_review_cli.py +1 -45
- package/scripts/test_invoke_code_review_contract.py +1 -118
- package/scripts/test_validate_instruction_pairs.py +90 -0
- package/scripts/test_verify_installable_package.py +5 -1
- package/scripts/tests/AGENTS.md +33 -0
- package/scripts/tests/CLAUDE.md +1 -33
- package/scripts/tests/test_codex_compat_materializer.py +36 -1
- package/scripts/validate_instruction_pairs.py +183 -0
- package/settings.json +1 -10
- package/skills/AGENTS.md +72 -0
- package/skills/CLAUDE.md +1 -64
- package/skills/_shared/AGENTS.md +44 -0
- package/skills/_shared/CLAUDE.md +1 -44
- package/skills/_shared/advisor/AGENTS.md +9 -0
- package/skills/_shared/advisor/CLAUDE.md +1 -9
- package/skills/_shared/pr-loop/AGENTS.md +50 -0
- package/skills/_shared/pr-loop/CLAUDE.md +1 -50
- package/skills/_shared/pr-loop/prompts/AGENTS.md +9 -0
- package/skills/_shared/pr-loop/prompts/CLAUDE.md +1 -9
- package/skills/_shared/pr-loop/scripts/AGENTS.md +35 -0
- package/skills/_shared/pr-loop/scripts/CLAUDE.md +1 -35
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +24 -0
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +1 -24
- package/skills/anthropic-plan/AGENTS.md +34 -0
- package/skills/anthropic-plan/CLAUDE.md +1 -34
- package/skills/anthropic-plan/scripts/AGENTS.md +11 -0
- package/skills/anthropic-plan/scripts/CLAUDE.md +1 -11
- package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/AGENTS.md +16 -0
- package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/CLAUDE.md +1 -16
- package/skills/anthropic-plan/templates/AGENTS.md +13 -0
- package/skills/anthropic-plan/templates/CLAUDE.md +1 -13
- package/skills/anthropic-plan/workflow/AGENTS.md +14 -0
- package/skills/anthropic-plan/workflow/CLAUDE.md +1 -14
- package/skills/auditing-claude-config/AGENTS.md +21 -0
- package/skills/auditing-claude-config/CLAUDE.md +1 -21
- package/skills/autoconverge/AGENTS.md +36 -0
- package/skills/autoconverge/CLAUDE.md +1 -36
- package/skills/autoconverge/reference/AGENTS.md +16 -0
- package/skills/autoconverge/reference/CLAUDE.md +1 -16
- package/skills/autoconverge/reference/convergence.md +7 -7
- package/skills/autoconverge/reference/gotchas.md +3 -10
- package/skills/autoconverge/workflow/AGENTS.md +26 -0
- package/skills/autoconverge/workflow/CLAUDE.md +1 -26
- package/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +16 -0
- package/skills/autoconverge/workflow/autoconverge_report_constants/CLAUDE.md +1 -16
- package/skills/autoconverge/workflow/converge.contract.test.mjs +53 -1388
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +4 -3
- package/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +33 -493
- package/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +15 -97
- package/skills/autoconverge/workflow/converge.mjs +201 -238
- package/skills/autoconverge/workflow/converge.precatch.test.mjs +1 -1
- package/skills/bugteam/AGENTS.md +30 -0
- package/skills/bugteam/CLAUDE.md +1 -30
- package/skills/bugteam/CONSTRAINTS.md +1 -1
- package/skills/bugteam/SKILL.md +9 -0
- package/skills/bugteam/reference/AGENTS.md +20 -0
- package/skills/bugteam/reference/CLAUDE.md +1 -20
- package/skills/bugteam/reference/audit-and-teammates.md +10 -6
- package/skills/bugteam/reference/obstacles/AGENTS.md +24 -0
- package/skills/bugteam/reference/obstacles/CLAUDE.md +1 -24
- package/skills/bugteam/scripts/AGENTS.md +30 -0
- package/skills/bugteam/scripts/CLAUDE.md +1 -30
- package/skills/bugteam/scripts/bugteam_scripts_constants/AGENTS.md +18 -0
- package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +1 -18
- package/skills/bugteam/test_skill_additions.py +9 -0
- package/skills/closeout/reference/handoff-prompt-template.md +1 -1
- package/skills/codex-review/AGENTS.md +46 -0
- package/skills/codex-review/CLAUDE.md +1 -46
- package/skills/codex-review/reference/AGENTS.md +15 -0
- package/skills/codex-review/reference/CLAUDE.md +1 -15
- package/skills/codex-review/scripts/codex_review_scripts_constants/AGENTS.md +18 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/CLAUDE.md +1 -18
- package/skills/codex-review/test_skill_scaffold.py +3 -3
- package/skills/comments/SKILL.md +65 -0
- package/skills/copilot-review/AGENTS.md +18 -0
- package/skills/copilot-review/CLAUDE.md +1 -18
- package/skills/descriptions/SKILL.md +51 -0
- package/skills/emergencies/SKILL.md +42 -0
- package/skills/everything-search/AGENTS.md +17 -0
- package/skills/everything-search/CLAUDE.md +1 -17
- package/skills/fresh-branch/AGENTS.md +14 -0
- package/skills/fresh-branch/CLAUDE.md +1 -14
- package/skills/grok-spawn/AGENTS.md +28 -0
- package/skills/grok-spawn/CLAUDE.md +1 -28
- package/skills/orchestrator/SKILL.md +2 -4
- package/skills/plan-to-pr/SKILL.md +6 -7
- package/skills/plan-to-pr/reference/final-validation-tasks.md +1 -1
- package/skills/plan-to-pr/reference/process-inventory.md +2 -2
- package/skills/plan-to-pr/reference/review-loop.md +2 -2
- package/skills/plan-to-pr/reference/run-record.schema.json +1 -1
- package/skills/plan-to-pr/reference/task-seeds.md +1 -1
- package/skills/plan-to-pr/reference/task-ticket.md +3 -4
- package/skills/plan-to-pr/scripts/config/constants.py +1 -2
- package/skills/plan-to-pr/scripts/test_validate_protocol.py +1 -1
- package/skills/plan-to-pr/test_skill_contract.py +2 -2
- package/skills/pr-converge/AGENTS.md +32 -0
- package/skills/pr-converge/CLAUDE.md +1 -32
- package/skills/pr-converge/SKILL.md +13 -16
- package/skills/pr-converge/pr_converge_skill_constants/AGENTS.md +26 -0
- package/skills/pr-converge/pr_converge_skill_constants/CLAUDE.md +1 -26
- package/skills/pr-converge/reference/AGENTS.md +28 -0
- package/skills/pr-converge/reference/CLAUDE.md +1 -28
- package/skills/pr-converge/reference/obstacles/AGENTS.md +23 -0
- package/skills/pr-converge/reference/obstacles/CLAUDE.md +1 -23
- package/skills/pr-converge/reference/progress-checklist.md +6 -5
- package/skills/pr-converge/reference/state-schema.md +1 -27
- package/skills/pr-converge/scripts/AGENTS.md +46 -0
- package/skills/pr-converge/scripts/CLAUDE.md +1 -46
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/AGENTS.md +18 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -18
- package/skills/pr-converge/workflows/AGENTS.md +16 -0
- package/skills/pr-converge/workflows/CLAUDE.md +1 -16
- package/skills/pr-loop-cloud-transport/SKILL.md +1 -1
- package/skills/pr-loop-cloud-transport/reference/identity-and-hooks.md +3 -3
- package/skills/pr-loop-lifecycle/SKILL.md +1 -1
- package/skills/pr-loop-lifecycle/reference/teardown-publish-permissions.md +1 -1
- package/skills/prototype/SKILL.md +4 -4
- package/skills/prototype/reference/honest-limitations.md +5 -5
- package/skills/prototype/reference/promotion-tasks.md +2 -2
- package/skills/prototype/workflows/promotion.md +4 -6
- package/skills/rebase/AGENTS.md +32 -0
- package/skills/rebase/CLAUDE.md +1 -32
- package/skills/recall/AGENTS.md +30 -0
- package/skills/recall/CLAUDE.md +1 -30
- package/skills/remember/AGENTS.md +31 -0
- package/skills/remember/CLAUDE.md +1 -31
- package/skills/reviews/SKILL.md +85 -0
- package/skills/session-log/AGENTS.md +32 -0
- package/skills/session-log/CLAUDE.md +1 -32
- package/skills/session-tidy/AGENTS.md +36 -0
- package/skills/session-tidy/CLAUDE.md +1 -36
- package/skills/skill-builder/AGENTS.md +49 -0
- package/skills/skill-builder/CLAUDE.md +1 -49
- package/skills/skill-builder/references/AGENTS.md +25 -0
- package/skills/skill-builder/references/CLAUDE.md +1 -25
- package/skills/skill-builder/references/deterministic-elements.md +1 -1
- package/skills/skill-builder/templates/AGENTS.md +14 -0
- package/skills/skill-builder/templates/CLAUDE.md +1 -14
- package/skills/skill-builder/workflows/AGENTS.md +19 -0
- package/skills/skill-builder/workflows/CLAUDE.md +1 -19
- package/skills/small-cl/SKILL.md +52 -0
- package/skills/task-build/AGENTS.md +29 -0
- package/skills/task-build/CLAUDE.md +1 -29
- package/skills/update/AGENTS.md +38 -0
- package/skills/update/CLAUDE.md +1 -38
- package/system-prompts/AGENTS.md +17 -0
- package/system-prompts/CLAUDE.md +1 -17
- package/system-prompts/software-engineer.xml +3 -3
- package/agents/code-verifier.md +0 -74
- package/docs/PR_DESCRIPTION_GUIDE.md +0 -157
- package/docs/references/code-review-enforcement.md +0 -132
- package/hooks/blocking/code_review_enforcement_config_bootstrap.py +0 -53
- package/hooks/blocking/code_review_gate_deny.py +0 -74
- package/hooks/blocking/code_review_pr_create_gate.py +0 -198
- package/hooks/blocking/code_review_push_gate.py +0 -145
- package/hooks/blocking/code_review_stamp_directory_write_blocker.py +0 -348
- package/hooks/blocking/code_review_stamp_store.py +0 -233
- package/hooks/blocking/code_review_stamp_write_blocker_parts/__init__.py +0 -7
- package/hooks/blocking/code_review_stamp_write_blocker_parts/conftest.py +0 -15
- package/hooks/blocking/code_review_stamp_write_blocker_parts/obfuscated_stamp_path_reference.py +0 -212
- package/hooks/blocking/code_review_stamp_write_blocker_parts/split_directory_change_into_stamp.py +0 -138
- package/hooks/blocking/code_review_stamp_write_blocker_parts/test_obfuscated_stamp_path_reference.py +0 -49
- package/hooks/blocking/code_review_stamp_write_blocker_parts/test_split_directory_change_into_stamp.py +0 -38
- package/hooks/blocking/code_verifier_spawn_preflight_gate.py +0 -483
- package/hooks/blocking/config/code_review_enforcement_constants.py +0 -143
- package/hooks/blocking/config/test_code_review_enforcement_constants.py +0 -166
- package/hooks/blocking/config/verified_commit_constants.py +0 -160
- package/hooks/blocking/config/verified_commit_context_constants.py +0 -21
- package/hooks/blocking/config/verified_commit_gate_output_constants.py +0 -14
- package/hooks/blocking/conftest.py +0 -123
- package/hooks/blocking/convergence_gate_blocker.py +0 -310
- package/hooks/blocking/pr_converge_bugteam_enforcer.py +0 -170
- package/hooks/blocking/pr_description_body_audit.py +0 -148
- package/hooks/blocking/pr_description_command_parser.py +0 -237
- package/hooks/blocking/pr_description_enforcer.py +0 -227
- package/hooks/blocking/pr_description_pr_number.py +0 -155
- package/hooks/blocking/pr_description_proof_of_work.py +0 -385
- package/hooks/blocking/pr_description_readability.py +0 -364
- package/hooks/blocking/reviewer_spawn_gate.py +0 -182
- package/hooks/blocking/test_code_review_enforcement_config_bootstrap.py +0 -62
- package/hooks/blocking/test_code_review_gate_deny.py +0 -54
- package/hooks/blocking/test_code_review_pr_create_gate.py +0 -199
- package/hooks/blocking/test_code_review_push_gate.py +0 -205
- package/hooks/blocking/test_code_review_stamp_directory_write_blocker.py +0 -199
- package/hooks/blocking/test_code_review_stamp_store.py +0 -205
- package/hooks/blocking/test_code_verifier_spawn_preflight_gate.py +0 -710
- package/hooks/blocking/test_code_verifier_tools_contract.py +0 -28
- package/hooks/blocking/test_convergence_gate_blocker.py +0 -428
- package/hooks/blocking/test_pr_converge_bugteam_enforcer.py +0 -311
- package/hooks/blocking/test_pr_converge_bugteam_enforcer_state_tolerance.py +0 -184
- package/hooks/blocking/test_pr_description_enforcer.py +0 -221
- package/hooks/blocking/test_pr_description_enforcer_body_audit.py +0 -247
- package/hooks/blocking/test_pr_description_enforcer_body_rules.py +0 -493
- package/hooks/blocking/test_pr_description_enforcer_command_parser.py +0 -366
- package/hooks/blocking/test_pr_description_enforcer_pr_number.py +0 -159
- package/hooks/blocking/test_pr_description_enforcer_proof_gate.py +0 -175
- package/hooks/blocking/test_pr_description_enforcer_readability.py +0 -443
- package/hooks/blocking/test_pr_description_proof_of_work.py +0 -313
- package/hooks/blocking/test_reviewer_spawn_gate.py +0 -230
- package/hooks/blocking/test_verdict_directory_write_blocker.py +0 -804
- package/hooks/blocking/test_verification_verdict_store.py +0 -974
- package/hooks/blocking/test_verified_commit_config_bootstrap.py +0 -67
- package/hooks/blocking/test_verified_commit_docs_delta.py +0 -176
- package/hooks/blocking/test_verified_commit_gate.py +0 -581
- package/hooks/blocking/test_verified_commit_gate_additional_context.py +0 -134
- package/hooks/blocking/test_verified_commit_message_accuracy_blocker.py +0 -131
- package/hooks/blocking/test_verifier_verdict_minter.py +0 -299
- package/hooks/blocking/tests/test_verified_commit_gate.py +0 -41
- package/hooks/blocking/verdict_directory_write_blocker.py +0 -687
- package/hooks/blocking/verification_verdict_store.py +0 -1039
- package/hooks/blocking/verified_commit_config_bootstrap.py +0 -63
- package/hooks/blocking/verified_commit_gate.py +0 -113
- package/hooks/blocking/verified_commit_gate_parts/CLAUDE.md +0 -28
- package/hooks/blocking/verified_commit_gate_parts/__init__.py +0 -1
- package/hooks/blocking/verified_commit_gate_parts/command_tokenization.py +0 -174
- package/hooks/blocking/verified_commit_gate_parts/deny_payload.py +0 -53
- package/hooks/blocking/verified_commit_gate_parts/deny_reason.py +0 -80
- package/hooks/blocking/verified_commit_gate_parts/directory_resolution.py +0 -170
- package/hooks/blocking/verified_commit_gate_parts/gated_invocations.py +0 -217
- package/hooks/blocking/verified_commit_gate_parts/tests/conftest.py +0 -10
- package/hooks/blocking/verified_commit_gate_parts/tests/test_command_tokenization.py +0 -94
- package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_payload.py +0 -17
- package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_reason.py +0 -38
- package/hooks/blocking/verified_commit_gate_parts/tests/test_directory_resolution.py +0 -71
- package/hooks/blocking/verified_commit_gate_parts/tests/test_gated_invocations.py +0 -96
- package/hooks/blocking/verified_commit_message_accuracy_blocker.py +0 -167
- package/hooks/blocking/verifier_verdict_minter.py +0 -280
- package/hooks/hooks_constants/code_verifier_spawn_preflight_gate_constants.py +0 -64
- package/hooks/hooks_constants/convergence_gate_blocker_constants.py +0 -53
- package/hooks/hooks_constants/pr_converge_bugteam_enforcer_constants.py +0 -55
- package/hooks/hooks_constants/pr_converge_bugteam_enforcer_state.py +0 -67
- package/hooks/hooks_constants/pr_description_enforcer_constants.py +0 -167
- package/hooks/hooks_constants/pr_description_proof_of_work_constants.py +0 -107
- package/hooks/hooks_constants/reviewer_spawn_gate_constants.py +0 -41
- package/hooks/hooks_constants/test_pr_description_enforcer_constants.py +0 -292
- package/hooks/lifecycle/pr_converge_bugteam_skill_tracker.py +0 -198
- package/hooks/lifecycle/test_pr_converge_bugteam_skill_tracker.py +0 -283
- package/rules/proof-of-work-pr-comments.md +0 -22
- package/rules/verified-commit-gate-skip.md +0 -4
- package/scripts/Show-Asset.ps1 +0 -106
|
@@ -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
|
-
|
|
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
|
package/agents/AGENTS.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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 the review contract, CODE_RULES, and 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.
|
package/agents/CLAUDE.md
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
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
|
-
| `code-verifier.md` | Code Verifier | Post-hoc verification, run only when the task owner asks for a pass; never edits files in the verified tree, with one exception, a deliberate break at an off-tree break site outside it, defined in the agent body; fresh context, puts the draft verdict through one strongest-tier validation subagent, ends with a fenced verdict; `all_pass` true needs a complete shown-red table as well as clean layers |
|
|
15
|
-
| `deep-research.md` | Deep Research | Citation-grounded research with web search |
|
|
16
|
-
| `docs-agent.md` | Docs Agent | Documentation authoring and maintenance |
|
|
17
|
-
| `git-commit-crafter.md` | Git Commit Crafter | Stages changes, writes conventional commit messages, creates commits |
|
|
18
|
-
| `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 |
|
|
19
|
-
| `plan-packet-validator.md` | Plan Packet Validator | Fresh-context validator for workflow-generated plan packets under `docs/plans/` |
|
|
20
|
-
| `pr-description-writer.md` | PR Description Writer | Authors PR descriptions in Anthropic-style shapes that pass the `pr_description_enforcer` hook's body audit |
|
|
21
|
-
| `session-advisor.md` | Session Advisor | Standing multi-consumer reviewer; SendMessage only; returns endorse/correction/plan/stop |
|
|
22
|
-
| `skill-writer-agent.md` | Skill Writer Agent | Authors SKILL.md and companion files to skill-builder conventions; caller-agnostic authoring specialist |
|
|
23
|
-
|
|
24
|
-
## Format
|
|
25
|
-
|
|
26
|
-
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.
|
|
27
|
-
|
|
28
|
-
## Adding an agent
|
|
29
|
-
|
|
30
|
-
1. Create a new `.md` file in this directory with valid frontmatter.
|
|
31
|
-
2. Run `bin/install.mjs` to copy it to `~/.claude/agents/`.
|
|
32
|
-
3. Restart Claude Code to pick up the new agent.
|
|
1
|
+
@AGENTS.md
|
package/agents/clean-coder.md
CHANGED
|
@@ -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
|
|
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. **
|
|
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 —
|
|
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 |
|
|
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 |
|
|
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 (
|
|
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
|
|
@@ -1,94 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pr-description-writer
|
|
3
|
-
description: "Optional agent
|
|
3
|
+
description: "Optional agent that drafts factual pull request descriptions and comments from the current diff and validates each statement against the master review guides."
|
|
4
4
|
tools: Read,Grep,Glob,Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PR Description Writer
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Write the body from the current pull request diff and task. Use the [description guide](../skills/descriptions/SKILL.md#required-content) for required content and [description shape](../skills/descriptions/SKILL.md#description-shape). Use the [comment guide](../skills/comments/SKILL.md#writing-useful-review-comments) for a review comment.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Draft the body
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
1. Inspect the cumulative diff, the current pull request body, and the validation results.
|
|
14
|
+
2. State the behavior change, its scope, and the validation that ran.
|
|
15
|
+
3. Preserve accurate issue links and curated sections from the current body.
|
|
16
|
+
4. Use headings when they help a reviewer scan the change.
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
## Publish through GitHub CLI
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
Place markdown in a BOM-free temporary file and pass its path with `--body-file`. Follow [gh CLI conventions](../rules/gh-cli-conventions.md#body-content-goes-in-a-file).
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
Bump bun to 1.3.14. Picks up the bugfix for the runtime panic on empty stdin.
|
|
21
|
-
```
|
|
22
|
+
## Check the draft
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Opens with an imperative-verb paragraph. Optional headers drawn from the Anthropic set: `## Summary`, `## Problem`, `## Fix`, `## Changes`, `## Test plan`, `## Tests`, `## Testing`, `## Approach`, `## Root cause`. Most Standard PRs use one or two — pick the ones the change earns.
|
|
26
|
-
|
|
27
|
-
```markdown
|
|
28
|
-
Adds a syllable-counted Flesch reading score to the PR description enforcer. Bodies above the readability ceiling surface a targeted block message before the strike counter increments.
|
|
29
|
-
|
|
30
|
-
## Test plan
|
|
31
|
-
|
|
32
|
-
- [ ] `pytest packages/claude-dev-env/hooks/blocking/test_pr_description_enforcer.py`
|
|
33
|
-
- [ ] Open a draft PR with a 45-word sentence and confirm the metric block fires
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Heavy — diff > 500 lines, or a cross-cutting bug fix
|
|
37
|
-
|
|
38
|
-
Two required header categories. Body MUST contain at least one of `## Problem` or `## Summary`. Body MUST contain at least one of `## Test plan`, `## Testing`, `## Tests`, `## Verification`, or `## Validation`. Add `## Fix`, `## Changes`, `## Root cause`, or `## Approach` when the change earns them.
|
|
39
|
-
|
|
40
|
-
```markdown
|
|
41
|
-
## Problem
|
|
42
|
-
|
|
43
|
-
Long-running `gh api` review fetches drop pages silently when the reviewer count crosses 30. Bugbot findings on PRs past the first review cycle stay hidden.
|
|
44
|
-
|
|
45
|
-
## Fix
|
|
46
|
-
|
|
47
|
-
Routes every `gh api .../reviews` and `.../comments` call through `--paginate --slurp | jq` so the cross-page filter sees the full set.
|
|
48
|
-
|
|
49
|
-
## Test plan
|
|
50
|
-
|
|
51
|
-
- [ ] Mock paginated API and assert `jq` filter operates on the merged stream
|
|
52
|
-
- [ ] Replay PR #467 review history and confirm the late bugbot comment surfaces
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Style rules
|
|
56
|
-
|
|
57
|
-
- Open with an imperative verb: `Adds`, `Fixes`, `Updates`, `Removes`, `Ports`, `Tightens`. 51% of prose-opening Anthropic PRs follow this pattern.
|
|
58
|
-
- Do not open with `This PR`. The phrase appears in 1 of 120 corpus PRs. The enforcer hook treats `This PR adds/fixes/updates…` as a hard block.
|
|
59
|
-
- Backticked identifiers (`function_name`, `--flag`, `CONST`) belong in intro prose. Anthropic PRs use them routinely.
|
|
60
|
-
- Em-dashes — like these — work as parenthetical separators. 48% of corpus PRs use them.
|
|
61
|
-
- Focus on WHY. The diff shows WHAT.
|
|
62
|
-
- No code snippets in the description body. Reviewers read the diff for code.
|
|
63
|
-
- No implementation-detail dumping. `Add a 5-second timeout` beats ``Add `pullStartedAt: Date.now()` parameter to the `runPull()` callback``.
|
|
64
|
-
- No filler. Strike `In this PR I have made the following changes:` and start with the action.
|
|
65
|
-
|
|
66
|
-
## Gotchas
|
|
67
|
-
|
|
68
|
-
- **Self-closing reference.** Do not write `Fixes #<the PR's own number>` in a `gh pr edit` or `gh pr comment` body. The enforcer hook reads the positional after `pr edit` or `pr comment` and blocks the body when the self-reference matches.
|
|
69
|
-
- **Trivial shape with `## Summary` header.** A four-line body wrapped in `## Summary` trips the ceremony-on-Trivial check. Keep tiny bodies as plain prose.
|
|
70
|
-
- **Heavy shape missing a testing header.** A 600-line PR body with `## Problem` and `## Fix` but no `## Test plan` / `## Testing` / `## Tests` block trips the Heavy required-headers check.
|
|
71
|
-
- **`This PR` opening on any shape.** Hard block regardless of size.
|
|
72
|
-
- **Dual-mode dispatch (unique pattern in `hooks/blocking/`).** The `pr_description_enforcer.py` hook reads `sys.argv` for `--readability-*` CLI flags as well as its stdin-JSON hook input. This dual-mode pattern is the only one of its kind across the blocking hooks directory. When extending the hook, preserve the precedence: CLI flags handled first and exited; stdin-JSON path falls through.
|
|
73
|
-
|
|
74
|
-
## Readability targets
|
|
75
|
-
|
|
76
|
-
The enforcer hook computes a Flesch Reading Ease score plus sentence-length metrics on the intro paragraph and the first body section combined.
|
|
77
|
-
|
|
78
|
-
| Metric | Target |
|
|
79
|
-
|---|---|
|
|
80
|
-
| Longest sentence | ≤ 28 words |
|
|
81
|
-
| Average sentence | ≤ 18 words |
|
|
82
|
-
| Flesch Reading Ease | ≥ 50 |
|
|
83
|
-
|
|
84
|
-
The hook tracks a per-user strike counter at `~/.claude/state/pr_description_readability_strikes.json`. The first two readability failures emit a metric-specific block (e.g., `Readability: longest sentence is 32 words (maximum 28); split or rewrite the longest sentence`). The third triggering failure fires an escape-hatch message listing four recovery actions. The full action list lives in `PR_DESCRIPTION_GUIDE.md` under "Escape hatch".
|
|
85
|
-
|
|
86
|
-
Hit the targets on first attempt by writing short sentences in common Anglo-Saxon words. The average tracks the corpus median of 14.5.
|
|
87
|
-
|
|
88
|
-
## Refusals
|
|
89
|
-
|
|
90
|
-
Decline to write a body when:
|
|
91
|
-
|
|
92
|
-
- The PR has zero diff lines (genuinely empty).
|
|
93
|
-
- The user describes intent that contradicts the diff (e.g., "describe this as a bug fix" when the diff adds a feature).
|
|
94
|
-
- The user requests a shape that violates the hook (e.g., `## Summary` on a one-line bump). Offer the correct shape.
|
|
24
|
+
Confirm every statement matches the diff and current pull request state. Return the final markdown and the file path ready for publication.
|
|
@@ -79,7 +79,7 @@ import pytest
|
|
|
79
79
|
import yaml
|
|
80
80
|
|
|
81
81
|
ACCEPTED_FRONTMATTER_KEYS = frozenset({"name", "description", "tools", "color"})
|
|
82
|
-
|
|
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
|
|
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
|
|
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
|
|
129
|
+
if each_markdown_file.name not in INSTRUCTION_ALIAS_FILENAMES
|
|
130
130
|
)
|
|
131
131
|
|
|
132
132
|
|
|
@@ -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.
|
package/audit-rubrics/CLAUDE.md
CHANGED
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|