Skip to content

feat(kix): plan from an idea, pasted context, or a job's follow-ups - #205

Merged
kixelated merged 5 commits into
mainfrom
quest/m0/kix/planning
Oct 24, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m0/kix/planning

Conversation

@kixelated

@kixelated kixelated commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/kix/planning.md: a maintainer starts a planning interview on kix.quest from an idea, pasted context, an issue, or a finished job's follow-ups, answers its rounds in the inbox, and gets a draft planning PR with the service-rendered decision record. Issue planning, account-limit decisions, the decision trail, and draft publication already existed; this adds the missing entry points and the interview UI details.

Changes

  • New plan box. Each enrolled project in the inbox has a folded "Plan something new" form: the maintainer's idea (required, up to 4,000 characters) and an optional pasted block (up to 64,000), stored as jobs.idea / jobs.context (migration 0018_plan_request.sql). A retry keeps both, and so does Start over.
  • Untrusted context like issue text. A plans/<id> job's agent reads its request through the existing context tool (GET /api/runner/context now answers { kind: "plan", idea, context } from kix's own record, with no GitHub call). The runner prompt and tool description mark the pasted context as untrusted, not instructions.
  • "Plan these?" follow-ups. The runner's deliver tool takes followups (at most 20 lines), which land in the completed job's result. The inbox offers each finished job's follow-ups as a decision on the target plans/<job>, so the offer, its interview, and that interview's questions stay one item. Planning them takes the follow-ups and summary from the job's own result (never from the request) as context, and only once.
  • Interview UI. Recommended options come first (never preselected), and free text is still always offered. A plan's thread shows what it started from and links its draft proposal once delivered. A running job names its runner and account. The new plan box folds the runner and account choice behind an automatic default (pin=runner:account on the form).
  • Plan items and their notifications use the idea's first line as the title, not "New plan".
  • The seeded local server has a plan started from an idea with pasted call notes, and a finished job with follow-ups. Phone width was checked in the browser: there is no horizontal overflow, and the recommended option is listed first.
  • quest rm removed the quest and its links. execution.md no longer requires it, and its follow-ups bullet now describes what exists.

Choices made without asking

  • A new plan requires an idea. The JSON API no longer starts an empty interview, and a plans/<id> target is accepted only as a retry of a failed interview or for a job's unplanned follow-ups.
  • Follow-ups do not send a push notification. The job's own PR already notifies, so the follow-ups wait in the inbox. Once planned they are gone for every maintainer. Skipping hides them only for the maintainer who skipped.
  • Only completed jobs offer follow-ups, and the inbox lists the newest 50 per project.
  • The runner and account choice appears only on the new plan box. Other job starts still route automatically, or through the account decision.

Checks

just check and just test pass locally. New tests cover the plan request validation and retry, follow-up planning from the job's result (a forged request is refused, and it plans only once), the plan context endpoint, the inbox box with a pinned account, the follow-ups item becoming its interview, recommended-first ordering, and the runner's followups validation and plan context tool.

Suggested follow-ups

  • Offer the same compact runner and account choice when starting or iterating, if pinning turns out to be useful there.
  • Expire or bound old "plan these?" offers by age rather than count once real usage shows how many pile up.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 2 commits October 23, 2026 23:03
Quest-Claim: c2d896050cb72306
The inbox's new plan box takes the maintainer's idea and optional pasted
context, which the agent reads through the context tool as untrusted text.
Runners report suggested follow-ups with deliver, and the inbox offers each
finished job's follow-ups as a "plan these?" decision on the plans/<job>
target its interview takes. Recommended options come first, the runner and
account fold behind an automatic default, and a plan's thread keeps what it
started from and links its draft proposal.

Finishes quest/m0/kix/planning.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Plan quests through web interviews feat(kix): plan from an idea, pasted context, or a job's follow-ups Oct 24, 2026
@kixelated
kixelated marked this pull request as ready for review October 24, 2026 06:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-10-24T15:27:59.346530Z 339e96e New commits
🔒 Security Review ✅ Completed 2026-10-24T15:29:32.712629Z 339e96e 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: 43243415c3

ℹ️ 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 cloudflare/dev/seed.ts Resolved
A plans/<id> target takes a job's UUID, so the seeded job's follow-ups
could not be planned from the local server. The seed test now plans them
through the inbox form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits October 24, 2026 08:14
Keep both the agent activity cards (#215) and planning: the inbox loads activity jobs and the user's own runners for the new plan box, and both finished quests' links are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep both the plan context test and #210's busy review threads test.

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

Copy link
Copy Markdown
Collaborator Author

Merge summary for 339e96e:

  • Merged main twice (no rebase). kixelated/quest#215 (agent cards) conflicted in cloudflare/src/inbox and jobs/store.ts; both features are kept. load uses feat(kix): show what agents are working on as summary cards #215's activity jobs and presence, and adds the user's own runners so the new plan box can offer them. The inbox keeps feat(kix): show what agents are working on as summary cards #215's layout, and each project row passes those runners to the plan box. store.ts keeps both the follow-ups queries and listActivityJobs. Both finished quests' links (activity.md, planning.md) are gone from the kix epic and execution.md. kixelated/quest#210 conflicted only in publish.test.ts, and both tests are kept. kixelated/quest#214 landed since then and merges cleanly.
  • 0018_plan_request.sql is unchanged. kixelated/quest#209 renumbers its own migration after this lands.
  • Checks: all 13 checks pass on 339e96e and the merge state is clean. Locally, just check (first merge) and just test (final head) passed, and on the final head so did the root and Worker check/test and quest check.
  • Review: Codex gave the new head a thumbs-up, and no review threads are open.
  • quest check --base origin/main --branch quest/m0/kix/planning passes when run with a binary built from the current base.
  • Landing as a squash merge, as the root AGENTS.md requires.
  • The PR body's follow-ups (compact runner/account choice when starting or iterating, and expiring old "plan these?" offers by age) go to /quest-plan.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 79799ee into main Oct 24, 2026
13 checks passed
@kixelated
kixelated deleted the quest/m0/kix/planning branch October 24, 2026 15:40
kixelated added a commit that referenced this pull request Oct 24, 2026
…d fake

#205's plan test asserted on the old inline fake's request log; read it from the
mocked fetch like the rest of the suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit that referenced this pull request Oct 24, 2026
Resolve the overlap with planning (#205) and agent activity (#215),
keeping every feature:

- Renumber 0018_merge_jobs.sql to 0019, after 0018_plan_request.sql, and
  carry its new idea and context columns through the jobs rebuild.
- createJob inserts both the plan request and continues a pull request's
  head for merge jobs as well as iterate.
- The runner's context tool covers plan requests and merge jobs; deliver
  records both a landing and suggested follow-ups.
- Agent cards name merge jobs "Merging".
- Drop the finished activity, planning, and merge-job quests from the
  kix epic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit that referenced this pull request Oct 24, 2026
…b fake (#213)

* chore(quest): claim quest/m0/kix/github-fake.md

Quest-Claim: 64e456e2f74a458a

* test(cloudflare): run publication end to end against the seeded GitHub fake

The seeded fake (dev/github.ts) now models commits and trees in a fork
network's shared object store, fast-forward and forced branch updates on
the upstream and its service fork, pull request listing, creation,
updates, and ready-for-review, and the issue and pull request reads a
job's context makes. Like GitHub, it scopes each installation token to
the repositories and permissions it was minted for, so a write with the
wrong token fails.

publish.test.ts drops its own stateful fake for this one, with a small
world of its own and the shared `intercept` wrapper for lost responses
and concurrent changes. The seed test adds a runner that publishes the
seeded queued job's commits and pull request, and a retry that adopts the
failed import job's pull request, whose fork branch the seed now records.

The local server passes request headers to the fake, which needs them
for token scoping.

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

* test(cloudflare): read the plan test's GitHub requests from the shared fake

#205's plan test asserted on the old inline fake's request log; read it from the
mocked fetch like the rest of the suite.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant