claude-dev-env 4.3.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +33 -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 +1 -3
- package/.agents/skills/skill-builder/SKILL.md +3 -196
- 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/install.agents-home.test.mjs +15 -13
- package/bin/install.mjs +28 -0
- package/bin/install.policy-lint.test.mjs +78 -0
- package/bin/install.prune.test.mjs +59 -20
- package/bin/install.pstack-plugin.test.mjs +114 -0
- package/bin/install.test.mjs +37 -0
- package/bin/refresh-pstack-plugin-skills.test.mjs +211 -0
- 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_paired_test.py +22 -15
- package/hooks/blocking/test_bash_post_call_dispatcher.py +65 -4
- 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 +68 -133
- package/hooks/blocking/test_pre_tool_use_dispatcher_native.py +20 -51
- package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +18 -18
- package/hooks/git-hooks/git_hooks_constants/staged_policy_lint.py +12 -0
- package/hooks/git-hooks/pre_commit.py +52 -11
- package/hooks/git-hooks/test_installed_policy_lint.py +159 -0
- package/hooks/git-hooks/test_native_policy_commit.py +87 -0
- package/hooks/git-hooks/test_pre_commit.py +246 -0
- package/hooks/hooks.json +1 -1
- package/hooks/hooks_constants/bash_post_call_dispatcher_constants.py +14 -1
- package/hooks/hooks_constants/pr_done_reminder_constants.py +98 -0
- package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +10 -43
- package/hooks/hooks_constants/test_bash_post_call_dispatcher_constants.py +19 -2
- package/hooks/hooks_constants/test_pr_done_reminder_constants.py +40 -0
- package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +20 -32
- package/package.json +2 -2
- package/rules/durable-post-artifacts.md +2 -1
- package/rules/git-workflow.md +6 -6
- 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/dev_env_scripts_constants/shared_tree_constants.py +4 -5
- package/{.agents/skills/_shared/pr-loop/scripts → scripts}/durable_post_lint.py +5 -41
- package/{.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/durable_post_lint_constants.py → scripts/durable_post_lint_config/config/constants.py} +0 -10
- package/{.agents/skills/_shared/pr-loop/scripts/test_durable_post_lint_constants.py → scripts/durable_post_lint_config/config/test_constants.py} +1 -1
- package/scripts/policy_lint/adapter_detectors.py +13 -6
- package/scripts/policy_lint/adapters.py +7 -4
- 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/refresh_pstack_plugin_skills.mjs +200 -0
- package/scripts/shared_tree_paths.py +32 -3
- package/scripts/test_shared_tree_paths.py +33 -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_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_rules.py +3 -7
- package/.agents/skills/_shared/pr-loop/.claude/CLAUDE.md +0 -1
- package/.agents/skills/_shared/pr-loop/AGENTS.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/CLAUDE.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/{.agents/skills/_shared/pr-loop/scripts → scripts}/test_durable_post_lint.py +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# New Skill Workflow
|
|
2
|
-
|
|
3
|
-
Best-practice-driven lifecycle for building a skill from scratch.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- The user has a task or domain they want to capture as a skill
|
|
8
|
-
- No existing skill for this capability (or intentionally starting fresh)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Step 1: Classify
|
|
13
|
-
|
|
14
|
-
**Goal:** Determine the skill type. Type dictates folder structure.
|
|
15
|
-
|
|
16
|
-
1. Read `${CLAUDE_SKILL_DIR}/references/skill-types.md`.
|
|
17
|
-
|
|
18
|
-
2. Ask the user about the skill’s purpose:
|
|
19
|
-
|
|
20
|
-
> "What will this skill help Claude do?"
|
|
21
|
-
|
|
22
|
-
Match the answer against the 9 types. If ambiguous, present the top 2-3 matches and ask the user to choose.
|
|
23
|
-
|
|
24
|
-
3. Record the classification: type number, type name, recommended folders.
|
|
25
|
-
|
|
26
|
-
**Output:** Type classification with folder plan.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Step 2: Scaffold
|
|
31
|
-
|
|
32
|
-
**Goal:** Create the folder structure. Every skill starts with the same skeleton plus type-specific additions.
|
|
33
|
-
|
|
34
|
-
1. Create the skill directory if it doesn’t exist.
|
|
35
|
-
|
|
36
|
-
2. Create the minimum structure:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
skill-name/
|
|
40
|
-
├── SKILL.md # Hub — every skill has this
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
3. Add type-specific directories based on Step 1 classification (see `${CLAUDE_SKILL_DIR}/references/skill-types.md` for the folder recommendations per type).
|
|
44
|
-
|
|
45
|
-
4. Verify the scaffold matches the type recommendation.
|
|
46
|
-
|
|
47
|
-
> "As your Skill grows, you can bundle additional content that Claude loads only when needed."
|
|
48
|
-
|
|
49
|
-
**Output:** Directory tree with SKILL.md stub.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Step 3: Gather
|
|
54
|
-
|
|
55
|
-
**Goal:** Collect domain knowledge, failure patterns, gotchas, and a composition plan.
|
|
56
|
-
|
|
57
|
-
> "Build a Gotchas Section — these sections should be built up from common failure points that Claude runs into when using your skill."
|
|
58
|
-
|
|
59
|
-
Read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`, `${CLAUDE_SKILL_DIR}/references/description-field.md`, and `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md` before the interview. Modularity, description triggers, and deterministic inventory are gates: do not proceed to Write until the composition plan, trigger catalog draft, and deterministic-elements inventory are filled.
|
|
60
|
-
|
|
61
|
-
### Interview questions
|
|
62
|
-
|
|
63
|
-
Ask the user:
|
|
64
|
-
|
|
65
|
-
1. "What task were you doing when you realized you needed a skill?"
|
|
66
|
-
2. "What context did you repeatedly provide to Claude?"
|
|
67
|
-
3. "Where did Claude fail or produce subpar results without guidance?"
|
|
68
|
-
4. "What does Claude consistently get wrong about this domain?"
|
|
69
|
-
5. "What specific format or structure do you need in the output?"
|
|
70
|
-
6. "Are there rules or constraints Claude must never violate?"
|
|
71
|
-
7. "What tools, scripts, or libraries does Claude need to use?"
|
|
72
|
-
8. "Does this skill need to run differently for different models (Haiku vs Opus)?"
|
|
73
|
-
9. "In one sentence, what is the single capability this skill owns?"
|
|
74
|
-
10. "Which existing skills already cover a step of this work? Which steps should this skill invoke by name?"
|
|
75
|
-
11. "Is this one skill, several skills, or a thin orchestrator that calls sub-skills?"
|
|
76
|
-
12. "What exact phrases, slash commands, or file types should select this skill?"
|
|
77
|
-
13. "Which steps of this work are fixed procedures (same inputs → same outputs, machine-checkable) versus open judgment?"
|
|
78
|
-
|
|
79
|
-
### Related-skills inventory
|
|
80
|
-
|
|
81
|
-
Scan installed skills and the package skill tree for names that touch the same domain. List each with: keep separate / invoke as sub-skill / absorb (with reason if absorb).
|
|
82
|
-
|
|
83
|
-
### Generate gap analysis
|
|
84
|
-
|
|
85
|
-
Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
|
|
86
|
-
|
|
87
|
-
- Skill type and degree of freedom
|
|
88
|
-
- Task description (one capability sentence)
|
|
89
|
-
- Gaps identified (what failed, what was needed)
|
|
90
|
-
- Recurring patterns across gaps
|
|
91
|
-
- Initial gotcha candidates
|
|
92
|
-
- **Composition plan** — capability sentence, related skills, sub-skills to invoke, split or orchestrator decision, missing sub-skills to create
|
|
93
|
-
- **Description triggers** — capability stem tokens + trigger phrase list (not story prose)
|
|
94
|
-
- **Deterministic elements inventory** — each process step classified; home path; paired test for code
|
|
95
|
-
|
|
96
|
-
### Assess degree of freedom
|
|
97
|
-
|
|
98
|
-
> "Match the level of specificity to the task’s fragility and variability."
|
|
99
|
-
|
|
100
|
-
| Degree | When | Example |
|
|
101
|
-
|---|---|---|
|
|
102
|
-
| High | Multiple valid approaches, context-dependent | Code review guidelines |
|
|
103
|
-
| Medium | Preferred pattern exists, some variation ok | Report generation with template |
|
|
104
|
-
| Low | Fragile operations, consistency critical | Database migration with exact script |
|
|
105
|
-
|
|
106
|
-
Record the assessment with reasoning.
|
|
107
|
-
|
|
108
|
-
### Modularity gate
|
|
109
|
-
|
|
110
|
-
Register each task seed from `skill-modularity.md` on the session task list (`TaskCreate` / `TodoWrite`). Complete with evidence. If the capability sentence needs an unrelated "and", stop and split scope with the user before Step 4.
|
|
111
|
-
|
|
112
|
-
### Description gate
|
|
113
|
-
|
|
114
|
-
Draft the frontmatter description using the template in `description-field.md`. Register each description task seed and complete with evidence. Story prose fails the gate.
|
|
115
|
-
|
|
116
|
-
### Deterministic-elements gate
|
|
117
|
-
|
|
118
|
-
Register each task seed under **Required task seeds** in `deterministic-elements.md`. Complete with evidence. Every deterministic step must have a planned `scripts/`, `workflow/`, `templates/`, `reference/`, or task-seed path. Prose-only mechanical sequences and markdown checkbox boards fail the gate.
|
|
119
|
-
|
|
120
|
-
**Output:** Completed gap analysis (composition plan + description triggers + deterministic inventory), initial gotchas, degree-of-freedom assessment, modularity gate done, draft description.
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Step 4: Write
|
|
125
|
-
|
|
126
|
-
**Goal:** Produce the skill package — SKILL.md and companion files.
|
|
127
|
-
|
|
128
|
-
Spawn the `skill-writer-agent` agent (`Agent(subagent_type="skill-writer-agent", ...)`) with the structured handoff from `${CLAUDE_SKILL_DIR}/references/delegation-map.md`.
|
|
129
|
-
|
|
130
|
-
The handoff must include: skill type, folder structure, gap analysis (composition plan + description triggers + deterministic inventory), initial gotchas, degree of freedom, constraints, sub-skills to name in SKILL.md, exact description string to put in frontmatter, script/test paths for every deterministic step.
|
|
131
|
-
|
|
132
|
-
After the `skill-writer-agent` agent produces the draft:
|
|
133
|
-
|
|
134
|
-
1. Verify it follows the hub layout (principle → gotchas → when-applies → process → file index → folder map).
|
|
135
|
-
2. Verify SKILL.md body is under 500 lines.
|
|
136
|
-
3. Verify all references are one level deep.
|
|
137
|
-
4. Verify files over 100 lines have a TOC.
|
|
138
|
-
5. Verify modularity: single capability, sub-skills table when composing, no silent reimplementation of inventoried skills.
|
|
139
|
-
6. Verify description is a trigger catalog per `description-field.md` (not story prose).
|
|
140
|
-
7. Verify deterministic inventory: every deterministic step has a real code/artifact/task-seed path; no prose-only mechanical sequences; no markdown checkbox boards for required work; scripts follow CODE_RULES and have paired tests.
|
|
141
|
-
|
|
142
|
-
Fix structural, modularity, description, and deterministic-element issues before proceeding.
|
|
143
|
-
|
|
144
|
-
**Output:** Complete skill package at the target directory.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Step 5: Self-Audit
|
|
149
|
-
|
|
150
|
-
**Goal:** Verify every best practice is satisfied before delivery.
|
|
151
|
-
|
|
152
|
-
1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
|
|
153
|
-
2. Register **every** bullet as a session task (`TaskCreate` / `TodoWrite`).
|
|
154
|
-
3. Complete each task against the built skill: PASS, FAIL with file:line evidence, or N/A with reason.
|
|
155
|
-
4. Every FAIL must be fixed before proceeding. Apply fixes, then re-open/complete that task.
|
|
156
|
-
5. When all tasks are PASS or N/A, proceed to Step 6.
|
|
157
|
-
|
|
158
|
-
For an independent check, spawn a subagent to run the audit (see delegation-map.md).
|
|
159
|
-
|
|
160
|
-
**Output:** Audit summary (PASS / N/A / FAIL-fixed counts). All items PASS or N/A.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Step 6: Deliver
|
|
165
|
-
|
|
166
|
-
**Goal:** Hand off the finished skill with full documentation. Prompt user if they want a PR up with the skill.
|
|
167
|
-
|
|
168
|
-
Present to the user:
|
|
169
|
-
|
|
170
|
-
1. **File map** — every file created, with its purpose.
|
|
171
|
-
2. **Skill type** — classification and why it fits.
|
|
172
|
-
3. **Degree of freedom** — assessment and reasoning.
|
|
173
|
-
4. **Composition plan** — capability sentence, sub-skills invoked, any skills split out.
|
|
174
|
-
5. **Description** — final frontmatter trigger catalog (paste the string).
|
|
175
|
-
6. **Deterministic inventory** — steps classified; script/template/reference paths; tests for code.
|
|
176
|
-
7. **Gotchas seeded** — initial gotchas captured.
|
|
177
|
-
8. **Audit summary** — "All checklist items: N passed, M N/A."
|
|
178
|
-
9. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
|
|
179
|
-
10. **Suggested first test** — a concrete task to try with Claude B.
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# Polish Skill Workflow
|
|
2
|
-
|
|
3
|
-
Final optimization pass for a skill that is functionally complete.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- The skill has been used and observed
|
|
8
|
-
- The user is satisfied with output quality
|
|
9
|
-
- This is the final step before the skill is considered done
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Step 1: Description trigger-catalog audit
|
|
14
|
-
|
|
15
|
-
**Goal:** Rewrite the frontmatter `description` into a dense trigger catalog. Selection metadata only — not a story.
|
|
16
|
-
|
|
17
|
-
Read `${CLAUDE_SKILL_DIR}/references/description-field.md` and apply its checklist in full.
|
|
18
|
-
|
|
19
|
-
> "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
|
|
20
|
-
|
|
21
|
-
> "The description field is not a summary — it's a description of when to trigger."
|
|
22
|
-
|
|
23
|
-
### Fail conditions (must rewrite)
|
|
24
|
-
|
|
25
|
-
- Multi-sentence narrative or benefits language ("helps you", "ensures reliable…")
|
|
26
|
-
- First or second person
|
|
27
|
-
- Process/implementation detail that belongs in the body
|
|
28
|
-
- Missing concrete trigger phrases
|
|
29
|
-
- Overlap with a sibling skill with no distinguishing tokens
|
|
30
|
-
|
|
31
|
-
### Required shape
|
|
32
|
-
|
|
33
|
-
```yaml
|
|
34
|
-
description: >-
|
|
35
|
-
<capability tokens>. Triggers: <phrase>, <phrase>, <slash>, <filetype>.
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Description task seeds
|
|
39
|
-
|
|
40
|
-
Register each as a session task; complete with evidence (no markdown checkboxes):
|
|
41
|
-
|
|
42
|
-
- **Third person** — no I/you
|
|
43
|
-
- **Capability stem** — what tokens, ≤20 words, no story
|
|
44
|
-
- **Triggers list** — concrete phrases / slash forms / file types
|
|
45
|
-
- **Under 1024 characters** (prefer much shorter; always-on context)
|
|
46
|
-
- **No XML tags**
|
|
47
|
-
- **Not a story** — no narrative, benefits, or process dump
|
|
48
|
-
- **Sibling boundary** — distinguishable from related skills
|
|
49
|
-
|
|
50
|
-
### Trigger phrase review
|
|
51
|
-
|
|
52
|
-
Generate 10 variations of the user's intent:
|
|
53
|
-
|
|
54
|
-
- Formal and casual phrasings
|
|
55
|
-
- Cases where the user doesn't name the skill but clearly needs it
|
|
56
|
-
- Cases where this skill competes with another but should win
|
|
57
|
-
|
|
58
|
-
For each: would the current description select this skill?
|
|
59
|
-
If you aren't sure of user's intent, present options to the user via askuserquestion for trigger phases.
|
|
60
|
-
|
|
61
|
-
Also check 5 near-miss phrasings — adjacent domains that must not activate. Adjust Triggers tokens only as needed for boundary.
|
|
62
|
-
|
|
63
|
-
### Fix
|
|
64
|
-
|
|
65
|
-
If any check fails, rewrite. Show before/after. The after form must match `description-field.md` good examples.
|
|
66
|
-
|
|
67
|
-
**Output:** Final description string (trigger catalog).
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Step 2: Progressive disclosure, modularity, and deterministic audit
|
|
72
|
-
|
|
73
|
-
**Goal:** Verify within-skill structure, cross-skill modularity, and deterministic placement.
|
|
74
|
-
|
|
75
|
-
1. Apply hard rules in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md`.
|
|
76
|
-
2. Apply modularity rules in `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`.
|
|
77
|
-
3. Apply deterministic-elements rules in `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md`.
|
|
78
|
-
4. Cross-check matching items on `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
|
|
79
|
-
|
|
80
|
-
### Common fixes
|
|
81
|
-
|
|
82
|
-
- SKILL.md too long → move sections to companion files, leave links
|
|
83
|
-
- Nested references → surface all links on SKILL.md
|
|
84
|
-
- Missing TOC → add to files over 100 lines
|
|
85
|
-
- Multi-capability package → split or orchestrator + named sub-skills
|
|
86
|
-
- Silent reimplementation → invoke peer skill by name; add Sub-skills table
|
|
87
|
-
- Mechanical sequence / fenced program / giant detector only in body → extract to `scripts/` or `workflow/`; point from process steps; add paired tests and `*_constants/` as needed
|
|
88
|
-
- Verbatim templates inline → `templates/`; long fixed tables → `reference/`
|
|
89
|
-
- Markdown `- [ ]` progress boards → plain task-seed list + seed instruction (`TaskCreate` / `TodoWrite`)
|
|
90
|
-
|
|
91
|
-
**Output:** Verified structure, composition, and deterministic placement (and edits if needed).
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Step 3: Gotcha freshness
|
|
96
|
-
|
|
97
|
-
**Goal:** Ensure gotchas reflect current observations.
|
|
98
|
-
|
|
99
|
-
> "Ideally, you will update your skill over time to capture these gotchas."
|
|
100
|
-
|
|
101
|
-
- Review the skill's Gotchas section.
|
|
102
|
-
- Check against recent usage: are there new failure modes not yet captured?
|
|
103
|
-
- Remove gotchas for issues that no longer occur (the skill fixed them).
|
|
104
|
-
- Verify each gotcha is actionable — a reader should know what to avoid and why.
|
|
105
|
-
- Verify they are relevant by going over them 1 by 1 with the user via AskUserQuestion.
|
|
106
|
-
|
|
107
|
-
**Output:** Updated gotchas section (and any new gotchas for skill-builder itself).
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Step 4: Full self-audit
|
|
112
|
-
|
|
113
|
-
**Goal:** Complete checklist pass including description, modularity, and deterministic items.
|
|
114
|
-
|
|
115
|
-
Same as new-skill Step 5 and improve-skill Step 5:
|
|
116
|
-
|
|
117
|
-
1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
|
|
118
|
-
2. Register every bullet as a session task; complete with evidence. Fix failures. Re-complete.
|
|
119
|
-
3. All items must be PASS or N/A.
|
|
120
|
-
4. Description items, modularity items, and process-step classification are never N/A for a delivered skill (sub-skills table alone may be N/A for pure leaf skills; script/test rows are N/A only when the package has zero code files and every step is judgment).
|
|
121
|
-
|
|
122
|
-
**Output:** Audit summary; all PASS or N/A.
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Step 5: Deliver
|
|
127
|
-
|
|
128
|
-
**Goal:** Final summary of the polished skill.
|
|
129
|
-
|
|
130
|
-
Present to the user:
|
|
131
|
-
|
|
132
|
-
1. **Description** — final trigger-catalog string (paste it).
|
|
133
|
-
2. **Composition** — sub-skills or leaf status.
|
|
134
|
-
3. **Deterministic inventory** — any extracts to scripts/templates/reference.
|
|
135
|
-
4. **File structure** — folder map with line counts.
|
|
136
|
-
5. **Gotchas** — current gotcha count and most recent additions.
|
|
137
|
-
6. **Audit summary** — "All checklist items: N passed, M N/A."
|
|
138
|
-
7. **Before/after** — description rewrite and structural changes if any.
|
|
139
|
-
8. **Maintenance notes** — what to watch for, when to re-audit.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "source-command-sr-loop"
|
|
3
|
-
description: "Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# source-command-sr-loop
|
|
7
|
-
|
|
8
|
-
Use this skill when the user asks to run the migrated source command `sr-loop`.
|
|
9
|
-
|
|
10
|
-
## Command Template
|
|
11
|
-
|
|
12
|
-
Run the converging cleanup loop on the target the user names (a PR URL,
|
|
13
|
-
a branch, or blank for the current branch's diff). Each phase invokes an
|
|
14
|
-
existing skill and repeats it until a pass returns zero new findings.
|
|
15
|
-
|
|
16
|
-
### Nit-only terminal
|
|
17
|
-
|
|
18
|
-
When a pass finds only nits, apply them, run scoped checks, commit, and push.
|
|
19
|
-
Treat that phase as clean. Do not run another simplify or review pass without
|
|
20
|
-
the user's request. If later work creates an uncommitted out-of-scope diff,
|
|
21
|
-
stop and report it. Do not inspect, repair, commit, or adopt that diff without
|
|
22
|
-
new user instruction.
|
|
23
|
-
|
|
24
|
-
### Effort
|
|
25
|
-
|
|
26
|
-
Set every model call to `max` effort. If that model has no `max` effort, use
|
|
27
|
-
`xhigh`.
|
|
28
|
-
|
|
29
|
-
### Stack context
|
|
30
|
-
|
|
31
|
-
Before any fixes, load and review the full PR stack, from its base through the
|
|
32
|
-
target PR. Read every PR and diff in the stack. Use that full context to judge
|
|
33
|
-
each proposed simplify or code-review fix. Apply a fix only when it fits the
|
|
34
|
-
stack's design, intent, and changes.
|
|
35
|
-
|
|
36
|
-
### Phase A — loop simplify
|
|
37
|
-
|
|
38
|
-
1. Invoke the `simplify` skill (or its local equivalent, e.g. `e-simplify`)
|
|
39
|
-
on the target. Let it run its 4-lens review fan-out (reuse,
|
|
40
|
-
simplification, efficiency, altitude) and apply its fixes.
|
|
41
|
-
2. After each pass: run the scoped test suite (test files beside the touched
|
|
42
|
-
code, not the full repo suite), commit once (commit body via
|
|
43
|
-
`git commit -F <file>`, 10-minute timeout — the pre-commit gate runs its
|
|
44
|
-
own tests), and push to the PR head branch. The PR stays draft.
|
|
45
|
-
3. Repeat the invocation only after substantive findings or a user request.
|
|
46
|
-
Skips are sticky: carry every adjudicated skip
|
|
47
|
-
forward into the next pass as "already adjudicated — do not re-report: ..."
|
|
48
|
-
context, or the loop never converges.
|
|
49
|
-
4. Phase A converges when a full pass returns zero new findings. When the
|
|
50
|
-
previous pass changed only a line or two, a single combined-lens
|
|
51
|
-
confirmation agent may serve as the final pass.
|
|
52
|
-
|
|
53
|
-
### Phase B — loop code-review with fixes
|
|
54
|
-
|
|
55
|
-
1. Run the real code-review command through a headless subprocess in the
|
|
56
|
-
target worktree: `claude -p "/code-review low --fix" --max-turns 40` with a
|
|
57
|
-
10-minute timeout, reading its final text for findings and applied fixes.
|
|
58
|
-
(The skill's `disable-model-invocation` flag blocks only programmatic tool
|
|
59
|
-
starts; a `-p` prompt arrives as user input and loads normally.) Fallback
|
|
60
|
-
when the headless run fails: invoke the `e-code-review` skill with
|
|
61
|
-
`low --fix` — same review-and-fix contract, no invocation restriction.
|
|
62
|
-
2. After any pass that changed files: test, commit, push as in Phase A.
|
|
63
|
-
3. Repeat until a pass reports zero findings. A nit-only pass ends this phase
|
|
64
|
-
after its fixes are pushed.
|
|
65
|
-
|
|
66
|
-
### Finish
|
|
67
|
-
|
|
68
|
-
When both phases are clean, or only fixed nits remain, mark the target PR ready
|
|
69
|
-
with `gh pr ready`. Confirm that it is no longer a draft.
|
|
70
|
-
|
|
71
|
-
Report: passes run per phase, commits pushed with hashes, fixes applied, and
|
|
72
|
-
the standing skip list with reasons.
|
|
73
|
-
|
|
74
|
-
### Constraints (observed under headless runs)
|
|
75
|
-
|
|
76
|
-
- Run this loop in the main conversation. A wrapper subagent cannot see the
|
|
77
|
-
review skills, and a nested agent's own subagent reports route to the main
|
|
78
|
-
conversation instead of back to it.
|
|
79
|
-
- Scope test runs to the touched files; a full-suite run can outlive one
|
|
80
|
-
foreground tool call.
|
|
81
|
-
- A hung or newly slow test suite is a finding to investigate, not an
|
|
82
|
-
inconvenience.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@../AGENTS.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: update
|
|
3
|
-
description: >-
|
|
4
|
-
Fast-forwards a local repository's main branch to a remote's main after
|
|
5
|
-
confirming the repo path and source remote through AskUserQuestion. Use when
|
|
6
|
-
the user says '/update', 'update main', 'fast-forward main', 'sync main from
|
|
7
|
-
origin', 'pull latest main into <path>', or 'bring main up to date'.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# update
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
|
|
14
|
-
Fast-forwards the local `main` branch of a given repository to a chosen remote's `main`. The move is always a true fast-forward: the skill fetches the remote, checks that local `main` is an ancestor of the remote's `main`, and advances the ref. It never forces, never creates a merge commit, and never rewrites any branch other than `main`. When `main` is not the checked-out branch, a final confirmed step offers to switch the checkout to `main` so the new commits reach the files on disk — the only branch switch the skill makes, and only after the operator approves it.
|
|
15
|
-
|
|
16
|
-
The repository is whatever path the user gives as the `/update <path>` argument. With no argument, the default is the current repository's top level. Either way the path is confirmed before any write.
|
|
17
|
-
|
|
18
|
-
**Announce at start:** "Confirming the repo path and source remote, then fast-forwarding main."
|
|
19
|
-
|
|
20
|
-
## When this applies
|
|
21
|
-
|
|
22
|
-
Trigger on a request to bring a repo's `main` up to date from a remote: "/update", "update main", "fast-forward main", "sync main from origin", "pull latest main into <path>".
|
|
23
|
-
|
|
24
|
-
**Refusals — first match wins; respond with the quoted line exactly and stop:**
|
|
25
|
-
|
|
26
|
-
- Path is not a git repository → `<path> is not a git repository. Give me the path to a git working tree.`
|
|
27
|
-
- The chosen remote has no `main` → `<remote> has no main branch. Pick a remote whose main you want.`
|
|
28
|
-
- Local `main` has diverged from the remote's `main` (not a fast-forward) → `main has diverged from <remote>/main (ahead N, behind M). A fast-forward is not possible — use /rebase or reconcile manually.`
|
|
29
|
-
|
|
30
|
-
## Instructions
|
|
31
|
-
|
|
32
|
-
### Phase 1 — Resolve the local path
|
|
33
|
-
|
|
34
|
-
Take the path from the `/update <path>` argument. With no argument, use the current repo's top level:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
git -C "<path>" rev-parse --show-toplevel
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Confirm the path is a git working tree (`git -C "<path>" rev-parse --git-dir`). If not, give the first refusal line.
|
|
41
|
-
|
|
42
|
-
### Phase 2 — Confirm the path and the source remote
|
|
43
|
-
|
|
44
|
-
List the candidate repo's remotes and their URLs:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
git -C "<path>" remote -v
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Confirm both in **one** `AskUserQuestion` question — header "Target". Each choice pairs the resolved path with one remote, labelled `<path> ← <remote>/main` and described with that remote's fetch URL. Picking a choice confirms the path and the remote together.
|
|
51
|
-
|
|
52
|
-
Recommend `<path> ← origin/main` first; the source-of-truth remote is not always the one named `origin`. The user picks "Other" to name a different path or remote. If they switch to a different repository, re-list its remotes and ask once more — remote names are per-repo.
|
|
53
|
-
|
|
54
|
-
### Phase 3 — Fetch and fast-forward
|
|
55
|
-
|
|
56
|
-
Run every command with `git -C "<path>"`. Do not `cd` into the repo.
|
|
57
|
-
|
|
58
|
-
1. Fetch the chosen remote's `main`, which moves the remote-tracking ref:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
git -C "<path>" fetch <remote> main
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Stop and report on failure (no network, no remote). If the remote has no `main`, give the second refusal line.
|
|
65
|
-
|
|
66
|
-
2. Read the current branch and the two commits:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
git -C "<path>" branch --show-current
|
|
70
|
-
git -C "<path>" rev-parse <remote>/main
|
|
71
|
-
git -C "<path>" rev-parse --verify main # may not exist yet
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
3. Decide the case:
|
|
75
|
-
|
|
76
|
-
| Case | Condition | Action |
|
|
77
|
-
|---|---|---|
|
|
78
|
-
| Create | local `main` does not exist | `git -C "<path>" branch main <remote>/main` |
|
|
79
|
-
| Up to date | local `main` == `<remote>/main` | report, done |
|
|
80
|
-
| Diverged | `merge-base --is-ancestor main <remote>/main` is false | third refusal line, stop |
|
|
81
|
-
| Fast-forward, on main | current branch is `main` | clean check, then `merge --ff-only` |
|
|
82
|
-
| Fast-forward, off main | current branch is not `main` | `fetch <remote> main:main` |
|
|
83
|
-
|
|
84
|
-
The fast-forward gate:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
git -C "<path>" merge-base --is-ancestor main <remote>/main
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Exit 0 means a fast-forward is possible. Non-zero means diverged — refuse, never force.
|
|
91
|
-
|
|
92
|
-
4. Apply the fast-forward for the matched case:
|
|
93
|
-
|
|
94
|
-
- **On `main`:** the working tree must be clean first — `git -C "<path>" status --porcelain` must be empty. If dirty, stop and report; never stash or discard. Then:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
git -C "<path>" merge --ff-only <remote>/main
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
- **Off `main`:** advance the ref without touching the working tree:
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
git -C "<path>" fetch <remote> main:main
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
This is fast-forward-only (no leading `+`) and leaves the checked-out branch alone.
|
|
107
|
-
|
|
108
|
-
### Phase 4 — Report
|
|
109
|
-
|
|
110
|
-
State the old and new `main` SHAs and the one-line subject of the new tip:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
git -C "<path>" log --oneline -1 main
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Report the move as `main <old> → <new>`, or "already up to date" when nothing changed.
|
|
117
|
-
|
|
118
|
-
Then report what the checkout runs — a move of the `main` ref says nothing about the files on disk:
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
git -C "<path>" branch --show-current
|
|
122
|
-
git -C "<path>" status --short
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
- **Checked-out branch.** When a branch other than `main` is checked out, say so plainly: the fast-forward moves a ref only and no file on disk changes. Code that runs from this checkout comes from the checked-out branch, not from `main`.
|
|
126
|
-
- **Dirty tracked files.** List every modified tracked file from `status --short`. Uncommitted edits sit on top of the checked-out branch and are what runs — flag them, because a ref update can neither see nor repair them. When the tree is clean, report "working tree clean".
|
|
127
|
-
|
|
128
|
-
### Phase 5 — Offer to land `main` on disk
|
|
129
|
-
|
|
130
|
-
A fast-forward of the `main` ref leaves the files on disk untouched when another branch is checked out. The new commits exist in the repo but not in the working tree — the gap Phase 4 reports. This phase offers to close it.
|
|
131
|
-
|
|
132
|
-
Skip this phase and finish when the checked-out branch is already `main`: the new commits are already on disk.
|
|
133
|
-
|
|
134
|
-
Otherwise, when the checked-out branch is not `main`, run two safety checks before offering a switch:
|
|
135
|
-
|
|
136
|
-
1. **Tree clean of tracked changes.** Read `git -C "<path>" status --porcelain` and treat any line that does not start with `??` as a change to a tracked file. If any exist, do not offer the switch: report that `main` moved in the ref only, that switching would risk the uncommitted work, and stop. Never stash, reset, or discard. Untracked files (lines starting with `??`) are fine — they carry across a switch.
|
|
137
|
-
2. **`main` free to check out.** Read `git -C "<path>" worktree list`. If another worktree holds `main`, an in-place switch is impossible; report that path and stop.
|
|
138
|
-
|
|
139
|
-
When both checks pass, ask **one** `AskUserQuestion` — header "Get on disk":
|
|
140
|
-
|
|
141
|
-
- Recommended first choice, "Switch checkout to main": `git -C "<path>" checkout main` puts the new commits on disk. The branch you were on keeps its commits and is left unchanged.
|
|
142
|
-
- Second choice, "Stay on `<branch>`": leave the checkout where it is. The update stays in the `main` ref only and reaches disk later.
|
|
143
|
-
|
|
144
|
-
On "Switch", run:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
git -C "<path>" checkout main
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
If `checkout` reports it would overwrite untracked files, stop and report those paths — never pass `-f`, which would drop the operator's untracked file. On success, confirm the branch and the tip now on disk:
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
git -C "<path>" branch --show-current
|
|
154
|
-
git -C "<path>" log --oneline -1
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
On "Stay", report that `main` is current in the ref and the new content reaches disk only after a later switch.
|
|
158
|
-
|
|
159
|
-
## Constraints (non-negotiable)
|
|
160
|
-
|
|
161
|
-
- **Fast-forward only.** If the remote's `main` is not a descendant of local `main`, stop. Never `--force`, never `branch -f`, never a merge commit. Divergence is a job for `/rebase`.
|
|
162
|
-
- **Always confirm both** the path and the source remote first, even when the path is given as an argument. Skipping a confirmation is not allowed — the confirmation is the point of this skill.
|
|
163
|
-
- **Switch the checkout only with approval.** The fast-forward itself touches the `main` ref alone. Switching the checked-out branch to `main` happens only in Phase 5, only after the operator approves the `AskUserQuestion`, only with a tree clean of tracked changes, and never with `-f`. The skill never switches to any branch but `main`.
|
|
164
|
-
- **Never discard local work.** A dirty tree blocks the in-place fast-forward; stop and report rather than stash or reset.
|
|
165
|
-
|
|
166
|
-
## Gotchas
|
|
167
|
-
|
|
168
|
-
- `git fetch <remote> main:main` refuses with "Refusing to fetch into branch ... checked out" when `main` is the current branch. That is why Phase 3 branches on `git branch --show-current` and uses `merge --ff-only` when on `main`.
|
|
169
|
-
- The same refusal fires when `main` is checked out in a **different worktree** of the same repo. Find it with `git -C "<path>" worktree list`, then run the fast-forward from that worktree's path, or report it and stop.
|
|
170
|
-
- `<remote>/main` only moves after an explicit `git fetch`. Fetch inside every run; never compare against a remote-tracking ref left over from an earlier fetch.
|
|
171
|
-
- `origin` is not always the source of truth. When a fork is `origin` and the canonical repo is another remote (often `upstream`), the confirmed remote should be the canonical one, not whichever is named `origin`.
|
|
172
|
-
- Quote the path on every command — `git -C "<path>"` — so paths with spaces or a NAS drive letter survive.
|
|
173
|
-
- "Up to date" describes the `main` ref, not the running code. A checkout deployed on a feature branch, or carrying uncommitted edits, runs that branch plus those edits regardless of where `main` points. Phase 4's checkout-state report exists so the operator sees that gap on every run, and Phase 5 offers to close it.
|
|
174
|
-
- `git checkout main` carries untracked files across unchanged, but refuses with "untracked working tree files would be overwritten" when an untracked file sits at a path `main` tracks. Phase 5 reports those paths and stops rather than passing `-f`, which would drop the operator's untracked file.
|
|
175
|
-
|
|
176
|
-
## What this skill does NOT do
|
|
177
|
-
|
|
178
|
-
- Does not push, open a PR, or change any branch other than `main`.
|
|
179
|
-
- Does not create feature branches, and switches only to `main` (Phase 5, with approval) — creating or switching to any other branch is `/fresh-branch`.
|
|
180
|
-
- Does not reconcile a diverged `main` — that is `/rebase`.
|
|
181
|
-
|
|
182
|
-
## File index
|
|
183
|
-
|
|
184
|
-
| File | Purpose |
|
|
185
|
-
|------|---------|
|
|
186
|
-
| `SKILL.md` | This hub — the complete skill. |
|
|
187
|
-
|
|
188
|
-
## Folder map
|
|
189
|
-
|
|
190
|
-
- `SKILL.md` — the whole skill. Flat by design: the operation is a short, deterministic git sequence with no scripts or reference files to load.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@AGENTS.md
|