$npx -y skills add butterbase-ai/butterbase-skills --skill journeyUse when the user says "build an app", "let's start", "help me build", "I have an idea for", "ship it", or otherwise signals they want to go from idea to deployed Butterbase app. Orchestrates the full guided journey (idea → plan → preflight → build → deploy → optional hackathon s
| 1 | # Butterbase Guided Journey |
| 2 | |
| 3 | End-to-end orchestrator. Walks the user from idea to deployed Butterbase app, and (in hackathon mode) on through submission. Each stage writes a markdown artifact under `docs/butterbase/` in the user's project. The orchestrator reads `docs/butterbase/00-state.md` to know the cursor and dispatches the matching `journey-*` stage skill. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | Invoke automatically when the user signals end-to-end intent: "I want to build…", "let's build an app", "ship this", "help me build a hackathon project". Invoke explicitly when the user runs `/butterbase-skills:journey`. |
| 8 | |
| 9 | If the user wants to do a single stage only (e.g., just design a schema), defer to the matching standalone skill (`schema-design`) or per-stage command (`/butterbase-skills:journey-schema`) instead of starting the full journey. |
| 10 | |
| 11 | ## Toolchain |
| 12 | |
| 13 | The journey assumes two npm packages alongside the MCP tools: |
| 14 | |
| 15 | | Package | Role | When to install | |
| 16 | |---|---|---| |
| 17 | | `@butterbase/sdk` | TypeScript client for the deployed app — `auth.signIn`, `db.from(...).select()`, `storage.upload`, realtime subscriptions, function invocation. Works both in the browser (frontend) and in Node (functions, scripts, server-side). | Install in any frontend or any Node service that talks to the deployed app. Auto-added by frontend scaffolds. | |
| 18 | | `@butterbase/cli` | Local-dev CLI — project scaffolding, log tailing, function invocation from the shell, API-key generation, schema diff preview without the dashboard. | Install globally (`npm i -g @butterbase/cli`) once per dev machine. Used during `journey-preflight`. | |
| 19 | |
| 20 | The journey will prompt for both in `plan` (which SDK surfaces does the app need?) and `preflight` (is the CLI installed?). The MCP tools and these packages are complementary: MCP is for agentic / orchestration flows; SDK + CLI are for ordinary application code and the human dev loop. |
| 21 | |
| 22 | ## Procedure |
| 23 | |
| 24 | 1. **Detect state.** Check whether `docs/butterbase/00-state.md` exists in the working directory. |
| 25 | - If absent: this is a fresh journey. Ask the user `"Is this a hackathon submission? (yes/no)"` to set `hackathon_mode`. Create `docs/butterbase/` and write a starter `00-state.md` (template below). If `hackathon_mode: false`, the starter template's `submit` row must be written as `- [ ] submit (n/a — not a hackathon)` rather than plain `- [ ] submit`. Then proceed to stage `idea`. |
| 26 | - If present: read the front-matter and the stage checklist. Identify the first unchecked, non-skipped stage. That is the next stage. |
| 27 | |
| 28 | 2. **Confirm with user.** Print a one-line summary of where we are: `"Resuming journey at <stage> for app_id <id or 'not yet provisioned'>."` Ask: `"Continue from <stage>? (yes / jump to other stage / redo previous)"`. |
| 29 | |
| 30 | 3. **Dispatch.** Invoke the matching skill via the Skill tool. Do not do the stage's work inline — delegate. |
| 31 | |
| 32 | | Stage | Skill | |
| 33 | |---|---| |
| 34 | | idea | `butterbase-skills:journey-idea` | |
| 35 | | plan | `butterbase-skills:journey-plan` | |
| 36 | | preflight | `butterbase-skills:journey-preflight` | |
| 37 | | docs | `butterbase-skills:journey-docs` | |
| 38 | | schema | `butterbase-skills:journey-schema` | |
| 39 | | rls | `butterbase-skills:journey-rls` | |
| 40 | | auth | `butterbase-skills:journey-auth` | |
| 41 | | storage | `butterbase-skills:journey-storage` | |
| 42 | | functions | `butterbase-skills:journey-functions` | |
| 43 | | ai | `butterbase-skills:journey-ai` | |
| 44 | | rag | `butterbase-skills:journey-rag` | |
| 45 | | realtime | `butterbase-skills:journey-realtime` | |
| 46 | | durable | `butterbase-skills:journey-durable` | |
| 47 | | agents | `butterbase-skills:journey-agents` | |
| 48 | | frontend | `butterbase-skills:journey-frontend` | |
| 49 | | deploy | `butterbase-skills:journey-deploy` | |
| 50 | | substrate | `butterbase-skills:journey-substrate` (optional) | |
| 51 | | submit | `butterbase-skills:journey-submit` (hackathon_mode only) | |
| 52 | | templates | `butterbase-skills:journey-templates` (optional) | |
| 53 | |
| 54 | **Docs gate.** Stage `docs` runs once, right after preflight, to prime `butterbase_docs` for every capability in the plan. Subsequent build stages start with the relevant docs cached at `docs/butterbase/03b-docs-cache.md`. If the user changes the plan mid-build, re-run `/butterbase-skills:journey-docs` before the affected stage. |
| 55 | |
| 56 | 4. **After the stage skill returns,** re-read `00-state.md` and ask the user whether to advance to the next unchecked stage. Stage selection rules: |
| 57 | - Build-stage order is: schema → rls → auth → storage → functions → ai → rag → realtime → durable → **agents** → frontend. |
| 58 | - If `hackathon_mode: true` and all build stages are done, the next stage is `deplo |