Skip to content

feat: afk merge and afk soon modes, PC-only waits, and pending-CI waits in /quest-run - #810

Draft
kixelated wants to merge 4 commits into
mainfrom
quest/m0/afk-and-waits
Draft

kixelated wants to merge 4 commits into
mainfrom
quest/m0/afk-and-waits

Conversation

@kixelated

@kixelated kixelated commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/afk-and-waits.md, planned in moq-dev/quest#796: fewer repeated prompts in AFK, travel, and back-at-the-desk sessions.

Summary

  • /quest-afk modes (assets/skills/afk.md). A bare afk message now runs the skill. The description names afk, afk merge, and afk soon so the harness matches them, and the regenerated stubs carry it.
    • Bare afk stays conservative: only standing picks merge.
    • afk merge runs /quest-merge only on a PR that meets all of these: you strongly recommend it, quest status shows it low or medium for its head, a review counts for that head, it has no open decision and no follow-ups, and it deletes or deprioritizes no quest beyond the one it finishes. High-risk and unclassified PRs are deferred.
    • afk soon asks every pending question in one batch, the way /quest-run's "decisions" does, then switches to afk on its own.
    • Modes combine, as in afk soon merge. A merge grant that names no risk tier counts as merge.
    • Before this, the skill only said "act on the argument within its words". So today a coordinator read afk merge as permission to merge anything and landed high-risk moq-dev/quest#807. This mode would have deferred it.
  • PC-only waits (src/core/waiting.ts, quest waiting, quest check, guide Format section, README).
    • A ## Waiting item that opens with Maintainer (PC): is a step the maintainer can take only at one of their computers, such as a password-manager unlock, a hardware check, or a local login. It still counts as the maintainer's everywhere: ranking, --maintainer, and the writer-size bump in models.ts.
    • quest waiting --no-pc drops those items before ranking, so a quest left with only an outside party's item ranks like one.
    • --json adds pc to each wait, and text output prints Maintainer (PC): ….
    • quest check rejects any other maintainer qualifier, such as Maintainer (local):, so a typo can't quietly become an outside party. In a draft's hand-back, which isn't checked, such an item falls back to the maintainer with its text intact.
    • quest/m1/cursor-reviewer.md's macOS Cursor login is now a Maintainer (PC): item.
  • /quest-run (assets/skills/run.md).
    • When the argument says the user is away from their computers (remote, on my phone), it reads waits with --no-pc. When it says at my PC, it asks those items first.
    • Once nothing is running and every question has been asked, it also blocks with quest wait on ready-for-review PRs whose required checks are still running and that a later round would pick or ask about. It runs another round when their checks finish, and doesn't finish while one is still running. Drafts and skipped PRs are still never waited on.

Public API

  • quest waiting: new --no-pc flag. --json wait objects gain pc: boolean. Text lines print Maintainer (PC): for those items.
  • quest check: rejects a Maintainer (<other>): qualifier, which it previously accepted as an outside party.
  • Core: waiting(docs, today, drafts) becomes waiting(docs, today, { drafts, maintainer, pc }), and Wait gains pc. kixel-ai/kixel.quest calls only waiting(docs, today) and parseWait, which still compile. parseWait now returns null for a Maintainer (<other>): qualifier.
  • No wire impact. These are behavior and format changes, so no ! (nothing is in production).

Choices made without asking

The maintainer is away. Each choice below is mine and is open to review:

  • Syntax Maintainer (PC):, not (local). It matches the maintainer's own wording ("at my PC") and the "Not at my PC (defer)" option that quest/m0/dialog-options.md plans. Only (PC) is accepted, case-insensitive. Anything else fails quest check.
  • One filter flag, --no-pc, instead of the plan's --pc plus --decisions. Away sessions need the exclusion. At-PC sessions want everything, and --json's pc lets them put PC items first. A "decisions only" filter can't be told apart from plain Maintainer: actions on a website, so it would mislabel them.
  • Filtering moved into core waiting(), so ranking follows the items that are kept. Filtering after ranking would leave a quest whose only maintainer item was dropped still sorted among the maintainer's. Options are a struct, to stay under four arguments.
  • afk merge scope: low or medium risk only, never unclassified. PRs with follow-ups are deferred, since their keep/drop questions need the user's pick. Quest deletions beyond the PR's own quest are deferred.
  • afk soon: once the batch prompt returns, unanswered questions are handled like any other afk question, either taken on recommendation or deferred. There is no second prompt.
  • Pending-CI waits are limited to ready-for-review PRs that a round would then pick or ask about. They wake when the PR's checks pass or fail, which is quest wait's existing checks:passed/checks:failed. See ## Waiting for the reviewers' objection.
  • Pending-CI wake (coordinator's choice while the maintainer is away, for review): keep quest wait's rule that checks:passed fires only when every check is idle, and merge as is. Rejected: a required-only wake in this PR, and a follow-up quest for one. Waiting for every check also keeps /quest-merge from queueing a PR whose optional check fails moments later. The stall needs a check that never finishes in a session waiting on nothing else, since any other activity runs a round that re-reads every PR.
  • Review checkpoint (coordinator's choice, for review): continue with this approach rather than rethink it.
  • No base merge. moq-dev/quest#806 landed on main while this ran, and so did moq-dev/quest#809, but both merge cleanly, and the rules merge the base only on a conflict.

Validation

  • After the review fixes in 5ca8193 and 3c255ac, just test (1566 passed, 5 skipped), just check, quest check, and the affected tests (skills, cli, waiting) pass again.
  • just check and just test pass: 55 files, 1566 tests passed, 5 skipped, plus both lifecycle checks.
  • New unit tests:
    • parsing of Maintainer (PC):, lowercase maintainer(pc):, a rejected (local), Maintainers: still read as an outside party, and draft hand-back fallback
    • --no-pc and --maintainer filtering, including a quest re-ranking once its PC item is dropped
    • quest check's new message
    • CLI text, --json, and --maintainer --no-pc output
  • Run against this repository's real tree and its open drafts:
    • quest waiting --maintainer lists the Cursor login as Maintainer (PC): … alongside the moq-dev/quest#805 draft. With --no-pc, only quest review runs reviewers through the Cursor CLI #805 remains.
    • In --json, only that item has pc: true; outside parties keep pc: false.
    • On a copy of the tree with the item changed to Maintainer (local):, quest check fails at quest/m1/cursor-reviewer.md:64 with the new message.
  • The skill text has no runtime behavior to exercise beyond its composition. test/skills.test.ts keeps it under INLINE_LIMIT, and quest check passes with the regenerated stubs.

Follow-ups

None. quest/m0/dialog-options.md (running concurrently) owns the "Not at my PC (defer)" dialog option that complements these waits.

Models

Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, XS, arm B)

(Written by Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 3c255ac, named in full once no reviewer reports a finding

  • Base: origin/main at a88c65b

  • Risk: high, The `afk merge` mode in assets/skills/afk.md (and the matching README text) newly lets an agent merge low- and medium-risk PRs without asking, which a user, or the maintainer's repositories, could be hurt by if the agent misjudges a PR, and a revert can stop future merges but not merges already made; the risk file lists a change to when an agent may merge without asking in assets/ as high. The `quest waiting` output and `--json` shape also change for consumers that parse them, which is medium on its own.

  • Classified: high by Claude Code, claude-haiku-5-5, low effort, session 2fb884d2-553b-4807-a8e4-91b0c7c08e5e

  • Reviewer: Codex, gpt-6.1-sol, high effort

  • Session: 01a20232-23a5-7d21-9e6a-3681fabd97b7, round 2

  • Score: 10/10, The incremental README and CLI help changes accurately describe the existing behavior; static review found no defects, and no builds or tests were run as instructed.

  • Rounds: 5; first round 1 (medium 1); findings 1 (medium 1): fixed 0, refuted 1, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, xhigh effort, shadow

  • Session: 01a20232-23a4-75e1-9acf-a45945d8dc46, round 2

  • Score: 7/10, The README and help updates are consistent, but an optional check can still stall the pending-CI loop.

  • Rounds: 5; first round 1 (medium 1); findings 1 (medium 1): fixed 0, refuted 0, open 1

  • Findings, open until the next round settles them:

    • Medium, assets/skills/run.md:80: Wake pending-CI rounds when required checks finish
  • The last round's findings, at 5ca8193:

    • Open: medium, assets/skills/run.md:80: Wake pending-CI rounds when required checks finish; The response explicitly leaves the behavior unchanged, and src/github/wait.ts:597-600 plus test/wait.test.ts:770-804 confirm that required checks finishing cannot wake the loop while an optional check remains pending.
  • Reviewer: Claude Code, claude-sonnet-5-5, medium effort, second

  • Session: ba96cd9c-06e9-4c5d-9ad0-b8905f6cd8ea, round 2

  • Score: 8/10, The README and help text are fixed and the remaining responses hold, but afk merge still lets an agent merge without asking, so it lands after the maintainer confirms that choice.

  • Rounds: 5; first round 5 (high 1, medium 1, low 3); findings 10 (high 1, medium 4, low 5): fixed 4, refuted 6, open 0

  • Findings: none

  • The last round's findings, at 5ca8193:

    • Fixed: medium, README.md:2473: Skills table still describes quest-afk by its old contract; The README skills table row for quest-afk now names `afk merge` and `afk soon`.
    • Refuted: medium, assets/skills/afk.md:13: Mode text leaves argument forms undefined and narrows a bare merge grant; The author cites the quest Goal as the recorded decision, which says to merge non-high-risk PRs and defer high-risk ones. Reading an untiered grant as `merge` is therefore the intended behavior, and afk.md:16 lets a user widen it.
    • Refuted: medium, src/core/waiting.ts:41: Unrecognised qualifier handled inconsistently, so hand-backs skip --no-pc; Showing an item whose PC-only status is unknown errs toward visibility, its qualifier text stays visible to the session, and quest trees cannot hold it because `quest check` rejects it (src/core/rules.ts:255).
    • Fixed: low, src/cli/main.ts:512: --no-pc changes maintainer-first ordering; The ordering is intended and tested, and the `waiting` help at src/cli/main.ts:501 now says both filters apply before ranking, so order follows the items kept.

Waiting

  • Maintainer: confirm or overturn the coordinator's choice on the pending-CI wake. The Codex shadow reviewer (gpt-6.1-sol, xhigh) has kept the finding "Wake pending-CI rounds when required checks finish" (assets/skills/run.md:80) through four rounds against the refutation, so no review counts for the head. The primary Codex reviewer accepted the refutation and scored 10/10; Claude scored 8.
    • The coordinator chose, for review, to keep quest wait's rule that checks:passed fires only once every check is idle, and to merge as is. Reasons are under "Choices made without asking".
    • Options:
      1. Confirm. Recommended. Post a Maintainer decision comment; the next /quest-iterate records it and reruns /quest-review.
      2. Add a required-only wake to quest wait in this PR, which needs Kixel Quest index parity.
      3. Add a follow-up quest for option 2.
    • Done when a Maintainer decision comment answers it.

kixelated and others added 2 commits November 21, 2026 23:23
Quest-Claim: 0623f95ac6e214cc
…ts in /quest-run

- /quest-afk: bare `afk` runs it; `afk merge` merges strongly recommended low or
  medium PRs with a counting review and no decisions or follow-ups, deferring high
  or unclassified ones; `afk soon` asks pending questions in one batch, then goes afk.
- `Maintainer (PC):` marks a step only the maintainer's computers can take;
  `quest waiting --no-pc` drops them and --json reports `pc`; `quest check`
  rejects other maintainer qualifiers.
- /quest-run waits on ready PRs whose required checks are still running, and
  skips or front-loads PC steps by its argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Streamline /quest-afk modes, PC-local waits, and pending-CI waits feat: afk merge and afk soon modes, PC-only waits, and pending-CI waits in /quest-run Nov 22, 2026
…normalized party

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…waiting help

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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