Skip to content

feat: run quest context always and quest guide only for quest work - #460

Merged
kixelated merged 1 commit into
mainfrom
context-split
Nov 3, 2026
Merged

kixelated merged 1 commit into
mainfrom
context-split

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

Agents should run quest context before every task and quest guide only for quest work. The guide still held sections every task needs, so this moves them:

  • Into quest context:
    • Workspace
    • Questions, minus the quest-skill summary rule
    • Reviews
    • a new Pull requests section, with the generic push and draft rules from Execution: explicit refspec, no rebase or force-push, another session's PR, confirm the PR is open, local checks while draft, merge conflicts
    • a short Quests primer that says when to run quest guide, and that follow-ups become quests through /quest-plan
  • The guide keeps the quest mechanics: Model, Format, Summaries, Creation, Execution (claims, branches, readiness), and Deletion. Its intro now points at quest context for everything else.
  • quest init writes Quests: before any work, run \quest context` and follow it.` and upgrades both earlier default lines in place.
  • Skills that cited "the guide's" Questions, Reviews, review record, or design checkpoint now cite quest context.
  • The runner still embeds both.

Word counts:

Task Before After
Non-quest task (context only) about 3,900 (context + full guide) about 2,450
Quest work (context + guide) about 3,900 about 4,000

The quest number is unchanged except for the new primer.

Follows #457 (#457).

Impact

  • quest guide no longer contains Workspace, Questions, or Reviews; they're in quest context. Anything linking assets/AGENTS.md#workspace should link assets/CONTEXT.md#workspace.
  • REFERENCE_LINE changed; quest init upgrades the earlier defaults.

Follow-ups

Validation

  • just check passes.
  • bun run test passes: 28 files, 1042 tests.
  • The Worker test cloudflare/test/setup.test.ts passes: 15 tests.

Review

  • Reviewer: Codex, gpt-6.1-sol, medium effort, via quest review --base origin/main.
  • Reviewed head: 105b126c55548dec6d3766f8484dedc0dbdffffa.
  • Round 1: no findings.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

The guide held rules every task needs (workspace, questions, reviews) beside
quest mechanics, so agents read all of it before any work. Move the generic
sections, plus the guide's generic pull request rules, into `quest context`
with a short quest primer that says when to run `quest guide`. `quest init`
now points agents only at `quest context`, upgrading both earlier defaults.

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

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: afa1625f-4c3e-4598-8334-5331521d19d2
Commits

Reviewing files that changed from the base of the PR and between 9277dc3 and 105b126.

Files selected for processing: 13
  • README.md
  • assets/AGENTS.md
  • assets/CONTEXT.md
  • assets/skills/afk.md
  • assets/skills/complete.md
  • assets/skills/grill.md
  • assets/skills/iterate.md
  • assets/skills/merge.md
  • assets/skills/plan.md
  • assets/skills/review.md
  • assets/skills/spawn.md
  • cloudflare/src/github/setup.ts
  • src/core/init.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026

@pullfrog pullfrog 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.

ℹ️ No critical issues — minor suggestions below.

Reviewed changes — one commit:

  • Context/guide split (assets/AGENTS.md, assets/CONTEXT.md): Workspace, Questions, and Reviews move to quest context verbatim, with a new Pull requests section carrying the push rules the guide previously held inline, and a Quests primer pointing quest work at quest guide. The "end every quest skill with a summary" rule gains its own ## Summaries heading in the guide.
  • Consistent cross-references: every skill citation of the guide's moved sections now names quest context, and I found no stale section anchors left in assets/, the skills, or the docs.
  • quest init reference line (src/core/init.ts): REFERENCE_LINE drops quest guide, and both prior default lines retire into OLD_REFERENCE_LINES for in-place upgrade; init tests pass (49/49).
  • Non-code: the runner already embeds context and guide together in full (src/runner/prompt.ts:109), so no behavioral change; README and the Cloudflare setup-PR purpose line updated to match.

ℹ️ Stale "guide's" pointers the split leaves behind

Technical details
# Stale "guide's" pointers after the Context/guide split

## Affected sites
- `src/runner/job.ts:505` — the review-findings note tells the agent to "Follow the guide's review rules, including its design checkpoint every fourth round." The review rules and the design checkpoint now live in `quest context` (`assets/CONTEXT.md`'s Reviews section), not the guide.
- `src/cli/main.ts:1182` — `quest guide --help` still prints "Print the quest guide: the format, workflow, and rules agents follow", which describes the pre-split scope; the README now describes `quest guide` as "the quest format and workflow".

## Required outcome
- The runner note and the `quest guide` description point readers at where the content actually lives now.

## Suggested approach (optional)
- `src/runner/prompt.ts:9` embeds both files in full, so nothing breaks — this is page-not-founding within a prompt, not dead code. Reword the job note to `quest context`'s review rules, and align the command description with the README's wording.

## Open questions for the human (optional)

ℹ️ The newly retired reference line has no upgrade test

Technical details
# Reference-line upgrade test misses the line #460 retires

## Affected sites
- `test/init.test.ts:247` — "init upgrades an earlier release's default reference line" still fixtures only the oldest line ("run `quest guide` and follow it"). The line this PR retires, "run `quest context` and `quest guide`, and follow both", is the one most installed bases currently hold, and is covered only indirectly via the shared `OLD_REFERENCE_LINES` mechanism in `appendLine` (`src/core/init.ts:231`).

## Required outcome
- The upgrade test exercises the second entry too, ideally with both entries in the fixture list order, to pin that the in-place replace keeps writing the newest line.

## Suggested approach (optional)
- Extend the existing fixture (or add a sibling test) writing the retired context-and-guide line and asserting it becomes `REFERENCE_LINE`.
- Unverified but fine to ignore: the fixture uses CRLF, which matches the newline-preservation branch of `appendLine`; a second fixture can reuse it.

## Open questions for the human (optional)

Pullfrog  | Fix it ➔ | View workflow run | Using glm-5.3-flash | 𝕏

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