chore(claude): add the spawn-quest skill - #3403
Conversation
/start-quest starts one quest interactively. This adds the fan-out companion: triage every quest in a scope, then spawn one background agent per quest worth starting, each in its own worktree, each ending at an open PR. Ported from the downstream moq.pro tree and adapted to this repository: the agent contract names the checks CI actually runs here (just fix/check/test through nix develop), the Cross-Package Sync walk, the version-bump ban, and the claim-push mechanics that keep the diff-aware check pointed at the right base. The "leave" recommendation also covers verification this machine cannot run, which is what rules out the Linux-only and benchmark-gated quests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 1 minute. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 996270cb5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Settle the base branch once (`git fetch origin`, then `origin/main` or | ||
| `origin/dev` per the Branch Targeting rules in `CLAUDE.md`) and pass it to | ||
| every agent, or an agent branching from wherever it stands puts this skill's |
There was a problem hiding this comment.
Select the base branch separately for each quest
A scope can contain selected quests with different required targets. For example, quest/m1/3060-moq-net-ban-hop-id-0-from-hop-chains.md explicitly targets dev, while ready non-breaking work in the same milestone targets main. Requiring one base for every agent therefore puts at least one PR on the wrong branch whenever such quests are started together; determine and pass the base per quest instead. (Written by GPT-5.6 Sol)
AGENTS.md reference: AGENTS.md:L224-L226
Useful? React with 👍 / 👎.
| - Cut the quest branch (the quest path without `.md`) from that base and claim | ||
| it with an empty placeholder commit, pushed immediately with | ||
| `git push origin HEAD` after pointing the upstream at the base. A rejected |
There was a problem hiding this comment.
Make every claim commit uniquely identifiable
When two automated runners claim the same quest from the same base in the same second, an empty commit with the same identity and conventional message can have the same Git object ID. Both git push origin HEAD calls then succeed as the second is already up to date, so both agents proceed despite this claim being intended to prevent duplicate work. Require a freshly generated UUID in the placeholder commit message, as the sibling start-quest skill does. (Written by GPT-5.6 Sol)
AGENTS.md reference: quest/AGENTS.md:L109-L111
Useful? React with 👍 / 👎.
Two findings from the automated review, both correct. The base branch was settled once for the whole wave, which is the upstream shape: moq.pro has one branch model. Here a scope mixes targets. quest/m1 says to branch from dev, but a ready non-breaking quest in the same milestone belongs on main under Branch Targeting, so one base per wave puts some PR on the wrong branch. Settle it per quest instead, while keeping the rule that an agent never derives its own base. The claim commit also lost the UUID during the port. quest/AGENTS.md and start-quest both require one, and the mechanism is real: two agents claiming the same quest from the same base in the same second produce the same commit object, so the loser's push succeeds as already-up-to-date rather than being rejected, and both proceed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Both findings were correct and are fixed in f7ce30c. P1, base branch per quest. Right, and it is a porting bug: moq.pro has a single branch model, so "settle the base once" was safe there and is not here. P2, unique claim commits. Also right, and this one was a regression against (written by Claude Opus 5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7ce30cc66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ## Spawning | ||
|
|
||
| `git fetch origin` once, then settle a base branch **per quest** and pass it |
There was a problem hiding this comment.
Fetch remote claims before triaging quests
Move git fetch origin ahead of the claimed-quest scan. In a checkout whose remote-tracking refs are stale, the current ordering can offer a quest that another agent has already claimed but has not yet opened a PR for; the spawned agent then discovers the claim only when its push is rejected, wasting the user's selection and an agent slot. The remote branch is the coordination mechanism, so it must be refreshed before candidates are presented.
AGENTS.md reference: quest/AGENTS.md:L107-L111
Useful? React with 👍 / 👎.
| the ones a recent branch or open PR already claims, and say when a branch is | ||
| stale (old, no open PR) so it can be reused or deleted. |
There was a problem hiding this comment.
Resolve stale branches before offering start
Handle a stale branch before keeping its quest in the start pool. If the old remote tip contains an unmerged placeholder or partial work, the later instruction to cut the same branch freshly from the base and push without force will be rejected as non-fast-forward and incorrectly reported as a lost claim race; a local stale branch can prevent branch creation even earlier. Inspect and reuse its work, or delete only confirmed-safe refs, before spawning the quest.
AGENTS.md reference: quest/AGENTS.md:L107-L111
Useful? React with 👍 / 👎.
What
Adds
.claude/skills/spawn-quest/, the fan-out companion to/start-quest./start-questfinds one unblocked quest and starts it interactively./spawn-questtriages a whole scope (/spawn-quest m1), puts every ready quest to the user in priority order with a recommendation, and then spawns one background agent per start, each in its own worktree, each ending at an open PR.Where it came from
Ported from the downstream moq.pro tree, where it has been in use, and adapted to this repository rather than copied verbatim:
just fix,just check, andjust testthroughnix develop --command.quest checkfails on a dangling link.just checkpointed at the right base: set the upstream to the base branch, thengit push origin HEADrather thangit push -u.CLAUDE.mdinstead of assuming one default branch.perf/anduring-*lines on a Mac.allowed-tools: AskUserQuestion, Agentfrontmatter, which would have blocked the skill from reading the quests it is supposed to triage. The frontmatter now matches the siblingplan-questandstart-questskills.Checks
just fix,just check, andjust testall pass. The diff is Markdown and YAML under.claude/, sojust testcorrectly reports no JS, Rust, or Python changes and skips those suites; the Markdown and shell linters plus the workflow-coverage check are what actually exercised this change.🤖 Generated with Claude Code
(Written by Claude Opus 5)