Repository navigation
feat(cli): print next steps after projects create in agent mode - #7875
myerekapan wants to merge 6 commits into
Conversation
…th-709-projects-create-next-steps
|
Manual check, from source against a local stub of the Management API:
|
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.7 MB, up 4.0 KB from 135.7 MB. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
There was a problem hiding this comment.
🤖 AI Review
CLI reference prose guidance: snapshot supabase/supabase@8028b57 supplied to reviewers (advisory, not a style pass).
Confirmed three distinct test-coverage gaps in the new agent-only projects create hint. Source inspection found no production defect, overlay drift, or conflict with pending work on next. The diff changes runtime output and contains no CLI reference prose in scope for style review. Workspace dependencies were absent, so the verdicts are based on source inspection.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/commands/projects/create/create.integration.test.ts:186 |
test-coverage |
codex | The deployment hint test would pass if the displayed command omitted --remote or pointed to a different project. |
| 🟡 MINOR | apps/cli/src/commands/projects/create/create.integration.test.ts:200 |
test-coverage |
codex | The explicit --agent no test would pass if the handler returned successfully without creating a project. |
| ⚪ NIT | apps/cli/src/commands/projects/create/create.integration.test.ts:179 |
test-coverage |
claude | The integration suite does not verify that --output-format stream-json emits the agent hint as a log event after the project creation result event. |
Stats
Claude findings: 1 · Codex findings: 2 · Confirmed: 3 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Coly010
left a comment
There was a problem hiding this comment.
Requesting changes for the stream-json ordering. The rest is smaller stuff.
- In
--output-format stream-jsonthe hint comes out as alogevent after theresultevent.startshows its nudge beforeoutput.success, so its result stays the last event. Anything reading the stream that way (tail -n1 | jq .data, or stopping atresult) will either break or miss the hint here, and agents are the ones most likely to read it like that. The core sends the result itself, so maybe the simplest fix is to emit the hint insideprojectCreateCorejust before the result, behind an option that bootstrap leaves off? Open to other ways of doing it though. - Smaller one:
emitNudgeis now exported fromstack-nudge.ts, but this isn't really a stack nudge. Might be worth moving the helper somewhere neutral and importing it from both places. - +1 to the bot's test comments. A stream-json test that checks
resultis the last event would also have caught 1.
Non-blocking, feel free to disagree with either:
- Unless I'm mistaken, the project is still
COMING_UPwhen this prints, and an agent will run the next command straight away. I haven't checked whetherfunctions deployfails on a project that's still starting up, but a line saying it's still provisioning might save the agent a confusing first failure. - I wonder if these should eventually go in the structured result as well, something like
next_steps: [{ description, command }], the way errors carrysuggestion. Not for this PR, just something to think about.
Otherwise looks good to me!
…th-709-projects-create-next-steps
supabase projects createnow prints a short next-steps block when a coding agent is driving the CLI: the project's API URL, the command that fetches its API keys, and the command that deploys a function. Runs by a person at a terminal are unchanged.Changed:
--agent yes, or a detected coding agent).--agent noprints nothing.-o json|yaml|toml|envthe block goes to stderr, through the helper the stack nudges already use (I moved it to its own file). With--output-format jsonit goes to stderr, and withstream-jsonit is alogevent before theresultevent, which stays the last event.bootstrapunchanged: I emit the block from the shared create core, behind an option that onlyprojects createturns on.Note: the commands in the block use
--remote=<ref>, since--project-refis deprecated.Linear