Skip to content

chore(claude): add the spawn-quest skill - #3403

Merged
kixelated merged 2 commits into
mainfrom
claude/spawn-quest-m1-dev-c1f2d0
Sep 4, 2026
Merged

chore(claude): add the spawn-quest skill#3403
kixelated merged 2 commits into
mainfrom
claude/spawn-quest-m1-dev-c1f2d0

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

What

Adds .claude/skills/spawn-quest/, the fan-out companion to /start-quest.

/start-quest finds one unblocked quest and starts it interactively. /spawn-quest triages 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:

  • The agent contract names the checks CI actually runs here: just fix, just check, and just test through nix develop --command.
  • Added the Cross-Package Sync walk, the "do not bump package versions" rule, and the requirement to delete every reference to the quest, not just the quest file, since quest check fails on a dangling link.
  • Spelled out the claim-push mechanics that keep the diff-aware just check pointed at the right base: set the upstream to the base branch, then git push origin HEAD rather than git push -u.
  • Base-branch selection defers to the Branch Targeting rules in CLAUDE.md instead of assuming one default branch.
  • The leave recommendation now covers verification this machine cannot run (a Linux-only build, or a quest whose exit criteria is a measured benchmark before/after), which is the case that rules out the perf/ and uring-* lines on a Mac.
  • Dropped the upstream allowed-tools: AskUserQuestion, Agent frontmatter, which would have blocked the skill from reading the quests it is supposed to triage. The frontmatter now matches the sibling plan-quest and start-quest skills.
  • Dropped the moq.pro-specific "stay on staging" line for "never mutate anything outside the repository", since this repository has no such environment.

Checks

just fix, just check, and just test all pass. The diff is Markdown and YAML under .claude/, so just test correctly 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)

/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>
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 07696158-f7d4-4ce4-ab91-76b1967e9ac5

📥 Commits

Reviewing files that changed from the base of the PR and between 78f82e3 and f7ce30c.

📒 Files selected for processing (2)
  • .claude/skills/spawn-quest/SKILL.md
  • .claude/skills/spawn-quest/agents/openai.yaml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T22:33:57.605614Z f7ce30c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread .claude/skills/spawn-quest/SKILL.md Outdated
Comment on lines +30 to +32
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread .claude/skills/spawn-quest/SKILL.md Outdated
Comment on lines +44 to +46
- 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

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 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>
@kixelated

Copy link
Copy Markdown
Collaborator Author

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. quest/m1/README.md says to branch its quests from dev, while a ready non-breaking quest in the same milestone belongs on main under Branch Targeting, so one base per wave would put some PR on the wrong branch. The base is now settled per quest against the CLAUDE.md rules. I kept the constraint the original was protecting: an agent still never derives its own base, or it branches from wherever the triaging session is standing and drags that session's own tree edits into its PR.

P2, unique claim commits. Also right, and this one was a regression against quest/AGENTS.md: the UUID is in the sibling start-quest skill and I dropped it in the port. The failure mode is exactly as described, and it is worth spelling out because it is silent: identical parent, identical empty tree, and an identical message inside the same second give the same commit object, so the loser's push returns already-up-to-date rather than being rejected, and both agents proceed believing they hold the claim. The skill now requires the UUID and says why, so nobody trims it again.

(written by Claude Opus 5)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

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 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 👍 / 👎.

Comment on lines +12 to +13
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.

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 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 👍 / 👎.

@kixelated
kixelated merged commit 7039d49 into main Sep 4, 2026
2 checks passed
@kixelated
kixelated deleted the claude/spawn-quest-m1-dev-c1f2d0 branch September 4, 2026 23:02
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