Repository navigation
Description
Problem
Children 01 to 13, 21 and 25 add agentrepo merge beside the shell scripts and leave those scripts as the parity oracle. This child makes the Go commands the implementation for the first four merge-pr scripts, lint-squash-msg.sh, populate-description.sh, squash-message.sh and review.sh, and for their unattended agent-merge-pr counterparts (lint-squash-msg.sh, squash-message.sh and review.sh), which today re-run the merge-pr scripts under DEVTOOLS_UNATTENDED. The scripts become short wrappers that run the matching agentrepo merge subcommand. The frozen behavior stays reachable as the fallback for the N-2 window with no new logic; child 20 makes it unreachable and children 22 and 23 delete the non-owner shell after the window. Consumers that still run the fallback must be warned for at least two releases (docs/compatibility.md) before it goes. preflight.sh is child 27 and squash-merge.sh with merge.sh is child 26.
These four scripts hold 351 code lines in packages/agents/source/skills/merge-pr/shared/scripts/ (25, 62, 156 and 108). No file on the owner-tier or constitutional lists of .agents/agent-skills.conf is edited, moved or deleted here: merge-agent.sh, merge-policy.py and lib.sh stay as they are until the single cutover under #588.
Part of #324, within #588. Child 14 in #324's Children list. Replaces the logic in the four script bodies named above and their agent-merge-pr counterparts.
Acceptance criteria
- AC1: Given a deployed
merge-prskill, whenlint-squash-msg.sh,populate-description.sh,squash-message.shorreview.shruns, then it runs the matchingagentrepo mergesubcommand with the same arguments and returns its exit status and streams, with no logic of its own. - AC2: Given the installed
agentrepolacks themergesubcommand, when one of these wrappers runs, then the frozen behavior of that script runs with no new logic added to it, a deprecation warning names the release in which the fallback ends, and a consumer configuration that release N-2 accepted is still accepted. - AC3: Given the
agent-merge-prcounterparts of the lint, squash-message and review scripts, when they run, then each runs the matchingagentrepo mergesubcommand in unattended mode and preserves the unattended behavior of the shell entry points. - AC4: Given
DEVTOOLS_UNATTENDEDor the deprecatedDT_UNATTENDEDset, when a wrapper runs, then the Go command honors them withDEVTOOLS_UNATTENDEDtaking precedence. - AC5: Given the protection of build(agents): protect replacement Go enforcement paths #753 merged, when the new Go merge and policy files exist, then the protected-path scan flags a change to each of them as that issue defines, and this change adds no pattern work of its own.
- AC6: Given the complete regeneration sequence of
mise.toml(regen-generated:generate-skills,skill-tokens,apm install, followed bycheck-generated-skills), when it runs, then both harness packages and both deployments contain the wrappers,tokens.jsonis re-measured, the deployments andapm.lock.yamlare current, and the check is clean afterwards. - AC7: Given the
guard-merge.shhook, when the skills are regenerated, then it still blocks mutatinggh prcalls and is otherwise unchanged. - AC8: Given parity fixtures recorded from the frozen scripts before their bodies change, when the wrappers run against the Go commands, then exit codes, stdout and stderr shape, files written and refusals match.
- AC9: Given the release that first ships a wrapper, when it is published, then its notes carry the consumer deprecation warning for the fallback, and the release that is the earliest end of the two-release window is recorded in the pull request.
- AC10: Non-functional: the binary is available before the skill deployment requires it (Ship the Go binaries as release assets installed through mise's github backend #333), CI passes on macOS, Linux and Windows, and the pull request stays within the size limits, with only generated output under
packages/agents/claude/.apm/skills/,packages/agents/codex/.apm/skills/,.claude/skills/,.agents/skills/andtokens.jsonexcluded from the count. - AC11: Non-functional: no path matched by
constitutional_pathsorowner_pathsin.agents/agent-skills.confis changed, so the protected-path scan reports none.
Scope and non-goals
Scope: the four merge-pr wrappers and three agent-merge-pr counterparts named above, the frozen fallback of the four scripts, the deprecation warning and the parity record.
Non-goal: porting guard-merge.sh (a later item in the #588 hooks phase). Non-goal: protection patterns, which #753 owns. Non-goal: preflight.sh (child 27) and squash-merge.sh with merge.sh (child 26). Non-goal: deleting Bats suites (children 15 to 19) or any frozen shell (children 20, 22 and 23, and the cutover). Non-goal: new fallback logic.
Approach
Meet AC1 to AC11 in this order: record parity against the frozen scripts, replace the entry points, regenerate. Where the fallback behavior is kept is the implementer's choice, within AC2 and AC11.
Dependencies
Blocked by: #859, #860, #861, #862, #864, #865, #866, #867, #868, #869, #871, #872, #873, #863, #870, #333, #753, #1010.
Prerequisites: #333 (binary distribution), #1010 (refusal of a missing or below-floor pinned agentrepo, which precedes the frozen fallback), #753 merged (its protection coverage is verified here, not redone), and the merge behavior contracts of #321.
Size
M. One pull request. Measured on origin/main with a physical-line code count (non-blank, non-comment lines, the metric of tools/script_lines.py): the four bodies are 351 code lines; counting them twice (once moved or removed, once added) gives 702, plus about 25 lines of wrappers, tests and documentation, under 800. Only generated output on the paths named in AC10 is excluded; the source copy always counts.
Verify plan
- AC1, AC3, AC4, AC8: wrapper tests with a stub
agentreporecording arguments, environment and exit status, plus the recorded parity run. - AC2: a Bats case with a binary stub lacking the subcommand, asserting the warning text and the unchanged fallback behavior.
- AC5: the protected-path scan run on a change to each new path, citing the build(agents): protect replacement Go enforcement paths #753 coverage.
- AC6:
mise run regen-generatedfollowed bymise run check-generated-skills, with the tokens, deployments and lock diff cited. - AC7: the existing guard cases.
- AC9: the release notes text and the recorded window.
- AC10: the CI matrix run and the counted line total, listing the excluded paths.
- AC11: the protected-path scan output on the pull request's file list.
- Definition of done: D1 each AC is verified at the merged head, with the commands and results cited in the pull request's Verification. D2 an independent review approves the exact merged head, and every finding has a recorded disposition. D3 required checks pass with no gate loosened. D4 the leak scans the repository specifies are clean, and every post made for this work passes the per-post leak review before it is posted. D5 every commit is signed. D6 the documentation matches the change or the Verification says why there is no impact. D7 every commit has an
Assisted-bytrailer and the pull request has theprovenance:agent-assistedlabel. D8 the pull request stays within the size limits. D9 follow-ups are filed as issues and listed under Related. D10 the merge closes the issue through a closing reference, the board shows Done, and the finalStatus:comment names the merge commit.
Risks
This switches part of the merge path to Go for every consumer. The recorded parity run, the N-2 fallback and the exact-head review are the controls. Undo: revert; the previous shell bodies return and the Go commands stay unused.
Operator authority
None. AC11 holds that no owner-tier or constitutional path is touched.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Work type
Projects
- StatusShow more project fieldsBacklog
Activity
tbhb-agent commentedon Oct 27, 2026
Refinement: READY — The lint, populate-description, squash-message and review scripts become wrappers over agentrepo merge
Model: gpt-6-astra
Child 14 The lint, populate-description, squash-message and review scripts become wrappers over agentrepo merge
Verdict: READY
Checked: The split into children 14, 26 and 27 resolves the former oversized cutover. Child 14’s four maintained bodies total 351 code lines under
tools/script_lines.py:19; its budget counts their preservation conservatively and uses only the authorized generated-output exclusions.The complete regeneration sequence now matches
mise.toml:469. Fallback placement is no longer prescribed, protected helpers remain untouched, and AC11 verifies that boundary against.agents/agent-skills.conf:5and.agents/agent-skills.conf:9. #753 owns protection changes. Warning and N-2 requirements matchdocs/compatibility.md:3anddocs/compatibility.md:5.Gaps: None.
Split: The existing three-child wrapper split is sufficient.
Definition of done
The definition of done for this issue (Feature). Tick each item and give its evidence.
check-leaks.shwith the repository's private-strings list, and the leak review of each post.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why.provenance:agent-assistedlabel.Status:comment names the merge commit.mise run checkis green, and so are the coverage floorsmise run cover-go-checkandmise run cover-py-check, whichcheckdoesn't run.packages/agents/source/commits whatmise run generate-skills, thenmise run skill-tokens, thenapm installrewrite, in that order, andcheck-generated-skills(part oflint) passes.docs/agent-skills-migration.mdor the adoption docs, or the PR's Verification says "No consumer impact" and why.Round: 3 of 3
1 remaining item