Repository navigation
Description
Problem
packages/agents/source/lib/agent.sh and packages/agents/source/lib/signing.sh, with their generated copies, stay in the tree after #321 ports the shared skill library to Go. Epic #321 lists this deletion as the second of two cutover issues under #588, and no issue tracks it. agent.sh is an owner and golden path and signing.sh is a constitutional path (.agents/agent-skills.conf), so the deletion needs the owner's exact-head approval at merge.
Acceptance criteria
- AC1: Given the prerequisite set under Dependencies, when the pull request is opened, then each prerequisite has a merged deliverable (or a named superseding one), the warning deliverable declared
Compatibility: deprecates agent.sh since <version>(and the same forsigning.sh), and the pull request lists a release ledger of the warning-start release, two published releases whose notes carry that warning text, the eligible removal release and the linked merge evidence; both source files are then deleted. - AC2: Every generated copy of either file under the claude and codex packages and the deployed
.claude/skillsand.agents/skillstrees is deleted, thetokens.jsonentries andapm.lock.yamlentries for them are gone, and runningmise run generate-skills,mise run skill-tokensandapm installin that order, thenmise run generate-skillsandmise run check-generated-skillsagain, leaves noagent.shorsigning.shfile or entry and no diff. - AC3: No remaining script, skill manifest, task, workflow, generator or test sources or invokes either file as an executable dependency: the generators' copy lists (
internal/skills/generate.go,tools/generate-skills.sh) and their tests drop both names through tested Go and deletion or thin-exec changes to shell only, and a boundary-anchoredgit grepshows only the allowed exceptions listed under Verify plan. - AC4: Given a case-level retirement ledger in the pull request, every existing test case that exercises
agent.shorsigning.shis either deleted with a named Go test that covers it, or retained because it covers other behavior; no suite is deleted wholesale, and unrelated coverage stays. - AC5: Non-functional:
mise run check,mise run lint,mise run test,mise run cover-go-checkandmise run cover-py-checkpass at the head, and no gate is loosened. - AC6: Non-functional: the pull request declares its consumer impact under Risk with a validator-compatible
Compatibility:line, and records the removal release and the AC1 ledger separately in Verification. - AC7: Non-functional: the pull request's Verification cites each AC ID with evidence on the exact head, the leak scans (gitleaks,
check-leaks.shwith the private-strings list, and the leak review of each post) are clean, each commit and the squash are signed withAssisted-bytrailers and theprovenance:agent-assistedlabel,docs/agent-skills-migration.mdcarries the consumer steps (or Verification says "No consumer impact" and why), an independent reviewer approved the exact head with each finding resolved or filed, the owner approved the exact head, each follow-up is an issue with a Problem and numbered ACs listed under Related and any deferred work left in code links its issue, and after the merge the issue closes through a closing reference, the board shows Done and a finalStatus:comment names the merge commit. - AC8: Non-functional: the non-generated code delta stays under 800 lines, measured on the head and recorded in Verification; no new behavior or shell logic is added, and a behavior gap found here returns to its port owner as a follow-up.
Scope and non-goals
In scope: deleting agent.sh, signing.sh, their generated copies, token and lock entries, the generators' copy-list entries, references, and the test cases AC4 retires. Non-goals: porting behavior (the #321 children, #850 and #856 own that), deleting lib.sh (#997), shortening any N-2 window, and editing the owner, golden and constitutional patterns in .agents/agent-skills.conf, which stay as they are so no gate is loosened.
Approach
Delete after the last prerequisite merges and the window closes. Remove both names from the generator copy lists, delete the source and the copies, then run mise run generate-skills, mise run skill-tokens and apm install in that order and commit what they rewrite. Run the generation and check a second time to prove it is stable. Resolve the remaining references: tests/tools/generate-skills.bats, internal/skills/generate_internal_test.go, the cp line in tests/skills/source/lib/masked-status.bats that copies both helpers for an unrelated case, and the agent.sh loop in tests/skills/agent-merge-pr/policy.bats. The history sentence in docs/agent-skills-migration.md may name the files.
Test retirement: tests/skills/source/lib/ holds lib.bats, gates.bats and masked-status.bats, and no separate suite for either file. Signing cases live in tests/skills/agent-commit/workflow.bats ("preflight refuses missing signing and missing hooks", "signing failure holds without an unsigned fallback"); each is kept or replaced by a named Go test per AC4.
Dependencies
Blocked by (native links on this issue; each is a prerequisite and needs a merged deliverable, not only a closed issue):
- refactor(agents): port skill capability and worktree context discovery to Go #755, refactor(agents): port skill signing verification to Go #764, refactor(agents): port review snapshots and stamps to Go #769, refactor(agents): port unattended review bounds and reporting to Go #770, The owner-review label default is resolved in Go #930 and The signing key, required hooks and sign-off identity are resolved in Go #931, the Port the shared skill library (lib.sh, agent.sh, signing.sh, gates.py) to Go #321 ports of the
agent.shandsigning.shfunctions. - Read commit workflow state in Go instead of shell #850, which ports
dt_commit_contextanddt_commit_merge_head, and Turn the commit skill scripts into wrappers over agentrepo commit #856, which switches the commit wrappers to the Go subcommand so no caller still sourcesagent.sh. - The generator copies the shared libraries from an explicit list #926, the generator copy list, or the Go deliverable that supersedes it.
- chore(agents): delete lib.sh after the Go port; cutover 1 under #588 #997, so the unconditional
. "$DT_LIB_DIR/agent.sh"and. "$DT_LIB_DIR/signing.sh"lines inlib.sh(lines 935 and 937) leave withlib.sh; if the order changes, this change removes those two lines instead. - The warning-clock owner is Turn the commit skill scripts into wrappers over agentrepo commit #856, because it switches the callers to
agentrepo commitand freezes the shell as a fallback; Read commit workflow state in Go instead of shell #850 only adds the Go port with no caller switched. Prerequisite: Turn the commit skill scripts into wrappers over agentrepo commit #856 carries the AC that declaresCompatibility: deprecates agent.sh since <version>and the signing.sh equivalent plus the release warning text. - The end of the N-2 warning window for both files (AC1).
Part of #588.
Size
S. A deletion of two source files, their generated copies and token, lock and copy-list entries, plus the case-level test retirement. The 800-line bound is measured in AC8.
Verify plan
- AC1: read the blocked-by list through GraphQL and assert every Dependencies entry is closed, and for each open the merged pull request (or named superseding deliverable) that delivers it;
git tag --contains <deprecation merge commit>lists at least two published releases before the removal release, and each of those releases' notes (gh release viewor the changelog entry) contains the deprecation warning text; the ledger in the pull request links each merge, tag and warning, and keeps theCompatibility:declaration separate from the removal-release row. - AC2: after
git ls-files | grep -E '(^|/)(agent|signing)\.sh$'prints nothing, runmise run generate-skills,mise run skill-tokensandapm installin order, inspect both packages and both deployments, repeatmise run generate-skillsandmise run check-generated-skills, and assertgit status --porcelainis empty and noagent.shorsigning.shreappears or appears intokens.jsonorapm.lock.yaml. - AC3:
git grep -nE '(^|[^A-Za-z0-9_-])(agent|signing)\.sh([^A-Za-z0-9_-]|$)'prints nothing except the allowed exceptions: history sentences indocs/agent-skills-migration.md, absence-test literals, and the unchanged owner, golden and constitutional patterns in.agents/agent-skills.conf; the boundaries excludepr-agent.shandmerge-agent.sh. Each remaining hit is classified in the pull request. - AC4: the ledger names each existing case, its disposition and its replacement Go test; run the replacements before deleting the case.
- AC5: run each listed task and assert exit 0; diff gate configuration for loosening.
- AC6: read the pull request's Risk section and run
mise run lint-pr-description. - AC7: read the Verification section against this list; read the leak scan output,
git log --show-signatureand the labels; read the independent reviewer's approval of the exact head and the disposition of each finding, and the owner's approval of the exact head; open each follow-up issue and assert a Problem and numbered ACs, andgit grepfor deferred-work markers linking an issue; after merge read the merge commit, the closing reference, the board Status (Done) and the finalStatus:comment. - AC8: count non-generated added and removed lines with
git diff --statexcluding generated paths.
Risks
An installed consumer that still sources either file breaks when it disappears, which is why the warning window must close first. A merge ahead of #997 or #856 leaves lib.sh or a commit wrapper sourcing a missing file. Reverting the commit restores both files, their copies and the token and lock entries.
Operator authority
A standing rule names the operator: agent.sh is an owner and golden path and signing.sh is a constitutional path, so the merge needs exact-head approval from the configured merge owner (machine merge_owner). This issue grants no new authority.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Work type
Projects
- StatusShow more project fieldsBacklog
Activity
tbhb-dev-reviews commentedon Oct 31, 2026
Refinement: NOT READY — cutover prerequisites and removal evidence are incomplete
Checked
Gaps
Split
No split required if prerequisite ports and generator work remain in their existing issues. Keep this PR limited to retirement, references, generation metadata and evidence; return newly discovered behavior gaps to the port owners. This is S with authority/compatibility implications, not an XS mechanical exception.
Definition of done
Ticks mean the current ACs and Verify plan cover the obligation, not that implementation has completed. Partial coverage remains unchecked.
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: 1 of 3
tbhb-dev-reviews commentedon Oct 31, 2026
Refinement: NOT READY — release-proof and completion checks still need tightening
Checked
Refinement:, so this is round 2. No tests or full suites were run, including nogo testforinternal/skills.origin/mainat 1263c1f; remote main matches.internal/skills/generate.go:207andtools/generate-skills.sh:114, unconditional sources atpackages/agents/source/lib/lib.sh:935andpackages/agents/source/lib/lib.sh:937, and protection fixtures attests/skills/agent-merge-pr/policy.bats:360andtests/skills/agent-merge-pr/loosens.bats:91. The chore(agents): delete lib.sh after the Go port; cutover 1 under #588 #997 dependency prevents removal while the shared loader remains.Gaps
git tag --contains <merge commit>proves inclusion, not that two published releases actually warned consumers. Link and inspect the warning text in each published release, alongside its tag and eligible removal release.docs/compatibility.md:5requires warnings for at least two releases. The chosen clock owner Turn the commit skill scripts into wrappers over agentrepo commit #856 currently promises frozen fallbacks but has no AC requiring the two helper deprecation declarations or their release warning; align that prerequisite's contract with AC1, or name a separate warning deliverable. Keep the validator-compatible declaration separate from the removal-release ledger (docs/compatibility.md:13,docs/compatibility.md:20).Noneunder Operator authority with the standing rule requiring the owner's exact-head approval at merge, and include checking it in Verify. The following sentence already recognizes the rule; the leadingNonecontradicts it.agent.shis golden/owner andsigning.shis constitutional (.agents/agent-skills.conf:4,.agents/agent-skills.conf:5,.agents/agent-skills.conf:9). This issue grants no new authority.Split
No split required. Keep behavior ports and generator redesign in their existing prerequisites. Limit this PR to retirement, necessary references/tests, regenerated metadata and evidence; return discovered behavior gaps to port owners. This is S, not an XS mechanical exception.
Definition of done
Ticks mean the current ACs and Verify plan cover the obligation, not that implementation is complete. Partial coverage remains unchecked.
check-leaks.shwith the repository's private-strings list, and the leak review of each post. Covered by AC7 and Verify.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. AC7 requires migration steps or a reasoned no-impact declaration.provenance:agent-assistedlabel. Covered by AC7 and Verify.Status:comment names the merge commit. AC7 omits the board check.mise run checkis green, and so are the coverage floorsmise run cover-go-checkandmise run cover-py-check, whichcheckdoesn't run. Covered by AC5 and Verify.packages/agents/source/commits whatmise run generate-skills, thenmise run skill-tokens, thenapm installrewrite, in that order, andcheck-generated-skills(part oflint) passes. Covered by AC2, Approach and Verify.docs/agent-skills-migration.mdor the adoption docs, or the PR's Verification says "No consumer impact" and why. Covered by AC7 and Verify.Round: 2 of 3
tbhb-dev-reviews commentedon Oct 31, 2026
Refinement: READY — retirement contract covers prerequisites, warning releases and completion evidence
Checked
Refinement:, so this is round 3. No tests or full suites were run, including nogo testforinternal/skills. No delegation or session messaging occurred.origin/mainat 1263c1f, matching remote main. Generator emission names both helpers at internal/skills/generate.go:207 and tools/generate-skills.sh:114; loader dependencies remain at packages/agents/source/lib/lib.sh:935 and packages/agents/source/lib/lib.sh:937. AC2/AC3 cover their removal and stable regeneration across packages, deployments, tokens and lock output.Gaps
None blocking in the current specification. Merged prerequisite evidence, the release ledger and exact-head approvals remain mandatory execution gates.
Split
No split required. Keep this PR to retirement, references, case-level test retirement and regenerated metadata. Behavior ports and generator redesign stay with prerequisite owners. This is S with compatibility and authority implications; the XS single-pass exception does not apply.
Definition of done
Ticks mean the current ACs and Verify plan cover the obligation; they do not claim implementation is complete.
check-leaks.shwith the repository's private-strings list, and the leak review of each post. Covered by AC7 and leak-output inspection.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. Covered by AC7 requires migration steps or a reasoned no-impact declaration.provenance:agent-assistedlabel. Covered by AC7 and trailer/label inspection.Status:comment names the merge commit. Covered by AC7 and post-merge closure, board and Status checks.mise run checkis green, and so are the coverage floorsmise run cover-go-checkandmise run cover-py-check, whichcheckdoesn't run. Covered by AC5 and Verify.packages/agents/source/commits whatmise run generate-skills, thenmise run skill-tokens, thenapm installrewrite, in that order, andcheck-generated-skills(part oflint) passes. Covered by AC2 and Verify.docs/agent-skills-migration.mdor the adoption docs, or the PR's Verification says "No consumer impact" and why. Covered by AC7 and Verify.Round: 3 of 3