Tracking: 2026-08-09 execution plan — token burn P0, merge-queue drain, Ruby cleanup (#309)

Open
#404 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet
Tech stack
ruby
Domain
tooling

Research direction

Start with the dependency plan and Step 0/Step 1 blockers, especially PR #280 and the Ruby-touching changes that precede #309. For the refactor scope, read bin/agent-workflow-seam-doctor, bin/push-downstream, and the listed test files, then run the relevant validation and RuboCop checks. Done means the staged Ruby cleanup and its verification are complete without the documented merge conflicts.

Written by the indexing model from the issue text.

Description

complexity:neutral P3 triage:reconcile

Execution-order tracking issue from the 2026-08-09 whole-surface triage (105 open issues, 33 open PRs). Priorities: (1) stop token burn ASAP, (2) Ruby cleanup ASAP, (3) merge near-done PRs first so the Ruby refactor doesn't create mass conflicts, (4) everything else after.

Dependency plan id: aw-triage-2026-08-09-tokens-ruby-v1 (coordinator-local artifact, 51 typed edges). Ordering below is the dependency-ordered worklist from that graph.

References are intentionally plain (#NNN) — nothing here should auto-close.


Step 0 — Stop the token bleeding (P0)

  • Merge PR #396 (approved, green — queued ahead of #395 in the same file domain)
  • Merge PR #362 (approved, green — same domain)
  • Review + merge PR #395 (fixes #393). Highest-leverage token fix: one idle 15-min Goal monitor burned ~309M tokens (~5,256 credits) in 8 days, 97% cached-context reloads on "no change" wakes.
  • Start #398 (replay-safe usage telemetry receipts) — critical path: #399 budgets, #400 measurement, and the #402 pilot all consume its receipts.
  • #399 hierarchical token budgets (after #398 lands).
  • One combined policy-guard PR after Domain A drains: #397 (no ad-hoc lanes without an issue/PR), #401 (coordination opt-in for single-target work), #403 (block cross-task lane takeover — 246M-token coordinator-wake trace), plus the accepted #402 decision (single canonical target as default batch shape). One PR, not four — they all edit the same contract files.
  • #400 policy edit now (default coordinator route below Sol/xhigh; 67% of a 6.1B-token window was Sol/xhigh coordination); measured validation waits for #398. PR #348 conflicts and touches the same routing doc — rebase or fold in.

Step 1 — Drain the merge queue (before any Ruby churn)

"Green" = the 3 hosted checks only; the seam's independent-review gate still applies, and #387/#378/#384 are +3–5k lines.

Standalone, parallel-safe — land whenever
  • PR #328 (+46/−12)
  • PR #342
  • PR #347 (new skill; unblocks #325/#326/#332)
  • PR #346 (new skill; unblocks #325/#326/#354)
  • PR #341
  • PR #343 (hooks, self-contained)
  • PR #373
  • PR #383 (docs-only — merge early: it is the Ruby packaging plan #309 should follow)
  • PR #301 (dependabot; .github/workflows is a human-review path — maintainer merge)
Domain A — batch-contract files (skills/pr-batch/SKILL.md, workflows/pr-processing.md, goal-completion-contract-test.rb; 15 PRs collide)

Serial order:

  • PR #396 (also in Step 0)
  • PR #362 (also in Step 0)
  • PR #395 (also in Step 0)
  • PR #388
  • PR #339
  • PR #378
  • PR #387
  • PR #322 (rebase first — conflicting)
Domain B — installer/bin/
  • PR #360 (flake-cluster fix; also stabilizes validate for the Ruby wave)
  • PR #336
  • PR #321 (contributor branch — verify fork CI actually ran; green-looking rollups can hide never-run fork CI)
  • PR #384 (+5k, real review; touches seam-doctor + push-downstream = Ruby hot files)
Domain C — closeout-evidence-replay
  • PR #371
  • PR #269 (rebase — conflicting)
  • PR #291 (changes requested — address or close)
Domain D — pr-ci-readiness / merge-assurance / pr-merge-submit (Ruby hot files)
  • PR #329
  • PR #330
  • PR #312
  • PR #314 (rebase — conflicting)
  • PR #288 (rebase — conflicting)
Decide, don't drift
  • PR #289 (changes requested) — address or close
  • PR #259 (oldest, conflicting) — address or close
  • PR #280 — the elephant. 98 files, conflicting, restructures the entire bin/ Ruby surface into bin/agent_workflows_operation/*, overlapping ~90% of the #309 refactor territory. Merge-after-rework, split, or close before #309 starts.
  • #355 — seam declares merge_queue_only but main has no merge queue, so agent merges are unreachable. Fix before any agent-driven merge wave (or defer if merging by hand).

Step 2 — Ruby cleanup (#309), staged

Preconditions, in order:

  1. Ruby-touching PRs above merged or closed (#396, #360, #330, #329, #312, #384, #371/#269, #314, #288, #291, and the #280 decision).
  2. Dev-loop fixes so refactor verification is trustworthy:
    • #363 (validate dirty-tree gate skips RuboCop — breaks the refactor loop)
    • Locale/encoding cluster: #331, #327, #352 (verify — 6239fd0 may have fixed part), #349, #351, #350
    • Flaky-test remnants: #338, #364, #361, #345, #260
  3. Staged refactor, production helpers before tests, biggest offenders first (offense counts from the #309 baseline):
    • bin/agent-workflow-seam-doctor (172) then its test (214)
    • bin/push-downstream (114) then its test (160)
    • skills/post-merge-audit/bin/completed-batch-audit-receipt-test.rb (121)
    • skills/pr-batch/bin/pr-ci-readiness-test.rb (114)
    • Re-enable default RuboCop metrics cops incrementally; commit a machine-readable baseline first.
    • Align split boundaries with the #383 gem-extraction plan to avoid refactoring the same code twice.

Step 3 — Deferred backlog (after Ruby wave), batch by theme

  • Merge-gate hardening: #249, #179, #257, #251, #266, #293 (PR #314), #367, #276/#268 (PR #343)
  • Contract-test hardening: #340, #284, #357, #227, #225, #226, #244 leftovers
  • #151 chain: #333 → #334 → #335, with PR #348 rebased in
  • Skills/docs tail: #375, #389, #369, #394 (reserved: AbanoubGhadban), #358, #359; follow-ups #325/#326/#332/#354 unblock when #346/#347 merge
  • Bigger designs: #392 (task-scoped review packets — also token-saving), #296, #319, #258, #189, #275, #248/#336, #368, #376, #353 → #186 (Batch id: line blocked by prompt-size slack)

Maintainer decisions needed

  1. #280 disposition (merge-after-rework / split / close) — biggest conflict bomb; blocks #309 start.
  2. #355 — enable a real merge queue vs. change merge_submission.mode.
  3. #402 / #401 — single-canonical-target default and coordination-as-opt-in.
  4. #400 — approve coordinator default-route drop now.
  5. #289, #291, #259 — address or close.

Risks

  • Mergeable states decay as the queue drains; re-check per merge. Expect #322/#348/#314/#288/#269/#259 to need rebases regardless.
  • Contributor branches (#321, #280) can show green rollups when fork CI never ran — verify before merge-readiness.
  • Hosted checks ≠ review: every non-trivial PR still needs the seam's independent review gate.

Triage provenance: single-operator mode (coordination_backend: n/a); phase-2 capacity split intentionally not generated — run $plan-pr-batch on a chosen slice for launch prompts.

Dominant language
Ruby
Stars
7
Forks
1
Avg merge
1d 16h
Merged PRs (30d)
150

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shakacode/agent-workflows

All issues in shakacode/agent-workflows

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.