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,183 @@
|
|
|
1
|
+
"""Validate exact Claude instruction imports and regular Git file modes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
import stat
|
|
9
|
+
import subprocess
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
git_directory_name = ".git"
|
|
13
|
+
git_listing_commands = (
|
|
14
|
+
(("git", "ls-files", "--stage", "-z"), True),
|
|
15
|
+
(("git", "ls-files", "--others", "--exclude-standard", "-z"), False),
|
|
16
|
+
)
|
|
17
|
+
ascii_encoding_name = "ascii"
|
|
18
|
+
utf8_encoding_name = "utf-8"
|
|
19
|
+
regular_git_file_mode = "100644"
|
|
20
|
+
canonical_instruction_names = frozenset(("AGENTS.md", "CLAUDE.md"))
|
|
21
|
+
logger = logging.getLogger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _read_git_paths_and_modes(
|
|
25
|
+
repository_root: Path,
|
|
26
|
+
) -> tuple[set[Path], dict[Path, set[str]]]:
|
|
27
|
+
all_git_paths: set[Path] = set()
|
|
28
|
+
modes_by_path: dict[Path, set[str]] = {}
|
|
29
|
+
for each_command, each_has_git_mode in git_listing_commands:
|
|
30
|
+
completed_process = subprocess.run(
|
|
31
|
+
each_command,
|
|
32
|
+
cwd=repository_root,
|
|
33
|
+
capture_output=True,
|
|
34
|
+
check=True,
|
|
35
|
+
)
|
|
36
|
+
for each_record in completed_process.stdout.split(b"\0"):
|
|
37
|
+
if not each_record:
|
|
38
|
+
continue
|
|
39
|
+
if each_has_git_mode:
|
|
40
|
+
each_header, each_path_bytes = each_record.split(b"\t", 1)
|
|
41
|
+
each_mode = each_header.split(b" ", 1)[0].decode(ascii_encoding_name)
|
|
42
|
+
each_path = repository_root / Path(os.fsdecode(each_path_bytes))
|
|
43
|
+
modes_by_path.setdefault(each_path, set()).add(each_mode)
|
|
44
|
+
else:
|
|
45
|
+
each_path = repository_root / Path(os.fsdecode(each_record))
|
|
46
|
+
all_git_paths.add(each_path)
|
|
47
|
+
return all_git_paths, modes_by_path
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _discover_named_files(
|
|
51
|
+
repository_root: Path,
|
|
52
|
+
all_git_paths: set[Path],
|
|
53
|
+
expected_name: str,
|
|
54
|
+
) -> list[Path]:
|
|
55
|
+
all_candidate_paths = set(all_git_paths)
|
|
56
|
+
all_candidate_paths.update(repository_root.rglob("*"))
|
|
57
|
+
return sorted(
|
|
58
|
+
each_path
|
|
59
|
+
for each_path in all_candidate_paths
|
|
60
|
+
if git_directory_name not in each_path.parts
|
|
61
|
+
and each_path.name.casefold() == expected_name.casefold()
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _find_nearest_agents_path(
|
|
66
|
+
claude_path: Path,
|
|
67
|
+
repository_root: Path,
|
|
68
|
+
agents_by_directory: dict[Path, Path],
|
|
69
|
+
) -> Path | None:
|
|
70
|
+
each_directory = claude_path.parent
|
|
71
|
+
while True:
|
|
72
|
+
each_agents_path = agents_by_directory.get(each_directory)
|
|
73
|
+
if each_agents_path is not None:
|
|
74
|
+
return each_agents_path
|
|
75
|
+
if each_directory == repository_root:
|
|
76
|
+
return None
|
|
77
|
+
each_directory = each_directory.parent
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _relative_import_path(claude_path: Path, agents_path: Path) -> str:
|
|
81
|
+
return Path(os.path.relpath(agents_path, claude_path.parent)).as_posix()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _expected_import_text(claude_path: Path, agents_path: Path) -> bytes:
|
|
85
|
+
return f"@{_relative_import_path(claude_path, agents_path)}\n".encode(
|
|
86
|
+
utf8_encoding_name
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _is_regular_file(each_path: Path) -> bool:
|
|
91
|
+
try:
|
|
92
|
+
return stat.S_ISREG(each_path.lstat().st_mode)
|
|
93
|
+
except FileNotFoundError:
|
|
94
|
+
return False
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def validate_repository(repository_root: Path) -> list[str]:
|
|
98
|
+
"""Validate instruction filenames, modes, and exact Claude imports.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
repository_root: Repository directory containing the Git metadata.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
Human-readable validation errors, with an empty list for a valid tree.
|
|
105
|
+
"""
|
|
106
|
+
repository_root = repository_root.resolve()
|
|
107
|
+
all_errors: list[str] = []
|
|
108
|
+
all_git_paths, modes_by_path = _read_git_paths_and_modes(repository_root)
|
|
109
|
+
all_agents_paths = _discover_named_files(
|
|
110
|
+
repository_root, all_git_paths, "AGENTS.md"
|
|
111
|
+
)
|
|
112
|
+
all_claude_paths = _discover_named_files(
|
|
113
|
+
repository_root, all_git_paths, "CLAUDE.md"
|
|
114
|
+
)
|
|
115
|
+
agents_by_directory = {
|
|
116
|
+
each_path.parent: each_path
|
|
117
|
+
for each_path in all_agents_paths
|
|
118
|
+
if each_path.name == "AGENTS.md"
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
for each_instruction_path in (*all_agents_paths, *all_claude_paths):
|
|
122
|
+
relative_path = each_instruction_path.relative_to(repository_root)
|
|
123
|
+
tracked_modes = modes_by_path.get(each_instruction_path, set())
|
|
124
|
+
if each_instruction_path.name not in canonical_instruction_names:
|
|
125
|
+
all_errors.append(f"Use the canonical filename: {relative_path}")
|
|
126
|
+
if not _is_regular_file(each_instruction_path):
|
|
127
|
+
all_errors.append(f"Use a regular file: {relative_path}")
|
|
128
|
+
if tracked_modes != {regular_git_file_mode}:
|
|
129
|
+
all_errors.append(
|
|
130
|
+
f"Commit the instruction file with Git mode 100644: {relative_path}"
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
for each_claude_path in all_claude_paths:
|
|
134
|
+
relative_claude_path = each_claude_path.relative_to(repository_root)
|
|
135
|
+
each_agents_path = _find_nearest_agents_path(
|
|
136
|
+
each_claude_path, repository_root, agents_by_directory
|
|
137
|
+
)
|
|
138
|
+
if each_agents_path is None:
|
|
139
|
+
all_errors.append(f"Add the nearest governing AGENTS.md: {relative_claude_path}")
|
|
140
|
+
continue
|
|
141
|
+
if not _is_regular_file(each_claude_path):
|
|
142
|
+
continue
|
|
143
|
+
expected_bytes = _expected_import_text(each_claude_path, each_agents_path)
|
|
144
|
+
actual_bytes = each_claude_path.read_bytes()
|
|
145
|
+
if actual_bytes != expected_bytes:
|
|
146
|
+
relative_import_path = _relative_import_path(
|
|
147
|
+
each_claude_path, each_agents_path
|
|
148
|
+
)
|
|
149
|
+
relative_agents_path = each_agents_path.relative_to(repository_root)
|
|
150
|
+
all_errors.append(
|
|
151
|
+
f"Make {relative_claude_path} exactly import "
|
|
152
|
+
f"@{relative_import_path} for {relative_agents_path}"
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
return all_errors
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def _parse_arguments() -> argparse.Namespace:
|
|
159
|
+
argument_parser = argparse.ArgumentParser(
|
|
160
|
+
description="Validate exact CLAUDE.md imports and regular AGENTS.md files."
|
|
161
|
+
)
|
|
162
|
+
argument_parser.add_argument(
|
|
163
|
+
"--repository-root",
|
|
164
|
+
type=Path,
|
|
165
|
+
default=Path.cwd(),
|
|
166
|
+
help="Repository root containing the .git directory.",
|
|
167
|
+
)
|
|
168
|
+
return argument_parser.parse_args()
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _main() -> int:
|
|
172
|
+
parsed_arguments = _parse_arguments()
|
|
173
|
+
repository_root = parsed_arguments.repository_root.resolve()
|
|
174
|
+
all_errors = validate_repository(repository_root)
|
|
175
|
+
if all_errors:
|
|
176
|
+
for each_error in all_errors:
|
|
177
|
+
logger.error("%s", each_error)
|
|
178
|
+
return 1
|
|
179
|
+
return 0
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
if __name__ == "__main__":
|
|
183
|
+
raise SystemExit(_main())
|
package/settings.json
CHANGED
package/skills/AGENTS.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Skills Directory
|
|
2
|
+
|
|
3
|
+
Each skill is a self-contained folder Claude Code loads on demand. At startup, only the skill's `name` and `description` metadata load. The full `SKILL.md` body and any support files load only when a skill becomes relevant to the conversation.
|
|
4
|
+
|
|
5
|
+
## Skill folder convention
|
|
6
|
+
|
|
7
|
+
| Item | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `SKILL.md` | Required entry point. YAML frontmatter with `name` and `description` (the trigger). Body holds the skill's full instructions. |
|
|
10
|
+
| `scripts/` | Python helper scripts the skill invokes at runtime. |
|
|
11
|
+
| `workflow/` | `.mjs` workflow scripts run via the `Workflow` tool. |
|
|
12
|
+
| `templates/` | Template files the skill or workflow renders at build time. |
|
|
13
|
+
| `reference/` | Reference docs the skill cites or the workflow reads. |
|
|
14
|
+
| `*_constants/` | Python package of named constants imported by `scripts/`. |
|
|
15
|
+
|
|
16
|
+
Skills install to `~/.claude/skills/<skill-name>/` via `packages/claude-dev-env/bin/install.mjs`. See `docs/references/skill-install-system.md` for the install pipeline.
|
|
17
|
+
|
|
18
|
+
## Shared support code
|
|
19
|
+
|
|
20
|
+
**`skills/_shared/`** — skill-local PR-loop helpers plus `@` stubs that name
|
|
21
|
+
canonical homes under **`@~/.claude/_shared/`** (advisor protocol, PR-loop
|
|
22
|
+
contracts, runtime scripts). Map: `skills/_shared/CLAUDE.md`. End-of-run gotchas: `skills/_shared/end-of-run-gotcha-recommendations.md`.
|
|
23
|
+
|
|
24
|
+
## Skill groups
|
|
25
|
+
|
|
26
|
+
**Planning and implementation**
|
|
27
|
+
- `anthropic-plan` — creates a source-grounded plan packet before any code changes
|
|
28
|
+
- `orchestrator` — turns the session into the orchestrator: it spawns executor subagents to do the code edits and test runs; hard decisions go to a shared advisor (Claude warm `session-advisor` via SendMessage; a third-party host: max-tier Claude via CLI Claude-chain)
|
|
29
|
+
- `orchestrator-refresh` — sub-skill fired by the `/orchestrator` loop to re-assert the host-matched shared-advisor discipline mid-run (Claude SendMessage; a third-party host's Claude CLI chain, no Agent-tool advisor spawn)
|
|
30
|
+
- `team-advisor` — binds one advisor at the strongest reachable tier (Claude warm agent; a third-party host: max-tier Claude via CLI Claude-chain, fail closed when unreachable); consult cadence and weight live in `docs/references/advisor-tool.md`
|
|
31
|
+
- `grokify` — builds a paste-ready Grok Build handoff with a Claude advisor charter
|
|
32
|
+
- `grok-spawn` — orchestrator playbook for fleets of headless grok CLI workers (preflight, batch spec, `spawn_grok_batch.py`)
|
|
33
|
+
|
|
34
|
+
**PR review and convergence**
|
|
35
|
+
- `autoconverge` — autonomous single-run workflow that drives a PR to ready
|
|
36
|
+
- `pr-converge` — paced convergence loop across `ScheduleWakeup` ticks
|
|
37
|
+
- `bugteam` — open-loop audit-fix until convergence
|
|
38
|
+
- `copilot-review` — requests and polls a GitHub Copilot review
|
|
39
|
+
- `copilot-finding-triage` — tiers each Copilot gate finding, verifies each code concern with an executed check, then routes it (auto-fix a confirmed defect, resolve a refuted one, page the user only for an inconclusive one)
|
|
40
|
+
- `reviewer-gates` — availability gates for external reviewers (opt-out parse, Copilot quota, Bugbot trigger/detect)
|
|
41
|
+
- `pr-fix-protocol` — applies reviewer findings as verified fixes and drives unresolved review threads to zero
|
|
42
|
+
- `pr-loop-lifecycle` — opens and closes a PR-loop run (grant, teardown, PR description, revoke, report)
|
|
43
|
+
- `pr-loop-cloud-transport` — six-step transport workflow that lets any PR-loop skill run in a session whose `gh` CLI is absent or cannot act on the PR (MCP schema load, origin/HEAD fix, identity rules, the gh-to-MCP substitution matrix, the Copilot status rule, and the post self-check)
|
|
44
|
+
|
|
45
|
+
**Code review guides (Google eng-practices, adapted for an AI reviewer)**
|
|
46
|
+
- `small-cl` — the Small CLs guide; refs: handling reviewer comments
|
|
47
|
+
- `comments` — writing review comments and handling reviewer comments; refs: the review standard, pushback, respectful code reviews
|
|
48
|
+
- `reviews` — the reviewer guide: standard, what to look for, navigating a CL, speed, pushback; refs: CL descriptions, review comments, emergencies, style guides, the two guide indexes
|
|
49
|
+
- `descriptions` — writing good CL descriptions
|
|
50
|
+
- `emergencies` — what counts as an emergency change; refs: what to look for, speed
|
|
51
|
+
- Focused pull request guidance: [`small-cl/SKILL.md`](small-cl/SKILL.md)
|
|
52
|
+
|
|
53
|
+
**Research and discovery**
|
|
54
|
+
- `recall` — retrieves facts from memory files
|
|
55
|
+
- `remember` — saves a decision, gotcha, or architectural choice to the Obsidian vault
|
|
56
|
+
- `everything-search` — file-system search via the Everything `es.exe` CLI
|
|
57
|
+
- `beat-sheet` — reformats a reply as short single-line beats
|
|
58
|
+
- `show` — creates and reviews inline visual explanations: diagrams, interactive widgets, mockups, charts, and illustrations
|
|
59
|
+
|
|
60
|
+
**Session and workflow management**
|
|
61
|
+
- `session-log` — logs a session report to the Obsidian vault
|
|
62
|
+
- `session-tidy` — tidies the session folder
|
|
63
|
+
- `task-build` — gathers open tasks
|
|
64
|
+
- `issue-tracker` — one consistent way to create, update in place, and close GitHub issues for a work-stream: one epic parent with native sub-issues, dedup-first, marker-delimited body sections edited in place, and an epic checklist mirroring the children
|
|
65
|
+
- `closeout` — session-end entry that harvests obstacles into issue-candidate records and delegates filing to the `issue-tracker` agent (skill fallback), keeping the user-validation gate on each draft
|
|
66
|
+
- `privacy-hygiene` — full-repo personal-data and secret sweep plus remediation guide
|
|
67
|
+
- `update` — updates the dev-env package
|
|
68
|
+
- `fresh-branch` — creates a clean branch off main
|
|
69
|
+
- `rebase` — rebases onto main
|
|
70
|
+
- `usage-pause` — waits out the 5-hour usage window in ScheduleWakeup stages that keep agent contexts warm; probes the OAuth usage endpoint or takes a manual reset override
|
|
71
|
+
- `skill-builder` — complete skill-building lifecycle
|
|
72
|
+
- `auditing-claude-config` — audits a Claude Code setup for context-budget waste and produces a migration table with savings
|
package/skills/CLAUDE.md
CHANGED
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Each skill is a self-contained folder Claude Code loads on demand. At startup, only the skill's `name` and `description` metadata load. The full `SKILL.md` body and any support files load only when a skill becomes relevant to the conversation.
|
|
4
|
-
|
|
5
|
-
## Skill folder convention
|
|
6
|
-
|
|
7
|
-
| Item | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `SKILL.md` | Required entry point. YAML frontmatter with `name` and `description` (the trigger). Body holds the skill's full instructions. |
|
|
10
|
-
| `scripts/` | Python helper scripts the skill invokes at runtime. |
|
|
11
|
-
| `workflow/` | `.mjs` workflow scripts run via the `Workflow` tool. |
|
|
12
|
-
| `templates/` | Template files the skill or workflow renders at build time. |
|
|
13
|
-
| `reference/` | Reference docs the skill cites or the workflow reads. |
|
|
14
|
-
| `*_constants/` | Python package of named constants imported by `scripts/`. |
|
|
15
|
-
|
|
16
|
-
Skills install to `~/.claude/skills/<skill-name>/` via `packages/claude-dev-env/bin/install.mjs`. See `docs/references/skill-install-system.md` for the install pipeline.
|
|
17
|
-
|
|
18
|
-
## Shared support code
|
|
19
|
-
|
|
20
|
-
**`skills/_shared/`** — skill-local PR-loop helpers plus `@` stubs that name
|
|
21
|
-
canonical homes under **`@~/.claude/_shared/`** (advisor protocol, PR-loop
|
|
22
|
-
contracts, runtime scripts). Map: `skills/_shared/CLAUDE.md`. End-of-run gotchas: `skills/_shared/end-of-run-gotcha-recommendations.md`.
|
|
23
|
-
|
|
24
|
-
## Skill groups
|
|
25
|
-
|
|
26
|
-
**Planning and implementation**
|
|
27
|
-
- `anthropic-plan` — creates a source-grounded plan packet before any code changes
|
|
28
|
-
- `orchestrator` — turns the session into the orchestrator: it spawns executor subagents to do the code edits and test runs; hard decisions go to a shared advisor (Claude warm `session-advisor` via SendMessage; a third-party host: max-tier Claude via CLI Claude-chain)
|
|
29
|
-
- `orchestrator-refresh` — sub-skill fired by the `/orchestrator` loop to re-assert the host-matched shared-advisor discipline mid-run (Claude SendMessage; a third-party host's Claude CLI chain, no Agent-tool advisor spawn)
|
|
30
|
-
- `team-advisor` — binds one advisor at the strongest reachable tier (Claude warm agent; a third-party host: max-tier Claude via CLI Claude-chain, fail closed when unreachable); consult cadence and weight live in `docs/references/advisor-tool.md`
|
|
31
|
-
- `grokify` — builds a paste-ready Grok Build handoff with a Claude advisor charter
|
|
32
|
-
- `grok-spawn` — orchestrator playbook for fleets of headless grok CLI workers (preflight, batch spec, `spawn_grok_batch.py`)
|
|
33
|
-
|
|
34
|
-
**PR review and convergence**
|
|
35
|
-
- `autoconverge` — autonomous single-run workflow that drives a PR to ready
|
|
36
|
-
- `pr-converge` — paced convergence loop across `ScheduleWakeup` ticks
|
|
37
|
-
- `bugteam` — open-loop audit-fix until convergence
|
|
38
|
-
- `copilot-review` — requests and polls a GitHub Copilot review
|
|
39
|
-
- `copilot-finding-triage` — tiers each Copilot gate finding, verifies each code concern with an executed check, then routes it (auto-fix a confirmed defect, resolve a refuted one, page the user only for an inconclusive one)
|
|
40
|
-
- `reviewer-gates` — availability gates for external reviewers (opt-out parse, Copilot quota, Bugbot trigger/detect)
|
|
41
|
-
- `pr-fix-protocol` — applies reviewer findings as verified fixes and drives unresolved review threads to zero
|
|
42
|
-
- `pr-loop-lifecycle` — opens and closes a PR-loop run (grant, teardown, PR description, revoke, report)
|
|
43
|
-
- `pr-loop-cloud-transport` — six-step transport workflow that lets any PR-loop skill run in a session whose `gh` CLI is absent or cannot act on the PR (MCP schema load, origin/HEAD fix, identity rules, the gh-to-MCP substitution matrix, the Copilot status rule, and the post self-check)
|
|
44
|
-
|
|
45
|
-
**Research and discovery**
|
|
46
|
-
- `recall` — retrieves facts from memory files
|
|
47
|
-
- `remember` — saves a decision, gotcha, or architectural choice to the Obsidian vault
|
|
48
|
-
- `everything-search` — file-system search via the Everything `es.exe` CLI
|
|
49
|
-
- `beat-sheet` — reformats a reply as short single-line beats
|
|
50
|
-
- `show` — creates and reviews inline visual explanations: diagrams, interactive widgets, mockups, charts, and illustrations
|
|
51
|
-
|
|
52
|
-
**Session and workflow management**
|
|
53
|
-
- `session-log` — logs a session report to the Obsidian vault
|
|
54
|
-
- `session-tidy` — tidies the session folder
|
|
55
|
-
- `task-build` — gathers open tasks
|
|
56
|
-
- `issue-tracker` — one consistent way to create, update in place, and close GitHub issues for a work-stream: one epic parent with native sub-issues, dedup-first, marker-delimited body sections edited in place, and an epic checklist mirroring the children
|
|
57
|
-
- `closeout` — session-end entry that harvests obstacles into issue-candidate records and delegates filing to the `issue-tracker` agent (skill fallback), keeping the user-validation gate on each draft
|
|
58
|
-
- `privacy-hygiene` — full-repo personal-data and secret sweep plus remediation guide
|
|
59
|
-
- `update` — updates the dev-env package
|
|
60
|
-
- `fresh-branch` — creates a clean branch off main
|
|
61
|
-
- `rebase` — rebases onto main
|
|
62
|
-
- `usage-pause` — waits out the 5-hour usage window in ScheduleWakeup stages that keep agent contexts warm; probes the OAuth usage endpoint or takes a manual reset override
|
|
63
|
-
- `skill-builder` — complete skill-building lifecycle
|
|
64
|
-
- `auditing-claude-config` — audits a Claude Code setup for context-budget waste and produces a migration table with savings
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# skills/_shared
|
|
2
|
+
|
|
3
|
+
**Map** for skill-install shared assets. Open a stub, then load the `@` target.
|
|
4
|
+
|
|
5
|
+
## Two homes
|
|
6
|
+
|
|
7
|
+
| Home | Path | Holds |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Skills shared** | `~/.claude/skills/_shared/` | Converge helpers, end-of-run gotcha ref, and `@` stubs |
|
|
10
|
+
| **Top-level shared** | `~/.claude/_shared/` | Advisor protocol, PR-loop contracts, runtime scripts |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Reference docs (this tree)
|
|
14
|
+
|
|
15
|
+
| File | Role |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **`end-of-run-gotcha-recommendations.md`** | End-of-run pasteable gotcha protocol for every skill |
|
|
18
|
+
|
|
19
|
+
## Subdirectories
|
|
20
|
+
|
|
21
|
+
| Directory | Role |
|
|
22
|
+
|---|---|
|
|
23
|
+
| **`advisor/`** | Stubs → `@~/.claude/_shared/advisor/` |
|
|
24
|
+
| **`pr-loop/`** | Local converge helpers + stubs → `@~/.claude/_shared/pr-loop/` |
|
|
25
|
+
|
|
26
|
+
## Canonical-path stubs
|
|
27
|
+
|
|
28
|
+
| Stub here | Load |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `advisor/advisor-protocol.md` | `@~/.claude/_shared/advisor/advisor-protocol.md` |
|
|
31
|
+
| `advisor/CLAUDE.md` | `@~/.claude/_shared/advisor/CLAUDE.md` |
|
|
32
|
+
| `advisor/scripts/README.md` | `@~/.claude/_shared/advisor/scripts/` |
|
|
33
|
+
| `pr-loop/audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
34
|
+
| `pr-loop/audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
35
|
+
| `pr-loop/code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
36
|
+
| `pr-loop/fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
37
|
+
| `pr-loop/gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
38
|
+
| `pr-loop/post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
39
|
+
| `pr-loop/precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
40
|
+
| `pr-loop/state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
41
|
+
| `pr-loop/worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
42
|
+
| `pr-loop/scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
43
|
+
|
|
44
|
+
Install via `packages/claude-dev-env/bin/install.mjs`.
|
package/skills/_shared/CLAUDE.md
CHANGED
|
@@ -1,44 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
**Map** for skill-install shared assets. Open a stub, then load the `@` target.
|
|
4
|
-
|
|
5
|
-
## Two homes
|
|
6
|
-
|
|
7
|
-
| Home | Path | Holds |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| **Skills shared** | `~/.claude/skills/_shared/` | Converge helpers, end-of-run gotcha ref, and `@` stubs |
|
|
10
|
-
| **Top-level shared** | `~/.claude/_shared/` | Advisor protocol, PR-loop contracts, runtime scripts |
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Reference docs (this tree)
|
|
14
|
-
|
|
15
|
-
| File | Role |
|
|
16
|
-
|---|---|
|
|
17
|
-
| **`end-of-run-gotcha-recommendations.md`** | End-of-run pasteable gotcha protocol for every skill |
|
|
18
|
-
|
|
19
|
-
## Subdirectories
|
|
20
|
-
|
|
21
|
-
| Directory | Role |
|
|
22
|
-
|---|---|
|
|
23
|
-
| **`advisor/`** | Stubs → `@~/.claude/_shared/advisor/` |
|
|
24
|
-
| **`pr-loop/`** | Local converge helpers + stubs → `@~/.claude/_shared/pr-loop/` |
|
|
25
|
-
|
|
26
|
-
## Canonical-path stubs
|
|
27
|
-
|
|
28
|
-
| Stub here | Load |
|
|
29
|
-
|---|---|
|
|
30
|
-
| `advisor/advisor-protocol.md` | `@~/.claude/_shared/advisor/advisor-protocol.md` |
|
|
31
|
-
| `advisor/CLAUDE.md` | `@~/.claude/_shared/advisor/CLAUDE.md` |
|
|
32
|
-
| `advisor/scripts/README.md` | `@~/.claude/_shared/advisor/scripts/` |
|
|
33
|
-
| `pr-loop/audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
34
|
-
| `pr-loop/audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
35
|
-
| `pr-loop/code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
36
|
-
| `pr-loop/fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
37
|
-
| `pr-loop/gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
38
|
-
| `pr-loop/post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
39
|
-
| `pr-loop/precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
40
|
-
| `pr-loop/state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
41
|
-
| `pr-loop/worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
42
|
-
| `pr-loop/scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
43
|
-
|
|
44
|
-
Install via `packages/claude-dev-env/bin/install.mjs`.
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Advisor
|
|
2
|
+
|
|
3
|
+
**Canonical home:**
|
|
4
|
+
|
|
5
|
+
@~/.claude/_shared/advisor/CLAUDE.md
|
|
6
|
+
|
|
7
|
+
@~/.claude/_shared/advisor/advisor-protocol.md
|
|
8
|
+
|
|
9
|
+
Scripts: `~/.claude/_shared/advisor/scripts/` (`model_tier_run_validator.py`, `codex_sol_advisor.py`, `tier_model_ids.py`, constants under `scripts/config/`).
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
**Canonical home:**
|
|
4
|
-
|
|
5
|
-
@~/.claude/_shared/advisor/CLAUDE.md
|
|
6
|
-
|
|
7
|
-
@~/.claude/_shared/advisor/advisor-protocol.md
|
|
8
|
-
|
|
9
|
-
Scripts: `~/.claude/_shared/advisor/scripts/` (`model_tier_run_validator.py`, `codex_sol_advisor.py`, `tier_model_ids.py`, constants under `scripts/config/`).
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# pr-loop
|
|
2
|
+
|
|
3
|
+
Shared infrastructure for the PR audit-fix loop used by `bugteam`,
|
|
4
|
+
`pr-converge`, and `autoconverge`. Provides the XML prompt template, Python
|
|
5
|
+
runtime scripts, the portable converge driver protocol, and named constants
|
|
6
|
+
those skills invoke during each loop tick.
|
|
7
|
+
|
|
8
|
+
## Subdirectories
|
|
9
|
+
|
|
10
|
+
| Directory | Role |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `prompts/` | XML agent prompt templates. |
|
|
13
|
+
| `scripts/` | Python scripts for loop state management, prompt building, outcome recording, path resolution, pacer selection, and preflight checks. |
|
|
14
|
+
|
|
15
|
+
## Canonical-path stubs (`~/.claude/_shared/pr-loop/`)
|
|
16
|
+
|
|
17
|
+
Open a stub, then load the `@` target:
|
|
18
|
+
|
|
19
|
+
| Stub here | Load |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
22
|
+
| `audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
23
|
+
| `code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
24
|
+
| `fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
25
|
+
| `gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
26
|
+
| `post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
27
|
+
| `precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
28
|
+
| `state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
29
|
+
| `worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
30
|
+
| `scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
31
|
+
|
|
32
|
+
## Key files (live in this tree)
|
|
33
|
+
|
|
34
|
+
| File | Role |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `portable-driver.md` | Continuous in-session pacer when Workflow / ScheduleWakeup are absent. |
|
|
37
|
+
| `prompts/pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. |
|
|
38
|
+
| `scripts/select_converge_pacer.py` | Maps entry skill + host tool flags to `workflow`, `schedule_wakeup`, or `portable`. |
|
|
39
|
+
| `scripts/build_audit_prompt.py` | Assembles the audit agent prompt from loop state and the constants module. |
|
|
40
|
+
| `scripts/build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings. |
|
|
41
|
+
| `scripts/init_loop_state.py` | Initializes the per-PR loop state JSON file. |
|
|
42
|
+
| `scripts/write_audit_outcomes.py` | Writes the per-loop audit outcome XML into the workspace. |
|
|
43
|
+
| `scripts/write_fix_outcomes.py` | Writes the per-loop fix outcome XML into the workspace. |
|
|
44
|
+
| `scripts/preflight_worktree.py` | Verifies the working directory is a healthy worktree for the target PR's repo. |
|
|
45
|
+
| `scripts/teardown_worktrees.py` | Removes loop worktrees on clean exit. |
|
|
46
|
+
| `scripts/write_handoff.py` | Writes durable resume-handoff files under `~/.claude/runtime/pr-loop/<run-name>/` at each converge checkpoint. |
|
|
47
|
+
| `scripts/_path_resolver.py` | Resolves workspace and worktree paths from PR metadata. |
|
|
48
|
+
| `scripts/_cli_utils.py` | Shared CLI argument parsing helpers. |
|
|
49
|
+
| `scripts/_xml_utils.py` | XML serialization helpers. |
|
|
50
|
+
| `scripts/skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Shared infrastructure for the PR audit-fix loop used by `bugteam`,
|
|
4
|
-
`pr-converge`, and `autoconverge`. Provides the XML prompt template, Python
|
|
5
|
-
runtime scripts, the portable converge driver protocol, and named constants
|
|
6
|
-
those skills invoke during each loop tick.
|
|
7
|
-
|
|
8
|
-
## Subdirectories
|
|
9
|
-
|
|
10
|
-
| Directory | Role |
|
|
11
|
-
|---|---|
|
|
12
|
-
| `prompts/` | XML agent prompt templates. |
|
|
13
|
-
| `scripts/` | Python scripts for loop state management, prompt building, outcome recording, path resolution, pacer selection, and preflight checks. |
|
|
14
|
-
|
|
15
|
-
## Canonical-path stubs (`~/.claude/_shared/pr-loop/`)
|
|
16
|
-
|
|
17
|
-
Open a stub, then load the `@` target:
|
|
18
|
-
|
|
19
|
-
| Stub here | Load |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
22
|
-
| `audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
23
|
-
| `code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
24
|
-
| `fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
25
|
-
| `gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
26
|
-
| `post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
27
|
-
| `precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
28
|
-
| `state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
29
|
-
| `worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
30
|
-
| `scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
31
|
-
|
|
32
|
-
## Key files (live in this tree)
|
|
33
|
-
|
|
34
|
-
| File | Role |
|
|
35
|
-
|---|---|
|
|
36
|
-
| `portable-driver.md` | Continuous in-session pacer when Workflow / ScheduleWakeup are absent. |
|
|
37
|
-
| `prompts/pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. |
|
|
38
|
-
| `scripts/select_converge_pacer.py` | Maps entry skill + host tool flags to `workflow`, `schedule_wakeup`, or `portable`. |
|
|
39
|
-
| `scripts/build_audit_prompt.py` | Assembles the audit agent prompt from loop state and the constants module. |
|
|
40
|
-
| `scripts/build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings. |
|
|
41
|
-
| `scripts/init_loop_state.py` | Initializes the per-PR loop state JSON file. |
|
|
42
|
-
| `scripts/write_audit_outcomes.py` | Writes the per-loop audit outcome XML into the workspace. |
|
|
43
|
-
| `scripts/write_fix_outcomes.py` | Writes the per-loop fix outcome XML into the workspace. |
|
|
44
|
-
| `scripts/preflight_worktree.py` | Verifies the working directory is a healthy worktree for the target PR's repo. |
|
|
45
|
-
| `scripts/teardown_worktrees.py` | Removes loop worktrees on clean exit. |
|
|
46
|
-
| `scripts/write_handoff.py` | Writes durable resume-handoff files under `~/.claude/runtime/pr-loop/<run-name>/` at each converge checkpoint. |
|
|
47
|
-
| `scripts/_path_resolver.py` | Resolves workspace and worktree paths from PR metadata. |
|
|
48
|
-
| `scripts/_cli_utils.py` | Shared CLI argument parsing helpers. |
|
|
49
|
-
| `scripts/_xml_utils.py` | XML serialization helpers. |
|
|
50
|
-
| `scripts/skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# prompts
|
|
2
|
+
|
|
3
|
+
XML agent prompt templates for the PR audit-fix loop.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. Defines the agent role, scope anchors, a ten-rule detection workflow, and output format. `bugteam` and `pr-converge` both inject this prompt when running the consistency audit step. |
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
XML agent prompt templates for the PR audit-fix loop.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. Defines the agent role, scope anchors, a ten-rule detection workflow, and output format. `bugteam` and `pr-converge` both inject this prompt when running the consistency audit step. |
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# scripts
|
|
2
|
+
|
|
3
|
+
Python scripts that run the PR audit-fix loop at runtime. Both `bugteam` and `pr-converge` invoke these scripts during each loop tick.
|
|
4
|
+
|
|
5
|
+
## Two script homes
|
|
6
|
+
|
|
7
|
+
| Home | Path |
|
|
8
|
+
|---|---|
|
|
9
|
+
| **Skill-local** (this folder) | Converge helpers: `build_*_prompt.py`, `init_loop_state.py`, `portable_converge_driver.py`, … |
|
|
10
|
+
| **Runtime** (top-level shared) | Gate / preflight / review helpers — see `RUNTIME_SCRIPTS.md` → `@~/.claude/_shared/pr-loop/scripts/` |
|
|
11
|
+
|
|
12
|
+
## Key files (skill-local)
|
|
13
|
+
|
|
14
|
+
| File | Role |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `audit_category_schema.py` | Loads the A-Q schema JSON, exports category entries, validates rubric/prompt projections, renders deterministic skeletons. |
|
|
17
|
+
| `build_audit_prompt.py` | Assembles the audit agent prompt from loop state and category constants. |
|
|
18
|
+
| `build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings XML. |
|
|
19
|
+
| `init_loop_state.py` | Initializes the per-PR `loop-state.json` file in the workspace directory. |
|
|
20
|
+
| `write_audit_outcomes.py` | Writes per-loop audit outcome XML into the workspace. |
|
|
21
|
+
| `write_fix_outcomes.py` | Writes per-loop fix outcome XML into the workspace. |
|
|
22
|
+
| `preflight_worktree.py` | Verifies the working directory is a healthy git worktree for the target PR's repo. Supports `--mode strict` to abort when the repo does not match. |
|
|
23
|
+
| `teardown_worktrees.py` | Removes per-PR worktrees after a clean loop exit. |
|
|
24
|
+
| `write_handoff.py` | Writes durable resume-handoff files under the run's `~/.claude/runtime/pr-loop` directory at each converge checkpoint. |
|
|
25
|
+
| `select_converge_pacer.py` | Selects `workflow`, `schedule_wakeup`, or `portable` for pr-converge / autoconverge from host tool flags. |
|
|
26
|
+
| `build_converge_task_list.py` | Step-1 task list: runnable review gates + final all_runnable_reviews_clean_same_head. |
|
|
27
|
+
| `portable_converge_driver.py` | portable_converge_driver phase machine: open-run and post-step transitions emit JSON next/commands only. |
|
|
28
|
+
| `_path_resolver.py` | Resolves workspace and worktree paths from PR owner, repo, and number. |
|
|
29
|
+
| `_cli_utils.py` | Shared CLI argument parsing helpers (argparse wrappers). |
|
|
30
|
+
| `_xml_utils.py` | XML serialization helpers for outcome files. |
|
|
31
|
+
| `skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
32
|
+
|
|
33
|
+
## Tests
|
|
34
|
+
|
|
35
|
+
Each script has a paired test file (`test_build_audit_prompt.py`, `test_build_fix_prompt.py`, etc.) in this directory. Run with `python -m pytest` from the repo root.
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Python scripts that run the PR audit-fix loop at runtime. Both `bugteam` and `pr-converge` invoke these scripts during each loop tick.
|
|
4
|
-
|
|
5
|
-
## Two script homes
|
|
6
|
-
|
|
7
|
-
| Home | Path |
|
|
8
|
-
|---|---|
|
|
9
|
-
| **Skill-local** (this folder) | Converge helpers: `build_*_prompt.py`, `init_loop_state.py`, `portable_converge_driver.py`, … |
|
|
10
|
-
| **Runtime** (top-level shared) | Gate / preflight / review helpers — see `RUNTIME_SCRIPTS.md` → `@~/.claude/_shared/pr-loop/scripts/` |
|
|
11
|
-
|
|
12
|
-
## Key files (skill-local)
|
|
13
|
-
|
|
14
|
-
| File | Role |
|
|
15
|
-
|---|---|
|
|
16
|
-
| `audit_category_schema.py` | Loads the A-Q schema JSON, exports category entries, validates rubric/prompt projections, renders deterministic skeletons. |
|
|
17
|
-
| `build_audit_prompt.py` | Assembles the audit agent prompt from loop state and category constants. |
|
|
18
|
-
| `build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings XML. |
|
|
19
|
-
| `init_loop_state.py` | Initializes the per-PR `loop-state.json` file in the workspace directory. |
|
|
20
|
-
| `write_audit_outcomes.py` | Writes per-loop audit outcome XML into the workspace. |
|
|
21
|
-
| `write_fix_outcomes.py` | Writes per-loop fix outcome XML into the workspace. |
|
|
22
|
-
| `preflight_worktree.py` | Verifies the working directory is a healthy git worktree for the target PR's repo. Supports `--mode strict` to abort when the repo does not match. |
|
|
23
|
-
| `teardown_worktrees.py` | Removes per-PR worktrees after a clean loop exit. |
|
|
24
|
-
| `write_handoff.py` | Writes durable resume-handoff files under the run's `~/.claude/runtime/pr-loop` directory at each converge checkpoint. |
|
|
25
|
-
| `select_converge_pacer.py` | Selects `workflow`, `schedule_wakeup`, or `portable` for pr-converge / autoconverge from host tool flags. |
|
|
26
|
-
| `build_converge_task_list.py` | Step-1 task list: runnable review gates + final all_runnable_reviews_clean_same_head. |
|
|
27
|
-
| `portable_converge_driver.py` | portable_converge_driver phase machine: open-run and post-step transitions emit JSON next/commands only. |
|
|
28
|
-
| `_path_resolver.py` | Resolves workspace and worktree paths from PR owner, repo, and number. |
|
|
29
|
-
| `_cli_utils.py` | Shared CLI argument parsing helpers (argparse wrappers). |
|
|
30
|
-
| `_xml_utils.py` | XML serialization helpers for outcome files. |
|
|
31
|
-
| `skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
32
|
-
|
|
33
|
-
## Tests
|
|
34
|
-
|
|
35
|
-
Each script has a paired test file (`test_build_audit_prompt.py`, `test_build_fix_prompt.py`, etc.) in this directory. Run with `python -m pytest` from the repo root.
|
|
1
|
+
@AGENTS.md
|