Skip to content

feat: create every crewmate from one card and ask for a schedule in chat - #17677

Closed
buluoray wants to merge 2 commits into
feat/crewmate-quick-createfrom
feat/crewmate-single-create-flow
Closed

buluoray wants to merge 2 commits into
feat/crewmate-quick-createfrom
feat/crewmate-single-create-flow

Conversation

@buluoray

@buluoray buluoray commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A person creates a crewmate in one place, the New crewmate card, and sets up any schedule by talking to the crewmate afterwards.

On the base branch there are two create flows. The New crewmate card (look, name, Advanced settings) is behind "+", and a separate guided chapter, MeetCrewmatesFlow (goal → name → schedule → ready), opens from Captain's create proposals, create links and the crewmate.create guide. Both ask for a goal, they look and behave differently, and the guided one asks for a schedule before the person has said a word to the crewmate.

Why it matters

Two flows for the same job make people learn two surfaces and give guides and Captain two targets to keep in sync. A schedule picked before the crewmate understands the job is a guess; asking in the first conversation, once the goal is clear, produces a schedule that fits the work and is never created without a yes.

Not a goal

  • Changing what the card itself collects or how a crewmate is stored.
  • Changing how schedules run or the schedule tool itself.
  • Removing the backend crewmates_onboarded field (it stays for compatibility).
  • Amending rfc-crewmates-launch.md (an amendment must land on the base first; see the review note below).

What changed (motivation → approach → change)

Goal → one create surface → every former door of the guided chapter now opens the card, and the schedule question moves into the crewmate's first greeting.

  • Removed: MeetCrewmatesFlow.tsx, useMeetCrewmatesGate.ts and their tests, the START_MEET_CREWMATES_EVENT / CREWMATES_PAGE_ENTERED_EVENT events, the creation receipt, and the dead components.meetCrewmatesFlow.* strings in every locale. hasNoCrewmates moves to rosterFilter.ts with its test.
  • Doors: a Captain create link (/members?create=1&name=&goal=, clicked in chat or opened as a deep link) and the crewmate.create guide open the card in place, prefilled: the name in Name, the goal in "What it looks after" with Advanced settings unfolded so it is visible. The chat stays mounted and its draft is kept; closing the card returns to it. An untouched card is replaced by a newer proposal; an edited one asks its own leave guard first.
  • Guide: crewmate.create is a single create step on the card's Create button.
  • Greeting: the crewmate's hidden first turn still asks for the goal (or confirms a written one); once the goal is clear and the work should run on its own, it offers a schedule in plain words and sets it up only after the person agrees, never silently (captain_greeting.py).
  • Docs: crew-mode.md, config.md, crew-members.md and the feature map describe the single card.
  • The two manual pod scripts (verify-assistant-guide.mjs, verify-crewmate-assistant.mjs) drive the card instead of the removed chapter.

Backwards compatibility

Compatible: every URL and guide that opened the guided chapter still works and opens the card; no API or stored field changes.

Reader: website/src/pages/members/MembersPage.tsx:openGuided -- crew page -- replaced by the prefilled card open; MembersPage.test.tsx and NewCrewmateDialog.guided.test.tsx pin the create link, the deep link and the guide door
Reader: src/kiro_crew/guide_catalog.py:crewmate.create -- chat (Captain guides) -- now one create step; test_guide_* pin it
Reader: website/src/components/MeetCrewmatesFlow.tsx:scheduleFor -- none -- no caller outside the removed file
Reader: website/src/hooks/useMeetCrewmatesGate.ts:hasNoCrewmates -- crew page -- moved to rosterFilter.ts, test moved with it

Tests

  • MembersPage.test.tsx ("create links open the New crewmate card"): a create link opens the card prefilled with the name and the goal in an unfolded Advanced settings, without remounting the chat; an empty link opens it folded and empty; a deep link is stripped after reading; malformed escapes do not throw; a prefilled Create sends first_greeting: true and opens the new crewmate; the rules for a newer proposal replacing the card.
  • NewCrewmateDialog.test.tsx (+5) and NewCrewmateDialog.guided.test.tsx (new, 4): the guided door's request headers and lifecycle; an unguided door never touches the guide.
  • test/test_captain_greeting.py: a kickoff carrying a goal still starts with the full kickoff and stays a hidden gateway turn with no transcript row.
  • test_guide_routes.py: frontend and backend agree that crewmate.create is one commit step; guide prefill length caps fit the card's fields. GuideLayer.test.tsx and test_guide_runs.py move their generic multi-step fixtures to mcp.open_add.
  • Mutation check: unfolding Advanced for a goal, the dirty-vs-initialDraft comparison, the guided headers, the refused callback, the draft kept on link click, passing initialDraft, the goal kickoff prefix, the single-step catalog and the field length caps each turn a named test red.

Manual verification

