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