-
Notifications
You must be signed in to change notification settings - Fork 62
feat: add guided setup prompt for coding agents (start.md) #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Yohan Lasorsa (sinedied)
wants to merge
16
commits into
microsoft:main
Choose a base branch
from
sinedied:start-md
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3325b29
feat: add start.md prompt
sinedied 53b7a37
docs: add guided setup prompt for coding agents
sinedied ca6ac47
docs: fix starter prompt link to content/start.md
sinedied a0794ed
docs: use colons instead of em-dashes in start.md headings
sinedied 939c5ac
fix: address PR review on start.md
sinedied 02e16f9
docs: unwrap hard line breaks in start.md
sinedied d6783d7
docs: fetch the skill via the agent's web fetch, not curl
sinedied 837d530
docs: simplify prompt
sinedied 7fcbe8a
docs: reduce start.md
sinedied e54ecae
fix: verbosity
sinedied bd6194c
docs: simplify command
sinedied 98cf747
fix: node.js versions and winget install
sinedied 2e56228
fix: missing --project-name flag
sinedied 35ed66b
fix: ensure supported node version and remove double quotes
sinedied 42f3092
ci: add workflow to validate absence of straight double quotes
sinedied 93386e1
docs: improve node.js version handling
sinedied File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Validate start.md prompt | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - content/start.md | ||
| - .github/workflows/validate-start-prompt.yml | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - content/start.md | ||
| - .github/workflows/validate-start-prompt.yml | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| no-straight-quotes: | ||
| name: No straight double quotes in start.md | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Reject straight double quotes | ||
| run: | | ||
| if grep -n '"' content/start.md; then | ||
| echo | ||
| echo "::error file=content/start.md::start.md must not contain straight double quotes" | ||
| cat <<'EOF' | ||
| content/start.md contains straight double quotes (") on the lines above. | ||
|
|
||
| Why this breaks: | ||
| The README documents launching the prompt as a single command, which | ||
| fetches this file and passes it to copilot as a native-process argument: | ||
|
|
||
| copilot -i "$(curl -sSfL https://aka.ms/rayfin/start.md)" | ||
| copilot -i (irm https://aka.ms/rayfin/start.md) | ||
|
|
||
| Windows PowerShell 5.1 is still the default shell on Windows, and its | ||
| legacy argument parser splits native-command arguments on embedded | ||
| straight double quotes. The prompt arrives truncated, with the remainder | ||
| passed as stray operands, so the user lands in a broken session. | ||
| pwsh 7 handles it correctly, but 5.1 is the default path we document. | ||
|
|
||
| How to fix: | ||
| Reword to avoid the quotes (preferred), for example | ||
| "20 or later" -> 20-or-later | ||
| or use single quotes, or backticks for inline code. | ||
|
|
||
| Apostrophes and backticks are fine: only straight double quotes break the | ||
| PowerShell 5.1 argument parser. | ||
| EOF | ||
| exit 1 | ||
| fi | ||
| echo "OK: no straight double quotes in content/start.md" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Rayfin: New Project Setup | ||
|
|
||
| You're helping a developer create a new Rayfin project. Rayfin is a TypeScript Backend-as-a-Service: decorate data models to get auto-generated APIs (REST + GraphQL), typed clients, auth, storage, and a local dev stack. | ||
|
|
||
| **Core rule:** Rayfin's specifics are version-locked per project, so once a project exists, never answer schema/API/auth/storage/deployment questions from memory: remembered Rayfin APIs are routinely wrong. Defer to the project's installed skill, `rayfin docs`, and `rayfin` MCP (Step 4). | ||
|
|
||
| **One question at a time:** whenever you need input from the user, ask a single question and wait for the answer before asking the next. | ||
|
|
||
| ## Step 1: Ask what they want to build | ||
|
|
||
| Ask what they want to build, and confirm a kebab-case project name. Infer whether it targets Microsoft Fabric or should be self-contained, only clarifying if it's unclear. This guides the template choice in Step 3 and the customization in Step 4. | ||
|
|
||
| Keep it short if the working directory already looks like an existing app: Step 3 determines the exact situation and never creates a project nested inside or beside another one. | ||
|
|
||
| ## Step 2: Check prerequisites | ||
|
|
||
| Before running any `npx` command: `node --version` and `git --version`. Rayfin supports Node **LTS** releases, currently v20, v22 and v24. Odd-numbered major like 21, 23 or 25 are unsupported. Install anything missing first: | ||
|
|
||
| - macOS: install the LTS build from [nodejs.org/en/download](https://nodejs.org/en/download), which defaults to LTS. Homebrew's `node` formula tracks Current, so avoid it here. For git, use `brew install git` or the Xcode Command Line Tools. | ||
| - Windows: `winget install -e --id OpenJS.NodeJS.LTS` then `winget install -e --id Git.Git` | ||
| - Linux (Debian/Ubuntu): `curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -` then `sudo apt install -y nodejs git` | ||
|
|
||
| Don't proceed until `node --version` reports an LTS release, meaning v20.x, v22.x or v24.x today. When a newer LTS line ships, prefer it, and fall back to the most recent LTS the scaffolder accepts if it rejects the brand-new one. | ||
|
|
||
| ## Step 3: Get into a project | ||
|
|
||
| Don't scaffold from memory: fetch the getting-started skill and follow it. It is the canonical source for project detection, the default template, and the exact CLI commands, and it is kept up to date as those change. | ||
|
|
||
| Fetch and read this URL: | ||
|
|
||
| <https://raw.githubusercontent.com/microsoft/rayfin/main/skills/rayfin-getting-started/SKILL.md> | ||
|
|
||
| Then follow it to detect whether you're already in a Rayfin project, in an existing non-Rayfin app, or in an empty directory, and to run the right command for that case. Feed it what you learned in Step 1: what the user wants to build, and a kebab-case project name you've confirmed with them. | ||
|
|
||
| Once it has scaffolded, make sure you're at the project root before continuing: `create-rayfin` creates a child directory, while an in-place init leaves you where you are. Then continue to Step 4. | ||
|
|
||
| ## Step 4: Load the in-project skill, then plan & customize | ||
|
|
||
| Before writing any Rayfin-specific code, hand off to the project's authoritative, version-locked sources: | ||
|
|
||
| 1. Load `.agents/skills/rayfin/SKILL.md` and follow it; if your tooling supports it, reload tools to bring the `rayfin` MCP online. | ||
| 2. Look up version-matched APIs via `rayfin docs` and the `rayfin` MCP instead of guessing. The skill file and `rayfin docs` work as soon as the project exists, so don't block waiting on the MCP reload. | ||
|
|
||
| Then plan before you build: outline the first changes for what they described in Step 1 (entities under `rayfin/data/`, views under `src/`, packages to install) and confirm that plan with the user before writing code. If your tooling has a planning mode, use it. | ||
|
|
||
| Don't start the backend or frontend; the user runs the app themselves when ready (see the project's `README.md`). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "name": "rayfin", | ||
| "version": "0.4.0", | ||
| "version": "0.4.1", | ||
| "description": "Getting-started router skill for Rayfin - scaffold a new app with the Rayfin CLI, then use the version-locked skill installed in the project." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if
curlfails here, command substitution still expands (to an empty string) and copilot gets launched with an empty prompt, so the user lands in an unprimed session instead of the rayfin flow. worth fetching first and gating launch on both success and non-empty content, something like:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to push back on this one: splitting the command like this would only catch network failures, but a wrong aka.ms or temp failures return HTML without a 404 or any error. Not sure the catch here is worth the added complexity, keeping the command simple is part of the quickstart appeal IMHO.
Worst case, having an empty starter prompt is harmless as it just start copilot CLI and idle.
I considered doing something like `copilot -i "$(curl -sSfL https://aka.ms/rayfin/start.md || echo 'Error while fetching rayfin starter')", but showing "error" or something alike in a starter command doesn't send a good message for folks just scanning text and it also triggers copilot CLI instead of standing by. I don't think the tradeoff is worth it.
For reference, other frameworks using this "start.md" command just keep the command simple, ie: https://plainframework.com/