N/A for a live pod in this revision: the change is covered by the jsdom tests above, and screenshots of the prefilled card follow after review of the evidence. The two manual pod scripts were rewritten and pass node --check; they were not run against a pod.

Screenshots / video

Opened from a Captain create link (/members?create=1&name=Scout&goal=…): the name is prefilled, Advanced settings unfolds with the goal in "What it looks after", and the hint under the name says the crewmate will confirm this job.

Prefilled card from a Captain link

The crewmate.create guide pointing at Create

More: end of Advanced settings, phone, empty create link

End of Advanced settings with the second Create

Phone, prefilled

Empty create link: folded and empty

Not capturable as images:

  • The leave guard on an edited card is the browser's native window.confirm ("Leave this page? Your unsaved crewmate draft will be lost."). Reproduced on a test gateway: edit the name, open a second create link, the prompt appears; Cancel keeps the edited draft.
  • The crewmate's first message offering a schedule needs a running agent; the isolated test gateway in this environment cannot start agent processes, so it is covered by test/test_captain_greeting.py only.

Related Issues

Stacked on #17617 (quick create), which is stacked on #15326 (Captain).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@buluoray
buluoray requested a review from a team as a code owner October 7, 2026 09:35
@buluoray
buluoray requested review from CrysisDeu and removed request for a team October 7, 2026 09:35
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 860deb0aae67f4dc700ccc1ae20e2e9af57651b1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

A prefilled card says "your crewmate will confirm this job with you" before any job appears, and the blind reader asked "what job?"

Watch

  • The hint points at a job the reader can't see. Opening the card from a create link now fills in a goal, so the existing create_quick_hint_with_job line ("Once it's created, your crewmate will confirm this job with you.") shows directly under Name, above the folded-open "What it looks after" field. The blind reader on shot-01: "no idea what 'this job' means. I've only typed a name, so what job?" Every Captain-driven create hits this. It causes confusion but doesn't stop the task. Fix: name the field in the hint, e.g. "…will confirm the job below with you."
  • The prefilled goal reads as placeholder text. The goal arrives as text already typed into the field. The reader "can't tell if that's an example or real text I'd be submitting", and on a phone (shot-04) it is cut off at "every morni". Captain's whole proposal sits in a box nobody reads, every prefilled open. Fix: make the goal field a multi-line textarea when it is prefilled, so the full proposal is visible and clearly editable.

Suggestions

  • create_job_hint: the reader couldn't tell whether "can set up a schedule" means the sidebar's Schedule page. Change it to "…your crewmate can add it to your Schedule with you once it's created."

[UX-REVIEWED] 860deb0

Description read

[DESCRIPTION-READ] 8aaea58174f474fbdd09fc77a93e8bf94f94928dc6f5d3cb4b82ac27ca092ef1

That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🔴 BLOCK

Premise-level review of 860deb0aae67f4dc700ccc1ae20e2e9af57651b1 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: BLOCK

product-shape change without accepted RFC: this PR removes the guided four-step create flow, which accepted rfc-crewmates-launch.md §08 records as "Decided".

Not justified as shipped

  • Item 1 — product-shape, no recorded decision: the base RFC says "Decided: a four-step flow … not a single card" and "The Crewmates page keeps its on-demand Meet CrewMates entry". The description agrees the RFC still stands: "an amendment must land on the base first".
  • Item 2 — product-shape, no recorded decision: the schedule step becomes an offer the model makes in its first message (CREWMATE_GOAL_KICKOFF). That replaces step 3 of RFC §08 ("what it looks after, when, and where it reports").

What this change ships

Inventory (7 items) — 4 justified

Intent: a person creates any crewmate from the one New crewmate card and agrees a schedule with the crewmate in chat. ADDITION, with a capability removed.

  1. The guided Meet CrewMates flow (goal → name → schedule → ready) is gone — product-shape, no recorded decision
  2. The schedule is asked for in the crewmate's first message, not in a form step — product-shape, no recorded decision
  3. Captain create links and deep links open the New crewmate card prefilled — justified
  4. The crewmate.create guide is now one step: press Create on the card — justified
  5. The creation receipt shown after creating is gone — rides along with item 1
  6. Dead meetCrewmatesFlow strings and the crewmates_onboarded frontend type are removed — justified
  7. The e2e setup no longer sets the mc-crewmates-onboarded flag — justified

Blockers

  • product-shape change without accepted RFC: removing the Meet CrewMates flow and moving schedule setup into the chat
    rfc-crewmates-launch.md is accepted on the base, and its §08 decides the opposite shape. The PR does not amend it ("Not a goal: Amending rfc-crewmates-launch.md").
    Clears when: an amendment to rfc-crewmates-launch.md §08 that covers a single-card create with the schedule set in chat is merged non-draft on the base, followed by a push or rebase; or a maintainer posts /ai-review override first-principles 860deb0aae67f4dc700ccc1ae20e2e9af57651b1: <decision>.

[FIRST-PRINCIPLES-REVIEWED] 860deb0

Description read

[DESCRIPTION-READ] a86e3acb0b87094ea3f21934ae90da85ecc8df714e7dbd5b5bbc4aa9bdafda70

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

Design-level review of 860deb0aae67f4dc700ccc1ae20e2e9af57651b1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

The description promises a schedule "is never created without a yes", but only a sentence in the greeting prompt backs that, and nobody has run it against a live agent.

Watch

  • The schedule step went from code to the model, and it is unproven. The base flow called api.createCron itself, bound the job to the crewmate's member_id, set delivery (silent: false, hide_in_chat) and checked a failed write against the Schedule list. The new path is one instruction in CREWMATE_GOAL_KICKOFF: "Set it up with your schedule tool… only after they say yes". Whether the crewmate asks first, which delivery and chat settings it picks, and what it does when capabilities.cron refuses it are now up to the model. test_captain_greeting.py only checks the prompt text. The description says "Manual verification: N/A" and that the offer "needs a running agent". The base binds the job to the crewmate through the creating session (bind_cron_memory), so it does run as the right crewmate.
    Clears when: a transcript from a live gateway shows a new crewmate offering a schedule, waiting for "yes", and the job created by cron_add appearing on the Schedule page bound to that crewmate. Otherwise, soften the description's "never created without a yes" claim to match what is actually enforced.
  • Two docs still describe the removed chapter. docs/build/gui-user-test.md:222 says "so that chapter never opens", and the comments in website/scripts/lib/crew-pod-harness.mjs:93 describe a Meet CrewMates first-run flow that no longer exists. Both readers keep working, but they now document behaviour that is gone.
    Clears when: both are reworded to say crewmates_onboarded is a legacy flag with no effect.

[DESIGN-REVIEWED] 860deb0

Description read

[DESCRIPTION-READ] d52014f4878cf66ba4e94d6203e64fd791f904d7015195da8c897fe68fd93e34

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 860deb0aae67f4dc700ccc1ae20e2e9af57651b1 — this comment is updated in place on each push.

Review details

Re-opening a dirty New crewmate card keeps the draft the user just confirmed discarding.

FINDING — website/src/pages/members/MembersPage.tsx:1194 — At md and up, the roster's "+" stays visible while the card is open. Say the card was opened from "+" and the user typed a name. Picking "+" → New crewmate again runs openCreate(false), and mayLeave() shows the "draft will be lost" confirm. After the user agrees, setCreateDraft(draft ? { ...draft } : undefined) sets the same undefined and leaves expanded/open unchanged. None of the dialog's reset deps ([open, closeWsModal, startExpanded, initialDraft]) change, so the typed name stays. Meanwhile createEditedRef.current = false marks a dirty card as pristine, and the dialog does not report again until dirty changes. → Fix: always pass a new object (draft ? { ...draft } : { name: '', goal: '' }) so a granted re-open re-fills the card, and drop the manual createEditedRef.current = false.

[OPUS-REVIEWED] 860deb0

Verdict parsed from the review's SHA-scoped output markers for commit 860deb0aae67f4dc700ccc1ae20e2e9af57651b1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 860deb0aae67f4dc700ccc1ae20e2e9af57651b1: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 860deb0aae67f4dc700ccc1ae20e2e9af57651b1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 860deb0

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 860deb0aae67f4dc700ccc1ae20e2e9af57651b1: <one-sentence reason>

@buluoray
buluoray force-pushed the feat/crewmate-single-create-flow branch from d64c97f to b081792 Compare October 7, 2026 09:49
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 7, 2026
@buluoray
buluoray force-pushed the feat/crewmate-quick-create branch from d212678 to bbc1dc4 Compare October 7, 2026 09:54
@buluoray
buluoray force-pushed the feat/crewmate-single-create-flow branch 2 times, most recently from fa19512 to f883469 Compare October 7, 2026 09:57
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 7, 2026
The guided goal, name and schedule chapter is removed. Captain's create
proposals, create links and the crewmate.create guide open the New
crewmate card prefilled with the name and goal. The crewmate asks its
goal in its first greeting and offers a schedule only when the person
agrees.
@buluoray
buluoray force-pushed the feat/crewmate-single-create-flow branch from f883469 to 860deb0 Compare October 7, 2026 11:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 7, 2026
@buluoray
buluoray force-pushed the feat/crewmate-quick-create branch from bbc1dc4 to 3f4a0bc Compare October 7, 2026 18:47
@buluoray

buluoray commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #17617 at the owner's request; that PR now carries the single create flow as one commit (3f4a0bc).

@buluoray buluoray closed this Oct 7, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 7, 2026
@bolichen97
bolichen97 deleted the feat/crewmate-single-create-flow branch November 6, 2026 07:20
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