Skip to content

address-feedback: extract run-state persistence and merge-gate checklist scripts #35

Description

@cbeaulieu-gt

Summary

address-feedback/SKILL.md describes two mechanical, non-judgment
components entirely in prose: run-state persistence (read/write a JSON
file, enforce caps) and the merge-gate checklist (a chain of gh api
boolean checks). Both are candidates for extraction into scripts.

Context

Part of #33 (milestone: Deterministic script extraction). Depends loosely
on the gh-pr-review-address script work (#33) since this skill
composes that one's Step 2/2.5/3/4 unchanged — do this one second.

Candidates

  1. Run-state persistence (§ Run-state persistence, .tmp/address-feedback-pr<N>.json).
    Load/validate/write the state file, increment tick_count, compare
    run_id/owner_repo/target for continuation-vs-new-run, enforce
    tick_count > MAX_TICKS / act_rounds >= MAX_ACT_ROUNDS caps. This is
    plain file I/O and comparison logic — a scripts/address-feedback-state.py
    with load/save/check-caps subcommands removes an entire class of
    "did the LLM read the JSON correctly" risk.
  2. Merge-gate checklist (§ Safety guards → Merge gates). Six
    independent boolean checks against gh api/gh pr view output
    (PR still open, effective permission, CI green on the merge commit
    not just HEAD, no CHANGES_REQUESTED, mergeStateStatus in allowed
    set, no DO NOT MERGE banner, merge-queue enqueue-vs-merged
    distinction). None of these require judgment — a script that emits
    {gate: name, passed: bool, detail: str} per gate, plus an overall
    all_passed: bool, replaces several paragraphs of "check X, check Y,
    AND them together" prose with one call.

Technical Notes

  • The WAIT / ACT / EXIT decision itself, the quiescence determination,
    and the judgment-call-park override stay on the LLM — those genuinely
    read bot review content and prior state to decide what to do next.
  • ScheduleWakeup calls stay LLM-issued (this is a /loop dynamic-mode
    skill, not compatible with a script owning the wakeup call).
  • Reuse _gh_common.py where the merge-gate script needs gh api fetches
    identical to ones already fetched in gh-pr-review-address.

Out of Scope

  • Any change to the loop-driver control flow (Tick steps 0–4) — those
    stay LLM-orchestrated.
  • The autonomy-override park logic (dup-check + issue creation) — that's
    judgment (is this a duplicate?) even though the mechanics of creating
    the issue are already scripted elsewhere (gh-create-issue skill).

Acceptance Criteria

  • Run-state load/save/cap-check logic is script-driven, not
    prose-described JSON manipulation
  • Merge-gate checklist is a single script call emitting per-gate
    pass/fail + detail
  • SKILL.md updated to call the script(s) instead of describing the
    checks inline
  • Test coverage under scripts/tests/

🤖 Generated by Claude Code on behalf of @cbeaulieu-gt

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions