Skip to content

Agent guidance: carry a ticket to a green PR — Ticket Delivery Loop, worktree hazards, scripts/pr-checks.sh - #183

Merged
wow-miley merged 1 commit into
mainfrom
wow-miley/phosphor-md-file
Oct 20, 2026
Merged

wow-miley merged 1 commit into
mainfrom
wow-miley/phosphor-md-file

Conversation

@wow-miley

@wow-miley wow-miley commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

No ticket, so no Closes.

Agents in Conductor workspaces were stopping at "PR opened, CI pending", or ending with a question buried in their closing message. This PR changes AGENTS.md so an agent carries its ticket to a PR with all four checks green. It waits on CI, fixes what CI reports, and asks Miley through Conductor's question tool only when a person is actually needed. It follows socket-link/socket#2007, adapted to this repo's facts.

Changes

  • scripts/pr-checks.sh (new, executable): waits on a PR's checks inside a budget that fits the Bash tool's 10-minute cap. Exit codes: 0 pass, 1 red, 2 no PR, 3 conflict, 8 still running.
  • Ticket Delivery Loop (new section), covering:
    • when an agent is finished;
    • the eight-step loop, and rebasing onto origin/main. If kotlin-js-store/ or the generated agent docs conflict, take origin/main's and regenerate;
    • when to stop pushing and ask;
    • Visual evidence: the agent produces previews or clips into .context/, and asks for a visual verdict once the PR is green;
    • Reading a red check, with a signature table;
    • When you need Miley;
    • Commit and PR conventions, in the PHO-<n>/#<issue> <task>: … title shape with an authorship line.
  • Git Worktree Hazards (Conductor) (new section), from Socket's.
  • Testing, Release, Safety Boundaries and Permissions now agree with the loop: one narrow local pass with CI as the full gate, no tags or local publishes unless the ticket asks, and push, PR and gh rights on the agent's own branch.

The red-check table comes from a survey of the last 50 failed ci.yml runs.

  • None of the failures was infrastructure.
  • The two flaky signatures were mocha timeouts in the tests themselves, both since fixed.
  • The commonest red is a Kotlin/Native comma in a backtick test name (16 jobs). Next are Dokka Couldn't resolve link (13) and the yarn lockfile (10, 8 of them inherited from a red main).

Deviations from the brief

  • main is protected, by the "Protect Main" ruleset (13347139), which requires the four checks. The classic protection endpoint 404s, but gh pr checks --required reads the ruleset, so the script waits on exactly those four. The script's comment that says otherwise is left as given.
  • Socket's "only squash" merge line became "use --squash". This repo allows all three merge methods.

Verification

Authored by Claude (Opus 5.5), not by the committer.

🤖 Generated with Claude Code

…worktree hazards, scripts/pr-checks.sh

Adds a Ticket Delivery Loop section to AGENTS.md: an agent is finished when its
PR has all four CI checks green, waits on CI with scripts/pr-checks.sh, fixes
what it reports, and asks Miley through Conductor's question tool only when a
person is needed. "Reading a red check" is built from a survey of the last 50
failed ci.yml runs. Also adds Git Worktree Hazards (Conductor), and reconciles
Testing, Release, Safety Boundaries and Permissions with the loop.

Authored by Claude (Opus 5.5), not by the committer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wow-miley
wow-miley merged commit 937e812 into main Oct 20, 2026
4 checks passed
@wow-miley
wow-miley deleted the wow-miley/phosphor-md-file branch October 20, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant