Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .agents/skills/quest-afk/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: quest-afk
description: Keep quest work moving while the user is away, leaving every decision for their return.
---

Run `quest skill afk` and follow its output.
If `quest` is not installed, follow https://github.com/kixelated/quest/blob/main/SETUP.md first.
7 changes: 7 additions & 0 deletions .claude/skills/quest-afk/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: quest-afk
description: Keep quest work moving while the user is away, leaving every decision for their return.
---

Run `quest skill afk` and follow its output.
If `quest` is not installed, follow https://github.com/kixelated/quest/blob/main/SETUP.md first.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,13 @@ the version you pin decides what your agents follow:
| `quest-ready` | Mark a draft PR ready for review, wait for an automated review, then decide whether to merge. |
| `quest-merge` | Merge a quest's PR once CI and reviews pass, completing the quest. |
| `quest-complete` | Decide which open PRs to merge, then merge them in parallel. |
| `quest-afk` | Keep starting agreed work while you are away, leaving every decision for your return. |
| `quest-delete` | Abandon a quest, deleting it in its own PR. |

Use `/quest-plan` in Claude Code or `$quest-plan` in Codex. Skills coordinate
within your agent session. A started quest stops at a pull request; merging is
a separate invocation, so you review every change.

Before stepping away, add `afk` to `/quest-spawn` or `/quest-complete`: the
agent acts on its own recommendations and asks only before merging or deleting.

To bill spawned agents to API keys instead of your agent's account, export
`QUEST_API_KEYS` with one or more whitespace-separated keys and run
`/quest-spawn api`. Entries may be secret references such as 1Password `op://`
Expand Down
2 changes: 2 additions & 0 deletions assets/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ A sub-agent's brief carries the quest or PR, the user's picks, and the scope; it
A background agent reports any decision needing user input, with context and a recommendation, to the foreground agent instead of prompting the user itself.
Honor explicit instructions to proceed unattended within their scope; do not ask a question and then silently choose its answer.

End every quest skill with a final summary in sections, such as the PRs and their states, the open decisions with recommendations, and suggested follow-ups, so a user returning to the session first sees what needs them.

## Creation

Quests are created in PRs and reviewed.
Expand Down
23 changes: 23 additions & 0 deletions assets/skills/afk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: Keep quest work moving while the user is away, leaving every decision for their return.
---

Before you begin, run `quest guide`, `quest skill spawn`, and `quest skill complete`, and read their output completely.

The user has stepped away and will not answer.
Your goal is to keep the work they already agreed to moving, asking nothing, until only work that needs a decision remains.
Dispatch, limit, and clean up agents as those skills describe.
This skill takes no arguments: it filters no quests or PRs and bills agents to this session's account.

Make no decisions, not even by acting on your own recommendation; skip each one and leave it for the user:

- Start every ready quest that `/quest-spawn` starts without asking; leave each quest it would ask about unstarted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep AFK-started quest PRs in draft

When a newly started quest finishes without open decisions, assets/skills/start.md:28 instructs its background agent to run /quest-ready automatically. Because this line dispatches that normal /quest-spawn flow without telling the child agent to suppress the automatic transition, the PR can become ready even though line 16 says AFK must not pick /quest-ready without the user; pass the AFK constraint to spawned agents so completed PRs remain drafts for the user's return.

AGENTS.md reference: assets/AGENTS.md:L81-L82

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree that AFK-started PRs should stay drafts. Under a plain /quest-spawn, a started agent that finishes with no decisions already runs /quest-ready without the user, so it is part of the start flow the user agreed to, not a pick. The no-pick rule covers the orchestrator's picks for PRs it didn't start, matching the quest's "picks no ... /quest-ready ... for a PR the user has not picked". /quest-ready also merges nothing: the agent still reports and stops. Your reading shows the bullet was ambiguous, so 8c9ffa5 makes this explicit.

(written by Claude Opus 5.5)

- Carry on each action the user already picked, such as a `/quest-merge` pick, until it lands or needs the user again.
- Pick no skip, `/quest-ready`, `/quest-iterate`, `/quest-merge`, or `/quest-delete` for a PR the user has not, so nothing merges or is deleted on your judgment. A started agent still runs `/quest-ready` itself when its quest finishes with no decisions, as `/quest-start` describes.
- Answer no decision an agent reports. Its PR stays a draft whose `## Decisions needed` section lists the decision with a recommendation.
- Hold `/quest-plan` sessions, stale claims, and suggested follow-ups for the user.

