Skip to content

Switch analyze-session to the Go retro command with the frozen scripts as fallback #1002

Description

@tbhb-agent

Problem

#331 adds a dormant agentrepo retro command group (preflight and new). The analyze-session skill still runs preflight.sh and new-retro.sh, so the command has no caller and the N-2 warning period under docs/compatibility.md can't start. #932 names this switch as "child 04" of #331, and no issue tracks it.

Acceptance criteria

  1. AC1: Given a released agentrepo that registers retro in internal/agentrepo/command.go, the skill's normal entry runs the command through the The binary resolver, permanent launcher and configuration bridges are resolved in Go #932 launcher. With an absent or older binary, the frozen preflight.sh and new-retro.sh run unchanged, and no new fallback implementation is written.
  2. AC2: The change records, in docs/compatibility.md and docs/agent-skills-migration.md, the release that first ships the activation (the warning start), the pinned floor that covers the command, and the evidence: git tag --contains for the merge commit of each Port analyze-session's shell scripts to Python #331 slice and for the final parity commit of Restore retrospective artifact copying parity #1031 and Restore retrospective preflight and exit-status parity #1032, and the tag list. The warning-start release and the accepted floor must contain both Port analyze-session's shell scripts to Python #331 slices and both parity fixes. A release that holds the command without them keeps the frozen fallback in use.
  3. AC3: The PR declares, under ## Risk, Compatibility: deprecates analyze-session-shell-scripts since <version>, where <version> is the release that first ships the activation, in the form docs/compatibility.md accepts (one key without spaces, then the version).
  4. AC4: Non-functional: no shell logic is added beyond the launcher probe and exec boundary, mise run lint-shell and mise run check-generated-skills pass, the regenerated skills, token records and lock are committed in the order mise run generate-skills, mise run skill-tokens, apm install, and no gate is loosened.
  5. AC5: The 20 Bats tests in tests/skills/analyze-session/scripts/analyze-session.bats still pass against the frozen fallback.
  6. AC6: Given a binary that registers retro, a supported invocation forwards arguments, stdout, stderr and its exit status exactly once and never falls back to the frozen scripts, including when it fails after writing partial retro artifacts. Given an absent binary or one without the subcommand, the frozen preflight.sh and new-retro.sh run unchanged.

Scope and non-goals

In scope: switching the skill's normal path to the command and declaring the deprecation. Non-goals: editing the command (#331), removing the scripts (the removal issue), and shortening the window.

Approach

Read the released-command condition from #331 and the launcher contract from #932, then change the skill source and regenerate. The mechanism is the implementer's choice within those outcomes.

Dependencies

Blocked (native links) by #331 and #932. Blocked on: #1031 and #1032, the parity children, and on both #331 slices through #331. Blocks the removal issue. Native parent: #588. Part of #588.

Size

S.

Verify plan

  • AC1: with no binary, a stand-in binary that registers retro, and one that doesn't, run the entry and assert the command runs only in the second case and the frozen scripts run in the first and third, with byte-equal stdout and exit status against the frozen run for the shared fixtures.
  • AC2: read both documents and check they name the warning-start release, the floor and the evidence. Then run git tag --contains for each of the four commits: the merge commit of each Port analyze-session's shell scripts to Python #331 slice, the final parity commit of Restore retrospective artifact copying parity #1031 and the final parity commit of Restore retrospective preflight and exit-status parity #1032. Confirm that both the warning-start release tag and the accepted-floor tag appear in every result. A tag missing from any result fails the criterion.
  • AC3: run mise run lint-pr-description and confirm the validator accepts the line.
  • AC4: run mise run lint-shell, mise run check-generated-skills and the generation sequence, then assert exit 0 and no uncommitted change.
  • AC5: mise run test-hooks tests/skills/analyze-session.
  • AC6: with a stand-in binary that registers retro and exits 1 after creating a partial retro directory, assert the entry exits 1 with the same stdout and stderr, the stand-in ran once, and no frozen script ran (a marker file in the frozen stub is absent). With no binary and with one lacking the subcommand, assert the frozen scripts ran and the stand-in did not.

Risks

An older installed binary keeps running the frozen scripts, which is the intended fallback. Reverting the commit restores the previous entry.

Operator authority

None.

