MVP slices

The order of work: one usable feature at a time.

Build one working feature at a time. Each slice ends with something I can use, committed and deployed, before the next starts. Schema changes happen only when a slice needs them, and any migration on the shared database pauses so I can review its SQL first.

plan.md is the longer design reference. This doc is the order of work.

1. An agent writes a page, and it's live

I can: ask an agent to write a page, have it save it straight to goatboat through MCP, publish it, and see it on my site at its URL, rendered with my components.

  • Site: app/[...path]/page.tsx fetches the row with getContentByPath and renders its markdown body. Headings map to H2–H6 (ids from the same rule as goatboat's TOC), paragraphs to Paragraph, lists to List, inline code to InlineCode, fences to CodeBlock, links to NextLink. Moved paths redirect; missing paths 404. Raw HTML in markdown isn't rendered. Drafts render only in local dev (npm run dev), with a "Draft" badge; in production they 404. No preview secrets or cookies.
  • Goatboat: a local MCP server (stdio) over the write API, registered in .vscode/mcp.json and launched through bws run for the token. Tools: get_page(path), list_pages(parent?), create_page(path, body, title?) (title falls back to the first # heading, parent comes from the path, status draft), update_body(path, body), and publish_page(path). Writes return the page's URL. No front matter: goatboat is the source of truth for metadata. VS Code asks me to confirm each tool call, which is my approval step for publishing.
  • Try it: have an agent create this plan as /docs/mvp, read it on localhost, then publish it.

Done when: an agent creates a page through MCP, I read the draft on localhost, and after I approve publish_page it shows on the live site.

2. Safe edits to published pages

I can: have an agent edit a published page without readers seeing the changes until I publish again.

  • Goatboat (migration): draft_body. On a published page, update_body writes the draft and leaves body alone; publish_page copies the draft into body. Drafts are only readable with a token.
  • Site: local dev renders draft_body when there is one.

Done when: a published page shows old content in production and the new content on localhost, until I publish.

3. Editing local files (optional)

I can: edit a page as a local file by hand and watch the preview update on every save. Only needed if I want to write outside an agent; agents use the MCP tools directly.

  • Goatboat: npm run pull -- <path> writes an existing page's body to a local file and records which row it belongs to in a small mapping file in that folder (.goatboat.json), so the markdown stays clean. npm run watch -- <dir> saves each changed file as a draft. A save is refused if the draft changed elsewhere since the file was last pulled.

Done when: editing a file updates the preview within a couple of seconds, with no command per edit.

4. Nav from the database

I can: reorder or add nav items in the database without touching site code.

  • Goatboat (migration): in_nav on content; GET /api/nav returns top-level nav rows in sort_order.
  • Site: SiteNav reads it. routes.ts goes away.

Done when: changing sort_order or in_nav changes the nav on the next page load.

5. Every page has a row

I can: get breadcrumbs and titles on code pages too, without registering them by hand.

  • Site: npm run routes:sync walks src/app/**/page.tsx (skipping route groups, _private folders and dynamic segments), reads each page's export const metadata, and posts the list to goatboat. Runs on production deploys and never fails the build.
  • Goatboat (migration): source (db | approute) and file. The sync endpoint creates rows for new app routes and flags missing ones, without overwriting anything edited in goatboat.
  • Site: breadcrumbs in PageLayout for every page.

Done when: adding a new page.tsx and deploying gives it a row and breadcrumbs automatically.

6. Unlisted pages

I can: keep /tests and other work-in-progress pages public by URL but out of feeds, the sitemap and search engines.

  • Goatboat (migration): unlisted status; feeds and tags skip it.
  • Site: unlisted pages get noindex and a short banner. app/sitemap.ts lists published, listed pages.

Done when: /tests pages show their banner, carry noindex, and are absent from the sitemap.

7. Programs routed by data

I can: build a TSX program in src/programs/, give it a URL in goatboat, and move it later with redirects, without moving files.

  • Goatboat (migration): program added to source, plus component_key. The sync registers new programs as drafts with no URL until I give them one.
  • Site: the sync also writes src/programs/registry.ts. The catch-all renders program rows through it.
  • Try it: move the API test-run page into a program.

Done when: changing a program's path in goatboat moves it, and the old URL redirects, with no deploy.

8. Goatboat UI

I can: list, edit, preview and publish content in a browser instead of with commands.

9. Agents propose, I approve

I can: let agents propose changes in batches, then review and approve them.

10. AI-proposed metadata

I can: push a body and get a proposed title, description, tags and parent based on its content, ready to approve.

  • Goatboat: after a push, a model reads the body and files its suggestions as a proposal (slice 9), so nothing changes until I approve.

When needed

  • Remote MCP: move the MCP server into goatboat on Vercel so agents anywhere can use it, not just ones on my laptop.
  • Multiple sites: a sites table and site_id, when a second site starts reading from goatboat.
  • Asset and project writes: when a slice needs them.
  • Per-agent tokens and human login: with slice 9.