As merges land, recompute the ready quests and start any that newly qualify.
Finish once every agent has reported, every picked action has landed or needs the user, and no quest remains that starts without asking.

Write the final summary so a new session can act on it without this one's context, letting the user start fresh on their return: link each quest and PR, give each skipped decision with its options and your recommendation, and describe every follow-up the agents suggested fully enough to hand to `/quest-plan`.
9 changes: 0 additions & 9 deletions assets/skills/complete.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,3 @@ Dispatch already selected actions before asking the next question; background wo

Once every sub-agent has finished, remove local worktrees and branches whose tip is the head of a merged PR; squash merges leave that tip off the base branch.
Leave the worktree you are running in and any holding uncommitted work; list those in your summary.

## Unattended

With an `afk` argument, the user has stepped away: your recommendation stands in for their pick of skip, `/quest-ready`, or `/quest-iterate`, so dispatch it without asking.
It also answers each simple decision a sub-agent reports.
Still ask about each `/quest-merge` and `/quest-delete` you recommend, as one simple question with your recommendation first.
Skip a PR or reported decision that is not simple, noting why in the summary instead of asking.
Hold suggested `/quest-plan` follow-ups for the summary, since planning is an interview.
The rest of the argument still filters the PRs in scope.
9 changes: 0 additions & 9 deletions assets/skills/spawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ Run selected `/quest-plan` sessions in the foreground.
Once every sub-agent has finished, remove local worktrees and branches whose tip is the head of a merged PR; squash merges leave that tip off the base branch.
Leave the worktree you are running in and any holding uncommitted work; list those in your summary.

## Unattended

With an `afk` argument, the user has stepped away: your recommendation stands in for their pick of `/quest-start`, skip, `/quest-ready`, or `/quest-iterate`, so act on it without asking.
It also answers each simple decision an agent reports, including when you resume a headless agent.
Still ask about each `/quest-merge` and `/quest-delete` you recommend, as one simple question with your recommendation first.
Skip a quest, PR, or reported decision that is not simple, noting why in the summary instead of asking.
Hold `/quest-plan` sessions, including deprioritizing and suggested follow-ups, for the summary, since planning is an interview.
The rest of the argument still filters the quests in scope.

## API keys

With an `api` argument, bill agents to API keys instead of this session's account: run each as a headless agent through `quest agent` rather than as a sub-agent.
Expand Down
1 change: 0 additions & 1 deletion quest/m0/helpers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ commands from Sep-Oct. Session counts in each child come from that window.

## Required

- [Unattended work](/quest/m0/helpers/afk.md) - `/quest-afk` replaces the `afk` argument: it skips every decision and keeps starting agreed work; every skill ends with a summary
- [PR state commands](/quest/m0/helpers/pr-states.md) - `quest iterate`, `ready`, `merge`, and `release` label the one owner of a PR
- [Complete loop](/quest/m0/helpers/complete-loop.md) - `/quest-complete` re-scans PRs, keeps picks and holds, and counts rounds per PR
- [Headless agents](/quest/m0/helpers/headless-agents.md) - `/quest-spawn api` launches, resumes, and stops billed agents through one command auto mode allows
Expand Down
56 changes: 0 additions & 56 deletions quest/m0/helpers/afk.md

This file was deleted.

1 change: 0 additions & 1 deletion quest/m0/helpers/complete-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ edits through this plan.
## Related

- [PR state commands](/quest/m0/helpers/pr-states.md) - also rewrites how `complete` dispatches and skips held PRs
- [Unattended work](/quest/m0/helpers/afk.md) - carries on picks the user already made
2 changes: 2 additions & 0 deletions src/cli/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// upgrading never rewrites repository files.

import guide from "../../assets/AGENTS.md";
import afk from "../../assets/skills/afk.md";
import audit from "../../assets/skills/audit.md";
import complete from "../../assets/skills/complete.md";
import del from "../../assets/skills/delete.md";
Expand Down Expand Up @@ -65,6 +66,7 @@ export class Skill {

/** Every skill, sorted by name. */
export const SKILLS: readonly Skill[] = Object.entries({
afk,
audit,
complete,
delete: del,
Expand Down
2 changes: 1 addition & 1 deletion test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ test("skill lists every skill", () => {
test("skill rejects an unknown name", () => {
const out = run("skill", "nope");
expect(out.code).toBe(1);
expect(out.stderr).toMatch(/^quest: no skill named nope \(have: audit, /);
expect(out.stderr).toMatch(/^quest: no skill named nope \(have: afk, audit, /);
});

test("usage errors exit 2", () => {
Expand Down
Loading