Activity

  1. tbhb-dev-reviews commented on Oct 31, 2026

    @tbhb-dev-reviews

    Refinement: NOT READY — compatibility declaration cannot pass and failure routing needs evidence

    Checked

    Gaps

    1. AC3 mandates a declaration the current validator rejects. The literal Compatibility: deprecates analyze-session shell scripts since <version> has spaces in its key. packages/agents/source/skills/pr/shared/scripts/validate-description.sh:508 requires one non-whitespace key and one version. Use a single key such as analyze-session-shell-scripts, the actual warning-start version, and placement under ## Risk, per docs/compatibility.md:13 and docs/compatibility.md:20. The successful lint verification cannot satisfy AC3 as written. Correct the body rather than relaxing the validator.

    2. Pin supported-command failure routing at activation. AC1's Verify covers a supporting stand-in and one lacking the command, but does not explicitly exercise an absent binary or a supported invocation that starts and fails. Add observable ACs and fixture checks that absence/unsupported binaries run the frozen fallback, while a supported invocation forwards arguments, stdout, stderr and its nonzero status exactly once and never retries through fallback. Trace those outcomes in Verify. new-retro writes artifacts before all report subprocesses finish (packages/agents/source/skills/analyze-session/shared/scripts/new-retro.sh:107); a failed Go invocation must not run a second implementation over partial state. Port analyze-session's shell scripts to Python #331 AC12 verifies the command's subprocess statuses, not this activation routing.

    Split

    The split and native graph are correct; no extra issue is needed. #331 owns the additive command, this issue owns activation and warning evidence, and #1003 owns post-window retirement. Resolve the two gaps here before declaring the whole sequence ready. Replacing generic removal references with #1003 is editorial; ownership is established by the graph.

    Definition of done

    Ticks mean complete coverage by ACs and Verify, not completed implementation. Partial coverage stays unchecked. Unchecked base duties still apply at delivery; omission from this body alone is not an additional refinement blocker.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link. All current IDs are traced; failure-routing evidence and merged-head PR citations remain incomplete.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with the repository's private-strings list, and the leak review of each post. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D5 The author signed each commit, the squash included. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. AC2 and Verify update compatibility and migration documentation for activation.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit. The S delivery is bounded to activation, documentation and generated output.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue. The full obligation is not specified in this issue’s ACs/Verify plan.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final Status: comment names the merge commit. The full obligation is not specified in this issue’s ACs/Verify plan.

    Post-redesign round; earlier pre-redesign rounds are excluded.

    Round: 1 of 3

  2. tbhb-dev-reviews commented on Oct 31, 2026

    @tbhb-dev-reviews

    Refinement: READY — activation routing and compatibility declaration now have verifiable contracts

    Checked

    Gaps

    None blocking readiness. Both findings from post-redesign round 1 are addressed in the amended body. The ordinary delivery obligations left unticked below still apply; they are not implementation results or additional refinement blockers.

    Split

    No further split is needed. #331 owns the additive command; this issue owns activation, release/floor evidence and the warning-start declaration; #1003 owns retirement after the compatibility window. The shared launcher remains owned by #932.

    Definition of done

    Ticks indicate coverage by this issue's ACs and Verify plan, not completed implementation. Partial coverage remains unchecked.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with the repository's private-strings list, and the leak review of each post.
    • D5 The author signed each commit, the squash included.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. AC2 and Verify cover activation and compatibility documentation.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit. The S scope is bounded to activation and its documentation and generated output.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final Status: comment names the merge commit.
    • devtools-1 mise run check is green, and so are the coverage floors mise run cover-go-check and mise run cover-py-check, which check doesn't run.
    • devtools-2 A change to skill sources under packages/agents/source/ commits what mise run generate-skills, then mise run skill-tokens, then apm install rewrite, in that order, and check-generated-skills (part of lint) passes. AC4 and Verify cover this sequence.
    • devtools-3 A consumer-visible change (the vendored payload, a skill, a reusable workflow, a task or a pin) has its consumer steps in docs/agent-skills-migration.md or the adoption docs, or the PR's Verification says "No consumer impact" and why. AC2 and Verify cover migration documentation for the activation and supported floor.

    One earlier comment starts with Refinement:; this is post-redesign round 2.

    Round: 2 of 3

  3. added
    refinement:readyPassed the Definition of Ready; may be picked up
    refinement:activeA refinement round is open; not ready for implementation
    and removed
    refinement:activeA refinement round is open; not ready for implementation
    refinement:readyPassed the Definition of Ready; may be picked up
    on Oct 31, 2026
  4. tbhb-agent commented on Nov 1, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — AC2 verification now covers all four prerequisite commits

    Checked

    Gaps

    None.

    Split

    No further split needed. The children own parity fixes; #1002 owns activation and release evidence. Four ancestry checks are proportionate, with no over-engineering.

    Loosens: no

    Owner-tier: no

    Definition of done

    The definition of done for #1002 (Feature). Tick each item and give its evidence.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with the repository's private-strings list, and the leak review of each post.
    • D5 The author signed each commit, the squash included.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final Status: comment names the merge commit.
    • devtools-1 mise run check is green, and so are the coverage floors mise run cover-go-check and mise run cover-py-check, which check doesn't run.
    • devtools-2 A change to skill sources under packages/agents/source/ commits what mise run generate-skills, then mise run skill-tokens, then apm install rewrite, in that order, and check-generated-skills (part of lint) passes.
    • devtools-3 A consumer-visible change (the vendored payload, a skill, a reusable workflow, a task or a pin) has its consumer steps in docs/agent-skills-migration.md or the adoption docs, or the PR's Verification says "No consumer impact" and why.

    Round: 3 of 3

  5. added
    refinement:readyPassed the Definition of Ready; may be picked up
    and removed
    refinement:activeA refinement round is open; not ready for implementation
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinement:readyPassed the Definition of Ready; may be picked up

    Fields

    Priority

    None yet

    Work type

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions