Personal Brain Capability Recipe Design
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
design_doc · markdown

Personal Brain Capability Recipe Design

Personal Brain Capability Recipe Design Purpose Create the first URL addressable capability recipe: a Codex buildable personal brain app. A first time Codex user should be able to paste a recipe URL into Codex and get a working local app without making architecture decisions. The recipe demonstrates the larger capability marketplace thesis: a recipe is not a...

Purpose

Create the first URL-addressable capability recipe: a Codex-buildable personal brain app. A first-time Codex user should be able to paste a recipe URL into Codex and get a working local app without making architecture decisions.

The recipe demonstrates the larger capability marketplace thesis: a recipe is not a package install or static template. It is an agent-executable blueprint that tells Codex what to build, how to configure it, and how to prove it works.

Product Definition

The V1 recipe builds a local personal brain web app connected to a Bezel hosted Supabase sandbox by default. The hosted sandbox lives in the Bezel Projects Supabase database, not the RedKey operating database.

The app lets a user:

  • Capture thoughts.
  • View all submitted thoughts.
  • Promote thoughts into ideas.
  • Promote thoughts or ideas into suggested tasks.
  • Accept suggested tasks into a simple Kanban board.
  • Preserve source evidence from each idea or task back to its originating thought.

The V1 app is intentionally small. It proves the core loop:

``text Recipe URL -> Codex build -> local app -> hosted brain -> thoughts -> ideas -> tasks -> Kanban ``

Target User

The target user is not a developer. They may have installed Codex for the first time and may not know Supabase, SQL, migrations, npm, environment variables, Git, or deployment.

The expected starting prompt is:

``text Build this: https://recipes.bezeliq.ai/personal-brain ``

Codex should then fetch the recipe and guide the user with one plain-English question at a time.

Recipe Delivery Model

The recipe is URL-first.

The public recipe URL should provide:

  • A human-readable page explaining what will be built.
  • A machine-readable manifest at recipe.json.
  • Markdown instructions for Codex.
  • App specifications.
  • Schema and API contracts.
  • Seed/demo data.
  • Acceptance tests.
  • Troubleshooting guidance.

Recommended URL shape:

``text https://recipes.bezeliq.ai/personal-brain https://recipes.bezeliq.ai/personal-brain/recipe.json https://recipes.bezeliq.ai/personal-brain/START_HERE.md https://recipes.bezeliq.ai/personal-brain/codex-instructions.md ``

Golden Path

V1 has one default path: Bezel hosted Supabase sandbox in the Bezel Projects Supabase database.

Codex should:

1. Fetch the recipe. 2. Explain that it will build a local personal brain app. 3. Ask what the user wants to call their brain. 4. Use the Bezel hosted sandbox by default. 5. Scaffold the local app. 6. Connect the app to the hosted sandbox namespace. 7. Seed demo thoughts if the user agrees. 8. Build Thoughts, Ideas, and Tasks boards. 9. Run acceptance checks. 10. Start the local app and give the user the localhost URL.

Codex should not ask the user to choose a database, framework, migration strategy, or deployment target in V1.

Execution Contract

This section removes implementation discretion from the recipe. Codex can improve details inside the selected stack, but it should not choose a different architecture unless the local environment makes the golden path impossible.

Default Stack

The V1 recipe builds:

  • Next.js App Router application.
  • TypeScript.
  • Supabase JavaScript client.
  • Plain CSS modules or a minimal local stylesheet.
  • Local development via npm run dev.
  • Verification via npm run build and a small smoke test script.

The recipe should avoid heavy UI frameworks and package choices that increase setup friction. The generated app should be understandable as ordinary web app code.

Hosted Sandbox Access

The hosted sandbox must not expose a shared unrestricted Supabase service key to the generated app.

The hosted V1 sandbox uses pre-created tables in the Bezel Projects Supabase database. Codex must not run migrations against the hosted sandbox, and the generated local app must not receive credentials capable of creating or altering tables.

V1 should use a Bezel-issued sandbox configuration:

  • BEZEL_BRAIN_API_URL
  • BEZEL_BRAIN_PUBLIC_KEY
  • BEZEL_BRAIN_INSTALL_TOKEN
  • BEZEL_BRAIN_NAMESPACE

The install token identifies the sandbox brain namespace and is used only by the local app/API during setup. The app should store user data under the assigned namespace.

For the first internal recipe demo, these values can be provided by a .env.local template or copied from a Bezel-controlled setup page. The public recipe must state that production users should not paste private personal data into the hosted sandbox until Bezel publishes clear privacy, export, and deletion terms.

Namespace and Identity

V1 does not require full user auth.

The app should create or use one namespace:

  • brain_id: stable identifier for this local brain.
  • brain_name: user-visible name.
  • install_token_hash: server-side reference, never displayed after setup.

All rows must include brain_id. Queries must filter by brain_id.

V2 can replace this with Supabase Auth and row-level security. V1 should still model brain_id explicitly so migration to private Supabase is straightforward.

Recipe Manifest Contract

recipe.json is the machine-readable entry point Codex should read first.

Minimum manifest shape:

``json { "schema_version": "0.1", "recipe_id": "personal-brain-supabase", "name": "Personal Brain", "default_mode": "bezel_hosted_sandbox", "target_user": "first_time_codex_user", "stack": { "app": "nextjs", "language": "typescript", "database": "supabase_hosted_sandbox" }, "entrypoints": { "human": "START_HERE.md", "codex": "codex-instructions.md", "acceptance": "app-spec/acceptance.md" }, "build_outputs": [ "local_web_app", "thoughts_board", "idea_board", "kanban_board", "hosted_sandbox_connection" ], "verification": { "install": "npm install", "build": "npm run build", "smoke": "npm run smoke" } } ``

The manifest should include file checksums or version identifiers once recipes are hosted publicly.

Build Steps

Codex should follow these steps:

1. Read recipe.json. 2. Read START_HERE.md and codex-instructions.md. 3. Create the local app files. 4. Create .env.local.example. 5. Ask for the brain name. 6. Create or configure brain_id. 7. Connect to hosted sandbox using the provided sandbox configuration. 8. Create local data-access helpers that always filter by brain_id. 9. Build the Home, Capture, Thoughts, Ideas, Tasks, and Settings screens. 10. Add demo seed data if the user accepts. 11. Run build and smoke verification. 12. Start the local app.

Verification Commands

The recipe must provide concrete commands:

``bash npm install npm run build npm run smoke npm run dev ``

npm run smoke should verify at least:

  • app can load configuration
  • hosted sandbox connection responds
  • seeded or created thought is readable
  • idea can link to source thought
  • suggested task can link to source thought or idea
  • task status can move through the Kanban statuses

If the sandbox is unavailable, the smoke test should fail with a plain-English message that names the missing configuration or connection failure.