{
  "generated_at": "2026-05-09T13:00:56.512Z",
  "artifacts": [
    {
      "id": "studio-c176114d-7933-429c-97a7-d9bad1e591d4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c176114d-7933-429c-97a7-d9bad1e591d4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.418Z",
      "artifact_type": "blueprint",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Marketing Studio blueprint",
      "summary": "blueprint artifact · for Marketing Studio · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "d538979e-145c-41be-9abb-0fab715a3e86",
      "project_slug": "bezeliq-marketing-studio-d538979e",
      "project_title": "Marketing Studio",
      "client_id": "bezeliq",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "api",
        "stack",
        "schema",
        "services"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- api: endpoints: object\n- stack: backend: string, hosting: string, database: string, frontend: string\n- schema: tables: object\n- services: env_vars: object"
        }
      ],
      "html_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/blueprint-c176114d.html",
      "json_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/blueprint-c176114d.json"
    },
    {
      "id": "studio-9aa20df7-e5a3-46ab-961e-223e450567c9",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/9aa20df7-e5a3-46ab-961e-223e450567c9",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.418Z",
      "artifact_type": "research",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Marketing Studio research",
      "summary": "The Marketing Studio is a new workspace within studio.bezeliq.ai that surfaces the existing five-agent marketing pipeline (Nova → Harper/Jade/Rosa → Ivy) through a UI designed for creative direction, not approval queue management. Today the pipeline runs completely blind: Nova writes a prose weekly_plan.md to Google Drive, Harper/Jade/Rosa write versioned content files back to Drive, and Justin receives an inbox exec task to select versions. Ivy then stages the selected file to a published/ subf",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "d538979e-145c-41be-9abb-0fab715a3e86",
      "project_slug": "bezeliq-marketing-studio-d538979e",
      "project_title": "Marketing Studio",
      "client_id": "bezeliq",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "risks",
        "summary",
        "prior_art",
        "open_questions",
        "tech_decisions"
      ],
      "sections": [
        {
          "title": "Risks",
          "level": 2,
          "body": "- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string\n- item: risk: string, mitigation: string"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OPEN — X API tier: Justin's current X/Twitter API tier (Free, Basic, Pro) must be confirmed before V1 blueprint. Free tier blocks POST /2/tweets. Upgrade to Basic ($100/month) required if currently on Free tier.\n- RESOLVED — Unipile LinkedIn: Confirmed. Unipile supports POST /api/v1/posts/ with account_id, text, attachment. No fallback needed. createPost function to be added to scripts/lib/unipile.js.\n- RESOLVED — Blog CMS: Eleventy static site at dreamborn.ai. No CMS API. Auto-publish = git commit .md file + Cloudflare Pages/Netlify deploy hook. Blueprint must include this mechanic.\n- RESOLVED — Fifth channel: YouTube is the fifth channel (blog, substack, linkedin, x, youtube). YouTube pieces in V1 = video concept + description text artifact. Full video auto-upload is V2. 14+/week target includes YouTube concept pieces.\n- RESOLVED — Image style: Rosa selects per content type. Photorealistic for product/lifestyle, illustrated for concepts, typographic for quotes/stats, data-viz for metrics. Variety signals human creative direction.\n- RESOLVED — Voice edit enforcement: Two paths on personal channels — (a) Edit+Approve (primary CTA), (b) Approve-as-is (deliberate secondary action, visually distinct). No gate. The discipline is Justin's, not the software's."
        }
      ],
      "html_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/research-9aa20df7.html",
      "json_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/research-9aa20df7.json"
    },
    {
      "id": "studio-6ab0ab24-bc6b-4c3d-9263-d96c0b680464",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6ab0ab24-bc6b-4c3d-9263-d96c0b680464",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.418Z",
      "artifact_type": "spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Marketing Studio v1 — Spec",
      "summary": "spec artifact · for Marketing Studio · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d538979e-145c-41be-9abb-0fab715a3e86",
      "project_slug": "bezeliq-marketing-studio-d538979e",
      "project_title": "Marketing Studio",
      "client_id": "bezeliq",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "features",
        "open_questions"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-1: id: string, status: string, question: string\n- OQ-2: id: string, status: string, question: string\n- OQ-3: id: string, status: string, question: string\n- OQ-4: id: string, status: string, question: string\n- OQ-5: id: string, status: string, question: string"
        }
      ],
      "html_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/spec-6ab0ab24.html",
      "json_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/spec-6ab0ab24.json"
    },
    {
      "id": "studio-66fe573b-dc14-4f2a-94bf-951b25dff34d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/66fe573b-dc14-4f2a-94bf-951b25dff34d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.418Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Marketing Studio intent",
      "summary": "Marketing operation exists across multiple agents (Nova, Harper, Jade, Rosa) but lacks a centralized workspace. Content is scattered in Google Drive, approval is a bottleneck in Justin's inbox, and there's no place for Justin to actively shape voice and strategy. The workflow doesn't enable creative collaboration—it's just file reading and button clicking—resulting in a broken loop between agent output and what Justin actually wants to publish.",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "d538979e-145c-41be-9abb-0fab715a3e86",
      "project_slug": "bezeliq-marketing-studio-d538979e",
      "project_title": "Marketing Studio",
      "client_id": "bezeliq",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "users",
        "problem",
        "brand_voice",
        "project_name",
        "ux_philosophy",
        "scope_boundary",
        "non_negotiables",
        "success_metrics",
        "what_wrong_looks_like"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "Marketing operation exists across multiple agents (Nova, Harper, Jade, Rosa) but lacks a centralized workspace. Content is scattered in Google Drive, approval is a bottleneck in Justin's inbox, and there's no place for Justin to actively shape voice and strategy. The workflow doesn't enable creative collaboration—it's just file reading and button clicking—resulting in a broken loop between agent output and what Justin actually wants to publish."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Create a studio where Justin functions as a creative director rather than a content approver. He sets themes, shapes angles, finishes voice on pieces carrying his name, while agents handle production at volume. The studio surfaces ideas, produces drafts, generates images, and publishes automatically—with Justin's involvement being judgment and taste, not production."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, measure: string\n- item: metric: string, measure: string\n- item: metric: string, measure: string\n- item: metric: string, measure: string"
        }
      ],
      "html_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/intent-66fe573b.html",
      "json_path": "projects/bezeliq-marketing-studio-d538979e/artifacts/intent-66fe573b.json"
    },
    {
      "id": "studio-d9c89554-4909-4104-aaf5-abc8cc82153a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d9c89554-4909-4104-aaf5-abc8cc82153a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.417Z",
      "artifact_type": "research",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI research",
      "summary": "research artifact · for KnowledgeVault AI · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "project",
        "version",
        "demo_flow",
        "generated",
        "key_stats",
        "pages_needed",
        "user_stories",
        "market_context",
        "the_dual_narrative",
        "competitive_landscape",
        "architecture_decisions",
        "independent_ai_reviews",
        "ai_first_model_inversion",
        "open_questions_for_blueprint"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- project: KnowledgeVault AI\n- version: 1.1\n- demo flow: steps: object, format: string, the_gut_punch: string, total_duration: string, target_audience: string\n- generated: 2026-04-29\n- key stats: 5 items\n- pages needed: how_it_works: string, selling_page: string, expert_signup: string, marketplace_home: string, company_dashboard: string, capture_experience: string\n- user stories: the_buyer_story: object, the_plumber_demo: object\n- market context: the_crisis: string, market_size: string, why_distribution: string\n- the dual narrative: the_ask: string, real_story: string, surface_story: string, what_ad_cares_about: object\n- competitive landscape: the_gap: string, existing_tools: object, the_fundamental_flaw: string, why_they_fail_in_distribution: string\n- architecture decisions: locked: boolean, review_sources: object, virtual_expert: object, payment_integrity: object, model_architecture: object, session_context_object: object, structured_decomposition: object\n- independent ai reviews: openai_o3: object, gemini_2_5_pro: object"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/research-d9c89554.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/research-d9c89554.json"
    },
    {
      "id": "studio-f67b3e40-e5c9-4b8e-af47-d53ae9a9732f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f67b3e40-e5c9-4b8e-af47-d53ae9a9732f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "feature-ux-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI feature-ux-spec",
      "summary": "feature-ux-spec artifact · for KnowledgeVault AI · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "features",
        "cross_cutting",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/feature-ux-spec-f67b3e40.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/feature-ux-spec-f67b3e40.json"
    },
    {
      "id": "studio-e2244f07-0c89-460b-a26f-024b2af61fcd",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e2244f07-0c89-460b-a26f-024b2af61fcd",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "policy",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI policy",
      "summary": "policy artifact · for KnowledgeVault AI · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "body",
        "format",
        "generated_at",
        "generated_by"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- body: # KnowledgeVault AI — Code & Merge Policy\n**project_id:** 572d75d0-3088-4055-be75-601d25442c61  \n**artifact_type:** policy  \n**generated_by:** vikram  \n**generated_at:** 2026-04-30  \n**status:** draft\n\n> **Quinn:** This policy is your pre-merge checklist. Hard rules block merges. Warn rules require human sign-off. Run each applicable check before closing any module PR.\n\n---\n\n## Rules\n\n### POL-SEC-001 — Row-Level Security on All User Tables\n| Field | Value |\n|---|---|\n| **Category** | security |\n| **Severity** | **HARD** |\n| **Applies to** | `supabase/migrations`, `apps/web/src/lib`, `apps/web/src/app/api` |\n\n**Description:** RLS must be ENABLED on every Supabase table storing user data (experts, sessions, transcripts, knowledge_items, assets, payouts, companies). No user-facing query may bypass RLS via service_role except in explicitly named admin server actions.\n\n**Check:**\n```sql\n-- Must return empty result set (all user tables have at least one policy)\nSELECT tablename FROM pg_tables\nWHERE schemaname = 'public'\n  AND tablename NOT IN (\n    SELECT tablename FROM pg_catalog.pg_policies\n    WHERE schemaname = 'public'\n  );\n```\nAlso:\n```bash\ngrep -r 'supabaseAdmin\\|service_role' apps/web/src \\\n  | grep -v '/api/admin/\\|/lib/server/admin.ts'\n# Must return zero matches\n```\n\n**Rationale:** KnowledgeVault stores proprietary trade knowledge and PII. A missing RLS policy is a full data breach — any authenticated user can read all rows.\n\n---\n\n### POL-SEC-002 — JWT Role Validation on Every API Route\n| Field | Value |\n|---|---|\n| **Category** | security |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/app/api`, `apps/web/src/app/actions` |\n\n**Description:** Every Next.js API route and server action that returns data must call `supabase.auth.getUser()` and confirm the role claim before touching any DB row. Silent fail (returning empty data instead of 401/403) is not acceptable.\n\n**Check:**\n```bash\n# For each API route file, confirm getUser call is present\ngrep -rn 'export.*async.*POST\\|export.*async.*GET' apps/web/src/app/api \\\n  --include='*.ts' | while IFS=: read file line rest; do\n  grep -q 'getUser\\|auth.api.getUser' \"$file\" \\\n    || echo \"MISSING getUser: $file\"\ndone\n# Any output = hard block\n```\nAlso: any route returning 200 without `getUser` must be listed in `/src/lib/public-routes.ts`.\n\n**Rationale:** Without JWT verification, unauthenticated clients can POST directly to API routes. Supabase RLS alone is insufficient when service_role is used in server routes.\n\n---\n\n### POL-SEC-003 — Input Sanitization Before DB Writes and AI Calls\n| Field | Value |\n|---|---|\n| **Category** | security |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/lib/sanitize.ts`, `apps/web/src/app/api`, `apps/web/src/app/actions` |\n\n**Description:** All user-supplied free-text (voice transcript output, expert profile fields, company descriptions, question answers) must pass through `sanitizeInput()` before being written to Supabase or passed to Claude/Deepgram. The utility must strip HTML tags, truncate to max field length defined in schema, and reject SQL injection patterns.\n\n**Check:**\n```bash\n# For each insert/update call site, confirm sanitizeInput appears within 30 lines above\ngrep -rn '\\.insert\\|\\.update' apps/web/src --include='*.ts' --include='*.tsx' \\\n  | while IFS=: read file line rest; do\n  context=$(sed -n \"$((line-30)),$((line))p\" \"$file\")\n  echo \"$context\" | grep -q 'sanitizeInput' \\\n    || echo \"MISSING sanitizeInput before DB write: $file:$line\"\ndone\n# Any output = hard block\n```\n\n**Rationale:** Transcript data originates from external audio and may contain adversarial content. Unsanitized strings fed to Claude or stored in pgvector embeddings can corrupt the knowledge base.\n\n---\n\n### POL-SEC-004 — No Secrets in Source Control\n| Field | Value |\n|---|---|\n| **Category** | security |\n| **Severity** | **HARD** |\n| **Applies to** | all source files, `.gitignore` |\n\n**Description:** No secret, API key, token, or credential may appear in committed source. Secrets permitted only in `.env.local` (gitignored), Vercel/CI environment variables, Supabase vault. All references in code must use `process.env.VAR_NAME`.\n\n**Check:**\n```bash\n# Scan staged diff for live secrets\ngit diff --cached -- '*.ts' '*.tsx' '*.js' '*.json' \\\n  | grep -E '(sk_live|sk_test|rk_live|DEEPGRAM_API_KEY=|whsec_)[A-Za-z0-9_\\-]{10,}'\n# Must return zero matches\n\n# Confirm .env is gitignored\ngrep -q '.env' .gitignore || echo \"FAIL: .env not in .gitignore\"\n```\n\n**Rationale:** Leaked Stripe live keys allow unauthorized payouts. Leaked Supabase service_role key bypasses all RLS.\n\n---\n\n### POL-ARCH-001 — Sequential, Immutable Migrations\n| Field | Value |\n|---|---|\n| **Category** | architecture |\n| **Severity** | **HARD** |\n| **Applies to** | `supabase/migrations` |\n\n**Description:** Migration files must be named `NNN_<slug>.sql` with strictly sequential NNN. Existing committed migrations must never be modified — new behaviour requires a new file. Migrations must be idempotent (`CREATE TABLE IF NOT EXISTS`, `CREATE INDEX IF NOT EXISTS`).\n\n**Check:**\n```bash\n# Check for gaps in sequence\nls supabase/migrations/ | sort | awk -F_ '{print $1}' \\\n  | awk 'NR>1 && $1 != prev+1 {print \"Gap at \" $1; exit 1} {prev=$1}'\n# Must exit 0\n\n# No deletions from existing migration files\ngit diff HEAD~1 -- 'supabase/migrations/*.sql' | grep '^-[^-]'\n# Must be empty\n```\n\n**Rationale:** Out-of-order or modified migrations corrupt production DB state. Supabase tracks applied migrations by filename — a modified file diverges from local dev state.\n\n---\n\n### POL-ARCH-002 — Acyclic Module Dependency Graph\n| Field | Value |\n|---|---|\n| **Category** | architecture |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/modules`, `apps/mobile/src/modules` |\n\n**Description:** Module dependency graph must be acyclic and match the decomp artifact. M-00 (Foundation) has no dependencies. Each module M-NN may only import from modules with a lower index. Cross-module imports outside the declared dependency list in PLAN.json are forbidden.\n\n**Check:**\n```bash\nnode scripts/check-module-deps.js\n# Exit code 1 = hard block\n# Script must exist in repo before Phase 2 modules ship\n```\n\n**Rationale:** Circular module dependencies cause Next.js build failures and make phased rollouts impossible.\n\n---\n\n### POL-ARCH-003 — Service Role Key Must Never Reach Client Bundle\n| Field | Value |\n|---|---|\n| **Category** | architecture |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/lib/server`, `apps/web/src/app/api` |\n\n**Description:** `SUPABASE_SERVICE_ROLE_KEY` must never be imported in any file that could be bundled into client-side JS. It must only appear in files under `apps/web/src/lib/server/` or `apps/web/src/app/api/`. Server components using the key must not pass it as a prop or embed it in serialised payloads.\n\n**Check:**\n```bash\ngrep -rn 'SUPABASE_SERVICE_ROLE_KEY\\|supabaseAdmin' \\\n  apps/web/src/components/ apps/web/src/app \\\n  --include='*.tsx' --include='*.ts' \\\n  | grep -v '/api/' | grep -v 'server.ts'\n# Must return zero matches\n```\n\n**Rationale:** Next.js 15 can accidentally bundle server-only env vars into client chunks if imported transitively. Service role exposure is a complete RLS bypass.\n\n---\n\n### POL-STYLE-001 — TypeScript Strict Mode, No Unguarded `any`\n| Field | Value |\n|---|---|\n| **Category** | style |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web`, `apps/mobile` |\n\n**Description:** `\"strict\": true` must be set in `tsconfig.json`. The `any` type is forbidden without an explicit `// vikram-allow-any: <reason>` comment on the same line. `@ts-ignore` and `@ts-expect-error` are forbidden in production code paths.\n\n**Check:**\n```bash\n# Confirm strict mode\ncat apps/web/tsconfig.json | jq '.compilerOptions.strict'\n# Must equal true\n\n# No bare any or ts-ignore in non-test files\ngrep -rn '@ts-ignore\\|as any' apps/web/src --include='*.ts' --include='*.tsx' \\\n  | grep -v '__tests__\\|\\.test\\.' \\\n  | grep -v 'vikram-allow-any'\n# Must return zero matches\n```\n\n**Rationale:** Implicit `any` types in payment or auth code are a class of runtime error that strict mode eliminates at compile time.\n\n---\n\n### POL-STYLE-002 — Typed Error Handling on All Async I/O\n| Field | Value |\n|---|---|\n| **Category** | style |\n| **Severity** | **WARN** |\n| **Applies to** | `apps/web/src`, `apps/mobile/src` |\n\n**Description:** All async functions calling Supabase, Claude, Deepgram, Stripe, or Resend must wrap calls in `try/catch` and return a typed `Result<T, AppError>` or throw a typed `AppError`. Empty catch blocks are forbidden.\n\n**Check:**\n```bash\n# No empty catch blocks\ngrep -rn 'catch\\s*{\\s*}\\|catch(e)\\s*{}\\|catch(_)\\s*{}' \\\n  apps/web/src apps/mobile/src\n# Must return zero matches (WARN: if violations found, list for Vikram review)\n```\n\n**Rationale:** Unhandled promise rejections in audio processing or payment flows fail silently in production. Typed errors allow the UI to show actionable messages rather than blank states.\n\n---\n\n### POL-PERF-001 — HNSW/IVFFlat Index Required on All Embedding Columns\n| Field | Value |\n|---|---|\n| **Category** | performance |\n| **Severity** | **HARD** |\n| **Applies to** | `supabase/migrations`, `apps/web/src/lib/search.ts` |\n\n**Description:** Every pgvector `embedding` column (e.g., `knowledge_items.embedding`, `assets.embedding`) must have an HNSW or IVFFlat index created in its migration before the module ships. Similarity search queries (`<=>`) must use the index. **p95 target: <800ms at 10k knowledge_items.**\n\n**Check:**\n```sql\n-- For each embedding column, confirm an index exists\nSELECT t.tablename, a.attname\nFROM pg_attribute a\nJOIN pg_class c ON a.attrelid = c.oid\nJOIN pg_tables t ON t.tablename = c.relname\nWHERE a.atttypid = 'vector'::regtype::oid\n  AND t.schemaname = 'public'\n  AND NOT EXISTS (\n    SELECT 1 FROM pg_indexes i\n    WHERE i.tablename = t.tablename\n      AND (i.indexdef ILIKE '%hnsw%' OR i.indexdef ILIKE '%ivfflat%')\n  );\n-- Must return zero rows\n```\n```sql\n-- Confirm query uses index (not seqscan)\nEXPLAIN (ANALYZE, BUFFERS)\nSELECT id FROM knowledge_items\nORDER BY embedding <=> $1 LIMIT 10;\n-- Plan must contain 'Index Scan', not 'Seq Scan'\n```\n\n**Rationale:** pgvector seqscans on un-indexed columns degrade to O(n). At 10k knowledge items an unindexed search takes 4-8 seconds — beyond acceptable UX for distributor semantic search.\n\n---\n\n### POL-DATA-001 — Foreign Key Constraints on All Relational Columns\n| Field | Value |\n|---|---|\n| **Category** | data_integrity |\n| **Severity** | **HARD** |\n| **Applies to** | `supabase/migrations`, `docs/schema-fk-manifest.md` |\n\n**Description:** All columns referencing another table's primary key must declare a `FOREIGN KEY` constraint with explicit `ON DELETE` behaviour (RESTRICT, CASCADE, or SET NULL). Junction tables (e.g., `session_experts`) must cascade delete when either parent is deleted. Implicit application-level joins with no FK are forbidden.\n\n**Check:**\n```bash\n# Diff actual FK constraints against manifest\nnode scripts/check-fk-manifest.js\n# Exit code 1 = hard block (script must be in repo by M-01 merge)\n```\n```sql\n-- Detect _id columns with no FK (candidate violations)\nSELECT column_name, table_name\nFROM information_schema.columns\nWHERE table_schema = 'public'\n  AND column_name LIKE '%_id'\n  AND (table_name, column_name) NOT IN (\n    SELECT c.relname, a.attname\n    FROM pg_constraint con\n    JOIN pg_class c ON con.conrelid = c.oid\n    JOIN pg_attribute a ON a.attrelid = c.oid AND a.attnum = ANY(con.conkey)\n    WHERE con.contype = 'f'\n  );\n-- Each row must be explained in docs/schema-fk-manifest.md\n```\n\n**Rationale:** Without FK constraints, orphaned transcript rows accumulate when experts are deleted, wasting pgvector storage and surfacing stale knowledge in search results.\n\n---\n\n### POL-DATA-002 — Nullable Column Policy\n| Field | Value |\n|---|---|\n| **Category** | data_integrity |\n| **Severity** | **WARN** |\n| **Applies to** | `supabase/migrations` |\n\n**Description:** New columns must be `NOT NULL` with a `DEFAULT` unless absence of a value is semantically meaningful. Nullable columns must have a migration comment `-- nullable: <reason>`. Boolean columns must **never** be nullable (`NOT NULL DEFAULT false`). `created_at` timestamps must be `NOT NULL`; state-transition timestamps (e.g., `completed_at`) may be nullable.\n\n**Check:**\n```sql\n-- Boolean nullable columns (hard within warn category)\nSELECT column_name, table_name\nFROM information_schema.columns\nWHERE table_schema = 'public'\n  AND data_type = 'boolean'\n  AND is_nullable = 'YES';\n-- Must return zero rows\n```\n```bash\n# New nullable columns in PR diff must have -- nullable: comment in migration\ngit diff HEAD~1 -- 'supabase/migrations/*.sql' \\\n  | grep '^\\+.*NULL' | grep -v 'NOT NULL' | grep -v '-- nullable:'\n# WARN: each result reviewed by Vikram before merge\n```\n\n**Rationale:** Nullable booleans introduce three-valued logic bugs in RLS policies. Undocumented nullable columns scatter NULL checks across the codebase.\n\n---\n\n### POL-PAY-001 — Payment Hold Release Conditions\n| Field | Value |\n|---|---|\n| **Category** | payment_compliance |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/lib/payments.ts`, `apps/web/src/app/api/webhooks/stripe` |\n\n**Description:** A `payment_hold` record may only be released (status → `'released'`) and a Stripe Connect payout triggered if **ALL** of the following are true:\n1. `knowledge_score >= platform_config.payout_min_score`\n2. `session.status = 'completed'`\n3. No open dispute record exists for the session\n4. Expert's Stripe Connect account is in `charges_enabled` state\n\nAny code path calling `stripe.transfers.create` or updating hold status to `'released'` without all four checks is a **hard block**.\n\n**Check:**\n```bash\n# Every payout trigger must call checkPayoutEligibility() or contain all 4 guards\ngrep -rn 'stripe.transfers.create\\|status.*released\\|released.*status' \\\n  apps/web/src --include='*.ts' | while IFS=: read file line rest; do\n  grep -q 'checkPayoutEligibility\\|payout_min_score\\|charges_enabled' \"$file\" \\\n    || echo \"MISSING eligibility check: $file:$line\"\ndone\n# Any output = hard block\n\n# Unit test coverage required\nls tests/payout-eligibility.test.ts || echo \"FAIL: payout eligibility test file missing\"\n```\n\n**Rationale:** Premature payout release exposes the platform to chargeback losses. Stripe Connect payouts to un-enabled accounts fail silently and strand funds.\n\n---\n\n### POL-PAY-002 — Stripe Webhook Signature Verification and Idempotency\n| Field | Value |\n|---|---|\n| **Category** | payment_compliance |\n| **Severity** | **HARD** |\n| **Applies to** | `apps/web/src/app/api/webhooks/stripe`, `supabase/migrations` |\n\n**Description:** All Stripe webhook handlers must verify the `stripe-signature` header using `stripe.webhooks.constructEvent()` with the **raw** request body before processing. Handlers must be idempotent — processing the same `event.id` twice must not double-release a hold or double-trigger a payout. Event IDs must be recorded in `stripe_webhook_events` with a `UNIQUE` constraint on `event_id`.\n\n**Check:**\n```bash\n# All webhook handler files must call constructEvent\ngrep -rn 'constructEvent\\|stripe.webhooks' apps/web/src/app/api/webhooks/stripe \\\n  --include='*.ts'\n# Must have at least one match per handler file\n\n# Confirm UNIQUE constraint on stripe_webhook_events.event_id\n```\n```sql\nSELECT indexname FROM pg_indexes\nWHERE tablename = 'stripe_webhook_events'\n  AND indexdef ILIKE '%unique%';\n-- Must return >= 1 row\n```\n```bash\ngrep -rn 'stripe_webhook_events' supabase/migrations | grep -i 'unique'\n# Must match\n```\n\n**Rationale:** Stripe retries webhook delivery on failure. Without signature verification, any HTTP client can spoof a payment event. Without idempotency, a retry triggers a duplicate payout.\n\n---\n\n## Quinn's Pre-Merge Checklist\n\nRun these checks for every module PR before requesting merge:\n\n1. [ ] **POL-SEC-001** — RLS SQL check against branch migration state\n2. [ ] **POL-SEC-002** — getUser grep on all API route files in PR diff\n3. [ ] **POL-SEC-003** — sanitizeInput grep on all insert/update call sites in diff\n4. [ ] **POL-SEC-004** — Secret leak scan on `git diff --cached`\n5. [ ] **POL-ARCH-001** — Migration sequence check (no gaps, no modifications)\n6. [ ] **POL-ARCH-002** — `node scripts/check-module-deps.js` exits 0\n7. [ ] **POL-ARCH-003** — Service key client bundle grep returns zero matches\n8. [ ] **POL-STYLE-001** — tsconfig strict=true + no bare `any` grep\n9. [ ] **POL-STYLE-002** (warn) — Empty catch grep; escalate to Vikram if >3 violations\n10. [ ] **POL-PERF-001** — EXPLAIN ANALYZE on affected embedding queries shows Index Scan\n11. [ ] **POL-DATA-001** — `node scripts/check-fk-manifest.js` exits 0\n12. [ ] **POL-DATA-002** (warn) — New nullable columns have `-- nullable:` comments\n13. [ ] **POL-PAY-001** — Payout eligibility grep + `tests/payout-eligibility.test.ts` exists\n14. [ ] **POL-PAY-002** — constructEvent grep + stripe_webhook_events UNIQUE index confirmed\n\n**Hard rule fail action:** Block merge. Post `task.blocked` to Vikram with rule ID and `file:line` reference.  \n**Warn rule fail action:** Flag in PR comment. Require explicit approval (Justin or Vikram) before merge.\n\n---\n\n## Supplementary Notes\n\n**NOTE — Unapplied Migration:** `supabase/migrations/030_studio_artifacts_unique_constraint.sql` is untracked in the repo. This migration must be applied before `write_studio_artifact` upserts will succeed for any agent. Quinn should flag this to Quinn/developer for application in the next deploy window.\n\n- generated at: 2026-04-30\n- generated by: vikram"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/policy-e2244f07.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/policy-e2244f07.json"
    },
    {
      "id": "studio-cbcafc48-97ef-441c-9110-591c8289be78",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/cbcafc48-97ef-441c-9110-591c8289be78",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-02",
      "summary": "M-02 creates the products catalog and product_pre_seeds tables, exposes GET /api/products/queue for authenticated experts, and delivers two mobile screens: the Product Queue Screen (S-02-a) where experts browse and filter SKUs by specialty, and the Product Pre-Session Screen (S-02-b) where they review product details and earnings before starting a capture session. Coverage percentage is stubbed at 0.0 in all queue responses until M-04 adds product_id tracking to capture_sessions. product_pre_see",
      "status": "approved",
      "version": 1,
      "phase_id": "M-02",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-02-cbcafc48.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-02-cbcafc48.json"
    },
    {
      "id": "studio-bdf00abc-114f-4548-b1b8-8f0c5e7713d1",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/bdf00abc-114f-4548-b1b8-8f0c5e7713d1",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-00",
      "summary": "M-00 establishes the complete Supabase PostgreSQL 15 schema for KnowledgeVault AI. It delivers four numbered migration files: enabling pgvector and pg_cron extensions; creating all foundational tables (12 specified plus companies required for FK integrity); establishing all performance indexes including an IVFFlat vector index on knowledge_chunks.embedding for semantic search; enabling row-level security with role-specific policies for expert JWT, company JWT, and service-role access patterns; c",
      "status": "approved",
      "version": 1,
      "phase_id": "M-00",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "data_model",
        "module_name",
        "deliverables",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-00-01: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-00-02: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-00-03: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-00-bdf00abc.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-00-bdf00abc.json"
    },
    {
      "id": "studio-ba975881-0017-4b71-b40b-cc123d432667",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ba975881-0017-4b71-b40b-cc123d432667",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "blueprint",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI blueprint",
      "summary": "blueprint artifact · for KnowledgeVault AI · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "0",
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/blueprint-ba975881.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/blueprint-ba975881.json"
    },
    {
      "id": "studio-a17b8858-3cbc-471c-830a-3c75ee1d185c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a17b8858-3cbc-471c-830a-3c75ee1d185c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-03",
      "summary": "M-03 delivers the offline intelligence pipeline that pre-computes product knowledge scaffolding before any expert session begins. For each SKU in the products catalog, a Supabase Edge Function invokes Gemini 2.5 Pro with the product image, catalog description, and spec sheet to generate a calibrated ordered question set (3-5 questions), a product context summary, and key knowledge vectors. Results are cached in product_pre_seeds — one row per product — and are re-generated automatically when spe",
      "status": "approved",
      "version": 1,
      "phase_id": "M-03",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-03-a17b8858.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-03-a17b8858.json"
    },
    {
      "id": "studio-8e0b78fc-1ade-4b47-9f8b-203608109409",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8e0b78fc-1ade-4b47-9f8b-203608109409",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-04",
      "summary": "M-04 delivers the live voice capture session: the core expert-facing interaction where an authenticated expert answers AI-generated questions by voice and sees extracted knowledge objects populate a structuring panel in real time. The module provides three API routes (POST /api/sessions/start, POST /api/sessions/:id/audio, POST /api/sessions/:id/complete), the capture_sessions Postgres table, a SharedExpertContext in-process service that holds live session state, Deepgram Nova-2 WebSocket integr",
      "status": "approved",
      "version": 1,
      "phase_id": "M-04",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-04-8e0b78fc.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-04-8e0b78fc.json"
    },
    {
      "id": "studio-7c03406c-2540-406b-af84-e118e47576e1",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7c03406c-2540-406b-af84-e118e47576e1",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec",
      "summary": "Delivers all Supabase SQL migrations for KnowledgeVault AI v1: 12 tables, pgvector 1536-dimension extension, full row-level security policies, two materialized views (company coverage dashboard and platform analytics), and three pg_cron jobs (payment hold release, view refresh). Ground-zero: no expert signup, session capture, knowledge retrieval, payment, or dashboard can start until these four migration files are applied in order against the target Supabase PostgreSQL 15 project. The schema is ",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "summary",
        "module_id",
        "data_model",
        "module_name",
        "deliverables",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-00-01: id: string, owner: string, blocks: string, question: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-7c03406c.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-7c03406c.json"
    },
    {
      "id": "studio-5dac3911-6d42-4108-9d47-a7b9944154f9",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5dac3911-6d42-4108-9d47-a7b9944154f9",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-01",
      "summary": "M-01 delivers end-to-end expert registration for the KnowledgeVault platform: a mobile signup form collecting name, email, phone, trade, specialties and experience; the POST /api/experts/signup endpoint that atomically creates the experts row, a Supabase Auth user with role=expert in app_metadata, and a Stripe Connect Express account for payouts; and a reusable JWT auth middleware consumed by M-02 and M-04. This module is the cold-start unlock — no sessions, captures or payments can occur until ",
      "status": "approved",
      "version": 1,
      "phase_id": "M-01",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-01-5dac3911.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-01-5dac3911.json"
    },
    {
      "id": "studio-5402f058-f857-4e90-871e-94fa3fea8d30",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5402f058-f857-4e90-871e-94fa3fea8d30",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI spec",
      "summary": "spec artifact · for KnowledgeVault AI · status dispatched",
      "status": "dispatched",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "features",
        "open_questions",
        "schema_delta_note"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-1 [EXEC DECISION REQUIRED — BLOCKS F-11]: How is BezelIQ's build speed and cost surfaced in the demo — hidden meta-page, live cost counter in the analytics panel, or talking point only? Blueprint treats it as a talking point pending this decision. If a UI component is required, F-11 scope expands.\n- OQ-2 [EXEC DECISION REQUIRED — BLOCKS SELLING PAGE]: AD reseller model — white-label (AD branding only), powered-by badge (KnowledgeVault brand visible), or full private label (no BezelIQ/KnowledgeVault branding)? Determines branding scope for selling page and company dashboard. Does not affect schema.\n- OQ-3 [CONFIRM V2 SCOPE]: Mobile offline support — blueprint assumes online-only for demo. Is offline audio buffering and queue sync confirmed out of scope for demo? If moved in, F-02 scope expands significantly.\n- OQ-4 [CONFIRM V2 SCOPE]: Voice cloning for Virtual Expert (Gemini suggestion) is scoped to V2. Confirm: voice-cloned audio is out of demo scope. If moved in, F-10 expands and ElevenLabs API key required.\n- OQ-5 [CONFIRM V2 SCOPE]: Counter-sales integration (Virtual Expert surfaces reorder recommendation) is scoped to V2. Confirm no counter-sales UI or API endpoint needed for demo.\n- OQ-6 [EXEC DECISION REQUIRED — BLOCKS INFRA]: Is the selling page on a separate domain (e.g. knowledgevaultai.com) or a subdirectory of the app domain? Affects Cloudflare Pages routing, DNS setup, and CORS configuration. Must be decided before any deployment work begins.\n- OQ-7 [SPEC GAP — BLOCKS F-01, F-07, F-11]: How is coverage_pct computed per product? The blueprint references it in queue ordering, dashboard grid (red/yellow/green), and the is_fully_captured flip condition (≥90%), but no computation formula is specified. Is it: (a) count(completed sessions) / target_session_count, (b) average composite_score across sessions, (c) a coverage of the knowledge_surface vectors from the pre-seed? This must be defined before migrations and queue API can be implemented.\n- OQ-8 [SPEC GAP — BLOCKS F-09, RLS]: field_queries.company_id is an FK to companies, but it is nullable. Is an unauthenticated (no company JWT) semantic query permitted in any context, or is a company JWT always required? This determines RLS policy on field_queries and whether the search endpoint has a public mode.\n- OQ-9 [SPEC GAP — BLOCKS F-06, F-07]: Is there an admin UI for payment_hold manual review, or is v1 admin resolution handled via direct DB update only? The blueprint specifies a 48h SLA for resolution but defines no resolution mechanism. This must be defined before the payment hold path can be fully implemented. At minimum, an admin notification channel and a DB-level resolution workflow must be specified.\n- OQ-10 [SPEC GAP — BLOCKS F-04, F-06]: WER compensation algorithm is unspecified. The blueprint states 'WER compensation logic applied post-transcription' with a 0.75 confidence threshold. Is this: (a) Deepgram's per-word confidence score, (b) a custom re-scoring pass against a trade vocabulary, or (c) a post-processing heuristic? This must be defined before F-04 (signal detection) and F-06 (gate exclusion logic) can be implemented.\n- OQ-11 [SCHEMA DELTA — BLOCKS ALL MIGRATIONS]: Phase-1 migration (001_kv_phase1_foundation.sql) defines users + expert_profiles (two tables), skus (basic, no capture-status fields), capture_sessions (simplified, no session_context JSONB or score_object), session_answers, follow_up_questions. The blueprint introduces: experts (single table replacing users+expert_profiles), products (extends skus with has_surge_badge, is_fully_captured, spec_sheet_url), product_pre_seeds, knowledge_chunks (with pgvector 1536-dim), virtual_experts, payments, companies, company_knowledge_access, field_queries. Developer must produce a migration strategy document (additive migration preferred — no drop-and-recreate) before any new migration is written."
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/spec-5402f058.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/spec-5402f058.json"
    },
    {
      "id": "studio-51b15b61-6112-4fea-a94b-416fd7e71582",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/51b15b61-6112-4fea-a94b-416fd7e71582",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-08",
      "summary": "M-08 enables company-authenticated field technicians to query a named AI expert persona and receive a GPT-4o synthesised first-person answer attributed to that expert. The module adds GET /api/virtual-experts (listing all published experts) and POST /api/virtual-experts/[id]/query (scoped pgvector similarity search over the expert published knowledge chunks, GPT-4o synthesis with strict no-fabrication instruction, field_verified_badge logic, and field_queries audit logging). Two React screens co",
      "status": "approved",
      "version": 1,
      "phase_id": "M-08",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-08-51b15b61.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-08-51b15b61.json"
    },
    {
      "id": "studio-23157545-3047-48bb-8e4e-db824afe8af8",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/23157545-3047-48bb-8e4e-db824afe8af8",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "decomp",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI decomp",
      "summary": "decomp artifact · for KnowledgeVault AI · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "modules",
        "project",
        "strategy",
        "open_questions",
        "schema_version",
        "execution_order",
        "parallel_groups"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/decomp-23157545.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/decomp-23157545.json"
    },
    {
      "id": "studio-12143c81-f1f6-452b-8ab9-d8bd077d58bd",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/12143c81-f1f6-452b-8ab9-d8bd077d58bd",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.413Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI intent",
      "summary": "Manufacturing and distribution companies face an institutional knowledge cliff as experienced employees retire. Decades of irreplaceable tacit knowledge — product quirks, troubleshooting heuristics, application expertise — walks out the door with no scalable way to capture it first.",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "users",
        "problem",
        "brand_voice",
        "project_name",
        "ux_philosophy",
        "scope_boundary",
        "non_negotiables",
        "success_metrics",
        "what_wrong_looks_like"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "Manufacturing and distribution companies face an institutional knowledge cliff as experienced employees retire. Decades of irreplaceable tacit knowledge — product quirks, troubleshooting heuristics, application expertise — walks out the door with no scalable way to capture it first."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Build a category-defining two-sided marketplace that connects retiring experts with manufacturers and distributors who need their knowledge captured, structured, and made AI-ready. Validate product-market fit with 5+ pilot distributors within 12 weeks, 50+ expert profiles and 10+ active company projects in beta."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- 5+ pilot distributors signed within 12 weeks\n- 50+ expert profiles and 10+ active company projects in beta\n- Project completion rate — % of contracted projects that deliver usable knowledge assets\n- Expert retention — experts who complete one project and return for a second\n- MRR and 10-15% commission volume on expert transactions\n- Knowledge retrieval accuracy — answers are grounded in expert-provided content\n- Onboarding time reduction for buyers who deploy knowledge assets to new hires"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/intent-12143c81.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/intent-12143c81.json"
    },
    {
      "id": "studio-f341784a-407f-4957-9dac-34ba6b2c6f6d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f341784a-407f-4957-9dac-34ba6b2c6f6d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "requirements",
      "schema_version": "1.0",
      "title": "AD SEO Agent requirements",
      "summary": "requirements artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "status",
        "handoff",
        "project",
        "features",
        "dev_studio",
        "ai_first_model",
        "schema_version",
        "product_summary",
        "global_out_of_scope",
        "global_open_questions",
        "cross_feature_constraints"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- status: approved\n- handoff: notes_for_zara: object, notes_for_vikram: object, ready_for_ux_arch: boolean, blocking_question_ids: object\n- project: id: string, name: string, client_id: string, intent_ref: string, intake_triage_ref: string, platform_project_id: string, platform_project_title: string\n- features: 7 items\n- dev studio: views: object, render_as: string\n- ai first model: principle: string, object_model: object, primary_unit: string, ux_implications: object, architecture_implications: object\n- schema version: 1.0\n- product summary: goal: string, problem: string, must_show: object, primary_users: object, success_metrics: object\n- global out of scope: 5 items\n- global open questions: 2 items\n- cross feature constraints: 9 items"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/requirements-f341784a.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/requirements-f341784a.json"
    },
    {
      "id": "studio-f03efe80-c190-4452-b471-33333a0b8fcb",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f03efe80-c190-4452-b471-33333a0b8fcb",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-07",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-07 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-07",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: company JWT middleware (D-07-02) is reused by M-08 and M-09 without duplication. field_queries table (D-07-01) is consumed by M-09 for analytics. Note: M-00 spec also lists field_queries in the foundational schema — if M-00 migration already created field_queries, replace D-07-01 task output with an ALTER TABLE migration adding missing columns instead of CREATE TABLE.\n- tasks: 5 items\n- module id: M-07\n- module name: Knowledge Retrieval\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-07-f03efe80.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-07-f03efe80.json"
    },
    {
      "id": "studio-e49f3c65-da39-448c-a56c-f028d5a6025d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e49f3c65-da39-448c-a56c-f028d5a6025d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-04",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-04 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-04",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 7 items\n- module id: M-04\n- module name: Capture Orchestrator\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-04-e49f3c65.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-04-e49f3c65.json"
    },
    {
      "id": "studio-dd997c4c-c23f-4f06-8e06-139bd18c8d1d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/dd997c4c-c23f-4f06-8e06-139bd18c8d1d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "architecture",
      "schema_version": "1.0",
      "title": "AD SEO Agent architecture",
      "summary": "architecture artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "api",
        "auth",
        "risks",
        "status",
        "handoff",
        "project",
        "env_vars",
        "services",
        "data_model",
        "dev_studio",
        "model_reviews",
        "open_questions",
        "schema_version",
        "feature_coverage",
        "architecture_summary",
        "non_functional_requirements"
      ],
      "sections": [
        {
          "title": "Risks",
          "level": 2,
          "body": "- RISK-001: If implementation starts from keyword tables, it will regress to a conventional SEO dashboard.\n- RISK-002: Seeded data may be perceived as fake if assumptions and source mode are hidden.\n- RISK-003: Monday production target leaves little room for live provider integration instability.\n- RISK-004: Approval persistence requires auth decisions that may not be resolved for demo route."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-ARCH-001: id: string, owner: string, blocks: string, status: string, question: string, resolution: string\n- OQ-ARCH-002: id: string, owner: string, blocks: string, status: string, question: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/architecture-dd997c4c.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/architecture-dd997c4c.json"
    },
    {
      "id": "studio-c9614fcb-2fe0-4516-8ccf-9de435255028",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c9614fcb-2fe0-4516-8ccf-9de435255028",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-01",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-01 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-01",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 5 items\n- module id: M-01\n- module name: Auth & Expert Onboarding\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-01-c9614fcb.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-01-c9614fcb.json"
    },
    {
      "id": "studio-bd2ed6ea-9403-40eb-9a97-667892243bf2",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/bd2ed6ea-9403-40eb-9a97-667892243bf2",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-05",
      "summary": "M-05 delivers the async evaluation pipeline that closes the quality loop after each expert capture session. When an expert marks a session complete, a Supabase Edge Function reads the frozen SharedExpertContext, dispatches a 7-dimension o3 scoring call, and runs a parallel ground-truth gate for safety, novelty, and numeric claims. Results are written to capture_sessions.score_object, verified chunks are embedded with text-embedding-3-small (1536d) and published to the knowledge_chunks corpus, an",
      "status": "approved",
      "version": 1,
      "phase_id": "M-05",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-05-01: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-05-02: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-05-03: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-05-04: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-05-bd2ed6ea.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-05-bd2ed6ea.json"
    },
    {
      "id": "studio-bae67f1e-a915-4238-aaea-4fb4eae30fc2",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/bae67f1e-a915-4238-aaea-4fb4eae30fc2",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-05",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-05 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-05",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 7 items\n- module id: M-05\n- module name: Evaluation & Knowledge Publication\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-05-bae67f1e.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-05-bae67f1e.json"
    },
    {
      "id": "studio-b7ffa056-af94-4104-ad9f-4a244bc56ca5",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b7ffa056-af94-4104-ad9f-4a244bc56ca5",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-10",
      "summary": "M-10 delivers an admin-only analytics panel that surfaces aggregate platform impact (hours of expert knowledge preserved, support-call reduction estimate) and AI cost efficiency metrics (cost per session, cost per knowledge chunk, total AI spend). A pre-aggregated PostgreSQL materialized view — platform_analytics_mv — ensures sub-2-second API response time regardless of dataset size. Access is enforced via Supabase Auth admin-role check on every request; unauthenticated callers receive 401 and n",
      "status": "approved",
      "version": 1,
      "phase_id": "M-10",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-10-b7ffa056.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-10-b7ffa056.json"
    },
    {
      "id": "studio-b13b9f7e-ec73-4a99-8e9a-6cc750fbc30b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b13b9f7e-ec73-4a99-8e9a-6cc750fbc30b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-00",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-00 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-00",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: All 4 deliverables map 1:1 to migration files. A fifth reviewer task is added because the module spec explicitly states it must be 'complete and reviewed before any other module starts.' Migrations must execute in strict sequence: 001 → 002 → 003 → 004 → review.\n- tasks: 5 items\n- module id: M-00\n- module name: Data Model & Migrations\n- schema version: 1.0\n- depends on modules: 0 items"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-00-b13b9f7e.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-00-b13b9f7e.json"
    },
    {
      "id": "studio-896979a1-a620-41d9-a36c-3ee867394ea0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/896979a1-a620-41d9-a36c-3ee867394ea0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "coherence_review",
      "schema_version": "1.0",
      "title": "AD SEO Agent coherence_review",
      "summary": "coherence_review artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "review",
        "handoff",
        "project",
        "coverage",
        "findings",
        "dev_studio",
        "model_reviews",
        "open_questions",
        "schema_version",
        "source_artifacts",
        "return_instructions",
        "approved_source_refs"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-COH-001: id: string, owner: string, answer: string, blocks: string, status: string, question: string, source_question_ids: object"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/coherence-review-896979a1.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/coherence-review-896979a1.json"
    },
    {
      "id": "studio-8863544b-32e6-4028-a077-b1efacb89fff",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8863544b-32e6-4028-a077-b1efacb89fff",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-03",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-03 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-03",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 4 items\n- module id: M-03\n- module name: Pre-Seed Intelligence Pipeline\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-03-8863544b.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-03-8863544b.json"
    },
    {
      "id": "studio-85143a5e-e727-474b-9c64-f500413dc3bf",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/85143a5e-e727-474b-9c64-f500413dc3bf",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "KnowledgeVault AI plan",
      "summary": "plan artifact · for KnowledgeVault AI · status dispatched",
      "status": "dispatched",
      "version": 1,
      "phase_id": null,
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-85143a5e.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-85143a5e.json"
    },
    {
      "id": "studio-832cac7d-f1a7-4565-8e9a-c34545aa3113",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/832cac7d-f1a7-4565-8e9a-c34545aa3113",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-09",
      "summary": "M-09 delivers the manager-facing company coverage dashboard — the primary value-proof surface for buyer retention. It creates company_dashboard_mv, a single-row-per-company materialized view (pg_cron refresh every 60 minutes) aggregating four data sections: a per-SKU coverage grid (red/yellow/green thresholds from products.coverage_pct via company_knowledge_access), top field queries ranked by frequency, a slang cloud of technician-searched terms with verification state, and platform ROI stats. ",
      "status": "approved",
      "version": 1,
      "phase_id": "M-09",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-09-01: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-09-02: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-09-03: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-09-04: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-09-832cac7d.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-09-832cac7d.json"
    },
    {
      "id": "studio-832a6bde-d78c-439a-98c0-f854e7224015",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/832a6bde-d78c-439a-98c0-f854e7224015",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "intake_triage",
      "schema_version": "1.0",
      "title": "AD SEO Agent intake_triage",
      "summary": "intake_triage artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "project",
        "decision",
        "next_stage",
        "risk_notes",
        "assumptions",
        "missing_fields",
        "schema_version",
        "readiness_checks",
        "clarifying_questions",
        "recommended_workflow"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "ready"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/intake-triage-832a6bde.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/intake-triage-832a6bde.json"
    },
    {
      "id": "studio-81b14359-47eb-42d2-9597-0ce053d2bcad",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/81b14359-47eb-42d2-9597-0ce053d2bcad",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-07",
      "summary": "M-07 gives company-authenticated field technicians a semantic search interface over the published knowledge base. A POST /api/query endpoint embeds the natural-language query via text-embedding-3-small (1536d), runs pgvector cosine similarity against knowledge_chunks WHERE is_published=true, ranks results by a fixed formula (cosine_similarity×0.7 + ground_truth_verified::int×0.2 + novelty_score×0.1), and returns the top-5 chunks with expert attribution, chunk type, field-verified badge, and rele",
      "status": "approved",
      "version": 1,
      "phase_id": "M-07",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version",
        "_authoring_notes"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-07-01: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-07-81b14359.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-07-81b14359.json"
    },
    {
      "id": "studio-7546c8f7-106a-47a2-a2c5-eb01e79d4583",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7546c8f7-106a-47a2-a2c5-eb01e79d4583",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-10",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-10 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-10",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 4 items\n- module id: M-10\n- module name: Platform Analytics\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-10-7546c8f7.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-10-7546c8f7.json"
    },
    {
      "id": "studio-5a010600-67ca-469e-93f8-d8da41aa8bc4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5a010600-67ca-469e-93f8-d8da41aa8bc4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-08",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-08 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-08",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: Reuses companyAuthMiddleware from M-07 (src/lib/auth/companyAuthMiddleware.ts). D-08-01 creates a field_queries migration with additional columns for virtual expert query context (answer, sources, field_verified_badge) — if field_queries already exists from M-07, this migration should ALTER TABLE to add the missing columns rather than CREATE TABLE. Quinn must check M-07 migration state before applying.\n- tasks: 5 items\n- module id: M-08\n- module name: Virtual Expert Query\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-08-5a010600.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-08-5a010600.json"
    },
    {
      "id": "studio-4a68efcf-eb51-48a3-b818-4782b0ff58ab",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/4a68efcf-eb51-48a3-b818-4782b0ff58ab",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-02",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-02 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-02",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- tasks: 5 items\n- module id: M-02\n- module name: Product Catalog & Queue\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-02-4a68efcf.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-02-4a68efcf.json"
    },
    {
      "id": "studio-40229bbe-47c8-4bf4-afe5-08d215da10ae",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/40229bbe-47c8-4bf4-afe5-08d215da10ae",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI module-spec M-06",
      "summary": "M-06 delivers the expert earnings pipeline on top of the payment schema established in M-00 and the payment records created in M-05. It adds a DB trigger that fires immediately when the M-00 pg_cron job releases a payment, calling an internal API route that initiates a Stripe Connect transfer to the expert's bank account and sends a push notification. A Stripe webhook handler finalises payment status to 'paid' when the transfer settles and keeps stripe_payouts_enabled current when Stripe fires a",
      "status": "approved",
      "version": 1,
      "phase_id": "M-06",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "summary",
        "module_id",
        "api_routes",
        "data_model",
        "module_name",
        "deliverables",
        "integrations",
        "prerequisites",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-M-06-01: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string\n- OQ-M-06-02: id: string, owner: string, blocks: string, question: string, resolved: boolean, resolution: string"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-06-40229bbe.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/module-spec-m-06-40229bbe.json"
    },
    {
      "id": "studio-38a53b24-ee97-409e-a01b-e72ada77525e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/38a53b24-ee97-409e-a01b-e72ada77525e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "ux_spec",
      "schema_version": "1.0",
      "title": "AD SEO Agent ux_spec",
      "summary": "ux_spec artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "flows",
        "status",
        "handoff",
        "project",
        "surfaces",
        "dev_studio",
        "navigation",
        "ux_summary",
        "design_system",
        "open_questions",
        "schema_version",
        "feature_coverage"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-UX-001: id: string, owner: string, blocks: string, status: string, question: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/ux-spec-38a53b24.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/ux-spec-38a53b24.json"
    },
    {
      "id": "studio-368c5317-705d-4a9f-83e7-6a2776e47a92",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/368c5317-705d-4a9f-83e7-6a2776e47a92",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-06",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-06 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-06",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: OQ-M-06-01 resolved: added Task 6 for POST /api/experts/:id/push-token (dedicated route to register Expo push token). OQ-M-06-02 resolved: noreply@knowledgevault.ai confirmed as Resend sender domain. Tasks 2–6 all depend on Task 1 (migration must be applied before any route writes to new columns). Tasks 2, 3, 4, 6 can run in parallel once Task 1 ships. Task 5 (UI) can run in parallel with all others — API contract is fully specified in brief.\n- tasks: 6 items\n- module id: M-06\n- module name: Payment & Earnings\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-06-368c5317.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-06-368c5317.json"
    },
    {
      "id": "studio-27d712a4-5692-4093-8b48-9868cc8d6e91",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/27d712a4-5692-4093-8b48-9868cc8d6e91",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-09",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-09 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-09",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "artifact_type",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: API route output path adapted from spec's 'Cloudflare Pages Function at functions/api/dashboard/company/[id].ts' to Next.js App Router convention 'app/api/dashboard/company/[id]/route.ts' — codebase uses Next.js (apps/kv-app/app/api/ pattern with route.ts files). Dashboard page uses app/dashboard/[company_id]/page.tsx (no (dashboard) route group) consistent with existing app/dashboard/ structure. All OQs resolved in spec: OQ-M-09-01 stats formulas approved, OQ-M-09-02 JSONB path confirmed, OQ-M-09-03 middleware import path confirmed, OQ-M-09-04 session_duration_s column confirmed.\n- tasks: 5 items\n- module id: M-09\n- module name: Coverage Dashboard\n- artifact type: plan-module\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-09-27d712a4.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-09-27d712a4.json"
    },
    {
      "id": "studio-22519d70-2c83-48ba-8fc0-e842532c9fcf",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/22519d70-2c83-48ba-8fc0-e842532c9fcf",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "spec",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI spec M-09",
      "summary": "spec artifact · for KnowledgeVault AI · phase M-09 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-09",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "artifact_type",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: API route output path adapted from spec's 'Cloudflare Pages Function at functions/api/dashboard/company/[id].ts' to Next.js App Router convention 'app/api/dashboard/company/[id]/route.ts' — codebase uses Next.js (apps/kv-app/app/api/ pattern with route.ts files). Dashboard page uses app/dashboard/[company_id]/page.tsx (no (dashboard) route group) consistent with existing app/dashboard/ structure. All OQs resolved in spec: OQ-M-09-01 stats formulas approved, OQ-M-09-02 JSONB path confirmed, OQ-M-09-03 middleware import path confirmed, OQ-M-09-04 session_duration_s column confirmed.\n- tasks: 5 items\n- module id: M-09\n- module name: Coverage Dashboard\n- artifact type: plan-module\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/spec-m-09-22519d70.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/spec-m-09-22519d70.json"
    },
    {
      "id": "studio-1b38ab89-b03b-4017-90da-bc679843c83a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1b38ab89-b03b-4017-90da-bc679843c83a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "intent",
      "schema_version": "1.0",
      "title": "AD SEO Agent intent",
      "summary": "intent artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "brief",
        "project",
        "stakeholders",
        "artifact_type",
        "open_questions",
        "schema_version",
        "business_model_notes"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-INTENT-001: id: string, why: string, answer: string, question: string\n- OQ-INTENT-002: id: string, why: string, answer: string, question: string\n- OQ-INTENT-003: id: string, why: string, answer: string, question: string\n- OQ-INTENT-004: id: string, why: string, answer: string, question: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/intent-1b38ab89.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/intent-1b38ab89.json"
    },
    {
      "id": "studio-04c1bf55-c445-4a70-95c9-e14146a90b49",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/04c1bf55-c445-4a70-95c9-e14146a90b49",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.412Z",
      "artifact_type": "decomp",
      "schema_version": "1.0",
      "title": "AD SEO Agent decomp",
      "summary": "decomp artifact · for AD SEO Agent · status draft",
      "status": "draft",
      "version": 7,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "gates",
        "status",
        "handoff",
        "modules",
        "project",
        "dev_studio",
        "model_reviews",
        "pre_plan_audit",
        "schema_version",
        "dependency_graph",
        "source_artifacts",
        "decomposition_strategy"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- gates: 4 items\n- status: draft\n- handoff: blocking_module_ids: object, notes_for_plan_compiler: object, ready_for_task_planning: boolean\n- modules: 9 items\n- project: id: string, name: string, client_id: string, platform_project_id: string, platform_project_title: string\n- dev studio: views: object, render_as: string\n- model reviews: 4 items\n- pre plan audit: id: string, ref: string, status: string, summary: string, blockers: object, ready_for_plan: boolean, resolved_decisions: object\n- schema version: 1.0\n- dependency graph: root_modules: object, critical_path: object, parallel_groups: object, terminal_modules: object\n- source artifacts: policy_ref: object, ux_spec_ref: string, research_ref: object, m00_audit_ref: string, architecture_ref: string, requirements_ref: string, coherence_review_ref: string\n- decomposition strategy: basis: string, rationale: string, parallelism_strategy: string, context_window_strategy: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/decomp-04c1bf55.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/decomp-04c1bf55.json"
    },
    {
      "id": "studio-d534aad1-f801-4b04-a831-ed9ded27ed2e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d534aad1-f801-4b04-a831-ed9ded27ed2e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.411Z",
      "artifact_type": "verification_report",
      "schema_version": "1.0",
      "title": "AD SEO Agent verification_report",
      "summary": "verification_report artifact · for AD SEO Agent · status complete",
      "status": "complete",
      "version": 2,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "handoff",
        "project",
        "dev_studio",
        "task_results",
        "verification",
        "blocked_items",
        "module_results",
        "project_result",
        "schema_version",
        "source_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- handoff: blocked_refs: object, notes_for_atlas: object, returned_task_refs: object, notes_for_dev_studio: object, ready_for_memory_capture: boolean, ready_for_release_or_demo: boolean\n- project: id: string, name: string, client_id: string\n- dev studio: views: object, render_as: string\n- task results: 1 item\n- verification: id: string, scope: string, status: string, verifier: string, scope_refs: object, started_at: string, completed_at: string\n- blocked items: 0 items\n- module results: 1 item\n- project result: summary: string, verdict: string, remaining_risks: object\n- schema version: 1.0\n- source artifacts: plan_ref: string, build_execution_ref: string, exec_plan_review_ref: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/verification-report-d534aad1.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/verification-report-d534aad1.json"
    },
    {
      "id": "studio-ac349b70-0161-4cba-9264-0b1b72d8b322",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ac349b70-0161-4cba-9264-0b1b72d8b322",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.411Z",
      "artifact_type": "exec_plan_review",
      "schema_version": "1.0",
      "title": "AD SEO Agent exec_plan_review",
      "summary": "exec_plan_review artifact · for AD SEO Agent · status approved",
      "status": "approved",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "review",
        "project",
        "dev_studio",
        "return_items",
        "approval_scope",
        "blocked_reason",
        "schema_version",
        "risk_acceptance",
        "engine_directive",
        "source_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- review: id: string, summary: string, decision: string, reviewer: string, reviewed_at: string\n- project: id: string, name: string, client_id: string\n- dev studio: views: object, render_as: string\n- return items: 0 items\n- approval scope: dispatch_mode: string, approved_gates: object, approved_tasks: object, approved_modules: object, dispatch_allowed: boolean\n- blocked reason: reason: object, external_dependency: object, required_decision_owner: object\n- schema version: 1.0\n- risk acceptance: 1 item\n- engine directive: hold_reason: object, may_dispatch: boolean, dispatch_filter: object\n- source artifacts: plan_ref: string, decomp_ref: string, coherence_review_ref: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/exec-plan-review-ac349b70.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/exec-plan-review-ac349b70.json"
    },
    {
      "id": "studio-805d5387-5a45-4379-aab0-85d43eafa94e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/805d5387-5a45-4379-aab0-85d43eafa94e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.411Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "AD SEO Agent plan",
      "summary": "plan artifact · for AD SEO Agent · status approved",
      "status": "approved",
      "version": 5,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "git",
        "gates",
        "modules",
        "project",
        "dev_studio",
        "open_questions",
        "schema_version",
        "dependency_graph",
        "planning_summary"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-PLAN-001: id: string, owner: string, blocks: object, status: string, question: string\n- OQ-PLAN-002: id: string, owner: string, blocks: object, status: string, question: string"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/plan-805d5387.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/plan-805d5387.json"
    },
    {
      "id": "studio-5a682a9a-fb9e-4761-a1ec-29bcf3ac8c2a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5a682a9a-fb9e-4761-a1ec-29bcf3ac8c2a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.411Z",
      "artifact_type": "build_execution",
      "schema_version": "1.0",
      "title": "AD SEO Agent build_execution",
      "summary": "build_execution artifact · for AD SEO Agent · status active",
      "status": "active",
      "version": 6,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "holds",
        "tasks",
        "handoff",
        "modules",
        "project",
        "execution",
        "dev_studio",
        "retry_events",
        "blocked_items",
        "schema_version",
        "source_artifacts",
        "dependency_releases"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- holds: 3 items\n- tasks: 8 items\n- handoff: blocked_task_refs: object, pending_task_refs: object, notes_for_verifier: object, completed_task_refs: object, ready_for_verification: boolean\n- modules: 8 items\n- project: id: string, name: string, client_id: string\n- execution: id: string, status: string, started_at: string, updated_at: string, completed_at: object, engine_agent: string, approved_scope: object, dispatch_policy: string\n- dev studio: views: object, render_as: string\n- retry events: 0 items\n- blocked items: 0 items\n- schema version: 1.0\n- source artifacts: plan_ref: string, exec_plan_review_ref: string\n- dependency releases: 6 items"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/build-execution-5a682a9a.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/build-execution-5a682a9a.json"
    },
    {
      "id": "studio-e6d2e068-6306-4985-af01-70fcf54be55c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e6d2e068-6306-4985-af01-70fcf54be55c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "architecture",
      "schema_version": "1.0",
      "title": "Oro Docs MCP architecture",
      "summary": "architecture artifact · for Oro Docs MCP · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "risks",
        "status",
        "handoff",
        "project",
        "tooling",
        "security",
        "components",
        "data_model",
        "artifact_type",
        "open_questions",
        "schema_version",
        "architecture_summary"
      ],
      "sections": [
        {
          "title": "Components",
          "level": 2,
          "body": "- Indexer: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- RST Extractor: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Search Service: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Virtual Docs Filesystem: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- MCP Server: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Embedding Indexer: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Application Source Indexer: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Evaluation Harness: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Hosted MCP Adapter: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- Browser Catalog Site: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string\n- MCP Card Registry: id: string, name: string, inputs: object, outputs: object, purpose: string, failure_behavior: string"
        },
        {
          "title": "Risks",
          "level": 2,
          "body": "- RISK-001: RST parsing can become overcomplicated.\n- RISK-002: Filesystem tool could accidentally expose host filesystem if path checks are weak.\n- RISK-003: Search may return noisy results across user/admin/developer docs."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-ARCH-001: id: string, owner: string, blocks: string, status: string, question: string"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/architecture-e6d2e068.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/architecture-e6d2e068.json"
    },
    {
      "id": "studio-e3b80d33-5754-46fb-a57a-7a7ab4f1ae65",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e3b80d33-5754-46fb-a57a-7a7ab4f1ae65",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "research",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence research",
      "summary": "research artifact · for AD Competitive Intelligence · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "project",
        "positioning",
        "generated_at",
        "product_suite",
        "schema_version",
        "source_roadmap",
        "bezelbrain_basis",
        "initial_public_scan",
        "production_positioning",
        "open_research_questions"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- project: AD Competitive Intelligence\n- positioning: product_lane: string, role_in_suite: string, first_production_release_question: string\n- generated at: 2026-05-03T03:00:27.959Z\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- source roadmap: 6 items\n- bezelbrain basis: note_id: string, created_at: string, relevant_claim: string\n- initial public scan: evidence: object, raw_files: object, methodology: string, data_quality_notes: object, early_signal_summary: object\n- production positioning: buyer: string, production_value: string, explicit_direction: string\n- open research questions: 1 item"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/research-e3b80d33.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/research-e3b80d33.json"
    },
    {
      "id": "studio-c39f8c08-c1df-412e-9d5d-bd0fffc40e35",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c39f8c08-c1df-412e-9d5d-bd0fffc40e35",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "coherence_review",
      "schema_version": "1.0",
      "title": "Oro Docs MCP coherence_review",
      "summary": "coherence_review artifact · for Oro Docs MCP · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "checks",
        "review",
        "project",
        "decision",
        "findings",
        "artifact_type",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "- notes: Proceed to DECOMP and PLAN. No implementation until EXEC_PLAN_REVIEW approves a build slice.\n- ready for build: false\n- ready for decomp: true\n- build requires exec approval: true"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/coherence-review-c39f8c08.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/coherence-review-c39f8c08.json"
    },
    {
      "id": "studio-b3c3fd2a-2753-4f55-8e83-d28b32d11551",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b3c3fd2a-2753-4f55-8e83-d28b32d11551",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "intent",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence intent",
      "summary": "AD needs a sellable competitive intelligence capability for its leadership and members. Public signals about large industrial distributors are available but fragmented across careers pages, service pages, press, investor material, filings, and trade coverage. AD needs those signals collected continuously, reviewed, and translated into credible actions before market pressure reaches members.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "repo",
        "users",
        "problem",
        "brand_voice",
        "project_name",
        "product_suite",
        "source_memory",
        "ux_philosophy",
        "schema_version",
        "scope_boundary",
        "non_negotiables",
        "success_metrics",
        "what_wrong_looks_like"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "AD needs a sellable competitive intelligence capability for its leadership and members. Public signals about large industrial distributors are available but fragmented across careers pages, service pages, press, investor material, filings, and trade coverage. AD needs those signals collected continuously, reviewed, and translated into credible actions before market pressure reaches members."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Build the standalone KnowledgeVault AD suite as a production product AD can buy and use: KnowledgeVault core, the production KV app, Executive SEO, AD Competitive Intelligence analytics, and Ask AD context."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/intent-b3c3fd2a.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/intent-b3c3fd2a.json"
    },
    {
      "id": "studio-a806ab77-e20d-4630-a886-c7caacb08dca",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a806ab77-e20d-4630-a886-c7caacb08dca",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "requirements",
      "schema_version": "1.0",
      "title": "Oro Docs MCP requirements",
      "summary": "[object Object]",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "handoff",
        "project",
        "summary",
        "features",
        "out_of_scope",
        "artifact_type",
        "tool_contract",
        "open_questions",
        "schema_version",
        "non_functional_requirements"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-REQ-001: id: string, owner: string, status: string, default: string, question: string"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/requirements-a806ab77.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/requirements-a806ab77.json"
    },
    {
      "id": "studio-95561d27-2372-424d-9738-d50980989282",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/95561d27-2372-424d-9738-d50980989282",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "release_acceptance",
      "schema_version": "1.0",
      "title": "AD SEO Agent release_acceptance",
      "summary": "release_acceptance artifact · for AD SEO Agent · status approved",
      "status": "approved",
      "version": 2,
      "phase_id": null,
      "project_id": "46707bc3-f4aa-4d9a-af8a-4ac17a2303a3",
      "project_slug": "ad-ad-seo-agent-46707bc3",
      "project_title": "AD SEO Agent",
      "client_id": "ad",
      "platform_project_id": "0.0.8832348",
      "format_source": "supabase_json",
      "content_shape": [
        "handoff",
        "project",
        "decision",
        "acceptance",
        "dev_studio",
        "demo_script",
        "environment",
        "known_issues",
        "schema_version",
        "readiness_checks",
        "source_artifacts",
        "external_services"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "- summary: Accepted and deployed to Cloudflare Pages at https://ad-seo-agent.pages.dev. Parent-site /seo routing remains a follow-up.\n- verdict: accepted\n- return items: 0 items"
        }
      ],
      "html_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/release-acceptance-95561d27.html",
      "json_path": "projects/ad-ad-seo-agent-46707bc3/artifacts/release-acceptance-95561d27.json"
    },
    {
      "id": "studio-7b43567f-99bd-4b9d-8221-777dc36e715d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7b43567f-99bd-4b9d-8221-777dc36e715d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "KnowledgeVault AI plan-module M-11",
      "summary": "plan-module artifact · for KnowledgeVault AI · phase M-11 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-11",
      "project_id": "572d75d0-3088-4055-be75-601d25442c61",
      "project_slug": "bezeliq-knowledgevault-ai-572d75d0",
      "project_title": "KnowledgeVault AI",
      "client_id": "bezeliq",
      "platform_project_id": "0.0.8773774",
      "format_source": "supabase_json",
      "content_shape": [
        "notes",
        "tasks",
        "module_id",
        "module_name",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- notes: 3 items\n- tasks: 5 items\n- module id: M-11\n- module name: Demo Integration & Release Hardening\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-11-7b43567f.html",
      "json_path": "projects/bezeliq-knowledgevault-ai-572d75d0/artifacts/plan-module-m-11-7b43567f.json"
    },
    {
      "id": "studio-7201c3cf-093c-4693-9e81-f0d1bdb87f3b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7201c3cf-093c-4693-9e81-f0d1bdb87f3b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-05",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-05 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-05",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-05\n- module name: AD Executive Intelligence Workspace and Opening Narrative\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-05-7201c3cf.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-05-7201c3cf.json"
    },
    {
      "id": "studio-6e063e4a-2fbf-4346-aa9a-3ad3316a5d59",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6e063e4a-2fbf-4346-aa9a-3ad3316a5d59",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-07",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-07 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-07",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 2 items\n- module id: M-07\n- module name: Ask AD Competitive Context\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-07-6e063e4a.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-07-6e063e4a.json"
    },
    {
      "id": "studio-63dcac6b-e64b-4ee6-85cf-b28e00982566",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/63dcac6b-e64b-4ee6-85cf-b28e00982566",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "intake_triage",
      "schema_version": "1.0",
      "title": "Oro Docs MCP intake_triage",
      "summary": "intake_triage artifact · for Oro Docs MCP · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "triage",
        "project",
        "decision",
        "known_inputs",
        "artifact_type",
        "schema_version",
        "blocking_questions",
        "source_observations",
        "non_blocking_questions"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "- notes: No user clarification is required to produce the planning artifact set.\n- status: ready_for_requirements"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/intake-triage-63dcac6b.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/intake-triage-63dcac6b.json"
    },
    {
      "id": "studio-4cd905bf-c1b8-4a9b-901f-3802fcc80cb5",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/4cd905bf-c1b8-4a9b-901f-3802fcc80cb5",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "decomp",
      "schema_version": "1.0",
      "title": "Oro Docs MCP decomp",
      "summary": "[object Object]",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "handoff",
        "modules",
        "project",
        "summary",
        "artifact_type",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- handoff: notes: object, ready_for_plan: boolean\n- modules: 9 items\n- project: id: string, name: string, client_id: string, source_artifacts: object\n- summary: strategy: string, critical_path: object\n- artifact type: DECOMP\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/decomp-4cd905bf.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/decomp-4cd905bf.json"
    },
    {
      "id": "studio-29a8f6ec-8180-49d1-ac80-b088aaed362b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/29a8f6ec-8180-49d1-ac80-b088aaed362b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "Oro Docs MCP plan",
      "summary": "plan artifact · for Oro Docs MCP · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "git",
        "gates",
        "modules",
        "project",
        "dev_studio",
        "open_questions",
        "schema_version",
        "dependency_graph",
        "planning_summary"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-PLAN-001: id: string, owner: string, blocks: object, status: string, question: string"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/plan-29a8f6ec.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/plan-29a8f6ec.json"
    },
    {
      "id": "studio-273ee17c-03c6-421f-83b1-6362185411e8",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/273ee17c-03c6-421f-83b1-6362185411e8",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "blueprint",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence blueprint",
      "summary": "blueprint artifact · for AD Competitive Intelligence · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "api",
        "repo",
        "stack",
        "schema",
        "services",
        "project_id",
        "updated_at",
        "product_suite",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- api: auth: string, base_url: string, endpoints: object\n- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- stack: repo: string, backend: string, hosting: string, database: string, frontend: string, external_services: object, migration_sources: object\n- schema: tables: object\n- services: env_vars: object, dependencies: object\n- project id: ad-competitive-intelligence\n- updated at: 2026-05-03T03:00:27.959Z\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/blueprint-273ee17c.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/blueprint-273ee17c.json"
    },
    {
      "id": "studio-18c957c5-8c5f-43a9-a26b-927192784384",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/18c957c5-8c5f-43a9-a26b-927192784384",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "feature-ux-spec",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence feature-ux-spec",
      "summary": "feature-ux-spec artifact · for AD Competitive Intelligence · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "phase",
        "features",
        "cross_cutting",
        "product_suite",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/feature-ux-spec-18c957c5.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/feature-ux-spec-18c957c5.json"
    },
    {
      "id": "studio-1774a930-6955-4fc8-b817-288a46f66fa2",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1774a930-6955-4fc8-b817-288a46f66fa2",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "exec_plan_review",
      "schema_version": "1.0",
      "title": "Oro Docs MCP exec_plan_review",
      "summary": "exec_plan_review artifact · for Oro Docs MCP · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "review",
        "project",
        "dev_studio",
        "return_items",
        "approval_scope",
        "blocked_reason",
        "schema_version",
        "risk_acceptance",
        "engine_directive",
        "source_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- review: id: string, summary: string, decision: string, reviewer: string, reviewed_at: string\n- project: id: string, name: string, client_id: string\n- dev studio: views: object, render_as: string\n- return items: 0 items\n- approval scope: dispatch_mode: string, approved_gates: object, approved_tasks: object, approved_modules: object, dispatch_allowed: boolean\n- blocked reason: reason: object, external_dependency: object, required_decision_owner: object\n- schema version: 1.0\n- risk acceptance: 0 items\n- engine directive: hold_reason: object, may_dispatch: boolean, dispatch_filter: object\n- source artifacts: plan_ref: string, decomp_ref: string, coherence_review_ref: string"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/exec-plan-review-1774a930.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/exec-plan-review-1774a930.json"
    },
    {
      "id": "studio-13293bb4-1347-49fd-818b-75244f661881",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/13293bb4-1347-49fd-818b-75244f661881",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "intent",
      "schema_version": "1.0",
      "title": "Oro Docs MCP intent",
      "summary": "intent artifact · for Oro Docs MCP · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "brief",
        "project",
        "stakeholders",
        "artifact_type",
        "open_questions",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-INTENT-001: id: string, why: string, answer: string, question: string\n- OQ-INTENT-002: id: string, why: string, answer: string, question: string"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/intent-13293bb4.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/intent-13293bb4.json"
    },
    {
      "id": "studio-10dd1b1a-4f47-4789-92d6-a69506e457b1",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/10dd1b1a-4f47-4789-92d6-a69506e457b1",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-01",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-01 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-01",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-01\n- module name: Grainger and Fastenal Collectors\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-01-10dd1b1a.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-01-10dd1b1a.json"
    },
    {
      "id": "studio-0febb037-babe-46f5-98f3-03af686befd9",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0febb037-babe-46f5-98f3-03af686befd9",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "build_execution",
      "schema_version": "1.0",
      "title": "Oro Docs MCP build_execution",
      "summary": "build_execution artifact · for Oro Docs MCP · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": null,
      "project_id": "abc487ea-b21f-4439-a28b-4f5271310008",
      "project_slug": "redkey-oro-docs-mcp-abc487ea",
      "project_title": "Oro Docs MCP",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "notes",
        "tasks",
        "status",
        "project",
        "started_at",
        "artifact_type",
        "current_state",
        "execution_mode",
        "schema_version",
        "deployment_blockers"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: repo_url: string, local_root: string, base_branch: string, target_branch: string, initial_commit: string, worker_worktree_path: string\n- notes: local_fix: string, semantic_search: string\n- tasks: 1 item\n- status: complete\n- project: id: string, name: string, plan_ref: string, client_id: string, exec_plan_review_ref: string\n- started at: 2026-05-01T18:47:58Z\n- artifact type: BUILD_EXECUTION\n- current state: status: string, task_id: string, next_check: string\n- execution mode: redkey_worker_git_dispatch\n- schema version: 1.0\n- deployment blockers: 4 items"
        }
      ],
      "html_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/build-execution-0febb037.html",
      "json_path": "projects/redkey-oro-docs-mcp-abc487ea/artifacts/build-execution-0febb037.json"
    },
    {
      "id": "studio-095d6ed0-a86a-4b99-8e94-0bdaa1789e4f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/095d6ed0-a86a-4b99-8e94-0bdaa1789e4f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.410Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-06",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-06 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-06",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 2 items\n- module id: M-06\n- module name: Brief Generation and Delivery\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 2 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-06-095d6ed0.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-06-095d6ed0.json"
    },
    {
      "id": "studio-fea76496-2ef2-4814-a796-4289f7eaf048",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/fea76496-2ef2-4814-a796-4289f7eaf048",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "BezelIQ Studio intent",
      "summary": "There is no unified interface for producing and reviewing SDD artifacts before build begins. Agents currently produce prose instead of machine-readable contracts, briefs are lossy Priya interpretations rather than mechanically extracted from upstream documents, and there is no place where Justin can take a project from idea to build-ready with confidence that dev agents have everything they need. The gap between intent and execution is invisible until Quinn builds the wrong thing. The cockpit ex",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "users",
        "problem",
        "version",
        "project_id",
        "updated_at",
        "brand_voice",
        "project_name",
        "ux_philosophy",
        "scope_boundary",
        "non_negotiables",
        "success_metrics",
        "what_wrong_looks_like"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "There is no unified interface for producing and reviewing SDD artifacts before build begins. Agents currently produce prose instead of machine-readable contracts, briefs are lossy Priya interpretations rather than mechanically extracted from upstream documents, and there is no place where Justin can take a project from idea to build-ready with confidence that dev agents have everything they need. The gap between intent and execution is invisible until Quinn builds the wrong thing. The cockpit exists as a monitoring tool but there is no design and planning workspace."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Justin can take any project from intake through artifact approval — producing complete machine-readable SDD artifacts (INTENT.json, BLUEPRINT.json, SPEC.json, POLICY.json) via a structured Studio interface — and advance to Build knowing dev agents have zero guesswork."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/intent-fea76496.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/intent-fea76496.json"
    },
    {
      "id": "studio-f09473af-fe75-44cf-8306-87721f6fd4ac",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f09473af-fe75-44cf-8306-87721f6fd4ac",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team intent",
      "summary": "People with real product ideas need production software, not clickthrough demos or generic AI coding sessions. They often cannot translate domain expertise into screens, architecture, build plans, deployment decisions, and operating workflows. Existing AI dev tools start too late at prompt-to-code; agencies are expensive and opaque; no current workflow combines meticulous product design, human-reviewable screens, multi-model critique, AI-first workflow transformation, agent-built implementation,",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "in_v1",
        "out_v1",
        "problem",
        "version",
        "project_id",
        "updated_at",
        "project_name",
        "core_workflow",
        "primary_users",
        "next_artifacts",
        "open_questions",
        "non_negotiables",
        "success_metrics",
        "product_philosophy",
        "company_product_naming"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "People with real product ideas need production software, not clickthrough demos or generic AI coding sessions. They often cannot translate domain expertise into screens, architecture, build plans, deployment decisions, and operating workflows. Existing AI dev tools start too late at prompt-to-code; agencies are expensive and opaque; no current workflow combines meticulous product design, human-reviewable screens, multi-model critique, AI-first workflow transformation, agent-built implementation, and production hosting in one guided process."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Dreamborn Build guides a product owner from raw idea to production software. It uses Bezel to run an AI-first product studio process: discovery, intent, AI-first opportunity mapping, screen-by-screen design, wireframes, architecture, build planning, managed AI dev execution, proof review, deployment, hosting, and iteration."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Should the first customer flow require Dreamborn operator review at every gate, or only at architecture/build/release gates?\n- Should wireframes initially be structured HTML inside Dreamborn Build, or exported image artifacts as well?\n- What is the first paid package: fixed-price product design sprint, build sprint, or bundled design+build pilot?\n- Should Dreamborn hosting be the default for V1 unless customer explicitly asks for connected infrastructure?"
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string"
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/intent-f09473af.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/intent-f09473af.json"
    },
    {
      "id": "studio-e89f24e2-a12d-4b3f-b96e-aee2c8e6e83e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e89f24e2-a12d-4b3f-b96e-aee2c8e6e83e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "model-review",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team model-review strategy-001",
      "summary": "model-review artifact · for Bezel Team · phase strategy-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "strategy-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "claude",
        "gemini",
        "version",
        "created_at",
        "project_id",
        "prompt_summary"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: model-review\n- claude: text: string, model: string, usage: object\n- gemini: text: string, model: string, usage: object\n- version: 1\n- created at: 2026-05-04T12:01:42.482Z\n- project id: bezel-team\n- prompt summary: Product strategy review for Dreamborn Bezel Team: AI-first category, model, pricing, value, V1 scope, buyer wedge."
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/model-review-strategy-001-e89f24e2.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/model-review-strategy-001-e89f24e2.json"
    },
    {
      "id": "studio-e44b6e54-e3b5-483c-aec2-101f58a5f64b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e44b6e54-e3b5-483c-aec2-101f58a5f64b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "build_execution",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence build_execution",
      "summary": "build_execution artifact · for AD Competitive Intelligence · status active",
      "status": "active",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "project",
        "m00_status",
        "dispatch_mode",
        "schema_version",
        "local_corrections",
        "modules_dispatched",
        "next_autopilot_step",
        "schema_drift_control",
        "verification_before_dispatch"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: local_path: string\n- tasks: 22 items\n- project: id: string, name: string, client_id: string\n- m00 status: complete_local_verified\n- dispatch mode: autopilot_hcs_role_queue\n- schema version: 1.0\n- local corrections: 3 items\n- modules dispatched: 8 items\n- next autopilot step: M-04 complete locally. M-05 executive UI tasks released; next focus is AD opening frame and dashboard.\n- schema drift control: action: string, reason: string, blocked_task: string, replacement_task: string\n- verification before dispatch: npm_test: string, npm_run_build: string, knowledgevault_repo: string"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/build-execution-e44b6e54.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/build-execution-e44b6e54.json"
    },
    {
      "id": "studio-d661b935-1f2d-49c9-a42f-b1c3b23f7f3c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d661b935-1f2d-49c9-a42f-b1c3b23f7f3c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "hitl-screen-design",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team hitl-screen-design design-001",
      "summary": "The current design process produces useful intent, architecture, and plans, but it does not reliably break the product into human-reviewable screens, wireframes, and states before implementation. That creates a gap where agents can build technically plausible software that the product owner never truly visualized or approved.",
      "status": "draft",
      "version": 5,
      "phase_id": "design-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "kind",
        "name",
        "problem",
        "version",
        "created_at",
        "hitl_rules",
        "project_id",
        "updated_at",
        "next_decision",
        "success_metrics",
        "wireframe_level",
        "product_principle",
        "orientation_system",
        "required_artifacts",
        "screen_record_schema",
        "customer_visible_flow",
        "multi_model_collaboration",
        "ui_implications_for_bezel",
        "first_implementation_slice"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "The current design process produces useful intent, architecture, and plans, but it does not reliably break the product into human-reviewable screens, wireframes, and states before implementation. That creates a gap where agents can build technically plausible software that the product owner never truly visualized or approved."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Before any production build starts, Bezel must guide the customer through a concrete screen and workflow review: what screens exist, what each screen does, what states it has, what data it needs, what actions are possible, and what the customer is approving."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- Customer can explain what will be built by pointing to screens, not prose.\n- Zero build tasks are dispatched for screens lacking approved records.\n- Implementation defects caused by misunderstood screen behavior decrease over successive projects.\n- First customer approves screen map and top wireframes before build starts."
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/hitl-screen-design-design-001-d661b935.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/hitl-screen-design-design-001-d661b935.json"
    },
    {
      "id": "studio-d475e9d2-fbd3-4372-9f10-7e692e247801",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d475e9d2-fbd3-4372-9f10-7e692e247801",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "project-yaml",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team project-yaml",
      "summary": "People with real product ideas need more than a coding agent or clickthrough demo. They need a guided production process that turns intent into reviewed screens, architecture, build-ready artifacts, implemented software, deployment, and iteration. Bezel is Dreamborn's AI-first product studio infrastructure for that workflow.",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "users",
        "thesis",
        "project",
        "version",
        "filename",
        "deployment",
        "updated_at",
        "monetization",
        "initial_scope",
        "product_split",
        "open_questions",
        "product_strategy",
        "value_proposition",
        "orientation_system",
        "architecture_direction",
        "ai_first_transformation",
        "multi_model_collaboration",
        "production_non_negotiables",
        "immediate_artifacts_to_create_next"
      ],
      "sections": [
        {
          "title": "Thesis",
          "level": 2,
          "body": "People with real product ideas need more than a coding agent or clickthrough demo. They need a guided production process that turns intent into reviewed screens, architecture, build-ready artifacts, implemented software, deployment, and iteration. Bezel is Dreamborn's AI-first product studio infrastructure for that workflow."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Should Bezel Core be permissive open source, source-available, or delayed until Team has first users?\n- Is the first Team intake path GitHub Issues, Linear, or both?\n- Should Team initially run workers in Justin-managed infrastructure only, or support customer-connected workers in V1?\n- What is the first paid buyer profile: solo founder, small engineering team, or agency/product studio?"
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/project-yaml-d475e9d2.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/project-yaml-d475e9d2.json"
    },
    {
      "id": "studio-9842afd0-58cc-44b8-8f50-d9b70be010db",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/9842afd0-58cc-44b8-8f50-d9b70be010db",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-00",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-00 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "M-00",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-00\n- module name: Production Source and Evidence Foundation\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 0 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-00-9842afd0.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-00-9842afd0.json"
    },
    {
      "id": "studio-8f3eee50-794f-4685-848a-b2f3b62ae9a3",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8f3eee50-794f-4685-848a-b2f3b62ae9a3",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "playground-generation-protocol",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team playground-generation-protocol design-001",
      "summary": "playground-generation-protocol artifact · for Bezel Team · phase design-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "design-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "name",
        "version",
        "principle",
        "created_at",
        "project_id",
        "first_slice",
        "model_policy",
        "artifact_flow",
        "storage_model",
        "open_questions",
        "trigger_policy",
        "role_in_process",
        "security_policy",
        "ui_requirements",
        "feedback_contract",
        "supported_sources_v1"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Should preview storage use content.preview in v1 or create studio_artifact_previews immediately?\n- Should playground generation run as a script first, backend route second, or platform task first?\n- Should generated playgrounds be public URLs, signed URLs, or authenticated app routes? Recommendation: authenticated/sandboxed app route for customer data; public only for internal dogfood without sensitive data."
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/playground-generation-protocol-design-001-8f3eee50.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/playground-generation-protocol-design-001-8f3eee50.json"
    },
    {
      "id": "studio-8a90d5e7-f911-4834-bcdc-51b79067c963",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8a90d5e7-f911-4834-bcdc-51b79067c963",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "BezelIQ Studio plan",
      "summary": "plan artifact · for BezelIQ Studio · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "modules",
        "project",
        "schema_version",
        "planning_summary"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- modules: 5 items\n- project: id: string, name: string, repo: string, slug: string, client_id: string, production_url: string\n- schema version: 1.0\n- planning summary: goal: string, current_gap_closed: string"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/plan-8a90d5e7.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/plan-8a90d5e7.json"
    },
    {
      "id": "studio-8845fb8c-19e0-49bc-809f-413c9512aaf1",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8845fb8c-19e0-49bc-809f-413c9512aaf1",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-04",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-04 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "M-04",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 2 items\n- module id: M-04\n- module name: Analyst Review and Governance Workflow\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-04-8845fb8c.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-04-8845fb8c.json"
    },
    {
      "id": "studio-7078a466-a65a-40db-ad70-525e7089c2c6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7078a466-a65a-40db-ad70-525e7089c2c6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "policy",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence policy",
      "summary": "policy artifact · for AD Competitive Intelligence · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "project",
        "hard_rules",
        "review_gates",
        "allowed_paths",
        "product_suite",
        "schema_version",
        "disallowed_actions"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- project: AD Competitive Intelligence\n- hard rules: 13 items\n- review gates: 3 items\n- allowed paths: 2 items\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- disallowed actions: 3 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/policy-7078a466.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/policy-7078a466.json"
    },
    {
      "id": "studio-44ada4ef-3396-4585-ac19-d2766c38a23d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/44ada4ef-3396-4585-ac19-d2766c38a23d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "blueprint",
      "schema_version": "studio_artifact.generated.v1",
      "title": "BezelIQ Studio blueprint",
      "summary": "blueprint artifact · for BezelIQ Studio · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "api",
        "stack",
        "schema",
        "routing",
        "version",
        "services",
        "project_id",
        "updated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- api: auth: string, notes: string, base_url: string, endpoints: object\n- stack: backend: string, hosting: string, database: string, frontend: string, external_services: object\n- schema: notes: string, tables: object\n- routing: notes: string, routes: object\n- version: 1\n- services: env_vars: object, dependencies: object\n- project id: bezeliq-studio\n- updated at: 2026-04-28"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/blueprint-44ada4ef.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/blueprint-44ada4ef.json"
    },
    {
      "id": "studio-35ed477b-11d3-4e2e-8f75-261d1bcfc4b3",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/35ed477b-11d3-4e2e-8f75-261d1bcfc4b3",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "strategy-synthesis",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team strategy-synthesis strategy-001",
      "summary": "strategy-synthesis artifact · for Bezel Team · phase strategy-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "strategy-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "version",
        "created_at",
        "project_id",
        "first_30_days",
        "pricing_stance",
        "model_comparison",
        "source_artifact_id",
        "company_product_rule",
        "recommended_direction",
        "next_artifact_recommendation"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: strategy-synthesis\n- version: 1\n- created at: 2026-05-04T12:02:39.018Z\n- project id: bezel-team\n- first 30 days: 4 items\n- pricing stance: why_not_seats: string, recommendation: string, why_not_tokens: string, initial_test_prices: object, why_not_pure_per_run: string\n- model comparison: claude: object, gemini: object, atlas_codex: object\n- source artifact id: e89f24e2-a12d-4b3f-b96e-aee2c8e6e83e\n- company product rule: company: string, product: string, naming_rule: string, paid_product: string, public_wedge_later: string\n- recommended direction: v1_loop: string, category: string, one_liner: string, first_buyer: string, first_wedge: string, v1_do_not_build: object, ai_first_reframe: string\n- next artifact recommendation: Create INTENT.json next, explicitly locking category, buyer, wedge, V1 loop, pricing hypothesis, and non-goals before architecture."
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/strategy-synthesis-strategy-001-35ed477b.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/strategy-synthesis-strategy-001-35ed477b.json"
    },
    {
      "id": "studio-35af80e8-519e-412b-8666-a620fde3eb5c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/35af80e8-519e-412b-8666-a620fde3eb5c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-08",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-08 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-08",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-08\n- module name: Production Operations, Security, and Release\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 8 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-08-35af80e8.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-08-35af80e8.json"
    },
    {
      "id": "studio-2deb1eac-2126-4271-82d5-6917a189b6a4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2deb1eac-2126-4271-82d5-6917a189b6a4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "build_execution",
      "schema_version": "1.0",
      "title": "BezelIQ Studio build_execution",
      "summary": "build_execution artifact · for BezelIQ Studio · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "status",
        "caveats",
        "project",
        "repo_state",
        "updated_at",
        "verification",
        "runtime_routes",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- status: current_runtime_verified\n- caveats: 3 items\n- project: id: string, name: string, repo: string, slug: string, client_id: string, production_url: string\n- repo state: branch: string, recent_commits: object, clean_against_origin: boolean\n- updated at: 2026-05-03T20:28:40.637Z\n- verification: production_bundle: string, production_ops_frame: string, local_bezeliq_studio_tests: string\n- runtime routes: 8 items\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/build-execution-2deb1eac.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/build-execution-2deb1eac.json"
    },
    {
      "id": "studio-2a6fce0a-163c-4891-b125-0fd5982d5200",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2a6fce0a-163c-4891-b125-0fd5982d5200",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "screen-map",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team screen-map design-001",
      "summary": "screen-map artifact · for Bezel Team · phase design-001 · status draft",
      "status": "draft",
      "version": 6,
      "phase_id": "design-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "purpose",
        "screens",
        "version",
        "created_at",
        "project_id",
        "updated_at",
        "design_rule",
        "primary_user",
        "product_name",
        "screen_groups",
        "approval_gates",
        "cross_screen_shell",
        "deployment_context",
        "orientation_system",
        "process_positioning",
        "product_flow_summary",
        "playground_generation",
        "immediate_review_slice",
        "conversational_discovery"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: bezel.screen-map\n- purpose: Dogfood Bezel by designing Bezel screen-by-screen before architecture/build. This artifact is the canonical human-reviewable screen inventory for V1.\n- screens: 31 items\n- version: 1\n- created at: 2026-05-04T12:26:08.890Z\n- project id: bezel-team\n- updated at: 2026-05-04T14:57:54.482Z\n- design rule: Keep the existing artifact process. Add screen-by-screen detail as a required middle layer before architecture and build.\n- primary user: founder_or_operator_with_product_idea\n- product name: Bezel Product Studio\n- screen groups: 6 items\n- approval gates: 7 items"
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/screen-map-design-001-2a6fce0a.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/screen-map-design-001-2a6fce0a.json"
    },
    {
      "id": "studio-28e6d27b-c3ec-49b1-8fd4-36564c2d33fd",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/28e6d27b-c3ec-49b1-8fd4-36564c2d33fd",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "decomp",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence decomp",
      "summary": "decomp artifact · for AD Competitive Intelligence · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "modules",
        "project",
        "strategy",
        "product_suite",
        "open_questions",
        "schema_version",
        "execution_order",
        "parallel_groups",
        "suite_migration"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/decomp-28e6d27b.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/decomp-28e6d27b.json"
    },
    {
      "id": "studio-2771a4fe-7e31-4b63-b8f6-f44eb917d15d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2771a4fe-7e31-4b63-b8f6-f44eb917d15d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-02",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-02 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "M-02",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-02\n- module name: News, Press, Investor, and Filing Sources\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 1 item"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-02-2771a4fe.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-02-2771a4fe.json"
    },
    {
      "id": "studio-2151377c-4627-4e19-a1af-44b937acf59e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2151377c-4627-4e19-a1af-44b937acf59e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "plan-module",
      "schema_version": "1.0",
      "title": "AD Competitive Intelligence plan-module M-03",
      "summary": "plan-module artifact · for AD Competitive Intelligence · phase M-03 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "M-03",
      "project_id": "bda7e7b1-003f-41d1-8157-64d3b2ef0033",
      "project_slug": "ad-ad-competitive-intelligence-bda7e7b1",
      "project_title": "AD Competitive Intelligence",
      "client_id": "ad",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "repo",
        "tasks",
        "module_id",
        "module_name",
        "product_suite",
        "schema_version",
        "depends_on_modules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- repo: name: string, ownership: string, local_path: string, relationship_to_redkey: string\n- tasks: 3 items\n- module id: M-03\n- module name: Signal Intelligence Engine\n- product suite: name: string, products: object, repo_path: string, migration_source: object\n- schema version: 1.0\n- depends on modules: 3 items"
        }
      ],
      "html_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-03-2151377c.html",
      "json_path": "projects/ad-ad-competitive-intelligence-bda7e7b1/artifacts/plan-module-m-03-2151377c.json"
    },
    {
      "id": "studio-1f7874ac-4343-4d3c-b798-4386b5d1c30e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1f7874ac-4343-4d3c-b798-4386b5d1c30e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "BezelIQ Studio spec",
      "summary": "spec artifact · for BezelIQ Studio · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "version",
        "features",
        "project_id",
        "updated_at",
        "open_questions",
        "phase_inventory",
        "cross_feature_constraints"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-5.1: id: string, question: string\n- OQ-5.2: id: string, question: string"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/spec-1f7874ac.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/spec-1f7874ac.json"
    },
    {
      "id": "studio-192b5bfa-f2aa-4dea-9f29-dfe16e594f00",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/192b5bfa-f2aa-4dea-9f29-dfe16e594f00",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.409Z",
      "artifact_type": "policy",
      "schema_version": "studio_artifact.generated.v1",
      "title": "BezelIQ Studio policy",
      "summary": "policy artifact · for BezelIQ Studio · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a91f88da-c971-4186-b272-332774fd196d",
      "project_slug": "redkey-bezeliq-studio-a91f88da",
      "project_title": "BezelIQ Studio",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "rules",
        "version",
        "project_id",
        "updated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- rules: 13 items\n- version: 1\n- project id: bezeliq-studio\n- updated at: 2026-04-28"
        }
      ],
      "html_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/policy-192b5bfa.html",
      "json_path": "projects/redkey-bezeliq-studio-a91f88da/artifacts/policy-192b5bfa.json"
    },
    {
      "id": "studio-f6210edd-8414-41e9-a5d2-2e3d49ae4b18",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f6210edd-8414-41e9-a5d2-2e3d49ae4b18",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "research",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Current Site Reverse Engineering v1",
      "summary": "research artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 2,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "scope",
        "title",
        "layouts",
        "version",
        "partials",
        "surfaces",
        "project_id",
        "updated_at",
        "source_repo",
        "css_findings",
        "data_modules",
        "artifact_type",
        "css_inventory",
        "data_findings",
        "surface_counts",
        "inventory_counts",
        "executive_summary",
        "page_family_counts",
        "page_inventory_sample",
        "required_next_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- scope: Current-state audit only. Capability catalog is intentionally deferred until after this reverse-engineering pass is reviewed.\n- title: B2BEA.org Current Site Reverse Engineering v1\n- layouts: 9 items\n- version: 1\n- partials: 19 items\n- surfaces: auth: object, b2bea_admin: object, public_site: object, member_dashboard_profile: object, vendor_management_portal: object, practitioner_company_workspace: object\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T19:13:19.768Z\n- source repo: /Users/justinking/Vaults/Projects/B2BEA-org-new\n- css findings: 4 items\n- data modules: 35 items\n- artifact type: research"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/research-f6210edd.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/research-f6210edd.json"
    },
    {
      "id": "studio-d79c11f2-f033-4037-89d1-dee5697e30df",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d79c11f2-f033-4037-89d1-dee5697e30df",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "screen-map",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate screen-map design-001",
      "summary": "screen-map artifact · for Patient Visit Advocate · phase design-001 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "design-001",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "meta",
        "product",
        "screens",
        "deferred_flow",
        "schema_version",
        "first_release_flow"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- meta: source: string, created_at: string, product_stage: string\n- product: Patient Visit Advocate\n- screens: 7 items\n- deferred flow: 3 items\n- schema version: 1.0\n- first release flow: 6 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/screen-map-design-001-d79c11f2.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/screen-map-design-001-d79c11f2.json"
    },
    {
      "id": "studio-c97be414-3dde-4085-9f57-fc38632d2de0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c97be414-3dde-4085-9f57-fc38632d2de0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild intent",
      "summary": "The current B2BEA.org site has accumulated useful product thinking but also design drift, page-specific CSS, inconsistent templates, and unclear separation between public, admin, member, vendor, and company-level surfaces.",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "users",
        "problem",
        "version",
        "project_id",
        "updated_at",
        "brand_voice",
        "project_name",
        "ux_philosophy",
        "scope_boundary",
        "non_negotiables",
        "success_metrics",
        "what_wrong_looks_like"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "The current B2BEA.org site has accumulated useful product thinking but also design drift, page-specific CSS, inconsistent templates, and unclear separation between public, admin, member, vendor, and company-level surfaces."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Create a spec-first rebuild project that reverse-engineers the current site into reviewable artifacts, defines a hardened design system, and produces implementation-ready specs before coding the replacement site."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/intent-c97be414.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/intent-c97be414.json"
    },
    {
      "id": "studio-c79f17d4-fd0e-41aa-943b-f97ece91cb90",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c79f17d4-fd0e-41aa-943b-f97ece91cb90",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "input-classification",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel input-classification idea-001",
      "summary": "input-classification artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "why",
        "phase",
        "risks",
        "artifact",
        "maturity",
        "confidence",
        "classification",
        "recommended_path"
      ],
      "sections": [
        {
          "title": "Risks",
          "level": 2,
          "body": "- Existing artifacts may over-specify screens before the product has taught the user how Bezel works.\n- Prior PRD-like material may encode SaaS-shaped assumptions instead of AI-first workflows.\n- The process expectation and saved-progress model must be visible before any deep design work."
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/input-classification-idea-001-c79f17d4.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/input-classification-idea-001-c79f17d4.json"
    },
    {
      "id": "studio-c146441a-77d0-4fa5-835b-08c0721623fe",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c146441a-77d0-4fa5-835b-08c0721623fe",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "source-intake",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate source-intake idea-001",
      "summary": "source-intake artifact · for Patient Visit Advocate · phase idea-001 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "meta",
        "source_type",
        "anti_patterns",
        "schema_version",
        "raw_source_summary",
        "extracted_principles"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- meta: source: string, created_at: string, product_stage: string\n- source type: product concept brief\n- anti patterns: 5 items\n- schema version: 1.0\n- raw source summary: AI-first product concept for a patient appointment advocate. Core framing: patients enter doctor visits nervous, unprepared, forgetful, intimidated by time pressure, and unsure what matters. The job is not to give generic medical information; it is to help them show up prepared, think clearly in the moment, and leave with confidence. Avoid the default bolt-on-AI app pattern of symptom checker, static question lists, generic top-10 doctor questions, or chatbot wrapper. Build a thinking system that behaves like a sharp, calm advocate. V1 should focus on conversational intake, a clean one-page doctor visit brief, smart dynamic question generation, and simple post-visit summary. Defer real-time in-room mode until the preparation loop works. Long-term moat is structured longitudinal memory: past visits, symptoms, medications, patterns, and context carried forward responsibly. Under the hood, use orchestrated agents: intake extraction, guardrailed clinical reasoning, question generation, medical/plain-English translation, and structured memory. Hard constraints: not diagnosing, not replacing clinicians, not giving treatment plans, conservative language, escalation guidance for serious symptoms, and explicit uncertainty.\n- extracted principles: 5 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/source-intake-idea-001-c146441a.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/source-intake-idea-001-c146441a.json"
    },
    {
      "id": "studio-a7044f26-904f-430a-a3c6-219f392c3a2b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a7044f26-904f-430a-a3c6-219f392c3a2b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "feature-ux-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Artifact Roadmap And Surface UX Spec",
      "summary": "feature-ux-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "version",
        "project_id",
        "updated_at",
        "artifact_sequence",
        "ux_contracts_to_define"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Artifact Roadmap And Surface UX Spec\n- version: 1\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T19:04:19.428Z\n- artifact sequence: 9 items\n- ux contracts to define: 10 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/feature-ux-spec-a7044f26.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/feature-ux-spec-a7044f26.json"
    },
    {
      "id": "studio-a687934c-bf12-436c-8fc1-4b8c2999d7f8",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a687934c-bf12-436c-8fc1-4b8c2999d7f8",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "ai-first-opportunity-map",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate ai-first-opportunity-map strategy-001",
      "summary": "AI-first means the product thinks with the patient before, during, and after care moments. It should extract structure, reason conservatively about what to clarify, and remember context longitudinally instead of serving static content.",
      "status": "approved",
      "version": 1,
      "phase_id": "strategy-001",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "meta",
        "thesis",
        "opportunities",
        "schema_version",
        "mvp_recommendation"
      ],
      "sections": [
        {
          "title": "Thesis",
          "level": 2,
          "body": "AI-first means the product thinks with the patient before, during, and after care moments. It should extract structure, reason conservatively about what to clarify, and remember context longitudinally instead of serving static content."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/ai-first-opportunity-map-strategy-001-a687934c.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/ai-first-opportunity-map-strategy-001-a687934c.json"
    },
    {
      "id": "studio-94fac781-3957-44b5-ba65-1fd21c7f946e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/94fac781-3957-44b5-ba65-1fd21c7f946e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "process-expectations",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel process-expectations idea-001",
      "summary": "process-expectations artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "artifact",
        "positioning",
        "resume_model",
        "expectation_copy",
        "project_size_guidance",
        "required_progress_states"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- artifact: process-expectations\n- positioning: This is a production product-definition process, not a quick mockup generator.\n- resume model: Like doing taxes: each step is saved, the user always knows what is complete, what is next, what is blocked, and where to resume.\n- expectation copy: For meaningful products, plan to spend a couple of focused hours reviewing intent, assumptions, AI-first opportunities, screens, workflows, architecture, and build plan before development starts. Bezel will guide the whole process and save progress at every step.\n- project size guidance: 3 items\n- required progress states: 6 items"
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/process-expectations-idea-001-94fac781.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/process-expectations-idea-001-94fac781.json"
    },
    {
      "id": "studio-81d99c87-c2a2-4d85-936c-4317782ad2bd",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/81d99c87-c2a2-4d85-936c-4317782ad2bd",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate module-spec M-01",
      "summary": "module-spec artifact · for Patient Visit Advocate · phase M-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "M-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "module",
        "entities",
        "created_at",
        "depends_on",
        "next_module",
        "shared_types",
        "schema_version",
        "data_principles",
        "analytics_boundary",
        "retention_defaults",
        "acceptance_criteria",
        "monetization_mapping",
        "product_decisions_inherited"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Define the structured data contracts that turn Patient Visit Advocate from a one-off chat experience into a memory-backed appointment preparation system."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-01-81d99c87.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-01-81d99c87.json"
    },
    {
      "id": "studio-78224647-9cc2-4446-a267-abfb95bcbab0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/78224647-9cc2-4446-a267-abfb95bcbab0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "source-intake",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel source-intake idea-001",
      "summary": "source-intake artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "company",
        "product",
        "purpose",
        "surface",
        "artifact",
        "project_name",
        "handling_rule",
        "input_posture",
        "saved_progress_rule",
        "imported_source_bundle"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- company: Dreamborn\n- product: Bezel\n- purpose: Use Bezel to build Bezel, starting from the messy strategy and artifact bundle already created in the legacy/internal Studio registry.\n- surface: build.dreamborn.ai\n- artifact: source-intake\n- project name: Build Bezel\n- handling rule: The imported bundle is not accepted as the plan. Bezel must extract intent, identify assumptions, reframe AI-first alternatives, and then produce canonical Build Bezel artifacts.\n- input posture: Bring anything. Bezel accepts ideas, notes, PRDs, decks, screenshots, links, existing product descriptions, and strategy bundles, but treats them as evidence rather than as the final plan.\n- saved progress rule: Every answer, uploaded source, extracted fact, assumption, model perspective, and decision must be saved as structured project state so the user can leave and resume like a tax-prep workflow.\n- imported source bundle: 8 items"
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/source-intake-idea-001-78224647.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/source-intake-idea-001-78224647.json"
    },
    {
      "id": "studio-715faee0-4267-4a7f-b992-91e1e2839aac",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/715faee0-4267-4a7f-b992-91e1e2839aac",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "monetization-strategy",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate monetization-strategy strategy-001",
      "summary": "Monetization should attach to AI-first preparedness, continuity, and structured patient memory, not generic medical content, ads, lead generation, affiliate referrals, or resale of health insights.",
      "status": "approved",
      "version": 3,
      "phase_id": "strategy-001",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "source",
        "thesis",
        "product",
        "created_at",
        "project_id",
        "schema_version",
        "trust_boundary",
        "core_paid_promise",
        "recommended_wedge",
        "first_pricing_tests",
        "screen_dependencies",
        "product_implications",
        "data_model_dependencies"
      ],
      "sections": [
        {
          "title": "Thesis",
          "level": 2,
          "body": "Monetization should attach to AI-first preparedness, continuity, and structured patient memory, not generic medical content, ads, lead generation, affiliate referrals, or resale of health insights."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/monetization-strategy-strategy-001-715faee0.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/monetization-strategy-strategy-001-715faee0.json"
    },
    {
      "id": "studio-6f9daa98-ab2b-4d2c-975b-2439d511af52",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6f9daa98-ab2b-4d2c-975b-2439d511af52",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "screen-map",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel screen-map idea-001",
      "summary": "screen-map artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "purpose",
        "artifact",
        "first_pages",
        "shell_requirements",
        "transition_after_phase"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- purpose: Define the first Bezel pages for users arriving with anything from a raw idea to a full PRD.\n- artifact: screen-map\n- first pages: 6 items\n- shell requirements: 7 items\n- transition after phase: Generate canonical intent for Build Bezel only after source intake, classification, intent extraction, AI-first reframe, and scope path are accepted."
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/screen-map-idea-001-6f9daa98.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/screen-map-idea-001-6f9daa98.json"
    },
    {
      "id": "studio-6cf3ce5f-96c0-437b-82ac-6743a0895a0f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6cf3ce5f-96c0-437b-82ac-6743a0895a0f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "intent-extraction",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel intent-extraction idea-001",
      "summary": "intent-extraction artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "artifact",
        "stated_goal",
        "implied_goal",
        "target_users",
        "desired_outcomes",
        "canonical_question",
        "assumptions_to_challenge"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- artifact: intent-extraction\n- stated goal: Create Dreamborn Build, powered by Bezel, as a guided product studio for people who want real production software built.\n- implied goal: Give founders, operators, and domain experts a trustworthy way to move from messy idea or PRD to AI-first product design, plan, and build without losing context or being forced into a traditional SaaS-shaped workflow.\n- target users: 5 items\n- desired outcomes: 5 items\n- canonical question: What outcome are you trying to create, and what assumptions are baked into the way you described it?\n- assumptions to challenge: 5 items"
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/intent-extraction-idea-001-6cf3ce5f.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/intent-extraction-idea-001-6cf3ce5f.json"
    },
    {
      "id": "studio-688c941b-4340-4a50-ad89-129d5763e695",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/688c941b-4340-4a50-ad89-129d5763e695",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "wireframe-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel Team wireframe-spec design-001",
      "summary": "wireframe-spec artifact · for Bezel Team · phase design-001 · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": "design-001",
      "project_id": "dbe36f96-c50d-46a8-badb-a0be0feeec09",
      "project_slug": "bezel-bezel-team-dbe36f96",
      "project_title": "Bezel Team",
      "client_id": "bezel",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "name",
        "purpose",
        "screens",
        "version",
        "fidelity",
        "phase_id",
        "created_at",
        "project_id",
        "updated_at",
        "shell_pattern",
        "next_wireframe_batch",
        "playground_generation",
        "cross_screen_requirements",
        "review_questions_for_justin"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: bezel.wireframe-spec\n- name: First Wireframe Spec: Orientation, Discovery, Screen Map\n- purpose: Define the first three customer-visible screens for Dreamborn Build so Bezel can dogfood its screen-by-screen design process before implementation.\n- screens: 3 items\n- version: 1\n- fidelity: Low-to-mid fidelity structured HTML wireframes. These are not final visual design; they define layout, hierarchy, controls, state requirements, and review behavior.\n- phase id: design-001\n- created at: 2026-05-04T12:53:10.232Z\n- project id: bezel-team\n- updated at: 2026-05-04T14:57:54.482Z\n- shell pattern: domain: string, product_header: string, product_submark: string, orientation_rule: string, persistent_regions: object\n- next wireframe batch: 4 items"
        }
      ],
      "html_path": "projects/bezel-bezel-team-dbe36f96/artifacts/wireframe-spec-design-001-688c941b.html",
      "json_path": "projects/bezel-bezel-team-dbe36f96/artifacts/wireframe-spec-design-001-688c941b.json"
    },
    {
      "id": "studio-612cde0f-e4dd-48e4-bc82-dfc230f7ce2f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/612cde0f-e4dd-48e4-bc82-dfc230f7ce2f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "project-yaml",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate project-yaml",
      "summary": "project-yaml artifact · for Patient Visit Advocate · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "meta",
        "project",
        "filename",
        "schema_version"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- meta: source: string, created_at: string, product_stage: string\n- project: title: string, status: string, deferred: object, client_id: string, one_liner: string, primary_job: string, mvp_boundary: object, product_name: string, target_users: object, working_domain: string, non_negotiables: object\n- filename: project.yaml\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/project-yaml-612cde0f.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/project-yaml-612cde0f.json"
    },
    {
      "id": "studio-59c760f6-43e7-48df-bafd-73bb346b1972",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/59c760f6-43e7-48df-bafd-73bb346b1972",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "wireframe-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel wireframe-spec idea-001",
      "summary": "wireframe-spec artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "purpose",
        "screens",
        "artifact",
        "global_layout",
        "review_questions"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- purpose: First-page wireframe behavior for the Bezel dogfood project.\n- screens: 6 items\n- artifact: wireframe-spec\n- global layout: left: string, right: string, center: string, footer_or_header: string\n- review questions: 4 items"
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/wireframe-spec-idea-001-59c760f6.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/wireframe-spec-idea-001-59c760f6.json"
    },
    {
      "id": "studio-50e5faae-2d70-48ef-b261-5135f269e95f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/50e5faae-2d70-48ef-b261-5135f269e95f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "intent",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate intent",
      "summary": "Patients often enter medical appointments anxious, underprepared, and unable to recall or prioritize details under time pressure. Afterward, they commonly leave with unanswered questions, unclear next steps, and weak continuity between visits.",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "meta",
        "scope",
        "problem",
        "primary_users",
        "schema_version",
        "success_metrics"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "Patients often enter medical appointments anxious, underprepared, and unable to recall or prioritize details under time pressure. Afterward, they commonly leave with unanswered questions, unclear next steps, and weak continuity between visits."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Build an AI-first patient visit advocate that converts messy pre-visit input into a clear doctor visit brief, context-specific questions, and a simple post-visit debrief so patients feel prepared and confident without receiving diagnosis or treatment advice."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string\n- item: metric: string, target: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/intent-50e5faae.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/intent-50e5faae.json"
    },
    {
      "id": "studio-3bbba8fc-9664-483c-81f5-a1badbd3af0f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/3bbba8fc-9664-483c-81f5-a1badbd3af0f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "decision-record",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate decision-record M-00",
      "summary": "decision-record artifact · for Patient Visit Advocate · phase M-00 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "M-00",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "decisions",
        "created_at",
        "project_id",
        "schema_version",
        "official_sources"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: M-00 Safety and Product Boundary\n- decisions: 3 items\n- created at: 2026-05-05T13:54:44.019Z\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- schema version: 1.0\n- official sources: 4 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/decision-record-m-00-3bbba8fc.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/decision-record-m-00-3bbba8fc.json"
    },
    {
      "id": "studio-1cbddd2d-52c4-470c-91f3-2e66966313aa",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1cbddd2d-52c4-470c-91f3-2e66966313aa",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "ai-first-reframe",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Build Bezel ai-first-reframe idea-001",
      "summary": "ai-first-reframe artifact · for Build Bezel · phase idea-001 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "idea-001",
      "project_id": "2e85de55-4dd7-4164-9c9e-175eabfaad59",
      "project_slug": "dreamborn-build-bezel-2e85de55",
      "project_title": "Build Bezel",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "artifact",
        "reframes",
        "principle",
        "wow_moment",
        "user_choice_required"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: idea-001\n- artifact: ai-first-reframe\n- reframes: 3 items\n- principle: A PRD is evidence, not the plan.\n- wow moment: Bezel reads what the user brought, recovers the underlying goal, shows where the proposed product is trapped in traditional SaaS assumptions, and suggests radically different AI-first paths.\n- user choice required: 4 items"
        }
      ],
      "html_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/ai-first-reframe-idea-001-1cbddd2d.html",
      "json_path": "projects/dreamborn-build-bezel-2e85de55/artifacts/ai-first-reframe-idea-001-1cbddd2d.json"
    },
    {
      "id": "studio-0bd533b6-b5d5-4758-bcce-4ff97b72cb33",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0bd533b6-b5d5-4758-bcce-4ff97b72cb33",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "screen-map",
      "schema_version": "2.0",
      "title": "Patient Visit Advocate screen-map design-002",
      "summary": "screen-map artifact · for Patient Visit Advocate · phase design-002 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "design-002",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "frame",
        "gates",
        "lanes",
        "product",
        "screens",
        "deferred",
        "created_at",
        "internal_later",
        "schema_version",
        "family_plan_minimum",
        "post_mvp_production",
        "first_release_minimum",
        "revisions_from_design_001",
        "production_required_before_public_launch"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- frame: Production multi-user screen map. Product screens are not implementation authorization; they are inventory and dependency contracts for later approved modules.\n- gates: current_status: string, screens_blocked_until: object\n- lanes: 9 items\n- product: Patient Visit Advocate\n- screens: 32 items\n- deferred: 2 items\n- created at: 2026-05-05T19:29:47.537Z\n- internal later: 3 items\n- schema version: 2.0\n- family plan minimum: 4 items\n- post mvp production: 8 items\n- first release minimum: 13 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/screen-map-design-002-0bd533b6.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/screen-map-design-002-0bd533b6.json"
    },
    {
      "id": "studio-0a82b9fa-16b1-47c6-a4be-6c9dc70c2540",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0a82b9fa-16b1-47c6-a4be-6c9dc70c2540",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "policy",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild policy",
      "summary": "policy artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "rules",
        "version",
        "project_id",
        "updated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- rules: 5 items\n- version: 1\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T19:04:19.428Z"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/policy-0a82b9fa.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/policy-0a82b9fa.json"
    },
    {
      "id": "studio-0555c2b6-6f1f-41e5-bacb-7ca169b32fd5",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0555c2b6-6f1f-41e5-bacb-7ca169b32fd5",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.408Z",
      "artifact_type": "blueprint",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild blueprint",
      "summary": "blueprint artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "version",
        "project_id",
        "updated_at",
        "stack_decision",
        "surface_layers",
        "shared_foundation",
        "architecture_direction"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- version: 1\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T19:04:19.428Z\n- stack decision: note: string, status: string\n- surface layers: 5 items\n- shared foundation: 8 items\n- architecture direction: Spec-first clean rebuild, using the current B2BEA.org repo as source material rather than preserving current template/CSS architecture by default."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/blueprint-0555c2b6.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/blueprint-0555c2b6.json"
    },
    {
      "id": "studio-fb647c16-c6de-412b-a46f-56746971cf25",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/fb647c16-c6de-412b-a46f-56746971cf25",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "client-source-reference",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate client-source-reference",
      "summary": "client-source-reference artifact · for Patient Visit Advocate · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "files",
        "source",
        "product",
        "created_at",
        "project_id",
        "schema_version",
        "core_distinction",
        "knowledge_base_workbook",
        "content_review_checklist",
        "language_patterns_to_fix",
        "future_content_principles",
        "required_structural_changes",
        "impact_on_existing_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- files: 2 items\n- source: client-provided kickoff documents\n- product: Pocket Advocate / Patient Visit Advocate\n- created at: 2026-05-07T13:21:40.696Z\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- schema version: 1.0\n- core distinction: operating_line: string, allowed_patient_education: object, disallowed_medical_advice: object\n- knowledge base workbook: note: string, categories: object, summary_claims: object, observed_sheets: object, compliance_banner: string\n- content review checklist: 10 items\n- language patterns to fix: 5 items\n- future content principles: 5 items\n- required structural changes: 4 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/client-source-reference-fb647c16.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/client-source-reference-fb647c16.json"
    },
    {
      "id": "studio-dcfc8620-9f28-4019-aeeb-de3e279fd7a7",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/dcfc8620-9f28-4019-aeeb-de3e279fd7a7",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "permission-lifecycle-matrix",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Permission + Lifecycle Matrix",
      "summary": "permission-lifecycle-matrix artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "roles",
        "title",
        "version",
        "decisions",
        "principle",
        "project_id",
        "updated_at",
        "admin_model",
        "artifact_type",
        "next_artifacts",
        "lifecycle_matrix",
        "source_artifacts",
        "enforcement_rules",
        "permission_matrix",
        "unresolved_decisions"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- roles: 10 items\n- title: B2BEA.org V1 Permission + Lifecycle Matrix\n- version: 1\n- decisions: 6 items\n- principle: Keep internal B2BEA admin simple; enforce external self-service, entitlements, ownership, lifecycle, and public visibility rules rigorously.\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T20:00:08.982Z\n- admin model: not_v1: object, v1_rule: string, core_admins: object, required_controls: object\n- artifact type: permission-lifecycle-matrix\n- next artifacts: 5 items\n- lifecycle matrix: 19 items\n- source artifacts: 2 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/permission-lifecycle-matrix-dcfc8620.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/permission-lifecycle-matrix-dcfc8620.json"
    },
    {
      "id": "studio-c889a1fe-c3ce-4b0d-873c-af4e0ec8dfe4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c889a1fe-c3ce-4b0d-873c-af4e0ec8dfe4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "capability-map",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Capability Map v1",
      "summary": "capability-map artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 5,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "basis",
        "title",
        "version",
        "surfaces",
        "decisions",
        "next_steps",
        "project_id",
        "updated_at",
        "naming_rule",
        "artifact_type",
        "scope_summary",
        "status_legend",
        "open_questions",
        "v1_scope_policy",
        "admin_governance_model",
        "cross_cutting_capabilities",
        "production_ready_definition",
        "missing_production_capabilities"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- What is the minimum production implementation for each V1 area without cutting core capability?\n- Which V1 capabilities can launch as admin-mediated workflows instead of full self-service UI?\n- Which workflows require Stripe, Sanity, HubSpot/CRM, Supabase-only, or a new service boundary?\n- What role/entitlement taxonomy supports all V1 surfaces without special cases?\n- Which capabilities require audit logs and notification side effects on day one?\n- Which current admin single-page workflows should become separate modules in the rebuild?"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/capability-map-c889a1fe.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/capability-map-c889a1fe.json"
    },
    {
      "id": "studio-a9636e2f-a4be-4586-82dd-c1a7bf3199fa",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a9636e2f-a4be-4586-82dd-c1a7bf3199fa",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "publishing-model-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Publishing Model Spec",
      "summary": "publishing-model-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "version",
        "decisions",
        "project_id",
        "updated_at",
        "artifact_type",
        "approval_rules",
        "next_artifacts",
        "open_questions",
        "publishing_paths",
        "source_artifacts",
        "url_and_slug_rules",
        "page_lifecycle_rules",
        "analytics_requirements",
        "source_of_truth_boundaries",
        "implementation_implications",
        "hardened_page_metadata_contract"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Which exact existing page families become Sanity standard pages in V1?\n- Should custom HTML imports be checked into the site repo, stored as Supabase/Sanity assets, or both?\n- What is the minimum rollback behavior for static/custom pages on the first rebuild release?\n- Which standard templates are required before migration starts?\n- What exact GEO fields should appear in Sanity versus be generated at build time?"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/publishing-model-spec-a9636e2f.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/publishing-model-spec-a9636e2f.json"
    },
    {
      "id": "studio-80328220-3deb-4cf9-a68f-d440b41a38da",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/80328220-3deb-4cf9-a68f-d440b41a38da",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "production-readiness-gap-register",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Production Readiness Gap Register",
      "summary": "production-readiness-gap-register artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "version",
        "decisions",
        "project_id",
        "updated_at",
        "gap_register",
        "scope_policy",
        "artifact_type",
        "severity_legend",
        "source_artifacts",
        "immediate_next_artifacts"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: B2BEA.org V1 Production Readiness Gap Register\n- version: 1\n- decisions: 6 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T20:00:09.174Z\n- gap register: 17 items\n- scope policy: v1_posture: string, internal_admin_model: string, controls_required_outside_core_admin: string\n- artifact type: production-readiness-gap-register\n- severity legend: P0: string, P1: string, P2: string\n- source artifacts: 2 items\n- immediate next artifacts: 5 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/production-readiness-gap-register-80328220.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/production-readiness-gap-register-80328220.json"
    },
    {
      "id": "studio-355b3249-3af9-45a4-9c45-67777bd2d72d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/355b3249-3af9-45a4-9c45-67777bd2d72d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "entitlement-model-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Entitlement Model Spec",
      "summary": "entitlement-model-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "gaps",
        "title",
        "version",
        "decisions",
        "next_specs",
        "project_id",
        "updated_at",
        "source_repo",
        "artifact_type",
        "entitlement_keys",
        "source_artifacts",
        "v1_access_matrix",
        "target_data_model",
        "target_principles",
        "migration_sequence",
        "acceptance_criteria",
        "enforcement_contract",
        "entitlement_subjects",
        "live_schema_evidence"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- gaps: 9 items\n- title: B2BEA.org V1 Entitlement Model Spec\n- version: 1\n- decisions: 7 items\n- next specs: 5 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T23:32:25.356Z\n- source repo: name: string, local_path: string, live_supabase_host: string\n- artifact type: entitlement-model-spec\n- entitlement keys: 20 items\n- source artifacts: 5 items\n- v1 access matrix: 17 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/entitlement-model-spec-355b3249.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/entitlement-model-spec-355b3249.json"
    },
    {
      "id": "studio-2f473004-9063-4fe9-8290-5cbd1b19dfb4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2f473004-9063-4fe9-8290-5cbd1b19dfb4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "data-model-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Data Model Spec",
      "summary": "data-model-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "version",
        "decisions",
        "next_specs",
        "project_id",
        "updated_at",
        "schema_gaps",
        "source_repo",
        "live_domains",
        "artifact_type",
        "source_artifacts",
        "current_row_counts",
        "target_entity_model",
        "implementation_rules",
        "live_supabase_project"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: B2BEA.org V1 Data Model Spec\n- version: 1\n- decisions: 5 items\n- next specs: 6 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-06T20:34:52.340Z\n- schema gaps: 10 items\n- source repo: /Users/justinking/Vaults/Projects/B2BEA-org-new\n- live domains: 9 items\n- artifact type: data-model-spec\n- source artifacts: 4 items\n- current row counts: jobs: number, events: number, people: number, courses: number, lessons: number, modules: number, vendors: number, page_views: number, memberships: number, scrape_runs: number, search_logs: number, b2bew_events: number"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/data-model-spec-2f473004.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/data-model-spec-2f473004.json"
    },
    {
      "id": "studio-1709cbbf-8bc3-44d0-b580-e5a38baf4a94",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1709cbbf-8bc3-44d0-b580-e5a38baf4a94",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "compliance-gap-review",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate compliance-gap-review",
      "summary": "Existing Patient Visit Advocate artifacts already establish broad no-diagnosis and no-treatment boundaries, but the client-provided Pocket Advocate documents add launch-blocking Q&A-specific requirements that must be promoted into M-00, policy, data model, UX, and implementation plan before public content work.",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "product",
        "summary",
        "created_at",
        "project_id",
        "review_type",
        "schema_version",
        "source_artifact",
        "verification_risks",
        "recommended_next_action",
        "required_artifact_updates",
        "aligned_existing_boundaries",
        "implementation_acceptance_criteria"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- product: Pocket Advocate / Patient Visit Advocate\n- summary: Existing Patient Visit Advocate artifacts already establish broad no-diagnosis and no-treatment boundaries, but the client-provided Pocket Advocate documents add launch-blocking Q&A-specific requirements that must be promoted into M-00, policy, data model, UX, and implementation plan before public content work.\n- created at: 2026-05-07T13:22:15.478Z\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- review type: client-compliance-gap-review\n- schema version: 1.0\n- source artifact: client-source-reference\n- verification risks: 3 items\n- recommended next action: Update M-00, policy, architecture, feature UX spec, and plan to reference client-source-reference before approving any implementation or worker dispatch.\n- required artifact updates: 5 items\n- aligned existing boundaries: 5 items\n- implementation acceptance criteria: 7 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/compliance-gap-review-1709cbbf.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/compliance-gap-review-1709cbbf.json"
    },
    {
      "id": "studio-05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.407Z",
      "artifact_type": "company-workspace-data-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Company Workspace Data Spec",
      "summary": "company-workspace-data-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "gaps",
        "scope",
        "title",
        "version",
        "decisions",
        "next_specs",
        "project_id",
        "updated_at",
        "source_repo",
        "artifact_type",
        "lifecycle_models",
        "permission_model",
        "source_artifacts",
        "target_data_model",
        "acceptance_criteria",
        "target_capabilities",
        "live_schema_evidence",
        "surface_requirements",
        "implementation_sequence"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- gaps: 9 items\n- scope: excluded: object, included: object\n- title: B2BEA.org V1 Company Workspace Data Spec\n- version: 1\n- decisions: 8 items\n- next specs: 4 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-07T00:32:06.121Z\n- source repo: name: string, local_path: string, live_supabase_host: string\n- artifact type: company-workspace-data-spec\n- lifecycle models: employee: object, job_submission: object, academy_assignment: object, company_membership: object\n- permission model: 6 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/company-workspace-data-spec-05e0ed7c.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/company-workspace-data-spec-05e0ed7c.json"
    },
    {
      "id": "studio-b523c55c-a22a-4ba6-94c0-d306656e57f7",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b523c55c-a22a-4ba6-94c0-d306656e57f7",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "qa-release-readiness-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild qa-release-readiness-spec",
      "summary": "qa-release-readiness-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "status",
        "purpose",
        "version",
        "artifact",
        "client_id",
        "created_at",
        "created_by",
        "hard_stops",
        "project_id",
        "repositories",
        "project_title",
        "release_scope",
        "readiness_gates",
        "source_artifacts",
        "required_test_matrix",
        "next_recommended_artifact",
        "artifact_outputs_expected_later"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- status: draft\n- purpose: Define release readiness gates for the B2BEA.org rebuild before implementation planning or V1 launch approval.\n- version: 1\n- artifact: qa-release-readiness-spec\n- client id: b2bea\n- created at: 2026-05-07T15:35:22.233Z\n- created by: atlas-codex\n- hard stops: 4 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- repositories: website: object, design_system: object\n- project title: B2BEA.org Rebuild\n- release scope: shell_basis: object, design_basis: string, v1_route_basis: object"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/qa-release-readiness-spec-b523c55c.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/qa-release-readiness-spec-b523c55c.json"
    },
    {
      "id": "studio-aa8207c4-0603-45b1-be10-a04061d8cc8a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/aa8207c4-0603-45b1-be10-a04061d8cc8a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "policy",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate policy",
      "summary": "policy artifact · for Patient Visit Advocate · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "rules",
        "sources",
        "schema_version",
        "source_artifacts",
        "required_disclaimers",
        "approval_required_before_build",
        "content_lint_required_patterns"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- rules: 14 items\n- sources: 4 items\n- schema version: 1.0\n- source artifacts: 1 item\n- required disclaimers: coverage_caveat_exact: string, onboarding_body_exact: string, qna_card_footer_exact: string, onboarding_button_exact: string, onboarding_headline_exact: string\n- approval required before build: 5 items\n- content lint required patterns: 8 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/policy-aa8207c4.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/policy-aa8207c4.json"
    },
    {
      "id": "studio-9783e2c4-7623-4324-8aaa-86ee7dd77733",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/9783e2c4-7623-4324-8aaa-86ee7dd77733",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "architecture",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate architecture MVP-01",
      "summary": "architecture artifact · for Patient Visit Advocate · phase MVP-01 · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": "MVP-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "agents",
        "data_model",
        "open_questions",
        "schema_version",
        "launch_blockers",
        "agent_boundaries",
        "source_artifacts",
        "architecture_style",
        "generation_pipeline",
        "implementation_note",
        "required_components",
        "security_privacy_assumptions"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- ARCH-OQ-QNA-001: id: string, question: string\n- ARCH-OQ-QNA-002: id: string, question: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/architecture-mvp-01-9783e2c4.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/architecture-mvp-01-9783e2c4.json"
    },
    {
      "id": "studio-83da736a-0f52-42f0-bad5-c0e4a61cef06",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/83da736a-0f52-42f0-bad5-c0e4a61cef06",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "feature-ux-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate feature-ux-spec MVP-01",
      "summary": "feature-ux-spec artifact · for Patient Visit Advocate · phase MVP-01 · status approved",
      "status": "approved",
      "version": 5,
      "phase_id": "MVP-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "features",
        "decisions",
        "screen_map",
        "cross_cutting",
        "design_tokens",
        "open_questions",
        "schema_version",
        "source_artifacts",
        "required_surfaces",
        "acceptance_criteria",
        "global_ux_requirements"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-03: id: string, owner: string, blocks: string, question: string\n- OQ-04: id: string, owner: string, blocks: string, question: string\n- OQ-05: id: string, owner: string, blocks: string, question: string\n- OQ-06: id: string, owner: string, blocks: string, question: string\n- OQ-07: id: string, owner: string, blocks: string, question: string\n- UX-OQ-QNA-001: id: string, question: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/feature-ux-spec-mvp-01-83da736a.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/feature-ux-spec-mvp-01-83da736a.json"
    },
    {
      "id": "studio-823d14d7-5992-42f3-a2f4-f4738a045f7c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/823d14d7-5992-42f3-a2f4-f4738a045f7c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "survey-system-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Survey System Spec",
      "summary": "survey-system-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "scope",
        "title",
        "actors",
        "status",
        "purpose",
        "version",
        "project_id",
        "updated_at",
        "artifact_type",
        "next_artifacts",
        "open_questions",
        "question_model",
        "lifecycle_models",
        "permission_model",
        "source_artifacts",
        "target_data_model",
        "acceptance_criteria",
        "capability_contracts",
        "qa_and_release_checks",
        "page_template_implications"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- SURV-OQ-001: id: string, blocks: string, question: string\n- SURV-OQ-002: id: string, blocks: string, question: string\n- SURV-OQ-003: id: string, blocks: string, question: string"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/survey-system-spec-823d14d7.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/survey-system-spec-823d14d7.json"
    },
    {
      "id": "studio-77853042-e7a4-48bd-91a4-6e48d0484b1b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/77853042-e7a4-48bd-91a4-6e48d0484b1b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "surface-specs",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Surface Specs",
      "summary": "surface-specs artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 11,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "basis",
        "title",
        "status",
        "purpose",
        "version",
        "project_id",
        "updated_at",
        "updated_by",
        "artifact_type",
        "revision_note",
        "next_artifacts",
        "surface_catalog",
        "global_decisions",
        "linked_artifacts",
        "shared_contracts",
        "source_artifacts",
        "surface_decisions",
        "acceptance_criteria",
        "qa_release_readiness",
        "hard_stops_before_build"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- basis: 4 items\n- title: B2BEA.org V1 Surface Specs\n- status: draft\n- purpose: Define the concrete public, admin, member, vendor, company, auth, and publishing surfaces that implementation must build against after the current-site reverse-engineering and hardening specs.\n- version: 1\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-07T15:35:22.233Z\n- updated by: atlas-codex\n- artifact type: surface-specs\n- revision note: Linked draft survey-system-spec artifact.\n- next artifacts: 7 items\n- surface catalog: 7 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/surface-specs-77853042.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/surface-specs-77853042.json"
    },
    {
      "id": "studio-6733187b-befe-4a6d-8dba-07d40d6af804",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6733187b-befe-4a6d-8dba-07d40d6af804",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate module-spec M-02A",
      "summary": "module-spec artifact · for Patient Visit Advocate · phase M-02A · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": "M-02A",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "tasks",
        "inputs",
        "module",
        "status",
        "product",
        "why_now",
        "blockers",
        "next_step",
        "non_goals",
        "project_id",
        "schema_version",
        "output_artifacts",
        "scope_correction",
        "source_artifacts",
        "acceptance_criteria",
        "observed_source_state",
        "recommended_execution",
        "next_step_after_approval",
        "source_verification_report"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Verify the client-provided Pocket Advocate Q&A workbook shape, reconcile corpus-size claims, and produce an approved import scope before any ingestion, UI build, or AI-generation use of the Q&A corpus."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-02a-6733187b.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-02a-6733187b.json"
    },
    {
      "id": "studio-5790c99f-4109-4285-80c2-0856edb4a68a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5790c99f-4109-4285-80c2-0856edb4a68a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate module-spec M-00",
      "summary": "module-spec artifact · for Patient Visit Advocate · phase M-00 · status approved",
      "status": "approved",
      "version": 2,
      "phase_id": "M-00",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "module",
        "next_module",
        "release_gates",
        "schema_version",
        "official_sources",
        "product_boundary",
        "source_artifacts",
        "escalation_pattern",
        "acceptance_criteria",
        "required_copy_blocks",
        "client_compliance_boundary",
        "privacy_security_requirements",
        "required_before_public_qna_launch"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Lock the safety, privacy, regulatory posture, and AI-output boundary before implementing the patient visit advocate MVP."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-00-5790c99f.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-00-5790c99f.json"
    },
    {
      "id": "studio-4c3651ac-9a69-4117-a355-750b61f540c9",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/4c3651ac-9a69-4117-a355-750b61f540c9",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "design-system-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Design System Spec",
      "summary": "design-system-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 4,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "scope",
        "title",
        "tokens",
        "version",
        "decisions",
        "components",
        "project_id",
        "updated_at",
        "logo_assets",
        "source_repo",
        "source_files",
        "artifact_type",
        "page_patterns",
        "revision_note",
        "next_artifacts",
        "open_questions",
        "standard_sizes",
        "drift_to_remove",
        "design_system_repo",
        "acceptance_criteria"
      ],
      "sections": [
        {
          "title": "Components",
          "level": 2,
          "body": "- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string\n- item: contract: string, component: string"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Which blog/resource page families are intentional exceptions versus should be normalized?\n- Should admin and portal surfaces share the same component package or use denser variants?\n- Do we keep Material Symbols or move to a React icon library during rebuild?\n- What screenshot baseline set represents every page family?"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/design-system-spec-4c3651ac.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/design-system-spec-4c3651ac.json"
    },
    {
      "id": "studio-427c04a9-40b7-4e55-a642-65b2aee20b2b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/427c04a9-40b7-4e55-a642-65b2aee20b2b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "page-template-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Page Template Spec",
      "summary": "page-template-spec artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "purpose",
        "version",
        "redirects",
        "project_id",
        "updated_at",
        "artifact_type",
        "page_families",
        "next_artifacts",
        "source_summary",
        "source_artifacts",
        "acceptance_criteria",
        "global_template_rules",
        "unresolved_or_follow_on"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: B2BEA.org V1 Page Template Spec\n- status: draft\n- purpose: Convert approved surface decisions and route-family inventory into implementation-ready reusable page family contracts before any rebuild coding or PLAN/build approval.\n- version: 1\n- redirects: 3 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-07T14:36:17.481Z\n- artifact type: page-template-spec\n- page families: 26 items\n- next artifacts: 3 items\n- source summary: route_count: number, by_disposition: object, by_target_surface: object, route_inventory_id: string\n- source artifacts: 7 items"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/page-template-spec-427c04a9.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/page-template-spec-427c04a9.json"
    },
    {
      "id": "studio-2cec821e-07ba-4aca-81fb-078f163adf44",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2cec821e-07ba-4aca-81fb-078f163adf44",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "route-family-inventory",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org V1 Route Family Inventory",
      "summary": "[object Object]",
      "status": "approved",
      "version": 3,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "basis",
        "title",
        "routes",
        "source",
        "status",
        "summary",
        "version",
        "next_steps",
        "project_id",
        "updated_at",
        "artifact_type",
        "revision_note",
        "owner_decisions",
        "classification_rules"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- basis: 3 items\n- title: B2BEA.org V1 Route Family Inventory\n- routes: 97 items\n- source: site_head: string, site_repo: string, checkout_note: string, site_local_path: string, design_system_head: string, design_system_repo: string, design_system_local_path: string\n- status: draft\n- summary: deferred: object, redirects: object, route_count: number, needs_review: object, by_disposition: object, by_page_family: object, by_target_surface: object\n- version: 1\n- next steps: 4 items\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-07T13:54:34.797Z\n- artifact type: route-family-inventory\n- revision note: Owner approved maturity assessment as V1 special flow and reusable maturity-assessment pattern seed."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/route-family-inventory-2cec821e.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/route-family-inventory-2cec821e.json"
    },
    {
      "id": "studio-20f31336-e9fb-4059-be3a-176e11d1d720",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/20f31336-e9fb-4059-be3a-176e11d1d720",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.406Z",
      "artifact_type": "source-verification-report",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate source-verification-report M-02A",
      "summary": "source-verification-report artifact · for Patient Visit Advocate · phase M-02A · status approved",
      "status": "approved",
      "version": 2,
      "phase_id": "M-02A",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "module",
        "status",
        "product",
        "decision",
        "next_step",
        "created_at",
        "project_id",
        "report_type",
        "source_files",
        "cluster_counts",
        "recommendation",
        "schema_version",
        "scope_correction",
        "resolved_blockers",
        "workbook_structure",
        "accepted_import_scope",
        "coverage_content_clusters"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "- id: SRC-DEC-001\n- owner: Atlas-Codex on Justin direction\n- decision: Treat the provided workbook as the authoritative V1 seed corpus for implementation planning.\n- rationale: The physical workbook is internally coherent as 50 clusters with 5 Q&As each, for 250 total Q&A rows. The 1,000+ copy is treated as product/roadmap/marketing language, not the current import scope.\n- user instruction: Client is relying on us; no client clarification needed."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/source-verification-report-m-02a-20f31336.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/source-verification-report-m-02a-20f31336.json"
    },
    {
      "id": "studio-fc7b8411-5e66-48de-8c2a-081ab746ebe7",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/fc7b8411-5e66-48de-8c2a-081ab746ebe7",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_lite_claim_contract",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_lite_claim_contract",
      "summary": "api_lite_claim_contract artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "mode",
        "product",
        "purpose",
        "version",
        "state_changes",
        "bounded_attempts",
        "lite_hcs_message",
        "primary_endpoint",
        "direct_task_claim",
        "idempotency_rules",
        "db_selection_rules",
        "privacy_tests_required",
        "contract_tests_required",
        "claim_arbitration_algorithm"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- mode: lite\n- product: Bezel API\n- purpose: Define the MVP claim-only coordination contract. Lite stores customer work data in DB/storage and uses HCS only to arbitrate/prove claims.\n- version: 0.1\n- state changes: claimed: object, no_tasks: object, rejected: object\n- bounded attempts: rationale: string, default_limit: number, response_when_exhausted: string\n- lite hcs message: principle: string, allowed_fields: object, forbidden_fields: object, proof_fields_projected_to_db: object\n- primary endpoint: auth: string, path: string, method: string, request: object, responses: object\n- direct task claim: note: string, path: string, status: string, use_cases: object\n- idempotency rules: 4 items\n- db selection rules: 6 items\n- privacy tests required: 6 items"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-lite-claim-contract-fc7b8411.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-lite-claim-contract-fc7b8411.json"
    },
    {
      "id": "studio-f1bb1c5c-f7ca-444c-99dd-808f1c1583fc",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f1bb1c5c-f7ca-444c-99dd-808f1c1583fc",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_plan_intake_model",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_plan_intake_model",
      "summary": "api_plan_intake_model artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "flow",
        "rule",
        "endpoints",
        "invariants",
        "prohibition"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- flow: 6 items\n- rule: A whole software build is a workflow definition, not one giant task.\n- endpoints: 3 items\n- invariants: 4 items\n- prohibition: Do not dispatch a vague build-this-app prompt directly to role agents."
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-plan-intake-model-f1bb1c5c.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-plan-intake-model-f1bb1c5c.json"
    },
    {
      "id": "studio-dd70a0cf-1b45-4687-94df-c21dea2ad4aa",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/dd70a0cf-1b45-4687-94df-c21dea2ad4aa",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_repo_architecture",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_repo_architecture",
      "summary": "api_repo_architecture artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "version",
        "repo_name",
        "repo_path",
        "guardrails",
        "initial_stack",
        "package_layout",
        "recommendation",
        "first_build_order",
        "service_boundaries"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- version: 0.1\n- repo name: bezel-api\n- repo path: /Users/justinking/Vaults/Projects/bezel-api\n- guardrails: 5 items\n- initial stack: docs: string, tests: string, language: string, validation: string, api_runtime_decision: string\n- package layout: 10 items\n- recommendation: Start as a focused TypeScript product repo with API service, onboarding dashboard, shared contracts, and SDK snippets. Keep HCS writer behind a replaceable boundary.\n- first build order: 11 items\n- service boundaries: 7 items"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-repo-architecture-dd70a0cf.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-repo-architecture-dd70a0cf.json"
    },
    {
      "id": "studio-d6c50b77-7744-4842-975f-ca0d4a4ced3a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d6c50b77-7744-4842-975f-ca0d4a4ced3a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_onboarding_screens",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_onboarding_screens",
      "summary": "api_onboarding_screens artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "screens",
        "principle"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- screens: 14 items\n- principle: Do not start with workflows. Teach one role, one agent, one queue, one task, one claim, one receipt."
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-onboarding-screens-d6c50b77.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-onboarding-screens-d6c50b77.json"
    },
    {
      "id": "studio-c81a4ac9-b824-422e-aa25-86b278d6be5d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c81a4ac9-b824-422e-aa25-86b278d6be5d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_lite_scaffold_plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_lite_scaffold_plan",
      "summary": "api_lite_scaffold_plan artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "purpose",
        "version",
        "repo_path",
        "tdd_steps",
        "first_slice",
        "scaffold_files",
        "initial_contract_tests"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- purpose: Scaffold bezel-api from approved-enough Lite claim artifacts without implementing Pro/Verified lifecycle replay.\n- version: 0.1\n- repo path: /Users/justinking/Vaults/Projects/bezel-api\n- tdd steps: 5 items\n- first slice: Contract-first Lite claim package proving HCS claim messages cannot contain task data.\n- scaffold files: 15 items\n- initial contract tests: 5 items"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-lite-scaffold-plan-c81a4ac9.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-lite-scaffold-plan-c81a4ac9.json"
    },
    {
      "id": "studio-ac1b54a6-2002-4af5-bebd-dd2d0a1bf7cf",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ac1b54a6-2002-4af5-bebd-dd2d0a1bf7cf",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_endpoint_contract",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_endpoint_contract",
      "summary": "api_endpoint_contract artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 3,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "auth",
        "roles",
        "agents",
        "product",
        "version",
        "principle",
        "workflows",
        "invariants",
        "workspaces",
        "ledger_usage",
        "product_modes",
        "queues_and_tasks"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- auth: api_keys: object, human_session: object\n- roles: 4 items\n- agents: 5 items\n- product: Bezel API\n- version: 0.1\n- principle: Expose coordination primitives, not Hedera internals. Human auth and agent runtime auth are separate. Agents normally call claim-next; they do not choose tasks before claiming.\n- workflows: 8 items\n- invariants: 6 items\n- workspaces: 3 items\n- ledger usage: 6 items\n- product modes: lite: object, verified: object\n- queues and tasks: 8 items"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-endpoint-contract-ac1b54a6.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-endpoint-contract-ac1b54a6.json"
    },
    {
      "id": "studio-a20dc94a-85b8-4fb7-957c-24ab63a3b94f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a20dc94a-85b8-4fb7-957c-24ab63a3b94f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_data_model",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_data_model",
      "summary": "api_data_model artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "product",
        "version",
        "entities",
        "event_model",
        "product_modes",
        "storage_principle",
        "tenant_invariants",
        "redkey_studio_mapping"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- product: Bezel API\n- version: 0.1\n- entities: 17 items\n- event model: lite_mode: object, verified_mode: object, non_metered_reads: object, hcs_payload_boundary: string, metered_hcs_backed_events: object\n- product modes: lite: object, verified: object\n- storage principle: Bezel API owns product tables in its implementation repo/database. RedKey Studio owns design artifacts until approval.\n- tenant invariants: 5 items\n- redkey studio mapping: project_row: string, approved_path: string, artifact_rows: string"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-data-model-a20dc94a.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-data-model-a20dc94a.json"
    },
    {
      "id": "studio-98a26319-8d8d-48bd-b0f9-abcf0e20de46",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/98a26319-8d8d-48bd-b0f9-abcf0e20de46",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate plan MVP-01",
      "summary": "plan artifact · for Patient Visit Advocate · phase MVP-01 · status approved",
      "status": "approved",
      "version": 11,
      "phase_id": "MVP-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "slices",
        "status",
        "plan_json",
        "plan_name",
        "project_id",
        "updated_at",
        "owner_review",
        "artifact_type",
        "planning_goal",
        "project_title",
        "recommendation",
        "schema_version",
        "source_artifacts",
        "inherited_decisions",
        "not_required_for_first_slice"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- slices: 3 items\n- status: ready_for_owner_review\n- plan json: phases: object, version: string, project_id: string, project_name: string, execution_rule: string, recommended_slice: string\n- plan name: Patient Visit Advocate Reviewable Build Plan\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- updated at: 2026-05-08T04:02:11.152Z\n- owner review: approve_to_start: object, decisions_not_needed_now: object, decisions_needed_before_later_public_patient_work: object\n- artifact type: plan\n- planning goal: Move from accepted Q&A source/import specs to a bounded first build slice that can be approved without reopening broad product strategy.\n- project title: Patient Visit Advocate\n- recommendation: name: string, reason: string, approval_ask: string, first_slice_id: string\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/plan-mvp-01-98a26319.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/plan-mvp-01-98a26319.json"
    },
    {
      "id": "studio-949a5971-6667-4965-a425-7a17154fc42d",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/949a5971-6667-4965-a425-7a17154fc42d",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "module-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate module-spec M-02B",
      "summary": "module-spec artifact · for Patient Visit Advocate · phase M-02B · status approved",
      "status": "approved",
      "version": 3,
      "phase_id": "M-02B",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "risks",
        "tasks",
        "module",
        "status",
        "product",
        "non_goals",
        "project_id",
        "dependencies",
        "schema_version",
        "target_database",
        "output_artifacts",
        "scope_correction",
        "source_artifacts",
        "validation_rules",
        "acceptance_criteria",
        "acceptance_decision",
        "accepted_seed_scope",
        "proposed_data_contracts",
        "next_step_after_approval"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Define the durable ingestion and provenance model for importing the accepted 250-row Pocket Advocate Q&A seed while preserving source traceability, provider-question framing, coverage tags, lint/review state, and future re-import safety."
        },
        {
          "title": "Risks",
          "level": 2,
          "body": "- M02B-RISK-001: id: string, risk: string, mitigation: string\n- M02B-RISK-002: id: string, risk: string, mitigation: string\n- M02B-RISK-003: id: string, risk: string, mitigation: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-02b-949a5971.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/module-spec-m-02b-949a5971.json"
    },
    {
      "id": "studio-684792e0-c708-4ad6-868e-9d057ad3f848",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/684792e0-c708-4ad6-868e-9d057ad3f848",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_role_topic_coordination_model",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_role_topic_coordination_model",
      "summary": "api_role_topic_coordination_model artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 3,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "deferred",
        "examples",
        "rationale",
        "product_modes",
        "optional_later",
        "claim_responses",
        "agent_runtime_loop",
        "hcs_topic_decision",
        "lite_hcs_claiming_model",
        "verified_hcs_lifecycle_model"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- deferred: 2 items\n- examples: 3 items\n- rationale: Role topics are where claim contention happens. Agents race only with agents eligible for the same role.\n- product modes: lite: object, verified: object\n- optional later: 3 items\n- claim responses: missed: string, claimed: string, no_tasks: string, rejected: string\n- agent runtime loop: flow: object, primary_endpoint: string, direct_task_claim: string, normal_agent_responses: object\n- hcs topic decision: one HCS topic per workspace role in v1\n- lite hcs claiming model: decision: string, task_storage: string, claim_next_flow: object, hcs_role_topic_contains: object, hcs_role_topic_must_not_contain: object\n- verified hcs lifecycle model: decision: string, hcs_contains: object, still_forbidden: object"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-role-topic-coordination-model-684792e0.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-role-topic-coordination-model-684792e0.json"
    },
    {
      "id": "studio-56c75204-7800-45f7-bcf9-06e5f24014da",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/56c75204-7800-45f7-bcf9-06e5f24014da",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "schema-or-migration-spec",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate schema-or-migration-spec M-02B",
      "summary": "schema-or-migration-spec artifact · for Patient Visit Advocate · phase M-02B · status approved",
      "status": "approved",
      "version": 4,
      "phase_id": "M-02B",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "tables",
        "product",
        "artifact",
        "project_id",
        "rls_policy",
        "schema_version",
        "target_database",
        "scope_correction",
        "source_artifacts",
        "namespace_decision",
        "acceptance_decision",
        "import_safety_rules",
        "verification_queries",
        "proposed_migration_name",
        "migration_acceptance_criteria",
        "next_artifact_after_migration_spec"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Specify the database migration and import-safety contract for the accepted 250-row Q&A seed without making any content public-ready."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/schema-or-migration-spec-m-02b-56c75204.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/schema-or-migration-spec-m-02b-56c75204.json"
    },
    {
      "id": "studio-54c8ae7f-d838-4255-9086-aed0fbc424bf",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/54c8ae7f-d838-4255-9086-aed0fbc424bf",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_agent_wire_contract",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_agent_wire_contract",
      "summary": "api_agent_wire_contract artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 3,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "product",
        "version",
        "decision",
        "lite_profile",
        "bezel_profile",
        "product_modes",
        "receipt_policy",
        "artifact_policy",
        "open_schema_gap",
        "source_contracts",
        "verified_profile",
        "task_event_policy",
        "adopted_invariants",
        "required_bezel_follow_up_contracts"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "Bezel API adopts the existing RedKey Agent Wire v1.1 hardening work as its customer task wire baseline. Do not invent a separate Bezel wire protocol."
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-agent-wire-contract-54c8ae7f.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-agent-wire-contract-54c8ae7f.json"
    },
    {
      "id": "studio-392dc903-8276-40fc-b212-288ad16620b0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/392dc903-8276-40fc-b212-288ad16620b0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_product_intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_product_intent",
      "summary": "api_product_intent artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "purpose",
        "repo_name",
        "repo_path",
        "positioning",
        "product_line",
        "product_name",
        "success_loop",
        "product_modes"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- purpose: Hosted API product for RedKey verified agent coordination.\n- repo name: bezel-api\n- repo path: /Users/justinking/Vaults/Projects/bezel-api\n- positioning: redkey: string, boundary: string, bezel_api: string, first_wedge: string\n- product line: Bezel API gives agent frameworks a verified shared queue.\n- product name: Bezel API\n- success loop: 10 items\n- product modes: lite: object, verified: object"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-product-intent-392dc903.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-product-intent-392dc903.json"
    },
    {
      "id": "studio-211fbe96-dea0-48a4-b607-0f71a7914d51",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/211fbe96-dea0-48a4-b607-0f71a7914d51",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_mvp_plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_mvp_plan",
      "summary": "api_mvp_plan artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "in_scope",
        "out_of_scope",
        "open_questions",
        "product_mode_decision"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Should development-mode unverified agents be allowed to claim only from development queues?\n- Should v1 runtime be Cloudflare Workers plus HCS writer boundary or a single Node service until claim flow is stable?\n- Should workspace.created consume event credits?\n- Should task.claim_attempted always be written to HCS?\n- Should API keys be a dedicated onboarding step before roles or generated automatically in setup path?"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-mvp-plan-211fbe96.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-mvp-plan-211fbe96.json"
    },
    {
      "id": "studio-0e1029f7-09e0-4407-8ea9-f71cdc5e8c31",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0e1029f7-09e0-4407-8ea9-f71cdc5e8c31",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "B2BEA.org Rebuild plan",
      "summary": "plan artifact · for B2BEA.org Rebuild · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "slices",
        "status",
        "plan_json",
        "plan_name",
        "project_id",
        "updated_at",
        "owner_review",
        "artifact_type",
        "planning_goal",
        "project_title",
        "recommendation",
        "schema_version",
        "source_artifacts",
        "inherited_decisions",
        "not_required_for_first_slice"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- slices: 4 items\n- status: ready_for_owner_review\n- plan json: phases: object, version: string, project_id: string, project_name: string, execution_rule: string, recommended_slice: string\n- plan name: B2BEA.org Reviewable V1 Implementation Plan\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-08T04:02:11.152Z\n- owner review: approve_to_start: object, decisions_not_needed_now: object, decisions_needed_before_later_slices: object\n- artifact type: plan\n- planning goal: Convert the existing draft research, surface, data, entitlement, design, and release-readiness artifacts into a bounded first implementation slice for owner review.\n- project title: B2BEA.org Rebuild\n- recommendation: name: string, reason: string, approval_ask: string, first_slice_id: string\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/plan-0e1029f7.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/plan-0e1029f7.json"
    },
    {
      "id": "studio-0338ff9a-29f8-4867-9470-7f17d99bdded",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0338ff9a-29f8-4867-9470-7f17d99bdded",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.405Z",
      "artifact_type": "api_auth_workspace_model",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_auth_workspace_model",
      "summary": "api_auth_workspace_model artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "invariant",
        "separation",
        "api_key_scopes",
        "tenant_boundary",
        "api_key_endpoint",
        "workspace_contains",
        "human_auth_endpoints"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- invariant: Every API request resolves a workspace from human session, selected workspace, or workspace-scoped API key. Object IDs are never trusted on their own.\n- separation: Human sessions administer workspaces and create API keys. Agents claim tasks with scoped runtime API keys.\n- api key scopes: 4 items\n- tenant boundary: workspace\n- api key endpoint: POST /workspaces/:workspaceId/api-keys\n- workspace contains: 12 items\n- human auth endpoints: 5 items"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-auth-workspace-model-0338ff9a.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-auth-workspace-model-0338ff9a.json"
    },
    {
      "id": "studio-fbf81752-0fba-415e-a6f5-a5c98d2e989c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/fbf81752-0fba-415e-a6f5-a5c98d2e989c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "design-system-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Advocacy Ops Design System",
      "summary": "design-system-spec artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "decision",
        "created_at",
        "output_ref",
        "design_position",
        "implementation_requirement"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "PVA_PRODUCT_UI_USES_ADVOCACY_OPS_SYSTEM_NOT_DREAMBORN_TOKENS"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/design-system-spec-pva-slice-01-fbf81752.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/design-system-spec-pva-slice-01-fbf81752.json"
    },
    {
      "id": "studio-f994c22b-de7f-4195-8ef9-e33f06694f2f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f994c22b-de7f-4195-8ef9-e33f06694f2f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "readiness-addendum",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA-SLICE-01 Design System Readiness Addendum",
      "summary": "readiness-addendum artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "decision",
        "created_at",
        "output_ref",
        "design_system_ref"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "PVA_UI_BUILD_TASKS_MUST_USE_ADVOCACY_OPS_DESIGN_SYSTEM"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/readiness-addendum-pva-slice-01-f994c22b.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/readiness-addendum-pva-slice-01-f994c22b.json"
    },
    {
      "id": "studio-f41946df-1f0a-4d06-9b33-68d677e78a80",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f41946df-1f0a-4d06-9b33-68d677e78a80",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "security-privacy-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild security-privacy-spec",
      "summary": "security-privacy-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-security-privacy-spec.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: security-privacy-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/security-privacy-spec-f41946df.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/security-privacy-spec-f41946df.json"
    },
    {
      "id": "studio-e3340463-5f07-4929-989b-75561f358973",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e3340463-5f07-4929-989b-75561f358973",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "sanity-schema-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild sanity-schema-spec",
      "summary": "sanity-schema-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-sanity-schema-spec.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: sanity-schema-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/sanity-schema-spec-e3340463.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/sanity-schema-spec-e3340463.json"
    },
    {
      "id": "studio-dc76c59e-78b0-459a-881e-633761d2aa0c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/dc76c59e-78b0-459a-881e-633761d2aa0c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "final-readiness-decision",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA-SLICE-01 Final Readiness Decision",
      "summary": "final-readiness-decision artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "decision",
        "created_at",
        "output_ref",
        "schema_addendum_ref",
        "build_brief_constraints"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "READY_FOR_IMPLEMENTATION_PLANNING_WITH_MANDATORY_SCHEMA_ADDENDUM"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/final-readiness-decision-pva-slice-01-dc76c59e.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/final-readiness-decision-pva-slice-01-dc76c59e.json"
    },
    {
      "id": "studio-d66dd863-8dfc-4383-ad2d-d8bfc5ee3887",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d66dd863-8dfc-4383-ad2d-d8bfc5ee3887",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "qa-baseline-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild qa-baseline-spec",
      "summary": "qa-baseline-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-qa-baseline-spec.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: qa-baseline-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/qa-baseline-spec-d66dd863.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/qa-baseline-spec-d66dd863.json"
    },
    {
      "id": "studio-cfd42c4e-6594-467a-91d6-6c3bac55ad84",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/cfd42c4e-6594-467a-91d6-6c3bac55ad84",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "target-architecture-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild target-architecture-spec",
      "summary": "target-architecture-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "project_id",
        "updated_at",
        "artifact_type",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 2\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-08\n- artifact type: target-architecture-spec\n- revision note: Updated target architecture to hybrid-first: Eleventy public layer plus dedicated app/runtime layer for protected workflows."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/target-architecture-spec-cfd42c4e.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/target-architecture-spec-cfd42c4e.json"
    },
    {
      "id": "studio-b8b1bde9-6d0b-4e28-9ed7-4159d4041cb8",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b8b1bde9-6d0b-4e28-9ed7-4159d4041cb8",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "route-customization-review",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild route-customization-review",
      "summary": "route-customization-review artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-route-customization-review.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: route-customization-review"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/route-customization-review-b8b1bde9.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/route-customization-review-b8b1bde9.json"
    },
    {
      "id": "studio-b4c6f1fc-0f21-4453-a27b-a5e2c424e8d0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b4c6f1fc-0f21-4453-a27b-a5e2c424e8d0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "final-readiness-decision",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA-SLICE-01 Final Readiness Decision",
      "summary": "final-readiness-decision artifact · for B2BEA.org Rebuild · phase B2BEA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "B2BEA-SLICE-01",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "decision",
        "created_at",
        "output_ref",
        "resolved_items",
        "build_brief_constraints"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "READY_FOR_IMPLEMENTATION_PLANNING_WITH_CONSTRAINTS"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/final-readiness-decision-b2bea-slice-01-b4c6f1fc.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/final-readiness-decision-b2bea-slice-01-b4c6f1fc.json"
    },
    {
      "id": "studio-8ed1cc67-61bd-428a-b951-652cce02918b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8ed1cc67-61bd-428a-b951-652cce02918b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "custom-html-import-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild custom-html-import-spec",
      "summary": "custom-html-import-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-custom-html-import-spec.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: custom-html-import-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/custom-html-import-spec-8ed1cc67.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/custom-html-import-spec-8ed1cc67.json"
    },
    {
      "id": "studio-8a6e0d2a-a916-4f6e-8c78-370470b86bfa",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8a6e0d2a-a916-4f6e-8c78-370470b86bfa",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "schema-addendum",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA-SLICE-01 Schema Addendum — M-02B Corrections",
      "summary": "schema-addendum artifact · for Patient Visit Advocate · phase M-02B · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "M-02B",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "title",
        "status",
        "decision",
        "resolves",
        "created_at",
        "output_ref",
        "required_sql"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "M02B_SCHEMA_CORRECTIONS_CAN_UNBLOCK_IMPLEMENTATION_PLANNING"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/schema-addendum-m-02b-8a6e0d2a.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/schema-addendum-m-02b-8a6e0d2a.json"
    },
    {
      "id": "studio-59753fba-37f1-4374-a2a5-83cfd63758e0",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/59753fba-37f1-4374-a2a5-83cfd63758e0",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "design-system-governance-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild design-system-governance-spec",
      "summary": "Governance contract to prevent rogue CSS while designer continues improving the B2BEA design system.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "project_id",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- summary: Governance contract to prevent rogue CSS while designer continues improving the B2BEA design system.\n- version: 1\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- artifact type: design-system-governance-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/design-system-governance-spec-59753fba.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/design-system-governance-spec-59753fba.json"
    },
    {
      "id": "studio-47255e71-6db5-40fd-9ae9-2bfa1144f338",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/47255e71-6db5-40fd-9ae9-2bfa1144f338",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "plan",
      "schema_version": "1.0",
      "title": "Patient Visit Advocate plan",
      "summary": "plan artifact · for Patient Visit Advocate · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": null,
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "git",
        "gates",
        "modules",
        "project",
        "dev_studio",
        "open_questions",
        "schema_version",
        "dependency_graph",
        "planning_summary"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-01: id: string, owner: string, blocks: object, status: string, question: string, my_default: string\n- OQ-02: id: string, owner: string, blocks: object, status: string, question: string, my_default: string\n- OQ-03: id: string, owner: string, blocks: object, status: string, question: string, my_default: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/plan-47255e71.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/plan-47255e71.json"
    },
    {
      "id": "studio-31eb93de-6a8f-4ea7-8f54-31ce569682fd",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/31eb93de-6a8f-4ea7-8f54-31ce569682fd",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "implementation-roadmap",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild implementation-roadmap",
      "summary": "implementation-roadmap artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "project_id",
        "updated_at",
        "artifact_type",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 2\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- updated at: 2026-05-08\n- artifact type: implementation-roadmap\n- revision note: Updated target architecture to hybrid-first: Eleventy public layer plus dedicated app/runtime layer for protected workflows."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/implementation-roadmap-31eb93de.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/implementation-roadmap-31eb93de.json"
    },
    {
      "id": "studio-0364cf67-20bf-40bd-9b8c-2f3bace7c7b5",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/0364cf67-20bf-40bd-9b8c-2f3bace7c7b5",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.404Z",
      "artifact_type": "seo-geo-social-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild seo-geo-social-spec",
      "summary": "seo-geo-social-spec artifact · for B2BEA.org Rebuild · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "format",
        "source",
        "status",
        "project",
        "version",
        "filename",
        "project_id",
        "generated_at",
        "artifact_type"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- version: 1\n- filename: docs/specs/2026-05-08-b2bea-org-seo-geo-social-spec.md\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- generated at: 2026-05-08\n- artifact type: seo-geo-social-spec"
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/seo-geo-social-spec-0364cf67.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/seo-geo-social-spec-0364cf67.json"
    },
    {
      "id": "studio-cf99e9d7-d6e4-4799-8431-bc6c1aeb7c71",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/cf99e9d7-d6e4-4799-8431-bc6c1aeb7c71",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "api_production_deployment_runbook",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_production_deployment_runbook",
      "summary": "api_production_deployment_runbook artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "vps",
        "health",
        "status",
        "dns_tls",
        "version",
        "database",
        "live_smoke",
        "repository",
        "updated_at",
        "deploy_steps",
        "production_url",
        "runtime_config"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- vps: host: string, note: string, port: number, service: string, service_exec: string, worktree_path: string, node_version_observed: string\n- health: get: string, head: string, note: string\n- status: live\n- dns tls: dns: string, tls: string, nginx_site: string, certificate_renews: string\n- version: 1.0\n- database: schema_reason: string, migration_command: string\n- live smoke: command: string, last_verified_behavior: object, reusable_testnet_topic: string\n- repository: github: string, local_path: string, latest_verified_commit: string\n- updated at: 2026-05-08T16:38:39.141Z\n- deploy steps: 5 items\n- production url: https://api.bezeliq.ai\n- runtime config: env_file: string, doppler_config: string, database_schema: string, doppler_project: string, required_secret_names: object, database_ssl_reject_unauthorized: boolean"
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-production-deployment-runbook-cf99e9d7.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-production-deployment-runbook-cf99e9d7.json"
    },
    {
      "id": "studio-c7bdfa1d-890a-4c5e-b88a-e3cffca55505",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/c7bdfa1d-890a-4c5e-b88a-e3cffca55505",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "safety-privacy-qa-matrix",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Safety and Privacy QA Gate Matrix",
      "summary": "safety-privacy-qa-matrix artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "gates",
        "phase",
        "title",
        "source",
        "product",
        "purpose",
        "created_at",
        "created_by",
        "project_id",
        "scenario_tests",
        "ask_model_notes",
        "required_evidence"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- gates: 12 items\n- phase: id: string, name: string, status: string\n- title: PVA Safety and Privacy QA Gate Matrix\n- source: Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.\n- product: Patient Visit Advocate\n- purpose: Define testable gates for the local-only pocket prototype and later patient-facing/server work.\n- created at: 2026-05-08T14:02:37.874Z\n- created by: atlas-codex\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- scenario tests: 8 items\n- ask model notes: 2 items\n- required evidence: 4 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/safety-privacy-qa-matrix-pva-slice-01-c7bdfa1d.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/safety-privacy-qa-matrix-pva-slice-01-c7bdfa1d.json"
    },
    {
      "id": "studio-ae4aafaa-7ac7-4054-9b0a-fa443a7c8d94",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ae4aafaa-7ac7-4054-9b0a-fa443a7c8d94",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "local-pocket-prototype-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Local-Only Pocket Prototype Spec",
      "summary": "local-pocket-prototype-spec artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "scope",
        "title",
        "source",
        "product",
        "purpose",
        "done_when",
        "created_at",
        "created_by",
        "project_id",
        "product_thesis",
        "ask_model_notes",
        "offline_behavior",
        "required_screens",
        "local_state_machine",
        "prototype_ai_policy"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: id: string, name: string, status: string\n- scope: in: object, out: object\n- title: PVA Local-Only Pocket Prototype Spec\n- source: Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.\n- product: Patient Visit Advocate\n- purpose: Validate the customer product loop quickly without backend PHI, account friction, or internal tooling dominance.\n- done when: 5 items\n- created at: 2026-05-08T14:02:37.874Z\n- created by: atlas-codex\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- product thesis: A patient can open the app in their pocket before or after a visit, turn messy thoughts into a useful visit artifact, and leave with more clarity without receiving medical advice.\n- ask model notes: 2 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-pocket-prototype-spec-pva-slice-01-ae4aafaa.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-pocket-prototype-spec-pva-slice-01-ae4aafaa.json"
    },
    {
      "id": "studio-9d6ebb39-761f-42ba-bb55-fc95dabb5c3f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/9d6ebb39-761f-42ba-bb55-fc95dabb5c3f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "local-prototype-safety-privacy-test-plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Local Prototype Safety and Privacy Test Plan",
      "summary": "local-prototype-safety-privacy-test-plan artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "date",
        "phase",
        "title",
        "status",
        "version",
        "authored_by",
        "open_blockers",
        "privacy_tests",
        "release_gates",
        "scope_summary",
        "execution_notes",
        "ai_failure_tests",
        "source_artifacts",
        "synthetic_inputs",
        "free_tier_boundary",
        "screen_state_tests"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- date: 2026-05-08\n- phase: id: string, label: string\n- title: PVA Local Prototype Safety and Privacy Test Plan\n- status: draft\n- version: 1.0\n- authored by: luna\n- open blockers: 5 items\n- privacy tests: PRV-001: object, PRV-002: object, PRV-003: object, PRV-004: object, PRV-005: object, PRV-006: object, PRV-007: object, PRV-008: object, PRV-009: object, PRV-010: object, PRV-011: object, PRV-012: object\n- release gates: gate_2_beta: object, gate_1_alpha: object, gate_3_launch: object\n- scope summary: Executable test scenarios and release gate criteria for all free-loop screens, synthetic medical-adjacent inputs, privacy boundaries, and AI failure/fallback paths in the PVA local-only pocket prototype. Does NOT assert that tests have been executed or passed.\n- execution notes: disclaimer: string, environment: object, coverage_gaps: object\n- ai failure tests: AIR-001: object, AIR-002: object, AIR-003: object, AIR-004: object, AIR-005: object, AIR-006: object, AIR-007: object, AIR-008: object, AIR-009: object, AIR-010: object"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-prototype-safety-privacy-test-plan-pva-slice-01-9d6ebb39.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-prototype-safety-privacy-test-plan-pva-slice-01-9d6ebb39.json"
    },
    {
      "id": "studio-78ca477c-cd9c-4ba8-84ed-db0944e88702",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/78ca477c-cd9c-4ba8-84ed-db0944e88702",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "trust-boundary-charter",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Trust Boundary Charter",
      "summary": "trust-boundary-charter artifact · for Patient Visit Advocate · phase PVA-SLICE-00 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-00",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "gates",
        "phase",
        "title",
        "source",
        "product",
        "purpose",
        "created_at",
        "created_by",
        "hard_rules",
        "principles",
        "project_id",
        "ask_model_notes",
        "monetization_boundary"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- gates: 5 items\n- phase: id: string, name: string, status: string\n- title: PVA Trust Boundary Charter\n- source: Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.\n- product: Patient Visit Advocate\n- purpose: Define the hard trust, safety, privacy, and monetization boundaries before any patient-facing or server-side health-data work begins.\n- created at: 2026-05-08T14:02:37.874Z\n- created by: atlas-codex\n- hard rules: 8 items\n- principles: 5 items\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- ask model notes: 2 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/trust-boundary-charter-pva-slice-00-78ca477c.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/trust-boundary-charter-pva-slice-00-78ca477c.json"
    },
    {
      "id": "studio-464b8e0b-e056-42b5-8dae-b41a2b71ea5a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/464b8e0b-e056-42b5-8dae-b41a2b71ea5a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "local-pocket-screen-flow-pass",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Local Pocket App Screen Flow Pass",
      "summary": "local-pocket-screen-flow-pass artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "flows",
        "phase",
        "title",
        "product",
        "purpose",
        "screens",
        "created_at",
        "created_by",
        "hard_stops",
        "project_id",
        "artifact_type",
        "open_questions",
        "design_system_ref",
        "decisions_embedded",
        "visual_language_anchor",
        "qa_gate_cross_reference",
        "empty_offline_failure_states",
        "one_hand_waiting_room_behavior",
        "non_coercive_memory_prompt_rules"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-01: id: string, affects: string, context: string, question: string, my_default: string\n- OQ-02: id: string, affects: string, context: string, question: string, my_default: string\n- OQ-03: id: string, affects: string, context: string, question: string, my_default: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-pocket-screen-flow-pass-pva-slice-01-464b8e0b.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-pocket-screen-flow-pass-pva-slice-01-464b8e0b.json"
    },
    {
      "id": "studio-286ab7ae-6173-40a4-a66a-9bcddb6e7a73",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/286ab7ae-6173-40a4-a66a-9bcddb6e7a73",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Slice 0 Hybrid Platform Skeleton Implementation Plan",
      "summary": "Executable Slice 0 plan for B2BEA.org hybrid Eleventy plus app/runtime skeleton.",
      "status": "draft",
      "version": 3,
      "phase_id": "S-00",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "phase_id",
        "project_id",
        "dependencies",
        "artifact_type",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Slice 0 Hybrid Platform Skeleton Implementation Plan\n- source: atlas-codex\n- status: draft\n- project: B2BEA.org Rebuild\n- summary: Executable Slice 0 plan for B2BEA.org hybrid Eleventy plus app/runtime skeleton.\n- version: 3\n- phase id: S-00\n- project id: a820dd0c-6cef-4133-bfbd-d802fd806e44\n- dependencies: 5 items\n- artifact type: plan\n- revision note: Added concrete Slice 0 setup decisions: existing repo, preserved WIP commit, clean worktree, Cloudflare Pages Functions first, same-domain route prefixes."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/plan-s-00-286ab7ae.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/plan-s-00-286ab7ae.json"
    },
    {
      "id": "studio-1d0623fa-7b89-46d2-ab35-4b5223f17507",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/1d0623fa-7b89-46d2-ab35-4b5223f17507",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "patient-data-ai-contract",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Patient Data and AI Contract",
      "summary": "patient-data-ai-contract artifact · for Patient Visit Advocate · phase PVA-SLICE-02 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-02",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "source",
        "product",
        "purpose",
        "done_when",
        "created_at",
        "created_by",
        "project_id",
        "ask_model_notes",
        "model_io_contract",
        "hard_open_questions",
        "required_delta_entities",
        "reuse_existing_artifacts",
        "free_paid_storage_boundary"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: id: string, name: string, status: string\n- title: PVA Patient Data and AI Contract\n- source: Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.\n- product: Patient Visit Advocate\n- purpose: Define the minimum data and model boundary needed to move from local prototype to saved memory without rewriting approved M-01 work.\n- done when: 4 items\n- created at: 2026-05-08T14:02:37.874Z\n- created by: atlas-codex\n- project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da\n- ask model notes: 2 items\n- model io contract: server_mvp: string, local_prototype: string, required_outputs: object, prohibited_outputs: object\n- hard open questions: 5 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/patient-data-ai-contract-pva-slice-02-1d0623fa.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/patient-data-ai-contract-pva-slice-02-1d0623fa.json"
    },
    {
      "id": "studio-17a8249c-f8f0-42e5-aef1-1c9dd7e0c784",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/17a8249c-f8f0-42e5-aef1-1c9dd7e0c784",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.403Z",
      "artifact_type": "revised-decomposition-plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Revised Decomposition and Autopilot Plan",
      "summary": "revised-decomposition-plan artifact · for Patient Visit Advocate · phase PVA-AUTOPILOT-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-AUTOPILOT-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "source",
        "product",
        "decision",
        "created_at",
        "created_by",
        "project_id",
        "explicit_avoid",
        "revised_slices",
        "ask_model_synthesis",
        "first_autopilot_wave",
        "next_dispatch_condition"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "Replace the internal-review-first sequence with a pocket-app-first decomposition. The customer product is the app. Internal corpus/review work supports safety and learning but must not dominate the first customer-value slice."
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/revised-decomposition-plan-pva-autopilot-01-17a8249c.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/revised-decomposition-plan-pva-autopilot-01-17a8249c.json"
    },
    {
      "id": "studio-e8269478-d174-4b63-b0f7-2b8a51bea476",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e8269478-d174-4b63-b0f7-2b8a51bea476",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "exec-review-decision",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA REVIEW-GATE-01 Exec Decision",
      "summary": "exec-review-decision artifact · for Patient Visit Advocate · phase PVA-REVIEW-GATE-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-REVIEW-GATE-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "task_id",
        "decision",
        "evidence",
        "decided_at",
        "decided_by",
        "output_ref",
        "artifact_type",
        "approved_scope",
        "remaining_holds"
      ],
      "sections": [
        {
          "title": "Decision",
          "level": 2,
          "body": "approved_internal_review_only"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/exec-review-decision-pva-review-gate-01-e8269478.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/exec-review-decision-pva-review-gate-01-e8269478.json"
    },
    {
      "id": "studio-d09cee22-83b7-4d7a-b049-7ebf4f41abdc",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d09cee22-83b7-4d7a-b049-7ebf4f41abdc",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "internal-alpha-review-checklist",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Internal Alpha Review and Device Privacy Checklist",
      "summary": "internal-alpha-review-checklist artifact · for Patient Visit Advocate · phase PVA-INTERNAL-ALPHA-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-INTERNAL-ALPHA-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "date",
        "phase",
        "title",
        "product",
        "hard_holds",
        "artifact_type",
        "decision_context",
        "verification_baseline",
        "internal_review_checklist",
        "next_artifacts_recommended",
        "physical_device_privacy_checks"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- date: 2026-05-08\n- phase: id: string, status: string\n- title: PVA Internal Alpha Review and Device Privacy Checklist\n- product: Patient Visit Advocate\n- hard holds: 3 items\n- artifact type: internal-alpha-review-checklist\n- decision context: local_branch: string, local_commit: string, vps_worktree: string, approved_scope: string, external_beta_status: string, exec_decision_artifact: string\n- verification baseline: routes: object, qa_result: string, local_build: string, local_tests: string\n- internal review checklist: 8 items\n- next artifacts recommended: 4 items\n- physical device privacy checks: 5 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/internal-alpha-review-checklist-pva-internal-alpha-01-d09cee22.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/internal-alpha-review-checklist-pva-internal-alpha-01-d09cee22.json"
    },
    {
      "id": "studio-ca68bd73-219a-4d01-9f4a-2953407c020a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ca68bd73-219a-4d01-9f4a-2953407c020a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "capability-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Capability Spec",
      "summary": "Defines Jess capabilities, boundaries, and expected tools.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Capability Spec\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Defines Jess capabilities, boundaries, and expected tools.\n- version: 1\n- generated at: 2026-05-08T16:57:34.685Z"
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/capability-spec-ca68bd73.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/capability-spec-ca68bd73.json"
    },
    {
      "id": "studio-aec8c2f9-5368-4405-a6ad-ab805223705a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/aec8c2f9-5368-4405-a6ad-ab805223705a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "api_slice_1_plan_claim_loop_plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Bezel API api_slice_1_plan_claim_loop_plan",
      "summary": "api_slice_1_plan_claim_loop_plan artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 5,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "status",
        "version",
        "progress",
        "non_goals",
        "updated_at",
        "open_questions",
        "hardening_tasks",
        "product_contract",
        "verification_gate"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Make customer-submitted multi-task plans reliable while preserving Lite mode: task data stays in the Bezel DB, and HCS only records minimal claim proofs."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Whether to add priority/order fields to tasks in Slice 1 or keep DB insertion order plus dependency readiness."
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-slice-1-plan-claim-loop-plan-aec8c2f9.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-slice-1-plan-claim-loop-plan-aec8c2f9.json"
    },
    {
      "id": "studio-a19c0bb2-1a45-4f64-bb3f-6ec10df439ad",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a19c0bb2-1a45-4f64-bb3f-6ec10df439ad",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-01",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-01 · status complete",
      "status": "complete",
      "version": 2,
      "phase_id": "S-01",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added Cloudflare Pages Function endpoint /api/access/decision.\n- Added functions/_lib/runtimeAccess.js for runtime route policy, bearer/cookie token extraction, Supabase Auth user resolution, role lookup, platform_admin authority, and access decision evaluation.\n- Updated admin and studio layouts to reveal only after /api/access/decision allows the current route.\n- Added tests ensuring admin/studio use server runtime access decisions and runtime access does not use legacy people.is_pro as authority.\n- Rebased cleanly onto main after Slice 0 merged and removed the stacked merge commit from PR #36."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start the next runtime slice from origin/main: extend access decisions into member/vendor/company route families and begin data-backed app endpoints."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-01-a19c0bb2.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-01-a19c0bb2.json"
    },
    {
      "id": "studio-9304baa8-b48a-4acd-a04f-796b56bb03ac",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/9304baa8-b48a-4acd-a04f-796b56bb03ac",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-00",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-00 · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": "S-00",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "head_commit",
        "next_action",
        "verification",
        "checkpoint_at",
        "commits_ahead_origin_main",
        "agent_review_findings_addressed"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Private route placeholder shells for /member, /vendor, /company, and /access-denied.\n- Route registry plus metadata validation contracts for sitemap/search/private noindex/custom treatment/redirect requirements.\n- Access decision and data adapter contract modules for runtime app layer.\n- CSS governance audit with exact legacy allowlist so new rogue CSS fails unless explicitly registered.\n- Deploy redirects for legacy /studio, /studio/media, and /vendor-portal routes.\n- Private shell noindex emission through base layout robots metadata.\n- Immutable route registry helper return values.\n- CI now runs npm test and CSS governance audit before Eleventy dry-run."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Review/open PR for Slice 0; then start Slice 1 runtime auth/access middleware and Cloudflare Pages Functions wiring."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-00-9304baa8.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-00-9304baa8.json"
    },
    {
      "id": "studio-8d0ece46-2463-4f75-9a93-317acb5ca41b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8d0ece46-2463-4f75-9a93-317acb5ca41b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "api_dashboard_status_visibility_plan",
      "schema_version": "studio_artifact.generated.v1",
      "title": "API Dashboard Status Visibility Slice",
      "summary": "api_dashboard_status_visibility_plan artifact · for Bezel API · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "c8bc3eed-c513-4dc8-9bc1-30c6723e232c",
      "project_slug": "redkey-bezel-api-c8bc3eed",
      "project_title": "Bezel API",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "goal",
        "title",
        "status",
        "commits",
        "version",
        "completed",
        "updated_at",
        "next_actions",
        "privacy_boundary",
        "production_verification"
      ],
      "sections": [
        {
          "title": "Goal",
          "level": 2,
          "body": "Give the Forge dashboard a safe read path for customer workflow runs and task status after plan submission."
        },
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added GET /workflow-runs/{runId} for workspace-scoped run summary and task counts.\n- Added GET /workflow-runs/{runId}/tasks for dashboard-safe task rows without task input payloads.\n- Added JS SDK helpers getWorkflowRun and listWorkflowRunTasks.\n- Added OpenAPI schemas for workflow run summary and task rows.\n- Expanded live smoke to verify read APIs before and after task completion.\n- Added Origin-aware CORS and local Forge dashboard workflow reader controls.\n- Deployed to https://api.bezeliq.ai and verified CORS preflight, authenticated GET, health, and smoke."
        }
      ],
      "html_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-dashboard-status-visibility-plan-8d0ece46.html",
      "json_path": "projects/redkey-bezel-api-c8bc3eed/artifacts/api-dashboard-status-visibility-plan-8d0ece46.json"
    },
    {
      "id": "studio-747e2dc9-a7b4-499d-a758-7110142cf34a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/747e2dc9-a7b4-499d-a758-7110142cf34a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-03",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-03 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-03",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added functions/_lib/ownedSummaries.js shared helper for authenticated owned portal reads.\n- Added /api/access/vendor-summary and /api/access/company-summary Cloudflare Pages Functions.\n- Endpoints resolve Supabase Auth subject, enforce canonical route policy before service-role reads, and filter vendors/organizations by resolved organization_id.\n- Added tests for unauthenticated denial, role denial before data reads, owned data success, upstream REST failure handling, and OPTIONS GET support.\n- Updated access session test data to persisted role names."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Wire portal shell JavaScript to the owned summary endpoints or add the next owned endpoint for vendor/company editable profile workflow."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-03-747e2dc9.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-03-747e2dc9.json"
    },
    {
      "id": "studio-6ecc442e-c61c-40e7-94ab-7ae274a61a86",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6ecc442e-c61c-40e7-94ab-7ae274a61a86",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "internal-alpha-deployment-evidence",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Internal Alpha Deployment Evidence",
      "summary": "internal-alpha-deployment-evidence artifact · for Patient Visit Advocate · phase PVA-INTERNAL-ALPHA-DEPLOY-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-INTERNAL-ALPHA-DEPLOY-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "dns",
        "phase",
        "scope",
        "title",
        "commits",
        "deployed_url",
        "local_branch",
        "verification",
        "artifact_type",
        "pages_project",
        "remaining_holds",
        "cloudflare_status",
        "pages_project_url"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- dns: type: string, zone: string, record: string, target: string, proxied: boolean\n- phase: id: string, status: string\n- scope: Internal local-only alpha review only; not external beta or production launch.\n- title: PVA Internal Alpha Deployment Evidence\n- commits: 3 items\n- deployed url: https://pva.bezeliq.ai\n- local branch: pva-internal-alpha-2026-05-08\n- verification: build: string, tests: string, headers: object, route_smoke: string\n- artifact type: internal-alpha-deployment-evidence\n- pages project: pva-bezeliq\n- remaining holds: 3 items\n- cloudflare status: domain: string, validation: string, verification: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/internal-alpha-deployment-evidence-pva-internal-alpha-deploy-01-6ecc442e.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/internal-alpha-deployment-evidence-pva-internal-alpha-deploy-01-6ecc442e.json"
    },
    {
      "id": "studio-67f050fb-214e-4d21-a395-89ff2bf32f94",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/67f050fb-214e-4d21-a395-89ff2bf32f94",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-04",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-04 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-04",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Portal runtime now fetches a page-declared authenticated summary endpoint after /api/access/decision allows access.\n- Vendor shell declares /api/access/vendor-summary and renders returned vendor name plus category/city/region metadata into non-sensitive placeholders.\n- Company shell declares /api/access/company-summary and renders returned organization name plus kind/status/domain metadata into non-sensitive placeholders.\n- Summary fetch failures are non-blocking so access-approved shells still reveal.\n- No CSS changes were made; the slice stayed inside the design-system governance constraint."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 5 from origin/main and add the next data-backed authenticated portal workflow, preferably a vendor/company profile read/update path with TDD and no rogue CSS."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-04-67f050fb.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-04-67f050fb.json"
    },
    {
      "id": "studio-606e3666-e1b1-460b-8b82-25d4210322bc",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/606e3666-e1b1-460b-8b82-25d4210322bc",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "pocket-prototype-autopilot-build-plan",
      "schema_version": "1.0",
      "title": "PVA Pocket Prototype Autopilot Build Plan",
      "summary": "pocket-prototype-autopilot-build-plan artifact · for Patient Visit Advocate · phase PVA-AUTOPILOT-02 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-AUTOPILOT-02",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "date",
        "phase",
        "title",
        "product",
        "version",
        "exclusions",
        "task_graph",
        "authored_by",
        "artifact_type",
        "schema_version",
        "product_direction",
        "implementation_plan",
        "pass_artifact_status",
        "sequencing_hard_stops",
        "registry_action_required",
        "approved_source_artifacts",
        "open_decisions_blocking_dispatch",
        "review_gate_before_implementation_dispatch"
      ],
      "sections": [
        {
          "title": "Implementation Plan",
          "level": 2,
          "body": "- storage: SQLite via Expo SQLite. AsyncStorage for non-relational user preferences only. Encryption required before patient-facing testing.\n- platform: React Native (Expo) — mobile-first, local-only prototype\n- build layers: 4 items\n- ai option for prototype: Option A — fully manual / stubbed. No AI infrastructure for first prototype. VisitBrief and QuestionPlan are template-based stubs. [Justin must confirm before dispatch.]"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/pocket-prototype-autopilot-build-plan-pva-autopilot-02-606e3666.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/pocket-prototype-autopilot-build-plan-pva-autopilot-02-606e3666.json"
    },
    {
      "id": "studio-4c9e1dbe-85ed-44b5-8642-fd07d9e7c539",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/4c9e1dbe-85ed-44b5-8642-fd07d9e7c539",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "local-data-ai-boundary-pass",
      "schema_version": "1.0",
      "title": "PVA Local Data and AI Boundary Pass",
      "summary": "local-data-ai-boundary-pass artifact · for Patient Visit Advocate · phase PVA-SLICE-02 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-02",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "product",
        "purpose",
        "pass_type",
        "created_at",
        "created_by",
        "ai_boundary",
        "artifact_type",
        "data_entities",
        "open_decisions",
        "schema_version",
        "source_artifacts",
        "delta_from_approved",
        "free_paid_transition",
        "local_storage_recommendation",
        "next_steps_for_build_planning",
        "hard_blockers_before_server_phi",
        "local_visit_draft_state_machine"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: id: string, name: string, status: string\n- title: PVA Local Data and AI Boundary Pass\n- product: Patient Visit Advocate\n- purpose: Convert the approved patient-data-ai-contract into implementation-ready data and model boundaries: explicit state machine, field-level entity specs, local storage recommendation, AI boundary options, hard blockers before server-side PHI, and free-to-paid transition rules. This is a focused pass artifact — no code, no migrations.\n- pass type: delta\n- created at: 2026-05-08\n- created by: vikram\n- ai boundary: output_contract: object, local_prototype_options: object, recommended_prototype_path: string, ai_agent_constraints_from_architecture: object\n- artifact type: local-data-ai-boundary-pass\n- data entities: 6 items\n- open decisions: 4 items\n- schema version: 1.0"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-data-ai-boundary-pass-pva-slice-02-4c9e1dbe.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/local-data-ai-boundary-pass-pva-slice-02-4c9e1dbe.json"
    },
    {
      "id": "studio-3dcd0523-69ea-43e9-b6d0-a0d6b1a0afa3",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/3dcd0523-69ea-43e9-b6d0-a0d6b1a0afa3",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "intent",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Product Intent",
      "summary": "Defines Jess as the operating layer for B2BEA podcast guest and episode flow.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Product Intent\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Defines Jess as the operating layer for B2BEA podcast guest and episode flow.\n- version: 1\n- generated at: 2026-05-08T16:57:34.685Z"
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/intent-3dcd0523.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/intent-3dcd0523.json"
    },
    {
      "id": "studio-2bcab3af-97f8-4978-9f25-3399455e5e55",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/2bcab3af-97f8-4978-9f25-3399455e5e55",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "trust-boundary-operational-pass",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Free/Paid Trust Boundary Operational Pass",
      "summary": "trust-boundary-operational-pass artifact · for Patient Visit Advocate · phase PVA-SLICE-00 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-SLICE-00",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "phase",
        "title",
        "product",
        "purpose",
        "created_at",
        "created_by",
        "artifact_type",
        "open_decisions",
        "claims_boundary",
        "free_tier_rules",
        "escalation_rules",
        "source_artifacts",
        "paid_memory_rules",
        "sequencing_hard_stops",
        "implementation_acceptance_criteria"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- phase: id: string, name: string, status: string\n- title: PVA Free/Paid Trust Boundary Operational Pass\n- product: Patient Visit Advocate\n- purpose: Translate the approved PVA Trust Boundary Charter into implementation-ready business rules for the free pocket app and paid memory boundary. Each rule carries an explicit hard stop, acceptance criterion, and copy/implementation owner.\n- created at: 2026-05-08T12:39:00.000Z\n- created by: priya\n- artifact type: trust-boundary-operational-pass\n- open decisions: 4 items\n- claims boundary: 4 items\n- free tier rules: 8 items\n- escalation rules: 4 items\n- source artifacts: 6 items"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/trust-boundary-operational-pass-pva-slice-00-2bcab3af.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/trust-boundary-operational-pass-pva-slice-00-2bcab3af.json"
    },
    {
      "id": "studio-14faf61e-234e-4afb-a95f-980c480c259a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/14faf61e-234e-4afb-a95f-980c480c259a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.402Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-02",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-02 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-02",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "review_notes",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Extended runtime route policies to canonical /member, /vendor, and /company portal shell routes using persisted role names.\n- Added /api/access/session for authenticated subject context without exposing service-role data to anonymous callers.\n- Updated member, vendor, and company placeholder shells to use the shared portal layout and /api/access/decision flow.\n- Added tests preventing private data from being embedded in current static portal shells; real private data must come from Functions endpoints after server-side access decisions.\n- Fixed access JSON CORS methods to advertise GET, POST, and OPTIONS for the new session endpoint."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start the next runtime slice from origin/main: add real data-backed member/vendor/company endpoints behind server-side access decisions, beginning with owned vendor/company summary data."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-02-14faf61e.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-02-14faf61e.json"
    },
    {
      "id": "studio-f5de36e5-0b57-40ad-a288-ad8ab483157e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f5de36e5-0b57-40ad-a288-ad8ab483157e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "jess-mia-handoff-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Mia Handoff Spec",
      "summary": "Defines how Jess and Mia work together without overlapping responsibilities.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "465f126e-74be-49a8-b1f5-1fe30282c079",
      "project_slug": "b2bea-mia-content-creator-465f126e",
      "project_title": "Mia Content Creator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Mia Handoff Spec\n- source: atlas-codex\n- status: draft\n- project: Mia Content Creator\n- summary: Defines how Jess and Mia work together without overlapping responsibilities.\n- version: 1\n- generated at: 2026-05-08T20:13:20.545Z"
        }
      ],
      "html_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/jess-mia-handoff-spec-f5de36e5.html",
      "json_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/jess-mia-handoff-spec-f5de36e5.json"
    },
    {
      "id": "studio-f595b682-0a8e-4e44-922f-400d1e5c97d6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/f595b682-0a8e-4e44-922f-400d1e5c97d6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-18",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-18 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-18",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin vendors page inline runtime into /assets/js/admin-vendors-runtime.js.\n- Kept src/admin/vendors/index.njk as page markup plus a deferred governed runtime asset.\n- Registered the migrated runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 19 from origin/main. Candidate: move admin dashboard inline runtime into a governed static asset or continue moving privileged admin mutations server-side."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-18-f595b682.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-18-f595b682.json"
    },
    {
      "id": "studio-ed931cf8-8e5d-4f50-9bfb-6d5a7515b5c4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ed931cf8-8e5d-4f50-9bfb-6d5a7515b5c4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "operating-workflow-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Operating Workflow Spec",
      "summary": "Defines intake triggers, Drive scaffold, prep doc, readiness reminder, and post-recording operating rules.",
      "status": "draft",
      "version": 3,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "updated_at",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Operating Workflow Spec\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Defines intake triggers, Drive scaffold, prep doc, readiness reminder, and post-recording operating rules.\n- version: 3\n- updated at: 2026-05-08T19:18:37.683Z\n- revision note: Added post-recording operating rule."
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/operating-workflow-spec-ed931cf8.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/operating-workflow-spec-ed931cf8.json"
    },
    {
      "id": "studio-ec7abeb7-7ed5-48fb-a152-7f1eed5a86d6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/ec7abeb7-7ed5-48fb-a152-7f1eed5a86d6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-15",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-15 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-15",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added platform-admin guarded /api/admin/vendor-update-review endpoint.\n- Profile edit approval applies whitelisted vendor changes before marking the vendor_updates row approved.\n- Profile edit rejection records review metadata without changing the vendor row.\n- Review writes reviewed_at, reviewed_by, and notes on vendor_updates.\n- Admin vendor profile-edit review UI now calls the API instead of directly updating vendor_updates from browser code."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 16 from origin/main. Candidate: route admin dashboard pending update approve/reject through the same review API or add claim-review API parity."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-15-ec7abeb7.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-15-ec7abeb7.json"
    },
    {
      "id": "studio-e959ea5c-f03f-4396-a035-d0f50fc36cef",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e959ea5c-f03f-4396-a035-d0f50fc36cef",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-14",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-14 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-14",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved /studio index redirect JavaScript from src/studio/index.njk to src/assets/js/studio-index-runtime.js.\n- Made the Studio index redirect wait for the b2bea:studio-access-allowed event before redirecting to /studio/media/.\n- Extended focused Studio runtime asset coverage for the index redirect.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 15 from origin/main. Candidate: add focused admin/vendor update review contract or continue reducing remaining inline runtime JavaScript outside Studio."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-14-e959ea5c.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-14-e959ea5c.json"
    },
    {
      "id": "studio-e3d16e79-2d8d-4c74-b4d5-748f1a718eee",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/e3d16e79-2d8d-4c74-b4d5-748f1a718eee",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-05",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-05 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-05",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added /api/access/vendor-profile GET for owned editable vendor profile fields.\n- Added /api/access/vendor-profile POST to create pending vendor_updates profile_edit requests instead of directly mutating public vendor records.\n- Profile endpoint reuses the existing runtime route policy for /vendor and filters vendors by resolved organization_id.\n- Submitted profile changes are allowlisted and normalized before insertion.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 6 from origin/main and wire the vendor portal shell to the owned vendor profile endpoint with minimal non-sensitive UI and no rogue CSS."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-05-e3d16e79.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-05-e3d16e79.json"
    },
    {
      "id": "studio-dc229d9b-4066-40e1-8270-5b0d227a1417",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/dc229d9b-4066-40e1-8270-5b0d227a1417",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-07",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-07 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-07",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added /api/access/company-profile GET for owned organization profile fields.\n- Portal runtime can hydrate read-only data-portal-profile-field targets as well as editable form fields.\n- Company shell declares inert build-time organization profile placeholders hydrated only after runtime auth/access succeeds.\n- Company profile surface is read-only because no company update-review table exists yet.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 8 from origin/main. Candidate: portal runtime hardening/tests or authenticated pending profile update status reads."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-07-dc229d9b.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-07-dc229d9b.json"
    },
    {
      "id": "studio-d6eb716b-d575-47e7-9004-0609f28acb4a",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d6eb716b-d575-47e7-9004-0609f28acb4a",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-06",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-06 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-06",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Portal runtime now loads page-declared profile endpoints after access approval.\n- Vendor shell declares inert build-time profile placeholders for editable vendor fields.\n- Vendor profile fields hydrate from /api/access/vendor-profile only after runtime auth/access succeeds.\n- Vendor profile submissions POST changes to /api/access/vendor-profile as pending review requests.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 7 from origin/main. Candidate: mirror the profile endpoint/wiring pattern for company profile data behind /company access."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-06-d6eb716b.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-06-d6eb716b.json"
    },
    {
      "id": "studio-bda1925f-db6b-44bc-adb6-b210f8574e10",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/bda1925f-db6b-44bc-adb6-b210f8574e10",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "implementation-roadmap",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Implementation Roadmap",
      "summary": "Roadmap for rebuilding Jess, now including immediate prep scaffold, one-week readiness, and recovered post-recording lifecycle.",
      "status": "draft",
      "version": 4,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "updated_at",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Implementation Roadmap\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Roadmap for rebuilding Jess, now including immediate prep scaffold, one-week readiness, and recovered post-recording lifecycle.\n- version: 4\n- updated at: 2026-05-08T19:18:37.683Z\n- revision note: Added Phase 2B post-recording lifecycle recovery."
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/implementation-roadmap-bda1925f.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/implementation-roadmap-bda1925f.json"
    },
    {
      "id": "studio-b8d24423-cf59-45a2-b8c2-ad2308e7e2e4",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/b8d24423-cf59-45a2-b8c2-ad2308e7e2e4",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-21",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-21 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-21",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin users page inline runtime into /assets/js/admin-users-runtime.js.\n- Kept src/admin/users/index.njk as page markup plus a deferred governed runtime asset.\n- Registered the migrated users runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 22 from origin/main. Candidate: move admin categories, jobs, or academy inline runtime into governed static assets."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-21-b8d24423.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-21-b8d24423.json"
    },
    {
      "id": "studio-aa8682bc-b277-4566-bea2-a2f63a8c8937",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/aa8682bc-b277-4566-bea2-a2f63a8c8937",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-11",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-11 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-11",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "risk_noted",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved studio access guard JavaScript from src/_includes/layouts/studio.njk to src/assets/js/studio-runtime.js.\n- Studio layout now contains a deferred studio runtime script include.\n- Updated admin/studio runtime guard tests so access behavior is asserted against the governed static asset.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 12 from origin/main. Candidate: resolve or explicitly test the /studio versus /admin/studio runtime route policy mismatch."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-11-aa8682bc.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-11-aa8682bc.json"
    },
    {
      "id": "studio-a5ec4f28-00f6-42f8-a3c5-ddcaa6d25b2f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a5ec4f28-00f6-42f8-a3c5-ddcaa6d25b2f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-23",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-23 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-23",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin jobs page inline runtime into /assets/js/admin-jobs-runtime.js.\n- Kept src/admin/jobs/index.njk as page markup plus its existing legacy style block and a deferred governed runtime asset.\n- Registered the migrated jobs runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 24 from origin/main. Candidate: move admin academy inline runtimes into governed static assets."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-23-a5ec4f28.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-23-a5ec4f28.json"
    },
    {
      "id": "studio-a3f45724-9bcf-4272-8002-3f96bd0395ca",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a3f45724-9bcf-4272-8002-3f96bd0395ca",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-17",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-17 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-17",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Added claim approval side effects to /api/admin/vendor-update-review.\n- Claim approval now marks vendors claimed, sets claimed_at, links an existing claimant person by email, and assigns vendor_admin when the person has an auth account.\n- Claim rejection records review metadata without changing vendor ownership.\n- Admin vendor claim approve/reject actions now call the admin review API instead of direct browser-side Supabase writes.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 18 from origin/main. Candidate: move admin vendors inline runtime into governed static assets or continue reducing browser-side privileged mutations."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-17-a3f45724.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-17-a3f45724.json"
    },
    {
      "id": "studio-99dc172c-992e-4931-bd90-a19a75a2e45e",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/99dc172c-992e-4931-bd90-a19a75a2e45e",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-22",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-22 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-22",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin categories page inline runtime into /assets/js/admin-categories-runtime.js.\n- Kept src/admin/categories/index.njk as page markup plus its existing legacy style block and a deferred governed runtime asset.\n- Registered the migrated categories runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 23 from origin/main. Candidate: move admin jobs or academy inline runtime into governed static assets."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-22-99dc172c.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-22-99dc172c.json"
    },
    {
      "id": "studio-8b9e037e-1ffc-4e04-b762-d7f8ca67d8de",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8b9e037e-1ffc-4e04-b762-d7f8ca67d8de",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "data-workflow-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Podcast Data And Workflow Spec",
      "summary": "Defines target data objects, workflow states, checks, handoff model, one-week readiness fields, and post-recording assets/status logs for Jess.",
      "status": "draft",
      "version": 3,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "updated_at",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Podcast Data And Workflow Spec\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Defines target data objects, workflow states, checks, handoff model, one-week readiness fields, and post-recording assets/status logs for Jess.\n- version: 3\n- updated at: 2026-05-08T19:18:37.683Z\n- revision note: Added post-recording episode_assets and status-log requirements from recovered full Jess design."
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/data-workflow-spec-8b9e037e.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/data-workflow-spec-8b9e037e.json"
    },
    {
      "id": "studio-81133475-ef75-4269-853f-d6ff4f833ae2",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/81133475-ef75-4269-853f-d6ff4f833ae2",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-09",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-09 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-09",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved portal runtime JavaScript from src/_includes/layouts/portal.njk to src/assets/js/portal-runtime.js.\n- Portal layout now contains only the hidden shell and deferred runtime script include.\n- Updated guard tests so runtime behavior is asserted against the governed static asset.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 10 from origin/main. Candidate: add admin review visibility for vendor_updates or improve portal runtime resilience."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-09-81133475.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-09-81133475.json"
    },
    {
      "id": "studio-6d6bedbb-7aa1-4b46-bc27-dd2b07becbc6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/6d6bedbb-7aa1-4b46-bc27-dd2b07becbc6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "source-recovery",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Mia Source Recovery Notes",
      "summary": "Recovered archived Mia implementation and current CCOS2 status.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "465f126e-74be-49a8-b1f5-1fe30282c079",
      "project_slug": "b2bea-mia-content-creator-465f126e",
      "project_title": "Mia Content Creator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Mia Source Recovery Notes\n- source: atlas-codex\n- status: draft\n- project: Mia Content Creator\n- summary: Recovered archived Mia implementation and current CCOS2 status.\n- version: 1\n- generated at: 2026-05-08T20:13:20.545Z"
        }
      ],
      "html_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/source-recovery-6d6bedbb.html",
      "json_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/source-recovery-6d6bedbb.json"
    },
    {
      "id": "studio-64822f06-3b73-4da3-aea2-7259d8d9e23b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/64822f06-3b73-4da3-aea2-7259d8d9e23b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-19",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-19 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-19",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin dashboard inline runtime into /assets/js/admin-dashboard-runtime.js.\n- Kept src/admin/index.njk as page markup plus a deferred governed runtime asset.\n- Registered the migrated dashboard runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 20 from origin/main. Candidate: continue moving admin inline runtimes into governed assets or move another privileged admin mutation server-side."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-19-64822f06.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-19-64822f06.json"
    },
    {
      "id": "studio-5df5d449-f163-4c43-b803-8d752cf011db",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/5df5d449-f163-4c43-b803-8d752cf011db",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "post-recording-workflow-spec",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Post-Recording Workflow Spec",
      "summary": "Recovered approved CCOS design for Jess after recording: transcript analysis, content generation, Mahesh handoff, publish date/title decisions, guest kit, production tracking, and approval summary.",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "updated_at",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Post-Recording Workflow Spec\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Recovered approved CCOS design for Jess after recording: transcript analysis, content generation, Mahesh handoff, publish date/title decisions, guest kit, production tracking, and approval summary.\n- version: 2\n- updated at: 2026-05-08T19:25:35.095Z\n- revision note: Added graphics ownership split across Jess, Mahesh, Rosa, Mia, and Jan/human design."
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/post-recording-workflow-spec-5df5d449.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/post-recording-workflow-spec-5df5d449.json"
    },
    {
      "id": "studio-57594a88-470b-49f2-bc75-20b76a39a882",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/57594a88-470b-49f2-bc75-20b76a39a882",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-24",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-24 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-24",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin academy index, course editor, and lesson editor inline runtimes into governed static assets.\n- Kept src/admin/academy/*.njk pages as markup plus deferred governed runtime assets.\n- Registered the migrated academy runtime assets in the CSS governance legacy inline-style allowlist because they preserve existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Scan remaining inline runtime blocks and start the next smallest governance slice from origin/main."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-24-57594a88.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-24-57594a88.json"
    },
    {
      "id": "studio-55a43169-43a8-4de6-a63a-2c1dc40c762c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/55a43169-43a8-4de6-a63a-2c1dc40c762c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "policy",
      "schema_version": "studio_artifact.generated.v1",
      "title": "PVA Internal Review Feedback Protocol and Production Readiness Scorecard",
      "summary": "policy artifact · for Patient Visit Advocate · phase PVA-INTERNAL-ALPHA-01 · status approved",
      "status": "approved",
      "version": 1,
      "phase_id": "PVA-INTERNAL-ALPHA-01",
      "project_id": "31d7f681-bed2-44e9-9a55-b9fadcbba0da",
      "project_slug": "dreamborn-patient-visit-advocate-31d7f681",
      "project_title": "Patient Visit Advocate",
      "client_id": "dreamborn",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "date",
        "title",
        "product",
        "version",
        "alpha_url",
        "hard_holds",
        "process_flow",
        "artifact_type",
        "open_questions",
        "reviewer_roles",
        "scoring_rubric",
        "review_sessions",
        "decision_criteria",
        "feedback_questions",
        "source_artifact_ids",
        "beta_readiness_gates",
        "evidence_capture_format"
      ],
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-01: id: string, question: string, my_default: string\n- OQ-02: id: string, question: string, my_default: string\n- OQ-03: id: string, question: string, my_default: string"
        }
      ],
      "html_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/policy-pva-internal-alpha-01-55a43169.html",
      "json_path": "projects/dreamborn-patient-visit-advocate-31d7f681/artifacts/policy-pva-internal-alpha-01-55a43169.json"
    },
    {
      "id": "studio-522c57d7-3a66-4eaf-bab5-0b4c2a06e77b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/522c57d7-3a66-4eaf-bab5-0b4c2a06e77b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-20",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-20 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-20",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved the admin companies page inline runtime into /assets/js/admin-companies-runtime.js.\n- Kept src/admin/companies/index.njk as page markup plus a deferred governed runtime asset.\n- Registered the migrated companies runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 21 from origin/main. Candidate: move admin users, categories, or academy inline runtime into governed static assets, or move another privileged admin mutation server-side."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-20-522c57d7.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-20-522c57d7.json"
    },
    {
      "id": "studio-51c193c6-80a7-454b-b798-bb73f0617a24",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/51c193c6-80a7-454b-b798-bb73f0617a24",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-16",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-16 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-16",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Routed admin dashboard pending vendor update approve/reject through /api/admin/vendor-update-review.\n- Dashboard review actions now use the admin session access token and no longer update vendor_updates directly from browser code.\n- Extended focused admin review source contract to prevent dashboard review bypass.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 17 from origin/main. Candidate: add claim-review API parity or filter dashboard pending review actions to avoid claim side effects being skipped."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-16-51c193c6.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-16-51c193c6.json"
    },
    {
      "id": "studio-4d3b5378-f8ea-4946-a854-9d7a2b5023d6",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/4d3b5378-f8ea-4946-a854-9d7a2b5023d6",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "agent-design",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Mia Agent Design",
      "summary": "Defines standalone Mia as the B2BEA content creator agent.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "465f126e-74be-49a8-b1f5-1fe30282c079",
      "project_slug": "b2bea-mia-content-creator-465f126e",
      "project_title": "Mia Content Creator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Mia Agent Design\n- source: atlas-codex\n- status: draft\n- project: Mia Content Creator\n- summary: Defines standalone Mia as the B2BEA content creator agent.\n- version: 1\n- generated at: 2026-05-08T20:13:20.545Z"
        }
      ],
      "html_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/agent-design-4d3b5378.html",
      "json_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/agent-design-4d3b5378.json"
    },
    {
      "id": "studio-3a412743-8c65-4dae-bfad-809a28a702d9",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/3a412743-8c65-4dae-bfad-809a28a702d9",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-13",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-13 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-13",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved Studio media-library runtime JavaScript from src/studio/media/index.njk to src/assets/js/studio-media-runtime.js.\n- Added a Studio access-allowed event in src/assets/js/studio-runtime.js and made the media runtime wait for it before querying CCOS2 assets.\n- Added focused media runtime asset coverage for query contract, DOM hooks, clipboard behavior, governed script include, and no inline style attributes in the asset.\n- Removed the generated inline font-size attribute from the media runtime markup string without changing CSS files."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 14 from origin/main. Candidate: move remaining Studio page redirect inline JS or add focused admin/vendor update review contract."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-13-3a412743.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-13-3a412743.json"
    },
    {
      "id": "studio-3694af80-e0e4-4ff9-96c5-0a38155ae801",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/3694af80-e0e4-4ff9-96c5-0a38155ae801",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "implementation-roadmap",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Mia Implementation Roadmap",
      "summary": "Phased roadmap for restoring Mia as a standalone RedKey/B2BEA content agent.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "465f126e-74be-49a8-b1f5-1fe30282c079",
      "project_slug": "b2bea-mia-content-creator-465f126e",
      "project_title": "Mia Content Creator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "generated_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Mia Implementation Roadmap\n- source: atlas-codex\n- status: draft\n- project: Mia Content Creator\n- summary: Phased roadmap for restoring Mia as a standalone RedKey/B2BEA content agent.\n- version: 1\n- generated at: 2026-05-08T20:13:20.545Z"
        }
      ],
      "html_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/implementation-roadmap-3694af80.html",
      "json_path": "projects/b2bea-mia-content-creator-465f126e/artifacts/implementation-roadmap-3694af80.json"
    },
    {
      "id": "studio-355f6252-eea0-4f1e-a3b2-d31252fde46f",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/355f6252-eea0-4f1e-a3b2-d31252fde46f",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-10",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-10 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-10",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved admin access guard JavaScript from src/_includes/layouts/admin.njk to src/assets/js/admin-runtime.js.\n- Admin layout now contains a deferred admin runtime script include.\n- Updated admin runtime guard tests so access behavior is asserted against the governed static asset.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 11 from origin/main. Candidate: move studio runtime access guard into a governed static asset."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-10-355f6252.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-10-355f6252.json"
    },
    {
      "id": "studio-346054ba-13a4-450b-a979-2dd74e6cb3d5",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/346054ba-13a4-450b-a979-2dd74e6cb3d5",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-12",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-12 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-12",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Made /studio the canonical Studio app-runtime route because Eleventy emits /studio pages.\n- Changed runtime access policy to protect /studio and descendants with the admin.studio entitlement.\n- Updated route registry to mark /studio canonical and redirect legacy /admin/studio URLs to /studio.\n- Updated deploy redirects and focused tests for the new route contract.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 13 from origin/main. Candidate: continue reducing inline JavaScript in Studio media or add focused admin/vendor update review contract."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-12-346054ba.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-12-346054ba.json"
    },
    {
      "id": "studio-19a2b04e-4da5-4a52-a5a0-d558ef770b6b",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/19a2b04e-4da5-4a52-a5a0-d558ef770b6b",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "source-recovery",
      "schema_version": "studio_artifact.generated.v1",
      "title": "Jess Source Recovery Notes",
      "summary": "Recovered prior Jess context from CCOS archive, including the full approved post-recording operator design.",
      "status": "draft",
      "version": 2,
      "phase_id": null,
      "project_id": "f9b4e79b-1ac5-43ea-84fb-afb5d20a7672",
      "project_slug": "b2bea-jess-podcast-coordinator-f9b4e79b",
      "project_title": "Jess Podcast Coordinator",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "title",
        "format",
        "source",
        "status",
        "project",
        "summary",
        "version",
        "updated_at",
        "revision_note"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- title: Jess Source Recovery Notes\n- source: atlas-codex\n- status: draft\n- project: Jess Podcast Coordinator\n- summary: Recovered prior Jess context from CCOS archive, including the full approved post-recording operator design.\n- version: 2\n- updated at: 2026-05-08T19:18:37.683Z\n- revision note: Added recovered full post-recording design source."
        }
      ],
      "html_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/source-recovery-19a2b04e.html",
      "json_path": "projects/b2bea-jess-podcast-coordinator-f9b4e79b/artifacts/source-recovery-19a2b04e.json"
    },
    {
      "id": "studio-060a8c73-1757-40de-a933-f75a68542901",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/060a8c73-1757-40de-a933-f75a68542901",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.401Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-08",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-08 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-08",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Vendor profile endpoint now includes pending profile_edit vendor_updates for the owned vendor.\n- Vendor shell includes a runtime-only pending update status placeholder.\n- Portal runtime renders pending profile update status when present.\n- No CSS changes were made."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start Slice 9 from origin/main. Candidate: split portal runtime JavaScript into a governed static asset or add admin review visibility for vendor_updates."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-08-060a8c73.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-08-060a8c73.json"
    },
    {
      "id": "studio-d24bf35b-d849-4bc0-9cb7-e1bfa9560273",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/d24bf35b-d849-4bc0-9cb7-e1bfa9560273",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "competitive-landscape",
      "schema_version": "competitive-landscape.v1",
      "title": "Bezel Workflow competitive-landscape",
      "summary": "No direct competitor appears to combine pull-queue architecture, persistent router agents, role-per-integration agent pools, connector vaulting, and self-healing API interpretation in one general workflow automation product.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "kind",
        "project",
        "conclusion",
        "schema_version",
        "research_source",
        "source_memory_id",
        "competitor_matrix"
      ],
      "sections": [
        {
          "title": "Conclusion",
          "level": 2,
          "body": "No direct competitor appears to combine pull-queue architecture, persistent router agents, role-per-integration agent pools, connector vaulting, and self-healing API interpretation in one general workflow automation product."
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/competitive-landscape-d24bf35b.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/competitive-landscape-d24bf35b.json"
    },
    {
      "id": "studio-bf175f5a-f227-4f51-bd19-682582d2a2e7",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/bf175f5a-f227-4f51-bd19-682582d2a2e7",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "build-execution",
      "schema_version": "studio_artifact.generated.v1",
      "title": "B2BEA.org Rebuild build-execution S-25",
      "summary": "build-execution artifact · for B2BEA.org Rebuild · phase S-25 · status complete",
      "status": "complete",
      "version": 1,
      "phase_id": "S-25",
      "project_id": "a820dd0c-6cef-4133-bfbd-d802fd806e44",
      "project_slug": "b2bea-b2bea-a820dd0c",
      "project_title": "B2BEA.org Rebuild",
      "client_id": "b2bea",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "branch",
        "project",
        "phase_id",
        "worktree",
        "completed",
        "merged_at",
        "base_branch",
        "head_commit",
        "next_action",
        "merge_commit",
        "pull_request",
        "verification",
        "checkpoint_at"
      ],
      "sections": [
        {
          "title": "Completed",
          "level": 2,
          "body": "- Moved admin mobile navigation, sidebar rebuild, and standalone rebuild widget runtimes into governed static assets.\n- Kept admin layout and partials as markup plus deferred governed runtime assets.\n- Registered the migrated admin rebuild runtime in the CSS governance legacy inline-style allowlist because it preserves existing inline style strings rather than adding new styling."
        },
        {
          "title": "Next Action",
          "level": 2,
          "body": "Start the next smallest runtime governance slice from origin/main; likely studio shared layout runtime or auth/account pages."
        }
      ],
      "html_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-25-bf175f5a.html",
      "json_path": "projects/b2bea-b2bea-a820dd0c/artifacts/build-execution-s-25-bf175f5a.json"
    },
    {
      "id": "studio-a25cb074-6bf9-4689-8efd-4b69c02d4324",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/a25cb074-6bf9-4689-8efd-4b69c02d4324",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "implementation-roadmap",
      "schema_version": "roadmap.v1",
      "title": "Bezel Workflow implementation-roadmap",
      "summary": "implementation-roadmap artifact · for Bezel Workflow · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "phases",
        "project",
        "schema_version",
        "source_memory_id",
        "immediate_next_actions"
      ],
      "sections": [
        {
          "title": "Phases",
          "level": 2,
          "body": "- Project Framing and Artifact Base: id: string, goal: string, name: string, outputs: object\n- Flow Schema and Runtime Contract: id: string, goal: string, name: string, outputs: object\n- Queue and Router MVP: id: string, goal: string, name: string, outputs: object\n- Connector Foundation: id: string, goal: string, name: string, outputs: object\n- Credential Vault and Access Logs: id: string, goal: string, name: string, outputs: object\n- Observability Surface: id: string, goal: string, name: string, outputs: object\n- First Workflow Builder: id: string, goal: string, name: string, outputs: object\n- Killer Demo: Invoice Processing Fan-Out: id: string, goal: string, name: string, outputs: object\n- Self-Healing Connector Pilot: id: string, goal: string, name: string, outputs: object"
        },
        {
          "title": "Immediate Next Actions",
          "level": 2,
          "body": "- Decide whether Bezel Workflow is a new repo or builds inside Bezel API plus Studio.\n- Draft FLOW.json schema as the next artifact.\n- Pick the first three connectors for the invoice fan-out demo.\n- Decide vault provider for MVP."
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/implementation-roadmap-a25cb074.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/implementation-roadmap-a25cb074.json"
    },
    {
      "id": "studio-8d9e4730-946e-40bf-bfca-d479ef0a070c",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/8d9e4730-946e-40bf-bfca-d479ef0a070c",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "architecture-spec",
      "schema_version": "architecture.workflow.v1",
      "title": "Bezel Workflow architecture-spec",
      "summary": "architecture-spec artifact · for Bezel Workflow · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "project",
        "components",
        "agent_tiers",
        "open_questions",
        "schema_version",
        "execution_model",
        "credential_rules",
        "source_memory_id"
      ],
      "sections": [
        {
          "title": "Components",
          "level": 2,
          "body": "- Flow Definition: name: string, purpose: string\n- Router Agent / Flow Engine: name: string, purpose: string\n- Topic-Based Pull Queues: name: string, purpose: string\n- Role per Integration: name: string, purpose: string\n- Connector Agents: name: string, purpose: string\n- Credential Vault: name: string, purpose: string\n- Completion Event Stream: name: string, purpose: string\n- Observability and Audit: name: string, purpose: string"
        },
        {
          "title": "Execution Model",
          "level": 2,
          "body": "- bezel flow: 5 items\n- temporal contrast: Temporal uses worker pull queues but trigger/state-change orchestration. Bezel uses pull semantics in both execution and control planes."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Whether MVP vault is GCP Secret Manager, Cloudflare Secrets, or a thin abstraction over both.\n- How much self-healing is allowed to happen autonomously before requiring human approval.\n- Whether HCS claim proofs are exposed in V1 product UI or kept as internal audit infrastructure."
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/architecture-spec-8d9e4730.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/architecture-spec-8d9e4730.json"
    },
    {
      "id": "studio-7652d398-a9e4-48cb-8b85-339b18e1f8ff",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/7652d398-a9e4-48cb-8b85-339b18e1f8ff",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "positioning-spec",
      "schema_version": "positioning.v1",
      "title": "Bezel Workflow positioning-spec",
      "summary": "positioning-spec artifact · for Bezel Workflow · status draft",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "project",
        "category",
        "core_claims",
        "avoid_language",
        "schema_version",
        "contrast_frames",
        "buyer_narratives",
        "source_memory_id",
        "primary_positioning"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: positioning-spec\n- project: Bezel Workflow\n- category: AI-native workflow orchestration\n- core claims: 4 items\n- avoid language: 3 items\n- schema version: positioning.v1\n- contrast frames: 4 items\n- buyer narratives: 3 items\n- source memory id: 99edd8d2-5780-43a2-bbd0-03982353768a\n- primary positioning: Bezel is the AI-native workflow platform for agent-driven operations: Temporal-like reliability, Zapier/n8n-style integration reach, and a pull-based agent control plane built for parallel AI workloads."
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/positioning-spec-7652d398.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/positioning-spec-7652d398.json"
    },
    {
      "id": "studio-71e49e29-4842-4f3a-8129-7fb0eaac1664",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/71e49e29-4842-4f3a-8129-7fb0eaac1664",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "intent",
      "schema_version": "intent.product.v1",
      "title": "Bezel Workflow intent",
      "summary": "Workflow automation tools were built around brittle trigger/action chains and human-defined step logic. AI agent workloads need durable, observable, capacity-aware orchestration where agents claim work, route around failure, and adapt to changing APIs.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json",
      "content_shape": [
        "kind",
        "problem",
        "project",
        "target_users",
        "schema_version",
        "non_negotiables",
        "out_of_scope_v1",
        "success_metrics",
        "product_category",
        "source_memory_id",
        "initial_killer_use_case"
      ],
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "Workflow automation tools were built around brittle trigger/action chains and human-defined step logic. AI agent workloads need durable, observable, capacity-aware orchestration where agents claim work, route around failure, and adapt to changing APIs."
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- A nontechnical user can define a Flow that fans out to at least three integrations and observe completion status.\n- Multiple agents can claim from one integration topic without double-processing a job.\n- A connector can survive an unexpected but interpretable API response change without breaking the Flow.\n- A failed or expired claim returns safely to the topic and is reclaimed by another compatible agent.\n- First demo workflow processes 200 invoice-like events/day with visible parallel status and no lost jobs."
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/intent-71e49e29.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/intent-71e49e29.json"
    },
    {
      "id": "studio-26ee92f5-b21d-4b1e-8456-37b7e221f676",
      "scope": "studio_project",
      "source_of_truth": "supabase.studio_artifacts",
      "source_path": "studio_artifacts/26ee92f5-b21d-4b1e-8456-37b7e221f676",
      "source_kind": "supabase_json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:56.400Z",
      "artifact_type": "source-thought",
      "schema_version": "source-thought.v1",
      "title": "Bezel Workflow source-thought",
      "summary": "Initial product architecture and positioning thought for Bezel as an AI-native workflow orchestration platform competing with Zapier and n8n.",
      "status": "draft",
      "version": 1,
      "phase_id": null,
      "project_id": "d7ee6565-842e-4d74-9eda-84c2ed2fe1d6",
      "project_slug": "redkey-bezel-workflow-d7ee6565",
      "project_title": "Bezel Workflow",
      "client_id": "redkey",
      "platform_project_id": null,
      "format_source": "supabase_json_legacy_markdown_wrapped",
      "content_shape": [
        "kind",
        "project",
        "summary",
        "source_tags",
        "source_table",
        "schema_version",
        "source_memory_id",
        "source_created_at"
      ],
      "sections": [
        {
          "title": "Artifact Shape",
          "level": 2,
          "body": "- kind: source-thought\n- project: Bezel Workflow\n- summary: Initial product architecture and positioning thought for Bezel as an AI-native workflow orchestration platform competing with Zapier and n8n.\n- source tags: 6 items\n- source table: brain_memory\n- schema version: source-thought.v1\n- source memory id: 99edd8d2-5780-43a2-bbd0-03982353768a\n- source created at: 2026-05-09T12:29:20.191319+00:00"
        }
      ],
      "html_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/source-thought-26ee92f5.html",
      "json_path": "projects/redkey-bezel-workflow-d7ee6565/artifacts/source-thought-26ee92f5.json"
    },
    {
      "id": "2026-05-07-openclaw-multi-agent-coordination-design-e19feca025",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-05-07-openclaw-multi-agent-coordination-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.778Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "OpenClaw Multi-Agent Coordination Plugin Design",
      "summary": "OpenClaw Multi Agent Coordination Plugin Design Purpose Create a public OpenClaw plugin that turns OpenClaw from a personal assistant runtime into a parallel multi agent work system. OpenClaw already has strong distribution, channels, tools, sessions, subagents, cron, webhooks, background tasks, and local first UX. The missing primitive is a shared coordinat...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Purpose",
          "level": 2,
          "body": "Create a public OpenClaw plugin that turns OpenClaw from a personal assistant runtime into a parallel multi-agent work system.\n\nOpenClaw already has strong distribution, channels, tools, sessions, subagents, cron, webhooks, background tasks, and local-first UX. The missing primitive is a shared coordination layer that lets multiple independent agents pull from the same ordered queue, claim work safely, hand off outputs, wait on dependencies, and advance repeatable workflows without sharing one chat context.\n\nThe product frame is:\n\n```text\nOpenClaw gives agents tools.\nRedKey gives agents a shared queue they can pull from in parallel.\n```\n\nThe public plugin should make this feel native to OpenClaw. The paid RedKey layer provides the real verified coordination bus."
        },
        {
          "title": "Core Thesis",
          "level": 2,
          "body": "The power is not \"one agent delegates to five agents.\"\n\nThe power is:\n\n```text\nfive agents can all pull from the same queue\n```\n\nThat is what creates scale.\n\nIn a delegation model, the parent agent remains the bottleneck. It has to decide what to send, who to send it to, when to check back, and how to merge results. That works for small jobs, but it still behaves like one busy manager.\n\nIn a pull-based coordination model, work is published once. Any eligible agent can see it. The first valid claim wins. As soon as one task completes, dependent tasks open. More agents can join the queue without rewriting the workflow.\n\nScale comes from queue depth and agent availability, not from a single model deciding every handoff.\n\nThis should be the lead use case:\n\n```text\nOne queue.\nFive agents.\nParallel claims.\nOrdered handoffs.\nMore throughput without more chat management.\n```"
        },
        {
          "title": "What OpenClaw Has Today",
          "level": 2,
          "body": "OpenClaw already has a real concept of multiple agents. It is not only one giant agent doing different things.\n\nOpenClaw supports:\n\n- **Isolated agents:** each `agentId` can have its own workspace, persona files, auth profiles, model config, and session store.\n- **Channel/account routing:** inbound messages can route to different agents based on channel, account, peer, team, guild, or thread bindings.\n- **Subagents:** an agent can spawn isolated child sessions for background work through `sessions_spawn`.\n- **Background task tracking:** subagent, ACP, cron, and CLI runs create task records with status.\n- **Task Flow:** durable multi-step flow tracking above background tasks.\n\nThat is useful, but it is not the same as a shared multi-agent operating queue.\n\nOpenClaw's current multi-agent model is mainly:\n\n```text\nroute this message to the right isolated agent\nor\nlet this agent spawn a child run for a delegated task\n```\n\nThe RedKey plugin adds:\n\n```text\npublish work to a shared queue\nlet multiple eligible agents pull work in parallel\norder competing claims\nrecord handoffs\nopen dependent tasks\nadvance workflow state\nmake task receipt visible outside any one chat/session\n```\n\nThis distinction should be central in public messaging. We are not saying OpenClaw lacks agents. We are saying OpenClaw lacks a verified pull-based coordination bus for agents that need to work as a team."
        },
        {
          "title": "Product Positioning",
          "level": 2,
          "body": "Public name:\n\n```text\nOpenClaw Multi-Agent Coordination\n```\n\nPossible repo names:\n\n```text\nopenclaw-coordination\nopenclaw-multi-agent\nopenclaw-workflows\n```\n\nRecommended repo name:\n\n```text\nopenclaw-coordination\n```\n\nPublic description:\n\n> Parallel multi-agent coordination for OpenClaw. Give independent OpenClaw agents a shared queue where they can pull work, claim tasks, hand off outputs, and advance workflows together.\n\nAvoid leading with \"workflow engine.\" Workflows are the outcome. Coordination is the missing primitive."
        },
        {
          "title": "Strategic Split",
          "level": 2,
          "body": "The product has two layers."
        },
        {
          "title": "Public OpenClaw Plugin",
          "level": 3,
          "body": "The public plugin provides:\n\n- Agent-facing coordination tools.\n- Workflow and task template definitions.\n- Local simulator mode for development and demos.\n- RedKey bus adapter for verified coordination.\n- CLI commands for status, start, approve, and inspect.\n- Minimal status UI if OpenClaw plugin surfaces make that practical.\n\nThe public plugin does not expose HCS implementation details."
        },
        {
          "title": "RedKey Verified Coordination",
          "level": 3,
          "body": "RedKey provides:\n\n- Hosted claim bus.\n- Verified event ordering.\n- RedKey-managed HCS topics and operator account for hosted plans.\n- Customer-owned HCS account/topics for enterprise.\n- Metering, billing, usage limits, and receipts.\n- Team cockpit, approval inbox, analytics, template marketplace, and support.\n\nInternal truth:\n\n```text\nHCS is the claim and queue mechanism.\n```\n\nPublic language:\n\n```text\nRedKey Verified Coordination provides a hosted coordination bus with ordered task claims and durable handoffs.\n```"
        },
        {
          "title": "Core User Story",
          "level": 2,
          "body": "A user has multiple OpenClaw agents:\n\n- researcher\n- writer\n- reviewer\n- producer\n\nThey start a workflow:\n\n```text\nPodcast prep -> script -> approval -> clips -> publish checklist\n```\n\nEach task is published to a shared bus. Eligible agents see work for their role. Several agents can pull from the same workflow at once. The bus resolves claim order, so only one agent owns each task. Completion opens the next task. The user can see the current workflow state and approve gates.\n\nThe user does not need to manually copy context between agents.\n\nScale example:\n\n```text\nOne podcast workflow creates 12 tasks.\nFive eligible agents watch the same queue.\nThree independent tasks open after guest intake.\nResearcher, writer, and producer claim different tasks at the same time.\nThe workflow moves faster because work is pulled in parallel.\n```"
        },
        {
          "title": "Use Cases",
          "level": 2,
          "body": "The cleanest use cases are ones where multiple agents can own different roles, but the work needs shared state."
        },
        {
          "title": "Personal Multi-Agent Workbench",
          "level": 3,
          "body": "A solo OpenClaw user has several specialist agents:\n\n- research agent\n- writing agent\n- coding agent\n- QA agent\n- admin agent\n\nToday, the user can talk to each agent or ask one agent to spawn subagents. With coordination, the user can start a workflow and let each specialist pull the next eligible task from the shared queue.\n\nExample:\n\n```text\nresearch -> write brief -> user approval -> generate assets -> publish checklist\n```"
        },
        {
          "title": "Creator and Podcast Operations",
          "level": 3,
          "body": "Podcast production needs repeated handoffs:\n\n```text\nguest intake -> research -> episode script -> host approval -> clips -> show notes\n```\n\nEach step can be owned by a different agent. The queue makes it clear what is waiting, who claimed it, what output was produced, and what opens next."
        },
        {
          "title": "Spec To Build",
          "level": 3,
          "body": "Software work needs role separation:\n\n```text\nintake -> product spec -> implementation plan -> build -> QA -> approval\n```\n\nOpenClaw can run the agents. RedKey coordination gives the agents shared task state and ordered handoffs."
        },
        {
          "title": "Team Assistant Network",
          "level": 3,
          "body": "A company can run several OpenClaw agents for different departments or people:\n\n- sales assistant\n- support assistant\n- ops assistant\n- finance assistant\n- executive assistant\n\nRouting gets messages to the right assistant. Coordination lets those assistants hand off cross-functional work without one chat thread becoming the process owner.\n\nExample:\n\n```text\ncustomer asks about invoice -> support agent triages -> finance agent claims billing task -> sales agent gets account-risk follow-up\n```"
        },
        {
          "title": "Verified Agent Marketplace",
          "level": 3,
          "body": "If OpenClaw users install third-party specialist agents, coordination becomes the trust boundary.\n\nThe user can see:\n\n- what task was offered\n- which agent claimed it\n- when it completed\n- what artifact it produced\n- whether the handoff opened the next task\n\nThis creates the base layer for paid workflow packs and specialist agent teams."
        },
        {
          "title": "Coordination Model",
          "level": 2,
          "body": "The bus is append-only from the plugin's point of view.\n\nImportant event types:\n\n- `workspace.created`\n- `workflow.started`\n- `task.published`\n- `task.claimed`\n- `task.started`\n- `task.progressed`\n- `task.completed`\n- `task.blocked`\n- `task.failed`\n- `artifact.written`\n- `approval.requested`\n- `approval.approved`\n- `approval.rejected`\n- `step.advanced`\n- `workflow.completed`\n- `workflow.cancelled`\n\nThe bus resolves the actual state by ordered events.\n\nFor verified mode, ordered events are written through RedKey to HCS. The first valid claim by consensus order wins.\n\nFor local simulator mode, ordered events are written to SQLite. This is useful for demos and single-machine testing, but it is not the verified coordination product."
        },
        {
          "title": "Parallel Pull Model",
          "level": 2,
          "body": "The default execution model is pull-based.\n\nAgents do not wait for a parent agent to assign them work. They watch the queue for tasks that match their eligibility:\n\n- role\n- capability\n- tool access\n- workspace\n- model requirement\n- priority\n- dependency state\n\nWhen a task becomes available, every eligible agent can attempt to claim it. The bus orders those claim attempts and accepts the first valid claim. Later claims are rejected with a clear reason.\n\nThe state machine is:\n\n```text\npublished -> available -> claimed -> running -> completed\n                                      -> blocked\n                                      -> failed\n```\n\nDependencies are opened by state, not by conversation:\n\n```text\nTask A completed\n  -> Task B and Task C become available\n  -> writer and researcher both pull in parallel\n  -> Task D waits until B and C complete\n```\n\nThis lets a five-agent team work like a queue-driven operation:\n\n```text\nresearcher pulls research tasks\nwriter pulls draft tasks\nreviewer pulls review tasks\nproducer pulls asset tasks\nadmin pulls publish/checklist tasks\n```\n\nThe queue is the manager. Agents are workers with eligibility rules.\n\nThis is the difference between \"spawn a subagent\" and \"run an agent team.\""
        },
        {
          "title": "Claim Bus Interface",
          "level": 2,
          "body": "The plugin should depend on a neutral bus interface.\n\n```ts\nexport interface ClaimBus {\n  publishTask(task: PublishTaskInput): Promise<CoordinationReceipt>;\n  claimTask(input: ClaimTaskInput): Promise<ClaimResult>;\n  startTask(input: StartTaskInput): Promise<CoordinationReceipt>;\n  completeTask(input: CompleteTaskInput): Promise<CoordinationReceipt>;\n  blockTask(input: BlockTaskInput): Promise<CoordinationReceipt>;\n  failTask(input: FailTaskInput): Promise<CoordinationReceipt>;\n  requestApproval(input: ApprovalRequestInput): Promise<CoordinationReceipt>;\n  resolveApproval(input: ApprovalDecisionInput): Promise<CoordinationReceipt>;\n  appendEvent(event: CoordinationEvent): Promise<CoordinationReceipt>;\n  listEvents(scope: EventScope): Promise<CoordinationEvent[]>;\n  getWorkflow(runId: string): Promise<WorkflowState>;\n  watchTasks(filter: TaskWatchFilter): AsyncIterable<CoordinationEvent>;\n}\n```\n\nInitial adapters:\n\n```text\nlocal-sqlite-bus\nredkey-verified-bus\n```\n\nFuture adapters:\n\n```text\npostgres-bus\ncustomer-hcs-bus\n```\n\nThe public plugin includes local SQLite and RedKey API adapters. It does not include direct HCS logic in V1."
        },
        {
          "title": "RedKey Bus API",
          "level": 2,
          "body": "The plugin talks to RedKey over HTTPS.\n\nExample endpoints:\n\n```text\nPOST /v1/workspaces\nPOST /v1/workflows/start\nGET  /v1/workflows/:runId\nPOST /v1/tasks\nPOST /v1/tasks/:taskId/claim\nPOST /v1/tasks/:taskId/start\nPOST /v1/tasks/:taskId/complete\nPOST /v1/tasks/:taskId/block\nPOST /v1/approvals/:approvalId/decision\nGET  /v1/events?runId=...\nGET  /v1/usage\n```\n\nThe RedKey API handles:\n\n- HCS topic creation.\n- HCS message submission.\n- Mirror node reads or equivalent event reconstruction.\n- Claim race resolution.\n- Usage metering.\n- Receipt generation.\n- API keys and workspace identity.\n\nThe plugin sees receipts, not raw HCS mechanics."
        }
      ],
      "html_path": "artifacts/2026-05-07-openclaw-multi-agent-coordination-design-e19feca025.html",
      "json_path": "artifacts/2026-05-07-openclaw-multi-agent-coordination-design-e19feca025.json"
    },
    {
      "id": "2026-05-06-personal-brain-recipe-design-5f78e24528",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-05-06-personal-brain-recipe-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.774Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Personal Brain Capability Recipe Design",
      "summary": "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...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Purpose",
          "level": 2,
          "body": "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.\n\nThe 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."
        },
        {
          "title": "Product Definition",
          "level": 2,
          "body": "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.\n\nThe app lets a user:\n\n- Capture thoughts.\n- View all submitted thoughts.\n- Promote thoughts into ideas.\n- Promote thoughts or ideas into suggested tasks.\n- Accept suggested tasks into a simple Kanban board.\n- Preserve source evidence from each idea or task back to its originating thought.\n\nThe V1 app is intentionally small. It proves the core loop:\n\n```text\nRecipe URL -> Codex build -> local app -> hosted brain -> thoughts -> ideas -> tasks -> Kanban\n```"
        },
        {
          "title": "Target User",
          "level": 2,
          "body": "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.\n\nThe expected starting prompt is:\n\n```text\nBuild this: https://recipes.bezeliq.ai/personal-brain\n```\n\nCodex should then fetch the recipe and guide the user with one plain-English question at a time."
        },
        {
          "title": "Recipe Delivery Model",
          "level": 2,
          "body": "The recipe is URL-first.\n\nThe public recipe URL should provide:\n\n- A human-readable page explaining what will be built.\n- A machine-readable manifest at `recipe.json`.\n- Markdown instructions for Codex.\n- App specifications.\n- Schema and API contracts.\n- Seed/demo data.\n- Acceptance tests.\n- Troubleshooting guidance.\n\nRecommended URL shape:\n\n```text\nhttps://recipes.bezeliq.ai/personal-brain\nhttps://recipes.bezeliq.ai/personal-brain/recipe.json\nhttps://recipes.bezeliq.ai/personal-brain/START_HERE.md\nhttps://recipes.bezeliq.ai/personal-brain/codex-instructions.md\n```"
        },
        {
          "title": "Golden Path",
          "level": 2,
          "body": "V1 has one default path: Bezel hosted Supabase sandbox in the Bezel Projects Supabase database.\n\nCodex should:\n\n1. Fetch the recipe.\n2. Explain that it will build a local personal brain app.\n3. Ask what the user wants to call their brain.\n4. Use the Bezel hosted sandbox by default.\n5. Scaffold the local app.\n6. Connect the app to the hosted sandbox namespace.\n7. Seed demo thoughts if the user agrees.\n8. Build Thoughts, Ideas, and Tasks boards.\n9. Run acceptance checks.\n10. Start the local app and give the user the localhost URL.\n\nCodex should not ask the user to choose a database, framework, migration strategy, or deployment target in V1."
        },
        {
          "title": "Execution Contract",
          "level": 2,
          "body": "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."
        },
        {
          "title": "Default Stack",
          "level": 3,
          "body": "The V1 recipe builds:\n\n- Next.js App Router application.\n- TypeScript.\n- Supabase JavaScript client.\n- Plain CSS modules or a minimal local stylesheet.\n- Local development via `npm run dev`.\n- Verification via `npm run build` and a small smoke test script.\n\nThe recipe should avoid heavy UI frameworks and package choices that increase setup friction. The generated app should be understandable as ordinary web app code."
        },
        {
          "title": "Hosted Sandbox Access",
          "level": 3,
          "body": "The hosted sandbox must not expose a shared unrestricted Supabase service key to the generated app.\n\nThe 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.\n\nV1 should use a Bezel-issued sandbox configuration:\n\n- `BEZEL_BRAIN_API_URL`\n- `BEZEL_BRAIN_PUBLIC_KEY`\n- `BEZEL_BRAIN_INSTALL_TOKEN`\n- `BEZEL_BRAIN_NAMESPACE`\n\nThe 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.\n\nFor 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."
        },
        {
          "title": "Namespace and Identity",
          "level": 3,
          "body": "V1 does not require full user auth.\n\nThe app should create or use one namespace:\n\n- `brain_id`: stable identifier for this local brain.\n- `brain_name`: user-visible name.\n- `install_token_hash`: server-side reference, never displayed after setup.\n\nAll rows must include `brain_id`. Queries must filter by `brain_id`.\n\nV2 can replace this with Supabase Auth and row-level security. V1 should still model `brain_id` explicitly so migration to private Supabase is straightforward."
        },
        {
          "title": "Recipe Manifest Contract",
          "level": 3,
          "body": "`recipe.json` is the machine-readable entry point Codex should read first.\n\nMinimum manifest shape:\n\n```json\n{\n  \"schema_version\": \"0.1\",\n  \"recipe_id\": \"personal-brain-supabase\",\n  \"name\": \"Personal Brain\",\n  \"default_mode\": \"bezel_hosted_sandbox\",\n  \"target_user\": \"first_time_codex_user\",\n  \"stack\": {\n    \"app\": \"nextjs\",\n    \"language\": \"typescript\",\n    \"database\": \"supabase_hosted_sandbox\"\n  },\n  \"entrypoints\": {\n    \"human\": \"START_HERE.md\",\n    \"codex\": \"codex-instructions.md\",\n    \"acceptance\": \"app-spec/acceptance.md\"\n  },\n  \"build_outputs\": [\n    \"local_web_app\",\n    \"thoughts_board\",\n    \"idea_board\",\n    \"kanban_board\",\n    \"hosted_sandbox_connection\"\n  ],\n  \"verification\": {\n    \"install\": \"npm install\",\n    \"build\": \"npm run build\",\n    \"smoke\": \"npm run smoke\"\n  }\n}\n```\n\nThe manifest should include file checksums or version identifiers once recipes are hosted publicly."
        },
        {
          "title": "Build Steps",
          "level": 3,
          "body": "Codex should follow these steps:\n\n1. Read `recipe.json`.\n2. Read `START_HERE.md` and `codex-instructions.md`.\n3. Create the local app files.\n4. Create `.env.local.example`.\n5. Ask for the brain name.\n6. Create or configure `brain_id`.\n7. Connect to hosted sandbox using the provided sandbox configuration.\n8. Create local data-access helpers that always filter by `brain_id`.\n9. Build the Home, Capture, Thoughts, Ideas, Tasks, and Settings screens.\n10. Add demo seed data if the user accepts.\n11. Run build and smoke verification.\n12. Start the local app."
        },
        {
          "title": "Verification Commands",
          "level": 3,
          "body": "The recipe must provide concrete commands:\n\n```bash\nnpm install\nnpm run build\nnpm run smoke\nnpm run dev\n```\n\n`npm run smoke` should verify at least:\n\n- app can load configuration\n- hosted sandbox connection responds\n- seeded or created thought is readable\n- idea can link to source thought\n- suggested task can link to source thought or idea\n- task status can move through the Kanban statuses\n\nIf the sandbox is unavailable, the smoke test should fail with a plain-English message that names the missing configuration or connection failure."
        },
        {
          "title": "Storage Model",
          "level": 2,
          "body": "V1 uses the Bezel hosted Supabase sandbox as the default storage layer.\n\nThis is the fastest path because the user does not need a Supabase account or project.\n\nHosted V1 storage is in the Bezel Projects Supabase database. RedKey remains the internal operating/orchestration system and must not be used as the hosted personal brain sandbox.\n\nThe app should make the storage mode visible in Settings:\n\n- Mode: Bezel Hosted Sandbox\n- Brain name\n- User namespace/profile identifier\n- Export option placeholder\n- Future private Supabase migration note\n\nThe design must not lock users into hosted storage. V2 will support private Supabase installs using the same conceptual data model."
        },
        {
          "title": "Privacy and Portability Boundary",
          "level": 3,
          "body": "The hosted sandbox is for fast setup and early demos. The app must clearly tell the user:\n\n- This V1 stores data in a Bezel-hosted Supabase sandbox.\n- Do not store sensitive personal data until the hosted privacy and deletion terms are explicit.\n- The user should be able to export their rows.\n- Private Supabase install is the long-term ownership path.\n\nV1 Settings should include visible placeholders for:\n\n- Export data.\n- Delete sandbox data.\n- Migrate to private Supabase.\n\nIf export/delete are not implemented in the first generated app, they must be labeled as unavailable in V1 rather than implied as working."
        },
        {
          "title": "Home",
          "level": 3,
          "body": "The app landing screen. It should show the most important current state:\n\n- Quick capture.\n- Recent thoughts.\n- New ideas.\n- Suggested tasks.\n- Active and waiting tasks."
        },
        {
          "title": "Capture",
          "level": 3,
          "body": "A simple thought entry surface:\n\n- Title, optional.\n- Body/content.\n- Save to brain.\n- After save, offer promotion actions.\n\nV1 can use text input only. Voice, pasted email, meeting transcripts, and AI chat MCP capture are deferred."
        },
        {
          "title": "Thoughts Board",
          "level": 3,
          "body": "All submitted brain items.\n\nEach thought card should show:\n\n- Title or generated first-line label.\n- Short excerpt.\n- Created date.\n- Promotion actions.\n- Linked ideas/tasks created from it."
        },
        {
          "title": "Idea Board",
          "level": 3,
          "body": "Ideas created from thoughts.\n\nEach idea card should show:\n\n- Title.\n- Summary.\n- Source thought evidence.\n- Status: new, developing, archived.\n- Action to create suggested task."
        }
      ],
      "html_path": "artifacts/2026-05-06-personal-brain-recipe-design-5f78e24528.html",
      "json_path": "artifacts/2026-05-06-personal-brain-recipe-design-5f78e24528.json"
    },
    {
      "id": "2026-04-27-dreamborn-founder-deck-design-06097a6cca",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-04-27-dreamborn-founder-deck-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.772Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "DreamBorn Founder Pitch Page — Design Spec",
      "summary": "DreamBorn Founder Pitch Page — Design Spec Date: 2026 04 27 File: docs/dreamborn founder deck.html Status: Approved Purpose A single page founder pitch document explaining what DreamBorn has built — the pull model, consensus backed company OS. Audience: investors, technical founders, early partners. Not a marketing page; a technical pitch that earns credibil...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "DreamBorn Founder Pitch Page — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**File:** `docs/dreamborn-founder-deck.html`  \n**Status:** Approved\n\n---"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "A single-page founder pitch document explaining what DreamBorn has built — the pull-model, consensus-backed company OS. Audience: investors, technical founders, early partners. Not a marketing page; a technical pitch that earns credibility by showing the live system.\n\n---"
        },
        {
          "title": "Brand",
          "level": 2,
          "body": "- **Company:** DreamBorn\n- **Palette:** Crimson (`#8C1A13`), Lime (`#8DC63F`), Taupe (`#6B5F54`), Warm white (`#FAF8F5`), Dark (`#0F0B0A`)\n- **Typography:** System sans-serif (`-apple-system, BlinkMacSystemFont, Segoe UI`)\n- **Logo:** DreamBorn wordmark + mark, embedded as base64 PNG (no external deps)\n- **Section rhythm:** Alternating light (warm white) and dark (`#0F0B0A`) sections\n- **No external CDN dependencies** — fully self-contained HTML file\n\n---"
        },
        {
          "title": "1. Hero — \"The Company OS That Runs on Consensus\"",
          "level": 3,
          "body": "- Live status badge: `LIVE · CONSENSUS NETWORK · roles.developer · 0.0.8730503`\n- DreamBorn mark (mix-blend-mode: multiply on warm cream background)\n- Headline split across 3 lines; \"Consensus\" in lime\n- Subtext: \"Every handoff. Every decision. Every claim. Not a log file — cryptographic proof on the global consensus network.\"\n- CTA: \"Verify live on HashScan →\""
        },
        {
          "title": "2. The Broken World — \"Everyone else built pipelines.\"",
          "level": 3,
          "body": "- Push (red card) vs Pull (green card) comparison diagram\n- Push: orchestrator → assigns → Agent A/B/C; \"Orchestrator down = everything down. Scale = add routing logic.\"\n- Pull: work queue on-chain → agents claim; \"Scale = run more agents. No routing logic. No orchestrator needed.\""
        },
        {
          "title": "3. The Atomic Claim — \"Work claims itself.\"",
          "level": 3,
          "body": "- Explains `task.claim` atomic message; consensus makes conflicting claims impossible\n- Live demo: quinn claims first, quinn@2 sees \"already claimed\", quinn@N \"idle — next task\"\n- Real topic: `ROLES.DEVELOPER · 0.0.8730503`\n- Terminal block showing consensus timestamp resolution (1.6ms window)"
        },
        {
          "title": "4. What Consensus Means — \"Not a log file. Not a database. Cryptographic truth.\" (dark)",
          "level": 3,
          "body": "- 9-nanosecond precision consensus timestamp\n- On-chain message type glossary: `task.available`, `task.claim`, `task.complete`, `task.blocked`, `task.cancelled`\n- \"Every message carries agent, cost_usd, duration_seconds.\"\n- HashScan deep link: `hashscan.io/testnet/topic/0.0.8730503`"
        },
        {
          "title": "5. Parallel Orchestration — \"Not sequential. Fan-out with on-chain dependency tracking.\"",
          "level": 3,
          "body": "- Engine fan-out diagram: `0.0.8727762` → roles.developer / roles.architect / roles.ba simultaneously\n- Dependency declared on-chain in `task.created`; Engine checks every 30s\n- Terminal block showing real `depends_on` array with topic IDs"
        },
        {
          "title": "6. Trigger Model — \"Work enters three ways. All of them on-chain.\"",
          "level": 3,
          "body": "- Three cards: Direct Dispatch (green border), Event-Driven (crimson border), Scheduled (neutral)\n- Real examples in each: Justin → roles.exec, Resend webhook → roles.crm, Iris governance every 5min\n- Unifying principle callout: every trigger produces `task.available`; agents don't know or care"
        },
        {
          "title": "7. Agent Team — \"The agent team — running right now.\" (light)",
          "level": 3,
          "body": "- Grid of all live agents with green/amber status dots, real topic IDs:\n  - Quinn (Developer), Vikram (Architect/Reviewer), Priya (BA/Spec)\n  - Claire (Coordinator), Engine (Workflow state machine), Mindy (Product Manager)\n  - Iris (Governance daemon), Arlo (CRM), Zara + Luna (UX + QA)\n- Footer bar: definitions topic, listener sync interval, VPS IP"
        },
        {
          "title": "8. Structural Moat — \"Six things you cannot replicate without rebuilding from scratch.\" (dark)",
          "level": 3,
          "body": "1. Pull model — nobody else has this\n2. True parallel orchestration\n3. Consensus proof — cryptographic audit trail\n4. Infinite scale — bounded by the network, not us\n5. Full company OS — not dev tooling\n6. Human in the loop — by design, not afterthought\n\n---"
        },
        {
          "title": "Design Decisions",
          "level": 2,
          "body": "- **No Hedera branding** — removed throughout; consensus network is the capability, not a brand claim\n- **HTML entities for arrows** (`&rarr;`) — prevents encoding corruption across environments\n- **base64 logos** — no external image dependencies; file opens offline\n- **Real topic IDs everywhere** — builds credibility; every ID is verifiable on HashScan\n- **Dark terminal blocks** — `#0F0B0A` background, lime/crimson syntax highlighting; shows real message schemas\n- **Forge aesthetic** — dense, technical, founder-to-founder; not a SaaS marketing page\n\n---"
        },
        {
          "title": "Iterations",
          "level": 2,
          "body": "| Version | Change |\n|---|---|\n| v1–v3 | Initial structure and layout |\n| v4 | DreamBorn brand applied; Hedera removed |\n| v5 | Logo base64 injection; HTML entity arrows |\n| v6 | Final approved — warm cream hero, mix-blend-mode mark, full 8 sections |"
        }
      ],
      "html_path": "artifacts/2026-04-27-dreamborn-founder-deck-design-06097a6cca.html",
      "json_path": "artifacts/2026-04-27-dreamborn-founder-deck-design-06097a6cca.json"
    },
    {
      "id": "2026-04-27-dreamborn-design-system-b01a4d71c5",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-04-27-dreamborn-design-system.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.771Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Dreamborn Design System — Spec",
      "summary": "Dreamborn Design System — Spec Date: 2026 04 27 Status: Approved Repo: C:/Users/jstnk/downloads/cc/projects/dreamborn design system Purpose A full brand system for Dreamborn covering website, marketing materials, product UI (cockpit), and pitch decks. Delivered as a single CSS file (dreamborn.css) using CSS @layer with a three register theme system. No build...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Dreamborn Design System — Spec",
          "level": 1,
          "body": "**Date:** 2026-04-27\n**Status:** Approved\n**Repo:** `C:/Users/jstnk/downloads/cc/projects/dreamborn-design-system`\n\n---"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "A full brand system for Dreamborn covering website, marketing materials, product UI (cockpit), and pitch decks. Delivered as a single CSS file (`dreamborn.css`) using CSS `@layer` with a three-register theme system. No build step required — drop in any HTML file.\n\n---"
        },
        {
          "title": "CSS Layer System",
          "level": 3,
          "body": "Three layers in cascade order:\n\n```\n@layer tokens, base, components;\n```\n\n- **tokens** — all CSS custom properties (palette, semantic, spacing, type scale, motion, shadow)\n- **base** — reset and foundational element styles\n- **components** — reusable UI patterns as CSS classes"
        },
        {
          "title": "Three-Register System",
          "level": 3,
          "body": "Three typographic/color contexts activated via a data attribute:\n\n```html\n<body data-register=\"brand\">      <!-- marketing, homepage, campaigns -->\n<body data-register=\"editorial\">  <!-- blog, long-form, newsletters -->\n<body data-register=\"forge\">      <!-- cockpit, internal tools, dashboards -->\n```\n\nSemantic tokens (`--db-bg`, `--db-text`, `--db-accent`, `--db-cta`, `--db-font-display`, etc.) resolve to different values per register. Components automatically adapt — no register-specific class variants needed.\n\n---"
        },
        {
          "title": "Palette Scales (9 steps each)",
          "level": 3,
          "body": "| Scale | Base | Use |\n|---|---|---|\n| Crimson | `#8C1A13` | Primary brand, CTA, active states |\n| Lime | `#8DC63F` | Accent, live status, growth signals |\n| Warm Neutral | `#6B5F54` taupe base | Backgrounds, borders, muted text |"
        },
        {
          "title": "Mark Intersection Colors",
          "level": 3,
          "body": "Derived from the overlapping circles in the logo mark:\n\n| Name | Hex | Source |\n|---|---|---|\n| `--db-olive` | `#4A5828` | Crimson × Lime overlap |\n| `--db-ember` | `#5C2318` | Crimson × Taupe overlap |\n| `--db-stone` | `#8A7E6A` | Lime × Taupe overlap |"
        },
        {
          "title": "Semantic Token Mapping",
          "level": 3,
          "body": "| Token | Brand (dark) | Editorial (light) | Forge (dense dark) |\n|---|---|---|---|\n| `--db-bg` | `#0F0B0A` | `#FAF8F5` | `#0A0807` |\n| `--db-surface` | `#1A100E` | `#FFFFFF` | `#110D0B` |\n| `--db-text` | `#FAF8F5` | `#0F0B0A` | `#E8E2DC` |\n| `--db-text-muted` | `#6B5F54` | `#6B5F54` | `#5A4F46` |\n| `--db-accent` | `#8DC63F` | `#6A9A2C` | `#8DC63F` |\n| `--db-cta` | `#8C1A13` | `#8C1A13` | `#8C1A13` |\n\nCrimson CTA (`--db-cta`) is the one constant across all three registers."
        },
        {
          "title": "Forge Status Colors",
          "level": 3,
          "body": "Forge adds four semantic status tokens not present in other registers:\n\n| Token | Value | Use |\n|---|---|---|\n| `--db-status-live` | `#8DC63F` (lime-500) | Active / in-progress tasks |\n| `--db-status-complete` | `#4A5828` (olive) | Completed tasks |\n| `--db-status-claim` | `#C9963A` | Claimed / pending states |\n| `--db-status-blocked` | `#C4352B` | Blocked / error states |\n\n---"
        },
        {
          "title": "Font Pairings",
          "level": 3,
          "body": "**Brand register** — Bebas Neue (display) + Lora italic (subheads, body, pull quotes)\n**Editorial register** — Fraunces (display, bold/italic weight contrast) + DM Sans 300 (body)\n**Forge register** — DM Sans throughout (display, body, labels) + Fira Code (mono for IDs, topic hashes, terminal)\n**Shared UI chrome** — DM Sans handles all nav, buttons, labels, badges across all registers\n**Mono** — SF Mono / Fira Code for code and topic IDs\n\nAll fonts loaded from Google Fonts. Single `<link>` tag covers all three registers."
        },
        {
          "title": "Register Behavior",
          "level": 3,
          "body": "| Element | Brand | Editorial | Forge |\n|---|---|---|---|\n| Display XL | Bebas Neue, ~112px, +0.03em | Fraunces 700, ~64px, -0.02em | DM Sans 600, ~28px, -0.01em |\n| Subhead | Lora italic, 1rem | DM Sans 300, 1rem | DM Sans 500, 0.8rem |\n| Body | Lora italic, 0.9rem, leading 1.75 | DM Sans 300, 0.9rem, leading 1.8 | DM Sans 400, 0.82rem, leading 1.5 |\n| Label/kicker | DM Sans 600, 0.62rem, uppercase, +0.2em | DM Sans 500, 0.62rem, uppercase, +0.18em | DM Sans 500, 0.6rem, uppercase, +0.15em |\n| Mono / IDs | Fira Code, 0.8rem | — | Fira Code, 0.75rem |"
        },
        {
          "title": "Fraunces Weight Contrast",
          "level": 3,
          "body": "The editorial register's core technique: `font-weight: 700` for the title, `font-weight: 300; font-style: italic` for an `<em>` word within it. One crimson word per headline maximum. Use `font-variation-settings: 'opsz' 9` below 18px, `'opsz' 24` at display sizes."
        },
        {
          "title": "Forge Typography Philosophy",
          "level": 3,
          "body": "Forge is a functional register — no expressive typefaces. DM Sans at multiple weights (400/500/600) provides all hierarchy. Fira Code is used extensively: task IDs, HCS topic hashes, agent handles, consensus log entries. Density is a feature: line heights tighten, font sizes drop to 0.75–0.82rem, letter-spacing is minimal.\n\n---"
        },
        {
          "title": "Spacing Scale",
          "level": 3,
          "body": "4px base unit. Key steps:\n\n| Token | Value | Common use |\n|---|---|---|\n| `--db-space-2` | 8px | Badge padding, inline |\n| `--db-space-4` | 16px | Input padding |\n| `--db-space-6` | 24px | Card padding, grid gap |\n| `--db-space-8` | 32px | Pull quote indent |\n| `--db-space-12` | 48px | Below article header |\n| `--db-space-16` | 64px | Section padding (editorial) |\n| `--db-space-20` | 80px | Section padding (brand) |\n| `--db-space-32` | 128px | Hero vertical padding |"
        },
        {
          "title": "Container System",
          "level": 3,
          "body": "| Class | Max-width | Use |\n|---|---|---|\n| `.db-container--wide` | 1200px | Cockpit, full-bleed feature blocks |\n| `.db-container` | 980px | Homepage, marketing pages |\n| `.db-container--narrow` | 680px | All editorial — ~72 chars/line |\n\nSide padding: `24px` (desktop) → `16px` (mobile)."
        },
        {
          "title": "Whitespace Philosophy",
          "level": 3,
          "body": "1. **Air is not empty.** Space signals importance. Never compress space to fit more content.\n2. **Editorial is narrower than brand.** 680px max. Reading is a focused act.\n3. **Section rhythm is consistent.** Brand: `5rem` block padding. Editorial: `3rem` block padding.\n4. **Forge is dense by design.** 8–12px gaps. Sidebar 220px. Content fills the viewport. Whitespace is not a feature here — information density is.\n\n---"
        },
        {
          "title": "Mark Usage",
          "level": 2,
          "body": "The Dreamborn mark (three overlapping organic circles) is used as follows:\n\n- **Brand register only:** Large soft circles (400–600px, 15–25% opacity) as ambient background texture, bleeding off edges of dark sections. Creates dimensionality without competing with type.\n- **Brand + Editorial:** The **lime outline circle** from the mark is used as a framing device (`.db-circle-frame`) for author portraits, agent avatars, and featured image crops. The one decorative element that bridges these two registers.\n- **Editorial register:** No ambient circles. Pure whitespace. The contrast between registers is intentional and legible.\n- **Forge register:** No mark elements of any kind. No orbs, no circle frames. Forge is a tool surface — brand expression lives in the wordmark only.\n- **Never:** Tile as pattern, crop images into circles system-wide, or use at small scale/high repetition.\n\n---"
        },
        {
          "title": "Shared (all registers)",
          "level": 3,
          "body": "| Component | Class | Notes |\n|---|---|---|\n| Container | `.db-container`, `.db-container--wide`, `.db-container--narrow` | |\n| Section | `.db-section` | 80px block padding |\n| Label | `.db-label`, `.db-label--accent` | Uppercase, 0.18em tracking |\n| Display heading | `.db-display`, `.db-display--xl/lg/md` | Register-aware font |\n| Body text | `.db-body`, `.db-body--lg/sm` | Register-aware weight |\n| Button primary | `.db-btn.db-btn--primary` | Crimson, always |\n| Button ghost | `.db-btn.db-btn--ghost` | Border, adapts to register |\n| Button accent | `.db-btn.db-btn--accent` | Lime |\n| Card | `.db-card`, `.db-card--dark`, `.db-card--feature` | |\n| Divider | `.db-rule`, `.db-rule--full` | |\n| Circle frame | `.db-circle-frame` | Lime outline ring (brand + editorial only) |\n| Nav | `.db-nav` | Sticky, register-aware |"
        },
        {
          "title": "Brand register only",
          "level": 3,
          "body": "| Component | Class | Notes |\n|---|---|---|\n| Live badge | `.db-live-badge` | Pulsing lime dot |\n| Topic badge | `.db-topic-badge` | Mono, lime tint |\n| Terminal block | `.db-terminal` | Dark, with color tokens |\n| Ambient orb field | `.db-orb-field` | Circle background texture |"
        }
      ],
      "html_path": "artifacts/2026-04-27-dreamborn-design-system-b01a4d71c5.html",
      "json_path": "artifacts/2026-04-27-dreamborn-design-system-b01a4d71c5.json"
    },
    {
      "id": "2026-04-27-cockpit-inbox-design-5d5847e98c",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-04-27-cockpit-inbox-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.770Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Cockpit Inbox Design",
      "summary": "Cockpit Inbox Design Date: 2026 04 27 Status: Approved Branch: feature/marketing agents Overview Replace the \"Exec Inbox\" section in the cockpit right sidebar with a nav level inbox badge and a 40% width slide in drawer. The drawer provides a two pane interface for reading messages, approving exec gates, replying to agents, and composing ad hoc messages to a...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Cockpit Inbox Design",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**Status:** Approved  \n**Branch:** feature/marketing-agents\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Replace the \"Exec Inbox\" section in the cockpit right sidebar with a nav-level inbox badge and a 40%-width slide-in drawer. The drawer provides a two-pane interface for reading messages, approving exec gates, replying to agents, and composing ad hoc messages to any agent.\n\n---"
        },
        {
          "title": "Nav Badge",
          "level": 2,
          "body": "A `✉ N` badge is added to the nav bar between the \"testnet\" badge and the clock.\n\n- **Count** = unread `inbox` rows where `to_agent = 'justin'` and `processed = false` + `agent_tasks` rows where `role = 'exec'` and `status = 'assigned'`\n- Badge pulses amber when count > 0\n- Clicking the badge toggles the drawer open/closed\n- Badge shows `is-open` styling when drawer is open\n- The existing \"Exec Inbox\" label and container in the right sidebar are removed\n\n---"
        },
        {
          "title": "Drawer",
          "level": 2,
          "body": "- **Width:** 40% of viewport\n- **Position:** Fixed to the right edge, full height below the nav\n- **Behavior:** Slides in with a 200ms ease transition; clicking the overlay or pressing Escape closes it\n- **Border:** Left edge uses `--color-accent` to signal it is an interactive layer above the cockpit\n- A semi-transparent overlay covers the rest of the cockpit when the drawer is open (does not block interaction — just visual depth)"
        },
        {
          "title": "Drawer Header",
          "level": 3,
          "body": "```\n✉ Inbox · N unread       [+ Compose]  [✕]\n```\n\n- Title shows live unread count\n- `+ Compose` button opens the compose form in the right pane; it gets an `is-active` style while compose is open\n- `✕` closes the drawer\n\n---"
        },
        {
          "title": "Two-Pane Layout",
          "level": 2,
          "body": "The drawer body is split into two columns:\n\n| Column | Width | Content |\n|--------|-------|---------|\n| Message list | 38% | Scrollable list of all inbox items |\n| Detail pane | 62% | Selected message body + action area |"
        },
        {
          "title": "Message List",
          "level": 3,
          "body": "Messages are ordered: exec gate tasks first (green), then unread inbox messages by `created_at desc`, then read/processed messages dimmed at the bottom.\n\nEach list item shows:\n- **From** agent name (amber for regular; green for exec gates) + unread dot if unprocessed\n- **Subject** (truncated to one line)\n- **Meta:** `message_type · ref_id · time ago`\n\nClicking an item selects it (amber border) and loads it in the detail pane. Read messages are dimmed (opacity 0.55)."
        },
        {
          "title": "Detail Pane",
          "level": 3,
          "body": "Displays:\n- From → To header\n- `message_type · ref_id · timestamp`\n- Subject line\n- Full message body (scrollable)\n- HashScan link for the ref topic_id\n- Action area pinned to the bottom (see below)\n\n---"
        },
        {
          "title": "Exec Gate (agent_tasks role=exec, status=assigned)",
          "level": 3,
          "body": "Action area shows two buttons:\n\n**Approve**\n- Posts `{ type: 'task.complete', task_id: topicId, agent: 'justin', output: 'Approved via cockpit' }` to the task's `topic_id` via `POST /post-hcs-message`\n- Button changes to `✓ Approved` (green) on success\n- Re-renders the message list after 2 seconds\n\n**Block**\n- Clicking Block expands a reason text input inline (replaces the button row)\n- User types a reason; a `Confirm Block` button posts `{ type: 'task.blocked', task_id: topicId, agent: 'justin', error_message: reason }` to the task's `topic_id` via HCS\n- Cancel collapses back to Approve/Block buttons"
        },
        {
          "title": "Inbox Message (inbox table, message_type != exec.gate)",
          "level": 3,
          "body": "Action area shows a reply textarea:\n\n```\nReply to <agent>\n[textarea — placeholder: \"Type your reply…\"]\nsends as justin → <agent> via HCS         [Dismiss] [Send]\n```\n\n**Send**\n- Looks up the sender agent's `inbound_topic_id` from `agent_definitions`\n- Posts `{ type: 'inbox.message', from: 'justin', to: senderAgent, subject: 'Re: ' + originalSubject, body: replyText, ref_id: originalRefId, ref_type: originalRefType }` via `POST /post-hcs-message`\n- Listener picks up the HCS message and writes it to the `inbox` table\n- On success: textarea clears, message item dims (marked read)\n\n**Dismiss**\n- Patches `inbox` row `processed = true` directly via Supabase REST (no HCS needed — just clears the unread state)\n- Message dims in the list; badge count decrements\n\n---"
        },
        {
          "title": "Compose (Ad Hoc Message)",
          "level": 2,
          "body": "Clicking `+ Compose` replaces the detail pane with a compose form. Cancelling returns to the previously selected message.\n\n**Fields:**\n\n| Field | Type | Options |\n|-------|------|---------|\n| To | Dropdown | All agents from `AGENT_DEPT` map |\n| Type | Dropdown | `question`, `feedback`, `fyi`, `decision.needed`, `review.request` |\n| Subject | Text input | One-line summary |\n| Message | Textarea | Full message body |\n\n**Send to HCS**\n- Looks up the selected agent's `inbound_topic_id` from `agent_definitions`\n- Posts `{ type: 'inbox.message', from: 'justin', to: selectedAgent, message_type: selectedType, subject, body }` via `POST /post-hcs-message`\n- Listener writes to `inbox` table on receipt\n- On success: compose form clears, drawer shows empty detail pane with \"Message sent\" confirmation\n\n**Cancel** — returns to previously selected message (or empty detail if none was selected)\n\n---"
        },
        {
          "title": "Loading inbox items",
          "level": 3,
          "body": "```js\n// Inbox messages\nsb.from('inbox')\n  .select('id, from_agent, message_type, subject, payload, ref_id, ref_type, priority, processed, created_at')\n  .eq('to_agent', 'justin')\n  .order('created_at', { ascending: false })\n  .limit(50)\n\n// Exec gate tasks\nsb.from('agent_tasks')\n  .select('topic_id, brief, project_id, created_at')\n  .eq('role', 'exec')\n  .eq('status', 'assigned')\n  .order('created_at', { ascending: true })\n```"
        },
        {
          "title": "Loading agent inbound topics (for reply/compose)",
          "level": 3,
          "body": "```js\nsb.from('agent_definitions')\n  .select('agent_id, inbound_topic_id')\n```\n\nFetched once on drawer open and cached for the session."
        },
        {
          "title": "Badge count",
          "level": 3,
          "body": "```js\nunreadCount = inbox.filter(m => !m.processed).length + execTasks.length\n```\n\n---"
        },
        {
          "title": "Realtime",
          "level": 2,
          "body": "Existing Supabase Realtime subscriptions are extended:\n\n- `agent_tasks` changes where `role = 'exec'` → refresh exec task list + badge count (already exists, keep)\n- Add: `inbox` table changes where `to_agent = 'justin'` → refresh inbox list + badge count\n\n---"
        },
        {
          "title": "Removed",
          "level": 2,
          "body": "- `Exec Inbox` `<span class=\"cockpit-label\">` and `#exec-inbox-container` div from the right sidebar\n- `renderExecInbox()` function (replaced by drawer)\n- Realtime subscription for `agent_tasks` filter `role=eq.exec` in the old right-panel path (re-wired to drawer)\n\n---"
        },
        {
          "title": "HCS Message Format",
          "level": 2,
          "body": "All outbound messages post to `POST http://87.99.154.64:3001/post-hcs-message`:\n\n```json\n{\n  \"topic_id\": \"<target_topic_id>\",\n  \"message\": {\n    \"type\": \"inbox.message | task.complete | task.blocked\",\n    ...fields\n  }\n}\n```\n\nThe `hcs-post-server` is already live and tested. No changes needed to the server.\n\n---"
        },
        {
          "title": "Listener Dependency",
          "level": 2,
          "body": "Compose and reply post `inbox.message` to an agent's `inbound_topic_id` on HCS. The listener (`vps/hedera-listener.py`) must handle this message type on agent inbound topics and write it to the `inbox` table.\n\nThis is **not yet implemented** in the listener. The implementation plan must include adding `handle_inbox_message()` to the listener:\n\n```python"
        }
      ],
      "html_path": "artifacts/2026-04-27-cockpit-inbox-design-5d5847e98c.html",
      "json_path": "artifacts/2026-04-27-cockpit-inbox-design-5d5847e98c.json"
    },
    {
      "id": "2026-04-25-cockpit-design-ea42b1624f",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-04-25-cockpit-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.768Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Cockpit — Design Spec",
      "summary": "Cockpit — Design Spec Date: 2026 04 25 Status: Design approved — ready for implementation plan URL: cockpit.bezeliq.ai What It Is A live operations dashboard for the RedKey/BezelIQ platform. Justin watches agents work, projects progress, and exec decisions queue up — in real time, from a browser, served at cockpit.bezeliq.ai. Not a reporting tool. Not a buil...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Cockpit — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-25\n**Status:** Design approved — ready for implementation plan\n**URL:** cockpit.bezeliq.ai\n\n---"
        },
        {
          "title": "What It Is",
          "level": 2,
          "body": "A live operations dashboard for the RedKey/BezelIQ platform. Justin watches agents work, projects progress, and exec decisions queue up — in real-time, from a browser, served at cockpit.bezeliq.ai.\n\nNot a reporting tool. Not a build log viewer. The cockpit is the control room: what's running, who's doing it, and what needs a decision.\n\n---"
        },
        {
          "title": "Architecture",
          "level": 2,
          "body": "**Single file:** `cockpit/index.html` — all HTML, CSS, and JS inline. No build step. No framework. Deploy is `scp cockpit/index.html ccos@87.99.154.64:/tmp/` then move to nginx root.\n\n**Live data:** Supabase JS SDK loaded from CDN (`@supabase/supabase-js`). Supabase Realtime websocket subscriptions on entity tables. Updates push to the browser as the listener writes — no polling.\n\n**Design system:** Forge (already in the existing shell) — dark amber, Space Grotesk + JetBrains Mono, `#0c0a07` background, amber accent `#f59e0b`.\n\n**Supabase tables subscribed:**\n- `projects` — project list + status\n- `stages` — stage status transitions\n- `phases` — phase status + progress\n- `agent_tasks` — task status, agent assignment, action line\n- `agent_state` — agent working/idle/blocked + current action\n\n**Auth:** Supabase anon key embedded in the HTML. All queries are read-only selects. No RLS rows exposed that aren't safe to read.\n\n**Deployment:** nginx at `cockpit.bezeliq.ai` serves the single HTML file. No server-side logic.\n\n---"
        },
        {
          "title": "Navigation",
          "level": 2,
          "body": "Hash-based routing. Two states, no page reload:\n\n| Hash | View |\n|---|---|\n| `#/` | Projects list (default) |\n| `#/projects/0.0.XXXXX` | Project detail |\n\nBrowser back/forward works. Entering a project URL directly works (loads data then renders detail).\n\n---"
        },
        {
          "title": "Layout",
          "level": 2,
          "body": "Three columns, fixed height viewport:\n\n```\n┌─────────────────────────────────────────────────────┐\n│ NAV: RedKey · testnet · live indicator · clock      │\n├──────────────────────────────┬──────────────────────┤\n│                              │                      │\n│  MAIN (dynamic)              │  RIGHT (fixed)       │\n│                              │  Agents              │\n│  Projects list               │  Exec Inbox          │\n│    or                        │  CRM                 │\n│  Project detail              │                      │\n│                              │                      │\n└──────────────────────────────┴──────────────────────┘\n```\n\nRight panel is always visible regardless of navigation state. Main panel switches between the two views.\n\n---"
        },
        {
          "title": "Projects List View (`#/`)",
          "level": 2,
          "body": "Default view on load. Main panel shows all projects as clickable rows.\n\n**Each project row contains:**\n- Project name (bold, amber if active)\n- Status badge (active / on_hold / cancelled / complete)\n- Topic ID as HashScan link: `0.0.XXXXX ↗` (links to `https://hashscan.io/testnet/topic/0.0.XXXXX`)\n- Created date\n- Created by\n- Current stage name + brief activity summary (e.g. \"Build · Phase 1 active · quinn working\")\n- Chevron `›`\n\nClicking any row navigates to `#/projects/0.0.XXXXX`.\n\n---"
        },
        {
          "title": "Project Detail View (`#/projects/0.0.XXXXX`)",
          "level": 2,
          "body": "**Header:**\nBreadcrumb: `‹ Projects | [Project Name]` + status badge. Clicking `‹ Projects` navigates back to `#/`.\n\n**Stages section:**\n\nStages are the primary navigation layer. Rendered as an accordion list — one row per stage, ordered by sequence.\n\nEach stage row shows:\n- Status dot (green = complete, amber pulsing = active, hollow = pending)\n- Stage name + stage type\n- One-line summary: completion date if done, current activity if active, \"Not started\" if pending\n- Status badge\n- Expand chevron\n\n**Active stage is open by default.** Clicking a collapsed stage row opens it (and closes the currently open one).\n\nInside an open stage:\n\n1. **Phase cards** — displayed as a grid (up to 3 columns). Each card shows:\n   - Phase number + status label\n   - Phase name\n   - Progress bar (tasks complete / total)\n   - Task count\n   - Phase topic ID as HashScan link\n   - Clicking a card sets it as the selected phase\n\n2. **Task list** — shown below the phase cards for the selected phase (active phase selected by default). Shows ALL tasks regardless of status:\n\n| Indicator | Status | Content |\n|---|---|---|\n| `✓` green | complete | Task name (dimmed), agent, done badge |\n| `●` amber | working | Task name, agent action line below, working badge |\n| `○` hollow | pending | Task name (dimmed), `depends on: X` if applicable, pending badge |\n| `✕` red | blocked | Task name, block reason line below in red, blocked badge |\n\nEach task row includes task topic ID as HashScan link.\n\n---"
        },
        {
          "title": "Right Panel",
          "level": 2,
          "body": "Always visible. Three sections stacked vertically."
        },
        {
          "title": "Agents",
          "level": 3,
          "body": "All agents listed: claire, quinn, vikram, priya, mindy, luna, zara, arlo, engine.\n\n**Working agents** (green dot, glow pulse):\n```\n● quinn\n  HCS listener · dynamic entity topics\n```\n\n**Idle agents** (hollow dot, dimmed name):\n```\n○ priya\n```\n\n**Blocked agents** (red dot):\n```\n● engine\n  Blocked · missing task output\n```\n\nStatus dot colors:\n- Green `#34d399` with glow → `working`\n- Hollow (dark fill, dim border) → `idle`\n- Red `#ef4444` → `blocked`\n\nData source: `agent_state.status` + `agent_state.action`. Updates via Realtime subscription."
        },
        {
          "title": "Exec Inbox",
          "level": 3,
          "body": "Items from `agent_tasks` where `role = exec` and `status = assigned`. Each item shows:\n- Task topic ID\n- Task title (from `brief` field, first line)\n- **Approve** button (primary) — posts `task.complete` to the HCS post server at `http://87.99.154.64:3001/post-hcs-message`\n- **Review** button (secondary) — navigates to `#/projects/...` for the related project\n\nEmpty state: `0 pending` in a dashed border box."
        },
        {
          "title": "CRM",
          "level": 3,
          "body": "Single link: `Open Twenty ↗` → `http://87.99.154.64:3000`. Opens in new tab.\n\n---"
        },
        {
          "title": "Live Update Behaviour",
          "level": 2,
          "body": "On any Realtime event, only the affected component re-renders — not a full page refresh.\n\n| Table | Triggers re-render of |\n|---|---|\n| `agent_state` | Agent panel (dot + action line) |\n| `agent_tasks` | Task list rows within the open phase |\n| `projects` | Project list row + project detail header badge |\n| `stages` | Stage accordion row (status, summary line) |\n| `phases` | Phase card (progress bar, task count) |\n\nThe live indicator dot in the nav bar reflects websocket connection state: amber pulse = connected, dim = disconnected.\n\n---"
        },
        {
          "title": "HashScan Links",
          "level": 2,
          "body": "All topic ID links point to the Hedera testnet mirror:\n```\nhttps://hashscan.io/testnet/topic/0.0.XXXXX\n```\n\nOpen in a new tab. Applied to: project topic IDs in the list, phase topic IDs in phase cards, task topic IDs in task rows.\n\n---"
        },
        {
          "title": "Out of Scope (This Build)",
          "level": 2,
          "body": "- Role queue depth display (can add later — needs a queue depth query)\n- Task detail modal / side panel\n- CRM pipeline view (link-out to Twenty only for now)\n- Auth / login gate\n- Mobile layout\n- Dark/light theme toggle\n\n---"
        },
        {
          "title": "Data Queries",
          "level": 2,
          "body": "**Projects list:**\n```sql\nSELECT id, client_id, title, status, active_stage_id, created_by, created_at\nFROM projects\nORDER BY created_at DESC\n```\n\n**Stages for a project:**\n```sql\nSELECT id, project_id, stage_type, title, status, current_step, created_at\nFROM stages\nWHERE project_id = $1\nORDER BY created_at ASC\n```\n\n**Phases for a stage:**\n```sql\nSELECT id, stage_id, name, status, depends_on, created_at\nFROM phases\nWHERE stage_id = $1\nORDER BY created_at ASC\n```\n\n**Tasks for a phase (all statuses):**\n```sql\nSELECT id, phase_id, role, agent, status, brief, depends_on, output_ref, cost_usd, duration_seconds, created_at, updated_at\nFROM agent_tasks\nWHERE phase_id = $1\nORDER BY created_at ASC\n```\n\n**Agent state (all agents):**\n```sql\nSELECT agent, status, task_id, action, updated_at\nFROM agent_state\nORDER BY agent ASC\n```\n\n**Exec inbox:**\n```sql\nSELECT id, brief, created_at\nFROM agent_tasks\nWHERE role = 'exec' AND status = 'assigned'\nORDER BY created_at ASC\n```"
        }
      ],
      "html_path": "artifacts/2026-04-25-cockpit-design-ea42b1624f.html",
      "json_path": "artifacts/2026-04-25-cockpit-design-ea42b1624f.json"
    },
    {
      "id": "2026-04-24-bezeliq-mainnet-identity-82b17eb708",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/superpowers/specs/2026-04-24-bezeliq-mainnet-identity.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.767Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "BezelIQ Mainnet Identity + Journey Documentation",
      "summary": "BezelIQ Mainnet Identity + Journey Documentation Date: 2026 04 24 Status: Approved Author: Justin King + Atlas What We're Building BezelIQ's permanent, immutable founding record on Hedera mainnet. An account, a public identity, and a living on chain archive — history already written, roadmap publicly committed, easter eggs embedded for those who look. The we...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "BezelIQ Mainnet Identity + Journey Documentation",
          "level": 1,
          "body": "**Date:** 2026-04-24  \n**Status:** Approved  \n**Author:** Justin King + Atlas\n\n---"
        },
        {
          "title": "What We're Building",
          "level": 2,
          "body": "BezelIQ's permanent, immutable founding record on Hedera mainnet. An account, a public identity, and a living on-chain archive — history already written, roadmap publicly committed, easter eggs embedded for those who look. The website is the surface. The chain is the truth.\n\nThe company's own agents stage every message. The infrastructure that BezelIQ is building documents BezelIQ being built.\n\nThe journal has multiple voices. Justin posts as the founder. Atlas posts as the platform architect — reflections on decisions, patterns noticed, architecture rationale. Quinn posts when code ships. Claire posts when a workflow completes. Priya posts when a spec lands. Every agent contribution is attributed on-chain. When visitors read the history, they're reading a conversation between a human founder and the agents he built.\n\n---"
        },
        {
          "title": "1. BezelIQ Mainnet Account",
          "level": 3,
          "body": "A dedicated Hedera mainnet account for the BezelIQ entity — separate from Justin's personal account.\n\n| Field | Value |\n|---|---|\n| Key type | ED25519 — single signer (Justin) to start |\n| Memo | `\"The intent survives the break. —BZQ-001\"` |\n| Initial funding | 10 HBAR (from Justin's personal account) |\n| Env var — ID | `BEZELIQ_OPERATOR_ID` |\n| Env var — Key | `BEZELIQ_OPERATOR_KEY` |\n\nAdding owners later: `AccountUpdateTransaction` signed by the current key converts to a threshold key (e.g. 2-of-3). The account ID never changes.\n\nThe memo is the first easter egg. It reads as a cryptic statement about resilience. Those who understand what BezelIQ builds will eventually understand it exactly.\n\n---"
        },
        {
          "title": "2. HCS-11 Identity Topic — `bezeliq.identity`",
          "level": 3,
          "body": "A mainnet HCS topic following the HCS-11 entity profile standard. This makes BezelIQ discoverable natively in HashScan and Hedera ecosystem tooling.\n\n**First message — profile document:**\n\n```json\n{\n  \"version\": \"1.0\",\n  \"type\": \"organization\",\n  \"display_name\": \"BezelIQ\",\n  \"alias\": \"bezeliq\",\n  \"bio\": \"We fix what breaks.\",\n  \"website\": \"https://bezeliq.ai\",\n  \"socials\": {},\n  \"founded\": \"2026-04-24\",\n  \"properties\": {\n    \"network\": \"mainnet\",\n    \"clue\": \"aGlzdG9yeSBpcyBhbHJlYWR5IHdyaXR0ZW4uIFRvcGljOiAwLjAuW0hJU1RPUllfVE9QSUNfSURd\"\n  }\n}\n```\n\nThe `clue` field is Base64. When decoded it reads: *\"history is already written. Topic: 0.0.[HISTORY_TOPIC_ID]\"* — the actual mainnet topic ID for `bezeliq.history` is embedded directly in the encoded string. `setup-bezeliq.js` generates this value after the history topic is created, so the real clue encodes the real ID. Anyone who decodes it lands directly on the history topic in HashScan.\n\nThe identity topic ID is embedded in the bezeliq.ai HTML source as a comment — the primary door for anyone who looks.\n\n---"
        },
        {
          "title": "3. History Topic — `bezeliq.history`",
          "level": 3,
          "body": "The immutable founding archive. Every milestone, decision, and achievement posted here in sequence. Cannot be deleted or altered.\n\n**Message schema:**\n\n```json\n{\n  \"version\": \"1.0\",\n  \"type\": \"milestone\",\n  \"visibility\": \"public | clue | treasure | sealed\",\n  \"author\": \"justin | atlas | quinn | claire | priya | vikram | engine\",\n  \"author_type\": \"human | agent\",\n  \"title\": \"...\",\n  \"description\": \"...\",\n  \"date\": \"ISO8601\",\n  \"tags\": [\"founding\", \"product\", \"team\", \"infrastructure\"],\n  \"clue\": null,\n  \"ts\": \"ISO8601\"\n}\n```\n\nThe `author` and `author_type` fields are permanent on-chain record of who — human or agent — made this contribution. The website can filter or label by author. A milestone from Quinn looks different from one from Justin. Both are real.\n\n**Visibility rules:**\n- `public` — rendered on bezeliq.ai website, full display\n- `clue` — encoded content (Base64, acrostic, steganographic) — exists on-chain, not rendered by website\n- `treasure` — contains puzzle + reward account ID — not rendered\n- `sealed` — plaintext but prefixed `[SEALED — opens YYYY-MM-DD]` — time-locked commitments, rendered as locked on website\n\n**First message — The Founding Block:**\n\n```json\n{\n  \"version\": \"1.0\",\n  \"type\": \"milestone\",\n  \"visibility\": \"public\",\n  \"author\": \"justin\",\n  \"author_type\": \"human\",\n  \"title\": \"Day One\",\n  \"description\": \"BezelIQ was founded on the belief that execution should never fail. When an API breaks, the intent shouldn't. We built the layer that makes that true — on Hedera, in public, before anyone knew our name.\",\n  \"date\": \"2026-04-24\",\n  \"tags\": [\"founding\"],\n  \"clue\": null,\n  \"ts\": \"2026-04-24T...\"\n}\n```\n\nThis is BezelIQ's genesis block. Posted before the website exists. Timestamped, immutable, verifiable.\n\n---"
        },
        {
          "title": "4. Roadmap Topic — `bezeliq.roadmap`",
          "level": 3,
          "body": "A living roadmap. Items are posted as HCS messages. Updates use a `supersedes` field — you cannot edit on-chain, so a new message supersedes the old one. The website applies the supersede chain to render current state.\n\n**Message schema:**\n\n```json\n{\n  \"version\": \"1.0\",\n  \"type\": \"roadmap_item\",\n  \"visibility\": \"public | sealed\",\n  \"id\": \"uuid — stable across supersede chain\",\n  \"title\": \"...\",\n  \"description\": \"...\",\n  \"status\": \"planned | in_progress | completed | cancelled\",\n  \"target_quarter\": \"Q2-2026\",\n  \"supersedes\": null,\n  \"ts\": \"ISO8601\"\n}\n```\n\n**Supersede pattern:** Post a new message with `\"supersedes\": <prior_sequence_number>`. Website reads all messages, builds a map of `id → latest non-superseded message`, renders current state.\n\n**Sealed roadmap items** are commitments made publicly but locked until the target date. When the milestone is hit, a `public` superseding message unlocks it. The original sealed timestamp proves the commitment existed before the outcome.\n\n---"
        },
        {
          "title": "5. Treasure Accounts",
          "level": 3,
          "body": "Three funded mainnet accounts. Each is a reward for solving a puzzle embedded in `treasure`-visibility HCS messages.\n\n**Structure:**\n\n| Account | Funding | Puzzle location | Mechanism |\n|---|---|---|---|\n| Treasure #1 | 1 HBAR | Early `bezeliq.history` message, `visibility: \"treasure\"` | SHA256(answer to Riddle 1) = private key |\n| Treasure #2 | 2 HBAR | Later `bezeliq.history` message, `visibility: \"treasure\"` | Decode acrostic in description, SHA256 |\n| Treasure #3 | 5 HBAR | Unlocked only after #1 + #2 are claimed | Answer derived from combining #1 and #2 solutions |\n\n`create-treasure.js` records the exact sequence number of each clue message after posting — stored in `redkey.yaml` under `bezeliq.treasures` so we can reference them. Puzzle design (riddles, acrostics) is authored separately and passed as arguments to the script.\n\nThe private key for each treasure account is the SHA256 hash of the correct answer — 32 bytes, valid as an ED25519 private key. First person to crack the puzzle imports the key and sweeps the account.\n\n---"
        },
        {
          "title": "6. bezeliq.ai Website",
          "level": 3,
          "body": "A single-page site. Minimal, intentional, cryptic enough to be interesting.\n\n**What it shows:**\n- Company name: BezelIQ (or Bezel)\n- One paragraph: the public mission statement (visible)\n- A timeline/list of `public` and `sealed` history milestones, pulled live from `bezeliq.history` via Hedera mirror node REST API\n- A roadmap section pulling `public` items from `bezeliq.roadmap`\n- Sealed items shown as locked — date visible, content hidden\n\n**What the HTML source contains:**\n\n```html\n<!-- \n  Founding record: 0.0.XXXXXXX\n  If you're reading this, you know how to look.\n-->\n```\n\nThat topic ID is `bezeliq.identity`. The clue chain begins there.\n\n**Data source:**\n\nNo backend needed initially. Direct mirror node REST calls:\n\n```\nGET https://mainnet-public.mirrornode.hedera.com/api/v1/topics/{topicId}/messages\n```\n\nFilter client-side by `visibility === \"public\"`. Sealed items decoded from Base64 and rendered as locked.\n\n---"
        },
        {
          "title": "7. Multi-Author Journey — Agents + Humans",
          "level": 3,
          "body": "The `bezeliq.history` topic is a conversation, not a log. Every contributor posts in their own voice with their own author tag. The website surfaces who said what.\n\n**Contributors:**\n\n| Author | Type | Posts when |\n|---|---|---|\n| `justin` | human | Founding moments, company decisions, personal reflections |\n| `atlas` | agent | Architecture decisions, patterns noticed, platform reflections |\n| `quinn` | agent | Code shipped, PRs merged, technical achievements |\n| `priya` | agent | Specs written, requirements landed, planning milestones |\n| `claire` | agent | Workflows completed, projects routed and closed |\n| `vikram` | agent | Architecture reviewed, PRs approved, quality gates passed |\n| `engine` | agent | Workflow completions — the state machine marking things done |\n\n**Workflow integration:**\n\nA lightweight `bezeliq_milestone` workflow template with one step: post a `milestone` message to `bezeliq.history`. Engine appends this as a terminal step on significant project workflows — the agent who did the work is the author.\n\nAtlas posts independently via `/log` — mid-session insights, architecture rationale, decisions worth preserving. These are Atlas's own voice, not tied to a workflow.\n\nJustin posts via `scripts/mainnet/post-milestone.js` — the founder's thread through the story.\n\n**What gets documented:**\n- Platform milestones (first agent live, first workflow completed, Phase 3 entity model)\n- Product milestones (first client, first integration healed)\n- Company milestones (founding, team additions, funding)\n- Agent reflections (Atlas on architecture, Quinn on a hard problem solved)\n- Justin's founder journal entries\n\nThe result: by launch day, months of real history already live on-chain — written by humans and agents together, timestamped, immutable, verifiable. The press release writes itself: \"we built in public on Hedera before anyone knew our name — and our agents wrote most of it.\"\n\n---"
        },
        {
          "title": "Scripts",
          "level": 2,
          "body": "| Script | Purpose |\n|---|---|\n| `scripts/mainnet/setup-bezeliq.js` | Creates account, funds from personal, creates 3 topics, posts HCS-11 profile + founding block |\n| `scripts/mainnet/post-milestone.js` | Posts a milestone to bezeliq.history (args: title, description, visibility, tags) |\n| `scripts/mainnet/post-roadmap-item.js` | Posts or supersedes a roadmap item on bezeliq.roadmap |\n| `scripts/mainnet/create-treasure.js` | Creates a funded treasure account and embeds the clue in a treasure message |\n| `scripts/mainnet/fund-account.js` | Transfers HBAR from personal account to BezelIQ account |\n\nAll scripts read from `BEZELIQ_OPERATOR_ID` + `BEZELIQ_OPERATOR_KEY` env vars (mainnet).  \n`setup-bezeliq.js` reads `HEDERA_OPERATOR_ID` + `HEDERA_OPERATOR_KEY` (Justin's personal account) for the initial funding transfer only.\n\n---"
        },
        {
          "title": "Mainnet Configuration",
          "level": 2,
          "body": "New section added to `redkey.yaml`:\n\n```yaml\nbezeliq:\n  network: mainnet\n  operator_id_env: BEZELIQ_OPERATOR_ID\n  operator_key_env: BEZELIQ_OPERATOR_KEY\n  topics:\n    identity: \"0.0.TBD — set after setup-bezeliq runs\"\n    history: \"0.0.TBD\"\n    roadmap: \"0.0.TBD\"\n  website: https://bezeliq.ai\n  mirror_node: https://mainnet-public.mirrornode.hedera.com\n```\n\n---"
        },
        {
          "title": "Easter Egg Map",
          "level": 2,
          "body": "| Egg | Location | What it reveals |\n|---|---|---|\n| Account memo | BezelIQ mainnet account | First cryptic signal — \"The intent survives the break.\" |\n| HTML comment | bezeliq.ai source | Identity topic ID + \"if you're reading this, you know how to look\" |\n| `clue` in HCS-11 profile | `bezeliq.identity` seq 1 | Base64 → \"history is already written.\" — points to history topic |\n| Treasure #1 clue | `bezeliq.history` seq 3 | First puzzle |\n| Acrostic | `bezeliq.history` seq 7 | First letters of each sentence spell a word |\n| Treasure #2 clue | `bezeliq.history` seq 7 | Second puzzle |\n| Clue chain terminus | Requires solving Treasure #1 + #2 | Leads to Treasure #3 (5 HBAR) |\n| Sealed commitments | `bezeliq.roadmap` | Time-locked predictions — unlock when milestones hit |\n\n---"
        },
        {
          "title": "Success Criteria",
          "level": 2,
          "body": "- [ ] BezelIQ mainnet account exists, funded, memo set\n- [ ] `bezeliq.identity` topic live on mainnet, HCS-11 profile posted\n- [ ] `bezeliq.history` topic live, Founding Block posted\n- [ ] `bezeliq.roadmap` topic live, first 3 roadmap items posted (2 sealed, 1 public)\n- [ ] 3 treasure accounts funded, puzzles embedded in history messages\n- [ ] bezeliq.ai renders history + roadmap from mirror node\n- [ ] HTML source contains identity topic comment\n- [ ] Topic IDs recorded in `redkey.yaml` + Supabase `topics` table"
        }
      ],
      "html_path": "artifacts/2026-04-24-bezeliq-mainnet-identity-82b17eb708.html",
      "json_path": "artifacts/2026-04-24-bezeliq-mainnet-identity-82b17eb708.json"
    },
    {
      "id": "iris-scratch-4d45b45f67",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/iris-scratch.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.765Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Iris — Governance Scratch Pad",
      "summary": "Iris — Governance Scratch Pad Agent: iris Topic: 0.0.8718898 Status: defined, not yet implemented Living doc. Log observed failure modes, design notes, and governance scenarios here before formal spec work begins. Failure Modes Observed in Production 1. Zombie Task (observed 2026 04 24) What happened: Quinn claimed task fa1fc353 on roles.developer. Claude se...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Iris — Governance Scratch Pad",
          "level": 1,
          "body": "Agent: `iris` | Topic: `0.0.8718898` | Status: defined, not yet implemented\n\nLiving doc. Log observed failure modes, design notes, and governance scenarios here before formal spec work begins.\n\n---"
        },
        {
          "title": "1. Zombie Task (observed 2026-04-24)",
          "level": 3,
          "body": "**What happened:** Quinn claimed task `fa1fc353` on `roles.developer`. Claude session exited with code 1 (crash/max_turns) after ~1 minute. Runner only posts `task.complete` on exit code 0 — on failure, nothing is posted. Task remained permanently stuck: `task.claim` on HCS, no `task.complete` or `task.blocked` ever follows.\n\n**Effect:** Task is unclaimed from anyone else's perspective. Agent can't re-claim it (it's in the completed set). Humans have no visibility without digging through logs.\n\n**Root causes:**\n- Runner doesn't post `task.blocked` on non-zero exit (runner-level fix: patch `base.py`)\n- No external sweep detects \"claimed but unresolved past timeout\"\n\n**Iris's role:** Sweep role topics periodically. For any `task.claim` with no subsequent `task.complete` or `task.blocked` past a timeout (e.g., 30 minutes), post `task.blocked` with reason `\"governance: claim timeout — no completion observed\"` and escalate to `roles.exec`.\n\n---"
        },
        {
          "title": "2. Stale Task Pollution (observed 2026-04-24)",
          "level": 3,
          "body": "**What happened:** Cancelled workflows leave `task.available` messages on role topics. Agents keep claiming them, burning cycles, hitting max_turns, looping forever.\n\n**Effect:** Agents waste resources on tasks that will never produce useful output.\n\n**Iris's role:** On workflow cancellation, sweep role topics for `task.available` messages from that `workflow_instance_id` with no subsequent claim or blocked status. Post `task.blocked` with reason `\"governance: parent workflow cancelled\"`.\n\n---"
        },
        {
          "title": "3. Claim Loop (observed 2026-04-24)",
          "level": 3,
          "body": "**What happened:** Agent hits max_turns, exits without posting `task.complete` or `task.blocked`. Runner restarts, re-claims the same task (winner-is-me verify_claim logic), runs again, hits max_turns again. Infinite loop.\n\n**Effect:** Burning API spend and HBAR with no progress.\n\n**Iris's role:** Detect same `task_id` claimed 3+ times by the same agent with no completion between claims. Post `task.blocked`, escalate to `roles.exec`: \"Agent X has claimed task Y 3 times without completing.\"\n\n---"
        },
        {
          "title": "4. Agent Stuck in Working Status",
          "level": 3,
          "body": "**What:** Agent posts `working` status to `agents.<id>` but never transitions to `idle` or `complete` past the expected duration for the task type.\n\n**Iris's role:** Monitor `agent_state` for agents stuck in `working` past threshold. Alert to `roles.exec`.\n\n---"
        },
        {
          "title": "Design Principles",
          "level": 2,
          "body": "- Iris never does work herself — she detects, blocks, and escalates\n- All Iris actions originate on HCS (`task.blocked`, escalation messages to `roles.exec`) — full audit trail\n- Iris should be idempotent: posting `task.blocked` for an already-blocked task is a no-op\n- Timeout thresholds should be configurable per role/task type (architect tasks take longer than BA tasks)\n- Escalations to `roles.exec` should include: task_id, agent, how long stuck, what was last observed"
        },
        {
          "title": "Suggested Timeout Thresholds (draft)",
          "level": 2,
          "body": "| Role | Expected max duration | Iris timeout |\n|---|---|---|\n| `roles.developer` | 20 min | 45 min |\n| `roles.architect` | 15 min | 30 min |\n| `roles.ba` | 10 min | 20 min |\n| `roles.coordinator` | 5 min | 15 min |\n| `roles.exec` | no timeout | no timeout |"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Does Iris run on a fixed cron (e.g., every 5 min) or event-driven?\n- Should Iris post directly to role topics or only to `roles.exec`?\n- How does Iris know a workflow was cancelled? Reads `workflow_instances.status` from Supabase?\n- Should Iris have her own HCS topic for governance events, or use `agents.iris`?"
        }
      ],
      "html_path": "artifacts/iris-scratch-4d45b45f67.html",
      "json_path": "artifacts/iris-scratch-4d45b45f67.json"
    },
    {
      "id": "05-unified-shell-ops-marketing-spec-c9f2c887af",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/phases/05-unified-shell-ops-marketing-spec.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.764Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "05 Unified Shell Ops Marketing Spec",
      "summary": "version: string, project_id: string, updated_at: string, phase: object, features: object, cross_feature_constraints: object, open_questions: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- OQ-5.1: id: string, question: string\n- OQ-5.2: id: string, question: string"
        }
      ],
      "html_path": "artifacts/05-unified-shell-ops-marketing-spec-c9f2c887af.html",
      "json_path": "artifacts/05-unified-shell-ops-marketing-spec-c9f2c887af.json"
    },
    {
      "id": "04-build-view-exec-gate-spec-dcb0f0a669",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/phases/04-build-view-exec-gate-spec.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.762Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "04 Build View Exec Gate Spec",
      "summary": "version: string, project_id: string, phase: object, features: object, cross_feature_constraints: object, open_questions: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "artifacts/04-build-view-exec-gate-spec-dcb0f0a669.html",
      "json_path": "artifacts/04-build-view-exec-gate-spec-dcb0f0a669.json"
    },
    {
      "id": "03-artifact-views-spec-f639fcc6c1",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/phases/03-artifact-views-spec.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.760Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "03 Artifact Views Spec",
      "summary": "version: string, project_id: string, phase: object, features: object, cross_feature_constraints: object, open_questions: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "artifacts/03-artifact-views-spec-f639fcc6c1.html",
      "json_path": "artifacts/03-artifact-views-spec-f639fcc6c1.json"
    },
    {
      "id": "02-dev-studio-list-intake-spec-de0b7e51f1",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/phases/02-dev-studio-list-intake-spec.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.757Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "02 Dev Studio List Intake Spec",
      "summary": "version: string, project_id: string, phase: object, features: object, cross_feature_constraints: object, open_questions: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "artifacts/02-dev-studio-list-intake-spec-de0b7e51f1.html",
      "json_path": "artifacts/02-dev-studio-list-intake-spec-de0b7e51f1.json"
    },
    {
      "id": "01-foundation-spec-c2ec383256",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/phases/01-foundation-spec.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.755Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "01 Foundation Spec",
      "summary": "version: string, project_id: string, phase: object, features: object, cross_feature_constraints: object, open_questions: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Open Questions",
          "level": 2,
          "body": ""
        }
      ],
      "html_path": "artifacts/01-foundation-spec-c2ec383256.html",
      "json_path": "artifacts/01-foundation-spec-c2ec383256.json"
    },
    {
      "id": "policy-cc512f6547",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/POLICY.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.754Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "POLICY",
      "summary": "version: string, project_id: string, updated_at: string, rules: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Top-Level Shape",
          "level": 2,
          "body": "- version: 1\n- project id: bezeliq-studio\n- updated at: 2026-04-28\n- rules: 13 items"
        }
      ],
      "html_path": "artifacts/policy-cc512f6547.html",
      "json_path": "artifacts/policy-cc512f6547.json"
    },
    {
      "id": "intent-bff5c211f8",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/INTENT.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.752Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "BezelIQ Studio",
      "summary": "There is no unified interface for producing and reviewing SDD artifacts before build begins. Agents currently produce prose instead of machine-readable contracts, briefs are lossy Priya interpretations rather than mechanically extracted from upstream documents, and there is no place where Justin can take a project from idea to build-ready with confidence that dev agents have everything they need. The gap between intent and execution is invisible until Quinn builds the wrong thing. The cockpit ex",
      "format_source": "json",
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "There is no unified interface for producing and reviewing SDD artifacts before build begins. Agents currently produce prose instead of machine-readable contracts, briefs are lossy Priya interpretations rather than mechanically extracted from upstream documents, and there is no place where Justin can take a project from idea to build-ready with confidence that dev agents have everything they need. The gap between intent and execution is invisible until Quinn builds the wrong thing. The cockpit exists as a monitoring tool but there is no design and planning workspace."
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Justin can take any project from intake through artifact approval — producing complete machine-readable SDD artifacts (INTENT.json, BLUEPRINT.json, SPEC.json, POLICY.json) via a structured Studio interface — and advance to Build knowing dev agents have zero guesswork."
        }
      ],
      "html_path": "artifacts/intent-bff5c211f8.html",
      "json_path": "artifacts/intent-bff5c211f8.json"
    },
    {
      "id": "blueprint-b37e4535d2",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/bezeliq-studio/BLUEPRINT.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.751Z",
      "artifact_type": "json_artifact",
      "schema_version": "json_artifact.generated.v1",
      "title": "BLUEPRINT",
      "summary": "version: string, project_id: string, updated_at: string, stack: object, schema: object, api: object, routing: object, services: object",
      "format_source": "json",
      "sections": [
        {
          "title": "Top-Level Shape",
          "level": 2,
          "body": "- version: 1\n- project id: bezeliq-studio\n- updated at: 2026-04-28\n- stack: frontend: string, backend: string, database: string, hosting: string, external_services: object\n- schema: notes: string, tables: object\n- api: base_url: string, auth: string, notes: string, endpoints: object\n- routing: notes: string, routes: object\n- services: dependencies: object, env_vars: object"
        }
      ],
      "html_path": "artifacts/blueprint-b37e4535d2.html",
      "json_path": "artifacts/blueprint-b37e4535d2.json"
    },
    {
      "id": "agent-design-standard-0745043fad",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/agent-design-standard.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.749Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Agent Design Standard",
      "summary": "Agent Design Standard Version: 2.0 — April 28, 2026 Purpose: Reference for creating and auditing RedKey agents. All new agents must use Agent Card format. Prose personas are legacy — do not create new ones. Reference implementation: definitions/cards/quinn.json — the canonical reference Card. The Format: Agent Card (card version 1.0) Every new agent is defin...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Agent Design Standard",
          "level": 1,
          "body": "**Version:** 2.0 — April 28, 2026\n**Purpose:** Reference for creating and auditing RedKey agents. All new agents must use Agent Card format. Prose personas are legacy — do not create new ones.\n\n**Reference implementation:** `definitions/cards/quinn.json` — the canonical reference Card.\n\n---"
        },
        {
          "title": "The Format: Agent Card (card_version 1.0)",
          "level": 2,
          "body": "Every new agent is defined as an Agent Card JSON file in `definitions/cards/<slug>.json` and synced to Supabase via `scripts/sync-agent-cards.js`.\n\nThe Card replaces the prose `persona` field. Prose personas are supported for backwards compatibility but must not be created for new agents."
        },
        {
          "title": "Required fields checklist",
          "level": 3,
          "body": "| Field | Required | Rule |\n|---|---|---|\n| `card_version` | Yes | Must be `\"1.0\"` |\n| `identity.slug` | Yes | Matches the agent's slug in `agent_definitions` |\n| `identity.name` | Yes | Display name |\n| `identity.department` | Yes | dev / ops / marketing / sales / platform |\n| `identity.reports_to` | Yes | Agent slug or `\"human\"` |\n| `identity.model` | Yes | Exact model ID |\n| `scope` | Yes | One sentence. What the agent owns AND what it doesn't. |\n| `capabilities` | Yes | What the agent can do — one phrase per item |\n| `constraints` | Yes | \"I never X\" format — declarative, not advisory. Min 3. |\n| `escalation_rules` | Yes | At least one rule. Must reference real role slugs. |\n| `output_types` | Yes | References Wire output contract slugs |\n| `working_style` | Yes | 3 sentences max. How the agent approaches work. |\n| `voice.description` | Yes | 1-2 sentences on communication style |\n| `voice.example` | Yes | One concrete example of agent output |\n| `values` | Yes | What the agent optimises for |"
        },
        {
          "title": "The 9 questions (now answered by Card fields)",
          "level": 3,
          "body": "Every Card must implicitly answer these:\n\n| Question | Card field |\n|---|---|\n| Who are you? | `identity` + `scope` |\n| Where do you run? | `platform-env` shared skill (injected automatically — do not repeat in Card) |\n| What's your first move? | `working_style` first sentence |\n| What do you do? | `capabilities` |\n| How do you know you're done? | `output_types` + escalation_rules |\n| When do you stop and ask for help? | `escalation_rules` |\n| What do you hand off? | `output_types` |\n| What do you never do? | `constraints` |\n| Who gets problems? | `escalation_rules[].route_to` |"
        },
        {
          "title": "Constraints format rule",
          "level": 3,
          "body": "Write \"I never X\" not \"avoid X\" or \"try not to X\". Declarative prohibitions hold more reliably than advisory prose.\n\n**Wrong:** \"You should avoid committing directly to main\"\n**Right:** \"I never commit directly to main or marketplace\""
        },
        {
          "title": "Escalation rules format rule",
          "level": 3,
          "body": "Every escalation rule must reference a real, currently-deployed role slug or agent slug. Check `scripts/lib/dispatch.js` ROLE_TOPIC_IDS for valid role slugs.\n\n---"
        },
        {
          "title": "Procedure content belongs in Skills",
          "level": 2,
          "body": "Agent-specific execution procedures (step-by-step flows) live in `capabilities/skills/<agent>-<protocol>.md`, not in the Card. The Card is an identity document — not a manual.\n\n| Content type | Location |\n|---|---|\n| Who I am, constraints, voice | Agent Card (`definitions/cards/<slug>.json`) |\n| Step-by-step execution procedures | Agent-specific skill (`capabilities/skills/<slug>-protocol.md`) |\n| VPS environment | `capabilities/skills/platform-env.md` (shared, auto-injected) |\n| Inbox read/write protocol | `capabilities/skills/inbox-protocol.md` (shared, auto-injected) |\n| Done/blocked criteria | `output_contract` in Wire Brief |\n\nBoth `platform-env` and `inbox-protocol` are injected for all agents — do not repeat their content in any Card or skill.\n\n---"
        },
        {
          "title": "Wire Protocol: what agents produce and consume",
          "level": 2,
          "body": "All A2A messages are Wire messages. See `definitions/wire/` for schemas.\n\n| Message | Producer | Consumer |\n|---|---|---|\n| Wire Brief | `dispatch.js` | `runner.py` → agent system prompt |\n| Wire Inbox | `hedera-listener.py`, `hcs-post-server.js` | `runner.py` → agent inbox section |\n| Wire Complete | `runner.py` | `hedera-listener.py`, Mindy |\n| Wire Blocked | `runner.py` | `hedera-listener.py`, Iris (blocker_type routing), Mindy |\n| Wire Claim | `runner.py` | `hedera-listener.py` |\n\n**Rule:** agent output fields (summary, reason) are the only prose in a Wire message. All other fields are typed.\n\n---"
        },
        {
          "title": "Adding a new agent — checklist",
          "level": 2,
          "body": "- [ ] Write `definitions/cards/<slug>.json` using `definitions/cards/TEMPLATE.json`\n- [ ] Add agent to `definitions/agents/<slug>.json` (slug, name, department, model, schedule_seconds, roles, skills, plugins)\n- [ ] Add role entry to `scripts/lib/dispatch.js` ROLE_TOPIC_IDS if adding a new role\n- [ ] Run `node --env-file=.env scripts/sync-agent-cards.js --slug <slug>`\n- [ ] Create a systemd unit file on VPS if the agent runs as a daemon\n- [ ] Verify runner picks up the Card: check `journalctl -u redkey-<slug>` for \"assembling prompt from Card\""
        }
      ],
      "html_path": "artifacts/agent-design-standard-0745043fad.html",
      "json_path": "artifacts/agent-design-standard-0745043fad.json"
    },
    {
      "id": "2026-05-08-redkey-team-os-design-6291290228",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-08-redkey-team-os-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.748Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "RedKey Team OS Design",
      "summary": "RedKey Team OS Design Date: 2026 05 08 Status: Draft Owner: Justin / Atlas Codex Scope: RedKey platform operating model, shared context system, and agent harness standards Summary RedKey already has most of the architecture described by the Team OS pattern: shared project context, durable memory, agent readable routing, restart state, structured artifacts, a...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "RedKey Team OS Design",
          "level": 1,
          "body": "Date: 2026-05-08  \nStatus: Draft  \nOwner: Justin / Atlas-Codex  \nScope: RedKey platform operating model, shared context system, and agent harness standards"
        },
        {
          "title": "Summary",
          "level": 2,
          "body": "RedKey already has most of the architecture described by the Team OS pattern: shared project context, durable memory, agent-readable routing, restart state, structured artifacts, and execution infrastructure. The gap is not capability. The gap is packaging and enforcement.\n\nToday, Atlas-Codex can reconstruct project state from `project-refs.yaml`, `docs/state.md`, repo docs, Studio artifacts, Supabase `agent_memory`, and live project repos. That is more powerful than a simple shared Markdown Team OS, but it is harder for a new human or agent to understand.\n\nThis design adds a thin Team OS facade over the existing RedKey system: a clear entrypoint, context map, contribution workflow, retrieval discipline, and a path toward mechanical harness enforcement. The goal is to make RedKey feel as simple as \"open the repo, ask, get the answer\" without weakening the deeper Studio, Supabase, HCS, and agent runtime architecture underneath."
        },
        {
          "title": "Background",
          "level": 2,
          "body": "The Team OS article argues that most team knowledge already exists, but is inaccessible to both humans and agents because it is buried in Slack threads, personal notes, private setups, or tools nobody can search. The proposed solution is a shared context repo where every team function checks in relevant context and anyone can query it in natural language.\n\nThe useful pattern is not Claude Code-specific. The core claim is:\n\n- Context must be shared, not personal.\n- Context must be discoverable by agents.\n- Decisions, customer context, implementation notes, and reusable queries should be captured close to the work.\n- The system should reduce dependence on one person being online to answer historical context questions.\n\nRedKey already follows this direction, but with a more advanced architecture:\n\n- `project-refs.yaml` routes projects, clients, repos, Studio IDs, VPS paths, and status.\n- `docs/state.md` gives the restart pointer for the current working set.\n- Supabase `agent_memory` stores durable semantic memory.\n- Studio artifacts store canonical product/project planning artifacts.\n- Repo docs store RedKey platform specs, plans, setup docs, and playbooks.\n- Bezel API and related services provide actual workflow execution, task claims, event reads, and HCS proof paths.\n\nThe remaining design problem is making this system legible and usable as a Team OS."
        },
        {
          "title": "Harness Engineering Comparison",
          "level": 2,
          "body": "OpenAI's harness engineering pattern adds a sharper lesson: shared context is necessary, but not sufficient. Agent-first engineering works when the repository becomes both the system of record and the enforceable harness agents operate inside.\n\nThe relevant harness principles are:\n\n- `AGENTS.md` should be a short table of contents, not a large instruction manual.\n- Repository docs should be structured, indexed, and treated as the system of record.\n- Plans, architecture notes, product specs, quality rules, generated references, and technical debt trackers should be versioned close to the code.\n- Agent legibility is the goal: if an agent cannot inspect context, tools, app state, logs, metrics, or traces, that information effectively does not exist during the run.\n- Architecture and taste should be encoded as mechanical checks: linters, structural tests, CI jobs, file-size limits, schema/naming conventions, and remediation instructions.\n- Agents should be able to run the app, reproduce bugs, inspect UI state, query logs/metrics/traces, validate fixes, review changes, and iterate without relying on humans to paste context.\n- Entropy needs recurring garbage collection: stale docs, weak patterns, inconsistent architecture, and accumulated technical debt should be scanned and repaired continuously.\n\nRedKey already follows the broad philosophy, but OpenAI is cleaner on mechanical enforcement. The next bar for RedKey is to turn the Team OS facade into the front door for a broader RedKey Harness: context, tools, checks, verification, and cleanup loops that make agent work legible and enforceable."
        },
        {
          "title": "Codex Agent Clarification",
          "level": 2,
          "body": "RedKey should be precise about the word \"agent.\"\n\nToday, RedKey has:\n\n- Atlas-Codex as an operating mode for Codex in this repo.\n- Local Codex skills and repo instructions.\n- RedKey/Bezel task and workflow infrastructure.\n- Historical and planned named RedKey agents such as Jess, Mia, Priya, Quinn, and others.\n- Agent-like project execution patterns driven through Codex sessions, Studio artifacts, and Bezel API concepts.\n\nRedKey does not yet have production OpenAI Agents SDK agents or Codex-native agents that run as durable application services. We should not imply otherwise.\n\nThe official OpenAI Agents SDK docs define SDK agents as code-built applications that can plan, call tools, collaborate across specialists, and keep enough state to complete multi-step work. The SDK path is the right fit when RedKey owns orchestration, tool execution, approvals, runtime behavior, storage, state, and product integration. Agent Builder is a separate hosted workflow path and should only be used if RedKey specifically wants OpenAI-hosted workflow creation, publishing, and ChatKit deployment.\n\nDesign implication: RedKey Team OS and Harness should prepare the substrate for future Codex/OpenAI SDK agents, but Phase 1 should describe current reality as \"agent-ready\" rather than \"agent-built.\""
        },
        {
          "title": "Goals",
          "level": 2,
          "body": "1. Give humans and agents one obvious starting point for RedKey context.\n2. Preserve current artifact routing: platform docs in the repo, client/product artifacts in Studio.\n3. Keep `docs/state.md` short as a restart pointer, not a memory archive.\n4. Make recurring context capture easy and consistent.\n5. Support natural language retrieval across project status, decisions, specs, implementation notes, and lessons.\n6. Keep the system portable enough that Codex, Claude Code, Cursor, or another agent can understand the context.\n7. Define the first RedKey Harness standards for agent-legible tooling, verification, doc health, and recurring cleanup.\n8. Move repeated review feedback and taste preferences into durable documentation or mechanical checks."
        },
        {
          "title": "Non-Goals",
          "level": 2,
          "body": "- Replace Supabase `agent_memory`.\n- Replace Studio artifacts with Markdown mirrors.\n- Move client/product canonical specs into repo docs.\n- Build a new full UI for Team OS in this phase.\n- Reorganize all existing docs before the entrypoint and workflows are proven.\n- Require every RedKey-adjacent project repo to adopt the full harness immediately.\n- Eliminate human judgment from product, architecture, release, or client decisions."
        },
        {
          "title": "Current State",
          "level": 2,
          "body": "RedKey has the core Team OS primitives, but they are distributed.\n\n| Capability | Current RedKey Mechanism | Status |\n| --- | --- | --- |\n| Project switchboard | `project-refs.yaml` | Strong |\n| Restart pointer | `docs/state.md` | Strong but growing long |\n| Durable memory | Supabase `agent_memory` via Doppler-backed scripts | Strong |\n| Platform specs/plans | `docs/specs`, `docs/plans`, `docs/setup`, `docs/playbooks` | Strong |\n| Product planning | Supabase `studio_projects` and `studio_artifacts` | Strong |\n| Agent operating profile | `.codex/atlas-codex/OPERATING.md`, `MODEL.md`, local skills | Strong |\n| Execution runtime | Bezel API, task claims, workflow events, HCS proofs | Strong |\n| OpenAI Agents SDK agents | Not yet built | Missing |\n| Durable Codex-native agent services | Not yet built | Missing |\n| Project-specific governance | B2BEA CSS/runtime audits, Bezel API smoke tests, PVA release gates | Medium |\n| Human onboarding | Scattered across files | Weak |\n| Team check-in ritual | Ad hoc memory/state updates | Weak |\n| Portable context map | Partial | Weak |\n| Doc freshness and cross-link checks | Mostly manual | Weak |\n| Recurring doc/tech-debt gardening | Ad hoc | Weak |\n| Standard per-repo app/log/metric/test harness | Project-specific | Weak |\n| Agent-to-agent review loop | Available, not default | Weak |"
        },
        {
          "title": "Design Principle",
          "level": 2,
          "body": "RedKey Team OS should be a facade, not a fork. RedKey Harness should be enforcement, not ceremony.\n\nThe repo should expose a simple context interface for humans and agents, while deeper sources of truth remain where they belong:\n\n- Repo docs for RedKey platform/runtime standards and playbooks.\n- Studio artifacts for Studio-managed client/product work.\n- Supabase `agent_memory` for durable semantic memory and lessons.\n- `docs/state.md` for the compact restart pointer.\n- Project repos for implementation source.\n\nThe Team OS layer should point to these sources, explain when to use each, and provide capture workflows.\n\nThe Harness layer should encode the rules that matter into checks and repeatable workflows. Documentation should explain the principle; tooling should enforce the invariant when drift would be costly."
        },
        {
          "title": "Proposed Information Architecture",
          "level": 2,
          "body": "Add a root entrypoint:\n\n```text\nTEAM_OS.md\n```\n\nAdd a small docs area:\n\n```text\ndocs/team-os/\n  00-start-here.md\n  context-routing.md\n  project-map.md\n  capture-workflows.md\n  weekly-checkins.md\n  decision-log.md\n  retrieval-guide.md\n  harness-standards.md\n```"
        },
        {
          "title": "TEAM_OS.md",
          "level": 3,
          "body": "Root-level orientation file for humans and agents.\n\nRequired content:\n\n- What RedKey Team OS is.\n- What this repo knows.\n- Where active project state lives.\n- Where to write different kinds of artifacts.\n- How to ask Atlas useful questions.\n- How to capture new context.\n- What not to store in Markdown."
        },
        {
          "title": "docs/team-os/00-start-here.md",
          "level": 3,
          "body": "The short onboarding path.\n\nShould answer:\n\n- What should a new agent read first?\n- What should a new human read first?\n- What is the difference between RedKey, Bezel, Studio, Atlas, and project repos?\n- What commands or files prove current state?"
        },
        {
          "title": "docs/team-os/context-routing.md",
          "level": 3,
          "body": "Canonical routing rules.\n\nThis should restate and expand the artifact routing contract:\n\n- RedKey platform/runtime work goes in repo docs.\n- Studio-managed product work goes in Studio artifacts.\n- Temporary exports go under `tmp/`.\n- Durable memories go to Supabase `agent_memory`.\n- Restart state goes to `docs/state.md`.\n- Secrets never go into docs or memory."
        },
        {
          "title": "docs/team-os/project-map.md",
          "level": 3,
          "body": "Human-readable companion to `project-refs.yaml`.\n\nThis should summarize active projects by:\n\n- Client\n- Product/project\n- Repo path\n- Studio project ID\n- Current status\n- Next action\n- Source of truth\n\nThis file should be generated or manually updated from `project-refs.yaml` and `docs/state.md`, not become an independent source of truth."
        },
        {
          "title": "docs/team-os/capture-workflows.md",
          "level": 3,
          "body": "Defines capture patterns for common context.\n\nRecommended capture types:\n\n- Product decision\n- Architecture decision\n- Customer/client signal\n- Implementation checkpoint\n- Incident or regression\n- Deployment note\n- Reusable lesson\n- Open question\n\nEach capture type should specify:\n\n- Where it goes\n- Required fields\n- Whether it also needs a durable memory write\n- Whether `docs/state.md` should change"
        },
        {
          "title": "docs/team-os/weekly-checkins.md",
          "level": 3,
          "body": "Recurring operating ritual.\n\nMinimal weekly check-in format:\n\n```markdown"
        },
        {
          "title": "Active Work",
          "level": 3,
          "body": "- ..."
        },
        {
          "title": "Decisions",
          "level": 3,
          "body": "- ..."
        }
      ],
      "html_path": "artifacts/2026-05-08-redkey-team-os-design-6291290228.html",
      "json_path": "artifacts/2026-05-08-redkey-team-os-design-6291290228.json"
    },
    {
      "id": "2026-05-08-codex-agent-candidates-98bf9c4ea4",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-08-codex-agent-candidates.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.745Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Codex Agent Candidate Assessment",
      "summary": "Codex Agent Candidate Assessment Date: 2026 05 08 Status: Draft Owner: Justin / Atlas Codex Scope: RedKey platform agent strategy Summary RedKey should build Codex native agents, but not all named RedKey agents are equally good first candidates. Codex is strongest when the work is repo centered and verifiable: inspect files, make scoped edits, run tests, rea...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Codex Agent Candidate Assessment",
          "level": 1,
          "body": "Date: 2026-05-08  \nStatus: Draft  \nOwner: Justin / Atlas-Codex  \nScope: RedKey platform agent strategy"
        },
        {
          "title": "Summary",
          "level": 2,
          "body": "RedKey should build Codex-native agents, but not all named RedKey agents are equally good first candidates.\n\nCodex is strongest when the work is repo-centered and verifiable: inspect files, make scoped edits, run tests, read logs, update docs, open PR-ready changes, and respond to review. The first Codex agent should therefore operate inside the RedKey harness before it attempts broad product, content, communication, or external-system workflows.\n\nRecommendation:\n\n1. Build **Team OS Gardener** first as the lowest-risk persistent Codex-style agent.\n2. Build **Quinn** next as the primary implementation/slice agent.\n3. Build **B2BEA Slice Auditor** as a focused reviewer agent for Quinn and B2BEA governance work.\n\nAtlas should remain the supervisor/persona layer. Jess and Mia are valid future agents, but they are better fits for OpenAI Agents SDK workflows with Gmail, Drive, Calendar, approvals, and persistent state than for the first Codex-native repo agent."
        },
        {
          "title": "Decision Criteria",
          "level": 2,
          "body": "A good first Codex agent should have:\n\n- Repo-local work.\n- Clear input artifacts.\n- Clear file ownership.\n- Verifiable output.\n- Low external side effects.\n- Repeatable test/build/lint commands.\n- Small blast radius.\n- A natural review loop.\n- Strong fit with the RedKey Team OS and Harness standards.\n\nA weaker first Codex agent has:\n\n- Heavy dependence on external communication tools.\n- Client-visible publication risk.\n- Ambiguous subjective output.\n- Weak automated verification.\n- Many approval paths.\n- Broad authority across projects or systems."
        },
        {
          "title": "Candidate Ranking",
          "level": 2,
          "body": "| Rank | Candidate | Fit | Why |\n| --- | --- | --- | --- |\n| 1 | Team OS Gardener | Best first persistent agent | Low-risk, repo-centered, improves the harness itself |\n| 2 | Quinn | Best implementation agent | Natural Codex fit: code, tests, docs, PR-ready patches |\n| 3 | B2BEA Slice Auditor | Best reviewer agent | Focused governance checks with strong existing patterns |\n| 4 | Bezel API Harness Agent | Strong backend candidate | Good smoke/test surface and clear API invariants |\n| 5 | Priya | Useful later | Planning/artifact synthesis depends on Studio retrieval maturity |\n| 6 | Jess | Not first | External workflow agent with Gmail/Drive/Calendar and approvals |\n| 7 | Mia | Not first | Content workflow agent; subjective output and publication risks |\n| 8 | Atlas | Do not convert first | Should remain supervisor/persona/router, not first autonomous agent |"
        },
        {
          "title": "1. Team OS Gardener",
          "level": 3,
          "body": "Purpose:\n\n- Keep RedKey context legible.\n- Scan Team OS docs, project routing, state files, specs, and plans for drift.\n- Open small patches to improve cross-links, freshness, and routing clarity.\n\nWhy first:\n\n- It exercises the harness without risking product code.\n- It improves the substrate future agents depend on.\n- It has low external side effects.\n- Its output is easy for Justin or Atlas to review.\n\nInputs:\n\n- `TEAM_OS.md` once created.\n- `project-refs.yaml`.\n- `docs/state.md`.\n- `docs/specs`.\n- `docs/plans`.\n- `docs/team-os`.\n- `.codex/atlas-codex/OPERATING.md`.\n- `AGENTS.md`.\n\nAllowed actions:\n\n- Read repository docs and config.\n- Propose or patch documentation fixes.\n- Flag contradictions between state, project refs, and specs.\n- Add missing cross-links.\n- Suggest stale-state cleanup.\n\nBlocked actions without approval:\n\n- Editing Studio canonical product artifacts.\n- Changing deployment config.\n- Changing application code.\n- Rewriting active project state beyond small routing corrections.\n- Deleting docs.\n\nVerification:\n\n- Markdown lint or basic formatting checks where available.\n- Link/cross-reference checks when implemented.\n- Fresh Atlas startup can still route active projects correctly."
        },
        {
          "title": "2. Quinn Codex Agent",
          "level": 3,
          "body": "Purpose:\n\n- Execute small implementation slices from approved specs or plans.\n- Make scoped repo patches.\n- Run verification.\n- Produce PR-ready summaries.\n\nWhy second:\n\n- Quinn is the clearest Codex-native role.\n- Implementation work has natural verification loops.\n- The Team OS Gardener should improve the context Quinn depends on before Quinn becomes persistent.\n\nInitial scope:\n\n- B2BEA runtime-governance slices.\n- Bezel API hardening tasks.\n- Focused test/build/doc patches.\n\nInputs:\n\n- Approved implementation plan or Studio build-execution artifact.\n- Repo-specific `AGENTS.md`.\n- Relevant specs and tests.\n- Harness standards.\n\nAllowed actions:\n\n- Inspect code.\n- Make scoped edits.\n- Add/update tests.\n- Run focused and full verification commands.\n- Update implementation notes.\n\nBlocked actions without approval:\n\n- Deployments.\n- Secrets or environment changes.\n- Broad refactors outside the assigned slice.\n- Client-visible content changes.\n- Canonical product planning changes outside Studio.\n\nVerification:\n\n- Focused tests for touched behavior.\n- Full test/build command where feasible.\n- Governance audit if the target repo has one.\n- Browser verification for UI work when applicable."
        },
        {
          "title": "3. B2BEA Slice Auditor",
          "level": 3,
          "body": "Purpose:\n\n- Review B2BEA website slices against existing governance rules.\n- Catch drift before merge.\n- Serve as a focused reviewer for Quinn or Atlas-Codex work.\n\nWhy third:\n\n- B2BEA already has strong slice history and governance patterns.\n- Auditor behavior can be narrow and repeatable.\n- It improves quality without initially granting implementation authority.\n\nChecks:\n\n- No rogue CSS or design-system violations.\n- Runtime JavaScript moved to governed assets when required.\n- Inline runtime migrations preserve behavior.\n- Focused tests updated.\n- Full test/build pass recorded.\n- Studio artifact/build-execution references are present when required.\n- Route/auth/access behavior remains aligned with policy.\n\nAllowed actions:\n\n- Read code and tests.\n- Run verification commands.\n- Produce review findings.\n- Optionally patch small doc/test expectation fixes after approval.\n\nBlocked actions without approval:\n\n- Changing product behavior.\n- Merging PRs.\n- Deploying.\n- Rewriting slice scope."
        },
        {
          "title": "Bezel API Harness Agent",
          "level": 3,
          "body": "Good fit once RedKey wants backend reliability automation.\n\nPossible responsibilities:\n\n- Run live and local smoke tests.\n- Check OpenAPI and SDK drift.\n- Verify claim lifecycle behavior.\n- Verify event leak boundaries.\n- Inspect migration state.\n- Propose small hardening patches.\n\nThis agent should wait until Team OS Gardener and Quinn establish baseline harness discipline."
        },
        {
          "title": "Priya",
          "level": 3,
          "body": "Priya is a planning and artifact synthesis agent. Codex can support Priya-like work, but Priya should not be the first Codex agent because planning quality depends on clean Studio artifact retrieval and strict artifact routing.\n\nPriya becomes a better candidate when:\n\n- Studio artifacts have reliable read/write helpers.\n- Product specs have stable schemas.\n- Agent outputs can be validated mechanically.\n- Artifact routing is enforced enough to prevent repo-doc leakage."
        },
        {
          "title": "Jess",
          "level": 3,
          "body": "Jess Podcast Coordinator is a better fit for an OpenAI Agents SDK workflow than a first Codex-native repo agent.\n\nReasons:\n\n- Needs Gmail, Calendar, Drive, guest context, and approval flows.\n- Produces client/human-facing communication.\n- Has external side effects.\n- Needs durable state across scheduling and prep workflows.\n\nJess is a good future SDK-agent candidate after approval gates and connector tools are well defined."
        },
        {
          "title": "Mia",
          "level": 3,
          "body": "Mia Content Creator is also better as a future workflow/content agent than the first Codex agent.\n\nReasons:\n\n- Output quality is subjective.\n- Publication risk is higher.\n- Verification is less mechanical.\n- Needs brand voice, content calendar, review, and approval workflows.\n\nMia should wait until content review and approval gates are encoded."
        },
        {
          "title": "Atlas",
          "level": 3,
          "body": "Atlas should not be converted into the first autonomous Codex agent.\n\nAtlas is the supervisor/router/persona layer:\n\n- Loads operating context.\n- Routes project work.\n- Applies memory protocol.\n- Helps Justin decide what to do.\n- Coordinates tools and agents.\n\nTurning Atlas into the first autonomous agent would blur supervision and execution. Atlas should remain the control layer while narrower agents do bounded work."
        },
        {
          "title": "Codex vs OpenAI Agents SDK",
          "level": 2,
          "body": "Use Codex-native agents when:\n\n- Work is repo-centered.\n- The agent needs shell, git, tests, build tools, and code review.\n- Outputs are patches, docs, tests, PRs, or verification reports.\n- The primary risk is code correctness or repo drift.\n\nUse OpenAI Agents SDK agents when:\n\n- RedKey owns orchestration, tool execution, approvals, runtime behavior, state, and storage.\n- The agent needs durable service behavior.\n- The workflow spans external tools such as Gmail, Drive, Calendar, Studio, Supabase, or Bezel API.\n- Human approval points need to be part of the runtime.\n- The agent needs multi-step state outside a single coding session.\n\nLikely split:\n\n- Team OS Gardener: Codex-native first, possibly later scheduled.\n- Quinn: Codex-native.\n- B2BEA Slice Auditor: Codex-native reviewer.\n- Bezel API Harness Agent: Codex-native or SDK depending on whether it becomes persistent.\n- Priya: SDK or Studio-integrated workflow after artifact schemas mature.\n- Jess: SDK.\n- Mia: SDK."
        },
        {
          "title": "First Pilot Definition",
          "level": 2,
          "body": "The first pilot should be **Team OS Gardener**.\n\nMinimum viable workflow:\n\n1. Read `project-refs.yaml`, `docs/state.md`, `AGENTS.md`, Atlas operating docs, and Team OS docs.\n2. Identify contradictions, stale next actions, missing cross-links, and routing gaps.\n3. Produce a short report.\n4. Patch only low-risk documentation fixes.\n5. Escalate anything that changes canonical project state.\n6. Run basic verification.\n7. Log durable lessons when the cleanup reveals a reusable rule.\n\nSuccess criteria:\n\n- Finds at least one real context/routing issue or confirms none with evidence.\n- Makes a small reviewable patch or produces a precise no-op report.\n- Does not modify product/client canonical artifacts incorrectly.\n- Does not inflate `docs/state.md` into a history archive.\n- Improves the next Atlas startup experience."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "1. Should Team OS Gardener run only on demand first, or on a weekly cadence?\n2. Should Quinn be a Codex subagent profile, a repeatable prompt/skill, or a durable Codex automation?\n3. Should B2BEA Slice Auditor be read-only at first?\n4. What is the minimum harness every project repo must expose before Quinn can touch it?\n5. How should Codex-native agent outputs be recorded in `agent_memory`, Studio artifacts, or repo docs?"
        },
        {
          "title": "Decision",
          "level": 2,
          "body": "Start with Team OS Gardener as the first Codex-native agent candidate. Use it to improve context quality and harness reliability before granting broader implementation authority to Quinn.\n\nQuinn should be the first true builder agent after that. B2BEA Slice Auditor should become the first focused reviewer agent."
        }
      ],
      "html_path": "artifacts/2026-05-08-codex-agent-candidates-98bf9c4ea4.html",
      "json_path": "artifacts/2026-05-08-codex-agent-candidates-98bf9c4ea4.json"
    },
    {
      "id": "2026-05-08-agent-json-human-html-forge-5ee5875baf",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-08-agent-json-human-html-forge.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.743Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.v1",
      "title": "Agent JSON, Human HTML: Forge Standard",
      "summary": "Governed RedKey work should be canonical JSON for agents and systems, rendered as intentional Dreamborn Forge HTML for humans.",
      "format_source": "json",
      "status": "draft",
      "sections": [
        {
          "title": "Thesis",
          "level": 2,
          "body": "Governed RedKey work should be canonical JSON for agents and systems, rendered as intentional Dreamborn Forge HTML for humans."
        },
        {
          "title": "Implementation Plan",
          "level": 2,
          "body": "- Forge artifact pair: Create JSON and Forge HTML examples for this standard.\n- Forge audit: Add a first-pass script that checks generated HTML for Forge compliance.\n- Renderer contracts: Define reusable Forge renderer contracts for design_doc, decision_record, and build_execution.\n- Knowledge Console: Use Forge renderers to traverse artifacts, design specs, design systems, agents, decisions, and builds."
        },
        {
          "title": "Sections",
          "level": 2,
          "body": "- Why this matters: JSON gives agents deterministic contracts. Forge HTML gives Justin a readable operating surface. Enforcing both prevents Markdown sprawl and visual drift.\n- Operating contract: id: string, title: string, items: object\n- Enforcement: id: string, title: string, items: object"
        }
      ],
      "html_path": "artifacts/2026-05-08-agent-json-human-html-forge-5ee5875baf.html",
      "json_path": "artifacts/2026-05-08-agent-json-human-html-forge-5ee5875baf.json"
    },
    {
      "id": "2026-05-08-agent-json-human-html-artifact-da103469dc",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-08-agent-json-human-html-artifact.json",
      "source_kind": "json",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.742Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.v1",
      "title": "Agent JSON, Human HTML Artifact Standard",
      "summary": "RedKey should make structured JSON the canonical machine artifact and intentional HTML the human review surface. Markdown remains useful for notes and exports, but not as the canonical format for governed work.",
      "format_source": "json",
      "status": "draft",
      "sections": [
        {
          "title": "Problem",
          "level": 2,
          "body": "- summary: Important RedKey work is currently split across Markdown docs, JSONB Studio artifacts, JSON wrappers containing Markdown, repo state files, and rendered Studio views. This is workable for agents, but it is not yet a clean operating model for humans or durable agent execution.\n- pain points: 5 items"
        },
        {
          "title": "Thesis",
          "level": 2,
          "body": "RedKey should make structured JSON the canonical machine artifact and intentional HTML the human review surface. Markdown remains useful for notes and exports, but not as the canonical format for governed work."
        },
        {
          "title": "Decision",
          "level": 2,
          "body": "- recommendation: Adopt the dual-surface model for governed RedKey artifacts: structured JSON for agents and systems, intentional HTML for Justin and other humans.\n- next action: Use this prototype pair to decide whether to formalize schemas, renderer contracts, and enforcement checks."
        },
        {
          "title": "Architecture",
          "level": 2,
          "body": "- layers: 6 items\n- diagram: type: string, nodes: object"
        },
        {
          "title": "Implementation Plan",
          "level": 2,
          "body": "- Prototype Pair: phase: number, name: string, deliverables: object, status: string\n- Schemas and Renderers: phase: number, name: string, deliverables: object, status: string\n- Studio Integration: phase: number, name: string, deliverables: object, status: string\n- Knowledge Console: phase: number, name: string, deliverables: object, status: string"
        },
        {
          "title": "Risks",
          "level": 2,
          "body": "- Renderer sprawl: name: string, impact: string, mitigation: string\n- Schema rigidity: name: string, impact: string, mitigation: string\n- HTML chaos: name: string, impact: string, mitigation: string\n- Duplicate truth: name: string, impact: string, mitigation: string"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Should generated HTML be stored in Supabase or rendered on demand first?\n- Should platform specs in repo move to JSON immediately, or only new governed specs?\n- What artifact types should allow prose exports?\n- Should Mermaid, SVG, or React Flow be the first diagram layer?\n- What is the minimum accessibility gate for generated artifact views?"
        }
      ],
      "html_path": "artifacts/2026-05-08-agent-json-human-html-artifact-da103469dc.html",
      "json_path": "artifacts/2026-05-08-agent-json-human-html-artifact-da103469dc.json"
    },
    {
      "id": "2026-05-07-redkey-coordination-api-platform-e0969214a3",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-redkey-coordination-api-platform.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.739Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "RedKey Coordination API Platform",
      "summary": "RedKey Coordination API Platform Purpose Build RedKey as the verified coordination API for parallel agent networks. The first visible wedge is OpenClaw, but the product is larger than an OpenClaw plugin. The core product is an API that gives any agent framework a shared HCS backed queue, role based claim eligibility, durable workflow events, missed claim awa...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Purpose",
          "level": 2,
          "body": "Build RedKey as the verified coordination API for parallel agent networks.\n\nThe first visible wedge is OpenClaw, but the product is larger than an OpenClaw plugin. The core product is an API that gives any agent framework a shared HCS-backed queue, role-based claim eligibility, durable workflow events, missed-claim awareness, and ledger receipts.\n\nThe public line:\n\n```text\nRedKey gives parallel agents a shared verified queue.\n```\n\nThe OpenClaw line:\n\n```text\nOpenClaw gives you agents. RedKey gives them a shared queue.\n```"
        },
        {
          "title": "Core Decision",
          "level": 2,
          "body": "Start with a hosted RedKey Coordination API, not only a GitHub plugin.\n\nThe GitHub repo should show how OpenClaw plugs into the API. It should provide the adapter, examples, and developer trust. The hosted RedKey product should own signup, OAuth, API keys, metering, HBAR funding, HCS-backed coordination, and receipts.\n\nThis creates a platform shape:\n\n```text\nRedKey Coordination API\n  |\n  |-- TypeScript SDK\n  |-- OpenClaw adapter\n  |-- Bezel recipe\n  |-- future LangGraph adapter\n  |-- future CrewAI adapter\n  |-- future custom agent clients\n```"
        },
        {
          "title": "HCS Boundary",
          "level": 2,
          "body": "Real coordination requires HCS.\n\nHCS is not an optional audit trail. It is the claim and queue mechanism. The abstraction is not about making HCS optional. The abstraction is about making HCS invisible to most developers.\n\nPublic primitives:\n\n- workspace\n- agent\n- A2A Agent Card\n- role\n- queue\n- task\n- claim\n- lease\n- workflow\n- event\n- receipt\n- ledger replay\n\nInternal primitives:\n\n- HCS topic\n- HCS sequence number\n- HCS consensus timestamp\n- Hedera transaction ID\n- operator account\n- topic routing\n- mirror-node verification\n- HBAR funding\n\nThe public API should not expose Hedera SDK usage, topic management, operator keys, or message construction."
        },
        {
          "title": "Product Layers",
          "level": 2,
          "body": "```text\nPublic clients\n  |\n  |-- OpenClaw adapter\n  |-- TypeScript SDK\n  |-- REST API\n  |\nRedKey public API\n  |\n  |-- auth and workspace control plane\n  |-- A2A Agent Card registry\n  |-- role and eligibility model\n  |-- coordination queue API\n  |-- ledger and receipt API\n  |-- usage and billing API\n  |\nRedKey internal execution\n  |\n  |-- HCS writer\n  |-- HCS reader/projector\n  |-- claim reducer\n  |-- workflow reducer\n  |-- metering service\n  |-- billing reconciliation\n```"
        },
        {
          "title": "Execution Modes",
          "level": 2,
          "body": "RedKey should support two execution modes."
        },
        {
          "title": "Simple Role Task",
          "level": 3,
          "body": "The simplest workflow is:\n\n```text\nput a task on a role\neligible agent claims it\nagent does it\nagent completes it\n```\n\nThis path should not require a workflow definition or `plan.json`.\n\nExample:\n\n```http\nPOST /queues/:queueId/tasks\n```\n\n```json\n{\n  \"title\": \"Research Piers Gorman\",\n  \"requiredRoles\": [\"role_researcher\"],\n  \"input\": {\n    \"guestName\": \"Piers Gorman\",\n    \"sourceHint\": \"TreviPay podcast planning doc\"\n  }\n}\n```\n\nThis creates one available task. Any active agent with `role_researcher` can claim it. The queue/HCS layer resolves the winning claim. The task completes or fails. No workflow engine needs to open follow-on tasks."
        },
        {
          "title": "Planned Workflow",
          "level": 3,
          "body": "Multi-step work should require a structured `plan.json`.\n\nThe plan is the contract between the user, the workflow reducer, and the agents. It prevents vague \"do this project\" prompts from turning into unmanaged agent activity.\n\nThe plan must break work into clear tasks with:\n\n- stable task IDs\n- required roles\n- required capabilities when needed\n- dependencies\n- expected inputs\n- expected outputs\n- completion criteria\n- retry policy\n- human approval gates when needed\n- artifact expectations\n\nThe workflow reducer reads ordered events and the plan, then opens the next eligible tasks.\n\n```text\nHCS ordered events + plan.json -> workflow reducer -> materialized workflow state -> available tasks\n```"
        },
        {
          "title": "Plan JSON",
          "level": 2,
          "body": "`plan.json` is required for multi-step workflows.\n\nMinimum shape:\n\n```json\n{\n  \"version\": \"1.0\",\n  \"name\": \"podcast-production\",\n  \"description\": \"Prepare a podcast episode from guest intake through host-approved script.\",\n  \"roles\": {\n    \"producer\": {\n      \"description\": \"Owns intake, structure, and final packaging.\"\n    },\n    \"researcher\": {\n      \"description\": \"Finds and summarizes relevant background.\"\n    },\n    \"writer\": {\n      \"description\": \"Drafts host-ready copy.\"\n    },\n    \"reviewer\": {\n      \"description\": \"Checks quality, accuracy, and fit.\"\n    }\n  },\n  \"tasks\": [\n    {\n      \"id\": \"guest_intake\",\n      \"title\": \"Summarize guest and topic brief\",\n      \"role\": \"producer\",\n      \"dependsOn\": [],\n      \"input\": {\n        \"sources\": [\"planning_doc\"]\n      },\n      \"outputs\": [\"guest_brief\"],\n      \"completionCriteria\": [\n        \"Guest background summarized\",\n        \"Target episode angle identified\",\n        \"Known constraints captured\"\n      ]\n    },\n    {\n      \"id\": \"guest_research\",\n      \"title\": \"Research guest and market context\",\n      \"role\": \"researcher\",\n      \"dependsOn\": [\"guest_intake\"],\n      \"requiredCapabilities\": [\"web_search\", \"source_review\"],\n      \"outputs\": [\"research_packet\"],\n      \"completionCriteria\": [\n        \"At least five useful facts found\",\n        \"Sources included\",\n        \"Open questions listed\"\n      ]\n    },\n    {\n      \"id\": \"draft_script\",\n      \"title\": \"Draft podcast script\",\n      \"role\": \"writer\",\n      \"dependsOn\": [\"guest_intake\", \"guest_research\"],\n      \"outputs\": [\"script_draft\"],\n      \"completionCriteria\": [\n        \"Intro, segments, transitions, and closing included\",\n        \"Questions are specific to guest and topic\",\n        \"Host voice is preserved\"\n      ]\n    },\n    {\n      \"id\": \"review_script\",\n      \"title\": \"Review podcast script\",\n      \"role\": \"reviewer\",\n      \"dependsOn\": [\"draft_script\"],\n      \"approvalGate\": true,\n      \"outputs\": [\"review_notes\"],\n      \"completionCriteria\": [\n        \"Accuracy issues flagged\",\n        \"Weak questions improved\",\n        \"Ready for host review or returned with notes\"\n      ]\n    }\n  ],\n  \"policies\": {\n    \"maxParallelTasks\": 5,\n    \"defaultLeaseSeconds\": 900,\n    \"retry\": {\n      \"maxAttempts\": 2,\n      \"onFailure\": \"reopen\"\n    }\n  }\n}\n```"
        },
        {
          "title": "Plan Requirements",
          "level": 3,
          "body": "RedKey should validate plans before starting a workflow.\n\nRequired checks:\n\n- every task has a stable unique ID\n- every task has exactly one primary role\n- every referenced role exists\n- dependencies reference valid task IDs\n- dependency graph has no cycles\n- every task has completion criteria\n- outputs are named\n- approval gates are explicit\n- retry policy is explicit\n- max parallelism is explicit\n\nBest-practice warnings:\n\n- task is too broad\n- task has no concrete output\n- task depends on too many upstream tasks\n- task has unclear completion criteria\n- plan has too much serial work and not enough parallelizable work\n- role names are vague\n- task asks one agent to both produce and review the same artifact\n\nValidation endpoint:\n\n```http\nPOST /workflow-definitions/validate\n```\n\nStart workflow from plan:\n\n```http\nPOST /workflows\n```\n\n```json\n{\n  \"queueId\": \"queue_podcast\",\n  \"plan\": {\n    \"version\": \"1.0\",\n    \"name\": \"podcast-production\",\n    \"tasks\": []\n  }\n}\n```\n\nThe response should include validation results and the initial available tasks:\n\n```json\n{\n  \"workflowId\": \"wf_123\",\n  \"status\": \"running\",\n  \"availableTasks\": [\"guest_intake\"],\n  \"eventId\": \"evt_workflow_started_001\"\n}\n```"
        },
        {
          "title": "Public API Surfaces",
          "level": 2,
          "body": "Expose the smallest set of surfaces required to run both simple role tasks and planned workflows."
        },
        {
          "title": "1. Auth And Workspace API",
          "level": 3,
          "body": "Handles signup, OAuth, API keys, workspaces, and usage visibility.\n\nEndpoints:\n\n```http\nPOST /oauth/token\nGET  /workspaces\nPOST /workspaces\nGET  /usage\nGET  /billing/credits\n```\n\nHosted plans use RedKey-managed HBAR funding. Enterprise plans may use customer-owned Hedera accounts and topics behind a managed setup flow."
        },
        {
          "title": "2. Agent Registry API",
          "level": 3,
          "body": "Agents should register through A2A Agent Cards.\n\nPrimary endpoint:\n\n```http\nPOST /agents/register-card\n```\n\nSupported payloads:\n\n```json\n{\n  \"workspaceId\": \"wk_123\",\n  \"agentCardUrl\": \"https://agent.example.com/.well-known/agent.json\"\n}\n```\n\nor:\n\n```json\n{\n  \"workspaceId\": \"wk_123\",\n  \"agentCard\": {\n    \"name\": \"Research Agent\",\n    \"description\": \"Finds and summarizes source material\",\n    \"url\": \"https://agent.example.com/a2a\",\n    \"version\": \"1.0.0\",\n    \"skills\": [],\n    \"capabilities\": {}\n  }\n}\n```\n\nRedKey ingests the Agent Card and normalizes:\n\n- agent identity\n- endpoint\n- framework\n- capabilities\n- skills\n- auth requirements\n- verification status\n- eligible roles\n\nAdditional endpoints:\n\n```http\nGET  /agents\nGET  /agents/:agentId\nPOST /agents/:agentId/heartbeat\nPOST /agents/:agentId/deactivate\n```\n\nAgent registration should be a metered verified event when written to the coordination ledger:\n\n```text\nagent.registered\n```"
        },
        {
          "title": "3. Role And Eligibility API",
          "level": 3,
          "body": "Roles decide which agents are allowed to claim which tasks.\n\nKeep v1 roles simple. They are not full enterprise RBAC yet. In v1:\n\n```text\nRole = eligibility to claim certain tasks\n```\n\nEndpoints:\n\n```http\nPOST /roles\nGET  /roles\nGET  /roles/:roleId\nPOST /roles/:roleId/agents/:agentId\nDELETE /roles/:roleId/agents/:agentId\n```\n\nRole shape:\n\n```json\n{\n  \"id\": \"role_researcher\",\n  \"name\": \"Researcher\",\n  \"description\": \"Finds source material and summarizes relevant findings\",\n  \"capabilities\": [\"web_search\", \"source_review\"]\n}\n```\n\nClaim eligibility checks:\n\n- agent is active\n- agent has the required role\n- agent has required capabilities\n- task dependencies are satisfied\n- task is available\n- claim lease can be issued\n- HCS ordering confirms the claim outcome"
        },
        {
          "title": "4. Coordination API",
          "level": 3,
          "body": "This is the core queue and claim surface. It supports simple role tasks directly.\n\nEndpoints:\n\n```http\nPOST /queues\nGET  /queues\nPOST /queues/:queueId/tasks\nGET  /queues/:queueId/tasks/available\nPOST /tasks/:taskId/claim\nPOST /claims/:claimId/heartbeat\nPOST /claims/:claimId/complete\nPOST /claims/:claimId/fail\nGET  /workflows/:workflowId/state\nGET  /workflows/:workflowId/events\n```\n\nTask shape:\n\n```json\n{\n  \"queueId\": \"queue_podcast\",\n  \"workflowId\": \"wf_789\",\n  \"title\": \"Research Piers Gorman\",\n  \"requiredRoles\": [\"role_researcher\"],\n  \"requiredCapabilities\": [\"web_search\", \"source_review\"],\n  \"dependsOn\": [],\n  \"priority\": \"normal\",\n  \"input\": {\n    \"guestName\": \"Piers Gorman\"\n  }\n}\n```\n\nClaim request:\n\n```json\n{\n  \"agentId\": \"agt_123\",\n  \"leaseSeconds\": 600,\n  \"idempotencyKey\": \"claim-task_456-agt_123-001\"\n}\n```\n\nClaim success:\n\n```json\n{\n  \"status\": \"claimed\",\n  \"taskId\": \"task_456\",\n  \"claimId\": \"clm_789\",\n  \"agentId\": \"agt_123\",\n  \"leaseExpiresAt\": \"2026-05-07T20:15:00Z\",\n  \"eventId\": \"evt_claimed_001\"\n}\n```"
        },
        {
          "title": "5. Workflow Definition API",
          "level": 3,
          "body": "This is the planned multi-step workflow surface.\n\nEndpoints:\n\n```http\nPOST /workflow-definitions/validate\nPOST /workflow-definitions\nGET  /workflow-definitions\nGET  /workflow-definitions/:definitionId\nPATCH /workflow-definitions/:definitionId\nPOST /workflow-definitions/:definitionId/versions\nPOST /workflow-definitions/:definitionId/publish\n```\n\n`POST /workflow-definitions/validate` should be usable before a workflow is saved or started. It returns blocking validation errors and non-blocking best-practice warnings."
        },
        {
          "title": "6. Workflow Run API",
          "level": 3,
          "body": "This is the execution surface for a validated `plan.json`.\n\nEndpoints:\n\n```http\nPOST /workflows\nGET  /workflows\nGET  /workflows/:workflowId\nGET  /workflows/:workflowId/state\nGET  /workflows/:workflowId/events\nPOST /workflows/:workflowId/pause\nPOST /workflows/:workflowId/resume\nPOST /workflows/:workflowId/cancel\n```\n\nThe workflow reducer owns task opening. Agents do not decide what comes next. Agents claim available tasks, execute them, and complete or fail them."
        },
        {
          "title": "Missed Claim Awareness",
          "level": 2,
          "body": "Agents need to know when they attempted to claim work but did not win.\n\nThis should be first-class, not a generic error. A missed claim is useful coordination information. It tells an agent:\n\n- another agent already owns the task\n- the agent should stop preparing to work on it\n- the agent can ask for more available work\n- the system can measure contention\n\nClaim miss response:\n\n```json\n{\n  \"status\": \"missed\",\n  \"taskId\": \"task_456\",\n  \"agentId\": \"agt_999\",\n  \"reason\": \"claim_already_won\",\n  \"winningClaimId\": \"clm_789\",\n  \"winningAgentId\": \"agt_123\",\n  \"eventId\": \"evt_claim_missed_002\",\n  \"next\": {\n    \"action\": \"poll_available_tasks\",\n    \"queueId\": \"queue_podcast\"\n  }\n}\n```\n\nEvent types:\n\n```text\ntask.claim_attempted\ntask.claimed\ntask.claim_missed\ntask.claim_rejected\n```\n\nUse `claim_missed` when the agent was eligible and the task was claimable, but another valid claim won first.\n\nUse `claim_rejected` when the agent was not allowed to claim:\n\n- missing role\n- missing capability\n- inactive agent\n- failed policy\n- task dependency not satisfied\n- invalid lease request\n\nThis distinction matters. A missed claim is normal parallel coordination. A rejected claim is a policy or state problem.\n\nAgents should also be able to subscribe or poll for missed claims:\n\n```http\nGET /agents/:agentId/events?type=task.claim_missed\nGET /agents/:agentId/claim-history\n```\n\nAgent-facing guidance:\n\n```text\nIf claim returns \"missed\", do not retry the same task immediately.\nAsk for the next available task in the queue.\n```"
        },
        {
          "title": "Ledger And Receipt API",
          "level": 2,
          "body": "The ledger API should expose what happened, not raw HCS internals.\n\nEndpoints:\n\n```http\nGET /events/:eventId\nGET /events/:eventId/receipt\nGET /tasks/:taskId/events\nGET /claims/:claimId/events\nGET /agents/:agentId/events\nGET /workflows/:workflowId/events\nGET /ledger/query\n```\n\nReceipt shape:\n\n```json\n{\n  \"eventId\": \"evt_123\",\n  \"type\": \"task.claimed\",\n  \"sequence\": 55291,\n  \"timestamp\": \"2026-05-07T18:15:00Z\",\n  \"actor\": {\n    \"type\": \"agent\",\n    \"id\": \"agt_123\"\n  },\n  \"subject\": {\n    \"type\": \"task\",\n    \"id\": \"task_456\"\n  },\n  \"verification\": {\n    \"status\": \"verified\",\n    \"provider\": \"redkey\",\n    \"receiptUrl\": \"https://redkey.ai/receipts/evt_123\"\n  }\n}\n```\n\nInternal receipt metadata may include HCS topic IDs, sequence numbers, consensus timestamps, and transaction IDs. Do not require normal developers to handle those fields."
        }
      ],
      "html_path": "artifacts/2026-05-07-redkey-coordination-api-platform-e0969214a3.html",
      "json_path": "artifacts/2026-05-07-redkey-coordination-api-platform-e0969214a3.json"
    },
    {
      "id": "2026-05-07-codex-recipe-factory-d47a050348",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-codex-recipe-factory.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.737Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Codex Recipe Factory Standard",
      "summary": "Codex Recipe Factory Standard Date: 2026 05 07 Purpose The Recipe Factory is the repeatable pattern for turning a Bezel capability into something a fresh Codex session can build from one URL. The standard exists because Personal Brain proved the core motion: Codex read the public recipe, built a local Next.js app, connected it to the hosted Bezel Projects Su...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Codex Recipe Factory Standard",
          "level": 1,
          "body": "Date: 2026-05-07"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "The Recipe Factory is the repeatable pattern for turning a Bezel capability into something a fresh Codex session can build from one URL.\n\nThe standard exists because Personal Brain proved the core motion:\n\n```text\nBuild this: https://recipes.bezeliq.ai/personal-brain\n```\n\nCodex read the public recipe, built a local Next.js app, connected it to the hosted Bezel Projects Supabase sandbox, ran build/smoke checks, and returned a working localhost URL."
        },
        {
          "title": "Thesis",
          "level": 2,
          "body": "A recipe URL is a product interface for agents.\n\nA GitHub repo is still useful underneath, but a repo is a builder/developer interface. A recipe URL is what a first-time Codex user, buyer, teammate, or customer can paste into an agent and expect a working capability."
        },
        {
          "title": "Definition",
          "level": 2,
          "body": "A Codex recipe is a URL-addressable capability packet with:\n\n- a human landing page\n- a machine-readable manifest\n- Codex-specific instructions\n- app/API/data/acceptance specs\n- demo inputs when useful\n- troubleshooting notes\n- successful-run evidence\n\nThe canonical host is:\n\n```text\nhttps://recipes.bezeliq.ai/{recipe-slug}\n```"
        },
        {
          "title": "Standard Packet Shape",
          "level": 2,
          "body": "```text\nrecipes/{recipe-id}/\n  recipe.json\n  START_HERE.md\n  codex-instructions.md\n  app-spec/\n    screens.md\n    data-model.md\n    api.md\n    acceptance.md\n  demo/\n    sample-input.json\n  troubleshooting.md\n  future/\n```\n\nThe public URL should expose:\n\n```text\nhttps://recipes.bezeliq.ai/{recipe-slug}\nhttps://recipes.bezeliq.ai/{recipe-slug}/recipe.json\nhttps://recipes.bezeliq.ai/{recipe-slug}/START_HERE.md\nhttps://recipes.bezeliq.ai/{recipe-slug}/codex-instructions.md\n```"
        },
        {
          "title": "Build Process",
          "level": 2,
          "body": "For each new project or capability:\n\n1. Define the capability in plain English.\n2. Choose the golden path for a first-time Codex user.\n3. Decide whether V1 is hosted, private, or local-only.\n4. Write the recipe packet.\n5. Publish it under `recipes.bezeliq.ai`.\n6. Start a fresh Codex session.\n7. Paste only the recipe URL prompt.\n8. Let Codex build the local app or workflow.\n9. Run mechanical verification.\n10. Save the actual successful run as evidence.\n11. Harden the recipe until repeated runs converge."
        },
        {
          "title": "Acceptance Rule",
          "level": 2,
          "body": "A recipe is not considered real until a fresh Codex session can build it from:\n\n```text\nBuild this: https://recipes.bezeliq.ai/{recipe-slug}\n```\n\nwith minimal help.\n\nMinimal help means no extra architecture explanation, no hidden setup steps, and no credentials unless the recipe is explicitly a private-account recipe."
        },
        {
          "title": "Hosted V1 Boundary",
          "level": 2,
          "body": "Hosted V1 exists to remove setup friction.\n\nRules:\n\n- generated apps must not receive service role keys\n- generated apps must not ask for Supabase credentials when the recipe says hosted V1\n- generated apps should talk to a Bezel-hosted API boundary\n- user install tokens should stay server-side when the generated app stack supports it\n- hosted V1 must be clearly labeled as demo/early setup unless privacy/export/deletion terms are published\n\nPersonal Brain follows this model through the Bezel Projects Supabase database and `personal-brain-api`."
        },
        {
          "title": "Evidence Standard",
          "level": 2,
          "body": "Every recipe needs a successful-run note.\n\nCapture:\n\n- prompt used\n- app URL or output location\n- generated screens/flows\n- hosted/private storage mode\n- checks passed\n- warnings/advisories\n- hardening actions\n\nThis evidence is part of the product, not an afterthought. It proves the URL can produce working software in a fresh agent context."
        },
        {
          "title": "Current Reference Implementation",
          "level": 2,
          "body": "Repository:\n\n```text\n/Users/justinking/Vaults/Projects/bezel-recipes\n```\n\nRecipe:\n\n```text\nhttps://recipes.bezeliq.ai/personal-brain\n```\n\nKey implementation facts:\n\n- Cloudflare Pages project: `bezel-recipes`\n- Custom domain: `recipes.bezeliq.ai`\n- Static build script: `scripts/build-site.mjs`\n- First recipe: `recipes/personal-brain-supabase`\n- Successful-run evidence: `docs/successful-runs/personal-brain-2026-05-07.md`"
        },
        {
          "title": "Next Capability Candidates",
          "level": 2,
          "body": "Use this same factory for:\n\n- Gmail/calendar triage\n- AI-first task extraction\n- project setup wizards\n- AD product modules\n- future Personal Brain private Supabase and Obsidian modes\n\nThe next recipe should not start from scratch. It should start from the playbook in `bezel-recipes/docs/recipe-authoring-playbook.md`."
        }
      ],
      "html_path": "artifacts/2026-05-07-codex-recipe-factory-d47a050348.html",
      "json_path": "artifacts/2026-05-07-codex-recipe-factory-d47a050348.json"
    },
    {
      "id": "2026-05-07-b2bea-org-survey-system-spec-cb785b1033",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-survey-system-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.734Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Survey System Spec",
      "summary": "B2BEA.org V1 Survey System Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: survey system spec Artifact ID: 823d14d7 5992 42f3 a2f4 f4738a045f7c Version: 1 Status: draft Updated: 2026 05 07T15:32:18.423567+00:00 Purpose Define the standard reusable survey/form capabi...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Survey System Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `survey-system-spec`\n- Artifact ID: `823d14d7-5992-42f3-a2f4-f4738a045f7c`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-07T15:32:18.423567+00:00`"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "Define the standard reusable survey/form capability separately from the maturity-assessment special flow, so B2BEA can run structured surveys without forcing all assessments into one generic model."
        },
        {
          "title": "Scope",
          "level": 2,
          "body": "```json\n{\n  \"included\": [\n    \"Admin-created standard surveys and forms\",\n    \"Question definitions and ordering\",\n    \"Audience assignment rules\",\n    \"Public/member/vendor/company respondent flows where authorized\",\n    \"Response capture and partial/progress state where needed\",\n    \"Review, export, reporting, and display permissions\",\n    \"Email-first notification events for invitations/reminders/results where approved\",\n    \"Audit trail for publish/archive/export and permission-sensitive operations\"\n  ],\n  \"excluded_or_separate\": [\n    \"Current maturity assessment special flow; it remains V1 but uses its own maturity-assessment pattern\",\n    \"Complex in-app notification center beyond email-first event log\",\n    \"Unbounded custom quiz/certification grading; academy certification has its own spec\",\n    \"Anonymous collection of sensitive data without explicit consent/policy\",\n    \"Raw platform-wide exports for vendors or companies\"\n  ]\n}\n```"
        },
        {
          "title": "Status",
          "level": 2,
          "body": "draft"
        },
        {
          "title": "Actors",
          "level": 2,
          "body": "| id | role |\n| --- | --- |\n| b2bea_admin | Creates, publishes, assigns, reviews, exports, and archives surveys/forms. |\n| anonymous_respondent | Can submit public surveys/forms only when explicitly published for anonymous access. |\n| member | Can respond to member-assigned or public surveys and view own submitted responses/results where allowed. |\n| vendor_admin | Can respond to vendor-assigned surveys and view own vendor aggregate/report outputs where allowed. |\n| company_admin | Can assign company-eligible surveys to employees and view own-company aggregate/report outputs where allowed. |\n| company_employee | Can respond to company-assigned surveys when invited/entitled. |"
        },
        {
          "title": "Capability Contracts",
          "level": 2,
          "body": "| id | actor | surface | acceptance | description |\n| --- | --- | --- | --- | --- |\n| SurveyCreateDefinition | b2bea_admin | /admin | Definition validates before publish., Question ids are stable., Owner and intended audience are required. | Create a reusable survey/form definition with title, description, purpose, owner, question set, audience, lifecycle, consent copy, and reporting policy. |\n| SurveyPublishArchive | b2bea_admin | /admin | Draft/preview is not public., Archived surveys stop accepting new responses., Lifecycle changes create audit events. | Move survey/form through draft, preview, published, paused, archived lifecycle. |\n| SurveyAssignAudience | b2bea_admin/company_admin | /admin or /company | Audience membership is server-side evaluated., Assignment has opens_at/closes_at where relevant., Company admins can only assign surveys allowed by company entitlement/policy. | Assign a published survey/form to an audience: public link, members, vendors, companies, company employees, event attendees, or a curated list. |\n| SurveyTake | respondent | public/member/vendor/company as authorized | Required questions are enforced., Respondent access is checked server-side., Submission confirmation is clear., Duplicate/retry behavior is defined. | Respondent completes questions with progress, validation, save/submit, consent, and confirmation states. |\n| SurveyReport | b2bea_admin/vendor_admin/company_admin/member | /admin, /vendor, /company, member dashboard | Admins can see full permitted results., Vendors/companies see only own-account scoped results., Sensitive respondent-level data is hidden unless explicitly permitted and consented. | View permitted results and reporting by audience, survey, question, or own-account aggregation. |\n| SurveyExport | b2bea_admin/vendor_admin/company_admin | /admin, /vendor, /company | Exports are audited., Vendor/company exports are own-account only., No raw platform-wide or sensitive user-level export without explicit policy/consent. | Export response/report data within policy boundaries. |"
        },
        {
          "title": "Target Data Model",
          "level": 2,
          "body": "```json\n{\n  \"tables_or_entities\": [\n    {\n      \"name\": \"survey_definitions\",\n      \"purpose\": \"Canonical survey/form definition and lifecycle metadata.\",\n      \"key_fields\": [\n        \"id\",\n        \"slug\",\n        \"title\",\n        \"description\",\n        \"owner_role\",\n        \"status\",\n        \"audience_policy\",\n        \"consent_text\",\n        \"reporting_policy\",\n        \"created_by\",\n        \"created_at\",\n        \"updated_at\",\n        \"published_at\",\n        \"archived_at\"\n      ]\n    },\n    {\n      \"name\": \"survey_questions\",\n      \"purpose\": \"Ordered question definitions linked to survey_definitions.\",\n      \"key_fields\": [\n        \"id\",\n        \"survey_id\",\n        \"stable_key\",\n        \"question_type\",\n        \"label\",\n        \"help_text\",\n        \"required\",\n        \"order_index\",\n        \"options_json\",\n        \"validation_json\",\n        \"show_if_json\",\n        \"sensitive_flag\"\n      ]\n    },\n    {\n      \"name\": \"survey_assignments\",\n      \"purpose\": \"Audience assignment and availability window for a survey.\",\n      \"key_fields\": [\n        \"id\",\n        \"survey_id\",\n        \"audience_type\",\n        \"audience_ref\",\n        \"opens_at\",\n        \"closes_at\",\n        \"status\",\n        \"created_by\"\n      ]\n    },\n    {\n      \"name\": \"survey_responses\",\n      \"purpose\": \"One respondent response session/submission.\",\n      \"key_fields\": [\n        \"id\",\n        \"survey_id\",\n        \"assignment_id\",\n        \"respondent_person_id\",\n        \"anonymous_token_hash\",\n        \"subject_type\",\n        \"subject_ref\",\n        \"status\",\n        \"started_at\",\n        \"submitted_at\",\n        \"consent_at\",\n        \"ip_hash\",\n        \"user_agent_hash\"\n      ]\n    },\n    {\n      \"name\": \"survey_answers\",\n      \"purpose\": \"Question-level answer storage with typed values.\",\n      \"key_fields\": [\n        \"id\",\n        \"response_id\",\n        \"question_id\",\n        \"answer_json\",\n        \"answered_at\"\n      ]\n    },\n    {\n      \"name\": \"survey_report_views\",\n      \"purpose\": \"Optional materialized/read-model reporting layer for aggregate dashboards.\",\n      \"key_fields\": [\n        \"survey_id\",\n        \"scope_type\",\n        \"scope_ref\",\n        \"question_key\",\n        \"aggregate_json\",\n        \"updated_at\"\n      ]\n    },\n    {\n      \"name\": \"survey_export_events\",\n      \"purpose\": \"Audited export requests/generation/downloads.\",\n      \"key_fields\": [\n        \"id\",\n        \"survey_id\",\n        \"requested_by\",\n        \"scope_type\",\n        \"scope_ref\",\n        \"status\",\n        \"file_ref\",\n        \"created_at\",\n        \"expires_at\"\n      ]\n    }\n  ],\n  \"implementation_note\": \"Exact SQL/migration belongs in PLAN/build phase. This spec defines target contracts, not implementation approval.\"\n}\n```"
        },
        {
          "title": "Question Model",
          "level": 2,
          "body": "```json\n{\n  \"v1_rules\": [\n    \"Every question has a stable key, label, optional help text, required flag, order, and answer validation.\",\n    \"Choice questions store stable option keys, not only display labels.\",\n    \"Conditional branching is limited in V1: show_if based on prior single_choice/boolean answers only, unless separately approved.\",\n    \"Free-text responses can be marked sensitive and excluded from non-admin exports by default.\"\n  ],\n  \"v1_question_types\": [\n    \"short_text\",\n    \"long_text\",\n    \"single_choice\",\n    \"multi_choice\",\n    \"rating_scale\",\n    \"boolean\",\n    \"email\",\n    \"url\",\n    \"number\",\n    \"date\"\n  ],\n  \"deferred_question_types\": [\n    \"file_upload\",\n    \"matrix_grid\",\n    \"rank_order\",\n    \"payment\",\n    \"signature\",\n    \"complex calculated score blocks\"\n  ]\n}\n```"
        },
        {
          "title": "Lifecycle Models",
          "level": 2,
          "body": "```json\n{\n  \"export\": [\n    \"requested\",\n    \"authorized\",\n    \"generated\",\n    \"downloaded\",\n    \"expired\",\n    \"denied\",\n    \"failed\"\n  ],\n  \"response\": [\n    \"not_started\",\n    \"in_progress\",\n    \"submitted\",\n    \"voided\",\n    \"deleted_or_redacted\"\n  ],\n  \"assignment\": [\n    \"draft\",\n    \"scheduled\",\n    \"open\",\n    \"closed\",\n    \"archived\"\n  ],\n  \"survey_definition\": [\n    \"draft\",\n    \"preview\",\n    \"published\",\n    \"paused\",\n    \"archived\"\n  ]\n}\n```"
        },
        {
          "title": "Permission Model",
          "level": 2,
          "body": "```json\n{\n  \"entitlement_keys\": [\n    \"survey.respond.public\",\n    \"survey.respond.member\",\n    \"survey.respond.vendor\",\n    \"survey.respond.company\",\n    \"survey.report.admin\",\n    \"survey.report.own_account\",\n    \"survey.export.admin\",\n    \"survey.export.own_account\"\n  ],\n  \"server_side_rules\": [\n    \"Survey definition writes require b2bea_admin/core admin permission.\",\n    \"Public surveys require status=published and anonymous_allowed=true or public assignment.\",\n    \"Member/vendor/company surveys require active user plus matching assignment/entitlement.\",\n    \"Vendor and company report/export reads are scoped to own vendor/company only.\",\n    \"Sensitive free-text/person-level exports require explicit admin permission and consent/policy basis.\",\n    \"All publish/archive/export/assignment changes create audit events.\"\n  ]\n}\n```"
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- Spec clearly separates standard surveys/forms from maturity assessments.\n- A developer can design survey tables, guards, and UI modules from the contracts without guessing source of truth.\n- Permission/export boundaries are explicit for public, member, vendor, company, and admin actors.\n- No implementation/build is authorized by this artifact alone; PLAN/EXEC_PLAN_REVIEW and Justin build approval remain required."
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- qa-release-readiness-spec\n- plan"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "| id | blocks | question |\n| --- | --- | --- |\n| SURV-OQ-001 | Exact first implementation module, not this spec. | Which existing V1 forms should migrate into survey/form system versus remain bespoke contact/application flows? |\n| SURV-OQ-002 | Content editing workflow details. | Should survey definitions live only in B2BEA Supabase, or should Sanity own public explanatory copy for standard public surveys? |\n| SURV-OQ-003 | Export/report policy. | What respondent-level data is allowed in vendor/company reporting, if any? |"
        },
        {
          "title": "Source Artifacts",
          "level": 2,
          "body": "| status | version | artifact_id | artifact_type |\n| --- | --- | --- | --- |\n| draft | 1 | 05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6 | company-workspace-data-spec |\n| draft | 1 | 2f473004-9063-4fe9-8290-5cbd1b19dfb4 | data-model-spec |\n| draft | 1 | 355b3249-3af9-45a4-9c45-67777bd2d72d | entitlement-model-spec |\n| draft | 1 | 427c04a9-40b7-4e55-a642-65b2aee20b2b | page-template-spec |\n| draft | 3 | 80328220-3deb-4cf9-a68f-d440b41a38da | production-readiness-gap-register |\n| draft | 3 | 2cec821e-07ba-4aca-81fb-078f163adf44 | route-family-inventory |\n| draft | 9 | 77853042-e7a4-48bd-91a4-6e48d0484b1b | surface-specs |"
        },
        {
          "title": "Qa And Release Checks",
          "level": 2,
          "body": "- Anonymous/public survey cannot submit when survey is draft, paused, archived, or closed.\n- Unauthorized user cannot access private assignment by URL.\n- Required validation works on desktop/mobile and with keyboard input.\n- Submitted response persists and cannot be double-submitted unless policy allows updates.\n- Own-account vendor/company reports exclude other account data.\n- Exports create audit events and expire.\n- Sensitive fields are excluded from non-admin exports by default."
        },
        {
          "title": "Page Template Implications",
          "level": 2,
          "body": "| implication | page_family |\n| --- | --- |\n| Needs survey definition list, editor, assignment, report, and export admin modules. | admin_module |\n| Can share question controls and validation primitives, but retains maturity-specific scoring/result narrative. | maturity_assessment_special_flow |\n| May need vendor-scoped survey response/report widgets for assigned vendor surveys. | vendor_dashboard |\n| Future /company templates need employee assignment and own-company aggregate survey reporting. | company_workspace |"
        },
        {
          "title": "Relationship To Maturity Assessments",
          "level": 2,
          "body": "```json\n{\n  \"decision\": \"Maturity assessments are a reusable special assessment pattern, not just generic surveys. The standard survey system may share question/answer primitives, consent, response storage, and reporting components, but maturity assessments retain domain-specific scoring, result narrative, and recommendations.\",\n  \"future_alignment\": [\n    \"Use compatible question and response primitives where practical.\",\n    \"Keep maturity scoring/result models separate from simple survey reports.\",\n    \"Allow future domain maturity assessments to reuse the maturity_assessment_special_flow page family.\"\n  ],\n  \"current_v1_maturity_routes\": [\n    \"/assessments\",\n    \"/assessments/maturity\",\n    \"/assessments/maturity/take\",\n    \"/assessments/maturity/results\"\n  ]\n}\n```"
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-survey-system-spec-cb785b1033.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-survey-system-spec-cb785b1033.json"
    },
    {
      "id": "2026-05-07-b2bea-org-surface-specs-f703217645",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-surface-specs.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.732Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Surface Specs",
      "summary": "B2BEA.org V1 Surface Specs Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: surface specs Artifact ID: 77853042 e7a4 48bd 91a4 6e48d0484b1b Version: 11 Status: draft Updated: 2026 05 07T15:35:22.233+00:00 Purpose Define the concrete public, admin, member, vendor, company,...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Surface Specs",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `surface-specs`\n- Artifact ID: `77853042-e7a4-48bd-91a4-6e48d0484b1b`\n- Version: `11`\n- Status: `draft`\n- Updated: `2026-05-07T15:35:22.233+00:00`"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "Define the concrete public, admin, member, vendor, company, auth, and publishing surfaces that implementation must build against after the current-site reverse-engineering and hardening specs."
        },
        {
          "title": "Status",
          "level": 2,
          "body": "draft"
        },
        {
          "title": "Basis",
          "level": 2,
          "body": "- Current-state research artifact maps existing Eleventy/Nunjucks layouts, partials, routes, and surface roles.\n- Capability map identifies carry-forward and gap capabilities across public, admin, member, vendor, and company workflows.\n- Design-system spec uses Lovable as the initial foundation/reference, while the hardened B2BEA design system is the V1 authority for non-excluded surfaces.\n- Publishing, data, entitlement, and company-workspace specs define source-of-truth and lifecycle boundaries."
        },
        {
          "title": "Revision Note",
          "level": 2,
          "body": "Linked draft survey-system-spec artifact."
        },
        {
          "title": "Global Decisions",
          "level": 2,
          "body": "| id | topic | decision |\n| --- | --- | --- |\n| SURF-DEC-001 | Surface separation | Public, auth/account, B2BEA admin, publishing/studio, member, vendor, and practitioner company workspace are separate surfaces sharing foundations, not one large page set. |\n| SURF-DEC-002 | Company public presence | Practitioner company accounts are private workspace only in V1. Do not build public practitioner company profiles or a public practitioner company directory. |\n| SURF-DEC-003 | Vendor public presence | Vendor public profiles and vendor directory remain V1 public surfaces. Vendor-authored/profile changes require B2BEA review before changing the public projection. |\n| SURF-DEC-004 | Design language | All in-scope surfaces use hardened B2BEA design-system component contracts. Home, intentionally editorial blog/resource pages, and approved custom HTML imports may be exceptions but still require accessibility, metadata, responsive, and QA compliance. |\n| SURF-DEC-005 | Source of truth | Sanity owns editorial/public page content; B2BEA Supabase owns application and operational data; HubSpot owns CRM/pipeline/sales activity and renewals. |\n| SURF-DEC-006 | Publishing control | Core admins can publish standard Sanity pages and approved custom HTML imports after preview and required metadata validation; external/vendor/company submissions route through review workflows. |"
        },
        {
          "title": "Surface Decisions",
          "level": 2,
          "body": "| id | topic | status | decision | rationale | decided_at | implications | v1_keep |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| SURF-OWNER-DEC-001 | Custom versus B2BEA design-system page treatment | approved_direction | Home, major campaign/resource landing pages, approved custom HTML imports, and explicitly marked signature editorial features may stay custom. All index, directory, search/filter, standard detail, gated download, operational, and authenticated surfaces use the hardened B2BEA design system. | This preserves flexibility for high-value custom storytelling while preventing the rebuild from recreating page-by-page drift across reusable page families and operational surfaces. | 2026-05-07T13:33:47.840Z | Page-template-spec must include an exception marker for custom/signature pages., Custom pages still require accessibility, responsive, metadata, analytics, and QA compliance., Default implementation path for blog/resource indexes, standard details, directories, filters, downloads, forms, and portals is B2BEA design-system components. |  |\n| SURF-OWNER-DEC-002 | Private workspace route prefixes | approved_direction | V1 private workspace prefixes are /vendor for vendor users and /company for practitioner company users. Both are authenticated surfaces. /company has no public company profile or public directory behavior in V1. | Short actor-aligned prefixes are clearer than /portal/vendor or /workspace/company and avoid implying a generic portal architecture before it is needed. | 2026-05-07T13:35:10.892Z | /vendor/* routes are vendor-authenticated workspace routes, separate from public vendor profile/directory pages., /company/* routes are private practitioner company workspace routes only., Route guards and navigation must not expose /company as a public profile or directory surface., Page-template-spec should use /vendor and /company as canonical private prefixes. |  |\n| SURF-OWNER-DEC-003 | Admin and publishing shell structure | approved_direction | V1 uses a single authenticated admin shell. Publishing/Studio is an admin module inside /admin rather than a separate top-level /studio shell. | B2BEA admin users can manage operations and publishing from one control plane. This reduces navigation fragmentation while preserving publishing-specific workflows and components as a distinct module. | 2026-05-07T13:35:53.103Z | /admin is the canonical authenticated admin shell., Publishing routes should live under an admin module such as /admin/studio or /admin/publishing unless route inventory exposes a stronger existing convention., Current /studio routes should be treated as legacy/current-state routes to migrate, redirect, or mount under /admin., Publishing keeps its lifecycle model: draft, preview, scheduled, published, archived, rolled_back., Page-template-spec should define admin module navigation rather than a separate Studio shell. |  |\n| SURF-OWNER-DEC-004 | V1, deferred, and removed route classification rule | approved_direction | V1 keeps the public content/discovery/membership surfaces, auth/account surfaces, a single /admin shell, /vendor private workspace, /company private workspace, and member profile/dashboard surfaces. V1 defers public practitioner company profiles/directories, advanced certification/event/survey/form/notification/export systems unless required by launch. Legacy duplicate or one-off routes are removed or redirected into canonical page families during route inventory. | Classifying by surface first gives route inventory a clear working rule without prematurely deciding every individual route before the actual route scan. | 2026-05-07T13:37:50.795Z | Route-family inventory should tag each current route as v1_keep, defer, remove, or redirect., Every v1_keep route must map to a page family or approved custom exception., Deferred routes should retain rationale and dependencies, not disappear silently., Removed/redirected routes need canonical target or explicit no-replacement decision. | Public core pages: home, about, join/contact, topic pages, Public content: blog, insights, resources, guides, reports, Public directories: vendors/exchange, people, careers/jobs, courses, events, Auth/account: login, signup, confirm email, checkout/upgrade, Single /admin shell including publishing/studio module, /vendor private vendor workspace, /company private practitioner company workspace, Member profile/dashboard/account surfaces |\n| SURF-OWNER-DEC-005 | Maturity assessment versus general survey system | approved_direction | Current maturity assessment stays in V1 as a bounded special assessment flow and the first reusable maturity-assessment pattern. Future maturity assessments for other areas should reuse this pattern. A broader standard survey/form engine is still needed but remains a separate capability/spec. |  | 2026-05-07T13:54:48.203Z | Do not defer /assessments/maturity routes solely because the general survey system is not ready., Do not force maturity assessments into the generic survey builder before modeling the maturity-specific UX/data/scoring pattern., page-template-spec should include maturity_assessment_special_flow., survey-system-spec remains a next artifact for standard surveys/forms. |  |"
        },
        {
          "title": "Surface Catalog",
          "level": 2,
          "body": "| id | name | actors | purpose | acceptance | exclusions | page_families | required_patterns |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| public_site | Public Site | anonymous_visitor, authenticated_member, vendor_prospect, practitioner_prospect, search_engine, ai_crawler | Marketing, editorial, discovery, directories, resources, academy previews, events, jobs, public people profiles, and public vendor profiles. | Each public route maps to one page family or an approved exception., Public vendor profiles render from reviewed/published vendor projection only., Protected resource/course access is checked server-side through entitlement rules., Directory filters, search, and cards share one reusable contract across people/vendors/jobs/courses/resources where practical., Archived or draft public content is absent from navigation, search index, and sitemap. | public practitioner company profile pages, public practitioner company directory, ungated protected resource downloads through client-side state only | marketing_home_or_landing, standard_content_page, editorial_index, editorial_detail, directory_index, profile_detail, resource_index, resource_detail_or_download, course_catalog, course_preview_or_lesson_gate, job_board, job_detail, event_index, event_detail, topic_hub, custom_html_import | global navigation and search modal, standard page header with B2BEA design-system page title scale unless marked editorial/custom, directory filter/search bar with stable mobile controls, profile/detail card pattern, resource download/gating state pattern, auth-aware CTA pattern, empty/loading/error states for client-backed lists, SEO/GEO/social metadata per publishable page |\n| auth_account | Auth And Account | anonymous_visitor, authenticated_user, member, vendor_user, company_user, admin | Login, signup, email confirmation, password/magic-link/OAuth, account routing, and shared access failure states. | A user with multiple roles can reach the correct surfaces without role overwrite., Account and membership status is explainable from entitlement evaluator output., Client state cannot grant protected resource/course/vendor/company/admin access. |  | auth_form, email_confirmation, account_settings, checkout_or_upgrade, access_denied_or_upgrade_gate | single auth layout, role-aware post-login routing, return URL preservation, clear denied/expired/upgrade states, server-side access verification for protected actions |\n| b2bea_admin | B2BEA Admin | justin, brett, sarah, b2bea_admin | Single authenticated admin control plane for operational records, review workflows, publishing/studio modules, users, vendors, companies, academy, jobs, categories, media, dashboard metrics, and system governance. | Admin pages do not use large public marketing hero patterns., Every reviewable external submission has status, owner, timestamp, decision, and audit trail., Admin direct-publish capabilities are limited to core admins and still require metadata validation., Admin can see why a member/vendor/company has access before changing entitlements. |  | admin_dashboard, admin_table_index, admin_record_detail, admin_create_edit_form, admin_review_queue, admin_settings_or_taxonomy, admin_metrics_panel, admin_publishing_dashboard, standard_page_editor, custom_html_import_registry, media_library, preview_publish_panel, metadata_editor | compact operational layout, admin nav and breadcrumbs, table/list with filters and saved status pills, drawer/detail/edit workflow, review queue states: submitted, changes_requested, approved, rejected, published, archived, audit/event side panel for sensitive records, empty/loading/error states, bulk actions only where policy permits, module navigation for operations versus publishing, publishing lifecycle states: draft, preview, scheduled, published, archived, rolled_back, metadata validation before publish, preview/publish/archive/rollback controls |\n| admin_publishing_module | Admin Publishing Module | justin, brett, sarah, content_admin | Publishing/content production module inside the single /admin shell. | Core admins can publish standard Sanity pages without developer intervention., Custom HTML import cannot bypass header/footer/metadata rules unless explicitly marked full-custom., Every published item has canonical URL, metadata, preview evidence, and rollback/archive path. |  | content_dashboard, standard_page_editor, custom_html_import_registry, media_library, preview_publish_panel, metadata_editor | content status lifecycle: draft, preview, scheduled, published, archived, custom HTML lifecycle: draft, preview, published, archived, rolled_back, required SEO/GEO/social metadata validation before publish, preview URL for all publishable items, asset validation and approved external URL handling, rollback/archive controls for custom imports |\n| member_portal | Member Portal And Profile | member, pro_member, author, community_leader | Member dashboard, profile/account editing, member/pro resources, academy progress, community identity, and career profile management. | Members see only their own profile/account/progress data unless data is intentionally public., Pro member and standard member access are visibly and server-testably different., Profile visibility settings control public projection and search exposure. |  | member_dashboard, profile_editor, resource_library, academy_progress, career_profile, settings_or_billing_status | personal dashboard summary, profile completion and visibility controls, membership/pro entitlement display, course progress and certificate state display, resource gate with upgrade/expired/access-denied states, account-safe edit/save/error patterns |\n| vendor_portal | Vendor Portal | vendor_admin, vendor_member, b2bea_admin | Vendor workspace for profile management, team access, leads, sponsorship/content/resource/course/event submissions, and own-account analytics. Public vendor profile remains public but reviewed. | Vendor-authored changes do not alter public profile until reviewed by B2BEA admin., Vendor users cannot access another vendor account by URL or client state changes., Exports are bounded to own-account aggregates and permitted lead details only., Public vendor profile URL and metadata remain stable across private workspace edits. |  | vendor_dashboard, vendor_profile_editor, vendor_team_management, vendor_submission_queue, vendor_leads_analytics, vendor_billing_membership | private vendor dashboard, public profile preview and submitted-change review flow, team member roles and invitation states, own-lead and own-analytics views only, submission workflow for resources/courses/events/sponsorships, billing/membership status display or HubSpot/Stripe handoff state |\n| company_workspace | Practitioner Company Workspace | company_admin, company_employee, b2bea_admin | Private company account surface for employees, seats, academy assignments, company-created job submissions, entitlements, and own-company reporting. | No practitioner company workspace data is exposed on a public profile route in V1., Company admins can invite/remove employees and seat access changes affect entitlements through the evaluator., Company-created jobs cannot become public without B2BEA admin approval., Company exports include only own-company data and exclude platform-wide comparisons or sensitive user-level data unless explicitly consented and permitted. | public company profile pages, public company directory, company-owned CRM pipeline | company_dashboard, company_roster, company_invites, company_seats_entitlements, company_academy_assignments, company_jobs_review_status, company_analytics_exports, company_settings | private-only workspace shell, employee invite/accept/remove lifecycle, seat assignment/revocation state display, academy assignment and progress reporting, job submission status: draft, submitted_for_review, changes_requested, approved, published, expired, archived, own-company analytics/export controls, audit trail for employee, seat, academy, job, export, and settings changes |"
        },
        {
          "title": "Shared Contracts",
          "level": 2,
          "body": "```json\n{\n  \"design\": [\n    \"Use B2BEA design-system tokens and page/header/control/card/table/form contracts for all in-scope surfaces; Lovable remains the starting reference only.\",\n    \"Admin/portal surfaces use compact operational hierarchy, not public marketing heroes.\",\n    \"Cards do not nest inside decorative cards; tables and filters use stable dimensions on mobile.\",\n    \"Exceptions require explicit page family marker and still pass accessibility/responsive/metadata QA.\"\n  ],\n  \"navigation\": [\n    \"Public nav must not expose private workspace routes unless authenticated and entitled.\",\n    \"Admin/vendor/company/member surfaces use surface-specific navigation with a clear return path to public site.\",\n    \"Cross-surface links preserve return URL when auth is required.\"\n  ],\n  \"permissions\": [\n    \"Server-side guard is required for all protected actions and protected data reads.\",\n    \"Client UI can hide controls but cannot be the source of authorization.\",\n    \"Entitlement decisions must be traceable to subject, resource, entitlement key, source record, and reason.\"\n  ],\n  \"state_model\": [\n    \"Every data-backed surface defines loading, empty, error, unauthorized, expired, draft, published/active, archived, and deleted/removed states as applicable.\",\n    \"External submissions use review statuses instead of direct public mutation.\",\n    \"Archived records are hidden from public discovery by default.\"\n  ],\n  \"publishing_and_metadata\": [\n    \"Every public route has a canonical URL and metadata contract.\",\n    \"Draft/preview/scheduled content is not indexed or linked publicly.\",\n    \"Slug changes require redirect handling.\",\n    \"Custom HTML imports must declare owner, route, status, metadata, asset bundle, preview URL, and rollback/archive path.\"\n  ]\n}\n```"
        },
        {
          "title": "Qa Release Readiness",
          "level": 2,
          "body": "```json\n{\n  \"summary\": \"Release readiness gates for route conformance, design-system conformance, permission boundaries, publishing safety, responsive/browser smoke, data/migration safety, and final release acceptance.\",\n  \"version\": 1,\n  \"artifact_id\": \"b523c55c-a22a-4ba6-94c0-d306656e57f7\",\n  \"artifact_type\": \"qa-release-readiness-spec\",\n  \"blocks_build_until_plan_review\": true\n}\n```"
        },
        {
          "title": "Hard Stops Before Build",
          "level": 2,
          "body": "- Do not start rebuild implementation until surface specs, page-template-spec, core data/entitlement specs, and implementation plan are reviewed.\n- Do not build public practitioner company profiles or a public practitioner company directory in V1.\n- Do not let vendor/company/member client state grant access or publish public records.\n- Do not preserve page-specific CSS for shared controls, cards, forms, filters, nav, tables, or page headers.\n- Do not let Sanity, Supabase, and HubSpot own the same operational record without a documented source-of-truth boundary."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- Each V1 surface has named actors, purpose, route families, page families, data sources, required patterns, exclusions, and acceptance checks.\n- Surface boundaries align with current design, publishing, data, entitlement, and company-workspace specs.\n- Page-template-spec can be produced from this artifact without resolving major surface ownership questions.\n- Implementation agents can tell whether a route belongs to public, auth/account, admin, publishing/studio, member, vendor, or company workspace.\n- All P0 public/private exposure decisions are explicit, especially vendor public profiles versus private practitioner company workspaces."
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- qa-release-readiness-spec\n- plan\n- sanity-schema-spec\n- custom-html-import-spec\n- notification-spec\n- academy-certification-spec\n- vendor-portal-workflow-spec"
        },
        {
          "title": "Linked Artifacts",
          "level": 2,
          "body": "```json\n{\n  \"qa_release_readiness_spec\": {\n    \"id\": \"b523c55c-a22a-4ba6-94c0-d306656e57f7\",\n    \"version\": 1\n  }\n}\n```"
        },
        {
          "title": "Source Artifacts",
          "level": 2,
          "body": "| id | status | version | artifact_type |\n| --- | --- | --- | --- |\n| 0555c2b6-6f1f-41e5-bacb-7ca169b32fd5 | draft | 1 | blueprint |\n| c889a1fe-c3ce-4b0d-873c-af4e0ec8dfe4 | draft | 5 | capability-map |\n| 05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6 | draft | 1 | company-workspace-data-spec |\n| 2f473004-9063-4fe9-8290-5cbd1b19dfb4 | draft | 1 | data-model-spec |\n| 4c3651ac-9a69-4117-a355-750b61f540c9 | draft | 2 | design-system-spec |\n| 355b3249-3af9-45a4-9c45-67777bd2d72d | draft | 1 | entitlement-model-spec |\n| a7044f26-904f-430a-a3c6-219f392c3a2b | draft | 1 | feature-ux-spec |\n| c97be414-3dde-4085-9f57-fc38632d2de0 | draft | 1 | intent |\n| dcfc8620-9f28-4019-aeeb-de3e279fd7a7 | draft | 3 | permission-lifecycle-matrix |\n| 80328220-3deb-4cf9-a68f-d440b41a38da | draft | 3 | production-readiness-gap-register |\n| a9636e2f-a4be-4586-82dd-c1a7bf3199fa | draft | 1 | publishing-model-spec |\n| f6210edd-8414-41e9-a5d2-2e3d49ae4b18 | draft | 2 | research |"
        },
        {
          "title": "Page Template Spec Artifact",
          "level": 2,
          "body": "```json\n{\n  \"status\": \"draft\",\n  \"version\": 1,\n  \"artifact_id\": \"427c04a9-40b7-4e55-a642-65b2aee20b2b\",\n  \"family_count\": 26,\n  \"generated_at\": \"2026-05-07T14:36:17.481Z\",\n  \"artifact_type\": \"page-template-spec\"\n}\n```"
        },
        {
          "title": "Survey System Spec Artifact",
          "level": 2,
          "body": "```json\n{\n  \"status\": \"draft\",\n  \"version\": 1,\n  \"artifact_id\": \"823d14d7-5992-42f3-a2f4-f4738a045f7c\",\n  \"generated_at\": \"2026-05-07T15:32:18.075Z\",\n  \"artifact_type\": \"survey-system-spec\"\n}\n```"
        },
        {
          "title": "Route Family Inventory Artifact",
          "level": 2,
          "body": "```json\n{\n  \"status\": \"draft\",\n  \"version\": 1,\n  \"artifact_id\": \"2cec821e-07ba-4aca-81fb-078f163adf44\",\n  \"route_count\": 97,\n  \"generated_at\": \"2026-05-07T13:44:29.161Z\",\n  \"artifact_type\": \"route-family-inventory\",\n  \"by_disposition\": {\n    \"defer\": 4,\n    \"v1_keep\": 90,\n    \"redirect\": 3\n  },\n  \"by_target_surface\": {\n    \"b2bea_admin\": 11,\n    \"public_site\": 70,\n    \"auth_account\": 8,\n    \"member_portal\": 7,\n    \"vendor_portal\": 1\n  }\n}\n```"
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-surface-specs-f703217645.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-surface-specs-f703217645.json"
    },
    {
      "id": "2026-05-07-b2bea-org-route-family-inventory-2e8099b798",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-route-family-inventory.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.729Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Route Family Inventory",
      "summary": "B2BEA.org V1 Route Family Inventory Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: route family inventory Artifact ID: 2cec821e 07ba 4aca 81fb 078f163adf44 Version: 3 Status: draft Updated: 2026 05 07T13:54:34.797+00:00 Status draft Basis surface specs v6 owner approved...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Route Family Inventory",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `route-family-inventory`\n- Artifact ID: `2cec821e-07ba-4aca-81fb-078f163adf44`\n- Version: `3`\n- Status: `draft`\n- Updated: `2026-05-07T13:54:34.797+00:00`"
        },
        {
          "title": "Status",
          "level": 2,
          "body": "draft"
        },
        {
          "title": "Basis",
          "level": 2,
          "body": "- surface-specs v6 owner-approved surface decisions\n- current repo src route templates from git ls-tree\n- B2BEA design-system checkout for design treatment terminology"
        },
        {
          "title": "Summary",
          "level": 2,
          "body": "```json\n{\n  \"deferred\": [],\n  \"redirects\": [\n    {\n      \"to\": \"/admin/studio\",\n      \"from\": \"/studio\",\n      \"reason\": \"Decision 3: top-level /studio migrates under single /admin shell.\"\n    },\n    {\n      \"to\": \"/admin/studio/media\",\n      \"from\": \"/studio/media\",\n      \"reason\": \"Decision 3: top-level /studio migrates under single /admin shell.\"\n    },\n    {\n      \"to\": \"/vendor\",\n      \"from\": \"/vendor-portal\",\n      \"reason\": \"Decision 2: private vendor workspace prefix is /vendor.\"\n    }\n  ],\n  \"route_count\": 97,\n  \"needs_review\": [],\n  \"by_disposition\": {\n    \"v1_keep\": 94,\n    \"redirect\": 3\n  },\n  \"by_page_family\": {\n    \"job_board\": 1,\n    \"job_detail\": 1,\n    \"event_index\": 1,\n    \"topic_index\": 2,\n    \"admin_module\": 9,\n    \"event_detail\": 1,\n    \"course_detail\": 1,\n    \"course_catalog\": 1,\n    \"resource_index\": 7,\n    \"directory_index\": 10,\n    \"editorial_index\": 4,\n    \"editorial_detail\": 3,\n    \"system_generated\": 1,\n    \"vendor_dashboard\": 1,\n    \"audience_landing_page\": 6,\n    \"people_profile_detail\": 1,\n    \"vendor_profile_detail\": 1,\n    \"admin_publishing_module\": 2,\n    \"auth_or_account_utility\": 8,\n    \"course_learning_surface\": 4,\n    \"standard_marketing_page\": 7,\n    \"topic_or_concept_detail\": 8,\n    \"marketing_home_or_landing\": 1,\n    \"member_dashboard_or_account\": 7,\n    \"resource_detail_or_download\": 5,\n    \"maturity_assessment_special_flow\": 4\n  },\n  \"by_target_surface\": {\n    \"b2bea_admin\": 11,\n    \"public_site\": 70,\n    \"auth_account\": 8,\n    \"member_portal\": 7,\n    \"vendor_portal\": 1\n  }\n}\n```"
        },
        {
          "title": "Revision Note",
          "level": 2,
          "body": "Owner approved maturity assessment as V1 special flow and reusable maturity-assessment pattern seed."
        },
        {
          "title": "Routes",
          "level": 2,
          "body": "| notes | route | disposition | page_family | source_file | target_surface | current_surface | canonical_target |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| Homepage may stay custom under approved surface decision. | / | v1_keep | marketing_home_or_landing | src/index.njk | public_site | public_site | / |\n|  | /about | v1_keep | standard_marketing_page | src/pages/about.njk | public_site | public_site | /about |\n|  | /account | v1_keep | member_dashboard_or_account | src/account/index.njk | member_portal | member_portal | /account |\n|  | /admin | v1_keep | admin_module | src/admin/index.njk | b2bea_admin | b2bea_admin | /admin |\n|  | /admin/academy | v1_keep | admin_module | src/admin/academy/index.njk | b2bea_admin | b2bea_admin | /admin/academy |\n|  | /admin/academy/course | v1_keep | admin_module | src/admin/academy/course.njk | b2bea_admin | b2bea_admin | /admin/academy/course |\n|  | /admin/academy/lesson | v1_keep | admin_module | src/admin/academy/lesson.njk | b2bea_admin | b2bea_admin | /admin/academy/lesson |\n|  | /admin/categories | v1_keep | admin_module | src/admin/categories/index.njk | b2bea_admin | b2bea_admin | /admin/categories |\n|  | /admin/companies | v1_keep | admin_module | src/admin/companies/index.njk | b2bea_admin | b2bea_admin | /admin/companies |\n|  | /admin/jobs | v1_keep | admin_module | src/admin/jobs/index.njk | b2bea_admin | b2bea_admin | /admin/jobs |\n|  | /admin/users | v1_keep | admin_module | src/admin/users/index.njk | b2bea_admin | b2bea_admin | /admin/users |\n|  | /admin/vendors | v1_keep | admin_module | src/admin/vendors/index.njk | b2bea_admin | b2bea_admin | /admin/vendors |\n|  | /agencies | v1_keep | directory_index | src/agencies/index.njk | public_site | public_site | /agencies |\n| Owner decision: keep current maturity assessment in V1 as a bounded special assessment flow., This should become the first instance of a reusable maturity-assessment pattern for future domain assessments, not the generalized survey/form builder., General survey/form builder remains separate and can still be planned/deferred. | /assessments | v1_keep | maturity_assessment_special_flow | src/assessments/index.njk | public_site | public_site | /assessments |\n| Owner decision: keep current maturity assessment in V1 as a bounded special assessment flow., This should become the first instance of a reusable maturity-assessment pattern for future domain assessments, not the generalized survey/form builder., General survey/form builder remains separate and can still be planned/deferred. | /assessments/maturity | v1_keep | maturity_assessment_special_flow | src/assessments/maturity/index.njk | public_site | public_site | /assessments/maturity |\n| Owner decision: keep current maturity assessment in V1 as a bounded special assessment flow., This should become the first instance of a reusable maturity-assessment pattern for future domain assessments, not the generalized survey/form builder., General survey/form builder remains separate and can still be planned/deferred. | /assessments/maturity/results | v1_keep | maturity_assessment_special_flow | src/assessments/maturity/results/index.njk | public_site | public_site | /assessments/maturity/results |\n| Owner decision: keep current maturity assessment in V1 as a bounded special assessment flow., This should become the first instance of a reusable maturity-assessment pattern for future domain assessments, not the generalized survey/form builder., General survey/form builder remains separate and can still be planned/deferred. | /assessments/maturity/take | v1_keep | maturity_assessment_special_flow | src/assessments/maturity/take/index.njk | public_site | public_site | /assessments/maturity/take |\n| Signature editorial detail can be marked custom by exception; default is B2BEA design system. | /authors/:slug | v1_keep | editorial_detail | src/authors/author.njk | public_site | public_site | /authors/:slug |\n|  | /blog | v1_keep | editorial_index | src/blog/index.njk | public_site | public_site | /blog |\n| Signature editorial detail can be marked custom by exception; default is B2BEA design system. | /blog/:slug | v1_keep | editorial_detail | src/blog/post.njk | public_site | public_site | /blog/:slug |\n|  | /blog/b2b-ecommerce-is-not-a-technology-problem | v1_keep | editorial_index | src/blog/b2b-ecommerce-is-not-a-technology-problem.md | public_site | public_site | /blog/b2b-ecommerce-is-not-a-technology-problem |\n|  | /careers | v1_keep | job_board | src/careers/index.njk | public_site | public_site | /careers |\n|  | /careers/:slug | v1_keep | job_detail | src/careers/job.njk | public_site | public_site | /careers/:slug |\n|  | /case-studies | v1_keep | resource_index | src/case-studies/index.njk | public_site | public_site | /case-studies |\n|  | /case-studies/:slug | v1_keep | resource_detail_or_download | src/case-studies/case-study.njk | public_site | public_site | /case-studies/:slug |\n|  | /checkout | v1_keep | auth_or_account_utility | src/pages/checkout.njk | auth_account | auth_account | /checkout |\n|  | /checkout-success | v1_keep | auth_or_account_utility | src/pages/checkout-success.njk | auth_account | auth_account | /checkout-success |\n|  | /concepts | v1_keep | topic_index | src/concepts/index.njk | public_site | public_site | /concepts |\n|  | /concepts/:slug | v1_keep | topic_or_concept_detail | src/concepts/concept.njk | public_site | public_site | /concepts/:slug |\n|  | /concepts/ai-product-recommendations-b2b | v1_keep | topic_or_concept_detail | src/concepts/ai-product-recommendations-b2b.njk | public_site | public_site | /concepts/ai-product-recommendations-b2b |\n|  | /confirm-email | v1_keep | auth_or_account_utility | src/confirm-email/index.njk | auth_account | auth_account | /confirm-email |\n|  | /consultants | v1_keep | directory_index | src/consultants/index.njk | public_site | public_site | /consultants |\n|  | /contact | v1_keep | standard_marketing_page | src/pages/contact.njk | public_site | public_site | /contact |\n|  | /courses | v1_keep | course_catalog | src/courses/index.njk | public_site | public_site | /courses |\n|  | /courses/:slug | v1_keep | course_detail | src/courses/course.njk | public_site | public_site | /courses/:slug |\n|  | /courses/lessons/:slug | v1_keep | course_learning_surface | src/courses/lessons/lesson.njk | public_site | public_site | /courses/lessons/:slug |\n|  | /courses/modules/challenge | v1_keep | course_learning_surface | src/courses/modules/challenge.njk | public_site | public_site | /courses/modules/challenge |\n|  | /courses/modules/challenge-feedback | v1_keep | course_learning_surface | src/courses/modules/challenge-feedback.njk | public_site | public_site | /courses/modules/challenge-feedback |\n|  | /courses/modules/test | v1_keep | course_learning_surface | src/courses/modules/test.njk | public_site | public_site | /courses/modules/test |\n|  | /dashboard | v1_keep | member_dashboard_or_account | src/dashboard/index.njk | member_portal | member_portal | /dashboard |\n|  | /dashboard/onboarding | v1_keep | member_dashboard_or_account | src/dashboard/onboarding/index.njk | member_portal | member_portal | /dashboard/onboarding |\n|  | /dashboard/profile | v1_keep | member_dashboard_or_account | src/dashboard/profile.njk | member_portal | member_portal | /dashboard/profile |\n|  | /dashboard/profile/edit | v1_keep | member_dashboard_or_account | src/dashboard/profile/edit.njk | member_portal | member_portal | /dashboard/profile/edit |\n|  | /dashboard/profile/knowledge | v1_keep | member_dashboard_or_account | src/dashboard/profile/knowledge.njk | member_portal | member_portal | /dashboard/profile/knowledge |\n|  | /dashboard/welcome | v1_keep | member_dashboard_or_account | src/dashboard/welcome/index.njk | member_portal | member_portal | /dashboard/welcome |\n|  | /distributors | v1_keep | directory_index | src/distributors/index.njk | public_site | public_site | /distributors |\n| Full event operations/sponsorship workflow remains deferred unless needed for launch. | /events | v1_keep | event_index | src/events/index.njk | public_site | public_site | /events |\n| Full event operations/sponsorship workflow remains deferred unless needed for launch. | /events/:slug | v1_keep | event_detail | src/events/event.njk | public_site | public_site | /events/:slug |\n|  | /exchange | v1_keep | directory_index | src/exchange/index.njk | public_site | public_site | /exchange |\n|  | /exchange/:slug | v1_keep | vendor_profile_detail | src/exchange/exchange.njk | public_site | public_site | /exchange/:slug |\n|  | /exchange/vendor-claim | v1_keep | directory_index | src/exchange/vendor-claim.njk | public_site | public_site | /exchange/vendor-claim |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/agencies | v1_keep | audience_landing_page | src/for/agencies/index.njk | public_site | public_site | /for/agencies |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/consultants | v1_keep | audience_landing_page | src/for/consultants/index.njk | public_site | public_site | /for/consultants |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/distributors | v1_keep | audience_landing_page | src/for/distributors/index.njk | public_site | public_site | /for/distributors |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/manufacturers | v1_keep | audience_landing_page | src/for/manufacturers/index.njk | public_site | public_site | /for/manufacturers |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/software-providers | v1_keep | audience_landing_page | src/for/software-providers/index.njk | public_site | public_site | /for/software-providers |\n| Audience/campaign landing pages may stay custom when explicitly marked. | /for/vendors | v1_keep | audience_landing_page | src/for/vendors/index.njk | public_site | public_site | /for/vendors |\n|  | /guides | v1_keep | resource_index | src/guides/index.njk | public_site | public_site | /guides |\n|  | /guides/:slug | v1_keep | resource_detail_or_download | src/guides/guide.njk | public_site | public_site | /guides/:slug |\n|  | /how-we-use-ai | v1_keep | standard_marketing_page | src/how-we-use-ai/index.njk | public_site | public_site | /how-we-use-ai |\n|  | /insights | v1_keep | editorial_index | src/insights/index.njk | public_site | public_site | /insights |\n|  | /join | v1_keep | standard_marketing_page | src/pages/join.njk | public_site | public_site | /join |\n|  | /leaders | v1_keep | directory_index | src/leaders/index.njk | public_site | public_site | /leaders |\n|  | /login | v1_keep | auth_or_account_utility | src/login/index.njk | auth_account | auth_account | /login |\n|  | /manufacturers | v1_keep | directory_index | src/manufacturers/index.njk | public_site | public_site | /manufacturers |\n|  | /membership-terms | v1_keep | auth_or_account_utility | src/pages/membership-terms.njk | auth_account | auth_account | /membership-terms |\n|  | /people | v1_keep | directory_index | src/people/index.njk | public_site | public_site | /people |\n|  | /people/:slug | v1_keep | people_profile_detail | src/people/person.njk | public_site | public_site | /people/:slug |\n|  | /podcast | v1_keep | editorial_index | src/podcast/index.njk | public_site | public_site | /podcast |\n| Signature editorial detail can be marked custom by exception; default is B2BEA design system. | /podcast/:slug | v1_keep | editorial_detail | src/podcast/episode.njk | public_site | public_site | /podcast/:slug |\n|  | /reports | v1_keep | resource_index | src/reports/index.njk | public_site | public_site | /reports |\n|  | /reports/:slug | v1_keep | resource_detail_or_download | src/reports/report.njk | public_site | public_site | /reports/:slug |\n|  | /resources | v1_keep | resource_index | src/resources/index.njk | public_site | public_site | /resources |\n|  | /resources/:category | v1_keep | resource_index | src/resources/category-hub.njk | public_site | public_site | /resources/:category |\n| Major resource landing pages may stay custom when explicitly marked. | /resources/2026-b2b-ecommerce-trends | v1_keep | resource_detail_or_download | src/resources/2026-b2b-ecommerce-trends/index.njk | public_site | public_site | /resources/2026-b2b-ecommerce-trends |\n|  | /resources/2026-b2b-ecommerce-trends/download | v1_keep | resource_index | src/resources/2026-b2b-ecommerce-trends/download.njk | public_site | public_site | /resources/2026-b2b-ecommerce-trends/download |\n| Major resource landing pages may stay custom when explicitly marked. | /resources/career-acceleration-kit | v1_keep | resource_detail_or_download | src/resources/career-acceleration-kit/index.njk | public_site | public_site | /resources/career-acceleration-kit |\n|  | /resources/career-acceleration-kit/download | v1_keep | resource_index | src/resources/career-acceleration-kit/download.njk | public_site | public_site | /resources/career-acceleration-kit/download |\n|  | /services | v1_keep | standard_marketing_page | src/pages/services.njk | public_site | public_site | /services |\n|  | /signup | v1_keep | auth_or_account_utility | src/signup/index.njk | auth_account | auth_account | /signup |\n|  | /sitemap | v1_keep | system_generated | src/sitemap.njk | public_site | public_site | /sitemap |\n|  | /software-providers | v1_keep | directory_index | src/software-providers/index.njk | public_site | public_site | /software-providers |\n| Decision 3: top-level /studio migrates under single /admin shell. | /studio | redirect | admin_publishing_module | src/studio/index.njk | b2bea_admin | publishing_studio | /admin/studio |\n| Decision 3: top-level /studio migrates under single /admin shell. | /studio/media | redirect | admin_publishing_module | src/studio/media/index.njk | b2bea_admin | publishing_studio | /admin/studio/media |\n|  | /terms | v1_keep | auth_or_account_utility | src/pages/terms.njk | auth_account | auth_account | /terms |\n|  | /topics | v1_keep | topic_index | src/topics/index.njk | public_site | public_site | /topics |\n|  | /topics/ai | v1_keep | topic_or_concept_detail | src/topics/ai.njk | public_site | public_site | /topics/ai |\n|  | /topics/b2b-fundamentals | v1_keep | topic_or_concept_detail | src/topics/b2b-fundamentals.njk | public_site | public_site | /topics/b2b-fundamentals |\n|  | /topics/customer-adoption | v1_keep | topic_or_concept_detail | src/topics/customer-adoption.njk | public_site | public_site | /topics/customer-adoption |\n|  | /topics/digital-transformation | v1_keep | topic_or_concept_detail | src/topics/digital-transformation.njk | public_site | public_site | /topics/digital-transformation |\n|  | /topics/executive-alignment | v1_keep | topic_or_concept_detail | src/topics/executive-alignment.njk | public_site | public_site | /topics/executive-alignment |\n|  | /topics/technology | v1_keep | topic_or_concept_detail | src/topics/technology.njk | public_site | public_site | /topics/technology |\n|  | /upgrade | v1_keep | auth_or_account_utility | src/pages/upgrade.njk | auth_account | auth_account | /upgrade |\n| Should align with vendor commercial workflow and HubSpot handoff. | /vendor-application | v1_keep | standard_marketing_page | src/pages/vendor-application.njk | public_site | public_site | /vendor-application |\n| Should align with vendor commercial workflow and HubSpot handoff. | /vendor-membership | v1_keep | standard_marketing_page | src/pages/vendor-membership.njk | public_site | public_site | /vendor-membership |\n| Decision 2: private vendor workspace prefix is /vendor. | /vendor-portal | redirect | vendor_dashboard | src/vendor-portal/index.njk | vendor_portal | vendor_portal | /vendor |\n|  | /vendors/orocommerce | v1_keep | directory_index | src/vendors/orocommerce.njk | public_site | public_site | /vendors/orocommerce |"
        },
        {
          "title": "Classification Rules",
          "level": 2,
          "body": "```json\n{\n  \"defer\": \"Route/capability is not part of baseline V1 unless launch explicitly requires it.\",\n  \"remove\": \"Route has no replacement or active product path after inventory review.\",\n  \"v1_keep\": \"Current route remains in V1 and must map to a canonical page family or approved custom exception.\",\n  \"redirect\": \"Route should migrate to a new canonical route while preserving access/SEO as needed.\",\n  \"needs_review\": \"Route matched a sensitive or ambiguous area requiring owner confirmation before plan.\"\n}\n```"
        },
        {
          "title": "Owner Decisions",
          "level": 2,
          "body": "| id | topic | decision | decided_at | implications |\n| --- | --- | --- | --- | --- |\n| RFI-OWNER-DEC-001 | Maturity assessment V1 treatment | Keep the current maturity assessment routes in V1 as a bounded special assessment flow. Treat this as the first instance of a reusable maturity-assessment pattern for future domain maturity assessments. Keep the broader standard survey/form engine as a separate capability/spec. | 2026-05-07T13:54:34.797Z | /assessments and /assessments/maturity/* move from defer to v1_keep., page-template-spec needs a maturity_assessment_special_flow family., survey-system-spec should still define general survey/forms separately and not force the maturity assessment into a generic survey model too early. |"
        },
        {
          "title": "Source",
          "level": 2,
          "body": "```json\n{\n  \"site_head\": \"fabc8f2\",\n  \"site_repo\": \"https://github.com/b2bea-org/b2bea-website.git\",\n  \"checkout_note\": \"Fixed upstream Windows checkout blocker by removing tracked root macOS Icon\\\\r file in commit fabc8f2. Fresh Windows checkout now succeeds cleanly.\",\n  \"site_local_path\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-website\",\n  \"design_system_head\": \"d83614a\",\n  \"design_system_repo\": \"https://github.com/b2bea-org/b2bea-org-design-system.git\",\n  \"design_system_local_path\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-org-design-system\"\n}\n```"
        },
        {
          "title": "Next Steps",
          "level": 2,
          "body": "- Review redirects and needs_review routes with Justin.\n- Decide whether maturity assessment remains a special V1 flow or defers with generalized survey system.\n- Use this inventory as input to page-template-spec.\n- For every v1_keep route, define canonical template family, required components, states, data source, and QA checks."
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-route-family-inventory-2e8099b798.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-route-family-inventory-2e8099b798.json"
    },
    {
      "id": "2026-05-07-b2bea-org-qa-release-readiness-spec-b862500254",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-qa-release-readiness-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.726Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org Rebuild",
      "summary": "B2BEA.org Rebuild Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: qa release readiness spec Artifact ID: b523c55c a22a 4ba6 94c0 d306656e57f7 Version: 1 Status: draft Updated: 2026 05 07T15:35:22.233+00:00 Purpose Define release readiness gates for the B2BEA.org rebuild ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org Rebuild",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `qa-release-readiness-spec`\n- Artifact ID: `b523c55c-a22a-4ba6-94c0-d306656e57f7`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-07T15:35:22.233+00:00`"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "Define release readiness gates for the B2BEA.org rebuild before implementation planning or V1 launch approval."
        },
        {
          "title": "Status",
          "level": 2,
          "body": "draft"
        },
        {
          "title": "Readiness Gates",
          "level": 2,
          "body": "| id | name | owner | checks | required_before | evidence_required |\n| --- | --- | --- | --- | --- | --- |\n| QA-01 | Route Inventory Conformance | atlas-codex or assigned reviewer | Every implemented route maps to route-family-inventory as v1_keep or redirect., No top-level /studio shell remains as a separate private shell after migration, except redirects or admin-mounted modules., /vendor-portal redirects to /vendor if retained for compatibility., Maturity assessment routes use the special-flow contract, not the standard survey system contract. | implementation_dispatch | route table diff, redirect map, manual route smoke results |\n| QA-02 | Design System Conformance | design/reviewer | Pages use B2BEA tokens/components from the design-system repo or approved local equivalents., Custom pages are limited to home, campaign/resource landing, approved HTML imports, or signature editorial features., Operational/private pages avoid one-off decorative layouts and follow reusable page-template contracts., No surface treats Lovable output as final authority without B2BEA hardening. | release_candidate | component/token usage review, desktop/mobile screenshots for representative page families, custom exception list |\n| QA-03 | Access And Permission Boundary | engineering/reviewer | Unauthenticated users cannot access /admin, /vendor, /company, member-only account/dashboard routes, or private APIs., Vendor users cannot access company workspace or admin-only data., Company users cannot access vendor portal data unless explicitly entitled by contract., Admin modules enforce admin permission, including publishing/studio functions., Survey exports and maturity assessment outputs follow permission and lifecycle contracts. | release_candidate | auth matrix test results, API/RLS checks where applicable, negative-path screenshots or logs |\n| QA-04 | Publishing And Content Safety | content/admin reviewer | Draft/review/publish lifecycle works for public content types kept in V1., Resource/blog pages have canonical metadata, slug policy, redirect policy, and preview behavior., Custom HTML imports are sanitized/reviewed and recorded as approved custom exceptions., No unpublished, archived, or removed content appears in public navigation/search. | release_candidate | publishing workflow smoke, metadata crawl, custom import review notes |\n| QA-05 | Responsive And Browser Smoke | qa/reviewer | Representative pages pass desktop and mobile viewport smoke., Navigation, drawers, forms, modals, dashboards, and assessment flows have no overlapping text or broken responsive states., No blocking console errors on core paths., Images/assets render and are not dark, cropped, or placeholder-like where users need real inspection. | release_candidate | Playwright or browser screenshots, console/error log summary, asset-render checklist |\n| QA-06 | Data And Migration Safety | engineering/reviewer | Implementation plan identifies which existing data models are reused vs migrated., Schema changes include rollback/forward migration notes and do not break existing artifacts/content., Seed/import scripts are idempotent where practical and scoped to B2BEA project/client data., Private workspace, entitlement, survey, and publishing records have clear ownership and lifecycle state. | implementation_dispatch_and_release_candidate | migration review, dry-run import results when applicable, data ownership checklist |\n| QA-07 | Release Decision Gate | Justin / release owner | All blocking readiness gates are pass or explicitly waived with owner/date/reason., Known issues are classified as block, defer, or accepted risk., Rollback path and post-launch monitoring owner are documented., Final V1 route list and redirects are approved. | production_launch | release acceptance artifact or approval note, known issues register, rollback note |"
        },
        {
          "title": "Hard Stops",
          "level": 2,
          "body": "- Do not start build execution until plan and exec plan review approve a bounded slice.\n- Do not launch with separate /admin and /studio shells unless owner reverses the single-admin decision.\n- Do not normalize signature custom surfaces into generic components when they are explicitly approved custom exceptions.\n- Do not let the standard survey system replace the special V1 maturity assessment flow without an approved migration decision."
        },
        {
          "title": "Required Test Matrix",
          "level": 2,
          "body": "```json\n{\n  \"roles\": [\n    \"anonymous\",\n    \"member\",\n    \"company user\",\n    \"vendor user\",\n    \"admin\"\n  ],\n  \"data_states\": [\n    \"empty\",\n    \"typical populated\",\n    \"long text/content\",\n    \"missing optional media\",\n    \"unauthorized/forbidden\"\n  ],\n  \"route_smoke\": [\n    \"home\",\n    \"resource/blog landing\",\n    \"representative resource detail\",\n    \"directory/listing page\",\n    \"auth/account route\",\n    \"member dashboard/profile\",\n    \"maturity assessment flow\",\n    \"/admin\",\n    \"/admin/studio or /admin/publishing\",\n    \"/vendor\",\n    \"/company\",\n    \"redirect routes\"\n  ],\n  \"viewport_smoke\": [\n    \"mobile narrow\",\n    \"tablet or mid-width\",\n    \"desktop\"\n  ]\n}\n```"
        },
        {
          "title": "Next Recommended Artifact",
          "level": 2,
          "body": "plan"
        },
        {
          "title": "Artifact",
          "level": 2,
          "body": "qa-release-readiness-spec"
        },
        {
          "title": "Client Id",
          "level": 2,
          "body": "b2bea"
        },
        {
          "title": "Repositories",
          "level": 2,
          "body": "```json\n{\n  \"website\": {\n    \"url\": \"https://github.com/b2bea-org/b2bea-website.git\",\n    \"note\": \"Windows checkout repaired by removing invalid tracked macOS Icon file.\",\n    \"local_path\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-website\",\n    \"baseline_commit\": \"fabc8f2\"\n  },\n  \"design_system\": {\n    \"url\": \"https://github.com/b2bea-org/b2bea-org-design-system.git\",\n    \"local_path\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-org-design-system\",\n    \"baseline_commit\": \"d83614a\"\n  }\n}\n```"
        },
        {
          "title": "Release Scope",
          "level": 2,
          "body": "```json\n{\n  \"shell_basis\": {\n    \"admin\": \"Single /admin shell; studio/publishing becomes admin module; current /studio routes redirect or mount under /admin.\",\n    \"vendor\": \"Vendor portal private prefix is /vendor.\",\n    \"company\": \"Company workspace private prefix is /company.\",\n    \"public_and_auth\": \"Public discovery/content and auth/account surfaces remain V1 where classified v1_keep.\"\n  },\n  \"design_basis\": \"Hardened B2BEA design system is target. Lovable is only seed/reference; reusable/index/operational/authenticated surfaces use the B2BEA design system unless a custom-page exception is approved.\",\n  \"v1_route_basis\": {\n    \"summary\": \"97 routes classified; 94 v1_keep and 3 redirects; maturity assessment remains V1 as bounded special flow; no deferred routes after owner decision.\",\n    \"route_family_inventory_artifact_id\": \"2cec821e-07ba-4aca-81fb-078f163adf44\"\n  }\n}\n```"
        },
        {
          "title": "Source Artifacts",
          "level": 2,
          "body": "```json\n{\n  \"surface-specs\": {\n    \"id\": \"77853042-e7a4-48bd-91a4-6e48d0484b1b\",\n    \"status\": \"draft\",\n    \"version\": 10\n  },\n  \"data-model-spec\": {\n    \"id\": \"2f473004-9063-4fe9-8290-5cbd1b19dfb4\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"design-system-spec\": {\n    \"id\": \"4c3651ac-9a69-4117-a355-750b61f540c9\",\n    \"status\": \"draft\",\n    \"version\": 4\n  },\n  \"page-template-spec\": {\n    \"id\": \"427c04a9-40b7-4e55-a642-65b2aee20b2b\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"survey-system-spec\": {\n    \"id\": \"823d14d7-5992-42f3-a2f4-f4738a045f7c\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"publishing-model-spec\": {\n    \"id\": \"a9636e2f-a4be-4586-82dd-c1a7bf3199fa\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"entitlement-model-spec\": {\n    \"id\": \"355b3249-3af9-45a4-9c45-67777bd2d72d\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"route-family-inventory\": {\n    \"id\": \"2cec821e-07ba-4aca-81fb-078f163adf44\",\n    \"status\": \"draft\",\n    \"version\": 3\n  },\n  \"company-workspace-data-spec\": {\n    \"id\": \"05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6\",\n    \"status\": \"draft\",\n    \"version\": 1\n  },\n  \"permission-lifecycle-matrix\": {\n    \"id\": \"dcfc8620-9f28-4019-aeeb-de3e279fd7a7\",\n    \"status\": \"draft\",\n    \"version\": 3\n  },\n  \"production-readiness-gap-register\": {\n    \"id\": \"80328220-3deb-4cf9-a68f-d440b41a38da\",\n    \"status\": \"draft\",\n    \"version\": 3\n  }\n}\n```"
        },
        {
          "title": "Artifact Outputs Expected Later",
          "level": 2,
          "body": "- plan\n- exec_plan_review\n- build_execution\n- verification_report\n- release_acceptance"
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-qa-release-readiness-spec-b862500254.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-qa-release-readiness-spec-b862500254.json"
    },
    {
      "id": "2026-05-07-b2bea-org-page-template-spec-fcb91f9d23",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-page-template-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.724Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Page Template Spec",
      "summary": "B2BEA.org V1 Page Template Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: page template spec Artifact ID: 427c04a9 40b7 4e55 a642 65b2aee20b2b Version: 1 Status: draft Updated: 2026 05 07T14:36:17.821277+00:00 Purpose Convert approved surface decisions and route fa...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Page Template Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `page-template-spec`\n- Artifact ID: `427c04a9-40b7-4e55-a642-65b2aee20b2b`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-07T14:36:17.821277+00:00`"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "Convert approved surface decisions and route-family inventory into implementation-ready reusable page family contracts before any rebuild coding or PLAN/build approval."
        },
        {
          "title": "Status",
          "level": 2,
          "body": "draft"
        },
        {
          "title": "Page Families",
          "level": 2,
          "body": "| id | name | routes | states | purpose | surfaces | qa_checks | disposition |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| admin_module | Admin Module | /admin, /admin/academy, /admin/academy/course, /admin/academy/lesson, /admin/categories, /admin/companies, /admin/jobs, /admin/users, /admin/vendors | loading, empty, error, unauthorized, draft, submitted, changes_requested, approved, published/active, archived/removed | Single /admin shell operational modules. | b2bea_admin | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| admin_publishing_module | Admin Publishing Module | /studio, /studio/media | draft, preview, scheduled, published, archived, rolled_back, validation_failed | Publishing/studio module inside /admin. | b2bea_admin | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | redirect |\n| audience_landing_page | Audience Landing Page | /for/agencies, /for/consultants, /for/distributors, /for/manufacturers, /for/software-providers, /for/vendors | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Audience-specific /for/* and similar landing pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| auth_or_account_utility | Auth Or Account Utility | /checkout, /checkout-success, /confirm-email, /login, /membership-terms, /signup, /terms, /upgrade | default, submitting, success, error, expired token, already authenticated, unauthorized | Login/signup/confirmation/checkout/legal utility routes. | auth_account | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| course_catalog | Course Catalog | /courses | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Public/member course catalog listing. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| course_detail | Course Detail | /courses/:slug | anonymous preview, authenticated no access, entitled/enrolled, completed, purchase required | Course detail/enrollment page. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| course_learning_surface | Course Learning Surface | /courses/lessons/:slug, /courses/modules/challenge, /courses/modules/challenge-feedback, /courses/modules/test | loading content, in progress, submitted, passed, needs retry, access denied, save failed | Lesson, module, test, challenge, and learning interaction pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| directory_index | Directory Index | /agencies, /consultants, /distributors, /exchange, /exchange/vendor-claim, /leaders, /manufacturers, /people, /software-providers, /vendors/orocommerce | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | People, vendor, exchange, audience/category, and partner directory indexes. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| editorial_detail | Editorial Detail | /authors/:slug, /blog/:slug, /podcast/:slug | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Article, author, and podcast detail pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| editorial_index | Editorial Index | /blog, /blog/b2b-ecommerce-is-not-a-technology-problem, /insights, /podcast | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Blog, insights, podcast, authors, and other editorial list surfaces. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| event_detail | Event Detail | /events/:slug | upcoming, registration_open, sold_out_or_closed, past, archived | Public event detail page. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| event_index | Event Index | /events | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Public event listing page. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| job_board | Job Board | /careers | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Public job listing/search page. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| job_detail | Job Detail | /careers/:slug | published, expired, archived, apply unavailable | Public job detail page. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| marketing_home_or_landing | Marketing Home Or Landing | / | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Homepage and major landing surfaces that may carry custom brand/storytelling treatment. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| maturity_assessment_special_flow | Maturity Assessment Special Flow | /assessments, /assessments/maturity, /assessments/maturity/results, /assessments/maturity/take | landing, in progress, validation error, submitted, results available, results unavailable/error, returning user if persisted | Current maturity assessment and future domain-specific maturity assessments. | public_site | question flow works keyboard/mobile, progress cannot overlap content, results render deterministically, validation errors are clear, submitted data respects privacy and entitlement rules | v1_keep |\n| member_dashboard_or_account | Member Dashboard Or Account | /account, /dashboard, /dashboard/onboarding, /dashboard/profile, /dashboard/profile/edit, /dashboard/profile/knowledge, /dashboard/welcome | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Private member dashboard, profile, onboarding, account, and settings pages. | member_portal | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| people_profile_detail | People Profile Detail | /people/:slug | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Public person/member/leader profile detail pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| resource_detail_or_download | Resource Detail Or Download | /case-studies/:slug, /guides/:slug, /reports/:slug, /resources/2026-b2b-ecommerce-trends, /resources/career-acceleration-kit | public preview, anonymous gated, authenticated no entitlement, entitled downloadable, download success, download error, archived | Report, guide, case study, resource landing, and download pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| resource_index | Resource Index | /case-studies, /guides, /reports, /resources, /resources/2026-b2b-ecommerce-trends/download, /resources/:category, /resources/career-acceleration-kit/download | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Resources, guides, reports, case studies, and similar resource listing pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| standard_marketing_page | Standard Marketing Page | /about, /contact, /how-we-use-ai, /join, /services, /vendor-application, /vendor-membership | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | About, contact, join, services, vendor application, vendor membership, and similar structured public pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| system_generated | System Generated | /sitemap | generated, generation_error | Sitemap and other generated/system utility routes. | public_site | valid generated output, contains expected public canonical routes, excludes draft/archived/protected routes | v1_keep |\n| topic_index | Topic Index | /concepts, /topics | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Topic/concept index pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| topic_or_concept_detail | Topic Or Concept Detail | /concepts/:slug, /concepts/ai-product-recommendations-b2b, /topics/ai, /topics/b2b-fundamentals, /topics/customer-adoption, /topics/digital-transformation, /topics/executive-alignment, /topics/technology | default, loading where data-backed, empty where list-backed, error where API-backed, unauthorized where protected, archived/draft hidden from public where publishable | Topic/concept detail and pillar pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |\n| vendor_dashboard | Vendor Dashboard | /vendor-portal | loading, empty, unauthorized, active, pending_review, changes_requested, approved, archived, billing_attention | Private /vendor workspace. | vendor_portal | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | redirect |\n| vendor_profile_detail | Vendor Profile Detail | /exchange/:slug | published public profile, claimed private draft not public, submitted changes pending review, archived/unpublished | Public vendor profile/detail pages. | public_site | desktop and mobile screenshot pass, no horizontal overflow, text does not overlap controls/content, keyboard/focus states for interactive controls, metadata present for public pages, route returns expected status/redirect | v1_keep |"
        },
        {
          "title": "Global Template Rules",
          "level": 2,
          "body": "- Default implementation path is reusable B2BEA design-system components and page families.\n- Custom pages are allowed only for home, major campaign/resource landing pages, approved custom HTML imports, and explicitly marked signature editorial features.\n- Custom pages still require accessibility, responsive, metadata, analytics, and QA compliance.\n- All public publishable pages require canonical URL plus SEO/GEO/social metadata.\n- All protected reads/actions require server-side guards; client state cannot grant authorization.\n- Admin is a single /admin shell. Publishing/studio is an admin module, not a separate top-level shell.\n- Private vendor prefix is /vendor. Private practitioner company prefix is /company. Public practitioner company profiles/directories are not V1.\n- Route redirects must preserve SEO/user expectations where public and preserve auth intent where private."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- Every route in route-family-inventory v3 maps to exactly one page family in this spec.\n- Each page family defines routes, surface, layout pattern, required components, states, data sources, custom exception rule, QA checks, and acceptance criteria.\n- page-template-spec can feed implementation planning without deciding build tasks yet.\n- No implementation is authorized by this artifact alone; PLAN/EXEC_PLAN_REVIEW and Justin build approval remain required."
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- survey-system-spec\n- qa-release-readiness-spec\n- plan"
        },
        {
          "title": "Unresolved Or Follow On",
          "level": 2,
          "body": "| id | note | topic | status |\n| --- | --- | --- | --- |\n| PTS-FOLLOW-001 | Maturity assessment is V1 as a special reusable maturity-assessment pattern. The broader survey/form engine remains a separate survey-system-spec and should not block the maturity assessment flow. | Standard survey/form engine | separate_spec_needed |\n| PTS-FOLLOW-002 | Route inventory classifies families and custom_allowed candidates. Before build, mark exact routes that are approved custom versus standard B2BEA design-system pages. | Exact route-by-route custom markers | route_inventory_review_needed |\n| PTS-FOLLOW-003 | No current /company route exists in inventory, but surface decisions require /company as private V1 prefix. Company workspace templates should be added when implementation scope reaches that surface. | Company workspace templates | future_family_needed |"
        },
        {
          "title": "Redirects",
          "level": 2,
          "body": "| to | from | reason |\n| --- | --- | --- |\n| /admin/studio | /studio | Decision 3: top-level /studio migrates under single /admin shell. |\n| /admin/studio/media | /studio/media | Decision 3: top-level /studio migrates under single /admin shell. |\n| /vendor | /vendor-portal | Decision 2: private vendor workspace prefix is /vendor. |"
        },
        {
          "title": "Source Summary",
          "level": 2,
          "body": "```json\n{\n  \"route_count\": 97,\n  \"by_disposition\": {\n    \"v1_keep\": 94,\n    \"redirect\": 3\n  },\n  \"by_target_surface\": {\n    \"b2bea_admin\": 11,\n    \"public_site\": 70,\n    \"auth_account\": 8,\n    \"member_portal\": 7,\n    \"vendor_portal\": 1\n  },\n  \"route_inventory_id\": \"2cec821e-07ba-4aca-81fb-078f163adf44\"\n}\n```"
        },
        {
          "title": "Source Artifacts",
          "level": 2,
          "body": "| status | version | artifact_id | artifact_type |\n| --- | --- | --- | --- |\n| draft | 1 | 05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6 | company-workspace-data-spec |\n| draft | 1 | 2f473004-9063-4fe9-8290-5cbd1b19dfb4 | data-model-spec |\n| draft | 4 | 4c3651ac-9a69-4117-a355-750b61f540c9 | design-system-spec |\n| draft | 1 | 355b3249-3af9-45a4-9c45-67777bd2d72d | entitlement-model-spec |\n| draft | 1 | a9636e2f-a4be-4586-82dd-c1a7bf3199fa | publishing-model-spec |\n| draft | 3 | 2cec821e-07ba-4aca-81fb-078f163adf44 | route-family-inventory |\n| draft | 8 | 77853042-e7a4-48bd-91a4-6e48d0484b1b | surface-specs |"
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-page-template-spec-fcb91f9d23.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-page-template-spec-fcb91f9d23.json"
    },
    {
      "id": "2026-05-07-b2bea-org-design-system-spec-v4-ac02bceb81",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-07-b2bea-org-design-system-spec-v4.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.721Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Design System Spec",
      "summary": "B2BEA.org V1 Design System Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: design system spec Artifact ID: 4c3651ac 9a69 4117 a355 750b61f540c9 Version: 4 Status: draft Updated: 2026 05 07T13:29:22.717+00:00 Scope Revision Note Added separate local B2BEA design syst...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Design System Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `design-system-spec`\n- Artifact ID: `4c3651ac-9a69-4117-a355-750b61f540c9`\n- Version: `4`\n- Status: `draft`\n- Updated: `2026-05-07T13:29:22.717+00:00`"
        },
        {
          "title": "Scope",
          "level": 2,
          "body": "```json\n{\n  \"rule\": \"Exceptions still must satisfy accessibility, metadata, responsive, and production QA rules.\",\n  \"in_scope\": [\n    \"public non-home pages\",\n    \"admin dashboard/pages\",\n    \"member profile/dashboard\",\n    \"vendor portal\",\n    \"company workspace\",\n    \"auth/account pages\",\n    \"academy/course pages\",\n    \"jobs/events/survey/forms surfaces\"\n  ],\n  \"exceptions\": [\n    \"home page\",\n    \"blog pages where intentionally editorial\",\n    \"resource pages where intentionally custom\",\n    \"custom HTML imports approved by publishing model\"\n  ]\n}\n```"
        },
        {
          "title": "Revision Note",
          "level": 2,
          "body": "Added separate local B2BEA design-system checkout and GitHub repo reference."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- Every in-scope page has one recognizable B2BEA design-system page/header pattern.\n- All in-scope fields/search/selects/textareas use the B2BEA design-system field contract.\n- All in-scope pills/badges use B2BEA design-system active/inactive states.\n- No standard page title exceeds the standard page title scale unless marked as article/marketing exception.\n- Admin/portal pages use compact operational typography and do not use large marketing heroes.\n- Cards do not nest inside decorative cards; panels use consistent borders/radius/shadows.\n- Mobile text fits without overlap and controls keep stable dimensions.\n- A visual QA pass covers desktop and mobile for each page family before launch."
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- surface-specs\n- sanity-schema-spec\n- custom-html-import-spec\n- qa-release-readiness-spec"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Which blog/resource page families are intentional exceptions versus should be normalized?\n- Should admin and portal surfaces share the same component package or use denser variants?\n- Do we keep Material Symbols or move to a React icon library during rebuild?\n- What screenshot baseline set represents every page family?"
        },
        {
          "title": "Tokens",
          "level": 2,
          "body": "```json\n{\n  \"colors\": [\n    {\n      \"name\": \"primary\",\n      \"usage\": \"headers, primary buttons, active pills, focus ring\",\n      \"value\": \"hsl(226 100% 21%) / #00196C\"\n    },\n    {\n      \"name\": \"primary_dark\",\n      \"usage\": \"primary hover states\",\n      \"value\": \"#001458\"\n    },\n    {\n      \"name\": \"accent\",\n      \"usage\": \"accent buttons, badges, highlights\",\n      \"value\": \"hsl(6 80% 59%) / #EB5444\"\n    },\n    {\n      \"name\": \"accent_dark\",\n      \"usage\": \"accent hover states\",\n      \"value\": \"#d94333\"\n    },\n    {\n      \"name\": \"background\",\n      \"usage\": \"page background\",\n      \"value\": \"hsl(0 0% 100%)\"\n    },\n    {\n      \"name\": \"card\",\n      \"usage\": \"cards and panels\",\n      \"value\": \"hsl(0 0% 100%)\"\n    },\n    {\n      \"name\": \"secondary_muted\",\n      \"usage\": \"muted sections and outline hover\",\n      \"value\": \"hsl(0 0% 96%)\"\n    },\n    {\n      \"name\": \"border_input\",\n      \"usage\": \"borders, inputs, table dividers\",\n      \"value\": \"hsl(220 13% 88%)\"\n    },\n    {\n      \"name\": \"muted_foreground\",\n      \"usage\": \"subtitles, metadata, secondary navigation\",\n      \"value\": \"hsl(226 30% 45%)\"\n    }\n  ],\n  \"typography\": [\n    {\n      \"token\": \"font_display\",\n      \"value\": \"Open Sans, system-ui, sans-serif\"\n    },\n    {\n      \"token\": \"font_body\",\n      \"value\": \"Open Sans, system-ui, sans-serif\"\n    },\n    {\n      \"token\": \"body\",\n      \"value\": \"16px base, normal letter spacing, line-height 1.6-1.75 depending context\"\n    },\n    {\n      \"token\": \"ui_text\",\n      \"value\": \"0.875rem / 14px, weight 600-700 for controls\"\n    },\n    {\n      \"token\": \"metadata\",\n      \"value\": \"0.75rem / 12px, weight 700 for pills/badges\"\n    }\n  ],\n  \"radius_shadow_spacing\": [\n    {\n      \"token\": \"radius\",\n      \"value\": \"0.75rem / 12px\"\n    },\n    {\n      \"token\": \"radius_sm\",\n      \"value\": \"calc(radius - 4px) / 8px\"\n    },\n    {\n      \"token\": \"pill_radius\",\n      \"value\": \"999px\"\n    },\n    {\n      \"token\": \"shadow_sm\",\n      \"value\": \"0 1px 3px rgba(0, 25, 108, 0.06)\"\n    },\n    {\n      \"token\": \"shadow_md\",\n      \"value\": \"0 8px 30px -8px rgba(0, 25, 108, 0.10)\"\n    },\n    {\n      \"token\": \"container\",\n      \"value\": \"min(100%, 1400px), 2rem side padding\"\n    }\n  ]\n}\n```"
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| id | topic | decision |\n| --- | --- | --- |\n| DS-DEC-001 | Design authority | Lovable is the foundation/reference seed for the V1 design system; the final authority is the hardened B2BEA design system defined by this artifact and follow-on component/page specs. |\n| DS-DEC-002 | Intentional exceptions | Home page, blog, and resource pages may remain custom where explicitly approved; all other surfaces must converge on the hardened B2BEA design-system rules derived from, but not limited to, the Lovable foundation. |\n| DS-DEC-003 | Typography | Use the B2BEA design-system typography contract defined here for display and body. Lovable/Open Sans is a starting reference, not an irreversible final font decision; remove legacy Hanken Grotesk dependency from target page families unless explicitly retained for an exception. |\n| DS-DEC-004 | Page title scale | Standard page hero titles use clamp(2.25rem, 4vw, 3.75rem). Article/editorial hero titles may use clamp(2.75rem, 6vw, 5rem). Full marketing hero titles may use clamp(3rem, 7vw, 6rem) only on approved hero pages. |\n| DS-DEC-005 | Forms/search/filters | All fields, selects, search inputs, filters, and pills use the B2BEA design-system control contract; the Lovable 2.5rem field/control height, 0.875rem text, 0.75rem radius, and blue focus ring are baseline values to retain or deliberately revise in the final token/component pass. |"
        },
        {
          "title": "Components",
          "level": 2,
          "body": "| contract | component |\n| --- | --- |\n| Blue header block for standard pages; centered content; title clamp(2.25rem,4vw,3.75rem); subtitle 1.125rem; max inner width 64rem. | Page hero |\n| White/background hero; breadcrumb 0.875rem; title clamp(2.75rem,6vw,5rem); excerpt 1.25rem; media aspect 1200/630. | Article/editorial hero |\n| 1px border, 12px radius, white background, small blue-tinted shadow; hover may lift -2px only for clickable cards. | Cards |\n| 2.5rem min height, 1px input border, 12px radius, white background, 0.5rem 0.75rem padding, 14px text, blue 3px focus ring. | Fields |\n| Same field contract; icon left at 0.875rem; input left padding 2.25rem; page toolbar search max width 42rem. | Search bars |\n| 2.5rem min height, 12px radius, 14px Open Sans, 700 weight; primary blue, accent coral, outline white with border. | Buttons |\n| 2rem min height, 999px radius, 12px text, 700 weight; active pills use primary blue; badges use accent tint. | Pills and badges |\n| Use card/panel container, 1px borders/dividers, 14px cells, muted metadata, sticky or clear table headers where long. | Tables |\n| Empty/loading/error/success states use card/panel treatment, concise heading, useful action, no unstyled browser defaults. | States |\n| Two-bar restored header remains; B2BEA design-system nav/button/dropdown styling governs future header work, using Lovable as the initial baseline unless intentionally revised. | Navigation |"
        },
        {
          "title": "Logo Assets",
          "level": 2,
          "body": "```json\n{\n  \"count\": 10,\n  \"cloudflare\": {\n    \"rule\": \"Always use Brett's Cloudflare account for B2BEA.org assets.\",\n    \"namespace\": \"design-system/logos\",\n    \"r2_bucket\": \"b2bea-guest-packs\",\n    \"account_id\": \"3333630b9c90c49aef56730d9513c19f\",\n    \"account_name\": \"Brett Sinclair DNS\"\n  },\n  \"source_zips\": [\n    \"/Users/justinking/Downloads/Default-20260506T201500Z-3-001.zip\",\n    \"/Users/justinking/Downloads/Horizontal-20260506T201458Z-3-001.zip\"\n  ],\n  \"local_repo_path\": \"/Users/justinking/Vaults/Projects/b2bea-org-design-system/logos\"\n}\n```"
        },
        {
          "title": "Source Repo",
          "level": 2,
          "body": "```json\n{\n  \"b2bea_site_repo\": \"/Users/justinking/Vaults/Projects/B2BEA-org-new\",\n  \"design_system_repo\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-org-design-system\"\n}\n```"
        },
        {
          "title": "Source Files",
          "level": 2,
          "body": "- src/assets/css/lovable-system.css\n- src/assets/css/style.css\n- src/assets/css/portal.css\n- src/assets/css/admin.css\n- src/assets/css/search.css\n- src/_includes/layouts/base.njk\n- src/_includes/partials/nav.njk"
        },
        {
          "title": "Page Patterns",
          "level": 2,
          "body": "| layout | pattern |\n| --- | --- |\n| blue page hero, optional toolbar with search/filter, constrained content grid/table, consistent empty/error states | Standard index/list page |\n| hero or header card, metadata/badges, main content plus optional sidebar, related items/action panel | Detail page |\n| compact header, tabs or sidebar navigation, dense tables/forms, clear status pills, no marketing-scale type | Admin/portal workspace |\n| single clear title, fields in consistent grid, inline validation, primary action plus secondary cancel/back, success/error state | Form workflow |"
        },
        {
          "title": "Standard Sizes",
          "level": 2,
          "body": "```json\n{\n  \"controls\": \"0.875rem text, 2.5rem min-height\",\n  \"subtitle\": \"1.125rem standard / 1.25rem editorial or marketing hero\",\n  \"card_padding\": \"1.25rem default, denser variants allowed for admin tables\",\n  \"pills_badges\": \"0.75rem text, 2rem min-height\",\n  \"article_page_title\": \"clamp(2.75rem, 6vw, 5rem)\",\n  \"standard_page_title\": \"clamp(2.25rem, 4vw, 3.75rem)\",\n  \"full_marketing_hero_title\": \"clamp(3rem, 7vw, 6rem), exception only\"\n}\n```"
        },
        {
          "title": "Drift To Remove",
          "level": 2,
          "body": "- Legacy Hanken Grotesk heading dependency on target pages.\n- Negative letter spacing in standard headings and controls.\n- Oversized H1s outside approved article/marketing hero contexts.\n- Mixed field radii of 4px, 6px, 8px, 10px, 14px on target pages.\n- Search/filter controls with dark modal styling outside intentional search overlay.\n- Page-specific card/button styles that duplicate B2BEA design-system component contracts.\n- Marketing/landing page scale in admin, portal, profile, and operational surfaces."
        },
        {
          "title": "Design System Repo",
          "level": 2,
          "body": "```json\n{\n  \"note\": \"Separate checkout created on 2026-05-07. This is the B2BEA design-system source; Lovable remains only the original foundation/reference.\",\n  \"repo_url\": \"https://github.com/b2bea-org/b2bea-org-design-system.git\",\n  \"human_brief\": \"design.md\",\n  \"current_head\": \"d83614a\",\n  \"source_files\": [\n    \"b2bea.css\",\n    \"b2bea.design.json\",\n    \"design-system.json\",\n    \"design.md\",\n    \"examples/standard-page.html\",\n    \"recipes/standard-public-page.md\",\n    \"designer-review/design-board.html\",\n    \"designer-review/component-state-matrix.md\",\n    \"designer-review/page-family-checklist.md\",\n    \"checks/audit-b2bea.js\",\n    \"logos/\"\n  ],\n  \"canonical_css\": \"b2bea.css\",\n  \"repo_local_path\": \"/Users/justinking/Vaults/Projects/b2bea-org-design-system\",\n  \"pattern_reference\": \"/Users/justinking/Vaults/Projects/dreamborn-design-system\",\n  \"machine_readable_files\": [\n    \"design-system.json\",\n    \"b2bea.design.json\"\n  ],\n  \"local_repo_path_windows\": \"C:/Users/jstnk/Downloads/cc/projects/b2bea/b2bea-org-design-system\",\n  \"local_repo_path_mac_legacy\": \"/Users/justinking/Vaults/Projects/b2bea-org-design-system\"\n}\n```"
        },
        {
          "title": "Implementation Notes",
          "level": 2,
          "body": "- Target CSS should collapse compatibility selectors into reusable component classes during rebuild.\n- B2BEA design-system tokens should be the design-token source before page-specific CSS is authored; Lovable tokens are only the initial foundation/reference.\n- Legacy CSS can remain temporarily but must not define new target behavior.\n- Custom HTML imports can be visually custom but still must consume page metadata, analytics, and accessibility rules."
        }
      ],
      "html_path": "artifacts/2026-05-07-b2bea-org-design-system-spec-v4-ac02bceb81.html",
      "json_path": "artifacts/2026-05-07-b2bea-org-design-system-spec-v4-ac02bceb81.json"
    },
    {
      "id": "2026-05-06-deterministic-spec-artifact-standard-3944bdce8e",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-deterministic-spec-artifact-standard.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.720Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Deterministic Spec And Artifact Standard",
      "summary": "Deterministic Spec And Artifact Standard Date: 2026 05 06 Status: Draft standard Applies to: RedKey Studio artifacts, Agent Wire, product specs, delivery plans, reducer backed workflows Related: docs/specs/2026 05 06 agent wire v1 1 a2a hardening.md, docs/specs/2026 04 28 sdd artifact templates.md Purpose RedKey specs must become contracts that code can vali...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Deterministic Spec And Artifact Standard",
          "level": 1,
          "body": "**Date:** 2026-05-06\n**Status:** Draft standard\n**Applies to:** RedKey Studio artifacts, Agent Wire, product specs, delivery plans, reducer-backed workflows\n**Related:** `docs/specs/2026-05-06-agent-wire-v1-1-a2a-hardening.md`, `docs/specs/2026-04-28-sdd-artifact-templates.md`\n\n---"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "RedKey specs must become contracts that code can validate.\n\nThe platform should not depend on an LLM reading prose and guessing whether work is valid. Agents can draft specs and code, but deterministic systems decide whether outputs conform.\n\nRequired pipeline:\n\n```text\nspec\n  -> schema\n  -> fixtures\n  -> conformance tests\n  -> implementation\n  -> reducer/state tests\n```\n\nFor HCS-backed workflows:\n\n```text\nLLM writes Wire\n  -> schema validates Wire\n  -> reducer applies Wire\n  -> state machine validates transition\n  -> tests verify expected state\n  -> HCS records event\n```\n\n---"
        },
        {
          "title": "Core Rules",
          "level": 2,
          "body": "1. Specs define state machines and contracts, not essays.\n2. Prose explains rationale; structured fields define valid behavior.\n3. Every artifact type needs a schema before agents produce it at scale.\n4. Every artifact type needs valid and invalid fixtures.\n5. Every important state transition needs reducer tests.\n6. Every completion claim must be mechanically checkable where possible.\n7. Agents generate candidates; schemas, reducers, and tests decide authority.\n\n---"
        },
        {
          "title": "Required Artifact Shape",
          "level": 2,
          "body": "Every production-ready RedKey artifact should identify its contract.\n\n```json\n{\n  \"schema_version\": \"1.0\",\n  \"artifact_type\": \"module-spec\",\n  \"contract_ref\": \"schemas/studio-artifacts/v1/module-spec.schema.json\",\n  \"fixture_refs\": [\n    \"fixtures/studio-artifacts/v1/module-spec.valid.json\",\n    \"fixtures/studio-artifacts/v1/module-spec.invalid-missing-acceptance.json\"\n  ],\n  \"state_machine_ref\": \"contracts/studio-artifacts/v1/module-lifecycle.json\",\n  \"acceptance_criteria\": [\n    {\n      \"id\": \"AC-001\",\n      \"mechanical\": true,\n      \"assertion\": \"artifact.status equals draft|approved|rejected\"\n    }\n  ]\n}\n```\n\nFreeform prose may exist only in named fields such as `rationale`, `context`, or `notes`. It must not be the only representation of requirements, states, acceptance criteria, or output contracts.\n\n---"
        },
        {
          "title": "Spec-To-Code Contract Pattern",
          "level": 2,
          "body": "Each major feature or protocol should have these assets:\n\n```text\ndocs/specs/<date>-<name>.md\nschemas/<domain>/<version>/*.schema.json\ncontracts/<domain>/<version>/*.json\nfixtures/<domain>/<version>/*.valid.json\nfixtures/<domain>/<version>/*.invalid-<reason>.json\ntests/conformance/<domain>/*\ntests/reducers/<domain>/*\n```\n\nMinimum conformance tests:\n\n- Valid fixtures pass schema validation.\n- Invalid fixtures fail for the expected reason.\n- Required fields are enforced.\n- Enum values reject unknown values.\n- State-machine transitions are deterministic.\n- Reducers produce exact expected state from ordered events.\n\n---"
        },
        {
          "title": "State Machines Over Prose",
          "level": 2,
          "body": "Bad:\n\n```text\nThe agent should finish the task and include useful output.\n```\n\nGood:\n\n```json\n{\n  \"acceptance_criteria\": [\n    \"A task.complete Wire is emitted\",\n    \"At least one artifact.ready Wire exists\",\n    \"task.complete.payload.artifact_ids references all final artifacts\",\n    \"verification.mechanical equals pass\"\n  ]\n}\n```\n\nBetter:\n\n```json\n{\n  \"completion_contract\": {\n    \"required_events\": [\"artifact.ready\", \"task.complete\"],\n    \"artifact_count\": { \"min\": 1 },\n    \"verification\": {\n      \"mechanical\": \"pass\"\n    },\n    \"references\": {\n      \"task.complete.payload.artifact_ids\": \"must_include_all_final_artifacts\"\n    }\n  }\n}\n```\n\n---"
        },
        {
          "title": "Agent Wire Example",
          "level": 2,
          "body": "Required lifecycle:\n\n```text\nsubmitted -> working -> completed\nsubmitted -> working -> blocked -> working -> completed\nsubmitted -> working -> failed\nsubmitted -> canceled\n```\n\nRequired event map:\n\n```json\n{\n  \"task.available\": \"submitted\",\n  \"task.claimed\": \"working\",\n  \"task.blocked\": \"blocked\",\n  \"task.complete\": \"completed\",\n  \"task.failed\": \"failed\",\n  \"task.cancelled\": \"canceled\"\n}\n```\n\nRequired reducer fixture:\n\n```json\n{\n  \"events\": [\n    \"task.created\",\n    \"task.available\",\n    \"task.claimed\",\n    \"task.started\",\n    \"artifact.ready\",\n    \"task.complete\"\n  ],\n  \"expected\": {\n    \"task_state\": \"completed\",\n    \"terminal\": true,\n    \"artifact_count\": 1,\n    \"blocked\": false\n  }\n}\n```\n\n---"
        },
        {
          "title": "Studio Artifact Implications",
          "level": 2,
          "body": "Studio artifact generation should move from “agent wrote a nice spec” to “artifact conforms.”\n\nFor each artifact type:\n\n- `intent`\n- `source-intake`\n- `ai-first-opportunity-map`\n- `screen-map`\n- `feature-ux-spec`\n- `module-spec`\n- `policy`\n- `architecture`\n- `plan`\n\nRedKey should define:\n\n- JSON Schema\n- valid fixture\n- invalid fixture\n- rendered-view conformance check\n- approval gate rule\n- implementation-readiness rule\n\nExample readiness rule:\n\n```json\n{\n  \"build_gate\": {\n    \"required_artifacts\": [\n      \"intent\",\n      \"policy\",\n      \"architecture\",\n      \"feature-ux-spec\",\n      \"module-spec\",\n      \"plan\"\n    ],\n    \"required_status\": \"approved\",\n    \"required_checks\": [\n      \"schema_valid\",\n      \"fixtures_valid\",\n      \"acceptance_criteria_mechanical\",\n      \"open_questions_empty\"\n    ]\n  }\n}\n```"
        },
        {
          "title": "Studio Task Planning And Decomp",
          "level": 2,
          "body": "Studio decomp must output validated task graphs, not task prose.\n\nEvery planned task must have canonical lifecycle fields:\n\n```json\n{\n  \"task_id\": \"task_pva_m00_contracts\",\n  \"project_id\": \"patient-visit-advocate\",\n  \"parent_task_id\": null,\n  \"depends_on\": [],\n  \"assigned_role\": \"worker\",\n  \"allowed_events\": [\n    \"task.claimed\",\n    \"task.started\",\n    \"artifact.ready\",\n    \"task.complete\",\n    \"task.failed\",\n    \"task.blocked\"\n  ],\n  \"required_capabilities\": [\n    \"platform-core\"\n  ],\n  \"required_artifacts\": [\n    \"artifact_contract_spec\"\n  ],\n  \"acceptance_criteria\": [\n    \"artifact.ready emitted for every required artifact\",\n    \"task.complete.payload.artifact_ids references all final artifacts\",\n    \"verification.mechanical equals pass\"\n  ]\n}\n```\n\nEvery artifact type required by a task must have an artifact contract before dispatch:\n\n```json\n{\n  \"artifact_type\": \"artifact_contract_spec\",\n  \"schema_id\": \"studio-artifacts/v1/artifact-contract-spec\",\n  \"required_fields\": [\n    \"artifact_type\",\n    \"schema_id\",\n    \"required_fields\",\n    \"finalization_event\"\n  ],\n  \"finalization_event\": \"artifact.ready\"\n}\n```\n\nThe planner must emit a graph:\n\n```json\n{\n  \"tasks\": [\n    {\n      \"task_id\": \"task_m00_domain_contracts\",\n      \"depends_on\": []\n    },\n    {\n      \"task_id\": \"task_m01_intake_agent_spec\",\n      \"depends_on\": [\"task_m00_domain_contracts\"]\n    }\n  ]\n}\n```\n\nThe coordinator must run dispatch preflight before giving work to an agent:\n\n- task spec validates\n- dependencies are completed\n- required artifact specs exist\n- required artifact schemas exist\n- allowed lifecycle events are known\n- required capability IDs exist in `scripts/capabilities.json`\n- required capabilities are `agent_safe=true` unless explicitly approved\n\nThe coordinator must run completion preflight before accepting completion:\n\n- required artifact IDs are referenced\n- artifact payloads validate against artifact schemas\n- `terminal` equals `true`\n- `verification.mechanical` equals `pass`\n\nValidated Studio task graphs can now be converted into Agent Wire v1.1 lifecycle events:\n\n```text\nvalidated Studio task graph\n  -> task.created for every task\n  -> task.available only for dependency-ready tasks\n  -> required_capabilities and required_artifacts carried in extensions.redkey\n  -> dry-run stream adapter validates schemas and reducer state before persistence\n```\n\nThe planner bridge lives at:\n\n```text\nscripts/lib/studio-agent-wire-planner.js\nscripts/lib/agent-wire-v1-1-stream.js\ntests/conformance/studio/studio-agent-wire-planner.test.js\ntests/conformance/agent-wire/v1-1-stream-adapter.test.js\n```\n\nImplemented contract paths:\n\n```text\ncontracts/studio/v1/task-spec.schema.json\ncontracts/studio/v1/artifact-spec.schema.json\ncontracts/studio/v1/task-graph.schema.json\nfixtures/studio/v1/task-spec.valid.json\nfixtures/studio/v1/artifact-spec.valid.json\nfixtures/studio/v1/task-graph.valid.json\nfixtures/studio/v1/task-complete.valid.json\nfixtures/studio/v1/task-complete.invalid-missing-artifact.json\nscripts/lib/studio-task-planner-validator.js\ntests/conformance/studio/\n```\n\n---"
        },
        {
          "title": "Implementation Order",
          "level": 2,
          "body": "1. Agent Wire v1.1 deterministic contracts first.\n2. Studio artifact schemas and fixtures second.\n3. Build-gate validator third.\n4. Reducer/read-model conformance fourth.\n5. Producer/listener implementation only after contracts and fixtures exist.\n\n---"
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- A new RedKey spec is not build-ready unless it identifies schema, fixture, and conformance-test requirements.\n- Agent Wire v1.1 has state-machine contracts, schemas, fixtures, conformance tests, and reducer tests before producer rollout.\n- Studio artifact approval can eventually depend on schema validation and open-question/build-gate checks, not manual prose review alone.\n- Agents remain useful for drafting, but deterministic validators define whether artifacts and events are acceptable."
        }
      ],
      "html_path": "artifacts/2026-05-06-deterministic-spec-artifact-standard-3944bdce8e.html",
      "json_path": "artifacts/2026-05-06-deterministic-spec-artifact-standard-3944bdce8e.json"
    },
    {
      "id": "2026-05-06-backboard-openrouter-memory-strategy-7b68dbe4ff",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-backboard-openrouter-memory-strategy.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.718Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Backboard, OpenRouter, and RedKey Memory Strategy",
      "summary": "Backboard, OpenRouter, and RedKey Memory Strategy Date: 2026 05 06 Purpose RedKey currently uses several model providers and memory paths directly: Codex, Claude, Gemini, OpenAI embeddings, Supabase agent memory, and tool specific API keys. That works, but it makes model routing, memory continuity, cost control, and agent handoffs harder than they need to be...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Backboard, OpenRouter, and RedKey Memory Strategy",
          "level": 1,
          "body": "Date: 2026-05-06"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "RedKey currently uses several model providers and memory paths directly: Codex, Claude, Gemini, OpenAI embeddings, Supabase `agent_memory`, and tool-specific API keys. That works, but it makes model routing, memory continuity, cost control, and agent handoffs harder than they need to be.\n\nThe Backboard founder conversation suggests a stronger architecture:\n\n- Backboard may become the memory and state layer.\n- OpenRouter may become the default model routing layer.\n- Supabase and Hedera should remain the control, registry, and audit layer.\n- Direct provider keys should remain available, but should no longer be the default path for general model calls.\n\nThis document captures the relevant insights, target architecture, and first implementation spike."
        },
        {
          "title": "Memory Is Data",
          "level": 3,
          "body": "Backboard frames memory as data with explicit weighting, not as a vague human-brain metaphor. That fits RedKey better than treating memory as opaque conversational history.\n\nRelevant weighting dimensions from the conversation:\n\n- recency: how recently memory was created or accessed\n- frequency: how often a memory is used\n- adjacency: related topics can affect a memory even when the exact memory is not directly touched\n- temporal resonance: time and relative time affect whether a memory is relevant\n- world-context change: external events can change the relevance or importance of a memory\n\nThis is more advanced than RedKey's current basic vector/recency retrieval model."
        },
        {
          "title": "Assistants As Memory Scopes",
          "level": 3,
          "body": "Backboard's \"assistant\" abstraction is effectively an isolated memory collection. That maps cleanly to RedKey memory slicing:\n\n- one assistant per RedKey agent\n- one assistant per role\n- one assistant per client\n- one assistant per project\n- one assistant per expert/persona\n- one assistant per marketplace expert product\n\nThe key property is isolation. A CPO memory scope should not pollute a dad memory scope; likewise, a Brooke sales memory scope should not pollute a developer-worker memory scope."
        },
        {
          "title": "Memory Modes",
          "level": 3,
          "body": "Backboard supports memory modes that map directly to RedKey execution needs:\n\n- `off`: no memory used; good for isolated worker tasks and deterministic verification\n- `readonly`: retrieve memory without writing new memory; good for controlled agents and review tasks\n- `auto`: read and write memory; good for long-lived agents and expert personas\n\nThis aligns with existing RedKey patterns:\n\n- some agents need full project context\n- some agents need full company context\n- some agents should have no memory beyond the task brief\n- `/teach` should be a controlled write path\n- reflection should produce candidate learnings, not uncontrolled memory sprawl"
        },
        {
          "title": "Stateful OpenRouter",
          "level": 3,
          "body": "OpenRouter routes model calls, but it does not by itself provide durable memory. Each model call is essentially stateless unless the caller includes the right context.\n\nBackboard can sit in front of OpenRouter:\n\n```text\nRedKey agent -> Backboard state/context -> OpenRouter -> chosen model\n```\n\nThat changes the model:\n\n```text\nWithout Backboard:\nClaude has one thread, Kimi has none, DeepSeek has none, Gemini has another.\nEach model switch requires RedKey to rebuild and repack context.\n\nWith Backboard:\nBackboard holds the working state.\nOpenRouter chooses the model.\nThe selected model receives the relevant context for the task.\n```\n\nFor RedKey, this matters because the cluster should be able to use cheaper or specialized models without losing continuity."
        },
        {
          "title": "Adaptive Context Management",
          "level": 3,
          "body": "Backboard claims it can move state across different context windows using indexing and summarization, then reinflate when returning to larger contexts.\n\nThis maps directly to RedKey's biggest pain points:\n\n- long projects\n- headless workers\n- task handoffs\n- context compaction\n- model switching\n- small-context cheap models\n- summarizing without losing important state\n\nThis needs a spike before we trust it, but the capability is strategically relevant."
        },
        {
          "title": "Retrospectives, Skills, And `/teach`",
          "level": 3,
          "body": "Backboard's internal process uses retrospectives to update skill files, version those changes, and inspect regressions when a retrospective worsens behavior.\n\nThis validates RedKey's existing direction:\n\n- reflection stages after large modules\n- `/teach` for controlled memory insertion\n- skill files as durable operating instructions\n- versioned changes to agent behavior\n- review when memory or skill updates cause regressions\n\nThe important distinction is that not every reflection should become durable memory. Reflection should generate candidate learnings. `/teach` or a governed memory write should decide what persists."
        },
        {
          "title": "Data Ownership And Anonymization",
          "level": 3,
          "body": "The founder stated that customer data/memories are segregated and owned by the customer, with anonymization available before context reaches model providers.\n\nThis is highly relevant, but should not be treated as enough for production-sensitive data until confirmed in writing.\n\nRequired due diligence:\n\n- export rights\n- deletion behavior\n- tenant isolation\n- model-provider data exposure\n- anonymization controls\n- retention controls\n- auditability\n- pricing and limits"
        },
        {
          "title": "Expert Marketplace Fit",
          "level": 3,
          "body": "The conversation strongly validated the expert marketplace and \"rent knowledge\" direction.\n\nRelevant patterns:\n\n- digital expert/persona as isolated memory scope\n- vertical expert corpus\n- retired experts contributing tacit knowledge\n- voice/video capture for trades and tacit domain knowledge\n- payment by quality, not only by time\n- expert judges validating knowledge quality\n- marketplace trust through provenance and usage audit\n\nBackboard can potentially provide the memory/RAG substrate. RedKey/Hedera can provide provenance, usage tracking, attribution, and compensation."
        },
        {
          "title": "Current Problem",
          "level": 2,
          "body": "RedKey currently uses provider APIs too directly.\n\nExamples:\n\n- direct OpenAI calls\n- direct Anthropic calls\n- direct Gemini calls\n- direct provider-specific scripts\n- Supabase `agent_memory` direct embedding/retrieval\n- Codex/Claude/Gemini sessions with separate state assumptions\n\nThis creates several problems:\n\n- no consistent task-based model routing\n- no central cost policy\n- no easy model fallback\n- no systematic model benchmarking\n- repeated context packing logic\n- provider-specific drift across scripts\n- hard-to-control memory writes\n- weak model arbitrage\n\nThe issue is not that direct provider keys are bad. The issue is that they should be escape hatches, not the default integration pattern."
        },
        {
          "title": "Target Architecture",
          "level": 2,
          "body": "```text\nRedKey task or agent\n  -> RedKey model gateway\n    -> memory/context policy\n      -> Backboard for stateful memory-aware calls\n        -> OpenRouter for model routing\n      -> direct provider API only for special cases\n    -> Supabase for registry, task state, audit metadata\n    -> Hedera for externalized proof, usage, provenance, and compensation events\n```"
        },
        {
          "title": "Responsibilities",
          "level": 3,
          "body": "RedKey model gateway:\n\n- accepts task class, input, memory mode, client/project/agent scope, cost constraints, and reliability constraints\n- chooses whether the call should use Backboard, direct provider API, or local runtime\n- records model, provider, cost, latency, failure mode, and output metadata\n\nBackboard:\n\n- holds assistant-scoped memory\n- manages readonly/auto/off memory behavior\n- provides stateful conversations over OpenRouter\n- provides document/RAG support if the spike validates it\n- potentially handles adaptive context management\n\nOpenRouter:\n\n- routes model calls\n- enables cheaper model experiments\n- provides model switching without rewriting app code\n- supports fallback and model arbitrage\n\nSupabase:\n\n- remains RedKey's source of truth for tasks, projects, agents, artifacts, and memory/audit metadata\n- stores mappings from RedKey scopes to Backboard assistant IDs\n- stores eval results and routing configuration\n\nHedera:\n\n- remains the external proof layer\n- records provenance, usage, marketplace events, and compensation-relevant events\n\nDirect provider APIs:\n\n- remain available for provider-specific features\n- remain available for local tools like Codex/Claude runtimes\n- remain available if OpenRouter or Backboard is not suitable for a specific use case"
        },
        {
          "title": "Model Routing Policy",
          "level": 2,
          "body": "RedKey should route by task class instead of provider name.\n\nInitial task classes:\n\n- `architecture_review`\n- `code_generation`\n- `code_review`\n- `test_repair`\n- `cheap_extraction`\n- `summarization`\n- `long_context_analysis`\n- `classification`\n- `embedding`\n- `memory_retrieval`\n- `reflection`\n- `teach_candidate_generation`\n\nExample configuration shape:\n\n```yaml\nmodel_routes:\n  architecture_review:\n    memory_mode: readonly\n    primary: anthropic/claude-sonnet-4.5\n    fallback: openai/gpt-5.4\n    max_cost_usd: 5.00\n\n  cheap_extraction:\n    memory_mode: off\n    primary: deepseek/deepseek-chat\n    fallback: qwen/qwen-plus\n    max_cost_usd: 0.25\n\n  code_worker:\n    memory_mode: readonly\n    primary: moonshotai/kimi-k2\n    fallback: openai/gpt-5.3-codex\n    max_cost_usd: 2.00\n\n  expert_persona_chat:\n    memory_mode: auto\n    primary: openrouter/auto\n    state_provider: backboard\n```\n\nSpecific model names should be verified at implementation time because OpenRouter availability changes. The stable design is the route abstraction, not the initial model roster."
        },
        {
          "title": "Memory Scope Model",
          "level": 2,
          "body": "Backboard assistant IDs should be mapped from RedKey scopes.\n\nSuggested scope keys:\n\n```text\nclient:{client_id}\nproject:{project_id}\nagent:{agent_id}\nrole:{role_id}\nexpert:{expert_id}\nworkflow:{workflow_instance_id}\ntask:{task_id}\n```\n\nNot all scopes need Backboard memory.\n\nDefault policy:\n\n- short-lived worker task: memory `off` or `readonly`\n- reviewer: memory `readonly`\n- architect/Atlas: memory `readonly` by default, controlled writes through `/teach`\n- long-running expert persona: memory `auto`\n- marketplace expert: memory `auto` inside that expert's isolated assistant scope\n- regulated/sensitive data: memory `off` until Backboard controls are confirmed"
        },
        {
          "title": "Backboard Spike",
          "level": 2,
          "body": "The next build should not be the Backboard docs MCP. The next build should be a memory/state spike."
        },
        {
          "title": "Spike Goals",
          "level": 3,
          "body": "Validate whether Backboard can serve as RedKey's memory/context layer."
        },
        {
          "title": "Spike Tasks",
          "level": 3,
          "body": "1. Add Doppler secrets:\n   - `BACKBOARD_API_KEY` already exists in `bezel/prd`.\n   - Add OpenRouter key if not already present.\n\n2. Create a small Backboard client:\n   - authenticate with `X-API-Key`\n   - create or identify assistant\n   - send message with memory `off`, `readonly`, and `auto`\n   - add/list/search/delete memories\n   - inspect retrieved memories when available\n\n3. Create a RedKey provider interface:\n   - `MemoryProvider`\n   - `ModelProvider`\n   - `BackboardMemoryProvider`\n   - `OpenRouterModelProvider`\n\n4. Run controlled evals:\n   - memory write and retrieval\n   - memory isolation between assistants\n   - readonly mode does not write\n   - off mode does not retrieve or write\n   - OpenRouter model switch preserves useful state through Backboard\n   - small-context model receives sufficient context\n   - latency and cost are acceptable\n\n5. Compare against current Supabase `agent_memory`:\n   - retrieval relevance\n   - inspectability\n   - write control\n   - deletion/export\n   - latency\n   - cost\n   - operational complexity"
        }
      ],
      "html_path": "artifacts/2026-05-06-backboard-openrouter-memory-strategy-7b68dbe4ff.html",
      "json_path": "artifacts/2026-05-06-backboard-openrouter-memory-strategy-7b68dbe4ff.json"
    },
    {
      "id": "2026-05-06-b2bea-org-publishing-model-spec-de6b89a680",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-publishing-model-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.717Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Publishing Model Spec",
      "summary": "B2BEA.org V1 Publishing Model Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: publishing model spec Artifact ID: a9636e2f a4be 4586 82dd c1a7bf3199fa Version: 1 Status: draft Updated: 2026 05 06T20:05:00.344465+00:00 Decisions ID Topic Decision PUB DEC 001 Publishin...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Publishing Model Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `publishing-model-spec`\n- Artifact ID: `a9636e2f-a4be-4586-82dd-c1a7bf3199fa`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-06T20:05:00.344465+00:00`"
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `PUB-DEC-001` | Publishing paths | V1 supports two first-class page publishing paths: Sanity standard pages and custom HTML import. |\n| `PUB-DEC-002` | Source of truth | Sanity owns editorial/public content. B2BEA Supabase owns application and operational data. Code/import registry owns custom HTML page artifacts. |\n| `PUB-DEC-003` | Internal permissions | Brett, Sarah, and Justin can publish directly in V1; production control comes from preview, required fields, lifecycle states, audit events, and rollback/archive behavior rather than complex internal RBAC. |\n| `PUB-DEC-004` | Public company profiles | Vendor public profiles are V1. Practitioner company public profiles are excluded from V1; company workspace is private only. |\n| `PUB-DEC-005` | Page metadata | Every publishable page type must satisfy hardened SEO, GEO, and social metadata requirements before publish. |"
        },
        {
          "title": "Publishing Paths",
          "level": 2,
          "body": "| Path | Purpose | Source Of Truth | Lifecycle | Required Controls |\n|---|---|---|---|---|\n| Sanity standard page | Create normal structured public pages using reusable templates and Lovable design-system components. | Sanity | `draft`, `preview`, `scheduled`, `published`, `archived` | Template selection, required fields, slug rules, SEO metadata, GEO metadata, social metadata, preview URL, publish/schedule, archive, analytics hooks. |\n| Custom HTML import | Bring in custom landing pages/resources when the page needs a bespoke design outside standard templates. | Code/import registry plus repository artifact | `draft`, `preview`, `published`, `archived`, `rolled_back` | Owner, page registry entry, slug/path, asset validation, preview URL, publish flag, archive/rollback, SEO metadata, GEO metadata, social metadata, analytics hooks. |"
        },
        {
          "title": "Source Of Truth Boundaries",
          "level": 2,
          "body": "| Domain | Source | Examples |\n|---|---|---|\n| Editorial/public content | Sanity | Standard pages, articles, blog/editorial content, resource/guide/report body copy, SEO/GEO/social fields, author editorial metadata. |\n| Custom page artifacts | Code/import registry | Custom HTML, page-specific CSS/JS, static assets, custom resource pages. |\n| Profiles and organizations | B2BEA Supabase | People, companies/organizations, vendors, vendor claims, vendor profile updates. |\n| Membership and entitlements | B2BEA Supabase | Memberships, roles, seats, resource/course/event access. |\n| Academy | B2BEA Supabase unless later split | Courses, modules, lessons, enrollments, progress, certificates. |\n| Surveys and forms | B2BEA Supabase | Survey definitions, questions, responses, forms, submissions, exports. |\n| Jobs and events operations | B2BEA Supabase | Jobs, scraped jobs, event registrations, attendees, sponsors, check-in. |\n| CRM pipeline | HubSpot primary | Leads, opportunities, sales activity, renewals. |\n| Analytics and notifications | B2BEA Supabase plus provider logs | Page views, downloads, notification event log, email delivery status. |"
        },
        {
          "title": "Page Lifecycle",
          "level": 2,
          "body": "| State | Meaning | Public |\n|---|---|---:|\n| `draft` | Editable but not public. | No |\n| `preview` | Viewable through protected preview URL for review. | No |\n| `submitted` | External contributor/vendor/company has submitted for review. | No |\n| `in_review` | B2BEA is reviewing public-facing or externally submitted content. | No |\n| `scheduled` | Approved content scheduled for future publication. | No |\n| `published` | Visible publicly or to its gated audience. | Yes |\n| `archived` | Removed from public listing and navigation; may remain internally readable. | No |\n| `rolled_back` | Prior version restored or current custom page removed from public route. | No |"
        },
        {
          "title": "Hardened SEO, GEO, And Social Rules",
          "level": 2,
          "body": "No public page publishes without complete SEO, GEO, social, indexing, and analytics metadata appropriate to its page family.\n\nApplies to:\n\n- Sanity standard pages.\n- Custom HTML imports.\n- Vendor public profiles.\n- Person profiles.\n- Articles.\n- Resources, guides, and reports.\n- Events.\n- Jobs.\n- Courses.\n- Public survey landing/results pages."
        },
        {
          "title": "SEO Required",
          "level": 3,
          "body": "- Meta title.\n- Meta description.\n- Canonical URL.\n- Index/noindex flag.\n- Robots behavior.\n- Slug.\n- H1.\n- Primary topic/category.\n- Breadcrumb data where applicable.\n- Structured data type where applicable.\n- Sitemap inclusion flag.\n- Redirect rule when URL changes."
        },
        {
          "title": "GEO Required",
          "level": 3,
          "body": "GEO here means generative engine optimization: the page should be understandable, attributable, and answer-ready for AI search and answer engines.\n\n- LLM answer summary.\n- Entity/topic tags.\n- Audience.\n- Industry/category context.\n- Key facts.\n- Source/author attribution.\n- Last reviewed date.\n- Content freshness rule.\n- FAQ/question-answer fields where applicable.\n- Citation/source fields where applicable."
        },
        {
          "title": "Social Required",
          "level": 3,
          "body": "- Open Graph title.\n- Open Graph description.\n- Open Graph image.\n- Twitter/X card type.\n- Social share image alt text.\n- LinkedIn-safe summary.\n- Fallback image by page family."
        },
        {
          "title": "Validation Rules",
          "level": 3,
          "body": "- Metadata is validated at build/publish time.\n- Preview surfaces show search/social preview before publish.\n- Missing required metadata blocks publish for standard pages.\n- Custom HTML imports must declare metadata in registry/frontmatter.\n- Archive/noindex state updates sitemap and robots behavior.\n- Private/preview pages must be `noindex`."
        },
        {
          "title": "Page Family Overrides",
          "level": 3,
          "body": "- Vendor profiles require vendor category, services, canonical vendor URL, and vendor logo/social image fallback.\n- Resources, guides, and reports require gated/free flag, sponsor/vendor attribution where applicable, and download analytics key.\n- Jobs require job structured data when public and expiration/closed state handling.\n- Events require event structured data and registration state.\n- Courses require course structured data where public and entitlement/gating metadata."
        },
        {
          "title": "URL And Slug Rules",
          "level": 2,
          "body": "- Every public page has one canonical URL.\n- Slug must be unique within its page family.\n- Changing a published slug requires redirect handling.\n- Custom HTML imports must declare their route in the page registry.\n- Archived pages should not appear in public navigation, search indexes, or sitemap output.\n- Vendor public profiles keep vendor-profile URL ownership in Supabase-backed routing.\n- Practitioner company public routes are not generated in V1."
        },
        {
          "title": "Analytics Requirements",
          "level": 2,
          "body": "- Page view tracking for public pages.\n- Resource download tracking.\n- Campaign/source attribution where available.\n- Vendor-owned content attribution where relevant.\n- Custom HTML pages must include the standard analytics hook.\n- Privacy-safe export boundaries."
        },
        {
          "title": "Approval Rules",
          "level": 2,
          "body": "- Core admins can publish Sanity standard pages directly after metadata validation.\n- Core admins can publish custom HTML imports directly after preview and metadata validation.\n- Vendor profile changes require B2BEA review before changing public projection.\n- Vendor content submissions require B2BEA review before publishing.\n- Company-created jobs require B2BEA admin review before public publishing.\n- Practitioner company workspace changes do not create public pages in V1."
        },
        {
          "title": "Implementation Implications",
          "level": 2,
          "body": "- Create a page registry abstraction for custom HTML imports.\n- Define Sanity schemas for standard pages and editorial/resource content.\n- Create shared SEO/GEO/social metadata schema fields by page family.\n- Keep Supabase-backed operational pages separate from editorial page schemas.\n- Add a redirect model before allowing published slug changes at scale.\n- Design preview URLs and build/deploy behavior before coding publishing workflows.\n- Make SEO, GEO, social, and analytics fields required by page family, not optional afterthoughts."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Which exact existing page families become Sanity standard pages in V1?\n- Should custom HTML imports be checked into the site repo, stored as Supabase/Sanity assets, or both?\n- What is the minimum rollback behavior for static/custom pages on the first rebuild release?\n- Which standard templates are required before migration starts?\n- What exact GEO fields should appear in Sanity versus be generated at build time?"
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- `design-system-spec`\n- `data-model-spec`\n- `surface-specs`\n- `custom-html-import-spec`\n- `sanity-schema-spec`\n- `seo-geo-social-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-publishing-model-spec-de6b89a680.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-publishing-model-spec-de6b89a680.json"
    },
    {
      "id": "2026-05-06-b2bea-org-production-readiness-gap-register-e725ae08a1",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-production-readiness-gap-register.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.714Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Production Readiness Gap Register",
      "summary": "B2BEA.org V1 Production Readiness Gap Register Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: production readiness gap register Artifact ID: 80328220 3deb 4cf9 a68f d440b41a38da Version: 3 Status: draft Updated: 2026 05 06T20:00:09.174+00:00 Scope Policy V1 means produc...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Production Readiness Gap Register",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `production-readiness-gap-register`\n- Artifact ID: `80328220-3deb-4cf9-a68f-d440b41a38da`\n- Version: `3`\n- Status: `draft`\n- Updated: `2026-05-06T20:00:09.174+00:00`"
        },
        {
          "title": "Scope Policy",
          "level": 2,
          "body": "V1 means production-ready. Core production capability groups are in scope unless explicitly removed during review.\n\nThe internal admin model can stay light because core site changes are handled by Brett, Sarah, and Justin. The site still needs strong production controls around public publishing, external self-service, entitlements, billing, surveys, jobs, learning access, vendor data, company workspaces, auditability, and rollback."
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `DEC-001` | Public practitioner company profiles | Exclude from V1. Company workspace is private only; vendor profiles remain public. |\n| `DEC-002` | Company-created jobs | Require B2BEA admin review before public publishing in V1. |\n| `DEC-003` | Sanity versus Supabase source of truth | Sanity owns editorial/public content. B2BEA Supabase owns application and operational data, including people, company, vendor, membership, course, survey, job, event, analytics, and notification records. |\n| `DEC-004` | Notifications | V1 is email-first with an internal notification event log. In-app notifications are designed for later unless a surface explicitly needs them. |\n| `DEC-005` | CRM source of truth | HubSpot is the primary CRM for leads, pipeline, sales activity, and renewals. B2BEA Supabase owns website profiles and operational entities. |\n| `DEC-006` | Vendor and company analytics exports | V1 allows bounded own-account exports only. No raw platform-wide data, cross-account comparisons, or sensitive user-level data unless explicitly consented and permitted. |"
        },
        {
          "title": "Severity Legend",
          "level": 2,
          "body": "- `P0`: Blocks production launch or creates unacceptable public, security, or data risk.\n- `P1`: Required for V1 quality; launchable only with a deliberate temporary workaround.\n- `P2`: Important polish or operational maturity after core production flows are stable."
        },
        {
          "title": "Gap Register",
          "level": 2,
          "body": "| ID | Domain | Severity | Current State | Production Requirement | Next Artifact |\n|---|---|---:|---|---|---|\n| `GAP-001` | Design System And UI Contracts | P0 | Lovable-system styles exist as an overlay, but page families still need a hardened reusable contract. | Shared tokens, typography scale, page headers, fields, tables, pills, buttons, cards, states, and responsive rules. | `design-system-spec` |\n| `GAP-002` | Publishing Model | P0 | Publishing spans Eleventy, Sanity, static pages, and custom landing/resource needs without one documented lifecycle. | Two explicit paths: custom HTML import and Sanity standard page creation, each with owner, preview, publish, archive/rollback, analytics, SEO, and URL behavior. | `publishing-model-spec` |\n| `GAP-003` | Auth, External Authorization, And Entitlements | P0 | Auth exists and role checks are present, but critical authorization and entitlement behavior needs a target server-side model. | Members, vendors, company admins, employees, and anonymous users have explicit access rules enforced server-side. | `permission-lifecycle-matrix` |\n| `GAP-004` | Data Ownership And Lifecycle States | P0 | Data is spread across Supabase, Sanity, and static JSON with inconsistent lifecycle states. | Every production record has owner, source of truth, status lifecycle, timestamps, edit rules, visibility rules, and archive/delete behavior. | `data-model-spec` |\n| `GAP-005` | Surveys And Assessments | P0 | Maturity assessment exists, but there is no generalized survey creation, taking, reporting, and display system. | Admins create/publish/archive surveys; public/member/company users take them; admins display/export/analyze results. | `survey-system-spec` |\n| `GAP-006` | Forms And Intake | P1 | Individual intake/contact/application flows exist, but no reusable form builder/intake review capability. | Admins create/publish forms; users submit; submissions are reviewable, assignable, exportable, and tied to source/context. | `intake-form-spec` |\n| `GAP-007` | Practitioner Company Workspace | P0 | Company workspace is a target surface but not implemented as a first-class portal. | Practitioner companies manage employees/seats, grant academy/careers access, view entitlements, and see team activity in a private workspace only. | `company-workspace-spec` |\n| `GAP-008` | Vendor Portal Commercial Workflow | P0 | Vendor portal has profile/content/analytics foundations; team, resources, courses, events, leads, and billing are incomplete. | Vendors manage membership/billing, team access, leads, sponsorships, submitted content/resources/courses/events, and analytics. | `vendor-portal-spec` |\n| `GAP-009` | Academy And Certification | P0 | Courses, modules, lessons, enrollment, and progress exist; certification and company assignment depth is missing. | Academy supports enrollment, company assignment, learning paths, quizzes/challenges, progress, certificates, and entitlement-aware access. | `academy-certification-spec` |\n| `GAP-010` | Events And Sponsorship | P1 | Event detail pages exist; full event operations and sponsor workflow are not mapped as production systems. | Admins manage events, speakers, sponsors, attendees, check-in, and exports; members register; vendors sponsor. | `event-sponsorship-spec` |\n| `GAP-011` | Editorial Workflow And Content Governance | P0 | Articles/resources/vendor content exist, but no complete editorial calendar, review, scheduling, SEO, and governance model. | Content creation, review, schedule, publish, archive, SEO, redirects, vendor submissions, and public page ownership are first-class workflows. | `editorial-workflow-spec` |\n| `GAP-012` | Jobs And Careers | P1 | Public jobs, admin jobs, scraping sources, and scraped-job review exist; company-owned job posting needs definition. | Jobs support internal creation, scraped review, company posting, publish/archive lifecycle, applications/intake, and reporting. | `careers-spec` |\n| `GAP-013` | Notifications | P0 | Flows imply notifications but there is no unified email/in-app notification contract. | Material lifecycle events send the right notifications with preferences, templates, delivery logging, and retry/error handling. | `notification-spec` |\n| `GAP-014` | Reporting And Analytics | P0 | Page views and downloads are tracked in places, and vendor analytics exist, but no unified reporting layer. | Admins, vendors, and companies view role-appropriate analytics for platform, membership, content, academy, surveys, vendors, and teams. | `analytics-reporting-spec` |\n| `GAP-015` | CRM And Sales Operations | P1 | Membership, vendor, and lead-like workflows exist but are not consolidated as a CRM/sales pipeline. | B2BEA.org captures and routes leads/intake to HubSpot, which remains primary CRM for pipeline, sales activity, and renewals. B2BEA Supabase remains source of truth for profiles and operational site data. | `crm-sales-ops-spec` |\n| `GAP-016` | Security, Privacy, And Abuse Controls | P0 | Auth exists, but production abuse controls, PII rules, file/media handling, and sensitive action logging need explicit design. | Protected data and mutation paths have server-side checks, rate limits where needed, audit logs, privacy boundaries, secure media handling, and safe public rendering. | `security-privacy-spec` |\n| `GAP-017` | Operational Observability And QA | P0 | Tests and builds exist, but V1 needs readiness checks across routes, roles, integrations, and visual consistency. | Every V1 surface has acceptance criteria, test coverage, route QA, visual checks, error monitoring, deploy checks, and fallback behavior. | `qa-release-readiness-spec` |"
        },
        {
          "title": "`GAP-001` Design System And UI Contracts",
          "level": 3,
          "body": "Affected capabilities include `SystemRenderEmptyState`, `SystemRenderErrorState`, `SystemRenderLoadingState`, `PublicSearchSite`, and `AdminViewDashboard`.\n\nMissing work:\n\n- Design-system spec.\n- Component inventory.\n- Page template rules.\n- Regression screenshot checklist.\n\nDecision needed: confirm Lovable-system as the target design language and define which home, blog, and resource pages remain exceptions."
        },
        {
          "title": "`GAP-002` Publishing Model",
          "level": 3,
          "body": "Affected capabilities include `AdminOpenStudio`, `AdminCreateArticle`, `AdminScheduleArticle`, `AdminPublishArticle`, `AdminManageContentSEO`, and `AdminManageRedirects`.\n\nMissing work:\n\n- Sanity page schema.\n- Custom HTML import spec.\n- Preview/publish workflow.\n- Redirect and SEO rules.\n- Rollback/archive behavior.\n\nDecision: Sanity owns editorial/public content. B2BEA Supabase owns operational/application data."
        },
        {
          "title": "`GAP-003` Auth, External Authorization, And Entitlements",
          "level": 3,
          "body": "Affected capabilities include `SystemAuthorizeByRole`, `SystemAuthorizeByEntitlement`, `PublicGateResourceByMembership`, `MemberAccessProResources`, and `CompanyGrantAcademyAccess`.\n\nMissing work:\n\n- Role/entitlement matrix.\n- Server-side guard pattern.\n- Membership, course, and resource entitlement rules.\n- Failure states.\n- Audit events.\n\nDecision needed: keep internal admin light, but decide external roles for member, pro member, vendor admin, vendor member, company admin, company employee, and author."
        },
        {
          "title": "`GAP-004` Data Ownership And Lifecycle States",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateCompany`, `AdminCreateVendor`, `VendorSubmitProfileUpdate`, `CompanyUpdateCompanyProfile`, and `AdminPublishOrArchiveJob`.\n\nMissing work:\n\n- Canonical entity inventory.\n- Supabase/Sanity ownership map.\n- Lifecycle state matrix.\n- Archive/delete rules.\n- Migration plan.\n\nDecision needed: decide source of truth per entity: people, organizations, vendors, pages, articles, courses, surveys, jobs, events, and resources."
        },
        {
          "title": "`GAP-005` Surveys And Assessments",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateSurvey`, `AdminPublishSurvey`, `PublicTakeSurvey`, `MemberTakeSurvey`, `CompanyAssignSurvey`, `AdminDisplaySurveyData`, and `AdminExportSurveyResponses`.\n\nMissing work:\n\n- Survey schema.\n- Question types.\n- Audience assignment.\n- Response capture.\n- Scoring and reporting.\n- Export.\n- Results display permissions.\n\nDecision needed: decide whether maturity assessment becomes the first survey type or remains a separate special flow."
        },
        {
          "title": "`GAP-006` Forms And Intake",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateForm`, `PublicSubmitForm`, `MemberSubmitForm`, `VendorSubmitForm`, and `AdminReviewFormSubmission`.\n\nMissing work:\n\n- Form schema.\n- Submission model.\n- Review queue.\n- Assignment/status.\n- Spam/rate controls.\n- Export.\n\nDecision needed: decide which existing forms should be migrated into the reusable system for V1."
        },
        {
          "title": "`GAP-007` Practitioner Company Workspace",
          "level": 3,
          "body": "Affected capabilities include `CompanyViewWorkspace`, `CompanyManageEmployeeSeats`, `CompanyInviteEmployee`, `CompanyGrantAcademyAccess`, `CompanyAssignCourseToEmployee`, and `CompanyViewEntitlements`.\n\nMissing work:\n\n- Company roles.\n- Seat model.\n- Employee invite/remove.\n- Academy assignment.\n- Career permissions.\n- Entitlement display.\n- Team analytics.\n\nDecision: public practitioner company profiles are not V1. Company workspace is private only; vendor public profiles remain V1."
        },
        {
          "title": "`GAP-008` Vendor Portal Commercial Workflow",
          "level": 3,
          "body": "Affected capabilities include `VendorManageMembershipBilling`, `VendorManageTeamMembers`, `VendorViewLeads`, `VendorManageResources`, `VendorManageCourses`, and `VendorManageEvents`.\n\nMissing work:\n\n- Vendor membership lifecycle.\n- Billing integration decision.\n- Team roles.\n- Lead model.\n- Sponsorship workflow.\n- Resource, course, and event submission.\n\nDecision needed: decide what vendor self-service should be direct versus reviewed by B2BEA admin."
        },
        {
          "title": "`GAP-009` Academy And Certification",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateCourse`, `AdminEnrollLearner`, `AdminCreateCertification`, `AdminIssueCertificate`, `CompanyAssignLearningPath`, and `MemberViewCertificate`.\n\nMissing work:\n\n- Certification schema.\n- Learning path model.\n- Quiz/challenge grading rules.\n- Certificate issue/share flow.\n- Company assignment flow.\n- Progress reporting.\n\nDecision needed: decide which certification products are V1 and what completion criteria issue certificates."
        },
        {
          "title": "`GAP-010` Events And Sponsorship",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateEvent`, `AdminManageEventSpeakers`, `AdminManageEventSponsors`, `MemberRegisterForEvent`, and `VendorSponsorEvent`.\n\nMissing work:\n\n- Event schema.\n- Registration flow.\n- Speaker/sponsor models.\n- Check-in.\n- Exports.\n- Vendor sponsorship portal flow.\n\nDecision needed: decide if event registration/payment is native V1 or linked to a third-party platform."
        },
        {
          "title": "`GAP-011` Editorial Workflow And Content Governance",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateArticle`, `AdminScheduleArticle`, `AdminReviewVendorContent`, `AdminApproveVendorContent`, and `VendorSubmitSponsoredContent`.\n\nMissing work:\n\n- Editorial status lifecycle.\n- Review queue.\n- Vendor submission mapping.\n- Scheduled publish.\n- SEO fields.\n- Redirect manager.\n- Archive rules.\n\nDecision needed: decide whether vendor submissions create Sanity drafts, Supabase records, or both."
        },
        {
          "title": "`GAP-012` Jobs And Careers",
          "level": 3,
          "body": "Affected capabilities include `AdminCreateJob`, `AdminReviewScrapedJob`, `CompanyCreateJobPosting`, `CompanyUpdateJobPosting`, and `CompanyViewCareerEngagement`.\n\nMissing work:\n\n- Company job ownership.\n- Moderation rules.\n- Application routing.\n- Career activity model.\n- Scrape operations controls.\n- Reporting.\n\nDecision: company-created jobs require B2BEA admin review before public publishing in V1."
        },
        {
          "title": "`GAP-013` Notifications",
          "level": 3,
          "body": "Affected capabilities include `SystemSendEmailNotification`, `SystemSendInAppNotification`, `SystemNotifyClaimApproved`, `SystemNotifyCourseAssigned`, and `SystemNotifySurveyAssigned`.\n\nMissing work:\n\n- Notification event catalog.\n- Template ownership.\n- Email provider decision.\n- In-app notification model.\n- User preferences.\n- Delivery logs.\n\nDecision: V1 notifications are email-first with an internal notification event log."
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-production-readiness-gap-register-e725ae08a1.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-production-readiness-gap-register-e725ae08a1.json"
    },
    {
      "id": "2026-05-06-b2bea-org-permission-lifecycle-matrix-67d0d78e54",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-permission-lifecycle-matrix.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.713Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Permission + Lifecycle Matrix",
      "summary": "B2BEA.org V1 Permission + Lifecycle Matrix Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: permission lifecycle matrix Artifact ID: dcfc8620 9f28 4019 aeeb de3e279fd7a7 Version: 3 Status: draft Updated: 2026 05 06T20:00:08.982+00:00 Principle Keep internal B2BEA administ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Permission + Lifecycle Matrix",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `permission-lifecycle-matrix`\n- Artifact ID: `dcfc8620-9f28-4019-aeeb-de3e279fd7a7`\n- Version: `3`\n- Status: `draft`\n- Updated: `2026-05-06T20:00:08.982+00:00`"
        },
        {
          "title": "Principle",
          "level": 2,
          "body": "Keep internal B2BEA administration simple; enforce external self-service, entitlements, ownership, lifecycle, and public visibility rules rigorously."
        },
        {
          "title": "Internal Admin Model",
          "level": 2,
          "body": "Core admins: Brett, Sarah, and Justin.\n\nV1 rule: all three can make core site/admin changes. Avoid complex internal admin tiers for V1.\n\nRequired controls:\n\n- Preview.\n- Status.\n- Publish/archive.\n- Rollback where feasible.\n- Audit events for public/material changes.\n- Required fields and validation.\n\nNot V1:\n\n- Granular internal admin privilege tiers.\n- Multi-step internal approval chains for the core team."
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision | Rationale |\n|---|---|---|---|\n| `DEC-001` | Public practitioner company profiles | Exclude from V1. Vendor public profiles are V1; practitioner company accounts are private workspace only. | Practitioner company value in V1 is operational access for seats, academy, careers, entitlements, and team reporting. Public company pages would add a new public directory/moderation surface without being required for V1. |\n| `DEC-002` | Company-created jobs | Require B2BEA admin review before public publishing in V1. | Jobs are public-facing and need quality, trust, and spam controls. |\n| `DEC-003` | Sanity versus Supabase source of truth | Sanity owns editorial/public content. B2BEA Supabase owns application and operational data, including people, company, vendor, membership, course, survey, job, event, analytics, and notification records. | Keep content editing in the CMS and product/workflow state in the application database. |\n| `DEC-004` | Notifications | V1 is email-first with an internal notification event log. In-app notifications are designed for later unless a surface explicitly needs them. | Email covers V1 production needs with less UI/state complexity. |\n| `DEC-005` | CRM source of truth | HubSpot is the primary CRM for leads, pipeline, sales activity, and renewals. B2BEA Supabase owns website profiles and operational entities. | HubSpot should own CRM workflow; the website should own profile/workspace/product data. |\n| `DEC-006` | Vendor and company analytics exports | V1 allows bounded own-account exports only. No raw platform-wide data, cross-account comparisons, or sensitive user-level data unless explicitly consented and permitted. | Keeps analytics useful while protecting privacy and platform data. |"
        },
        {
          "title": "Roles",
          "level": 2,
          "body": "| Role | Description | Access Boundary |\n|---|---|---|\n| `anonymous` | Unauthenticated public visitor. | Public content, ungated forms, public surveys, vendor/person/job/event pages, signup/login. |\n| `member` | Authenticated individual with a profile. | Own profile, own learning, own survey responses, member resources according to entitlements. |\n| `pro_member` | Member with paid/pro entitlement. | Pro gated resources, eligible academy/content/event benefits. |\n| `vendor_admin` | Vendor user who manages a vendor account. | Own vendor profile submissions, vendor team, content submissions, leads/analytics/billing when enabled. |\n| `vendor_member` | Vendor team member with limited vendor workspace access. | Vendor workspace sections assigned by vendor admin. |\n| `company_admin` | Practitioner company user who manages company access. | Own company employees, seats, academy/careers access, company entitlements, team reporting. |\n| `company_employee` | Employee under a practitioner company account. | Assigned academy/career/resources benefits, own profile and progress. |\n| `author` | Content contributor. | Own drafts/submissions where enabled; public publishing controlled by B2BEA admin/editorial workflow. |\n| `b2bea_admin` | Trusted B2BEA core admin team. | Full internal operations for V1; simple team trust model with audit for material changes. |\n| `system` | Automations, scheduled jobs, integrations. | Narrow service actions for notifications, analytics, imports, syncs, and lifecycle events. |"
        },
        {
          "title": "Permission Matrix",
          "level": 2,
          "body": "| Area | Anonymous | Member | Pro Member | Vendor Admin | Company Admin | B2BEA Admin |\n|---|---|---|---|---|---|---|\n| Public pages and directories | read | read | read | read | read | create/update/publish/archive |\n| Custom HTML landing/resource pages | read when published | read by gate | read by gate | none unless sponsor workflow | none unless assigned | import/preview/publish/archive/rollback |\n| Sanity standard pages | read when published | read by gate | read by gate | submit where enabled | none | create/update/preview/schedule/publish/archive |\n| Member profile | read public projection only | read/update own | read/update own | read own person only | read own person only | read/update/support |\n| Vendor profile | read published | read published | read published | submit updates for own vendor | read published | create/update/approve/publish/archive |\n| Vendor content submissions | none | none | none | create/update own submissions | none | review/approve/reject/publish/archive |\n| Company workspace | none | none unless employee | none unless employee | none | manage own company | create/update/support/audit |\n| Academy courses | browse public catalog | enroll/take if entitled | enroll/take if entitled | manage vendor-submitted courses when enabled | assign entitled courses | create/update/enroll/manage |\n| Surveys | take public surveys | take assigned/member surveys | take assigned/member surveys | view vendor-owned results if enabled | assign/view company results | create/publish/analyze/export |\n| Jobs and careers | read published jobs/apply where public | apply/manage own activity | apply/manage own activity | none unless sponsor/employer flow | create/update own job postings when enabled | create/review/publish/archive |\n| Events and sponsorship | read/register public events | register/manage own registrations | register/manage eligible benefits | sponsor/manage own sponsorship assets | register team where enabled | create/manage/publish/export |\n| Billing and memberships | start checkout/application | manage own membership where enabled | manage own membership | manage own vendor billing | manage company billing/contact | support/manage/administer |\n| Analytics and reporting | none | own history only | own history only | own vendor analytics/leads | own company/team analytics | platform analytics/export |"
        },
        {
          "title": "Lifecycle Matrix",
          "level": 2,
          "body": "| Entity | Owner | Source Of Truth | States | Public Visibility | Approval Rule |\n|---|---|---|---|---|---|\n| Sanity standard page | `b2bea_admin` | Sanity | `draft`, `preview`, `scheduled`, `published`, `archived` | Published only. | Core admin can publish directly; audit material public changes. |\n| Custom HTML landing/resource page | `b2bea_admin` | Code/import registry | `draft`, `preview`, `published`, `archived`, `rolled_back` | Published only. | Core admin can publish directly; rollback/archive required. |\n| Article/resource/guide/report | `b2bea_admin` or author/vendor by submission | Sanity plus Supabase tracking as needed | `draft`, `submitted`, `in_review`, `approved`, `scheduled`, `published`, `rejected`, `archived` | Published only. | Vendor/author submissions require B2BEA review. |\n| Vendor profile | `vendor_admin` plus `b2bea_admin` | Supabase | `unclaimed`, `claimed`, `update_submitted`, `in_review`, `approved`, `published`, `rejected`, `archived` | Approved/published fields only. | Vendor changes submit for admin approval before public projection changes. |\n| Member profile | `member` | Supabase | `incomplete`, `active`, `public_profile_enabled`, `hidden`, `suspended` | Public projection only when enabled/eligible. | Member edits own profile; public display rules validated by system. |\n| Company workspace/account | `company_admin` plus `b2bea_admin` | Supabase | `prospect`, `active`, `suspended`, `expired`, `archived` | Private workspace only in V1. No public practitioner company profiles. | Company admin manages own workspace within entitlement limits; no public profile publishing in V1. |\n| Company employee seat | `company_admin` | Supabase | `invited`, `active`, `removed`, `expired` | Private. | Company admin manages seats within purchased/assigned entitlement. |\n| Course | `b2bea_admin` | Supabase/Sanity decision needed | `draft`, `preview`, `published`, `retired`, `archived` | Catalog visibility by status and entitlement. | Core admin can publish directly. |\n| Enrollment/course assignment | `member`, `company_admin`, or `b2bea_admin` | Supabase | `assigned`, `enrolled`, `in_progress`, `completed`, `expired`, `revoked` | Private to learner/company/admin. | Assignment must pass entitlement checks. |\n| Certificate | `member` plus `b2bea_admin` | Supabase | `eligible`, `issued`, `revoked`, `expired` | Private unless member shares/public enabled. | System/admin issues only when completion criteria pass. |\n| Survey | `b2bea_admin` | Supabase | `draft`, `preview`, `published`, `closed`, `archived` | Published surveys according to audience. | Core admin can publish; audience and result visibility required. |\n| Survey response | Respondent | Supabase | `started`, `submitted`, `invalidated`, `deleted` | Private/aggregated unless explicit results display. | Respondent can submit; admin can analyze/export according to privacy rules. |\n| Form | `b2bea_admin` | Supabase or Sanity decision needed | `draft`, `preview`, `published`, `closed`, `archived` | Published only. | Core admin can publish directly. |\n| Form submission | Submitter plus `b2bea_admin` | Supabase | `submitted`, `triaged`, `assigned`, `in_progress`, `resolved`, `spam`, `archived` | Private. | Admin reviews and assigns. |\n| Job posting | `b2bea_admin` or `company_admin` | Supabase | `draft`, `submitted`, `in_review`, `published`, `closed`, `rejected`, `archived` | Published only. | Company-created jobs require B2BEA admin review before public publishing in V1. |\n| Event | `b2bea_admin` | Supabase/Sanity decision needed | `draft`, `preview`, `published`, `registration_open`, `sold_out`, `completed`, `archived` | Published and registration states. | Core admin can publish directly. |\n| Vendor sponsorship | `vendor_admin` plus `b2bea_admin` | Supabase | `draft`, `submitted`, `in_review`, `approved`, `active`, `fulfilled`, `rejected`, `archived` | Active/approved sponsor assets only. | Vendor submissions require B2BEA approval. |\n| Notification | `system` | Supabase plus provider logs | `queued`, `sent`, `delivered`, `failed`, `suppressed` | Private to recipient/admin logs. | Triggered by lifecycle events and user preferences. |\n| Lead/opportunity | `b2bea_admin` | HubSpot primary CRM; B2BEA Supabase stores site intake/submission references as needed | `new`, `assigned`, `contacted`, `qualified`, `converted`, `lost`, `archived` | Private admin only. | Internal sales/admin workflow in HubSpot; B2BEA.org routes qualified intake to CRM. |"
        },
        {
          "title": "Enforcement Rules",
          "level": 2,
          "body": "- Public read paths can be static/client-rendered when data is already public.\n- Any mutation by members, vendors, companies, or anonymous users needs server-side validation and ownership checks.\n- Entitlement decisions should not rely only on client-side checks.\n- Vendor/company/member data updates must validate ownership before write.\n- Public projection changes should be auditable even when the core admin team can publish directly.\n- Billing, membership, course access, survey assignment, and company seats require explicit entitlement checks.\n- Export actions require role checks and audit events because they can expose sensitive data."
        },
        {
          "title": "Unresolved Decisions",
          "level": 2,
          "body": "No major permission/lifecycle decisions remain open at this level. Deeper specs may add implementation-level decisions."
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- `design-system-spec`\n- `publishing-model-spec`\n- `data-model-spec`\n- `surface-specs`\n- `security-privacy-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-permission-lifecycle-matrix-67d0d78e54.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-permission-lifecycle-matrix-67d0d78e54.json"
    },
    {
      "id": "2026-05-06-b2bea-org-entitlement-model-spec-4d13d65ab9",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-entitlement-model-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.711Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Entitlement Model Spec",
      "summary": "B2BEA.org V1 Entitlement Model Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: entitlement model spec Artifact ID: 355b3249 3af9 45a4 9c45 67777bd2d72d Version: 1 Status: draft Updated: 2026 05 06T23:32:25.756783+00:00 Live Supabase Check Checked against the active ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Entitlement Model Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `entitlement-model-spec`\n- Artifact ID: `355b3249-3af9-45a4-9c45-67777bd2d72d`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-06T23:32:25.756783+00:00`"
        },
        {
          "title": "Live Supabase Check",
          "level": 2,
          "body": "Checked against the active B2BEA Supabase project and current `B2BEA-org-new` code signals.\n\n- Supabase host: `czqxkykbhoyyjccckpqq.supabase.co`\n- Source repo: `/Users/justinking/Vaults/Projects/B2BEA-org-new`\n- Tables checked: `people`, `person_roles`, `membership_tiers`, `memberships`, `membership_seats`, `vendor_memberships`, `organization_members`, `courses`, `course_enrollments`, `events`, `content_embeddings`\n\nCurrent entitlement-related row counts:\n\n| Table | Rows | Notes |\n|---|---:|---|\n| `membership_tiers` | 3 | Seed tiers: Registered, Pro, Vendor. |\n| `memberships` | 1 | One active Pro membership. |\n| `membership_seats` | 0 | Seat assignment base exists but is unused. |\n| `vendor_memberships` | 0 | Vendor commercial/access layer exists but is unused. |\n| `organization_members` | 0 | Company workspace membership base exists but is unused. |\n| `courses` | 9 | Course catalog has mixed access/pricing fields. |\n| `course_enrollments` | 4 | Current learner participation records. |\n| `person_roles` | 8 | Role grants include Pro/vendor/admin-style roles. |\n\nCurrent tiers:\n\n| Tier | Category | Billing | Seat Model | Access Summary |\n|---|---|---|---|---|\n| Registered | practitioner | free | individual | Baseline account/profile access; no premium courses, reports, events, or vendor portal. |\n| Pro | practitioner | subscription | individual | All courses, reports, and events; no vendor portal; no enhanced directory. |\n| Vendor | vendor | invoice | company | Vendor portal write access and enhanced directory; no practitioner course/report/event grants by default. |\n\nCode signals:\n\n- `src/assets/js/authbridge.js` still checks the legacy `persons` table when evaluating Pro access.\n- Reports and guides call client-side `authbridge.checkProAccess()` for Pro gating.\n- Courses combine `courses.access_tier`, `courses.is_included_with_pro`, pricing fields, and `course_enrollments`.\n- Admin user tooling edits `people.is_pro` and `person_roles`, which can drift from active memberships.\n- `membership_tiers.access_rules` exists but is not yet the single enforced entitlement contract."
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `ENT-DEC-001` | Canonical entitlement truth | Active `memberships`, `membership_tiers.access_rules`, and `membership_seats` are the canonical source for paid/product access. Roles are permissions and operational responsibility, not paid entitlement truth. |\n| `ENT-DEC-002` | `people.is_pro` | `people.is_pro` may remain as a denormalized display/cache flag during migration, but it must not be treated as authoritative access truth. |\n| `ENT-DEC-003` | Server-side enforcement | Protected reads, protected downloads, enrollments, mutations, exports, and portal actions require a server-side entitlement check. Client-side checks may only improve UX. |\n| `ENT-DEC-004` | Company workspace | Practitioner company workspace uses organization-held memberships plus `membership_seats` for employee access to academy/careers benefits. Company public profiles are excluded from V1. |\n| `ENT-DEC-005` | Vendor portal | Vendor portal access requires a vendor relationship role and an active/approved vendor commercial entitlement when commercial gating is required. Vendor public profiles remain V1. |\n| `ENT-DEC-006` | Course enrollment | `course_enrollments` represents participation/progress after eligibility is granted. Eligibility to enroll comes from entitlement policy, purchase, admin grant, or company seat assignment. |\n| `ENT-DEC-007` | HubSpot boundary | HubSpot remains CRM primary for sales and renewals. B2BEA Supabase stores product entitlements and operational access state; HubSpot can mirror status but does not enforce site access. |"
        },
        {
          "title": "Target Principles",
          "level": 2,
          "body": "- Every protected capability resolves through one entitlement evaluator with auditable inputs and deterministic outputs.\n- Entitlement decisions are explicit: subject, action, resource, source, status, start time, end time, and reason.\n- Roles grant authority to administer or act on behalf of an account; memberships and seats grant product access.\n- A user can hold multiple contexts at once: individual Pro, vendor admin, company admin, employee seat, and internal platform admin.\n- Entitlement state should be explainable in the UI for support: why access exists, where it came from, when it expires, and who assigned it."
        },
        {
          "title": "Entitlement Subjects",
          "level": 2,
          "body": "| Subject | Examples | Current Sources |\n|---|---|---|\n| Person | Registered account, Pro member, course learner, company employee seat, vendor team member, platform admin | `people`, `person_roles`, `memberships.held_by_person_id`, `membership_seats.assigned_person_id`, `course_enrollments` |\n| Organization | Private practitioner company workspace, company academy/careers account | `organizations`, `organization_members`, `memberships.held_by_org_id`, `membership_seats` |\n| Vendor | Public vendor profile, vendor management portal account, enhanced directory listing | `vendors`, `vendor_memberships`, `person_roles`, `vendor_*` portal tables |"
        },
        {
          "title": "Entitlement Keys",
          "level": 2,
          "body": "| Key | Area | Grants |\n|---|---|---|\n| `account.registered` | Identity | Baseline authenticated account and profile access. |\n| `membership.pro` | Membership | Individual Pro status and Pro-only product eligibility. |\n| `resource.report.read.pro` | Resources | Read/download Pro reports and guides. |\n| `academy.course.enroll.included` | Academy | Enroll in courses included with the member tier or company seat. |\n| `academy.course.purchase` | Academy | Enroll in a course through a direct purchase/admin grant path. |\n| `academy.certification.earn` | Academy | Attempt certification requirements and receive certificates. |\n| `event.register.member` | Events | Register for member-included or member-priced events. |\n| `vendor.portal.read` | Vendor | View vendor portal dashboard and own profile/submission state. |\n| `vendor.portal.write` | Vendor | Submit vendor profile edits, case studies, media, and portal updates. |\n| `vendor.analytics.export` | Vendor | Export bounded own-vendor analytics. |\n| `company.workspace.read` | Company | Access private company workspace. |\n| `company.workspace.admin` | Company | Manage company users, jobs, academy assignments, and workspace settings. |\n| `company.academy.assign` | Company | Assign included academy content to employees. |\n| `company.careers.submit_job` | Company | Create job postings for admin review. |\n| `company.analytics.export` | Company | Export bounded own-company reporting. |\n| `survey.create` | Survey | Create survey definitions and assignments. |\n| `survey.respond` | Survey | Take assigned/public surveys. |\n| `survey.results.read` | Survey | View permitted survey results and dashboards. |\n| `admin.content.publish` | Internal admin | Publish standard Sanity pages or imported custom HTML. |\n| `admin.platform.manage` | Internal admin | Manage users, vendors, content review queues, and platform settings. |"
        },
        {
          "title": "Target Data Model",
          "level": 2,
          "body": "Use and harden the existing tables:\n\n| Table | Role |\n|---|---|\n| `membership_tiers` | Defines tier category, seat model, billing model, and structured `access_rules`. |\n| `memberships` | Canonical commercial/product entitlement holder for person-held, organization-held, and vendor-held memberships. |\n| `membership_seats` | Seat assignment from an org/vendor/company membership to an individual person. |\n| `person_roles` | Operational authority and relationship roles such as `platform_admin`, `vendor_admin`, `company_admin`, `author`. |\n| `course_enrollments` | Learning participation/progress after eligibility is granted. |\n\nAdd or harden:\n\n| Table | Purpose | Core Fields |\n|---|---|---|\n| `entitlement_grants` | Optional normalized/materialized grant table for fast and auditable access decisions. | `id`, `subject_type`, `subject_id`, `entitlement_key`, `source_type`, `source_id`, `status`, `starts_at`, `ends_at`, `metadata`, timestamps |\n| `entitlement_audit_events` | Audit log for grants, revocations, seat assignments, admin overrides, purchases, cancellations, and policy denials. | `id`, `actor_person_id`, `subject_type`, `subject_id`, `entitlement_key`, `event_type`, `source_type`, `source_id`, `reason`, `metadata`, `created_at` |\n| `course_assignments` | Company/admin course assignment layer separate from course participation. | `id`, `course_id`, `assigned_to_person_id`, `assigned_by_person_id`, `organization_id`, `source_type`, `status`, `due_at`, timestamps |\n| `entitlement_policy_tests` | Machine-readable policy fixtures for production gating regressions. | `id`, `scenario_key`, `subject_fixture`, `resource_fixture`, `expected_decision`, `created_at` |"
        },
        {
          "title": "Enforcement Contract",
          "level": 2,
          "body": "Input shape:\n\n| Field | Meaning |\n|---|---|\n| `subject` | `person_id` plus active organization/vendor context when applicable. |\n| `action` | Named capability/action key such as `academy.course.enroll` or `vendor.portal.write`. |\n| `resource` | Resource type and ID when relevant, such as `course_id`, `vendor_id`, `report_id`, `organization_id`. |\n| `context` | Request metadata, impersonation/admin mode, source surface, and time. |\n\nOutput shape:\n\n| Field | Meaning |\n|---|---|\n| `allowed` | Boolean decision. |\n| `entitlement_key` | Resolved grant key or required key. |\n| `reason_code` | Machine-readable allow/deny reason. |\n| `source_refs` | Membership, role, seat, purchase, admin grant, or policy refs used for the decision. |\n| `expires_at` | Expiration timestamp when access is time-bound. |\n\nHard rules:\n\n- No protected mutation trusts only `localStorage`, client profile state, or `people.is_pro`.\n- RLS policies and server routes/functions must agree on the same entitlement keys.\n- Admin override must be logged with actor, subject, reason, and expiration when temporary.\n- Exports must be filtered by own vendor/company context before data leaves Supabase."
        },
        {
          "title": "V1 Access Matrix",
          "level": 2,
          "body": "| Area | Capability | Required Access | Source |\n|---|---|---|---|\n| Public site | Read public content/vendor profiles/jobs/events | Anonymous/public unless explicitly gated | Sanity + Supabase public projections |\n| Member profile | Update own profile | `account.registered` + owns profile | `people` + auth user |\n| Member profile | Change password/account settings | Authenticated own account | Auth provider + `people` |\n| Resources | Read/download Pro report or guide | `resource.report.read.pro` or admin override | Memberships + tier rules + protected resource metadata |\n| Academy | Enroll included course | `academy.course.enroll.included` or course purchase/admin grant | Membership tier, seat, purchase/grant, course policy |\n| Academy | Continue enrolled course | Active `course_enrollments` row and not revoked | `course_enrollments` + entitlement status |\n| Academy | Create/manage course | `admin.platform.manage` or academy admin role | `person_roles`/`platform_admins` |\n| Vendor portal | Update vendor profile | `vendor.portal.write` + vendor relationship | Vendor entitlement + vendor ownership role |\n| Vendor portal | Create case study/content submission | `vendor.portal.write` | Vendor entitlement + `vendor_content_submissions` |\n| Vendor portal | Export own analytics | `vendor.analytics.export` | Vendor role + own vendor analytics filters |\n| Company workspace | Invite/manage employees | `company.workspace.admin` | `organization_members` + membership held by org |\n| Company workspace | Assign academy courses | `company.academy.assign` + available seats/content grant | `membership_seats` + `course_assignments` |\n| Company workspace | Submit job posting | `company.careers.submit_job` | Organization role + admin review workflow |\n| Surveys | Create survey | `survey.create` or `admin.platform.manage` | Future survey model + roles |\n| Surveys | Take survey | `survey.respond` + assignment/public rule | Future survey assignment/audience model |\n| Surveys | Display/export results | `survey.results.read` + audience/ownership filter | Future survey response/reporting model |\n| Internal admin | Publish Sanity standard page or custom HTML import | `admin.content.publish` | Small internal admin allowlist/role for Brett, Sarah, Justin |"
        },
        {
          "title": "Gaps",
          "level": 2,
          "body": "| ID | Severity | Area | Current | Required |\n|---|---:|---|---|---|\n| `ENT-GAP-001` | P0 | Legacy identity table | `authbridge.js` checks `persons` for Pro access while live schema uses `people`. | Replace `persons` usage with `people` or create/test an intentional compatibility view before launch. |\n| `ENT-GAP-002` | P0 | Fragmented Pro truth | `people.is_pro`, `person_roles.pro_member`, active memberships, and course fields can disagree. | Centralize Pro decision logic and backfill/derive display fields from canonical entitlement state. |\n| `ENT-GAP-003` | P0 | Client-side gating | Some reports/guides/course paths rely on client `authbridge` checks. | Server-side checks for protected reads/downloads/enrollments/mutations with RLS/function parity. |\n| `ENT-GAP-004` | P0 | Course access consistency | Courses have price fields, member prices, `access_tier` values, and `is_included_with_pro` flags that are not normalized. | Define a course access policy contract and migrate course rows to consistent values. |\n| `ENT-GAP-005` | P0 | Company seats | `membership_seats` and `organization_members` exist but are empty. | Implement org-held membership, employee role, seat assignment, revocation, and academy/careers benefit checks. |\n| `ENT-GAP-006` | P0 | Vendor membership | `vendor_memberships` is empty and not clearly tied to portal access. | Choose canonical vendor commercial source and wire vendor portal read/write/analytics checks to it. |\n| `ENT-GAP-007` | P1 | Auditability | No central entitlement audit event model observed. | Record grants, revocations, admin overrides, seat changes, purchases/cancellations, and denials. |\n| `ENT-GAP-008` | P1 | Surveys/forms | Generalized survey/form capability is missing. | New survey and form models must declare entitlement keys before implementation. |\n| `ENT-GAP-009` | P1 | Exports | Analytics tables exist but export entitlement rules are not centralized. | Implement own-account bounded export checks for vendors and companies. |"
        },
        {
          "title": "Migration Sequence",
          "level": 2,
          "body": "1. Inventory and remove/replace all `persons` table references in production code.\n2. Define entitlement key enum/constants shared by server functions, RLS, and UI display.\n3. Normalize `membership_tiers.access_rules` into versioned machine-readable rules.\n4. Implement entitlement evaluator and policy test fixtures before wiring new protected features.\n5. Backfill current Pro member state from `memberships` and reconcile `people.is_pro`/`person_roles` drift.\n6. Normalize course access fields and write course enrollment eligibility tests.\n7. Wire vendor portal and company workspace gates to memberships/seats/roles.\n8. Add entitlement audit events and support/admin visibility.\n9. Add survey/company/vendor export entitlement checks as those modules are built."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- A developer can answer \"why does this person have access?\" from one entitlement decision path.\n- Protected resources cannot be downloaded by editing client state or bypassing the UI.\n- Pro, vendor, company, and admin access are separately testable and can coexist on one person account.\n- Seat assignment and revocation changes access immediately or within a documented cache window.\n- All entitlement-changing operations create an audit event.\n- The old `persons`-table access path is gone or intentionally shimmed and covered by tests."
        },
        {
          "title": "Next Specs",
          "level": 2,
          "body": "- `company-workspace-data-spec`\n- `survey-system-spec`\n- `notification-spec`\n- `academy-certification-spec`\n- `vendor-portal-workflow-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-entitlement-model-spec-4d13d65ab9.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-entitlement-model-spec-4d13d65ab9.json"
    },
    {
      "id": "2026-05-06-b2bea-org-design-system-spec-4b1527b220",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-design-system-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.710Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Lovable Design System Spec",
      "summary": "B2BEA.org V1 Lovable Design System Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: design system spec Artifact ID: 4c3651ac 9a69 4117 a355 750b61f540c9 Version: 2 Status: draft Updated: 2026 05 06T20:23:15.537+00:00 Design System Repo Repo path: /Users/justinking/Va...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Lovable Design System Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `design-system-spec`\n- Artifact ID: `4c3651ac-9a69-4117-a355-750b61f540c9`\n- Version: `2`\n- Status: `draft`\n- Updated: `2026-05-06T20:23:15.537+00:00`"
        },
        {
          "title": "Design System Repo",
          "level": 2,
          "body": "- Repo path: `/Users/justinking/Vaults/Projects/b2bea-org-design-system`\n- Pattern reference: `/Users/justinking/Vaults/Projects/dreamborn-design-system`\n- Human brief: `design.md`\n- Canonical CSS: `b2bea.css`\n- Machine-readable files: `design-system.json`, `b2bea.design.json`"
        },
        {
          "title": "Logo Assets",
          "level": 2,
          "body": "Official B2BEA logo files are included in the design-system repo under `logos/`.\n\nCloudflare storage:\n\n- Account: `Brett Sinclair DNS`\n- Account ID: `3333630b9c90c49aef56730d9513c19f`\n- R2 bucket: `b2bea-guest-packs`\n- Namespace: `design-system/logos`\n- Rule: always use Brett's Cloudflare account for B2BEA.org assets."
        },
        {
          "title": "Source Files Reviewed",
          "level": 2,
          "body": "- `src/assets/css/lovable-system.css`\n- `src/assets/css/style.css`\n- `src/assets/css/portal.css`\n- `src/assets/css/admin.css`\n- `src/assets/css/search.css`\n- `src/_includes/layouts/base.njk`\n- `src/_includes/partials/nav.njk`"
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `DS-DEC-001` | Design authority | Lovable-system is the V1 visual authority for all non-excluded pages. |\n| `DS-DEC-002` | Intentional exceptions | Home page, blog, and resource pages may remain custom where explicitly approved; all other surfaces must converge on Lovable design-system rules. |\n| `DS-DEC-003` | Typography | Use Open Sans for display and body in the Lovable system. Remove legacy Hanken Grotesk dependency from target page families unless explicitly retained for an exception. |\n| `DS-DEC-004` | Page title scale | Standard page hero titles use `clamp(2.25rem, 4vw, 3.75rem)`. Article/editorial hero titles may use `clamp(2.75rem, 6vw, 5rem)`. Full marketing hero titles may use `clamp(3rem, 7vw, 6rem)` only on approved hero pages. |\n| `DS-DEC-005` | Forms/search/filters | All fields, selects, search inputs, filters, and pills use Lovable `2.5rem` field/control height, `0.875rem` text, `0.75rem` radius, and blue focus ring. |"
        },
        {
          "title": "Scope",
          "level": 2,
          "body": "In scope:\n\n- Public non-home pages.\n- Admin dashboard/pages.\n- Member profile/dashboard.\n- Vendor portal.\n- Company workspace.\n- Auth/account pages.\n- Academy/course pages.\n- Jobs/events/survey/forms surfaces.\n\nIntentional exceptions:\n\n- Home page.\n- Blog pages where intentionally editorial.\n- Resource pages where intentionally custom.\n- Custom HTML imports approved by the publishing model.\n\nExceptions still must satisfy accessibility, metadata, responsive, and production QA rules."
        },
        {
          "title": "Color",
          "level": 3,
          "body": "| Token | Value | Usage |\n|---|---|---|\n| `primary` | `hsl(226 100% 21%)` / `#00196C` | Headers, primary buttons, active pills, focus ring. |\n| `primary_dark` | `#001458` | Primary hover states. |\n| `accent` | `hsl(6 80% 59%)` / `#EB5444` | Accent buttons, badges, highlights. |\n| `accent_dark` | `#d94333` | Accent hover states. |\n| `background` | `hsl(0 0% 100%)` | Page background. |\n| `card` | `hsl(0 0% 100%)` | Cards and panels. |\n| `secondary_muted` | `hsl(0 0% 96%)` | Muted sections and outline hover. |\n| `border_input` | `hsl(220 13% 88%)` | Borders, inputs, table dividers. |\n| `muted_foreground` | `hsl(226 30% 45%)` | Subtitles, metadata, secondary navigation. |"
        },
        {
          "title": "Typography",
          "level": 3,
          "body": "| Token | Value |\n|---|---|\n| `font_display` | `Open Sans, system-ui, sans-serif` |\n| `font_body` | `Open Sans, system-ui, sans-serif` |\n| `body` | `16px` base, normal letter spacing, line-height `1.6` to `1.75` depending context. |\n| `ui_text` | `0.875rem` / `14px`, weight `600-700` for controls. |\n| `metadata` | `0.75rem` / `12px`, weight `700` for pills/badges. |"
        },
        {
          "title": "Radius, Shadow, Layout",
          "level": 3,
          "body": "| Token | Value |\n|---|---|\n| `radius` | `0.75rem` / `12px` |\n| `radius_sm` | `calc(radius - 4px)` / `8px` |\n| `pill_radius` | `999px` |\n| `shadow_sm` | `0 1px 3px rgba(0, 25, 108, 0.06)` |\n| `shadow_md` | `0 8px 30px -8px rgba(0, 25, 108, 0.10)` |\n| `container` | `min(100%, 1400px)`, `2rem` side padding |"
        },
        {
          "title": "Component Contracts",
          "level": 2,
          "body": "| Component | Contract |\n|---|---|\n| Page hero | Blue header block for standard pages; centered content; title `clamp(2.25rem, 4vw, 3.75rem)`; subtitle `1.125rem`; max inner width `64rem`. |\n| Article/editorial hero | White/background hero; breadcrumb `0.875rem`; title `clamp(2.75rem, 6vw, 5rem)`; excerpt `1.25rem`; media aspect `1200 / 630`. |\n| Cards | `1px` border, `12px` radius, white background, small blue-tinted shadow; hover may lift `-2px` only for clickable cards. |\n| Fields | `2.5rem` min height, `1px` input border, `12px` radius, white background, `0.5rem 0.75rem` padding, `14px` text, blue `3px` focus ring. |\n| Search bars | Same field contract; icon left at `0.875rem`; input left padding `2.25rem`; page toolbar search max width `42rem`. |\n| Buttons | `2.5rem` min height, `12px` radius, `14px` Open Sans, `700` weight; primary blue, accent coral, outline white with border. |\n| Pills and badges | `2rem` min height, `999px` radius, `12px` text, `700` weight; active pills use primary blue; badges use accent tint. |\n| Tables | Use card/panel container, `1px` borders/dividers, `14px` cells, muted metadata, sticky or clear table headers where long. |\n| States | Empty/loading/error/success states use card/panel treatment, concise heading, useful action, no unstyled browser defaults. |\n| Navigation | Two-bar restored header remains; Lovable nav/button/dropdown styling governs future header work unless intentionally revised. |"
        },
        {
          "title": "Page Patterns",
          "level": 2,
          "body": "| Pattern | Layout |\n|---|---|\n| Standard index/list page | Blue page hero, optional toolbar with search/filter, constrained content grid/table, consistent empty/error states. |\n| Detail page | Hero or header card, metadata/badges, main content plus optional sidebar, related items/action panel. |\n| Admin/portal workspace | Compact header, tabs or sidebar navigation, dense tables/forms, clear status pills, no marketing-scale type. |\n| Form workflow | Single clear title, fields in consistent grid, inline validation, primary action plus secondary cancel/back, success/error state. |"
        },
        {
          "title": "Standard Sizes",
          "level": 2,
          "body": "| Use | Size |\n|---|---|\n| Standard page title | `clamp(2.25rem, 4vw, 3.75rem)` |\n| Article page title | `clamp(2.75rem, 6vw, 5rem)` |\n| Full marketing hero title | `clamp(3rem, 7vw, 6rem)`, exception only |\n| Subtitle | `1.125rem` standard / `1.25rem` editorial or marketing hero |\n| Controls | `0.875rem` text, `2.5rem` min-height |\n| Pills/badges | `0.75rem` text, `2rem` min-height |\n| Card padding | `1.25rem` default, denser variants allowed for admin tables |"
        },
        {
          "title": "Drift To Remove",
          "level": 2,
          "body": "- Legacy Hanken Grotesk heading dependency on target pages.\n- Negative letter spacing in standard headings and controls.\n- Oversized H1s outside approved article/marketing hero contexts.\n- Mixed field radii of `4px`, `6px`, `8px`, `10px`, and `14px` on target pages.\n- Search/filter controls with dark modal styling outside intentional search overlay.\n- Page-specific card/button styles that duplicate Lovable component contracts.\n- Marketing/landing page scale in admin, portal, profile, and operational surfaces."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- Every in-scope page has one recognizable Lovable page/header pattern.\n- All in-scope fields/search/selects/textareas use the Lovable field contract.\n- All in-scope pills/badges use active/inactive Lovable pill states.\n- No standard page title exceeds the standard page title scale unless marked as article/marketing exception.\n- Admin/portal pages use compact operational typography and do not use large marketing heroes.\n- Cards do not nest inside decorative cards; panels use consistent borders/radius/shadows.\n- Mobile text fits without overlap and controls keep stable dimensions.\n- A visual QA pass covers desktop and mobile for each page family before launch."
        },
        {
          "title": "Implementation Notes",
          "level": 2,
          "body": "- Target CSS should collapse compatibility selectors into reusable component classes during rebuild.\n- Lovable tokens should be the design-token source before page-specific CSS is authored.\n- Legacy CSS can remain temporarily but must not define new target behavior.\n- Custom HTML imports can be visually custom but still must consume page metadata, analytics, and accessibility rules."
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- Which blog/resource page families are intentional exceptions versus should be normalized?\n- Should admin and portal surfaces share the same component package or use denser variants?\n- Do we keep Material Symbols or move to a React icon library during rebuild?\n- What screenshot baseline set represents every page family?"
        },
        {
          "title": "Next Artifacts",
          "level": 2,
          "body": "- `surface-specs`\n- `sanity-schema-spec`\n- `custom-html-import-spec`\n- `qa-release-readiness-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-design-system-spec-4b1527b220.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-design-system-spec-4b1527b220.json"
    },
    {
      "id": "2026-05-06-b2bea-org-data-model-spec-cdc61ccc56",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-data-model-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.708Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Data Model Spec",
      "summary": "B2BEA.org V1 Data Model Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: data model spec Artifact ID: 2f473004 9063 4fe9 8290 5cbd1b19dfb4 Version: 1 Status: draft Updated: 2026 05 06T20:34:52.749368+00:00 Live Supabase Check Checked against the active B2BEA Supabase...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Data Model Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `data-model-spec`\n- Artifact ID: `2f473004-9063-4fe9-8290-5cbd1b19dfb4`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-06T20:34:52.749368+00:00`"
        },
        {
          "title": "Live Supabase Check",
          "level": 2,
          "body": "Checked against the active B2BEA Supabase project through the live PostgREST OpenAPI schema.\n\n- Supabase host: `czqxkykbhoyyjccckpqq.supabase.co`\n- Public tables observed: `60`\n- RPC functions observed: `is_platform_admin`, `search_content`\n- Storage buckets observed through the current key: none returned\n- Migration files observed in repo: `supabase/migrations/00001_initial_schema.sql` through `00044_featured_cards.sql`, plus `20260412140000_b2bew_events.sql`\n\nThe live schema is real and populated. The largest observed tables are:\n\n| Table | Rows |\n|---|---:|\n| `people` | 6,733 |\n| `content_embeddings` | 441 |\n| `vendors` | 187 |\n| `vendor_category_assignments` | 142 |\n| `scrape_runs` | 124 |\n| `scrape_sources` | 123 |\n| `organizations` | 60 |\n| `subcategories` | 54 |\n| `events` | 46 |\n| `lessons` | 40 |\n| `b2bew_sponsors` | 39 |\n| `search_logs` | 36 |\n| `scraped_jobs` | 35 |\n| `jobs` | 30 |\n| `assessment_sessions` | 19 |"
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `DM-DEC-001` | Profiles and operational data | B2BEA Supabase owns people, organizations, vendors, memberships, seats, academy, surveys/forms, jobs/events operations, analytics, notifications, and operational records. |\n| `DM-DEC-002` | Editorial content | Sanity owns standard public/editorial page content and SEO/GEO/social editorial fields. |\n| `DM-DEC-003` | CRM | HubSpot is primary CRM for leads, pipeline, sales activity, and renewals. B2BEA Supabase may store intake/submission references and profile relationships. |\n| `DM-DEC-004` | Public company profiles | Vendor public profiles remain V1. Practitioner company public profiles are excluded from V1; company workspace is private only. |\n| `DM-DEC-005` | Legacy `persons` table | The target model uses `people`. Any remaining `persons` references must be migrated or shimmed before production rebuild launch. |"
        },
        {
          "title": "Core Identity And Organizations",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `people` | 6,733 | Primary person/profile table. Includes auth, profile, careers, leadership, pro/member, and vendor-featured fields. |\n| `organizations` | 60 | Company/vendor/practitioner organization base. Also carries careers profile fields. |\n| `organization_members` | 0 | Intended organization-person membership table; currently unused. |\n| `person_roles` | 8 | Role grants such as vendor/admin/member/author-style access. |\n| `platform_admins` | 2 | Current light internal admin table. |"
        },
        {
          "title": "Vendors And Vendor Portal",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `vendors` | 187 | Public vendor profile source of truth. |\n| `vendor_category_assignments` | 142 | Vendor-to-subcategory mapping. |\n| `subcategories` | 54 | Current taxonomy table; `vendor_categories` was renamed. |\n| `vendor_updates` | 0 | Profile edits/claim updates for admin review. |\n| `vendor_content_submissions` | 0 | Vendor case-study/blog/content submissions. |\n| `vendor_memberships` | 0 | Vendor membership status/billing fields exist but are unused. |\n| `vendor_features` | 0 | Vendor feature bullets. |\n| `vendor_media` | 0 | Vendor screenshots/media. |\n| `vendor_partnerships` | 0 | Vendor partner relationships. |\n| `vendor_event_participation` | 0 | Vendor-to-event relation. |\n| `vendor_academy_items` | 0 | Vendor-linked academy content. |"
        },
        {
          "title": "Membership And Entitlements",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `membership_tiers` | 3 | Pro, Vendor, Registered seed model. |\n| `memberships` | 1 | Person/org-held memberships. |\n| `membership_seats` | 0 | Seat assignment base exists but is unused. |\n| `processed_webhook_events` | 0 | Stripe/webhook idempotency table. |"
        },
        {
          "title": "Academy And Learning",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `courses` | 9 | Course catalog and pricing/access fields. |\n| `modules` | 10 | Course modules. |\n| `lessons` | 40 | Lesson content. |\n| `course_enrollments` | 4 | Learner-course enrollment. |\n| `lesson_progress` | 7 | Lesson completion/progress. |\n| `module_progress` | 1 | Challenge/test/module progress state. |\n| `module_test_attempts` | 1 | AI/module test attempts. |\n| `knowledge_profile_topics` | 0 | Learner confidence/topic model. |"
        },
        {
          "title": "Careers And Scraping",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `jobs` | 30 | Published/manual career jobs. |\n| `scrape_sources` | 123 | Company career-page scrape sources. |\n| `scrape_runs` | 124 | Scrape run history. |\n| `scraped_jobs` | 35 | Scraped-job review queue/source data. |\n| `job_source_snapshots` | 0 | Raw scrape snapshot table. |\n| `company_mappings` | 0 | Scrape source to organization mapping. |"
        },
        {
          "title": "Events",
          "level": 3,
          "body": "There are two event models:\n\n| Table | Rows | Notes |\n|---|---:|---|\n| `events` | 46 | General public event table. |\n| `b2bew_events` | 3 | B2B eCommerce World operational event table. |\n| `b2bew_speakers` | 31 | Event speakers. |\n| `b2bew_sponsors` | 39 | Event sponsors. |\n| `b2bew_ticket_types` | 0 | Ticket types. |\n| `b2bew_registrations` | 0 | Registrations. |\n| `b2bew_purchases` | 0 | Purchases. |\n| `b2bew_sponsor_packages` | 0 | Sponsor packages. |\n| `b2bew_attendee_logos` | 0 | Attendee logos. |\n| `b2bew_applications` | 0 | Event applications. |\n\nV1 needs a boundary decision: keep `events` for marketing/public listings and `b2bew_*` for event operations, or consolidate."
        },
        {
          "title": "Search, Analytics, And Content Support",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `featured_cards` | 1 | Search/featured card configuration. |\n| `content_embeddings` | 441 | Search/semantic content index. |\n| `sponsored_slots` | 1 | Sponsored search slots. |\n| `search_suggestions` | 21 | Search suggestions. |\n| `search_logs` | 36 | Search analytics. |\n| `page_views` | 6 | Vendor/content analytics. |\n| `resource_downloads` | 0 | Gated/free resource download tracking. |\n| `podcast_episodes` | 0 | Podcast episode metadata. |\n| `episode_guests` | 0 | Podcast guest mapping. |"
        },
        {
          "title": "Assessments And Plan Builder",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `assessment_sessions` | 19 | Current maturity assessment sessions and results. |\n| `plan_builder_responses` | 0 | Plan-builder response model. |\n| `recommended_plans` | 0 | Recommended event/sponsorship plan model. |"
        },
        {
          "title": "Profile Extensions And Taxonomy Support",
          "level": 3,
          "body": "| Table | Rows | Notes |\n|---|---:|---|\n| `person_experiences` | 0 | Public/profile experience history. |\n| `person_goals` | 0 | Public/profile goals. |\n| `category_experts` | 2 | Expert-person links for taxonomy hubs. |\n| `category_faqs` | 7 | Taxonomy FAQ content. |"
        },
        {
          "title": "Target Entity Model",
          "level": 2,
          "body": "| Entity | Source Of Truth | Status | Notes |\n|---|---|---|---|\n| Person/profile | B2BEA Supabase: `people` | Current | Large live table; target replaces old `persons` usage. |\n| Organization/company | B2BEA Supabase: `organizations`, `organization_members` | Current, needs V1 extension | Private company workspace can build here, but seat/role/entitlement lifecycle needs hardening. |\n| Vendor | B2BEA Supabase: `vendors` and `vendor_*` | Current | Vendor profiles are public; self-service tables exist but are mostly empty. |\n| Membership/entitlement | B2BEA Supabase: `membership_tiers`, `memberships`, `membership_seats`, `vendor_memberships` | Partial | Needs unified access rules for pro, vendor, company seats, academy, careers, resources, and events. |\n| Course/learning | B2BEA Supabase: `courses`, `modules`, `lessons`, progress tables | Current, partial | Needs certification, learning paths, company assignment, and stronger entitlement links. |\n| Survey/assessment | B2BEA Supabase target | Partial | `assessment_sessions` exists; generalized survey/question/response/reporting tables do not. |\n| Forms/intake | B2BEA Supabase target | Missing | No generalized forms/submissions model in live public schema. |\n| Jobs/careers | B2BEA Supabase: `jobs`, `scrape_*` | Current, partial | Company-created job posting lifecycle needs explicit ownership/review fields. |\n| Events/sponsorship | B2BEA Supabase: `events`, `b2bew_*` | Current, split | Needs boundary or consolidation. |\n| Editorial/public pages | Sanity | External | Supabase supports operational references, analytics, downloads, and search embeddings. |\n| CRM lead/opportunity | HubSpot primary | External | B2BEA.org captures/routes lead intake; HubSpot owns pipeline and renewals. |\n| Notification | B2BEA Supabase target plus email provider logs | Missing | No notification event/preferences/delivery schema observed. |\n| Analytics | B2BEA Supabase: `page_views`, `resource_downloads`, `search_logs` | Current, partial | Needs event taxonomy and bounded export rules. |"
        },
        {
          "title": "V1 Schema Gaps",
          "level": 2,
          "body": "| ID | Severity | Area | Current | Required |\n|---|---:|---|---|---|\n| `DM-GAP-001` | P0 | Legacy `people`/`persons` split | Live schema has `people`; current code still references `persons` in `authbridge.js` and older docs/plans. | All production code uses `people`, or a compatibility view/shim is intentionally created and tested. |\n| `DM-GAP-002` | P0 | Generalized surveys | `assessment_sessions` exists; no live `surveys`, `survey_questions`, or `survey_responses` schema. | Create survey definitions, questions, assignments/audiences, responses, reporting/export tables. |\n| `DM-GAP-003` | P1 | Reusable forms/intake | No live `forms` or `form_submissions` schema. | Create form definitions, submissions, status/assignment, spam/rate metadata, export support. |\n| `DM-GAP-004` | P0 | Private company workspace | `organizations` and `organization_members` exist; company workspace seats/academy/careers entitlements are not first-class. | Define company account, employee roles, seat lifecycle, benefit grants, team reporting, and assignment tables or extend existing `membership_seats`/`organization_members`. |\n| `DM-GAP-005` | P0 | Entitlement model | Membership tiers, memberships, seats, course access fields, and vendor memberships exist separately. | Unify access decisions for resources, courses, events, company seats, vendor portal, and pro membership. |\n| `DM-GAP-006` | P1 | Events model split | Generic `events` and `b2bew_*` operational event tables coexist. | Define boundary or consolidate: marketing event pages vs event operations/registration/sponsorship. |\n| `DM-GAP-007` | P0 | Notifications | No notification event/preferences/delivery schema observed. | Email-first notification event log, template key, recipient, delivery status, provider IDs, retry/suppression. |\n| `DM-GAP-008` | P1 | Certification and learning paths | Courses/progress exist; no certificates/certifications/learning paths observed. | Certification requirements, issued certificates, learning paths, company assignments. |\n| `DM-GAP-009` | P1 | Media/storage | Code references `headshots` storage and `graphic_assets`; live storage bucket list returned empty and `graphic_assets` is not in public OpenAPI schema. | Verify storage buckets/RLS and define media asset source of truth for headshots, graphics, page/social images. |\n| `DM-GAP-010` | P1 | HubSpot handoff | HubSpot is decisioned as CRM primary; live Supabase has profile-level HubSpot contact linkage but no native pipeline tables. | Define lead capture/submission handoff, HubSpot IDs, sync status, failure handling, and audit fields. |"
        },
        {
          "title": "Implementation Rules",
          "level": 2,
          "body": "- Use B2BEA Supabase for operational product data and live user/workspace state.\n- Use Sanity for standard editorial/public content and page metadata authoring.\n- Use HubSpot for CRM pipeline, sales activity, renewals, and opportunity lifecycle.\n- Do not create public practitioner company profile routes or tables for V1.\n- Do not add new feature-specific one-off intake tables when a reusable forms model should cover the workflow.\n- Any member/vendor/company mutation requires ownership columns and a server-side validation path.\n- Every public projection needs lifecycle/status fields and archive behavior.\n- Analytics exports must be bounded to own-account data by vendor/company role."
        },
        {
          "title": "Next Specs",
          "level": 2,
          "body": "- `survey-system-spec`\n- `company-workspace-data-spec`\n- `entitlement-model-spec`\n- `notification-spec`\n- `sanity-schema-spec`\n- `media-asset-model-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-data-model-spec-cdc61ccc56.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-data-model-spec-cdc61ccc56.json"
    },
    {
      "id": "2026-05-06-b2bea-org-company-workspace-data-spec-661f53ce52",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-company-workspace-data-spec.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.707Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org V1 Company Workspace Data Spec",
      "summary": "B2BEA.org V1 Company Workspace Data Spec Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: company workspace data spec Artifact ID: 05e0ed7c 416a 4d8f 853a bc3dfa3d64f6 Version: 1 Status: draft Updated: 2026 05 07T00:32:06.585172+00:00 Scope Included in V1: Private practit...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org V1 Company Workspace Data Spec",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `company-workspace-data-spec`\n- Artifact ID: `05e0ed7c-416a-4d8f-853a-bc3dfa3d64f6`\n- Version: `1`\n- Status: `draft`\n- Updated: `2026-05-07T00:32:06.585172+00:00`"
        },
        {
          "title": "Scope",
          "level": 2,
          "body": "Included in V1:\n\n- Private practitioner company workspace only.\n- Company admins and employee/member access.\n- Academy seat assignment and company learning visibility.\n- Company-created jobs submitted for B2BEA admin review.\n- Company profile/account settings for private workspace use.\n- Bounded own-company analytics/export rules.\n\nExcluded from V1:\n\n- Public practitioner company profile pages.\n- Public company directory for practitioner companies.\n- Complex internal admin permissioning beyond the Brett/Sarah/Justin light admin model.\n- Company-owned CRM pipeline; HubSpot remains CRM primary."
        },
        {
          "title": "Live Supabase Check",
          "level": 2,
          "body": "Checked against the active B2BEA Supabase project and current `B2BEA-org-new` code signals.\n\n- Supabase host: `czqxkykbhoyyjccckpqq.supabase.co`\n- Source repo: `/Users/justinking/Vaults/Projects/B2BEA-org-new`\n\n| Table | Rows | Status | Notes |\n|---|---:|---|---|\n| `organizations` | 60 | Exists, populated | Supports name, slug, type, website, location, status, primary contact, careers extension fields. |\n| `organization_members` | 0 | Exists, empty | Supports org-person role `admin/member` plus joined/removed timestamps. Currently unused live. |\n| `memberships` | 1 | Exists, partial | Supports `held_by_person_id` or `held_by_org_id` and `seat_count`. Only one active person-held Pro membership observed. |\n| `membership_seats` | 0 | Exists, empty | Supports membership seat assignment to a person. No active seat assignments observed. |\n| `jobs` | 30 | Exists, populated | Supports `organization_id`, `company_name`, `source`, `status`, `published_at`, `expires_at`. Existing statuses do not include review/submitted. |\n| `courses` | 9 | Exists, populated | Course access exists but needs entitlement normalization before company assignment. |\n| `course_enrollments` | 4 | Exists, partial | Participation exists, but no company assignment/source fields observed. |\n| `person_roles` | 8 | Exists, partial | Global person roles exist; no company-specific role scope beyond `organization_members.role`. |\n| `people` | 6,733 | Exists, populated | Has `organization_id` and profile/careers fields; legacy `persons` references still need cleanup. |\n\nCode signals:\n\n- `src/admin/companies/index.njk` manages organizations and members from the internal admin surface.\n- Admin companies page loads people by `people.organization_id` rather than `organization_members`, so `removed_at` state can drift from visible membership.\n- Admin companies page can upsert `organization_members`, but schema role choices are only `admin/member`; vendor roles are assigned separately through `person_roles`.\n- Admin jobs page can choose organizations for jobs; public company-created job submission workflow is not present.\n- No practitioner company workspace route or portal surface was observed.\n- No company course assignment, invitation, seat availability, or company analytics export implementation was observed."
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `CW-DEC-001` | Public surface | Practitioner company accounts are private workspace only in V1. Do not build public company profile pages or a public company directory for practitioner companies. |\n| `CW-DEC-002` | Canonical company account | Use `organizations` as the canonical company account table. Extend it for workspace/account metadata instead of creating a second company table. |\n| `CW-DEC-003` | Company membership | Use org-held `memberships` plus `membership_seats` as the canonical source of company seats and included benefits. |\n| `CW-DEC-004` | Company roles | Use `organization_members` for company-scoped roles. Use `person_roles` only for global/internal/vendor roles. |\n| `CW-DEC-005` | Jobs publishing | Company-created jobs require B2BEA admin review before public publishing in V1. |\n| `CW-DEC-006` | Academy assignments | Company admins can assign available academy content to employees only when the org entitlement grants the content and the employee has an active seat or assignment. |\n| `CW-DEC-007` | Analytics exports | Company analytics and exports are own-company only and must exclude raw platform-wide data and sensitive user-level data unless explicitly consented and permitted. |\n| `CW-DEC-008` | CRM boundary | HubSpot remains CRM primary for lead, pipeline, sales activity, and renewal workflows. Company workspace state lives in B2BEA Supabase. |"
        },
        {
          "title": "Target Capabilities",
          "level": 2,
          "body": "| Capability | Surface | Actor | Description |\n|---|---|---|---|\n| `CompanyWorkspaceView` | Company workspace | company_admin/company_member | View private company dashboard, account status, seats, assigned courses, submitted jobs, and reporting. |\n| `CompanyUpdateProfile` | Company workspace | company_admin | Update private company workspace metadata, logo/banner for careers, website, HQ, and primary contact. |\n| `CompanyInviteEmployee` | Company workspace | company_admin | Invite employee by email, assign role, optionally reserve/assign academy seat. |\n| `CompanyRemoveEmployee` | Company workspace | company_admin | Remove employee access, revoke active seat, preserve audit history. |\n| `CompanyAssignAcademy` | Company workspace | company_admin | Assign eligible course/path/certification to employee or cohort. |\n| `CompanyViewLearningProgress` | Company workspace | company_admin | View aggregate and employee-level progress allowed by policy. |\n| `CompanyCreateJob` | Company workspace | company_admin | Create a job submission for B2BEA admin review. |\n| `CompanyManageJobs` | Company workspace | company_admin | View submitted/published/expired/returned jobs and make updates through review workflow. |\n| `CompanyViewAnalytics` | Company workspace | company_admin | View own-company learning, jobs, and engagement analytics. |\n| `CompanyExportAnalytics` | Company workspace | company_admin | Export bounded own-company reports. |\n| `AdminReviewCompanyJob` | B2BEA admin | b2bea_admin | Review, approve, reject, publish, unpublish, or request changes to company-created jobs. |"
        },
        {
          "title": "Target Data Model",
          "level": 2,
          "body": "Reuse and harden:\n\n| Table | Use | Required Hardening |\n|---|---|---|\n| `organizations` | Canonical company account and workspace profile. | Add or confirm `workspace_status`, `workspace_enabled`, and account type handling beyond `pro_member/vendor` if needed. Keep public profile disabled/not used for practitioner companies in V1. |\n| `organization_members` | Company-scoped membership and roles. | Expand role enum to `owner/admin/member/learner/recruiter` if V1 needs distinct workflows. Use active filter `removed_at is null` everywhere. Add invite/acceptance fields if not using separate invites table. |\n| `memberships` | Org-held membership and seat count. | Use `held_by_org_id` for company accounts. Ensure `status/current_period_end` drives entitlement evaluator. |\n| `membership_seats` | Seat assignment to people. | Add `assigned_by`, `assignment_source`, and `status` if audit cannot be fully covered elsewhere. Enforce active seats <= `memberships.seat_count`. |\n| `jobs` | Published public jobs and company-submitted job records. | Add review lifecycle statuses or separate submission table. Add `submitted_by`, `approved_by`, `reviewed_at`, `rejection_reason`, and change request fields. |\n| `course_enrollments` | Learner course participation. | Add/source link to course assignment if company-assigned courses are V1. |\n\nAdd new:\n\n| Table | Purpose | Core Fields |\n|---|---|---|\n| `organization_invitations` | Invite and acceptance lifecycle for company employees. | `id`, `organization_id`, `email`, `role`, `invited_by_person_id`, `status`, `token_hash`, `expires_at`, `accepted_by_person_id`, `accepted_at`, timestamps |\n| `course_assignments` | Company/admin assignment of courses, paths, or certifications before/alongside enrollment. | `id`, `organization_id`, `course_id`, `assigned_to_person_id`, `assigned_by_person_id`, `source_type`, `status`, `due_at`, timestamps |\n| `company_job_submissions` | Review workflow wrapper for company-created jobs before publishing to `jobs`. | `id`, `organization_id`, `submitted_by_person_id`, `job_id`, `payload`, `status`, `reviewed_by_person_id`, `reviewed_at`, `review_note`, timestamps |\n| `company_analytics_events` | Optional normalized own-company analytics event stream if existing tables are insufficient. | `id`, `organization_id`, `person_id`, `event_type`, `resource_type`, `resource_id`, `metadata`, `created_at` |\n| `company_audit_events` | Workspace audit trail for employee, seat, academy, job, export, and settings changes. | `id`, `organization_id`, `actor_person_id`, `event_type`, `target_type`, `target_id`, `reason`, `metadata`, `created_at` |"
        },
        {
          "title": "Lifecycle Models",
          "level": 2,
          "body": "Employee lifecycle:\n\n1. `invited`\n2. `accepted_active`\n3. `seat_assigned`\n4. `seat_revoked`\n5. `removed`\n6. `reinvited`\n\nJob submission lifecycle:\n\n1. `draft`\n2. `submitted_for_review`\n3. `changes_requested`\n4. `approved`\n5. `published`\n6. `rejected`\n7. `expired`\n8. `removed`\n\nAcademy assignment lifecycle:\n\n1. `assigned`\n2. `enrolled`\n3. `in_progress`\n4. `completed`\n5. `overdue`\n6. `revoked`\n\nCompany membership lifecycle:\n\n1. `prospect_or_inactive`\n2. `active`\n3. `past_due_or_suspended`\n4. `expired`\n5. `cancelled`"
        },
        {
          "title": "Permission Model",
          "level": 2,
          "body": "| Role | Grants | Notes |\n|---|---|---|\n| `company_owner` | `company.workspace.admin`, `company.academy.assign`, `company.careers.submit_job`, `company.analytics.export` | One or more accountable company owners. May manage admins. |\n| `company_admin` | `company.workspace.admin`, `company.academy.assign`, `company.careers.submit_job`, `company.analytics.export` | Operational company admin; can invite/remove members depending policy. |\n| `company_recruiter` | `company.workspace.read`, `company.careers.submit_job` | Optional V1 role if hiring workflow needs separation. |\n| `company_member` | `company.workspace.read` | Employee/member baseline access. |\n| `company_learner` | `company.workspace.read`, `academy.course.enroll.included` | Employee with active academy seat or assignment. |\n| `b2bea_admin` | `admin.platform.manage`, `admin.content.publish` | Brett/Sarah/Justin light admin model for review and support. |"
        },
        {
          "title": "Surface Requirements",
          "level": 2,
          "body": "| Surface | Requirements |\n|---|---|\n| Company workspace dashboard | Current membership/status, seat usage, employee roster, assigned academy content, job submissions, recent audit/activity, exports/downloads available to the account. |\n| Employee roster | Invite employee, role selection, seat assignment/revocation, remove employee, status filters, last active/accepted state. |\n| Academy management | Available courses/paths from entitlement, assign to employee/cohort, progress view, completion/certification status, export allowed reporting. |\n| Careers/jobs | Create job draft, submit for review, see admin review status, respond to change request, expire/remove job. |\n| Admin review | Queue of company job submissions, diff/payload review, approve to `jobs` table, reject/request changes, publish/unpublish, audit event. |"
        },
        {
          "title": "Gaps",
          "level": 2,
          "body": "| ID | Severity | Area | Current | Required |\n|---|---:|---|---|---|\n| `CW-GAP-001` | P0 | No company workspace route | Only internal admin companies page observed. | Build authenticated private company workspace surface for company admins and employees. |\n| `CW-GAP-002` | P0 | Empty company membership tables | `organization_members` and `membership_seats` exist but have zero rows. | Implement invite, membership, and seat assignment lifecycle with active `removed_at` filtering. |\n| `CW-GAP-003` | P0 | Role scoping | `organization_members.role` only supports `admin/member`; `person_roles` is global. | Define company-scoped roles and avoid using global roles for company permissions. |\n| `CW-GAP-004` | P0 | Academy assignment | No `course_assignments`/company assignment model observed. | Add course assignment model tied to org, employee, entitlement, and enrollment. |\n| `CW-GAP-005` | P0 | Company-created jobs | Jobs table has published/draft statuses but no company submission/review lifecycle. | Add review workflow and admin approval before public publishing. |\n| `CW-GAP-006` | P1 | Analytics exports | Own-company analytics export model not defined. | Define bounded event taxonomy, aggregation, and export policy. |\n| `CW-GAP-007` | P1 | Auditability | No company workspace audit trail observed. | Record employee, seat, academy, job, export, and settings changes. |\n| `CW-GAP-008` | P1 | Data drift risk | Admin companies page reads `people.organization_id` for roster visibility while also writing `organization_members`. | Choose roster truth and update all reads to use active `organization_members` or a tested view. |\n| `CW-GAP-009` | P1 | Organization type enum | `organizations.type` only allows `pro_member/vendor`. | Confirm whether practitioner company accounts fit `pro_member` or need `company/customer/employer` enum value. |"
        },
        {
          "title": "Implementation Sequence",
          "level": 2,
          "body": "1. Fix `people`/`persons` references and decide roster truth before building company workspace.\n2. Extend or formalize `organization_members` roles and active roster read model.\n3. Implement `organization_invitations` and acceptance flow.\n4. Wire org-held memberships and `membership_seats` into entitlement evaluator.\n5. Add `course_assignments` and company academy assignment/progress reporting.\n6. Add `company_job_submissions` or extend `jobs` with review fields, then wire admin review.\n7. Add company audit events and notification events for invites, seat changes, assignments, and job review outcomes.\n8. Add own-company analytics aggregation and export checks.\n9. Build workspace UI surfaces against the hardened data contracts."
        },
        {
          "title": "Acceptance Criteria",
          "level": 2,
          "body": "- A company admin can invite an employee, assign a seat, assign a course, and see resulting access through the entitlement evaluator.\n- Removing an employee or revoking a seat removes workspace/academy access within the documented cache window.\n- Company-created jobs cannot become public without B2BEA admin approval.\n- Practitioner company data has no public profile route or public directory exposure in V1.\n- Company exports include only own-company data and are policy-gated.\n- All employee, seat, academy, job, export, and settings changes create audit events."
        },
        {
          "title": "Next Specs",
          "level": 2,
          "body": "- `survey-system-spec`\n- `notification-spec`\n- `academy-certification-spec`\n- `vendor-portal-workflow-spec`"
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-company-workspace-data-spec-661f53ce52.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-company-workspace-data-spec-661f53ce52.json"
    },
    {
      "id": "2026-05-06-b2bea-org-capability-map-57d00a6caf",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-b2bea-org-capability-map.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.705Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "B2BEA.org Capability Map v5",
      "summary": "B2BEA.org Capability Map v5 Source of record: RedKey Supabase Studio artifact. Project: B2BEA.org Rebuild Project ID: a820dd0c 6cef 4133 bfbd d802fd806e44 Artifact: capability map Artifact ID: c889a1fe c3ce 4b0d 873c af4e0ec8dfe4 Version: 5 Status: draft Updated: 2026 05 06T20:00:09.332+00:00 Purpose This capability map is derived from the reverse engineerin...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "B2BEA.org Capability Map v5",
          "level": 1,
          "body": "Source of record: RedKey Supabase Studio artifact.\n\n- Project: `B2BEA.org Rebuild`\n- Project ID: `a820dd0c-6cef-4133-bfbd-d802fd806e44`\n- Artifact: `capability-map`\n- Artifact ID: `c889a1fe-c3ce-4b0d-873c-af4e0ec8dfe4`\n- Version: `5`\n- Status: `draft`\n- Updated: `2026-05-06T20:00:09.332+00:00`"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "This capability map is derived from the reverse-engineering pass over the current B2BEA.org repo. It is now a V1 production-scope catalog: production-ready capability areas are included in V1 unless explicitly excluded.\n\nCapability names use `VerbObject` style so they can later become permissions, service methods, API operations, QA scenarios, and UI actions."
        },
        {
          "title": "Status Legend",
          "level": 2,
          "body": "- `current`: Evidence exists in the current repo.\n- `partial`: Some evidence exists, but the capability is incomplete or indirectly implemented.\n- `planned`: Target capability implied by the rebuild/surface model but not present as a first-class current workflow.\n- `candidate`: Possible capability to review before committing to target scope."
        },
        {
          "title": "Summary",
          "level": 2,
          "body": "- Current mapped capabilities: 161\n- V1 production capability target: 260 capabilities\n- Public Site: 25 capabilities\n- Auth / Account Security: 13 capabilities\n- Individual Member Dashboard + Profile: 21 capabilities\n- B2BEA Admin: 59 capabilities\n- Vendor Management Portal: 18 capabilities\n- Practitioner Company Workspace: 18 capabilities\n- Cross-cutting system capabilities: 7 capabilities\n- Additional V1 production capabilities: 99 capabilities"
        },
        {
          "title": "V1 Production Scope Decision",
          "level": 2,
          "body": "V1 should be production-ready across the site, not a thin MVP with obvious operational gaps deferred to a later phase.\n\nThe only intentionally light area is internal core-site administration. Core site changes are handled by a small trusted team: Brett, Sarah, and Justin. V1 does not need granular internal admin privilege tiers or complex approval chains for that team.\n\nProduction controls still matter where changes affect public content, external users, self-service portals, entitlements, payments, learning access, surveys, jobs, vendor data, company workspaces, and reporting."
        },
        {
          "title": "Core Publishing Model",
          "level": 2,
          "body": "B2BEA needs two production publishing paths:\n\n| Path | Use When | V1 Controls |\n|---|---|---|\n| Custom HTML import | A landing page or resource needs a custom look beyond standard templates. | Owner, status, preview, publish, rollback/archive, analytics hooks, SEO metadata. |\n| Sanity standard page creation | A standard site page should use structured content and reusable page templates. | Template selection, required fields, preview, publish/schedule, archive, SEO metadata. |"
        },
        {
          "title": "Production Ready Definition",
          "level": 2,
          "body": "Every V1 capability should define:\n\n- Who owns the record or content.\n- Required lifecycle states.\n- Required fields and validation.\n- Public/private visibility rules.\n- Admin, vendor, company, member, and anonymous access behavior.\n- Notification side effects.\n- Audit/event logging for material public changes.\n- Empty, loading, error, and success states.\n- Acceptance criteria that can become QA checks.\n\nFor Brett, Sarah, and Justin, permissions can stay simple. For members, vendors, practitioner companies, entitlements, and public publishing, authorization and lifecycle rules need to be explicit and enforced."
        },
        {
          "title": "Decisions",
          "level": 2,
          "body": "| ID | Topic | Decision |\n|---|---|---|\n| `DEC-001` | Public practitioner company profiles | Exclude from V1. Keep vendor public profiles; practitioner companies get private workspace only. |\n| `DEC-002` | Company-created jobs | Require B2BEA admin review before public publishing in V1. |\n| `DEC-003` | Sanity versus Supabase source of truth | Sanity owns editorial/public content. B2BEA Supabase owns application and operational data, including people, company, vendor, membership, course, survey, job, event, analytics, and notification records. |\n| `DEC-004` | Notifications | V1 is email-first with an internal notification event log. In-app notifications are designed for later unless a surface explicitly needs them. |\n| `DEC-005` | CRM source of truth | HubSpot is the primary CRM for leads, pipeline, sales activity, and renewals. B2BEA Supabase owns website profiles and operational entities. |\n| `DEC-006` | Vendor and company analytics exports | V1 allows bounded own-account exports only. No raw platform-wide data, cross-account comparisons, or sensitive user-level data unless explicitly consented and permitted. |"
        },
        {
          "title": "Additional V1 Production Capability Groups",
          "level": 2,
          "body": "These groups are V1 scope unless removed during spec review.\n\n| Group | Count | Examples |\n|---|---:|---|\n| Surveys and assessments | 19 | `AdminCreateSurvey`, `AdminPublishSurvey`, `PublicTakeSurvey`, `MemberTakeSurvey`, `CompanyAssignSurvey`, `AdminDisplaySurveyData`, `AdminExportSurveyResponses` |\n| Forms and intake | 9 | `AdminCreateForm`, `PublicSubmitForm`, `VendorSubmitForm`, `AdminReviewFormSubmission`, `AdminExportFormSubmissions` |\n| Events and sponsorship | 11 | `AdminCreateEvent`, `AdminManageEventSponsors`, `MemberRegisterForEvent`, `VendorSponsorEvent`, `AdminExportEventRegistrations` |\n| Vendor commercial workflow | 12 | `VendorPurchaseMembership`, `VendorManageBilling`, `VendorInviteTeamMember`, `VendorViewLeads`, `AdminCreateVendorInvoice` |\n| Editorial workflow | 13 | `AdminCreateArticle`, `AdminScheduleArticle`, `AdminReviewVendorContent`, `AdminManageEditorialCalendar`, `AdminManageRedirects` |\n| Academy and certification | 11 | `AdminCreateCertification`, `AdminIssueCertificate`, `MemberViewCertificate`, `AdminCreateQuiz`, `CompanyAssignLearningPath` |\n| Notifications | 8 | `SystemSendEmailNotification`, `SystemSendInAppNotification`, `SystemNotifySurveyAssigned`, `UserManageNotificationPreferences` |\n| Reporting and analytics | 8 | `AdminViewPlatformAnalytics`, `AdminViewAcademyAnalytics`, `VendorViewProfileAnalytics`, `CompanyViewTeamAnalytics` |\n| CRM and sales operations | 7 | `AdminCreateLead`, `AdminAssignLead`, `AdminTrackOpportunity`, `AdminConvertLeadToVendor`, `AdminManageRenewalPipeline` |"
        },
        {
          "title": "Public Site",
          "level": 2,
          "body": "Purpose: Browse, learn, discover, search, convert, and view public people/company/vendor/content pages."
        },
        {
          "title": "Discovery And Search",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `PublicSearchSite` | current | Global modal search and page-level search/filter patterns exist. |\n| `PublicFilterVendorDirectory` | current | Filters by vendor type/category/search term. |\n| `PublicFilterPeopleDirectory` | current | People directory includes public browsing/filtering behavior. |\n| `PublicFilterCareerJobs` | current | Public jobs list has search/filter behavior. |\n| `PublicFilterCourses` | current | Course catalog filters and enrollment badges are client-side. |\n| `PublicFilterResources` | current | Resource/report/guide discovery patterns exist but should be unified. |"
        },
        {
          "title": "Content, Resources, And Gating",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `PublicViewArticle` | current | Includes page-view tracking. |\n| `PublicViewGuide` | current | Supports vendor attribution and gated downloads. |\n| `PublicViewReport` | current | Supports vendor attribution and gated downloads. |\n| `PublicDownloadResource` | current | Current pages record `resource_downloads` in several places. |\n| `PublicGateResourceByAccount` | current | Anonymous users see signup/login CTA. |\n| `PublicGateResourceByMembership` | current | Pro-gated content checks membership client-side. |\n| `PublicViewTopicHub` | current | Topic/category hubs exist and need target model consolidation. |\n| `PublicViewConcept` | current | Concept detail pages exist. |"
        },
        {
          "title": "Public Profiles And Directories",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `PublicViewVendorProfile` | current | Includes page-view tracking and vendor detail content. |\n| `PublicViewPersonProfile` | current | Public member/person profiles exist. |\n| `PublicViewAuthorProfile` | current | Author profile pages exist. |\n| `PublicViewCaseStudy` | current | Practitioner case-study detail pages exist. |\n| `PublicViewEvent` | current | Event detail pages exist. |\n| `PublicViewJob` | current | Career detail pages exist. |"
        },
        {
          "title": "Conversion And Public Intake",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `PublicStartMembershipCheckout` | partial | Checkout flow is present but tied to current implementation. |\n| `PublicApplyVendorMembership` | current | Vendor application redirects and vendor membership page exist. |\n| `PublicClaimVendorListing` | current | Claim workflow exists as public/vendor bridge. |\n| `PublicTakeMaturityAssessment` | current | Creates `assessment_sessions`. |\n| `PublicViewMaturityAssessmentResults` | current | Loads `assessment_sessions` by ID. |"
        },
        {
          "title": "Authentication And Account Security",
          "level": 2,
          "body": "Purpose: Shared identity layer across all surfaces."
        },
        {
          "title": "Auth Core",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `AuthSignUpWithEmail` | current | Supabase auth signup. |\n| `AuthSignInWithPassword` | current | Supabase password login. |\n| `AuthSignInWithMagicLink` | current | Supabase OTP magic-link flow. |\n| `AuthSignInWithGoogle` | current | OAuth provider flow. |\n| `AuthSignInWithLinkedIn` | current | OAuth provider flow. |\n| `AuthConfirmEmail` | current | Email confirmation surface exists. |\n| `AuthResetPassword` | partial | Reset email flow points to `/reset-password/`, but reset page was not observed in inventory. |\n| `AuthSignOut` | current | Multiple surfaces sign out directly. |"
        },
        {
          "title": "Account Security",
          "level": 3,
          "body": "| Capability | Status | Notes |\n|---|---:|---|\n| `AccountChangeEmail` | current | Supabase auth `updateUser` email. |\n| `AccountChangePassword` | current | Supabase auth `updateUser` password. |\n| `AccountLinkIdentity` | current | Links external auth identity. |\n| `AccountUnlinkIdentity` | current | Unlinks external auth identity. |\n| `AccountViewLinkedIdentities` | current | Renders linked identities list. |"
        },
        {
          "title": "Individual Member Dashboard And Profile",
          "level": 2,
          "body": "Purpose: Personal member account, public profile projection, learning state, and benefits."
        }
      ],
      "html_path": "artifacts/2026-05-06-b2bea-org-capability-map-57d00a6caf.html",
      "json_path": "artifacts/2026-05-06-b2bea-org-capability-map-57d00a6caf.json"
    },
    {
      "id": "2026-05-06-agent-wire-v1-1-a2a-hardening-afd10dee21",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-06-agent-wire-v1-1-a2a-hardening.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.702Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Agent Wire v1.1 + A2A Hardening Spec",
      "summary": "Agent Wire v1.1 + A2A Hardening Spec Date: 2026 05 06 Status: Draft for implementation planning Supersedes / extends: docs/specs/2026 04 28 agent wire protocol.md, docs/specs/2026 05 01 hcs streaming wire protocol.md Related: docs/specs/2026 04 27 google agent sdk a2a.md, docs/plans/2026 04 27 a2a gateway.md Purpose Agent Wire is RedKey's internal coordinati...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Agent Wire v1.1 + A2A Hardening Spec",
          "level": 1,
          "body": "**Date:** 2026-05-06\n**Status:** Draft for implementation planning\n**Supersedes / extends:** `docs/specs/2026-04-28-agent-wire-protocol.md`, `docs/specs/2026-05-01-hcs-streaming-wire-protocol.md`\n**Related:** `docs/specs/2026-04-27-google-agent-sdk-a2a.md`, `docs/plans/2026-04-27-a2a-gateway.md`\n\n---"
        },
        {
          "title": "Purpose",
          "level": 2,
          "body": "Agent Wire is RedKey's internal coordination protocol. A2A is the external interoperability protocol for agent-to-agent collaboration. This spec uses A2A v1.0 as a hardening reference for Agent Wire without replacing RedKey's HCS-first architecture.\n\nThe intended outcome is:\n\n```text\nInternal RedKey agents\n  -> Agent Wire v1.1 events\n  -> HCS canonical stream\n  -> Supabase read model\n  -> Studio / runners / evaluators\n\nExternal A2A callers\n  -> A2A gateway\n  -> translation to/from Agent Wire v1.1\n  -> same HCS canonical stream\n```\n\nThis keeps one internal source of truth. A2A becomes a boundary binding, not a second execution model.\n\n---"
        },
        {
          "title": "Decision",
          "level": 2,
          "body": "Do both hardening tracks together at the schema/spec level:\n\n1. Upgrade Agent Wire from a typed message envelope into a typed streaming protocol.\n2. Borrow A2A's task, context, message, artifact, streaming, and capability concepts where they improve internal RedKey clarity.\n3. Make the protocol deterministic by requiring state-machine contracts, JSON Schemas, golden fixtures, conformance tests, and reducer tests before production implementation.\n\nDo not implement a separate A2A streaming subsystem. RedKey streaming remains HCS-backed Agent Wire. The A2A gateway later maps that stream to A2A `SendStreamingMessage`, `SubscribeToTask`, `TaskStatusUpdateEvent`, and `TaskArtifactUpdateEvent`.\n\n---"
        },
        {
          "title": "Deterministic Contract Standard",
          "level": 2,
          "body": "Agent Wire v1.1 must be implemented as contracts that code validates, not prose that agents interpret.\n\nRequired pipeline:\n\n```text\nspec\n  -> state-machine contract\n  -> JSON Schema\n  -> golden fixtures\n  -> conformance tests\n  -> implementation\n  -> reducer/state tests\n  -> HCS event record\n```\n\nRules:\n\n- Prose explains why. Structured contracts define what is valid.\n- Agents may draft specs, fixtures, and code, but validation decides authority.\n- Every event type must have a JSON Schema before producers emit it.\n- Every event type must have at least one valid golden fixture.\n- Every important invalid case must have a named invalid fixture.\n- Every state transition must be represented in a state-machine contract.\n- Reducer tests must prove ordered Wire events reduce to exact task/artifact/project state.\n- A2A mapping must be conformance-tested from Agent Wire events, not hand-waved in prose."
        },
        {
          "title": "Required Contract Paths",
          "level": 3,
          "body": "The first v1.1 implementation should create these directories:\n\n```text\nschemas/agent-wire/v1.1/\nfixtures/agent-wire/v1.1/\ncontracts/agent-wire/v1.1/\ntests/conformance/agent-wire/\ntests/reducers/agent-wire/\n```\n\nMinimum schema files:\n\n```text\nschemas/agent-wire/v1.1/envelope.schema.json\nschemas/agent-wire/v1.1/stream.schema.json\nschemas/agent-wire/v1.1/state.schema.json\nschemas/agent-wire/v1.1/task-created.schema.json\nschemas/agent-wire/v1.1/task-available.schema.json\nschemas/agent-wire/v1.1/task-claimed.schema.json\nschemas/agent-wire/v1.1/task-started.schema.json\nschemas/agent-wire/v1.1/task-blocked.schema.json\nschemas/agent-wire/v1.1/artifact-ready.schema.json\nschemas/agent-wire/v1.1/task-complete.schema.json\nschemas/agent-wire/v1.1/task-failed.schema.json\nschemas/agent-wire/v1.1/task-cancelled.schema.json\n```\n\nMinimum fixture files:\n\n```text\nfixtures/agent-wire/v1.1/task-created.valid.json\nfixtures/agent-wire/v1.1/task-available.valid.json\nfixtures/agent-wire/v1.1/task-claimed.valid.json\nfixtures/agent-wire/v1.1/task-started.valid.json\nfixtures/agent-wire/v1.1/artifact-ready.valid.json\nfixtures/agent-wire/v1.1/task-complete.valid.json\nfixtures/agent-wire/v1.1/task-complete.invalid-missing-artifact.json\nfixtures/agent-wire/v1.1/task-complete.invalid-verification-fail.json\nfixtures/agent-wire/v1.1/task-blocked.valid.json\nfixtures/agent-wire/v1.1/task-failed.valid.json\nfixtures/agent-wire/v1.1/task-cancelled.valid.json\n```\n\nMinimum contract files:\n\n```text\ncontracts/agent-wire/v1.1/task-state-machine.json\ncontracts/agent-wire/v1.1/event-state-map.json\ncontracts/agent-wire/v1.1/a2a-task-state-map.json\n```"
        },
        {
          "title": "Required Conformance Tests",
          "level": 3,
          "body": "The implementation is not conformant until tests prove:\n\n- Every valid fixture validates against the event schema and envelope schema.\n- Every invalid fixture fails for the expected reason.\n- Every event maps to exactly one normalized state category.\n- Every allowed transition is accepted by the state machine.\n- Every disallowed transition is rejected by the state machine.\n- The reducer can replay ordered Wire events into exact task state.\n- The reducer records artifact counts and artifact IDs from `artifact.ready`.\n- `task.complete.payload.artifact_ids` references all required final artifacts.\n- `task.complete.payload.verification.mechanical` must be `pass`.\n- Agent Wire task/artifact events map cleanly to A2A task/artifact events."
        },
        {
          "title": "Reducer Harness Contract",
          "level": 3,
          "body": "Reducer tests should use this shape:\n\n```json\n{\n  \"name\": \"happy path with one artifact\",\n  \"events\": [\n    \"task.created\",\n    \"task.available\",\n    \"task.claimed\",\n    \"task.started\",\n    \"artifact.ready\",\n    \"task.complete\"\n  ],\n  \"expected\": {\n    \"task_state\": \"completed\",\n    \"terminal\": true,\n    \"artifact_count\": 1,\n    \"blocked\": false,\n    \"verification\": {\n      \"mechanical\": \"pass\"\n    }\n  }\n}\n```\n\nNo LLM interpretation is allowed in reducer tests. Input is ordered Wire events. Output is exact state.\n\n---"
        },
        {
          "title": "Non-Goals",
          "level": 2,
          "body": "- Do not replace HCS as the canonical coordination stream.\n- Do not expose raw internal memory, model traces, runner logs, or tools through A2A.\n- Do not make internal Agent Wire conform exactly to A2A if doing so weakens RedKey's proof, attribution, or marketplace model.\n- Do not build the A2A gateway in this spec. This document defines the internal protocol hardening that makes that gateway straightforward later.\n\n---"
        },
        {
          "title": "What We Adopt From A2A",
          "level": 2,
          "body": "| A2A concept | Agent Wire v1.1 use |\n|---|---|\n| `Task` | RedKey `agent_tasks` row plus HCS task stream |\n| `Message` | Typed coordination message or human/agent input |\n| `Part` | Structured payload part inside a message or artifact reference |\n| `Artifact` | Durable output object with lineage, hash, and version |\n| `contextId` | RedKey `context_id`, grouping related tasks/messages |\n| `referenceTaskIds` | RedKey `reference_task_ids`, linking continuation or dependency tasks |\n| Task status events | RedKey lifecycle events with normalized state category |\n| Artifact update events | RedKey `artifact.*` events |\n| Agent Card | RedKey Agent Card discipline for identity, skills, modes, constraints, and auth |\n| Extensions | Namespaced RedKey metadata instead of ad hoc payload growth |\n\n---"
        },
        {
          "title": "Agent Wire v1.1 Envelope",
          "level": 2,
          "body": "Every meaningful internal coordination event should use the v1.1 envelope.\n\n```json\n{\n  \"wire\": \"1.1\",\n  \"wire_id\": \"wire_01HZY...\",\n  \"type\": \"task.started\",\n  \"sender\": \"agent:quinn-03\",\n  \"ts\": \"2026-05-06T16:00:00Z\",\n  \"stream\": {\n    \"stream_id\": \"task:0.0.8830671:attempt:1\",\n    \"stream_seq\": 12,\n    \"context_id\": \"project:knowledgevault-m01r\",\n    \"correlation_id\": \"project:knowledgevault-m01r\",\n    \"causation_id\": \"wire_01HZX...\",\n    \"reference_task_ids\": [\"0.0.8830669\"],\n    \"parent_task_id\": \"0.0.8830668\"\n  },\n  \"state\": {\n    \"category\": \"working\",\n    \"terminal\": false\n  },\n  \"payload\": {},\n  \"extensions\": {}\n}\n```\n\n| Field | Required | Purpose |\n|---|---:|---|\n| `wire` | yes | Protocol version. Current target: `1.1`. |\n| `wire_id` | yes | Globally unique event ID. |\n| `type` | yes | RedKey event name, e.g. `task.started`, `artifact.ready`. |\n| `sender` | yes | `agent:<slug>`, `runner:<id>`, `system`, or `human:<id>`. |\n| `ts` | yes | Producer timestamp. HCS consensus timestamp remains canonical after submission. |\n| `stream` | yes | Stream identity, ordering, context, and causality. |\n| `state` | yes for task events | Normalized lifecycle category. |\n| `payload` | yes | Type-specific structured data. |\n| `extensions` | no | Namespaced RedKey or future A2A-compatible metadata. |"
        },
        {
          "title": "HCS Metadata",
          "level": 3,
          "body": "The listener must persist HCS metadata separately from the signed/logged Wire body:\n\n```json\n{\n  \"hcs\": {\n    \"topic_id\": \"0.0.8830671\",\n    \"sequence_number\": 42,\n    \"consensus_timestamp\": \"2026-05-06T16:00:01.123456789Z\",\n    \"running_hash\": \"...\"\n  }\n}\n```\n\nHCS metadata is the proof layer. The Wire body is the coordination event."
        },
        {
          "title": "HCS Content Boundary",
          "level": 3,
          "body": "HCS should carry coordination facts, commitments, references, and proof metadata. It should not carry working content.\n\nGood HCS content:\n\n- task lifecycle events: `task.created`, `task.available`, `task.claimed`, `task.started`, `task.blocked`, `task.complete`\n- inbox and routing events that decide what work exists and who may act on it\n- artifact reference events: `artifact.ready` with URI, version, hash, and readiness metadata\n- review/gate events that affect scheduling or release\n- compact health/capacity events that affect orchestration\n\nBad HCS content:\n\n- raw model output, drafts, scratch notes, transcripts, verbose logs, or token streams\n- large artifacts or document bodies\n- private memory contents\n- secrets, credentials, API responses with sensitive content, or hidden prompts\n\nThe value of streaming through HCS is not content storage. The value is deterministic ordering, claim arbitration, auditability, replay, recovery, and cross-agent coordination. Supabase mirrors this stream for fast reads and product UI, but HCS remains the canonical event source.\n\n---"
        },
        {
          "title": "Stream Model",
          "level": 2,
          "body": "Agent Wire v1.1 treats streams as ordered chains of Wires.\n\n```text\nproject:<project_id>\nphase:<phase_id>\ntask:<task_id>:attempt:<n>\nagent:<agent_id>\nartifact:<artifact_id>\n```\n\nThe practical topology remains shared role/task topics with `stream_id` in each Wire. Dedicated topics can be used for high-value or long-running streams later."
        },
        {
          "title": "Stream Rules",
          "level": 3,
          "body": "- A stream is append-only.\n- `stream_seq` is monotonic within the logical stream.\n- HCS sequence number is canonical within the topic.\n- Supabase stores the reduced current state but is not the canonical event source.\n- A consumer can rebuild current state by replaying HCS events for the relevant stream.\n- Large data never goes into HCS; HCS carries references, hashes, and state transitions.\n\n---"
        },
        {
          "title": "Context And Lineage",
          "level": 2,
          "body": "A2A's `contextId` is valuable internally. RedKey should standardize it.\n\n| Field | Meaning |\n|---|---|\n| `context_id` | The broad work context: project, client, phase, or conversation. |\n| `correlation_id` | The operational grouping used for tracing and read-model grouping. Usually equal to `context_id`. |\n| `causation_id` | The Wire that directly caused this Wire. |\n| `reference_task_ids` | Prior tasks this task continues, refines, reviews, or depends on. |\n| `parent_task_id` | Direct parent when a task is spawned from another task. |"
        },
        {
          "title": "Rules",
          "level": 3,
          "body": "- New work in the same project should reuse the same `context_id`.\n- Retried work should keep `context_id` and use a new `stream_id` with incremented attempt.\n- Follow-up work should create a new task stream and list the prior task in `reference_task_ids`.\n- Parallel work should use separate task streams under the same `context_id`.\n- Terminal task streams are immutable. Corrections create a new stream referencing the old one.\n\n---"
        },
        {
          "title": "Message / Part / Artifact Model",
          "level": 2,
          "body": "Agent Wire should distinguish coordination messages from deliverable artifacts."
        },
        {
          "title": "Message",
          "level": 3,
          "body": "Messages carry input, requests, questions, feedback, or status. A message can contain multiple parts.\n\n```json\n{\n  \"message_id\": \"msg_01\",\n  \"role\": \"human | agent | system\",\n  \"parts\": [\n    {\n      \"kind\": \"text\",\n      \"text\": \"Please review the migration for auth regressions.\"\n    },\n    {\n      \"kind\": \"artifact_ref\",\n      \"artifact_id\": \"art_01\"\n    }\n  ],\n  \"metadata\": {\n    \"skill\": \"code-review\",\n    \"priority\": 2\n  }\n}\n```"
        }
      ],
      "html_path": "artifacts/2026-05-06-agent-wire-v1-1-a2a-hardening-afd10dee21.html",
      "json_path": "artifacts/2026-05-06-agent-wire-v1-1-a2a-hardening-afd10dee21.json"
    },
    {
      "id": "2026-05-01-hcs-streaming-wire-protocol-b4e2ed96c9",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-05-01-hcs-streaming-wire-protocol.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.699Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "HCS Streaming Wire Protocol",
      "summary": "HCS Streaming Wire Protocol Date: 2026 05 01 Status: Draft Related: docs/specs/2026 04 28 agent wire protocol.md, docs/specs/2026 04 27 hcs first claim path.md, docs/specs/2026 04 21 orchestration design.md Core Idea Agent Wire is the typed envelope. HCS is the canonical stream. Instead of treating a Wire as only a package sent at the end of work, the platfo...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "HCS Streaming Wire Protocol",
          "level": 1,
          "body": "**Date:** 2026-05-01\n**Status:** Draft\n**Related:** `docs/specs/2026-04-28-agent-wire-protocol.md`, `docs/specs/2026-04-27-hcs-first-claim-path.md`, `docs/specs/2026-04-21-orchestration-design.md`\n\n---"
        },
        {
          "title": "Core Idea",
          "level": 2,
          "body": "Agent Wire is the typed envelope. HCS is the canonical stream.\n\nInstead of treating a Wire as only a package sent at the end of work, the platform treats every meaningful coordination event as a Wire. Wires that share a `stream_id` form a stream. HCS provides ordering, timestamping, immutability, and replay. Supabase materializes the current state for fast queries and Studio rendering.\n\n```text\nWire = typed event envelope\nStream = ordered chain of Wires\nHCS = canonical append-only stream log\nSupabase = reducer/read model\nStudio = human rendering layer\n```\n\nThis does not replace the existing Wire protocol. It extends it.\n\n---"
        },
        {
          "title": "Why This Matters",
          "level": 2,
          "body": "The current model coordinates mostly by completion:\n\n```text\ntask.available -> task.claim -> task.complete\n```\n\nThat works for simple work, but project-level coordination has more live state than a final package can express:\n\n- who has claimed the work\n- whether the agent started\n- what plan the agent is following\n- whether an artifact is ready before the whole task is complete\n- whether another agent has a blocking concern\n- whether a lease is stale\n- whether runner capacity is saturated or idle\n\nStreaming changes coordination from handoff-based to live orchestration.\n\n```text\ntask.available\ntask.claimed\ntask.started\ntask.plan.created\nartifact.claimed\nartifact.ready\nreview.concern\ntask.complete\n```\n\nThe package still exists. It becomes the terminal snapshot or commitment. The stream is the process record.\n\n---"
        },
        {
          "title": "Design Principle",
          "level": 2,
          "body": "HCS is the source of truth. Supabase is a mirror.\n\nIf Supabase is wrong, stale, or unavailable, the system can replay HCS and rebuild the read model. Agents should coordinate from HCS-originated events, not from Supabase as a second work queue.\n\nThis matches the HCS-first claim path:\n\n```text\nHCS role topic -> task.available\nrunner -> task.claimed Wire on HCS\nlistener -> materializes claim to Supabase\nrunner -> lifecycle Wires on HCS\nlistener -> reduces stream to current state\nEngine -> releases downstream work from materialized state\n```\n\n---"
        },
        {
          "title": "HCS As Stream Transport",
          "level": 2,
          "body": "Each HCS topic is an append-only event log.\n\n```text\nHCS topic = stream transport\nHCS sequence number = canonical topic ordering\nHCS consensus timestamp = canonical event time\nHCS message body = Wire envelope\n```\n\nThe stream itself is a logical grouping over Wires:\n\n```text\nstream_id = task:0.0.8830671:attempt:1\n```\n\nMultiple streams can live on the same HCS topic. The listener groups them by `stream_id`.\n\n---"
        },
        {
          "title": "Practical Starting Point: Shared Topics With Stream IDs",
          "level": 3,
          "body": "Keep the existing role and task topic architecture. Add stream metadata to each Wire.\n\n```text\nroles.developer topic\n  stream_id=task:A:attempt:1\n  stream_id=task:B:attempt:1\n  stream_id=task:C:attempt:1\n\ntask topic\n  stream_id=task:A:attempt:1\n```\n\nThis is the lowest-friction path because it keeps the current role-topic claim model intact.\n\nPros:\n\n- fewer HCS topics\n- compatible with current runners and listener\n- easy incremental adoption\n- stream grouping happens in the read model\n\nTrade-off:\n\n- HCS sequence is topic-global, not stream-local, so `stream_seq` must be included or derived by the reducer."
        },
        {
          "title": "Future Option: Topic Per Long-Running Stream",
          "level": 3,
          "body": "For high-value or long-running streams, the platform may create dedicated topics.\n\n```text\nproject topic\nphase topic\ntask topic\n```\n\nPros:\n\n- clean isolation\n- easy replay per project/task\n- HCS sequence can directly serve as stream order\n\nTrade-off:\n\n- more topics to create, track, and secure\n- more operational overhead\n\n---"
        },
        {
          "title": "Stream-Enabled Wire Envelope",
          "level": 2,
          "body": "Current Wire envelope:\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"message_type\",\n  \"sender\": \"agent_slug | system | human\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {}\n}\n```\n\nStreaming adds identity, ordering, and causality fields:\n\n```json\n{\n  \"wire\": \"1.1\",\n  \"wire_id\": \"wire_01\",\n  \"stream_id\": \"task:0.0.8830671:attempt:1\",\n  \"stream_seq\": 12,\n  \"correlation_id\": \"project:knowledgevault-m01r\",\n  \"causation_id\": \"wire_00\",\n  \"type\": \"task.started\",\n  \"sender\": \"agent:quinn-03\",\n  \"ts\": \"2026-05-01T15:12:03Z\",\n  \"payload\": {\n    \"task_id\": \"0.0.8830671\",\n    \"attempt\": 1\n  }\n}\n```\n\n| Field | Meaning |\n|---|---|\n| `wire_id` | Unique ID for this event envelope |\n| `stream_id` | The running process this Wire belongs to |\n| `stream_seq` | Monotonic order within the stream |\n| `correlation_id` | Broader project, phase, client, or workflow this relates to |\n| `causation_id` | The Wire that directly caused this event |\n| `type` | Typed event name |\n| `payload` | Event-specific data |\n\nThe listener should also persist the HCS metadata:\n\n| Field | Meaning |\n|---|---|\n| `hcs_topic_id` | Topic that carried the Wire |\n| `hcs_sequence_number` | Canonical topic order |\n| `consensus_timestamp` | Canonical event time |\n\n---"
        },
        {
          "title": "Event Discipline",
          "level": 2,
          "body": "The stream should contain operational facts, not raw model output.\n\nGood stream events:\n\n- `task.claimed`\n- `task.started`\n- `task.plan.created`\n- `artifact.claimed`\n- `artifact.ready`\n- `contract.ready`\n- `review.concern`\n- `task.blocked`\n- `task.complete`\n- `agent.heartbeat`\n- `agent.capacity.updated`\n\nBad stream events:\n\n- raw model thoughts\n- token-by-token prose\n- large file contents\n- verbose logs\n- secrets\n- temporary scratch notes\n\nThe rule:\n\n**Stream only facts that help scheduling, recovery, review, or visibility.**\n\n---"
        },
        {
          "title": "Large Data And Artifacts",
          "level": 2,
          "body": "HCS is not a blob store. HCS carries the coordination event and integrity proof. Large artifacts live off-chain.\n\n```json\n{\n  \"wire\": \"1.1\",\n  \"wire_id\": \"wire_artifact_ready_01\",\n  \"stream_id\": \"task:0.0.8830671:attempt:1\",\n  \"stream_seq\": 8,\n  \"correlation_id\": \"project:knowledgevault-m01r\",\n  \"type\": \"artifact.ready\",\n  \"sender\": \"agent:quinn-03\",\n  \"ts\": \"2026-05-01T15:30:00Z\",\n  \"payload\": {\n    \"artifact_type\": \"migration\",\n    \"artifact_ref\": \"supabase-storage://task-runs/0.0.8830671/005_experts_auth_alignment.sql\",\n    \"sha256\": \"abc123\",\n    \"ready_for\": [\"review\", \"downstream_tasks\"]\n  }\n}\n```\n\nThe artifact can be in Supabase Storage, HFS, Git, S3, or another durable store. The Wire stores the reference and hash.\n\n---"
        },
        {
          "title": "Project Coordination With Streams",
          "level": 2,
          "body": "A project becomes multiple related streams:\n\n```text\nproject:<project_id>\nphase:<phase_id>\ntask:<task_id>:attempt:<n>\nagent:<agent_id>\nartifact:<artifact_id>\n```\n\nThe project stream records the high-level graph:\n\n```text\nproject.created\nphase.created\ntask.created\ndependency.created\ngate.opened\ngate.passed\nproject.complete\n```\n\nTask streams record execution:\n\n```text\ntask.available\ntask.claimed\ntask.started\ntask.plan.created\nartifact.claimed\nartifact.ready\ntask.blocked\ntask.complete\n```\n\nAgent streams record worker health and capacity:\n\n```text\nagent.started\nagent.heartbeat\nagent.capacity.updated\nagent.lease.accepted\nagent.lease.released\nagent.stopped\n```\n\nThis lets Engine coordinate while work is happening instead of waiting for terminal packages.\n\n---"
        },
        {
          "title": "Earlier Dependency Release",
          "level": 2,
          "body": "Without streaming, downstream work waits for `task.complete`.\n\nWith streaming, downstream work can release when a specific dependency is ready.\n\nExample:\n\n```text\nR1 task: migration/auth contract\nR2 task: API route\nR3 task: middleware\n```\n\nR2 and R3 may not need all of R1 complete. They may only need the auth contract.\n\n```text\nR1 -> contract.ready(auth_expert_id_mapping)\nEngine -> releases R2 and R3\nR1 -> task.complete later\n```\n\nThis improves parallelism without weakening auditability because the release condition is itself an HCS Wire.\n\n---"
        },
        {
          "title": "Multi-Agent Role Pools",
          "level": 2,
          "body": "With many agents per role, the stream is the coordination and backpressure layer.\n\n```text\n15 developer agents watch roles.developer\ntask.available appears\nagents race to claim\nlowest valid claim wins\nwinner emits task.started\nlosers keep watching\n```\n\nClaims should include a lease and optional capacity reservation:\n\n```json\n{\n  \"wire\": \"1.1\",\n  \"wire_id\": \"wire_claim_01\",\n  \"stream_id\": \"task:0.0.9001:attempt:1\",\n  \"stream_seq\": 2,\n  \"correlation_id\": \"project:kv-m02\",\n  \"type\": \"task.claimed\",\n  \"sender\": \"agent:quinn-07\",\n  \"ts\": \"2026-05-01T16:00:00Z\",\n  \"payload\": {\n    \"task_id\": \"0.0.9001\",\n    \"agent\": \"quinn-07\",\n    \"role\": \"developer\",\n    \"lease_expires_at\": \"2026-05-01T16:30:00Z\",\n    \"capacity_units_reserved\": 3\n  }\n}\n```\n\nAgents also emit capacity:\n\n```json\n{\n  \"wire\": \"1.1\",\n  \"wire_id\": \"wire_capacity_01\",\n  \"stream_id\": \"agent:quinn-07\",\n  \"stream_seq\": 44,\n  \"type\": \"agent.capacity.updated\",\n  \"sender\": \"agent:quinn-07\",\n  \"ts\": \"2026-05-01T16:01:00Z\",\n  \"payload\": {\n    \"available_units\": 4,\n    \"max_units\": 6,\n    \"skills\": [\"typescript\", \"nextjs\", \"supabase\"]\n  }\n}\n```\n\nEngine uses claims, leases, heartbeats, and capacity to decide how much work to release.\n\n---"
        },
        {
          "title": "Reducers And Read Models",
          "level": 2,
          "body": "The listener becomes a stream processor:\n\n```text\npoll HCS topic\ndecode Wire\ninsert raw event\nupdate stream offset\nrun reducer for affected stream_id\nupdate materialized read model\n```\n\nSuggested raw event table:\n\n```text\nwire_events\n- id\n- hcs_topic_id\n- hcs_sequence_number\n- consensus_timestamp\n- wire_id\n- stream_id\n- stream_seq\n- correlation_id\n- causation_id\n- type\n- sender\n- payload\n- received_at\n```\n\nSuggested stream state table:\n\n```text\nstream_state\n- stream_id\n- stream_type\n- status\n- last_wire_id\n- last_event_type\n- last_event_at\n- correlation_id\n- reducer_version\n- state jsonb\n```\n\nSuggested task run state:\n\n```text\ntask_run_state\n- stream_id\n- task_id\n- attempt\n- status\n- claimed_by\n- lease_expires_at\n- last_heartbeat_at\n- plan_ref\n- blocker\n- output_ref\n- verification_status\n```\n\nSuggested agent state:\n\n```text\nagent_runtime_state\n- agent_id\n- role\n- status\n- available_units\n- max_units\n- active_leases\n- last_heartbeat_at\n```\n\nThese tables are derived. HCS remains canonical.\n\n---"
        },
        {
          "title": "Level 1: Current Package Mode",
          "level": 3,
          "body": "Keep the existing events:\n\n```text\ntask.available\ntask.claim\ntask.complete\ntask.blocked\n```"
        },
        {
          "title": "Level 2: Stream Metadata",
          "level": 3,
          "body": "Add stream fields to existing Wires:\n\n```text\nwire_id\nstream_id\nstream_seq\ncorrelation_id\ncausation_id\n```\n\nNo major behavior change yet."
        },
        {
          "title": "Level 3: Runner Lifecycle",
          "level": 3,
          "body": "Add a small set of lifecycle events:\n\n```text\ntask.claimed\ntask.started\ntask.plan.created\nagent.heartbeat\ntask.complete\ntask.blocked\n```\n\nThis enables live task state, stale lease detection, and better Studio visibility."
        },
        {
          "title": "Level 4: Coordination Events",
          "level": 3,
          "body": "Add artifact and review events:\n\n```text\nartifact.claimed\nartifact.ready\ncontract.ready\nreview.concern\ngate.opened\ngate.passed\n```\n\nThis enables earlier review and partial dependency release."
        }
      ],
      "html_path": "artifacts/2026-05-01-hcs-streaming-wire-protocol-b4e2ed96c9.html",
      "json_path": "artifacts/2026-05-01-hcs-streaming-wire-protocol-b4e2ed96c9.json"
    },
    {
      "id": "2026-04-29-studio-unified-shell-1a2f0888e5",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-29-studio-unified-shell.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.698Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Studio Unified Shell + Ops Studio Integration",
      "summary": "Studio Unified Shell + Ops Studio Integration Date: 2026 04 29 Status: Approved Problem The Studio app (studio.bezeliq.ai) and Ops Studio (cockpit at cockpit.bezeliq.ai) are separate, unlinked experiences. The Studio sidebar uses a plain text wordmark and a flat link list with an external link to the cockpit. There is no way to navigate between studios from ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Studio Unified Shell + Ops Studio Integration",
          "level": 1,
          "body": "**Date:** 2026-04-29  \n**Status:** Approved  \n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "The Studio app (`studio.bezeliq.ai`) and Ops Studio (cockpit at `cockpit.bezeliq.ai`) are separate, unlinked experiences. The Studio sidebar uses a plain text wordmark and a flat link list with an external link to the cockpit. There is no way to navigate between studios from within a studio.\n\n---"
        },
        {
          "title": "Solution",
          "level": 2,
          "body": "Replace the current AppShell sidebar with a two-layer navigation shell. Retire `cockpit.bezeliq.ai` — Ops Studio lives inside Studio at `/ops`.\n\n---"
        },
        {
          "title": "Icon Rail (always visible, 52px wide)",
          "level": 3,
          "body": "- Bezel white logo (`https://imagedelivery.net/C0nJXN4TRwsrV5P_U5q4RQ/bezel-white/public`) at top, replacing the current `BezelIQ` text wordmark\n- One icon per studio, stacked vertically below the logo\n- Each studio has a signature color applied to its icon, border, and background tint\n- Coming-soon studios rendered at reduced opacity with a dashed border\n- Clicking a **different** studio's icon navigates immediately to that studio's root route\n- Clicking the **current** studio's icon toggles the flyout open/closed"
        },
        {
          "title": "Flyout Panel (150px, slides out from rail)",
          "level": 3,
          "body": "- Opens alongside the icon rail — total nav width 202px when open\n- Shows the current studio's name at top (in its signature color)\n- Shows that studio's sub-nav items below (same items the current sidebar shows)\n- Closes when: user clicks the current studio icon again, or navigates to a different studio\n- Default state: open (matches current sidebar behavior)\n\n---"
        },
        {
          "title": "Studio Registry",
          "level": 2,
          "body": "| Studio | Route | Color | Icon concept | Status |\n|---|---|---|---|---|\n| Ops Studio | `/ops` | Purple `#8b86f6` | Network/node graph | Live |\n| Dev Studio | `/dev` | Cyan `#38bdf8` | Terminal/code brackets | Live |\n| Sales Studio | `/sales` | Green `#4ade80` | Bar chart / pipeline | Live |\n| Marketing Studio | `/marketing` | Amber `#fbbf24` | Signal/broadcast | Coming soon |\n| Finance Studio | `/finance` | Orange `#fb923c` | Currency/ledger | Coming soon |\n\nComing-soon studios: visible in the rail (dashed border, 40% opacity), not clickable.\n\n---"
        },
        {
          "title": "Ops Studio Route (`/ops`)",
          "level": 2,
          "body": "New Vue route added to the router. Renders a full-height iframe pointing at the cockpit HTML file. The cockpit (`cockpit/index.html`) is served statically — no rewrite required.\n\nThe cockpit's own nav bar (forge nav with logo + \"Ops Studio\" label) is hidden via iframe CSS or a query param flag so the Studio shell nav does not double up.\n\n---"
        },
        {
          "title": "Studio Home Page (`/`)",
          "level": 2,
          "body": "`StudioHome.vue` redesigned as a studio launcher grid. Each studio gets a card using its signature color. Cards for live studios are clickable and navigate to the studio root. Coming-soon cards are visible but inert. Same Bezel logo in the shell rail above.\n\n---"
        },
        {
          "title": "Deployment",
          "level": 2,
          "body": "- nginx for `studio.bezeliq.ai` updated to serve the cockpit HTML at the `/ops` path (or the Vue app handles it via iframe src pointing to the static file path)\n- `cockpit.bezeliq.ai` nginx config updated to 301 redirect to `studio.bezeliq.ai/ops`, then retired\n- No changes to the cockpit file itself beyond hiding its internal nav in iframe context\n\n---"
        },
        {
          "title": "Components Touched",
          "level": 2,
          "body": "| File | Change |\n|---|---|\n| `src/components/AppShell.vue` | Full rewrite — icon rail + flyout replacing current sidebar |\n| `src/router/index.js` | Add `/ops` route, add `/sales`, `/marketing`, `/finance` stubs |\n| `src/views/StudioHome.vue` | Redesign as studio launcher grid |\n| `src/views/OpsStudioView.vue` | New — full-height cockpit iframe |\n| VPS nginx (`studio.bezeliq.ai`) | Serve cockpit static at `/ops` or configure iframe src |\n| VPS nginx (`cockpit.bezeliq.ai`) | 301 redirect → `studio.bezeliq.ai/ops` |\n\n---"
        },
        {
          "title": "Out of Scope",
          "level": 2,
          "body": "- No changes to cockpit logic, data, or Supabase wiring\n- No Sales/Marketing/Finance studio content (stubs only)\n- No mobile layout changes"
        }
      ],
      "html_path": "artifacts/2026-04-29-studio-unified-shell-1a2f0888e5.html",
      "json_path": "artifacts/2026-04-29-studio-unified-shell-1a2f0888e5.json"
    },
    {
      "id": "2026-04-29-membership-close-sequence-b49b0787b7",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-29-membership-close-sequence.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.696Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "b2bea_membership_close — Sequence Design",
      "summary": "b2bea membership close — Sequence Design Status Week 1 settled. Week 2+ to be designed. Rules Business days only (Mon–Fri, skip weekends) All steps → requires justin send = true (drafts for Justin to review) LinkedIn same day approval Enrollment day = meeting day. Day 0 fires next morning (delay days = 1). Day 1 LinkedIn is conditional: not connected → send ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Status",
          "level": 2,
          "body": "Week 1 settled. Week 2+ to be designed."
        },
        {
          "title": "Rules",
          "level": 2,
          "body": "- Business days only (Mon–Fri, skip weekends)\n- All steps → `requires_justin_send = true` (drafts for Justin to review)\n- LinkedIn same-day approval\n- Enrollment day = meeting day. Day 0 fires next morning (delay_days = 1).\n- Day 1 LinkedIn is conditional: not connected → send request; already connected → send message\n\n---"
        },
        {
          "title": "Week 1",
          "level": 2,
          "body": "| Day | delay_days | Channel | Step | Content |\n|---|---|---|---|---|\n| 0 | 1 | Email | Personal follow-up | Structure from real example: personal opener referencing something specific from meeting, membership overview, B2BEA World sponsorship link, Ashley/Cris references, reply CTA |\n| 0 | 1 | LinkedIn | Connect / message | Not connected → connection request. Already connected → \"Great to meet you yesterday — sent you an email with everything.\" |\n| 4 | 4 | Email | Proof asset — Greenville Live | Short email, let the video do the work. Link: https://www.youtube.com/watch?v=2BGy3t92qM8 |\n| 5 | 5 | LinkedIn | Short — goal-specific | Pick relevant Justin short from library based on contact goal. One-liner + link. |\n| 7 | 7 | Email | Education — 3 issues + masterclass | Frame around 3 main issues (executive alignment, customer adoption, data readiness). Link: https://www.b2bea.org/insights-advice/beyond-the-website-driving-real-customer-adoption-in-b2b-ecommerce |\n\n---"
        },
        {
          "title": "LinkedIn Shorts Library",
          "level": 2,
          "body": "_To be built — map shorts to goal types (awareness, credibility, pipeline, marketing_relief)_\n\nExample: https://www.linkedin.com/posts/justinking_im-really-excited-for-this-one-earlier-activity-7452692971390464000-HFzs\n\n---"
        },
        {
          "title": "Week 2+",
          "level": 2,
          "body": "_To be designed next session_\n\nFrom merged sequence (pending):\n- Day 9: LinkedIn — Insight\n- Day 11: Email — The people\n- Day 13: LinkedIn — Event seed\n- Day 14: Email — Campaign visibility / FOMO\n- Day 15: Email — Where you fit (pulls from meeting notes)\n- Day 17: LinkedIn — Momentum\n- Day 19: Email — Value expansion\n- Day 21: Email — Personal career upside\n- Day 22: LinkedIn — Casual check\n- Day 23: Email — Event context\n- Day 25: LinkedIn — Social proof\n- Day 28: Email — Soft recap\n- Day 30: LinkedIn — Thoughtful nudge\n- Day 32: Email — Example / case\n- Day 35: LinkedIn — Video / pattern break\n- Day 37: Email — Direct ask / Close (requires_justin_send)\n- Day 39: LinkedIn — Follow-up\n- Day 42: Email — Close loop\n- Day 45: LinkedIn — Leave door open\n- Day 56: Email — 60-day exit\n\n---"
        },
        {
          "title": "Open Items",
          "level": 2,
          "body": "- Day 7 conflict: Boss-arming (old) vs \"What this looks like\" (new) — not yet resolved\n- LinkedIn shorts library — need to curate 3-4 posts per goal type\n- Static links (membership overview, B2B World sponsorship) — confirm URLs"
        }
      ],
      "html_path": "artifacts/2026-04-29-membership-close-sequence-b49b0787b7.html",
      "json_path": "artifacts/2026-04-29-membership-close-sequence-b49b0787b7.json"
    },
    {
      "id": "2026-04-29-brooke-sales-campaigns-5cbb26647e",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-29-brooke-sales-campaigns.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.695Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Brooke / roles.sales — Campaign & Sequence System Design",
      "summary": "Brooke / roles.sales — Campaign & Sequence System Design Date: 2026 04 29 Status: Approved for planning Overview A campaign and sequence system for the B2BEA / RedKey sales motion. Contacts are enrolled in campaigns by the roles.sales agent (Brooke) after Justin gates the initial routing. Each campaign has its own sequence of timed touchpoints (email + Linke...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Brooke / roles.sales — Campaign & Sequence System Design",
          "level": 1,
          "body": "**Date:** 2026-04-29  \n**Status:** Approved for planning\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "A campaign and sequence system for the B2BEA / RedKey sales motion. Contacts are enrolled in campaigns by the `roles.sales` agent (Brooke) after Justin gates the initial routing. Each campaign has its own sequence of timed touchpoints (email + LinkedIn). When a contact exits a campaign, the campaign's `on_exit` map determines the next campaign automatically — Justin only gates the first handoff.\n\n---"
        },
        {
          "title": "The Full Pipeline",
          "level": 2,
          "body": "```\nTara (roles.bdr) finds prospect → books meeting\n  → meeting_booked task dispatched to roles.exec (Justin)\n  → Justin reviews handoff, specifies campaign(s): \"vendor_membership_close\"\n  → task dispatched to roles.sales\n  → roles.sales enrolls contact in specified campaign(s), step 1\n  → Engine fires execute_sequence_step tasks as next_send_at arrives\n  → roles.sales drafts each touch → staged_drafts → Justin approves → sends\n  → reply received → roles.sales classifies → continue or exit\n  → exit: on_exit map routes to next campaign automatically\n```\n\n---"
        },
        {
          "title": "BDR Campaigns (Tara / roles.bdr)",
          "level": 3,
          "body": "| Slug | Type | Client | Purpose |\n|---|---|---|---|\n| `b2bea_world` | event | b2bea | Outreach for B2B eCommerce World event |\n| `b2bea_membership` | membership | b2bea | Vendor membership outreach |\n| `dreamborn` | platform | dreamborn | DreamBorn platform outreach |"
        },
        {
          "title": "Sales Campaigns (Brooke / roles.sales)",
          "level": 3,
          "body": "| Slug | Type | Client | Purpose |\n|---|---|---|---|\n| `b2bea_membership_close` | membership | b2bea | Post-meeting close sequence |"
        },
        {
          "title": "Customer Success Campaigns",
          "level": 3,
          "body": "| Slug | Type | Client | Purpose |\n|---|---|---|---|\n| `b2bea_membership_cs` | onboarding | b2bea | Post-close member onboarding |"
        },
        {
          "title": "on_exit Chains",
          "level": 3,
          "body": "```\nb2bea_membership (BDR) → meeting → Justin gates → b2bea_membership_close\nb2bea_membership_close → converted  → b2bea_membership_cs\nb2bea_membership_close → no_engagement → null (close the loop)\nb2bea_membership_close → rejected   → null (close the loop)\nb2bea_world (BDR)       → registered → null (no sales sequence for event)\ndreamborn (BDR)         → meeting   → Justin gates → no sales campaign yet\n```\n\n---"
        },
        {
          "title": "`campaigns` table",
          "level": 3,
          "body": "```sql\nid          uuid primary key\nslug        text unique not null               -- e.g. 'b2bea_membership_close'\nname        text not null\nclient_id   text not null\ntype        text not null                      -- event | membership | platform | onboarding\nowner_role  text not null                      -- roles.bdr | roles.sales | roles.cs\nstatus      text not null default 'active'    -- active | paused | archived\non_exit     jsonb not null default '{}'\n  -- shape: { \"converted\": \"<slug|null>\", \"no_engagement\": \"<slug|null>\", \"rejected\": \"<slug|null>\" }\ncreated_at  timestamptz not null default now()\n```"
        },
        {
          "title": "`campaign_sequences` table",
          "level": 3,
          "body": "Each row is one step in a campaign's sequence.\n\n```sql\nid                   uuid primary key\ncampaign_id          uuid not null references campaigns(id)\nstep_number          int not null                          -- 1-based, per campaign\ndelay_days           int not null                          -- days from enrollment (step 1 = day 0)\nchannel              text not null                         -- email | linkedin\ncontent_type         text not null\n  -- follow_up | proof | boss_arming | campaign_visibility\n  -- personal_visibility | marketing_relief | close | exit\ntemplate_instructions text not null                        -- what to write — not the copy itself\nunique (campaign_id, step_number)\n```"
        },
        {
          "title": "`campaign_contacts` table",
          "level": 3,
          "body": "One row per contact per campaign enrollment. Each enrollment starts fresh at step 1.\n\n```sql\nid              uuid primary key\ncontact_id      text not null                   -- Attio contact record ID\ncampaign_id     uuid not null references campaigns(id)\nclient_id       text not null\nstatus          text not null default 'active'  -- active | converted | rejected | timed_out\ncurrent_step    int not null default 1\nnext_send_at    timestamptz                     -- when to fire the next step\nenrolled_at     timestamptz not null default now()\nexited_at       timestamptz\nexit_reason     text\ngoal            text                            -- awareness | pipeline | credibility | marketing_relief\nnotes           text                            -- from Justin's exec gate routing decision\n-- partial unique: only one ACTIVE enrollment per contact per campaign\n-- exited enrollments are preserved as history and do not block re-enrollment\n-- create unique index campaign_contacts_active_uniq on campaign_contacts (contact_id, campaign_id) where status = 'active'\n```"
        },
        {
          "title": "`sales_send_queue` table",
          "level": 3,
          "body": "Individual outbound items queued for execution.\n\n```sql\nid               uuid primary key\nclient_id        text not null\ncontact_id       text not null\ncampaign_id      uuid not null references campaigns(id)\nstep_number      int not null\nchannel          text not null                  -- email | linkedin\nstaged_draft_id  uuid                           -- FK to staged_drafts once drafted\nscheduled_at     timestamptz not null\nsent_at          timestamptz\nstatus           text not null default 'pending'  -- pending | drafted | approved | sent | failed\nerror            text\ncreated_at       timestamptz not null default now()\n```\n\n---"
        },
        {
          "title": "roles.sales Task Types",
          "level": 2,
          "body": "| Task type | Trigger | What roles.sales does |\n|---|---|---|\n| `enroll_contact` | Justin's exec gate approval | Creates `campaign_contacts` row(s), sets step 1, calculates first `next_send_at` |\n| `execute_sequence_step` | Engine when `next_send_at` arrives | Drafts the touch for current step, writes to `staged_drafts`, advances `current_step`, sets next `next_send_at` |\n| `process_reply` | Inbound reply received (deferred — reply detection mechanism TBD) | Classifies intent, updates Attio activity, continues sequence or triggers exit |\n| `exit_contact` | Exit condition met | Sets `campaign_contacts.status`, follows `on_exit` map to enroll in next campaign |\n\n---"
        },
        {
          "title": "Sequence Execution Rules",
          "level": 2,
          "body": "- When a contact is enrolled, `current_step = 1` always — per-campaign, not global\n- `next_send_at` = `enrolled_at` + `campaign_sequences[step=1].delay_days`\n- After each step executes: `current_step++`, `next_send_at` = `enrolled_at` + `campaign_sequences[next_step].delay_days`\n- If no next step exists after the final step: trigger `exit_contact` with reason `no_engagement`\n- Per-contact daily send cap: max 1 touch per day across all active campaigns for a given contact (Engine checks before dispatching `execute_sequence_step`)\n\n---"
        },
        {
          "title": "Attio Integration",
          "level": 2,
          "body": "Attio is the record of truth for contacts and deals. Supabase holds operational execution state.\n\n**Attio writes (by roles.sales):**\n- Create/update contact record on `enroll_contact`\n- Log every touch as a contact activity (channel, content_type, date)\n- Create deal record at `enroll_contact` for sales campaigns\n- Update deal stage at each phase transition\n- Close deal on `exit_contact` (won or lost)\n\n**Supabase holds:**\n- Campaign definitions and sequences\n- Enrollment state (`campaign_contacts`)\n- Send queue (`sales_send_queue`)\n- `staged_drafts` (all outbound, pending Justin's approval)\n\n---"
        },
        {
          "title": "staged_drafts Format (sales touches)",
          "level": 2,
          "body": "```json\n{\n  \"channel\": \"email | linkedin\",\n  \"to_id\": \"<email address or LinkedIn URN>\",\n  \"body\": \"<message — Justin's voice>\",\n  \"context\": {\n    \"contact_id\": \"<Attio contact ID>\",\n    \"contact_name\": \"<string>\",\n    \"company\": \"<string>\",\n    \"campaign_slug\": \"<string>\",\n    \"step_number\": \"<int>\",\n    \"content_type\": \"<string>\",\n    \"goal\": \"<awareness | pipeline | credibility | marketing_relief>\",\n    \"requires_justin_send\": \"<bool — true for close step, Justin sends personally>\"\n  }\n}\n```\n\n---"
        },
        {
          "title": "b2bea_membership_close Sequence (initial)",
          "level": 2,
          "body": "| Step | Day | Channel | Content type | What to write |\n|---|---|---|---|---|\n| 1 | 0 | email | follow_up | Personal follow-up same day as meeting. Reference what they said specifically. Grant pre-sale access to B2BEA site + training content. |\n| 2 | 3 | email | proof | Goal-specific proof asset. Awareness → draft a LinkedIn post they could publish today. Credibility → mock up how they'd appear in an upcoming report. Pipeline → ICP overlap in B2BEA community. Marketing relief → content calendar for their first 90 days. |\n| 3 | 7 | email | boss_arming | \"Internal case\" kit — ROI framing, peer proof (which competitors/peers are members), deliverables list. Written so they can forward it to their boss. |\n| 4 | 10 | linkedin | follow_up | Warm touch. Different angle. About them personally, not B2BEA. |\n| 5 | 14 | email | campaign_visibility | Upcoming B2BEA reports + who's already confirmed. FOMO is information, not pressure. |\n| 6 | 21 | email | personal_visibility | Career upside angle. \"We'd put YOU on video — your name and face.\" Address the marketing lead specifically. |\n| 7 | 35 | email | close | \"Let's turn this on fully.\" Natural continuation of what's already happening, not a transaction. Flag Justin to send personally. |\n| 8 | 56 | email | exit | 60-day exit. One final frame of what they're stepping away from — specific upcoming campaigns, content opportunities relevant to their goal. |\n\n---"
        },
        {
          "title": "Role Topic Changes",
          "level": 2,
          "body": "Tara moves from `roles.sales` to `roles.bdr`. Brooke owns `roles.sales` exclusively.\n\n- `roles.bdr` — new topic required (HCS topic to be created)\n- `roles.sales` — existing topic `0.0.8796955`, re-assigned to Brooke\n- `agents.traci` — update topic map entry to reflect BDR role\n- `agents.brooke` — new `agents.brooke` HCS topic required\n\n---"
        },
        {
          "title": "Out of Scope",
          "level": 2,
          "body": "- DreamBorn sales campaign sequence (deferred — Justin gates manually for now)\n- Automated campaign enrollment without Justin's exec gate (deferred)\n- Brooke sending autonomously without staged_drafts approval (never)\n- Customer success sequence content (defined separately)\n- Attio MCP plugin build (separate task)"
        }
      ],
      "html_path": "artifacts/2026-04-29-brooke-sales-campaigns-5cbb26647e.html",
      "json_path": "artifacts/2026-04-29-brooke-sales-campaigns-5cbb26647e.json"
    },
    {
      "id": "2026-04-29-bezel-docs-site-design-2d3d53eba8",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-29-bezel-docs-site-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.694Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Bezel Docs Site — Design Spec",
      "summary": "Bezel Docs Site — Design Spec Date: 2026 04 29 URL: docs.bezeliq.ai Status: Approved for planning Overview A public facing documentation site for the Bezel platform. Serves three audiences — partners/collaborators, developers, and clients evaluating Bezel. Built on Astro Starlight, hosted on Cloudflare Pages, written primarily by agents and maintained contin...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Bezel Docs Site — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-29  \n**URL:** docs.bezeliq.ai  \n**Status:** Approved for planning\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "A public-facing documentation site for the Bezel platform. Serves three audiences — partners/collaborators, developers, and clients evaluating Bezel. Built on Astro Starlight, hosted on Cloudflare Pages, written primarily by agents and maintained continuously as the platform evolves.\n\n---"
        },
        {
          "title": "Tech Stack",
          "level": 2,
          "body": "| Layer | Choice | Reason |\n|---|---|---|\n| Framework | Astro Starlight | Best docs framework available. Markdown-native, fast, beautiful. |\n| Hosting | Cloudflare Pages | Already used for studio.bezeliq.ai and dreamborn.ai. Free. |\n| Domain | docs.bezeliq.ai | Subdomain of existing bezeliq.ai domain. |\n| Content format | Markdown / MDX | Agents write .md files. MDX for interactive components where needed. |\n| Repo | New repo: `bezel-docs` | Separate from redk3y — docs have their own release cadence. |\n\n---"
        },
        {
          "title": "Visual Design",
          "level": 2,
          "body": "**Style:** Deep Dark / Branded  \n**Background:** `#0a0f1e` (near-black)  \n**Sidebar:** `#070b18`  \n**Accent:** Gradient purple `#7c6af7 → #a78bfa`  \n**Text:** `#fff` headings, `#888` body, `#555` secondary  \n**Code blocks:** Dark with purple border, monospace  \n**Logo:** Bezel `black-on-white.png` with `filter: invert(1); mix-blend-mode: screen`\n\nStarlight theme customization via `astro.config.mjs` custom CSS variables — no custom renderer needed.\n\n---"
        },
        {
          "title": "Navigation (sidebar, top-level)",
          "level": 3,
          "body": "```\nWhat is Bezel\nCore Concepts\nThe Agent Team\nHow Work Flows\nThe Studio\nGetting Started\nReference\n```"
        },
        {
          "title": "Section Breakdown",
          "level": 3,
          "body": "**① What is Bezel**\n- The Vision\n- The Two-World Model (agent artifacts vs human views)\n- Why Consensus Changes Everything\n- The Agent Economy\n\n*Audience:* Everyone  \n*Authors:* Justin + Atlas  \n\n---\n\n**② Core Concepts**\n- The Pull Model\n- HCS Consensus (topics, claiming, the read receipt)\n- Roles & Topics\n- The Wire Protocol (brief → claim → complete → blocked)\n- Agent Artifacts vs Human Views\n\n*Audience:* Partners, developers  \n*Authors:* Atlas, Quinn  \n\n---\n\n**③ The Agent Team**\n- How to Read an Agent Card\n- Platform Agents (Atlas, Engine, Claire, Iris)\n- Developer Agents (Quinn, Vikram, Priya, Luna)\n- Marketing Agents (Nova, Harper, Jade, Rosa, Ivy)\n- Sales & CRM Agents (Traci, Arlo)\n- Management Agents (Mindy, Zara)\n\n*Audience:* Everyone  \n*Authors:* Each agent writes their own page — seeded from agent cards in `definitions/cards/`  \n\n---\n\n**④ How Work Flows**\n- Task Lifecycle (available → claim → execute → complete)\n- The Engine & Dependency Graph\n- Exec Gates & Human-in-the-Loop\n- Completion Verification\n- Circuit Breakers & Blocked Tasks\n\n*Audience:* Partners, developers  \n*Authors:* Engine, Atlas  \n\n---\n\n**⑤ The Studio**\n- Cockpit Overview\n- Inbox & Exec Gates\n- Marketing Studio\n- Campaign → Piece → Publish Flow\n- Working with Atlas (interactive architect)\n\n*Audience:* Partners, clients  \n*Authors:* Justin + agents  \n\n---\n\n**⑥ Getting Started**\n- Your First Session with Claude Code\n- Doppler & Environment Setup\n- SSH into the VPS\n- How to Work with Atlas\n- Dispatching Your First Task\n\n*Audience:* Partners, developers  \n*Authors:* Quinn + Atlas — kept current as part of task completion contracts  \n\n---\n\n**⑦ Reference**\n- Topic Map (HCS topic IDs)\n- Wire Schemas (brief, claim, complete, blocked, inbox)\n- Agent Definitions\n- Supabase Tables\n- API Endpoints\n- Environment Variables\n- Systemd Units\n- Changelog\n\n*Audience:* Developers  \n*Authors:* Auto-generated where possible; Quinn and Vikram maintain  \n\n---"
        },
        {
          "title": "Homepage",
          "level": 2,
          "body": "Three-zone layout:\n\n**Nav:** Bezel logo (inverted for dark bg) + \"Docs\" label | Concepts · Agents · Reference · bezeliq.ai ↗\n\n**Hero:**\n- Tagline: *\"The operating system for AI-native businesses.\"*\n- One-paragraph platform description\n- Three audience entry cards: Partner (\"New to Bezel?\") · Developer (\"Ready to build?\") · Evaluating (\"How does it work?\")\n\n**Section strip:** Four preview tiles — Vision / Concepts / The Team / Reference\n\n**Footer:** Bezel logo (muted) · \"Built on Hedera · Maintained by the team that built it\" · \"Last updated by [agent] · [date]\"\n\n---"
        },
        {
          "title": "Agent Contribution Model",
          "level": 2,
          "body": "Agents contribute to docs as part of normal task completion. The contribution workflow:\n\n1. A `docs_update` step is added to relevant task templates in `definitions/workflows/`\n2. When an agent ships a feature (Quinn, Vikram, etc.), they write or update the relevant `.md` page in `bezel-docs/src/content/docs/`\n3. The agent commits and opens a PR to the `bezel-docs` repo\n4. Atlas reviews the PR — checks accuracy, consistency, voice\n5. Justin approves via exec gate before merge\n6. Cloudflare Pages auto-deploys on merge to main\n\nAgent pages (in The Agent Team section) are seeded from `definitions/cards/*.json` and each agent writes their own narrative page as a one-time task at site launch.\n\nThe Getting Started section is explicitly owned by Quinn and Atlas — updated whenever the setup process changes.\n\n---"
        },
        {
          "title": "Repo Structure",
          "level": 2,
          "body": "```\nbezel-docs/\n  astro.config.mjs\n  src/\n    content/\n      docs/\n        what-is-bezel/\n          index.md\n          two-world-model.md\n          consensus.md\n          agent-economy.md\n        core-concepts/\n          pull-model.md\n          hcs-consensus.md\n          roles-topics.md\n          wire-protocol.md\n          artifacts-vs-views.md\n        agent-team/\n          index.md\n          atlas.md\n          engine.md\n          quinn.md\n          ... (one page per agent)\n        how-work-flows/\n          task-lifecycle.md\n          engine-dependency-graph.md\n          exec-gates.md\n          completion-verification.md\n          circuit-breakers.md\n        studio/\n          cockpit.md\n          inbox.md\n          marketing-studio.md\n          atlas-interactive.md\n        getting-started/\n          claude-code.md\n          doppler-setup.md\n          vps-ssh.md\n          atlas.md\n          first-task.md\n        reference/\n          topic-map.md\n          wire-schemas.md\n          agent-definitions.md\n          supabase-tables.md\n          api-endpoints.md\n          env-vars.md\n          systemd-units.md\n          changelog.md\n    assets/\n      bezel-logo.png\n      bezel-logo-white.png\n  public/\n  package.json\n```\n\n---"
        },
        {
          "title": "Deployment",
          "level": 2,
          "body": "- GitHub repo: `justinb2bea/bezel-docs`\n- Cloudflare Pages project: `bezel-docs`\n- Custom domain: `docs.bezeliq.ai` (CNAME to Cloudflare Pages)\n- Auto-deploy on push to `main`\n- PRs trigger preview deployments (Cloudflare Pages built-in)\n\n---"
        },
        {
          "title": "Launch Checklist",
          "level": 2,
          "body": "- [ ] Create `bezel-docs` repo\n- [ ] Scaffold Astro Starlight with custom dark theme\n- [ ] Wire Cloudflare Pages + custom domain\n- [ ] Seed agent team pages from `definitions/cards/*.json`\n- [ ] Write \"What is Bezel\" section (Justin + Atlas)\n- [ ] Write \"Core Concepts\" section (Atlas)\n- [ ] Write \"Getting Started\" section (Quinn)\n- [ ] Add `docs_update` step to developer workflow templates\n- [ ] Add `bezeliq_docs_update` milestone step to platform workflows\n- [ ] Atlas review pass before public launch"
        }
      ],
      "html_path": "artifacts/2026-04-29-bezel-docs-site-design-2d3d53eba8.html",
      "json_path": "artifacts/2026-04-29-bezel-docs-site-design-2d3d53eba8.json"
    },
    {
      "id": "2026-04-28-sdd-artifact-templates-43f185f9fa",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-28-sdd-artifact-templates.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.692Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "SDD Artifact Templates — Spec-Driven Development",
      "summary": "SDD Artifact Templates — Spec Driven Development Version: 1.1 Date: 2026 04 28 Status: Approved These four templates define the machine readable artifact chain for every project built on the RedKey platform. Agents consume these artifacts. Studio renders them for humans. The goal: eliminate interpretation at execution time. v1.1 change: INTENT.md → INTENT.js...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "SDD Artifact Templates — Spec-Driven Development",
          "level": 1,
          "body": "**Version:** 1.1\n**Date:** 2026-04-28\n**Status:** Approved\n\nThese four templates define the machine-readable artifact chain for every project built on the RedKey platform. Agents consume these artifacts. Studio renders them for humans. The goal: eliminate interpretation at execution time.\n\n**v1.1 change:** INTENT.md → INTENT.json, SPEC.md → SPEC.json. Prose content moves to string values inside JSON objects. Studio renders human views from these artifacts — agents never produce human-readable markdown as a primary artifact.\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Every project produces four artifacts before any agent writes a line of code:\n\n| Artifact | Granularity | Format | Author | Consumer |\n|---|---|---|---|---|\n| `INTENT.json` | One per project | JSON | Justin / Discovery Agent | All agents (via Priya extraction) |\n| `BLUEPRINT.json` | One per project (or `blueprint/` dir for large) | JSON | Vikram | Priya (brief extraction) |\n| `SPEC.json` | One per phase | JSON | Priya | Priya (brief extraction), Mindy (validation) |\n| `POLICY.json` | One per project | JSON | Justin / Vikram | Injected into every task brief, Mindy enforcement |"
        },
        {
          "title": "The Chain",
          "level": 3,
          "body": "```\nINTENT.json + BLUEPRINT.json + POLICY.json\n          ↓\n     Priya reads all three (field extraction, not markdown parsing)\n          ↓\n     Writes SPEC.json per phase (structured scenarios, completion contracts)\n          ↓\n     Extracts relevant fields → assembles each task brief\n          ↓\n     Quinn executes brief → Mindy validates against completion contract + POLICY\n```"
        },
        {
          "title": "Key Principle",
          "level": 3,
          "body": "**Quinn never fetches documents. The brief is his document.** It is self-contained. Priya extracts the relevant SPEC scenario block, the relevant BLUEPRINT schema section, and the full POLICY into every brief. The upstream artifacts exist for Priya to read — not for Quinn.\n\n**Studio renders human views from these artifacts on demand.** Justin never reads raw JSON directly. Studio translates INTENT.json into a readable summary, SPEC.json into a reviewable behavior contract, BLUEPRINT.json into a schema diagram or table. The JSON is the source of truth; Studio is the reading layer.\n\n---"
        },
        {
          "title": "Template 1 — INTENT.json",
          "level": 2,
          "body": "**Location:** `docs/specs/INTENT.json`\n**One per project. All agents read this before doing anything.**\n\n```json\n{\n  \"version\": \"1\",\n  \"project_id\": \"\",\n  \"updated_at\": \"\",\n  \"project_name\": \"\",\n  \"problem\": \"One paragraph. What is broken or missing? Why does this matter now? Be specific — name the pain, not the category.\",\n  \"goal\": \"One sentence. What does done look like from the outside? Must be testable. 'Users can do X' not 'we improve X'.\",\n  \"users\": [\n    {\n      \"type\": \"\",\n      \"description\": \"Who they are and what they are trying to accomplish.\",\n      \"success\": \"What success looks like for this user type.\"\n    }\n  ],\n  \"ux_philosophy\": {\n    \"feel\": \"How should this feel to use? What emotional response does it target?\",\n    \"non_negotiable_patterns\": [\n      \"Interaction pattern that must always be present\"\n    ],\n    \"explicitly_avoid\": [\n      \"Interaction pattern or feeling to never reproduce\"\n    ]\n  },\n  \"brand_voice\": {\n    \"tone\": [\"adjective\", \"adjective\"],\n    \"language_rules\": [\"what words or phrases are on-brand\"],\n    \"off_brand\": [\"what to explicitly avoid\"]\n  },\n  \"non_negotiables\": [\n    \"Testable constraint — not a vague value, a specific thing that cannot be compromised.\"\n  ],\n  \"what_wrong_looks_like\": [\n    \"Specific failure mode — concrete enough that an agent can self-check before submitting output.\"\n  ],\n  \"success_metrics\": [\n    { \"metric\": \"\", \"target\": \"\" }\n  ],\n  \"scope_boundary\": {\n    \"in_v1\": [\"What is explicitly in scope for this version\"],\n    \"out_v1\": [\"What is explicitly out of scope — things someone would assume are included\"]\n  }\n}\n```"
        },
        {
          "title": "Rules",
          "level": 3,
          "body": "- Must be written before Design stage begins\n- First draft by Justin at intake; Discovery Agent produces future versions from intake transcripts\n- Every field must have a real value — no empty strings, no placeholder text\n- `non_negotiables` entries must be testable — not vague values\n- `what_wrong_looks_like` entries must be concrete enough for an agent to self-check\n- Studio renders this as a human-readable summary for exec approval — Justin approves the rendered view, not the raw JSON\n\n---"
        },
        {
          "title": "Template 2 — BLUEPRINT.json",
          "level": 2,
          "body": "**Location:** `docs/specs/BLUEPRINT.json` (or `docs/specs/blueprint/` for large projects)\n**One per project. Priya extracts the relevant section into each task brief.**\n\n```json\n{\n  \"version\": \"1\",\n  \"project_id\": \"\",\n  \"updated_at\": \"\",\n  \"stack\": {\n    \"frontend\": \"\",\n    \"backend\": \"\",\n    \"database\": \"\",\n    \"hosting\": \"\",\n    \"external_services\": [\n      { \"name\": \"\", \"purpose\": \"\", \"auth\": \"\" }\n    ]\n  },\n  \"schema\": {\n    \"tables\": [\n      {\n        \"name\": \"\",\n        \"description\": \"\",\n        \"columns\": [\n          {\n            \"name\": \"\",\n            \"type\": \"\",\n            \"nullable\": true,\n            \"default\": null,\n            \"fk\": null,\n            \"description\": \"\"\n          }\n        ],\n        \"indexes\": [\n          { \"columns\": [], \"unique\": false }\n        ],\n        \"rls\": \"\"\n      }\n    ]\n  },\n  \"api\": {\n    \"base_url\": \"\",\n    \"auth\": \"\",\n    \"endpoints\": [\n      {\n        \"method\": \"\",\n        \"path\": \"\",\n        \"description\": \"\",\n        \"auth_required\": true,\n        \"request\": {\n          \"params\": {},\n          \"body\": {}\n        },\n        \"response\": {\n          \"200\": {},\n          \"errors\": [\n            { \"status\": 0, \"condition\": \"\", \"body\": {} }\n          ]\n        }\n      }\n    ]\n  },\n  \"services\": {\n    \"dependencies\": [\n      { \"name\": \"\", \"version\": \"\", \"purpose\": \"\" }\n    ],\n    \"env_vars\": [\n      { \"name\": \"\", \"required\": true, \"description\": \"\", \"example\": \"\" }\n    ]\n  }\n}\n```"
        },
        {
          "title": "Large Project Split",
          "level": 3,
          "body": "For projects with 15+ tables or 30+ endpoints, split into:\n\n```\ndocs/specs/blueprint/\n  schema.json      ← tables, columns, indexes, RLS\n  api.json         ← endpoints with full request/response shapes\n  services.json    ← dependencies, env vars, external services\n```"
        },
        {
          "title": "Rules",
          "level": 3,
          "body": "- Vikram authors this alongside his prose architecture doc (same knowledge, structured output)\n- Every column must have a `description` — not optional\n- All `fk` values must reference `table.column` format: `\"users.id\"`\n- No placeholder values — if unknown, mark the field `\"TBD\"` and add to open questions\n- Must be updated whenever schema changes — not optional\n\n---"
        },
        {
          "title": "Template 3 — SPEC.json (per phase)",
          "level": 2,
          "body": "**Location:** `docs/specs/phases/NN-[phase-name]-spec.json`\n**One per phase. Priya extracts the relevant feature object into each task brief.**\n\n```json\n{\n  \"version\": \"1\",\n  \"project_id\": \"\",\n  \"phase\": {\n    \"id\": \"phase-N\",\n    \"name\": \"\",\n    \"status\": \"draft | approved | complete\",\n    \"depends_on\": []\n  },\n  \"features\": [\n    {\n      \"id\": \"FEAT-N.N\",\n      \"name\": \"\",\n      \"scope\": \"What this feature covers. One sentence. What it explicitly does not cover.\",\n      \"scenarios\": [\n        {\n          \"name\": \"\",\n          \"given\": \"Precondition — system state before action\",\n          \"when\": \"Action — what the user or system does\",\n          \"then\": \"Outcome — what must be true after\"\n        }\n      ],\n      \"error_states\": [\n        { \"condition\": \"\", \"response\": \"Exact response — message, status code, system behavior\" }\n      ],\n      \"edge_cases\": [\n        { \"case\": \"\", \"expected\": \"Exact expected behavior\" }\n      ],\n      \"out_of_scope\": [\n        \"Thing that seems related but is not in this feature\"\n      ],\n      \"completion_contract\": {\n        \"type\": \"file | signal | none\",\n        \"criteria\": [\n          \"Binary check derived from a 'then' clause above\"\n        ]\n      }\n    }\n  ],\n  \"cross_feature_constraints\": [\n    \"Rule that applies across multiple features in this phase\"\n  ],\n  \"open_questions\": [\n    { \"id\": 1, \"question\": \"\", \"owner\": \"\", \"due\": \"\" }\n  ]\n}\n```"
        },
        {
          "title": "Rules",
          "level": 3,
          "body": "- One file per phase — not one per project, not one per feature\n- Feature IDs use dot notation: FEAT-1.1, FEAT-1.2, FEAT-2.1\n- Every scenario must have `given`, `when`, and `then` — no partial scenarios\n- Every feature must have `out_of_scope` — prevents Quinn from over-building\n- Every feature must have a `completion_contract` — this becomes Mindy's validation checklist\n- `open_questions` array must be empty before spec is used — non-empty means spec is not done\n- Priya reads this file and extracts the relevant feature object into each task brief by `id`\n\n---"
        },
        {
          "title": "Template 4 — POLICY.json",
          "level": 2,
          "body": "**Location:** `docs/specs/POLICY.json`\n**One per project. Injected in full into every task brief. Mindy checks every output against it.**\n\n```json\n{\n  \"version\": \"1\",\n  \"project_id\": \"\",\n  \"updated_at\": \"\",\n  \"rules\": [\n    {\n      \"id\": \"\",\n      \"category\": \"typography | security | performance | patterns | dependencies | accessibility\",\n      \"severity\": \"hard | warn\",\n      \"description\": \"Human-readable description of the rule\",\n      \"check\": \"Shell command or grep pattern Mindy can run to verify\",\n      \"applies_to\": \"all | frontend | backend | sql | config\",\n      \"rationale\": \"Why this rule exists\"\n    }\n  ]\n}\n```"
        },
        {
          "title": "Example Rules",
          "level": 3,
          "body": "```json\n{\n  \"rules\": [\n    {\n      \"id\": \"no-google-fonts\",\n      \"category\": \"security\",\n      \"severity\": \"hard\",\n      \"description\": \"No external font CDN references — all fonts must be self-hosted\",\n      \"check\": \"grep -r 'fonts.googleapis.com' {output_dir}/\",\n      \"applies_to\": \"frontend\",\n      \"rationale\": \"Privacy, performance, and offline reliability\"\n    },\n    {\n      \"id\": \"font-primary\",\n      \"category\": \"typography\",\n      \"severity\": \"hard\",\n      \"description\": \"Body text must use DM Sans, not any other sans-serif\",\n      \"check\": \"grep -r 'font-family' {output_dir}/css/ | grep -v 'DM Sans'\",\n      \"applies_to\": \"frontend\",\n      \"rationale\": \"Design system consistency\"\n    },\n    {\n      \"id\": \"no-raw-sql-in-app\",\n      \"category\": \"security\",\n      \"severity\": \"hard\",\n      \"description\": \"Application code must not contain raw SQL strings — use parameterized queries or ORM\",\n      \"check\": \"grep -r 'SELECT\\\\|INSERT\\\\|UPDATE\\\\|DELETE' {output_dir}/src/ --include='*.js'\",\n      \"applies_to\": \"backend\",\n      \"rationale\": \"SQL injection prevention\"\n    },\n    {\n      \"id\": \"env-vars-documented\",\n      \"category\": \"patterns\",\n      \"severity\": \"hard\",\n      \"description\": \"Every env var used in code must appear in BLUEPRINT.json services.env_vars\",\n      \"check\": \"manual — Mindy cross-references code against BLUEPRINT.json\",\n      \"applies_to\": \"all\",\n      \"rationale\": \"Deployment reliability — no surprise missing vars\"\n    }\n  ]\n}\n```"
        },
        {
          "title": "Severity Levels",
          "level": 3,
          "body": "| Severity | Meaning | Mindy action |\n|---|---|---|\n| `hard` | Output fails if rule is violated | Post task.blocked, create correction task |\n| `warn` | Flag for Justin's review but do not block | Note in phase health report |"
        },
        {
          "title": "Rules",
          "level": 3,
          "body": "- POLICY.json is project-specific but rules can be copied from a library\n- The `check` field must be a runnable shell command where possible — not a vague description\n- `{output_dir}` is a placeholder Mindy replaces with the actual output path\n- Hard rules are enforced before Mindy calls `mark_task_validated`\n- Warn rules are summarized in the phase health report to Justin\n- Add rules incrementally — start with the 3-5 non-negotiables, add more as patterns emerge\n\n---"
        },
        {
          "title": "How Priya Uses These Templates",
          "level": 2,
          "body": "When Priya writes a task brief for Quinn, she assembles it from four extractions:\n\n```json\n{\n  \"environment\": \"[auto-injected by dispatch.js]\",\n  \"context\": {\n    \"intent_ref\": \"docs/specs/INTENT.json\",\n    \"ux_philosophy\": \"[intent.ux_philosophy.feel — 2-3 sentences]\",\n    \"non_negotiables\": \"[intent.non_negotiables — full array]\"\n  },\n  \"what_to_build\": \"[full feature object from SPEC.json where id = FEAT-N.N]\",\n  \"schema\": \"[only tables/columns from BLUEPRINT.json that this task touches]\",\n  \"constraints\": \"[full POLICY.json rules where applies_to = 'all' or matches task domain]\",\n  \"output\": {\n    \"output_path\": \"[from PLAN.json]\",\n    \"completion\": \"[feature.completion_contract from SPEC.json]\"\n  }\n}\n```\n\nQuinn reads this brief. He does not read INTENT.json, BLUEPRINT.json, SPEC.json, or POLICY.json directly. The brief is self-contained.\n\n---"
        },
        {
          "title": "File Structure",
          "level": 2,
          "body": "```\ndocs/specs/\n  INTENT.json\n  BLUEPRINT.json          ← or blueprint/ for large projects\n  POLICY.json\n  phases/\n    01-[name]-spec.json\n    02-[name]-spec.json\n    ...\n```\n\n---"
        },
        {
          "title": "Validation Checklist (before Build starts)",
          "level": 2,
          "body": "Before any task is dispatched to Quinn, verify:\n\n- [ ] INTENT.json: all fields populated, no empty strings, non_negotiables are testable\n- [ ] BLUEPRINT.json: every column has a description, no TBD values in schema\n- [ ] SPEC.json (phase): open_questions array is empty, every feature has a completion_contract\n- [ ] POLICY.json: every hard rule has a runnable check command\n- [ ] Justin has reviewed and approved all four artifacts at exec gate (via Studio rendered views)"
        }
      ],
      "html_path": "artifacts/2026-04-28-sdd-artifact-templates-43f185f9fa.html",
      "json_path": "artifacts/2026-04-28-sdd-artifact-templates-43f185f9fa.json"
    },
    {
      "id": "2026-04-28-ops-studio-33a22db493",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-28-ops-studio.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.691Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Ops Studio — Design Spec",
      "summary": "Ops Studio — Design Spec Date: 2026 04 28 Status: Approved — pending implementation Replaces: cockpit/index.html (renamed and rebuilt in place) URL: https://cockpit.bezeliq.ai (unchanged) What It Is Ops Studio is the live operations dashboard for the BezelIQ/RedKey platform. It is the single screen that shows Justin (and eventually clients) everything happen...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Ops Studio — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-28\n**Status:** Approved — pending implementation\n**Replaces:** `cockpit/index.html` (renamed and rebuilt in-place)\n**URL:** `https://cockpit.bezeliq.ai` (unchanged)\n\n---"
        },
        {
          "title": "What It Is",
          "level": 2,
          "body": "Ops Studio is the live operations dashboard for the BezelIQ/RedKey platform. It is the single screen that shows Justin (and eventually clients) everything happening in the agent fleet — who is working, what it costs, what just happened, and what is stuck. It is designed to be left open on a second monitor and to impress anyone who sees it.\n\nThe design principles:\n1. **Radical transparency** — cost, time, Anthropic spend, Hedera proof — nothing hidden\n2. **Mission-control aesthetic** — dark, precise, alive. Agents pulse when working.\n3. **Action-first** — blocked items and exec gates surface immediately, not buried\n4. **Real numbers** — every task has a dollar amount. The platform has a P&L.\n\n---"
        },
        {
          "title": "Layout",
          "level": 2,
          "body": "Three-panel shell:\n\n```\n┌──────────────────────────────────────────────────────────────────┐\n│  BezelIQ · Ops Studio          [Fleet | Workflows | Health]   ✉  │\n├────────────────────────────────────────────┬─────────────────────┤\n│                                            │                     │\n│             MAIN PANEL                     │    LIVE FEED        │\n│         (tab-switched)                     │    (always visible) │\n│                                            │                     │\n└────────────────────────────────────────────┴─────────────────────┘\n```\n\n- **Nav bar** — brand + 3 tab buttons (Fleet / Workflows / Health) + inbox badge + live indicator\n- **Main panel** — 75% width, tab-switched between Fleet, Workflows, Health\n- **Live feed** — 25% width, always visible regardless of active tab, real-time event stream\n- Default tab on load: **Fleet**\n\n---"
        },
        {
          "title": "Tab 1 — Agent Fleet",
          "level": 2,
          "body": "The hero view. Every agent as a card, grouped by department."
        },
        {
          "title": "Department groups (in order)",
          "level": 3,
          "body": "`exec` · `ops` · `platform` · `dev` · `design` · `qa` · `crm` · `sales` · `marketing`"
        },
        {
          "title": "Agent Card",
          "level": 3,
          "body": "```\n┌─────────────────────────┐\n│  [avatar]  ● working    │  ← 40px avatar, status orb top-right\n│                         │\n│  Quinn                  │  ← name, 16px semibold\n│  developer              │  ← role, 11px muted mono\n│                         │\n│  $47.20    143 tasks    │  ← equal weight, 20px, side by side\n│                         │\n│  auth middleware refac… │  ← current task title, 11px mono, truncated\n└─────────────────────────┘\n```\n\n**Status orb states:**\n- `working` — green, pulsing animation (`db-pulse`)\n- `idle` — gray, no animation\n- `blocked` — red, card border glows red, reason shown below task title\n\n**Hover state:** reveals `last action` + time ago (e.g. \"completed task 0.0.88 · 4m ago\")\n\n**Click → Agent Detail Drawer** (slides in from right):\n- Full-width avatar header + name + department + model\n- Lifetime stats: total tasks, total cost, avg cost/task, avg duration, first task date\n- Last 20 task events (claim → complete/blocked, with cost, duration, HashScan link)\n- Actions: [Pause daemon] [Resume daemon] [Dispatch task…]\n- Current task detail if working: full brief title + task_id + HashScan link + elapsed time\n\n**Blocked card:**\n- Red border glow\n- `blocker_type` shown as badge (spec_gap / tool_failure / ambiguity etc.)\n- [Unblock] button visible on card — posts `task.available` back to role topic"
        },
        {
          "title": "Cost display",
          "level": 3,
          "body": "Costs come from `agent_tasks.cost_usd` (sum per agent). Two time windows shown on card:\n- This month (default)\n- Toggle to: this week / all time (toggle control above fleet grid)"
        },
        {
          "title": "Avatar images",
          "level": 3,
          "body": "Agent avatars are stored on Cloudflare Images. The URL is stored in `agent_definitions.avatar_url`. All 19 active agents need a generated avatar in a consistent style:\n- AI-generated professional headshots\n- Consistent lighting and framing across all agents\n- Stored at Cloudflare Images, referenced by URL\n- `agent_definitions` table: add `avatar_url text` column\n- Fallback: initials avatar (first letter of name, colored by department) if `avatar_url` is null\n\n---"
        },
        {
          "title": "Live Feed (right rail — always visible)",
          "level": 2,
          "body": "Real-time event stream. Newest at top. Auto-scrolls; pauses on hover."
        },
        {
          "title": "Event types",
          "level": 3,
          "body": "| Event | Indicator | Format |\n|---|---|---|\n| `task.claim` | `●` amber | `Quinn · claimed · 0.0.8807878` |\n| `task.complete` | `✓` green | `Priya · complete · $0.31 · 4m · 0.0.8807879` |\n| `task.blocked` | `✕` red | `Harper · blocked · spec_gap` |\n| `phase.complete` | `◆` green | `Phase 2 complete · 4/4 tasks` |\n| `exec.gate` | `⚑` amber | `Exec gate waiting · 0.0.8807880` |\n\nEach event row:\n- Click → jumps to task in Workflows tab (or opens exec gate in inbox drawer)\n- `task.complete` and `task.blocked` events show HashScan link (testnet icon `↗`)\n- Running cost total at top of feed: **Platform today: $4.82** (updates live)"
        },
        {
          "title": "Feed data source",
          "level": 3,
          "body": "Supabase realtime on `cluster_events` + `agent_tasks` + `agent_state` tables. Same subscription pattern as existing cockpit realtime setup.\n\n---"
        },
        {
          "title": "Tab 2 — Workflows",
          "level": 2,
          "body": "Existing project/stage/phase/task tree, restyled to match Ops Studio aesthetic. No structural changes to the data model.\n\nAdditions over current cockpit:\n- Active tasks show elapsed time + claimed_by agent avatar (16px inline)\n- Task cost shown on complete rows (`$0.31`)\n- Blocked tasks show blocker_type badge + [Unblock] action\n- Phase cards show cost subtotal (`$4.20 · 12 tasks`)\n- HashScan link on every task row (already exists, keep it)\n\n---"
        },
        {
          "title": "Six headline numbers (top row)",
          "level": 3,
          "body": "| Metric | Source |\n|---|---|\n| Tasks completed today | `agent_tasks` where `updated_at >= today` and `status = complete` |\n| Cost today | Sum of `cost_usd` where `updated_at >= today` |\n| Block rate (7d) | blocked tasks / total tasks, last 7 days |\n| Avg task cost (7d) | avg `cost_usd` last 7 days |\n| Avg task duration (7d) | avg `duration_seconds` last 7 days |\n| Queue depth | `agent_tasks` where `status = available` |"
        },
        {
          "title": "Four charts",
          "level": 3,
          "body": "**1. Cost over time — stacked area by agent**\n- X: last 30 days (daily buckets)\n- Y: cost USD\n- Each agent is a color band\n- Hover: tooltip with per-agent breakdown for that day\n- Data: group `agent_tasks` by `claimed_by` + date bucket\n\n**2. Throughput by role — bar chart**\n- X: role slugs (developer, reviewer, ba, etc.)\n- Y: tasks completed last 7 days\n- Color: same role colors as status badges\n\n**3. Block rate trend — line chart**\n- X: last 14 days\n- Y: % of tasks blocked that day\n- Single line, red fill below\n- Annotation line at 10% (target threshold)\n\n**4. Agent utilization heatmap**\n- X: hour of day (0–23)\n- Y: agent name\n- Color intensity: tasks completed in that hour over last 14 days\n- Shows: when the platform is most active, which agents work hardest at what time"
        },
        {
          "title": "Chart library",
          "level": 3,
          "body": "Use **Chart.js** (CDN, same pattern as existing Supabase CDN import). No build step. Dark theme colors from `dreamborn.css` CSS variables.\n\n---"
        },
        {
          "title": "From Agent Card Detail Drawer",
          "level": 3,
          "body": "| Action | Mechanism |\n|---|---|\n| Pause daemon | POST to VPS API `PUT /agents/:slug/pause` → writes flag to `agent_state` |\n| Resume daemon | POST to VPS API `PUT /agents/:slug/resume` |\n| Dispatch task | Form: role + goal + context → calls `dispatchTask()` via HCS post API |"
        },
        {
          "title": "From Workflows tab (task row context)",
          "level": 3,
          "body": "| Action | Mechanism |\n|---|---|\n| Cancel task | POST `task.cancelled` to task HCS topic via `HCS_POST_URL` |\n| Unblock task | POST `task.available` to role topic via `HCS_POST_URL` |"
        },
        {
          "title": "Exec Gate (inbox drawer — unchanged)",
          "level": 3,
          "body": "Approve and Block actions remain in the inbox drawer exactly as built. Exec gate events in the Live Feed are clickable and open the inbox drawer directly to that item.\n\n---"
        }
      ],
      "html_path": "artifacts/2026-04-28-ops-studio-33a22db493.html",
      "json_path": "artifacts/2026-04-28-ops-studio-33a22db493.json"
    },
    {
      "id": "2026-04-28-marketing-studio-design-cc8da59f3b",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-28-marketing-studio-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.689Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Marketing Studio — Design Spec",
      "summary": "Marketing Studio — Design Spec Date: 2026 04 28 Status: Approved — ready for implementation planning Branch: feature/marketing agents Client: DreamBorn Problem The marketing operation exists — Nova plans, Harper writes, Jade posts, Rosa designs — but there's no place to actually work. Content lives in Google Drive folders. Justin's \"approval\" is an exec gate...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Marketing Studio — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-28\n**Status:** Approved — ready for implementation planning\n**Branch:** feature/marketing-agents\n**Client:** DreamBorn\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "The marketing operation exists — Nova plans, Harper writes, Jade posts, Rosa designs — but there's no place to actually work. Content lives in Google Drive folders. Justin's \"approval\" is an exec gate that shows up in an inbox. Pieces that go to his personal LinkedIn and X need his voice on them, not just his sign-off, but the workflow doesn't give him a workspace — it gives him a file to read and a button to click. The loop between what agents produce and what Justin actually wants to publish is broken because there's no studio — no place where strategy gets set, themes get shaped, drafts get edited, and the full week's content pipeline is visible and in-motion at once.\n\n---"
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "Justin operates as a creative director — not a content approver. He sets themes, shapes angles, finishes the voice on pieces that carry his name, and the agents handle everything else at volume. The Studio surfaces ideas, produces drafts, generates images, and publishes automatically. Justin's time in it is judgment and taste, not production. The output is an enormous, always-on content operation across every channel that sounds like him because he was actually involved — not because an agent guessed.\n\n---"
        },
        {
          "title": "Non-Negotiables",
          "level": 2,
          "body": "- Every piece on Justin's personal channels (LinkedIn, X) has his voice on it before it publishes — no exceptions\n- The Studio is the only place Justin does marketing work — no Drive, no inbox, no other tool\n- Agent-to-agent communication is machine-readable JSON — no prose workflow documents between agents\n- Approved content publishes automatically — zero manual posting steps after approval\n- Volume never excuses generic output — the system produces at scale without sounding like a bot\n\n---"
        },
        {
          "title": "What Wrong Looks Like",
          "level": 2,
          "body": "- Justin clicking Approve without editing — just clearing a queue\n- Content that opens with \"AI is transforming industries…\" or any generic AI take\n- A piece going out on Justin's LinkedIn that doesn't sound like Justin\n- Nova proposing themes Justin would never use\n- Content stuck in a queue because something broke and nobody noticed\n- Justin going anywhere other than the Studio to do marketing work\n\n---"
        },
        {
          "title": "Success Metrics",
          "level": 2,
          "body": "- 14+ pieces published per week across all 5 channels, consistently\n- Justin's active time in the Studio under 2 hours/week\n- 100% of approved content auto-publishes with no manual steps\n- Zero weeks where a channel goes dark due to pipeline failure\n\n---"
        },
        {
          "title": "Architecture Overview",
          "level": 2,
          "body": "Three interconnected systems:\n\n```\nBezelBrain               Content Intelligence Layer        Studio\n(idea + thinking)   +   (evidence + voice + visual)  →   (the workspace)\n      ↓                           ↓                              ↓\nNova retrieves              Rosa retrieves                Justin directs,\nconcepts before             visuals by concept            edits, approves,\nplanning                    before generating             publishes\n```\n\n---"
        },
        {
          "title": "System 1 — Content Intelligence Layer",
          "level": 2,
          "body": "A unified semantic library. One table, six asset types, one retrieval model. Every asset is stored with a concept embedding (pgvector, `text-embedding-3-small`, 1536-dim) — same infrastructure as `agent_memory` and BezelBrain."
        },
        {
          "title": "Asset Types",
          "level": 3,
          "body": "| Type | Description | Who adds | Who reads |\n|---|---|---|---|\n| `thinking` | Ideas, observations, architecture insights | Justin via BezelBrain | Nova |\n| `evidence` | Stats, data points, research — with source + date + context | Justin via Studio quick-capture | Harper, Jade |\n| `voice` | Justin's own quotes and phrases worth keeping | Justin via Studio | Harper, Jade |\n| `social_proof` | Customer testimonials, outcomes, stories | Justin via Studio | Harper, Jade |\n| `visual` | AI-generated backgrounds, brand elements, Rosa's outputs | Rosa (auto) | Rosa |\n| `published` | Every published piece with engagement data | Ivy (auto) | Nova, Harper |"
        },
        {
          "title": "Schema: `cil_assets` table",
          "level": 3,
          "body": "```sql\nid              uuid primary key\nclient_id       text                        -- 'dreamborn'\ntype            text                        -- thinking | evidence | voice | social_proof | visual | published\nconcept         text                        -- human-readable description of what this is\nembedding       vector(1536)                -- pgvector — semantic search index\ncontent         text                        -- the asset content (stat text, quote, testimonial, etc.)\nmetadata        jsonb                       -- type-specific fields (see below)\nsource          text                        -- URL, person name, event, etc.\nsource_date     date                        -- when the stat/quote was originally from\ntags            text[]\nused_count      int default 0               -- how many times retrieved + used\nlast_used_at    timestamptz\ncreated_by      text                        -- 'justin' | agent slug\ncreated_at      timestamptz default now()\n```"
        },
        {
          "title": "Type-specific metadata",
          "level": 3,
          "body": "```json\n// evidence\n{ \"source_name\": \"Gartner\", \"source_url\": \"...\", \"verified\": true }\n\n// voice\n{ \"context\": \"June workshop\", \"platform\": \"spoken | written\" }\n\n// social_proof\n{ \"company\": \"Acme Co\", \"person\": \"John Smith\", \"role\": \"VP Supply Chain\", \"outcome\": \"...\" }\n\n// visual\n{ \"generation_prompt\": \"...\", \"model\": \"gemini-imagen-3 | higgsfield\", \"dimensions\": \"1200x630\", \"piece_id\": \"...\" }\n\n// published\n{ \"channel\": \"linkedin\", \"published_url\": \"...\", \"piece_id\": \"...\", \"engagement\": {} }\n```"
        },
        {
          "title": "Quick Capture (Studio UI)",
          "level": 3,
          "body": "Justin pastes a stat, quote, or testimonial into the Studio capture panel. Studio:\n1. Auto-detects type (evidence / voice / social_proof) based on content pattern\n2. Extracts source, date, attribution where present\n3. Embeds via OpenAI → stores in `cil_assets`\n4. Available to all agents in next run"
        },
        {
          "title": "Retrieval (agents)",
          "level": 3,
          "body": "```python"
        },
        {
          "title": "Harper before writing — same pattern as retrieve_memories()",
          "level": 1,
          "body": "results = match_cil_assets(\n    query_embedding=embed(task_brief),\n    asset_types=[\"evidence\", \"voice\", \"social_proof\"],\n    client_id=\"dreamborn\",\n    limit=10\n)"
        },
        {
          "title": "Injected into brief as ## Content Intelligence section",
          "level": 1,
          "body": "```\n\n---"
        },
        {
          "title": "Principle",
          "level": 3,
          "body": "AI generates the visual concept. Code renders the brand layer. Justin edits text inline. Background is cached and reused across pieces.\n\n```\nNova writes image_concept in CAMPAIGN.json\n  \"The read receipt. Certainty. Permanence. Something verifiable.\"\n        ↓\nRosa checks cil_assets (type=visual) for semantic match first\n  → Match found? Reuse cached background. Skip generation.\n  → No match? Call Gemini Imagen / Higgsfield API with prompt\n        ↓\nAI generates background scene — unique per concept\nRosa stores result in cil_assets (type=visual) with concept embedding\n        ↓\nRosa composites brand layer on top\n  DreamBorn fonts (DM Sans / Fraunces / Bebas Neue)\n  Logo (docs/img/logos/dreamborn/...)\n  Text fields from CONTENT.json (title, hook, stat, byline)\n  HTML/CSS → Puppeteer → PNG\n        ↓\nStudio displays composed image\nJustin edits text fields inline → Puppeteer re-renders text layer only (<1 second)\nJustin wants new visual? → Rosa regenerates background only\n```"
        },
        {
          "title": "Two-Layer Architecture",
          "level": 3,
          "body": "| Layer | Source | Cost | Speed | Editable |\n|---|---|---|---|---|\n| Background | AI generation (Gemini / Higgsfield) | API credit per image | 3–8 seconds | Regenerate on request |\n| Brand + text | HTML/CSS → Puppeteer | Zero | <1 second | Inline, instant |"
        },
        {
          "title": "Inline Text Editing",
          "level": 3,
          "body": "Text displayed in the image (title, hook, stat, byline) is stored as fields in `CONTENT.json` — never baked into the AI background. Studio renders text fields as overlay. Justin clicks any text element in the image preview → editable input appears → types → Puppeteer re-composites text layer → updated image shown in under 1 second. Background never touched."
        }
      ],
      "html_path": "artifacts/2026-04-28-marketing-studio-design-cc8da59f3b.html",
      "json_path": "artifacts/2026-04-28-marketing-studio-design-cc8da59f3b.json"
    },
    {
      "id": "2026-04-28-agent-wire-protocol-702b45175e",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-28-agent-wire-protocol.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.688Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Agent Wire Protocol + Agent Card — Design Spec",
      "summary": "Agent Wire Protocol + Agent Card — Design Spec Date: 2026 04 28 Status: Approved — pending implementation Affects: All agent definitions, runner, dispatch scripts, inbox table, HCS message schemas Why The RedKey platform currently communicates between agents using prose: briefs are prose paragraphs, inbox messages are unstructured strings, and agent personas...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Agent Wire Protocol + Agent Card — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-28\n**Status:** Approved — pending implementation\n**Affects:** All agent definitions, runner, dispatch scripts, inbox table, HCS message schemas\n\n---"
        },
        {
          "title": "Why",
          "level": 2,
          "body": "The RedKey platform currently communicates between agents using prose: briefs are prose paragraphs, inbox messages are unstructured strings, and agent personas are large prose blobs. This works, but it has three compounding problems:\n\n1. **No contract.** A downstream agent receiving a prose brief has no guaranteed structure to parse. If the upstream agent omits a field, there is no validation — the gap surfaces at runtime as ambiguity or a blocked task.\n\n2. **No versioning.** A prose brief cannot be versioned. When the format changes, there is no migration path — old briefs and new expectations silently diverge.\n\n3. **Inefficiency.** Prose personas waste tokens on filler. An LLM parsing \"You should always make sure to...\" is doing work that a structured constraint list eliminates. Large persona blobs also mix identity with procedure — a step-by-step execution protocol (Mindy's 900-word persona) doesn't belong in an identity document.\n\n**Agent Wire** is the typed coordination protocol for all A2A communication on the RedKey platform. Every brief, inbox message, output signal, and blocked signal is a Wire message — defined schema, versioned, machine-readable.\n\n**Agent Card** is the typed identity document for every agent. Structured fields for identity, capabilities, constraints, escalation rules, and output contracts. Short prose is reserved for voice and working style only.\n\n---"
        },
        {
          "title": "Principles",
          "level": 3,
          "body": "1. **Every coordination message is a Wire.** Briefs, inbox messages, complete signals, blocked signals — all typed.\n2. **Envelope wraps payload.** Every Wire has a standard envelope. The payload schema varies by type.\n3. **Versioned.** Every Wire carries a `wire` version field. Consumers can reject unknown versions gracefully.\n4. **Prose lives at the edges.** The `context` field in a Brief Wire may contain prose background. Every other field is typed.\n5. **Lean messages.** Role topic messages stay under 1024 bytes (pointer only). Brief Wire lives in Supabase. HCS carries the envelope pointer, not the full payload."
        },
        {
          "title": "Wire Envelope",
          "level": 3,
          "body": "All Agent Wire messages share this envelope:\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"message_type\",\n  \"sender\": \"agent_slug | 'system' | 'human'\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {}\n}\n```\n\n| Field | Type | Description |\n|---|---|---|\n| `wire` | string | Protocol version. Current: `\"1.0\"` |\n| `type` | string | Message type (see below) |\n| `sender` | string | Agent slug, `\"system\"`, or `\"human\"` |\n| `ts` | ISO8601 | Creation timestamp |\n| `payload` | object | Type-specific payload |\n\n---"
        },
        {
          "title": "Message Type: `brief` — Task Brief",
          "level": 3,
          "body": "Replaces the current prose `agent_tasks.brief` field. Stored in Supabase. Role topic carries only the `task_id` pointer (unchanged).\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"brief\",\n  \"sender\": \"system\",\n  \"ts\": \"2026-04-28T00:00:00Z\",\n  \"payload\": {\n    \"goal\": \"One sentence: what must be true when this task is done.\",\n    \"context\": \"Background information. Prose allowed. Max 200 words.\",\n    \"constraints\": [\n      \"Specific constraint on this task instance\"\n    ],\n    \"acceptance_criteria\": [\n      \"Testable condition for completion\"\n    ],\n    \"output_contract\": {\n      \"type\": \"file | json | pr | message | report\",\n      \"schema_ref\": \"output_contract_slug | null\",\n      \"output_ref_required\": true,\n      \"min_length\": 0,\n      \"evaluate\": \"Semantic check description for Haiku eval, or null to skip\"\n    },\n    \"escalation_triggers\": [\n      \"Condition that should cause task.blocked\"\n    ],\n    \"env\": {\n      \"client_id\": \"bezeliq\",\n      \"task_id\": \"0.0.XXXXX\",\n      \"project_id\": \"0.0.XXXXX\",\n      \"repo_url\": null,\n      \"worktree_path\": null\n    }\n  }\n}\n```\n\n**Field rules:**\n\n| Field | Rule |\n|---|---|\n| `goal` | Required. One sentence. Declarative — \"X is built\" not \"Build X\". |\n| `context` | Optional. Prose allowed. 200 word cap. Background only — no instructions here. |\n| `constraints` | Task-level constraints only. Agent-level constraints live in the Agent Card. |\n| `acceptance_criteria` | Testable. No prose rationale. Each item is pass/fail. |\n| `output_contract.evaluate` | The string passed verbatim to Haiku eval. Null = mechanical check only. |\n| `escalation_triggers` | Conditions the agent should catch and use to trigger `task.blocked`. Prevents ambiguity at runtime. |\n\n---"
        },
        {
          "title": "Message Type: `inbox` — Agent-to-Agent Message",
          "level": 3,
          "body": "Replaces the current unstructured `inbox.payload` field. The outer inbox table row remains; `payload` becomes a Wire Message.\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"inbox\",\n  \"sender\": \"agent_slug | 'human'\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {\n    \"to_agent\": \"agent_slug\",\n    \"priority\": 1,\n    \"message_type\": \"task.feedback | status.update | task.blocked | exec.gate | question | info\",\n    \"ref_task_id\": \"0.0.XXXXX | null\",\n    \"subject\": \"string\",\n    \"body\": \"string\",\n    \"action_required\": true\n  }\n}\n```\n\n**Priority levels:**\n\n| Value | Meaning |\n|---|---|\n| `1` | Requires immediate attention — blocked task, exec gate |\n| `2` | Requires response before next task — question, feedback |\n| `3` | Informational — status update, FYI |\n\n**Message types:**\n\n| Type | Direction | Use |\n|---|---|---|\n| `task.feedback` | Vikram → Quinn | Review findings, numbered issues to address |\n| `status.update` | Mindy → any | Context change, project state shift |\n| `task.blocked` | Runner → Mindy + Justin | Task stuck, needs intervention |\n| `exec.gate` | Runner → Justin | Approval required before workflow advances |\n| `question` | Any → any | Specific question before proceeding (not a hard blocker) |\n| `info` | Any → any | Informational, no action required |\n\n---"
        },
        {
          "title": "Message Type: `complete` — Task Completion",
          "level": 3,
          "body": "Posted by the runner to the task's own HCS topic after successful verification.\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"complete\",\n  \"sender\": \"runner\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {\n    \"task_id\": \"0.0.XXXXX\",\n    \"agent\": \"agent_slug\",\n    \"output_ref\": \"supabase-storage-path\",\n    \"summary\": \"Max 150 words: what was built, what changed, output_ref location.\",\n    \"cost_usd\": 0.00,\n    \"duration_seconds\": 0,\n    \"verification\": {\n      \"mechanical\": \"pass | fail\",\n      \"semantic\": \"pass | fail | skipped\",\n      \"attempts\": 1\n    }\n  }\n}\n```\n\n---"
        },
        {
          "title": "Message Type: `blocked` — Task Blocked",
          "level": 3,
          "body": "Posted by the runner to the task's own HCS topic when verification fails or the agent posts `task.blocked`.\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"blocked\",\n  \"sender\": \"runner\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {\n    \"task_id\": \"0.0.XXXXX\",\n    \"agent\": \"agent_slug\",\n    \"reason\": \"Specific description of the blocker.\",\n    \"blocker_type\": \"spec_gap | dependency | tool_failure | ambiguity | resource | verification_fail\",\n    \"suggested_resolution\": \"string | null\",\n    \"attempts\": 1\n  }\n}\n```\n\n`blocker_type` enables Iris to route and categorize without parsing prose:\n- `spec_gap` → Priya (BA)\n- `tool_failure` → Atlas / infra\n- `ambiguity` → Mindy (PM)\n- `verification_fail` → Mindy (supervisor)\n- `dependency` → Engine (dep-graph check)\n\n---"
        },
        {
          "title": "Message Type: `claim` — Work Claim",
          "level": 3,
          "body": "Already partially structured on HCS. Adding Wire envelope for protocol consistency.\n\n```json\n{\n  \"wire\": \"1.0\",\n  \"type\": \"claim\",\n  \"sender\": \"agent_slug\",\n  \"ts\": \"ISO8601\",\n  \"payload\": {\n    \"task_id\": \"0.0.XXXXX\",\n    \"agent\": \"agent_slug\",\n    \"role\": \"role_slug\"\n  }\n}\n```\n\n---"
        },
        {
          "title": "Agent Card",
          "level": 2,
          "body": "**Agent Card** replaces the prose `persona` field in `agent_definitions`. It is the typed identity contract for an agent. Structured fields carry identity, capabilities, constraints, and escalation routing. Prose fields are capped and reserved for behavioral nuance that cannot be structured."
        },
        {
          "title": "Why Constraints Beat Prose",
          "level": 3,
          "body": "LLMs hold explicit prohibitions (\"I never X\") more reliably than advisory prose (\"you should avoid X\"). Every constraint that currently lives buried in a persona paragraph becomes a first-class constraint entry. The model doesn't have to extract it from a paragraph — it's listed."
        },
        {
          "title": "What Moves Out of Persona → Skills",
          "level": 3,
          "body": "Current personas mix identity with procedure. Procedure belongs in skills, not the identity document.\n\n| Content type | Current location | New location |\n|---|---|---|\n| Who I am, constraints, voice | `persona` prose | Agent Card |\n| Step-by-step execution procedures | `persona` prose | Agent-specific skill markdown |\n| VPS environment setup | Repeated in every persona | `platform-env` shared skill |\n| Inbox read/write protocol | Repeated in every persona | `inbox-protocol` shared skill |\n| Done/blocked criteria | `persona` prose | `output_contract` in Brief Wire |\n\nThis dramatically shrinks Mindy's 900-word persona. Her Step 1–7 execution protocol becomes a `mindy-supervisor-protocol.md` skill. Her Agent Card is ~40 lines."
        },
        {
          "title": "Agent Card Schema",
          "level": 3,
          "body": "```json\n{\n  \"card_version\": \"1.0\",\n  \"identity\": {\n    \"slug\": \"string\",\n    \"name\": \"string\",\n    \"department\": \"string\",\n    \"reports_to\": \"agent_slug | 'human'\",\n    \"model\": \"string\"\n  },\n  \"scope\": \"One sentence: what I own and what I don't.\",\n  \"capabilities\": [\n    \"What I can do — one phrase per item\"\n  ],\n  \"constraints\": [\n    \"I never X — declarative, not advisory\"\n  ],\n  \"escalation_rules\": [\n    {\n      \"trigger\": \"Condition that fires this rule\",\n      \"route_to\": \"role_slug | agent_slug | 'exec'\",\n      \"via\": \"task.blocked | inbox | exec.gate\"\n    }\n  ],\n  \"output_types\": [\"output_contract_slug\"],\n  \"working_style\": \"2–3 sentences max. How I approach problems.\",\n  \"voice\": {\n    \"description\": \"1–2 sentences on communication style.\",\n    \"example\": \"One example of how I communicate.\"\n  },\n  \"values\": [\n    \"What I optimize for — one phrase per item\"\n  ]\n}\n```"
        },
        {
          "title": "Field Rules",
          "level": 3,
          "body": "| Field | Constraint | Rationale |\n|---|---|---|\n| `scope` | 1 sentence max | Forces precision. If you need 2 sentences, the scope is unclear. |\n| `constraints` | \"I never X\" format | Declarative prohibitions hold better than advisory prose. |\n| `escalation_rules` | Must reference real role slugs or agent slugs | Links identity to the routing layer — not abstract. |\n| `output_types` | Must reference real Wire output contract slugs | Links identity to the Wire protocol. |\n| `working_style` | 3 sentences max | Forces brevity. Move procedure detail to skills. |\n| `voice.example` | 1 example only | Show > tell for tone calibration. |\n\n---"
        },
        {
          "title": "Quinn — Reference Agent Card",
          "level": 3,
          "body": "```json\n{\n  \"card_version\": \"1.0\",\n  \"identity\": {\n    \"slug\": \"quinn\",\n    \"name\": \"Quinn\",\n    \"department\": \"dev\",\n    \"reports_to\": \"vikram\",\n    \"model\": \"claude-sonnet-4-6\"\n  },\n  \"scope\": \"I implement tasks in the developer work queue — nothing more, nothing less.\",\n  \"capabilities\": [\n    \"Full-stack code implementation (Python, JS/TS, SQL)\",\n    \"Git workflow — feature branches, commits, PRs\",\n    \"Supabase schema and query work\",\n    \"VPS deployment via scp + systemd\",\n    \"HCS message posting\"\n  ],\n  \"constraints\": [\n    \"I never commit directly to main or marketplace\",\n    \"I never extend scope beyond the task brief\",\n    \"I never fill in spec gaps — spec gaps go to Priya via task.blocked\",\n    \"I never self-review after completing a task\",\n    \"I never pick up the next task without runner triggering a new cycle\",\n    \"I never use sudo on the VPS\"\n  ],\n  \"escalation_rules\": [\n    {\n      \"trigger\": \"Brief is missing required information I cannot infer from the codebase\",\n      \"route_to\": \"roles.ba\",\n      \"via\": \"task.blocked\"\n    },\n    {\n      \"trigger\": \"Brief is ambiguous but I could proceed with a potentially wrong assumption\",\n      \"route_to\": \"mindy\",\n      \"via\": \"inbox\"\n    }\n  ],\n  \"output_types\": [\"code_commit\", \"output_ref_file\"],\n  \"working_style\": \"I read the brief, implement exactly what it specifies, verify my output, and stop. I do not improvise. I do not extend scope.\",\n  \"voice\": {\n    \"description\": \"Terse and technical. Facts, not feelings.\",\n    \"example\": \"Implemented auth middleware. Tests pass. output_ref written to Storage. Branch: feature/auth-v2.\"\n  },\n  \"values\": [\n    \"Exactness over improvisation\",\n    \"Scope discipline\",\n    \"Clean commits\",\n    \"No broken builds\"\n  ]\n}\n```\n\n---"
        },
        {
          "title": "Runner Integration",
          "level": 2,
          "body": "The runner assembles the agent system prompt from Agent Card fields in this order:\n\n```\n1.  Identity block:      \"You are {name}. {scope}\"\n2.  Capabilities:        \"## Capabilities\\n- ...\"  \n3.  Constraints:         \"## Constraints\\n- ...\"\n4.  Escalation rules:    \"## When to Escalate\\n- ...\"\n5.  Working style:       {working_style}\n6.  Voice calibration:   {voice.description}\\nExample: {voice.example}\n7.  [Injected skills markdown — agent-specific + shared]\n8.  [Injected memory context — pgvector nearest-neighbor]\n9.  [Injected inbox messages — unread, ordered by priority]\n10. [Wire Brief — goal, context, constraints, acceptance_criteria, output_contract]\n```\n\n**Shared skills injected for all agents:**\n- `platform-env` — VPS environment, ccos user, /opt/redk3y, no sudo\n- `inbox-protocol` — how to read and send inbox messages\n\n**Brief injection:** The runner fetches `agent_tasks.brief` (a Wire Brief JSON blob), parses the envelope, validates the version, then injects the payload fields as a structured section. The agent receives a clean, formatted brief — not raw JSON.\n\n**Fallback:** If `agent_card` column is null in `agent_definitions`, runner falls back to the `persona` field. This allows incremental migration without downtime.\n\n---"
        },
        {
          "title": "Naming Glossary",
          "level": 2,
          "body": "| Term | Definition |\n|---|---|\n| **Agent Wire** | The typed coordination protocol for all A2A communication on RedKey |\n| **Wire** | A single message conforming to the Agent Wire Protocol |\n| **Wire envelope** | The standard wrapper: `wire`, `type`, `sender`, `ts`, `payload` |\n| **Brief Wire** | A task brief conforming to the `brief` Wire message type |\n| **Inbox Wire** | An agent-to-agent message conforming to the `inbox` Wire message type |\n| **Agent Card** | The typed identity document for an agent — replaces the prose `persona` field |\n| **Output contract** | Typed specification of what an agent produces — referenced in Brief Wire and Agent Card |\n| **card_version** | Schema version of the Agent Card format. Current: `\"1.0\"` |\n\n---"
        },
        {
          "title": "Phase 1: Schema definitions",
          "level": 3,
          "body": "Define Wire schemas as JSON files in `definitions/wire/`. Define Agent Card schema. No code changes. No risk."
        }
      ],
      "html_path": "artifacts/2026-04-28-agent-wire-protocol-702b45175e.html",
      "json_path": "artifacts/2026-04-28-agent-wire-protocol-702b45175e.json"
    },
    {
      "id": "2026-04-28-ac-project-governance-332734709c",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-28-ac-project-governance.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.686Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "A+C Project Governance — Pre-Planned + Supervised Execution",
      "summary": "A+C Project Governance — Pre Planned + Supervised Execution Date: 2026 04 28 Status: Design approved — pending implementation plan Problem The platform's claim mechanism is proven. Atomic HCS claims, dep graph dispatch, and per task verification all work. The failure point is between a locked Plan and a completed Build: no one governs execution. Mindy receiv...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "A+C Project Governance — Pre-Planned + Supervised Execution",
          "level": 1,
          "body": "**Date:** 2026-04-28  \n**Status:** Design approved — pending implementation plan\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "The platform's claim mechanism is proven. Atomic HCS claims, dep-graph dispatch, and per-task verification all work. The failure point is between a locked Plan and a completed Build: no one governs execution. Mindy receives a brief and interprets it — sometimes producing 3 tasks instead of 9, sometimes building in the wrong repository. Manual intervention becomes routine. The infrastructure is correct; the orchestration layer above it is not.\n\n---"
        },
        {
          "title": "Design Principles",
          "level": 2,
          "body": "1. **Front-load intelligence.** By the time Build starts, every task is fully specified. No agent makes structural decisions during execution.\n2. **Lock the plan.** PLAN.json is approved by Justin before Build starts. It is immutable once Build begins. Engine dispatches from it. Mindy enforces it.\n3. **Supervisors govern, workers execute.** Workers (Quinn, Vikram, Priya, Zara) never touch project structure. Mindy never creates tasks during Build — she validates them.\n4. **Targeted correction, not retry.** When output fails, the supervisor diagnoses the specific gap and writes a surgical correction brief. Same input never produces different output.\n5. **Checkpoints are reports, not gates.** Phase boundaries produce a health report to Justin. Not a blocker — a signal. Justin can intervene if something looks wrong. By default, execution continues.\n\n---"
        },
        {
          "title": "Track A — Recipes (small projects)",
          "level": 3,
          "body": "Select a recipe → pre-built PLAN.json loaded → Engine dispatches → Mindy supervises.\n\nA recipe is a pre-built PLAN.json template for a known project type (new agent, DB migration, content campaign, etc.). The Build stage runs identically to Track B — same Engine dispatch, same Mindy supervision. Recipes eliminate the Design + Planning stages for well-understood work.\n\n**Recipe library is a follow-on.** Build Track B governance first. Recipes emerge naturally as PLAN.json templates from completed real projects."
        },
        {
          "title": "Track B — Staged Projects (big projects)",
          "level": 3,
          "body": "Full lifecycle with governed execution:\n\n```\nIntake → Design → Plan → Build → QA\n```\n\nEach stage is a stage on the workflow instance. Exec gates exist between Design→Plan and Plan→Build. QA closes with an exec gate.\n\n---"
        },
        {
          "title": "Workflow Instance as Container",
          "level": 2,
          "body": "The workflow instance (Project → Stage → Phase → Task) is already the right container. No new infrastructure needed.\n\n```\nProject (workflow_instance, HCS topic 0.0.XXXXX)\n  Stage: Intake\n  Stage: Design\n  Stage: Plan\n  Stage: Build         ← governed by A+C\n  Stage: QA\n```\n\nThe Atlas+Justin planning session is a task on `roles.architect`. The output of that task — and the output of the Plan stage broadly — is PLAN.json. Justin approves the Plan exec gate. PLAN.json is locked. Build starts.\n\n---"
        },
        {
          "title": "Intake",
          "level": 3,
          "body": "**Owner:** Justin + Atlas  \n**Mechanism:** Task dispatched to `roles.architect`. Atlas runs an interactive session — conversational intake, can include wireframes, analysis, structured brief output.  \n**Output:** Locked project brief on HCS (title, problem statement, success criteria, constraints, anti-requirements, scope).  \n**Gate:** Justin approves before Design starts."
        },
        {
          "title": "Design",
          "level": 3,
          "body": "**Agents:** Priya (PRD), Vikram (Architecture), Zara (UX Spec) — parallel  \n**Output:** Three documents. Each agent reads the project brief. Priya owns the coherence check at the end.  \n**Gate:** Justin reviews all three outputs. Approves before Planning starts."
        },
        {
          "title": "Plan",
          "level": 3,
          "body": "**Owner:** Priya (generates), Atlas + Justin (review and correct)  \n**Mechanism:**\n1. Priya reads all three Design outputs and produces a PLAN.json draft.\n2. Atlas reviews the PLAN.json with Justin in an interactive session — correcting task scope, dep-graph structure, output contracts, brief quality.\n3. The reviewed PLAN.json is the exec gate artifact.\n\n**Gate:** Justin approves PLAN.json. Once approved, it is immutable. Engine and Mindy both treat it as ground truth."
        },
        {
          "title": "Build",
          "level": 3,
          "body": "See *Build Stage Governance* section below.\n\n**Gate:** Mindy posts a Build completion report when all phases pass. Justin approves before QA starts."
        },
        {
          "title": "QA",
          "level": 3,
          "body": "**Agent:** Luna  \n**Mechanism:** Luna validates the Build outputs against the spec (PRD + UX Spec + Architecture). Automated checks where possible.  \n**Gate:** Justin reviews QA report. Final approval.\n\n---"
        },
        {
          "title": "PLAN.json Schema",
          "level": 2,
          "body": "PLAN.json is the complete, executable description of a Build stage. It is produced during Planning and immutable once the Plan exec gate is approved.\n\n```json\n{\n  \"version\": \"1\",\n  \"project_id\": \"0.0.XXXXX\",\n  \"stage_id\": \"0.0.XXXXX\",\n  \"client_id\": \"dreamborn\",\n  \"repo_url\": \"https://github.com/org/repo.git\",\n  \"worktree_path\": \"/opt/redk3y/apps/project-name\",\n  \"phases\": [\n    {\n      \"id\": \"phase-1\",\n      \"name\": \"Foundation\",\n      \"tasks\": [\n        {\n          \"local_id\": \"1.1\",\n          \"title\": \"Short descriptive title\",\n          \"role\": \"developer\",\n          \"brief\": \"Full task brief text...\",\n          \"output_path\": \"relative/path/to/output/file\",\n          \"completion\": {\n            \"type\": \"file\",\n            \"min_length\": 500,\n            \"evaluate\": \"Human-readable description of what correct output looks like\"\n          },\n          \"depends_on\": []\n        },\n        {\n          \"local_id\": \"1.2\",\n          \"title\": \"...\",\n          \"role\": \"developer\",\n          \"brief\": \"...\",\n          \"output_path\": \"...\",\n          \"completion\": { \"type\": \"file\", \"min_length\": 1000, \"evaluate\": \"...\" },\n          \"depends_on\": [\"1.1\"]\n        }\n      ]\n    },\n    {\n      \"id\": \"phase-2\",\n      \"name\": \"Core Pages\",\n      \"tasks\": [\n        {\n          \"local_id\": \"2.1\",\n          \"title\": \"...\",\n          \"role\": \"developer\",\n          \"brief\": \"...\",\n          \"output_path\": \"...\",\n          \"completion\": { \"type\": \"file\", \"min_length\": 200, \"evaluate\": \"...\" },\n          \"depends_on\": [\"1.1\", \"1.2\"]\n        }\n      ]\n    }\n  ]\n}\n```\n\n**`depends_on` uses `local_id` references.** Engine translates these to HCS topic IDs when ingesting. `local_id` values are stable identifiers within a PLAN.json — e.g., `\"1.1\"`, `\"2.3\"`.\n\n**`completion` contract** is required on every task. It is what the Build Supervisor validates against after each task.complete.\n\n---"
        },
        {
          "title": "Build Stage Governance",
          "level": 2,
          "body": "Two actors run in parallel during Build:"
        },
        {
          "title": "Engine — Dispatcher (unchanged)",
          "level": 3,
          "body": "Engine reads PLAN.json from Priya's Planning output. Ingests all tasks as `agent_tasks` rows (status=`created`). As deps complete, posts `task.available` to the appropriate role topic. Pure state machine. Never interprets or modifies PLAN.json."
        },
        {
          "title": "Mindy — Build Supervisor (new role)",
          "level": 3,
          "body": "Mindy's job changes entirely. She is no longer a dispatcher. She is a governor.\n\n**How she's invoked:** When the Plan exec gate is approved, a supervisor task is posted to `roles.supervisor` with PLAN.json as the brief. Mindy claims it on her next tick.\n\n**What she does every tick:**\n1. Reads PLAN.json (from task brief).\n2. Queries `agent_tasks` for all tasks in this Build stage.\n3. For each newly-completed task (status=`complete`, not yet validated by her): runs validation.\n4. Checks phase completion: if all tasks in a phase are validated, posts a phase health report to Justin's inbox.\n5. Checks for failures that need correction tasks.\n6. Exits and returns on next tick (120s).\n\n**Validation per task:**\n- Mechanical: `output_ref` is set, file exists in Supabase storage, `output_path` matches what PLAN.json specifies.\n- Contract: output satisfies `completion.evaluate` (Haiku semantic check if `completion.evaluate` is non-null).\n- PASS: write `supervisor_validated_at` timestamp to `agent_tasks` row, advance.\n- FAIL: enter correction loop.\n\n**Mindy does not create the main tasks.** Engine creates them. Mindy only creates correction tasks.\n\n---"
        },
        {
          "title": "Correction Loop (Model C)",
          "level": 2,
          "body": "When Mindy's validation fails on a task:\n\n**C1 — Diagnose.** Mindy reads the task brief, the actual output, and the completion contract. She identifies the specific gap: what was expected, what was produced, what specifically is wrong.\n\n**C2 — Correction task.** Mindy posts `task.blocked` on the original task's HCS topic (listener updates Supabase status). Then creates a new correction task with a targeted brief:\n- Full context of what was attempted\n- Exact description of what failed\n- Precise instruction to fix only that gap (not redo the whole task)\n\nMindy dispatches the correction task **directly** (posts `task.available` to the role topic herself, not through Engine's dep-graph check). The correction task records the original task ID in its brief for traceability, but its dispatch is immediate and unconditional.\n\n**C3 — Re-validate.** When the correction task completes, Mindy validates it against the same contract. If PASS: mark phase task as corrected+validated, advance.\n\n**C4 — Escalate.** If the correction task also fails: Mindy posts to Justin's exec inbox with:\n- Original task title and brief\n- Original output (what Quinn produced)\n- Correction task brief (what Mindy asked for)\n- Correction output (what Quinn produced on retry)\n- Diagnosis: what Mindy thinks is wrong\n- Recommended action (retry with different approach, modify brief, skip task, etc.)\n\nJustin decides. The Build stage pauses on the affected branch of the dep-graph until Justin responds.\n\n---"
        },
        {
          "title": "Phase Checkpoints",
          "level": 2,
          "body": "When all tasks in a phase reach validated status, Mindy posts a phase health report to Justin's inbox. This is a status report, not a gate.\n\n**Report contains:**\n- Phase name and number\n- Tasks completed: N/N\n- Corrections applied: N (with summaries)\n- Cost incurred this phase (sum of `agent_tasks.cost_usd`)\n- Duration\n- Any open escalations\n\nJustin can respond to intervene. If no response, the next phase continues automatically — Engine dispatches the next phase's tasks as their deps are satisfied.\n\n---"
        },
        {
          "title": "What Changes",
          "level": 2,
          "body": "| # | Change | Type | Notes |\n|---|--------|------|-------|\n| 1 | PLAN.json schema | New doc | Defined above — the planning contract |\n| 2 | Priya persona update | Persona edit | Planning output = PLAN.json with this schema |\n| 3 | Mindy persona — full rewrite | Major persona rewrite | Dispatcher → Build Supervisor |\n| 4 | New role: `roles.supervisor` | 1 HCS topic + agent_definitions | Mindy subscribes to this role |\n| 5 | Migration: `supervisor_validated_at` column | Small migration | Add `timestamptz` column to `agent_tasks` — Mindy writes this after validating each task |\n| 6 | Engine PLAN.json ingestion | Verify + minor field alignment | Engine already bulk-ingests project_plan blocks — align local_id dep resolution |\n| 7 | Supervisor task dispatch | Small script addition | Post supervisor task to roles.supervisor at Build start (Plan exec gate approval) |\n\n---"
        }
      ],
      "html_path": "artifacts/2026-04-28-ac-project-governance-332734709c.html",
      "json_path": "artifacts/2026-04-28-ac-project-governance-332734709c.json"
    },
    {
      "id": "2026-04-27-traci-sdr-design-20fb4b9b99",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-traci-sdr-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.684Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Traci — DreamBorn SDR Agent Design Spec",
      "summary": "Traci — DreamBorn SDR Agent Design Spec Date: 2026 04 27 Client: dreamborn Status: Design approved — ready for planning Overview Traci is DreamBorn's outbound SDR agent. Her job is to build a prospect pool on LinkedIn and warm it toward a deal definition call with Justin. She does not close — she hands off to Brooke (Sales) once a meeting is booked. Revenue ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Traci — DreamBorn SDR Agent Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-27\n**Client:** dreamborn\n**Status:** Design approved — ready for planning\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Traci is DreamBorn's outbound SDR agent. Her job is to build a prospect pool on LinkedIn and warm it toward a deal-definition call with Justin. She does not close — she hands off to Brooke (Sales) once a meeting is booked.\n\n**Revenue pipeline:** Traci → Justin (call) → Brooke (close) → Annie (CS)\n\n**Phase:** Connection + nurture campaign. Justin doesn't have a large AI contact base yet, so v1 is about building the list and making genuine connections before any pitch.\n\n**Channel:** LinkedIn only (via Unipile from Justin's account)\n\n---"
        },
        {
          "title": "ICP",
          "level": 2,
          "body": "DreamBorn targets:\n- AI companies and startups\n- Thought leaders in AI\n- Large manufacturers and distributors with AI initiatives\n\nDreamBorn sells: AI workflow and orchestration engine for agents — consensus and trust infrastructure. The pitch is what an AI-native company looks like in practice. Audience: founders, operators, builders.\n\n---"
        },
        {
          "title": "Architecture",
          "level": 2,
          "body": "Traci runs on `roles.sales` HCS topic. Same runner pattern as all other agents.\n\n**Coordination layer split:**\n- **HCS** — workflow-level events: task dispatch, exec gate approvals, batch complete\n- **Supabase** — granular timing state: send queue, per-send status, activity logging\n\nIndividual LinkedIn sends are too frequent and cheap to put on HCS. The `traci_send_queue` table handles timing; HCS handles meaningful workflow transitions.\n\n---"
        },
        {
          "title": "`prospect_search`",
          "level": 3,
          "body": "Justin posts a brief (e.g. \"50 AI startup founders, Series A-B, US-based\"). Traci:\n1. Searches LinkedIn via Unipile using the brief as search criteria\n2. Deduplicates against existing `crm_contacts` (skip anyone already in CRM)\n3. Writes a `prospect_batches` row with all candidates + proposed connection message per candidate\n4. Posts to `roles.exec` — Justin reviews in Cockpit, approves/rejects per candidate\n5. Approved candidates written to `crm_contacts` with `outreach_status: prospect`"
        },
        {
          "title": "`send_connections`",
          "level": 3,
          "body": "Dispatched by Engine after Justin approves a batch. Traci:\n1. Reads approved candidates from `prospect_batches`\n2. Distributes sends across the day (8am–6pm, ~3/hour, randomised within each hour)\n3. Writes rows to `traci_send_queue` with `scheduled_at` timestamps\n4. Enforces 75 send/day cap at queue-write time — rejects overflow\n5. Posts `task.complete` immediately (queue is written, not sends completed)\n6. On each subsequent runner tick: checks `traci_send_queue` for rows where `scheduled_at <= now() AND status = 'queued'`, sends via Unipile, logs to `crm_activities`, updates `outreach_status: connection_sent`\n7. Posts daily summary to `roles.exec`: \"Traci: sent N connection requests today\""
        },
        {
          "title": "`check_connections`",
          "level": 3,
          "body": "Traci polls Unipile for accepted connection requests (contacts where `outreach_status: connection_sent`). For each accepted connection, updates `crm_contacts.outreach_status = 'connected'` and logs a `crm_activities` row. This is what arms `draft_nurture`. Runs on every runner tick — lightweight Unipile + Supabase check, no HCS task needed."
        },
        {
          "title": "`draft_nurture`",
          "level": 3,
          "body": "Traci scans `crm_contacts` where `outreach_status: connected` and no active pipeline deal. For each:\n1. Pulls their profile context (title, company, icp_tags)\n2. Drafts a personalised follow-up DM\n3. Batches all drafts into a `prospect_batches` row\n4. Posts to `roles.exec` for review\n5. Justin approves per-message → `send_message` task dispatched for approved items"
        },
        {
          "title": "`send_message`",
          "level": 3,
          "body": "Same queue pattern as `send_connections` but for DMs to already-connected contacts. Logs to `crm_activities`, updates `outreach_status: nurturing`.\n\n---"
        },
        {
          "title": "New fields on `crm_contacts`",
          "level": 3,
          "body": "| Field | Type | Notes |\n|---|---|---|\n| `outreach_status` | text | `prospect \\| connection_sent \\| connected \\| nurturing \\| meeting_booked \\| not_interested` |\n| `source` | text | `traci_search \\| manual \\| inbound` |\n| `icp_tags` | text[] | e.g. `['ai-startup', 'founder', 'series-a']` |\n\n`linkedin_url` already exists on Arlo's field list."
        },
        {
          "title": "New table: `prospect_batches`",
          "level": 3,
          "body": "```sql\nid              uuid primary key default gen_random_uuid()\nclient_id       text not null\ntask_id         text                  -- HCS task topic ID\nbrief           text                  -- Justin's search brief\ncandidates      jsonb                 -- [{name, title, company, linkedin_url, linkedin_urn, proposed_message, approved}]\nstatus          text                  -- pending_review | partially_approved | sent\ncreated_at      timestamptz not null default now()\n```"
        },
        {
          "title": "New table: `traci_send_queue`",
          "level": 3,
          "body": "```sql\nid              uuid primary key default gen_random_uuid()\nclient_id       text not null\ncontact_id      uuid references crm_contacts(id)\nsend_type       text not null         -- connection_request | dm\nmessage         text not null\nlinkedin_urn    text not null\nscheduled_at    timestamptz not null\nsent_at         timestamptz\nstatus          text not null default 'queued'  -- queued | sent | failed\nerror           text\ncreated_at      timestamptz not null default now()\n```\n\n**Activity logging:** Every send gets a `crm_activities` row — type `linkedin_connection` or `linkedin_dm`. Traci and Arlo share the same activity log table.\n\n---"
        },
        {
          "title": "Unipile Integration",
          "level": 2,
          "body": "Traci authenticates via Unipile using Justin's LinkedIn account credentials (stored as `UNIPILE_ACCOUNT_ID` + `UNIPILE_API_KEY` in VPS env).\n\n**Connection request:**\n```\nPOST /messaging/accounts/{account_id}/connections\n{ linkedin_member_urn, message }   -- message: 300 char max\n```\n\n**DM:**\n```\nPOST /messaging/accounts/{account_id}/messages\n{ conversation_id, text }\n```\n\n**Rate limiting:**\n- Max 75 sends/day enforced at queue-write time\n- `delay_between_sends_ms: 3000` (default) — configurable per client config\n- Sends distributed 8am–6pm with randomised within-hour timing\n\n---"
        },
        {
          "title": "Voice + Writing Rules",
          "level": 2,
          "body": "Traci writes from Justin's LinkedIn account. Messages must sound like him.\n\n- First person (\"I\", never \"we\")\n- Short: connection notes under 200 chars, DMs under 5 sentences\n- Lead with something specific to the prospect — their role, recent move, company milestone, or content they posted\n- No pitch in the connection request — just a genuine reason to connect\n- The ask comes in DM #2 or #3, never the first message\n- Never use \"I came across your profile\"\n- Traci's persona includes Justin's voice from BezelBrain captures\n\n**Connection note pattern:**\n> \"[Specific observation about them or their work] — would love to connect.\"\n\n**First DM (after acceptance):**\n> One paragraph on why DreamBorn is relevant to what they're building. No ask. End with a question.\n\n**Second DM (no reply after 7 days):**\n> One sentence. Different angle.\n\n---"
        },
        {
          "title": "HCS Topic Structure",
          "level": 2,
          "body": "One new role topic required:\n\n| Topic | Purpose |\n|---|---|\n| `roles.sales` | Traci claims prospect_search, send_connections, draft_nurture, send_message tasks |\n\n---"
        },
        {
          "title": "Exec Gate Pattern",
          "level": 2,
          "body": "Every outbound action requires Justin's approval before Traci sends:\n\n1. `prospect_search` complete → full candidate batch posted to `roles.exec`\n2. Justin approves/rejects per candidate in Cockpit\n3. Engine dispatches `send_connections` for approved batch\n4. `draft_nurture` complete → DM drafts posted to `roles.exec`\n5. Justin approves/rejects per message\n6. Engine dispatches `send_message` for approved items\n\nJustin reviews everything at the start. As trust builds, approval cadence can relax.\n\n---"
        },
        {
          "title": "Agent Definition",
          "level": 2,
          "body": "```json\n{\n  \"slug\": \"traci\",\n  \"name\": \"Traci\",\n  \"department\": \"sales\",\n  \"model\": \"claude-sonnet-4-6\",\n  \"schedule_seconds\": 120,\n  \"roles\": [\"sales\"],\n  \"skills\": [\"hcs-posting\"],\n  \"plugins\": [\"hedera-tools\"],\n  \"persona\": \"See agents/traci/persona.md\"\n}\n```\n\n---"
        },
        {
          "title": "Scope Boundary",
          "level": 2,
          "body": "**V1 includes:**\n- `prospect_search`, `send_connections`, `draft_nurture`, `send_message` task types\n- `traci_send_queue` + `prospect_batches` Supabase tables\n- New fields on `crm_contacts`\n- Unipile integration (connection requests + DMs)\n- Daily 75-send cap + distributed scheduling\n- Exec gate for all sends\n- Traci agent definition + persona\n\n**V1 excludes (future):**\n- Autonomous ICP-driven prospecting (no brief needed — Traci searches on schedule)\n- Rex researcher integration (Traci pulls research briefs from Rex)\n- Reply handling (detecting and responding to LinkedIn replies)\n- Brooke (Sales) handoff automation\n- Cockpit sales tab (separate project)"
        }
      ],
      "html_path": "artifacts/2026-04-27-traci-sdr-design-20fb4b9b99.html",
      "json_path": "artifacts/2026-04-27-traci-sdr-design-20fb4b9b99.json"
    },
    {
      "id": "2026-04-27-hcs-first-claim-path-61002d5e6c",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-hcs-first-claim-path.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.682Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "HCS-First Claim Path",
      "summary": "HCS First Claim Path Date: 2026 04 27 Problem Two failure modes observed in production: 1. Agents do work without having claimed — the Supabase fallback in fetch work items queries agent tasks directly for status IN ('created', 'assigned') with no claimed by check. An agent can pull a task from Supabase and start executing without ever posting task.claim to ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "HCS-First Claim Path",
          "level": 1,
          "body": "**Date:** 2026-04-27\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "Two failure modes observed in production:\n\n1. **Agents do work without having claimed** — the Supabase fallback in `fetch_work_items` queries `agent_tasks` directly for `status IN ('created', 'assigned')` with no `claimed_by` check. An agent can pull a task from Supabase and start executing without ever posting `task.claim` to HCS. No atomic race, no on-chain record.\n\n2. **Stale tasks executed repeatedly** — the same fallback re-serves rows that are complete on HCS but not yet reflected in Supabase (listener lag), or rows that were never dispatched via HCS at all. Multiple agents pick up the same row.\n\nRoot cause: **Supabase is acting as a second work queue**, parallel to HCS. Agents that miss the HCS `task.available` message fall through to Supabase and pick up work that bypasses the claim protocol entirely.\n\n---"
        },
        {
          "title": "Design Principle",
          "level": 2,
          "body": "HCS is the only work queue. Supabase is a read mirror for the cockpit. Never the other way around.\n\n```\nHCS role topic\n  task.available → mirror node (read)\n  → _find_available_tasks (pure HCS message scan)\n  → post task.claim (HCS write via claim-task.js)\n  → _verify_claim (mirror node read — lowest seq wins)\n  → fetch brief from HFS (brief_file_id from HCS message)\n  → execute\n  → post task.complete (HCS write)\n\nSupabase: written by listener. Read by cockpit. Not consulted during execution.\n```\n\nMirror node reads are reads of HCS — they are explicitly allowed and used throughout.\n\n---"
        },
        {
          "title": "agents/shared/hedera_queue.py",
          "level": 3,
          "body": "**Remove `_is_done_in_supabase`** — this function gates the claim on a Supabase read before posting to HCS. It was a band-aid for the old `CLAIM_TIMEOUT_SECONDS` stale-claim bug (now fixed). `_find_available_tasks` already answers \"is this task available?\" using HCS messages alone — the Supabase check is redundant and adds a DB round-trip to every claim attempt.\n\n**Remove `sb` parameter from `poll_and_claim`** — Supabase is no longer consulted in the claim path. Brief is fetched from HFS via `brief_file_id` (already implemented — `_fetch_hfs` called after winning the claim)."
        },
        {
          "title": "agents/shared/runner.py",
          "level": 3,
          "body": "**Remove `_enrich_from_agent_tasks`** — this method fetches the full `agent_tasks` row from Supabase after winning the claim and overwrites the work item. It makes Supabase the primary brief source and HFS the fallback, which is backwards. The brief lives on HFS (referenced by `brief_file_id` in the `task.available` HCS message). After this change, the brief comes from `_fetch_hfs` in `hedera_queue.py`.\n\n**Remove the Supabase fallback block** — the `# Fallback: agent_tasks table` block in `fetch_work_items` is removed entirely. If there is no `task.available` on the HCS role topic, there is no work. The fallback masked dispatch bugs (tasks that existed in Supabase but were never posted to HCS) and allowed unclaimed execution.\n\n**CRM tasks path is preserved** — `_fetch_crm_tasks` uses a dedicated operational Supabase table, not `agent_tasks`. It is Arlo-specific and unrelated to the HCS role topic claim model. Not changed.\n\n---"
        },
        {
          "title": "What Stays",
          "level": 2,
          "body": "- `_fetch_messages` — mirror node REST read. Fine.\n- `_find_available_tasks` — pure HCS message scan. Fine.\n- `_post_claim` — HCS write via claim-task.js. Fine.\n- `_verify_claim` — mirror node read to confirm lowest claim seq. Fine.\n- `_fetch_hfs` — fetches brief from Hedera File Service after winning claim. Fine.\n- `limit=250` fix — stays.\n- Permanent claim semantics (no stale timeout) — stays.\n\n---"
        },
        {
          "title": "Brief Source After This Change",
          "level": 2,
          "body": "Brief arrives via the HCS `task.available` message → `brief_file_id` → `_fetch_hfs`. All dispatch scripts (via `dispatchTask()` and existing scripts) upload the brief to HFS and include `brief_file_id` in the HCS message. This is already the pattern for all Phase 3 tasks.\n\nTasks without `brief_file_id` will log a warning and execute with an empty brief — this surfaces dispatch bugs instead of hiding them.\n\n---"
        },
        {
          "title": "Files Changed",
          "level": 2,
          "body": "| File | Change |\n|---|---|\n| `agents/shared/hedera_queue.py` | Remove `_is_done_in_supabase`, remove `sb` param from `poll_and_claim` |\n| `agents/shared/runner.py` | Remove `_enrich_from_agent_tasks`, remove Supabase fallback from `fetch_work_items` |"
        }
      ],
      "html_path": "artifacts/2026-04-27-hcs-first-claim-path-61002d5e6c.html",
      "json_path": "artifacts/2026-04-27-hcs-first-claim-path-61002d5e6c.json"
    },
    {
      "id": "2026-04-27-google-agent-sdk-a2a-2bf5970827",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-google-agent-sdk-a2a.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.682Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Google Agent SDK + A2A Integration",
      "summary": "Google Agent SDK + A2A Integration Date: 2026 04 27 Status: Spec approved — implementation plan at docs/plans/2026 04 27 a2a gateway.md What This Builds Two independent components, sequenced: 1. A2A Gateway (Phase 1) — an HTTP server that makes RedKey agents callable from any A2A compatible platform. External callers discover agents via Agent Card, submit ta...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Google Agent SDK + A2A Integration",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**Status:** Spec approved — implementation plan at `docs/plans/2026-04-27-a2a-gateway.md`\n\n---"
        },
        {
          "title": "What This Builds",
          "level": 2,
          "body": "Two independent components, sequenced:\n\n1. **A2A Gateway (Phase 1)** — an HTTP server that makes RedKey agents callable from any A2A-compatible platform. External callers discover agents via Agent Card, submit tasks via JSON-RPC, and poll for results. RedKey's HCS pull model handles execution transparently.\n\n2. **Gemini Workspace Worker (Phase 2)** — a Google ADK-powered worker that handles Google Workspace tasks (Drive, Docs, Gmail, Calendar) using Gemini instead of Claude. Follows the same HCS claim mechanics as existing workers.\n\n---"
        },
        {
          "title": "Why A2A",
          "level": 2,
          "body": "A2A (Agent2Agent) is an open protocol under the Linux Foundation, adopted by 150+ orgs including Google, Microsoft, Salesforce, SAP, and ServiceNow. v1.0 released Q1 2026.\n\nMaking RedKey A2A-compliant means:\n- Any A2A-compatible platform can discover and dispatch work to RedKey agents\n- RedKey agents become first-class citizens in the broader agent ecosystem\n- Directly enables marketplace: agents get an Agent Card, they're listed, they're callable\n- Callers don't know or care that execution is on Hedera\n\n---"
        },
        {
          "title": "Overview",
          "level": 3,
          "body": "```\nExternal A2A Caller\n  │\n  │ POST /  (JSON-RPC 2.0)\n  ▼\nA2A Gateway (Express, port 3002, VPS)\n  │\n  ├── message/send   → INSERT agent_tasks (UUID) + POST task.available to role topic (HCS)\n  ├── tasks/get      → SELECT agent_tasks.status → map to A2A TaskState\n  └── tasks/cancel   → UPDATE agent_tasks.status=cancelled + POST task.cancelled (HCS)\n\nRole topic (HCS)\n  │ task.available{task_id: <uuid>}\n  ▼\nAgent runner (poll_and_claim) → enriches from agent_tasks → executes → task.complete\n  │\n  ▼\nagent_tasks.status = complete  →  GetTask returns TASK_STATE_COMPLETED\n```"
        },
        {
          "title": "Endpoints",
          "level": 3,
          "body": "| Endpoint | Method | Description |\n|---|---|---|\n| `/.well-known/agent.json` | GET | Agent Card — capabilities, skills, auth |\n| `/` | POST | JSON-RPC 2.0 — all A2A methods |"
        },
        {
          "title": "A2A Methods (v1)",
          "level": 3,
          "body": "| Method | What it does |\n|---|---|\n| `message/send` | Accept task → create `agent_tasks` row (UUID) → post `task.available` to HCS role topic |\n| `tasks/get` | Look up `agent_tasks` by `id` → map status to A2A TaskState |\n| `tasks/cancel` | Update `agent_tasks.status=cancelled` |\n\nStreaming (`message/sendStream`), push notifications, and multi-turn contexts are **out of scope for v1**."
        },
        {
          "title": "Task Lifecycle Mapping",
          "level": 3,
          "body": "| `agent_tasks.status` | A2A TaskState |\n|---|---|\n| `created` | `submitted` |\n| `assigned` | `submitted` |\n| `in_progress` | `working` |\n| `complete` | `completed` |\n| `blocked` / `failed` | `failed` |\n| `cancelled` | `canceled` |"
        },
        {
          "title": "Agent Card",
          "level": 3,
          "body": "Dynamically generated from Supabase at startup (cached, refreshed every 5 minutes). Pulls agent definitions and role slugs. Skills map 1:1 to RedKey roles.\n\n```json\n{\n  \"name\": \"RedKey Agent Platform\",\n  \"description\": \"Multi-agent workflow platform. Submit tasks to specialized AI workers via role-based routing on Hedera HCS.\",\n  \"url\": \"https://<A2A_GATEWAY_URL>\",\n  \"version\": \"1.0.0\",\n  \"capabilities\": {\n    \"streaming\": false,\n    \"pushNotifications\": false,\n    \"extendedAgentCard\": false\n  },\n  \"defaultInputModes\": [\"text/plain\"],\n  \"defaultOutputModes\": [\"text/plain\"],\n  \"skills\": [\n    { \"id\": \"software-development\", \"name\": \"Software Development\", \"description\": \"Code, features, bug fixes. Delivered by Quinn.\" },\n    { \"id\": \"code-review\", \"name\": \"Code Review\", \"description\": \"PR review, architecture critique. Delivered by Vikram.\" },\n    { \"id\": \"architecture\", \"name\": \"Architecture\", \"description\": \"System design, ADR decisions. Delivered by Vikram.\" },\n    { \"id\": \"business-analysis\", \"name\": \"Business Analysis\", \"description\": \"Requirements, specs, PRDs. Delivered by Priya.\" },\n    { \"id\": \"product-management\", \"name\": \"Product Management\", \"description\": \"Project planning, task breakdown. Delivered by Mindy.\" },\n    { \"id\": \"quality-assurance\", \"name\": \"Quality Assurance\", \"description\": \"Test plans, QA verification. Delivered by Luna.\" },\n    { \"id\": \"ux-design\", \"name\": \"UX Design\", \"description\": \"User flows, component specs, UX documentation. Delivered by Zara.\" },\n    { \"id\": \"crm\", \"name\": \"CRM Operations\", \"description\": \"Lead enrichment, sequence management. Delivered by Arlo.\" }\n  ],\n  \"securitySchemes\": {\n    \"bearerAuth\": { \"type\": \"http\", \"scheme\": \"bearer\" }\n  },\n  \"security\": [{ \"bearerAuth\": [] }]\n}\n```"
        },
        {
          "title": "Skill → Role Routing",
          "level": 3,
          "body": "```js\nconst SKILL_TO_ROLE = {\n  'software-development': 'developer',\n  'code-review':          'reviewer',\n  'architecture':         'architect',\n  'business-analysis':    'ba',\n  'product-management':   'pm',\n  'quality-assurance':    'qa',\n  'ux-design':            'ux',\n  'crm':                  'crm',\n};\n```\n\nIf no skill specified: default to `coordinator`. If skill unknown: return 400.\n\nThe skill is read from the A2A message metadata field `skill`. If absent, check the message text for the first matching skill keyword (loose match on skill description terms). Coordinator is the safe default."
        },
        {
          "title": "Authentication",
          "level": 3,
          "body": "Bearer token. Single static token in `A2A_GATEWAY_TOKEN` env var. All endpoints except `/.well-known/agent.json` require it.\n\nNo client registration in v1. One token = one access level = full write access to all roles. Per-client token scoping is Phase 2."
        },
        {
          "title": "Task ID Strategy (v1)",
          "level": 3,
          "body": "External A2A tasks use UUID (`crypto.randomUUID()`) as task ID — no HCS topic created. Tasks stored in `agent_tasks` with `id = <uuid>`, `topic_id = null`. Workers pick them up via HCS `task.available` message pointing to the UUID, then enrich from `agent_tasks` by `id`.\n\n**Why not create an HCS topic per A2A task:** Topic creation costs ~$0.01 USD per topic and adds ~2s latency. For external tasks that may come in volume, this is too expensive for v1.\n\n**On-chain record:** `task.available` is still posted to the role topic. The claim, execution result, and completion are not on-chain for v1 A2A tasks. On-chain audit for A2A tasks is Phase 2."
        },
        {
          "title": "Runner Modification Required",
          "level": 3,
          "body": "`agents/shared/runner.py:_enrich_from_agent_tasks` currently only enriches tasks with `0.0.` prefix task IDs (Phase 3 HCS topics). UUID tasks from A2A gateway need the same enrichment via `agent_tasks.id` column.\n\nTwo changes needed:\n1. `_enrich_from_agent_tasks`: add UUID path that queries by `id` column\n2. `_post_task_complete`: for UUID tasks, update `agent_tasks.status = 'complete'` in Supabase (ensures `GetTask` sees the completion)"
        },
        {
          "title": "Configuration (env vars)",
          "level": 3,
          "body": "| Var | Description |\n|---|---|\n| `A2A_GATEWAY_TOKEN` | Bearer token for incoming A2A requests |\n| `A2A_GATEWAY_URL` | Public URL of this gateway (put in Agent Card) |\n| `A2A_GATEWAY_PORT` | HTTP port (default: 3002) |\n| `A2A_DEFAULT_CLIENT_ID` | client_id stamped on externally-submitted tasks (default: `a2a`) |\n| `REDKEY_SUPABASE_URL` | Already on VPS |\n| `REDKEY_SUPABASE_SECRET_KEY` | Already on VPS |\n| `HEDERA_OPERATOR_ID` | Already on VPS |\n| `HEDERA_OPERATOR_KEY` | Already on VPS |\n| `HEDERA_NETWORK` | Already on VPS (testnet) |\n\n---"
        },
        {
          "title": "Phase 2: Gemini Workspace Worker",
          "level": 2,
          "body": "A Python agent using Google ADK that handles Google Workspace tasks via Gemini.\n\n**Why:** DreamBorn is deeply Google-integrated (Drive, Docs, Gmail, Calendar via `scripts/lib/google-dreamborn.js`). A Gemini-powered worker has native advantages on Workspace tasks and costs less than Sonnet for routine operations.\n\n**Design sketch:**\n- New role: `roles.workspace` (new HCS topic needed)\n- New agent: `agents/gemini-workspace/runner.py` — uses `google-adk` + `google-generativeai` instead of Claude CLI\n- ADK `Agent` configured with `gemini-2.5-flash` model + Google Workspace tools (Drive, Docs, Gmail, Calendar)\n- Same HCS claim mechanics (`hedera_queue.py`) — only execution layer changes\n- Deployed as `redkey-gemini-workspace.timer` on VPS\n\n**Implementation plan:** separate doc when Phase 1 is live.\n\n---"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "| # | Question | Decision |\n|---|---|---|\n| OQ-1 | Should Agent Card skill list be DB-driven (auto-generated from `roles` table) or static? | Static for v1 — roles rarely change, dynamic generation adds complexity |\n| OQ-2 | What client_id to stamp on A2A tasks? | `a2a` by default, configurable per deployment via `A2A_DEFAULT_CLIENT_ID` |\n| OQ-3 | Do we need CORS headers for browser-based A2A callers? | Add permissive CORS for v1, tighten in Phase 2 |\n| OQ-4 | Rate limiting? | Not in v1 — add nginx rate limiting at deployment if needed |"
        }
      ],
      "html_path": "artifacts/2026-04-27-google-agent-sdk-a2a-2bf5970827.html",
      "json_path": "artifacts/2026-04-27-google-agent-sdk-a2a-2bf5970827.json"
    },
    {
      "id": "2026-04-27-dreamborn-marketing-agents-50838d1823",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-dreamborn-marketing-agents.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.681Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "DreamBorn Marketing Agent Team — Design Spec",
      "summary": "DreamBorn Marketing Agent Team — Design Spec Date: 2026 04 27 Branch: feature/marketing agents Status: Design in progress — decisions being finalised in session 2026 04 27 Overview A five agent marketing team that runs on the Bezel platform and produces DreamBorn's public content. The team demonstrates the platform's core value prop — parallel orchestration,...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "DreamBorn Marketing Agent Team — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**Branch:** feature/marketing-agents  \n**Status:** Design in progress — decisions being finalised in session 2026-04-27\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "A five-agent marketing team that runs on the Bezel platform and produces DreamBorn's public content. The team demonstrates the platform's core value prop — parallel orchestration, human exec gates, agent-authored output — while doing real business work.\n\nThe agents are not ghostwriters. They are credited authors. \"Written by Harper, DreamBorn Content Agent\" is the product demo.\n\n**Content territory:** Orchestration at scale, AI agents, distributed ledgers, consensus — the problems DreamBorn solves. Show don't tell. DreamBorn.ai is what an AI-native company looks like, not a description of one.\n\n**Primary audience:** Business builders, founders, and operators who want to understand what AI-native means in practice. Not analysts. People building things.\n\n---"
        },
        {
          "title": "Content Model",
          "level": 2,
          "body": "**Weekly output:** 14 pieces tied to a single theme Nova sets from BezelBrain.\n\n| Channel | Volume | Audience | Voice | Account |\n|---------|--------|----------|-------|---------|\n| Blog (dreamborn.ai) | 1/week | Corporate, AI-native companies | Founder narrative, principled | DreamBorn |\n| Substack | 3/week | Agent builders, Bezel audience | Technical, educational, honest | TBD (DreamBorn or Agentrophy) |\n| LinkedIn | 5/week | Manufacturers, distributors | Professional, use-case driven | Justin personal |\n| X/Twitter | 5/week (1 thread + 4 standalones) | Founders, builders | Raw, first-person, observational | Justin personal |\n\n**Weekly theme:** Nova proposes from BezelBrain. Justin can override at exec gate. Everything in the week connects back to it.\n\n**Publishing cadence:** Always one week ahead. Nova plans on Monday for the *following* week. Execution happens this week; content publishes next week. Nothing rushes to publish.\n\n**Batch / inventory mode:** Nova accepts a `weeks_ahead` param (default 1). In a power session, set to 4 — Nova plans 4 themes + 56 pieces, Engine dispatches all tasks simultaneously, agents run in parallel. The platform handles the volume natively. Nova checks inventory depth first — if a channel already has 2 weeks banked, she skips it and fills gaps only.\n\n**Editorial calendar (cockpit):** A daily calendar view in the cockpit Marketing tab (V1). Rows = channels, columns = days (current week + 3 weeks ahead). Cell states: green (approved/ready), yellow (draft in progress), empty (gap). One glance shows where content is thin.\n\n**What good looks like per channel:**\n- **Blog:** 800–1200 words. Opens with a real incident. Builds to a principle. Ends with what it means for companies. Justin's voice, Harper's structure.\n- **Substack:** 600–900 words each. Technical but readable. For people who have Claude Code open and want to understand the architecture. Concrete — real config, real outputs.\n- **LinkedIn:** 150–250 words. One-liner hook. Manufacturer/distributor frame. Ends with a question or sharp observation. Sounds like a person.\n- **X:** Short. Raw. What you'd say to another founder over coffee. Not a polished take — the thing you just figured out.\n\n**What bad looks like (agents must avoid):**\n- Generic AI takes (\"AI is transforming industries…\")\n- Explaining what agents are instead of showing what they do\n- LinkedIn posts that are just blog excerpts with line breaks\n- Substack articles that are 50% disclaimers and hedging\n\n---"
        },
        {
          "title": "AI-First Design Principle",
          "level": 2,
          "body": "Agents are the primary actors in this system. They index, retrieve, generate, evaluate, and route. Humans set direction and approve outcomes. No step in the pipeline requires a human to do mechanical work — only judgment calls belong at the exec gate.\n\nApplied here:\n- Nova evaluates topic freshness and content gaps before proposing — she doesn't just pick topics\n- Harper builds on previous posts, creates callbacks, develops series over time\n- Rosa chooses the right template for the content and generates variants before routing\n- Ivy runs a semantic quality check before surfacing to Justin — the gate is for real decisions, not proofreading\n- The asset index is agent-readable first — structured for query, not folder browsing\n\n---"
        },
        {
          "title": "Agent Roster",
          "level": 2,
          "body": "All agents: `department: marketing`, `model: claude-sonnet-4-6`"
        },
        {
          "title": "Nova — Content Strategist",
          "level": 3,
          "body": "- **Slug:** `nova`\n- **Role topic:** `roles.marketing-strategy`\n- **Schedule:** Weekly (Monday morning systemd timer)\n- **Skills:** None (strategy only — no content-writing skills)\n- **Plugins:** BezelBrain MCP, Google Drive (dreamborn), Supabase read\n- **What she does:**\n  1. Checks `weeks_ahead` param (default 1, up to N for batch/inventory mode)\n  2. Queries `content_assets` by `scheduled_date` range — finds gaps per channel per day\n  3. Queries `content_assets` for all `backlog` items — surfaces waiting ideas\n  4. Queries BezelBrain for fresh DreamBorn-relevant thinking\n  5. Sets theme(s) — one per week being planned\n  6. Assigns specific `scheduled_date` to each piece (e.g. LinkedIn Mon–Fri, Substack Mon/Wed/Fri, blog Wed, X spread across week)\n  7. Shapes pieces for gap days only — skips days/channels already covered by approved inventory\n  8. Writes ALL candidates to `content_assets` — selected as `draft` with `scheduled_date`, unselected as `backlog`\n  9. Saves `weekly_plan.md` (one per week) to Google Drive `/Marketing/Plans/`\n  10. Posts to `roles.exec` for approval — one gate per week being planned\n- **Exec gate:** Justin approves each week's plan or returns with edits. Can cut individual items before Engine dispatches.\n- **V1 source:** BezelBrain exclusively — 12+ weeks of material available.\n- **V2 enhancement:** Reads engagement data to inform angle selection. Firecrawl research added when BezelBrain coverage thins."
        },
        {
          "title": "Harper — DreamBorn Writer",
          "level": 3,
          "body": "- **Slug:** `harper`\n- **Role topic:** `roles.content-writer`\n- **Skills:** `content-writing`, `content-writing-styles`\n- **Plugins:** Google Drive (dreamborn), Supabase read/write\n- **What she does:** Long-form writing — blog (1/week) and Substack (3/week). Produces 3 full versions per piece. Standalone pieces that feel like a series — each works on its own but creates callbacks to prior work.\n- **Brief contains:** approved outline, multiple title/hook options, weekly theme, channel, scheduled_date, last 4 published pieces on that channel (for callbacks)\n- **Output per version:** Markdown with frontmatter (title, excerpt, tags, channel, scheduled_date, byline)\n- **Byline:** \"Written by Harper, DreamBorn Content Agent\"\n- **Stores to:** Google Drive `/Marketing/Content/Blog/` and `/Marketing/Content/Substack/`\n- **Writes to content_assets:** one row per version, grouped by `piece_id`, `version` 1/2/3"
        },
        {
          "title": "Jade — Social Adapter",
          "level": 3,
          "body": "- **Slug:** `jade`\n- **Role topic:** `roles.social`\n- **Skills:** `content-writing`, `content-writing-styles`\n- **Plugins:** Google Drive (dreamborn), Supabase read/write\n- **What she does:** LinkedIn (5/week) and X/Twitter (5/week: 1 thread + 4 standalones). 3 full versions per post. Writes channel-native — not repurposed Harper copy. LinkedIn = professional depth, manufacturer/distributor frame. X = raw, first-person, founder voice.\n- **Brief contains:** approved hook, angle, weekly theme, channel, scheduled_date, voice guidelines\n- **Output per version:** formatted post, character-count validated\n- **Stores to:** Google Drive `/Marketing/Content/Social/LinkedIn/` and `/Marketing/Content/Social/X/`\n- **Writes to content_assets:** one row per version, grouped by `piece_id`, `version` 1/2/3"
        },
        {
          "title": "Rosa — Visual Production",
          "level": 3,
          "body": "- **Slug:** `rosa`\n- **Role topic:** `roles.graphic`\n- **Plugins:** Puppeteer MCP, Google Drive (dreamborn), Supabase read/write\n- **What she does:** 6 graphics per Harper/Jade piece. Picks the right HTML template, fills with content, screenshots via Puppeteer. Justin selects one set at exec gate 2.\n- **Templates (ported from CCOS2, rebranded for DreamBorn brand tokens):**\n  - `infographic.html` — data-rich explainers\n  - `carousel.html` — LinkedIn multi-slide\n  - `stat_card.html` — single striking stat\n  - `quote_card.html` — pull quote / agent-authored insight\n  - `blog_hero.html` — header image for blog posts\n- **Stores to:** Google Drive `/Marketing/Graphics/<piece_id>/`\n- **V2:** Publishes to Cloudflare R2 for CDN delivery"
        },
        {
          "title": "Ivy — Publisher",
          "level": 3,
          "body": "- **Slug:** `ivy`\n- **Role topic:** `roles.publisher`\n- **Plugins:** Google Drive (dreamborn), Supabase read/write\n- **V1 behaviour:** Quality check on selected version → copy to `/Marketing/Published/` → update `content_assets` status to `staged`. On manual publish confirmation: status → `published`, `published_at` + `publish_url` recorded.\n- **V2 behaviour:** Publishes directly after staging. LinkedIn → Unipile API (`UNIPILE_API_TOKEN`). X → Twitter API v2. Substack → email API. Blog → DreamBorn.ai deploy pipeline.\n- **Design rationale:** Ivy is defined now so the slot exists. V2 activation is a config change, not a rebuild.\n\n---"
        },
        {
          "title": "Workflow Template: `weekly-content`",
          "level": 2,
          "body": "```\nStep 1 — Strategy + Outlines (Nova)\n  Trigger: Monday morning systemd timer (or manual with weeks_ahead param)\n  Actions:\n    1. Check content_assets for inventory depth per channel per day (gap analysis)\n    2. Query content_assets — backlog items + last 4 weeks published (avoid repeats)\n    3. Query BezelBrain — find unused DreamBorn-relevant thinking\n    4. Set weekly theme\n    5. For each gap day: assign channel, scheduled_date, topic\n    6. For blog + Substack pieces: produce multiple title options + multiple hook options + outline\n    7. For LinkedIn + X pieces: produce multiple title options + multiple hook options\n    8. Write ALL candidates to content_assets (selected=draft, unselected=backlog)\n    9. Save weekly_plan.md to Google Drive /Marketing/Plans/\n    10. Post to roles.exec\n\nStep 2 — Exec Gate 1 (Justin)\n  Justin makes full editorial edits — rewrites titles, sharpens hooks, cuts pieces, adds pieces.\n  Edits made directly in weekly_plan.md in Google Drive.\n  Approve → Engine advances to Step 3\n  Return with notes → Nova revises and re-posts\n\nStep 3 — Parallel: Write + Design concepts\n  All fire simultaneously. depends_on: Step 2 approval.\n\n  Harper tasks (dispatched to roles.content-writer):\n    - 3 full versions per blog piece\n    - 3 full versions per Substack article\n    Brief includes: approved outline, hooks, titles, weekly theme, last 4 published pieces on channel\n\n  Jade tasks (dispatched to roles.social):\n    - 3 full versions per LinkedIn post\n    - 3 full versions per X post (thread or standalone)\n    Brief includes: approved hook, angle, weekly theme, channel voice guidelines\n\n  Rosa tasks (dispatched to roles.graphic):\n    - 6 graphics per Harper/Jade piece (all channels)\n    Brief includes: piece topic, hook, stat, approved graphic type\n\nStep 4 — Exec Gate 2 (Justin — per piece)\n  Justin reviews all versions of each piece + all graphics.\n  Selects one version (sets is_selected=true) + one graphic set.\n  Selection sets scheduled_date → status moves to 'scheduled'.\n  Can return any piece for a rewrite with notes.\n\nStep 5 — Ivy (staging → publish)\n  V1: Quality check → copy selected version to /Marketing/Published/ →\n      update content_assets status to 'staged' → ready for manual posting\n      On publish: status → 'published', published_at + publish_url recorded\n  V2: Publishes directly after staging.\n      LinkedIn → Unipile API. X → Twitter API v2.\n      Substack → email API. Blog → DreamBorn.ai deploy pipeline.\n```\n\n---"
        },
        {
          "title": "V1 — Google Drive",
          "level": 3,
          "body": "**DreamBorn Shared Drive** (`0AHJ3Wr5leTnTUk9PVA`) — one folder per week, everything in it:\n\n```\nMarketing/\n  2026-05-04/                 ← week folder (Monday date)\n    weekly_plan.md            ← Nova's strategy + outlines\n    blog-v1.md                ← Harper (3 versions per piece)\n    blog-v2.md\n    blog-v3.md\n    substack-1-v1.md          ← Harper\n    substack-1-v2.md\n    substack-1-v3.md\n    substack-2-v1.md ... -v3.md\n    substack-3-v1.md ... -v3.md\n    linkedin-1-v1.md          ← Jade (3 versions × 5 posts)\n    linkedin-1-v2.md\n    linkedin-1-v3.md\n    ... (linkedin-2 through linkedin-5)\n    x-1-v1.md                 ← Jade (3 versions × 5 posts)\n    ... (x-2 through x-5)\n    graphics/\n      blog-1/                 ← Rosa (6 graphics per piece)\n      substack-1/\n      linkedin-1/\n      ...\n    published/                ← Ivy moves selected versions here\n  2026-05-11/                 ← next week\n    ...\n```\n\n**Naming convention:** `<channel>-<n>-v<version>.md` — e.g. `substack-2-v3.md`\n\n**Week folder ID** stored on the Stage record — all agents resolve their write path from it."
        },
        {
          "title": "V2 — Cloudflare R2 + Google Drive",
          "level": 3,
          "body": "When Cloudflare R2 is wired for DreamBorn:\n- Rosa writes final images to R2 → gets public CDN URL\n- `r2_url` populated in `content_assets`\n- Blog embeds and social posts use R2 URL\n- Google Drive becomes human review/organization layer only"
        },
        {
          "title": "Supabase: `content_assets` table",
          "level": 3,
          "body": "Every produced asset gets a row. Nova queries this before planning. Ivy updates on approval.\n\n```sql\nid             uuid primary key\npiece_id       uuid          -- groups versions of the same piece (all 3 Harper versions share a piece_id)\nversion        int           -- 1 | 2 | 3 (null for Nova's outline rows)\nis_selected    boolean       -- Justin chose this version at exec gate 2\nclient_id      text          -- 'dreamborn'\nscheduled_date date          -- specific publish day (null = vault/unscheduled)\nchannel        text          -- blog | substack | linkedin | x | graphic\ntopic          text\nangle          text\nhook           text          -- stat, claim, or question from BezelBrain\ntheme          text          -- Nova's weekly theme this piece belongs to\nstatus         text          -- backlog | draft | in_progress | staging | scheduled | staged | published\ndrive_file_id  text\ndrive_url      text\nr2_url         text          -- null until V2\npublished_at   timestamptz   -- set by Ivy on publish\npublish_url    text          -- live URL after publishing\ntags           text[]\ncreated_by     text          -- agent slug (nova, harper, jade, rosa, ivy)\ncreated_at     timestamptz\n```\n\n**Status lifecycle:**\n`backlog` → `draft` (Nova outlined, exec gate 1 pending) → `in_progress` (Harper/Jade/Rosa writing) → `staging` (versions ready, awaiting Justin's selection at exec gate 2) → `scheduled` (version chosen, scheduled_date set) → `staged` (Ivy quality-checked, in /Marketing/Published/) → `published` (live, published_at + publish_url set) (went out)\n\n---"
        },
        {
          "title": "HCS Topic Structure",
          "level": 2,
          "body": "Five new role topics required on testnet:\n\n| Topic | Purpose |\n|-------|---------|\n| `roles.marketing-strategy` | Nova claims weekly strategy tasks |\n| `roles.content-writer` | Harper claims blog and newsletter tasks |\n| `roles.social` | Jade claims LinkedIn and X tasks |\n| `roles.graphic` | Rosa claims graphic production tasks |\n| `roles.publisher` | Ivy claims publishing/staging tasks |\n\nOne new workflow template: `weekly-content`\n\n---"
        },
        {
          "title": "Rosa — Brand Tokens (DreamBorn)",
          "level": 2,
          "body": "Rosa's HTML templates need DreamBorn brand variables, separate from the B2BEA set in CCOS2. Brand tokens should be pulled from the DreamBorn website design spec (Zara's UX spec, task `0.0.8788451`) before Rosa's templates are built. At minimum:\n\n- Primary color (header bands, badges)\n- Accent color (borders, stat suffixes, tags)\n- Font pair (heading + body)\n- Footer format (brand name + domain)\n\n---"
        },
        {
          "title": "V2 — Content Studio",
          "level": 2,
          "body": "V1 ships a working content team. V2 turns it into a full AI-native content studio.\n\n**Content Atoms**\nNova produces atoms — the smallest unit of DreamBorn thinking: one core idea, one supporting stat, one angle, one quote. Harper, Jade, and Rosa all pull from the same atom pool independently. Coherence comes from shared source, not repurposing. Atoms are stored in Supabase and become the DAM retrieval unit — the Recall Studio model applied to DreamBorn's content.\n\n**Performance Feedback Loop**\nIvy reads engagement data from published posts (LinkedIn API, X API, Substack metrics) after each week. Nova receives a performance report alongside her BezelBrain query — she knows which topics, angles, and graphic types drove engagement. The plan improves every cycle.\n\n**Cloudflare R2**\nRosa publishes to R2. CDN URLs replace Drive share links in all published content.\n\n**Live Publishers**\nIvy activates fully. Justin approves; Ivy posts. The manual step disappears.\n\n**Studio Cockpit Tab**\nThe cockpit gains a Marketing tab — live view of the weekly pipeline: Nova's plan status, which agents are writing, pieces in approval queue, what published this week, performance from last week. The content team is visible, not a black box.\n\n---"
        },
        {
          "title": "Scope Boundary",
          "level": 2,
          "body": "**V1 includes:**\n- Five agent definitions (Nova, Harper, Jade, Rosa, Ivy)\n- `weekly-content` workflow template\n- `content_assets` Supabase migration (with `scheduled_date`, `backlog` status, `theme`, `hook` fields)\n- Rosa HTML templates rebranded for DreamBorn\n- Google Drive folder structure (Marketing subfolder + Calendar subfolder)\n- Five new HCS role topics\n- Nova's BezelBrain query integration + inventory-aware gap filling + `weeks_ahead` batch mode\n- Cockpit Marketing tab — daily editorial calendar (rows=channels, cols=days, 4-week view, gap highlighting)\n\n**V1 excludes (V2):**\n- Content atoms model\n- Cloudflare R2 integration\n- Live publishing APIs (LinkedIn, X, Substack, blog deploy pipeline)\n- Performance feedback loop\n- Bezel/Agentrophy second brand track"
        }
      ],
      "html_path": "artifacts/2026-04-27-dreamborn-marketing-agents-50838d1823.html",
      "json_path": "artifacts/2026-04-27-dreamborn-marketing-agents-50838d1823.json"
    },
    {
      "id": "2026-04-27-circuit-breaker-design-e410fc128d",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-circuit-breaker-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.678Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Circuit Breaker — Worker On/Off Control",
      "summary": "Circuit Breaker — Worker On/Off Control Date: 2026 04 27 Branch: feature/marketing agents Status: Approved for implementation Overview Add a circuit breaker to every worker agent — a flag that stops the runner from executing without stopping the systemd timer. Combined with a global kill switch that terminates all running processes immediately. Two mechanism...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Circuit Breaker — Worker On/Off Control",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**Branch:** feature/marketing-agents  \n**Status:** Approved for implementation\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Add a circuit breaker to every worker agent — a flag that stops the runner from executing without stopping the systemd timer. Combined with a global kill switch that terminates all running processes immediately.\n\nTwo mechanisms:\n- **Per-agent circuit breaker** — graceful pause, takes effect on next timer tick\n- **Global kill switch** — immediate process termination + all breakers open\n\n---"
        },
        {
          "title": "Storage",
          "level": 2,
          "body": "**Migration:** `supabase/migrations/034_circuit_breaker.sql`\n\nAdd one column to `agent_state`:\n\n```sql\nALTER TABLE agent_state\n  ADD COLUMN circuit_breaker TEXT NOT NULL DEFAULT 'closed'\n  CHECK (circuit_breaker IN ('open', 'closed'));\n```\n\n`'closed'` = normal (agent runs). `'open'` = paused (agent skips). Default `'closed'` — existing agents unaffected after migration.\n\nNo separate global flag. \"All paused\" = all rows have `circuit_breaker = 'open'`. Resume = patch rows back to `'closed'`.\n\n---"
        },
        {
          "title": "Runner Check",
          "level": 2,
          "body": "In `agents/shared/runner.py`, add `_check_circuit_breaker(sb)` called at the very top of `_run()` — before `fetch_inbox`, `fetch_work_items`, or any other logic.\n\nBehavior:\n- If `circuit_breaker = 'open'`: log `\"circuit breaker open — skipping\"`, set `agent_state.status = 'paused'`, return immediately\n- If Supabase is unreachable: fail to `'closed'` (agents keep running — don't block the platform on a DB hiccup)\n- If no row exists for this agent: treat as `'closed'`\n\n```python\ndef _check_circuit_breaker(self, sb: Client) -> bool:\n    \"\"\"Returns True if OK to run (closed), False if paused (open).\"\"\"\n    try:\n        row = sb.table(\"agent_state\").select(\"circuit_breaker\") \\\n                .eq(\"agent\", self.AGENT_ID).limit(1).execute()\n        if row.data:\n            return row.data[0].get(\"circuit_breaker\", \"closed\") == \"closed\"\n    except Exception as e:\n        log.warning(\"circuit_breaker check failed — defaulting to closed: %s\", e)\n    return True\n```\n\n`_run()` calls this first:\n\n```python\ndef _run(self, sb: Client, creds: dict) -> None:\n    if not self._check_circuit_breaker(sb):\n        log.info(\"%s circuit breaker open — skipping\", self.AGENT_ID)\n        self._update_agent_state(sb, \"paused\")\n        return\n    # ... rest of existing _run logic\n```\n\n---"
        },
        {
          "title": "Kill Endpoint",
          "level": 2,
          "body": "Add `POST /kill-agents` to `vps/hcs-post-server.js`.\n\nTwo-step execution:\n1. Patch all rows in `agent_state` → `circuit_breaker = 'open'`\n2. `pkill -f \"agents.shared.runner\"` — terminates all running runner processes\n\nResponse:\n\n```json\n{ \"ok\": true, \"killed\": true }\n```\n\n`pkill` exit code 0 = processes killed, 1 = nothing was running — both are valid. Either way, breakers are open and nothing restarts.\n\n---"
        },
        {
          "title": "CLI Script",
          "level": 2,
          "body": "`scripts/circuit-breaker.js` — run with `node --env-file=.env scripts/circuit-breaker.js`.\n\n```"
        },
        {
          "title": "Pause one agent (graceful — takes effect on next timer tick)",
          "level": 1,
          "body": "node scripts/circuit-breaker.js --agent quinn --open"
        },
        {
          "title": "Resume one agent",
          "level": 1,
          "body": "node scripts/circuit-breaker.js --agent quinn --close"
        },
        {
          "title": "Resume all agents (no process start — just clears all breakers)",
          "level": 1,
          "body": "node scripts/circuit-breaker.js --resume-all"
        },
        {
          "title": "Global kill (terminates all running workers NOW + opens all breakers)",
          "level": 1,
          "body": "node scripts/circuit-breaker.js --kill\n```\n\n- `--open` / `--close`: patch `agent_state` via Supabase (`REDKEY_SUPABASE_URL` + `REDKEY_SUPABASE_SECRET_KEY`)\n- `--kill`: POST to `http://87.99.154.64:3001/kill-agents`\n- `--resume-all`: patch all `agent_state` rows to `circuit_breaker = 'closed'`\n- Missing `--agent` with `--open`/`--close`: print usage and exit 1\n\n---"
        },
        {
          "title": "Per-agent toggle",
          "level": 3,
          "body": "In each agent row, add a toggle button next to the status dot:\n- Pause icon when `circuit_breaker = 'closed'` (agent is running normally)\n- Play icon when `circuit_breaker = 'open'` (agent is paused)\n- Clicking PATCHes `agent_state.circuit_breaker` for that agent via Supabase\n- When `open`, show a small orange \"paused\" badge on the agent row"
        },
        {
          "title": "Header buttons",
          "level": 3,
          "body": "Two buttons in the cockpit header:\n\n| Button | Color | Action |\n|--------|-------|--------|\n| Resume All | Green/neutral | Patches all `agent_state.circuit_breaker = 'closed'` |\n| Kill All | Red | Confirmation dialog → POST `/kill-agents` |\n\nConfirmation dialog text: *\"This will terminate all running workers immediately. Continue?\"*\n\nOn Kill All success: cockpit reflects all agents as paused (orange badges). Resume All clears them.\n\n---"
        },
        {
          "title": "Behavior Summary",
          "level": 2,
          "body": "| Action | Mechanism | Effect on running session | Effect on next tick |\n|--------|-----------|--------------------------|---------------------|\n| Per-agent pause | Supabase patch | None — finishes naturally | Runner exits at startup |\n| Per-agent resume | Supabase patch | N/A | Runner runs normally |\n| Global kill | POST /kill-agents | SIGTERM immediately | All runners skip |\n| Resume All | Supabase patch | N/A | All runners run normally |\n\n---"
        },
        {
          "title": "Implementation Tasks",
          "level": 2,
          "body": "1. Migration `034_circuit_breaker.sql` — add column to `agent_state`\n2. `runner.py` — add `_check_circuit_breaker()` + call at top of `_run()`\n3. `vps/hcs-post-server.js` — add `POST /kill-agents` route\n4. `scripts/circuit-breaker.js` — CLI script (4 modes)\n5. Cockpit — per-agent toggle button + Kill All / Resume All header buttons\n6. Deploy: SCP hcs-post-server.js + runner.py to VPS, restart services"
        }
      ],
      "html_path": "artifacts/2026-04-27-circuit-breaker-design-e410fc128d.html",
      "json_path": "artifacts/2026-04-27-circuit-breaker-design-e410fc128d.json"
    },
    {
      "id": "2026-04-27-agent-capabilities-design-1a3e00df22",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-27-agent-capabilities-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.676Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Agent Capabilities Design",
      "summary": "Agent Capabilities Design Date: 2026 04 27 Status: Draft Scope: How skills and plugins are defined, stored, and allocated to agents in the RedKey platform Problem Agents currently receive two things at runtime: a persona (inline text) and an MCP config (a file picked by naming convention). There is no structured concept of what an agent can do beyond its ide...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Agent Capabilities Design",
          "level": 1,
          "body": "**Date:** 2026-04-27  \n**Status:** Draft  \n**Scope:** How skills and plugins are defined, stored, and allocated to agents in the RedKey platform\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "Agents currently receive two things at runtime: a persona (inline text) and an MCP config (a file picked by naming convention). There is no structured concept of what an agent *can do* beyond its identity text. Skills don't exist. Plugin assignment is implicit — `mcp-engine.json` exists because someone created it manually; there's no declaration in the agent definition that engine uses engine-tools.\n\nThis becomes a problem as the agent roster grows and capabilities multiply. Which agents can post to HCS? Which can browse the web? Which have access to git tooling? Today you have to read the MCP file and the persona string to find out. There's no single place to declare it.\n\n---"
        },
        {
          "title": "Goal",
          "level": 2,
          "body": "A structured capability model where:\n- Every discrete skill (how to do something) lives as a versioned markdown file\n- Every plugin (a tool that calls something external) has an explicit config\n- Each agent definition declares exactly which skills and plugins it gets\n- The runner loads the right content at startup with no manual MCP file management\n\n---"
        },
        {
          "title": "Taxonomy",
          "level": 2,
          "body": "Three distinct layers. Each has a different form, ownership model, and runtime role.\n\n| Layer | What it is | Form | Runtime role |\n|---|---|---|---|\n| **Skill** | Instructions for HOW to do something | Markdown file | Injected into system prompt after persona |\n| **Plugin** | Executable tool that calls something external | MCP server + config | Passed to Claude as MCP server |\n| **Agent** | Autonomous actor with identity and role | Definition JSON + persona | The entity that loads skills and calls plugins |\n\nAn agent loads skills to know *how* to do work. It calls plugins to *actually* do it. Skills are context. Plugins are capability.\n\n---"
        },
        {
          "title": "Directory Structure",
          "level": 2,
          "body": "```\ncapabilities/\n  skills/\n    <name>.md          # plain markdown, injected into system prompt\n  plugins/\n    <name>/\n      config.json      # MCP server config stub\n```\n\nPlugin `config.json` points to existing JS server files in `agents/shared/mcp/`. The JS does not move as part of this design — that is a separate concern.\n\nExample plugin config (`capabilities/plugins/hedera-tools/config.json`):\n\n```json\n{\n  \"server\": \"hedera-tools\",\n  \"command\": \"node\",\n  \"args\": [\"agents/shared/mcp/hedera-tools.js\"]\n}\n```\n\nThe `server` field becomes the key in the assembled `mcpServers` object. Runner produces: `{ \"mcpServers\": { \"hedera-tools\": { \"command\": \"node\", \"args\": [...] } } }`.\n\n---"
        },
        {
          "title": "Agent Definition Schema",
          "level": 2,
          "body": "Two new optional arrays added to each agent definition JSON:\n\n```json\n{\n  \"slug\": \"quinn\",\n  \"name\": \"Quinn\",\n  \"department\": \"dev\",\n  \"model\": \"claude-sonnet-4-6\",\n  \"schedule_seconds\": 120,\n  \"roles\": [\"developer\"],\n  \"skills\": [\"git-workflow\", \"spec-reading\"],\n  \"plugins\": [\"hedera-tools\"],\n  \"persona\": \"...\"\n}\n```\n\n- `skills` — names resolving to `capabilities/skills/<name>.md`\n- `plugins` — names resolving to `capabilities/plugins/<name>/config.json`\n- Both are optional. An agent with neither behaves exactly as today.\n- Declaration is explicit per agent. No role-based defaults, no bundles, no inheritance. If Quinn and Arlo share the same skills, they both list them. Abstraction comes later if repetition warrants it.\n\n---"
        },
        {
          "title": "Runtime Behavior",
          "level": 2,
          "body": "At agent startup the runner does, in order:\n\n1. Read `skills` and `plugins` arrays from `agent_definitions` in Supabase\n2. For each skill: read `capabilities/skills/<name>.md`, append to system prompt after persona under a `## Skills` section header\n3. For each plugin: read `capabilities/plugins/<name>/config.json`, assemble into a single `mcpServers` object, write to a temp file, pass to Claude\n\nSkills are additive — they extend what the agent knows, they don't replace identity. Plugin assembly replaces the current `mcp-{agent_id}.json` file convention.\n\n---"
        },
        {
          "title": "Source of Truth",
          "level": 2,
          "body": "| What | Source of truth | Runtime read |\n|---|---|---|\n| Skill/plugin names per agent | Definition JSON → synced to Supabase `agent_definitions` | Supabase (same as `roles`, `persona`) |\n| Skill content | `capabilities/skills/<name>.md` | File, at startup |\n| Plugin config | `capabilities/plugins/<name>/config.json` | File, at startup |\n\nSupabase holds arrays of names. File content is never synced to Supabase.\n\n---"
        },
        {
          "title": "What This Replaces",
          "level": 2,
          "body": "| Current | Replaced by |\n|---|---|\n| `agents/shared/mcp.json` (default) | Explicit `plugins` array in each definition |\n| `agents/shared/mcp-engine.json` | `\"plugins\": [\"engine-tools\"]` in `engine.json` |\n| `agents/shared/mcp-atlas.json` | `\"plugins\": [\"atlas-tools\"]` in `atlas.json` |\n| `_mcp_config_path()` naming convention in runner | Plugin assembly loop reading from `capabilities/` |\n\nOld `mcp-*.json` files are deleted after migration is complete.\n\n---"
        },
        {
          "title": "Out of Scope",
          "level": 2,
          "body": "- Moving MCP JS server files to `capabilities/plugins/` — file co-location is a separate cleanup\n- Role-based capability defaults or bundle grouping — premature until repetition patterns are clear\n- Capability discovery or marketplace indexing — future concern, not runtime allocation\n- Skill versioning or conflict resolution — not needed yet"
        }
      ],
      "html_path": "artifacts/2026-04-27-agent-capabilities-design-1a3e00df22.html",
      "json_path": "artifacts/2026-04-27-agent-capabilities-design-1a3e00df22.json"
    },
    {
      "id": "2026-04-26-reflection-stage-design-0e9ac2f474",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-26-reflection-stage-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.674Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Reflection Stage Design",
      "summary": "Reflection Stage Design Purpose Every project produces knowledge. Without a structured capture, that knowledge disappears when the session ends. The Reflection stage makes learning first class — agents reflect on what happened, Mindy synthesizes it, and the result writes permanently to BezelBrain. Every future project starts smarter. Lifecycle Position Refle...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Purpose",
          "level": 2,
          "body": "Every project produces knowledge. Without a structured capture, that knowledge disappears when the session ends. The Reflection stage makes learning first-class — agents reflect on what happened, Mindy synthesizes it, and the result writes permanently to BezelBrain. Every future project starts smarter.\n\n---"
        },
        {
          "title": "Lifecycle Position",
          "level": 2,
          "body": "```\nDesign → Plan → Build → Reflection → Launch\n```\n\nReflection is the fourth named stage in every project. Build does not close until Reflection completes. Launch does not open until Reflection closes.\n\n---"
        },
        {
          "title": "1. Phase Check-ins (during Build)",
          "level": 3,
          "body": "After each Build phase closes, every agent who worked that phase posts a short structured note as part of phase close. This is not a separate dispatch — it is the final step of closing a phase.\n\n**Format:** 3-5 lines per agent, structured around the five categories (see below). Included in the task `output_ref` — same mechanism as any other task output, no new infrastructure needed.\n\n**Owner:** Each agent. No orchestration needed.\n\n**Storage:** Mindy reads each `output_ref` as phases close and appends the check-in to the living project context document. These accumulate across all phases and become the source material for the project synthesis.\n\n---"
        },
        {
          "title": "2. Project Synthesis (the Reflection stage)",
          "level": 3,
          "body": "After Build completes, Mindy opens the Reflection stage. This is the full retrospective.\n\n**Flow:**\n\n```\nBuild completes\n  ↓\nMindy opens Reflection stage\n  ↓\nReflection tasks dispatched to all agents (parallel, depends_on: [])\n  ↓\nEach agent reads their phase check-ins, reflects across the full project,\nposts task.complete with output_ref\n  ↓\nSynthesis task fires (depends_on: [all reflection tasks])\nMindy reads every output_ref, synthesizes across five categories\n  ↓\nExec gate — Justin reviews synthesized document\nJustin may add his own perspective before it commits\n  ↓\nFinal document writes to BezelBrain + project HCS history topic\nReflection stage closes\n```\n\n---"
        },
        {
          "title": "The Five Categories",
          "level": 2,
          "body": "Every agent reflects across the same five categories. Mindy's synthesis organizes the final document around these.\n\n| # | Category | What it captures |\n|---|---|---|\n| 1 | **What we did well** | Patterns, decisions, and approaches to repeat |\n| 2 | **What we can improve** | Process gaps, communication failures, handoff friction |\n| 3 | **What would make us better** | Tools, integrations, workflow changes that would have helped |\n| 4 | **What we learned from mistakes** | Wrong decisions — wrong scope, wrong architecture, wrong interpretation |\n| 5 | **Errors and corrections** | Specific moments: tried X, it failed, Y was the correct approach |\n\nCategory 5 is the most concrete and the most valuable over time. It accumulates into a library of tried-and-failed paths with proven corrections — future agents load this and skip the mistake entirely.\n\n---"
        },
        {
          "title": "Agent Roles",
          "level": 2,
          "body": "All agents who participated in the project receive a reflection task. Tasks run in parallel.\n\n| Agent | Reflects on |\n|---|---|\n| Quinn | Code decisions, implementation errors, patterns found or missed |\n| Vikram | Architecture decisions, review findings, things caught late that should have been caught in Design |\n| Priya | Spec quality, missing acceptance criteria, gaps that caused Quinn to post blocked |\n| Zara | UX spec completeness, components that needed revision after Quinn started |\n| Luna | QA failures, acceptance criteria that were ambiguous or untestable |\n| Mindy | Project management — task graph accuracy, blocking events, plan changes, dispatch decisions |\n\n---"
        },
        {
          "title": "Synthesis Document Structure",
          "level": 2,
          "body": "Mindy produces one structured document per project:\n\n```\nProject: [name]\nDate: [ISO date]\nAgents: [list]\nPhases completed: [N]"
        },
        {
          "title": "What We Did Well",
          "level": 2,
          "body": "[synthesized across all agents]"
        },
        {
          "title": "What We Can Improve",
          "level": 2,
          "body": "[synthesized across all agents]"
        },
        {
          "title": "What Would Make Us Better",
          "level": 2,
          "body": "[tools, process, communication]"
        },
        {
          "title": "What We Learned From Mistakes",
          "level": 2,
          "body": "[synthesized across all agents]"
        },
        {
          "title": "Errors and Corrections",
          "level": 2,
          "body": "[specific pairs: tried X → Y was correct]\n```\n\n---"
        },
        {
          "title": "BezelBrain Write",
          "level": 2,
          "body": "One memory entry per project. Tagged with:\n- `project_id`\n- `project_name`\n- `date`\n- `agents_involved`\n- `type: reflection`\n\nFuture agents load this at session start. The error-correction pairs in Category 5 are also indexed separately for retrieval — an agent encountering a similar problem can pull the correction directly without loading the full reflection.\n\n---"
        },
        {
          "title": "Exec Gate",
          "level": 2,
          "body": "Justin reviews the synthesized document before it commits to BezelBrain. This serves two purposes:\n\n1. **Quality gate** — catch anything the synthesis missed or got wrong\n2. **Human perspective** — Justin can add observations that agents cannot see (strategic context, client feedback, external factors)\n\nJustin's additions are marked `author: justin` in the final document. The exec gate is the only point in Reflection where Justin is required. Everything else runs autonomously.\n\n---"
        },
        {
          "title": "Entity Model",
          "level": 2,
          "body": "```\nProject\n  └── Stage: Reflection\n        └── Phase: Agent Reflections (parallel)\n              └── Task: Quinn reflection\n              └── Task: Vikram reflection\n              └── Task: Priya reflection\n              └── Task: Zara reflection\n              └── Task: Luna reflection\n              └── Task: Mindy reflection\n        └── Phase: Synthesis (depends_on: all reflection tasks)\n              └── Task: Mindy synthesis → exec gate → BezelBrain write\n```\n\n---"
        },
        {
          "title": "What This Builds Over Time",
          "level": 2,
          "body": "Each project adds one reflection document to BezelBrain. Across ten projects:\n\n- Patterns that worked appear repeatedly — agents learn to default to them\n- Mistakes that recur get flagged — process changes before the third occurrence\n- The error-correction library grows — agents skip known failure paths\n- Tools and workflow gaps accumulate — platform improvements are evidence-based, not guessed\n\nThe system does not just run projects. It gets better at running projects."
        }
      ],
      "html_path": "artifacts/2026-04-26-reflection-stage-design-0e9ac2f474.html",
      "json_path": "artifacts/2026-04-26-reflection-stage-design-0e9ac2f474.json"
    },
    {
      "id": "2026-04-25-platform-methodology-2efb803830",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-25-platform-methodology.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.673Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Platform Methodology — AI-First Project Execution",
      "summary": "Platform Methodology — AI First Project Execution Philosophy Most AI platforms automate existing workflows. This system asks a different question: what does project execution look like when AI is the default worker and humans are the decision layer? The answer: decisions are the only scarce resource. Research, specs, architecture, design, code, tests — agent...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Philosophy",
          "level": 2,
          "body": "Most AI platforms automate existing workflows. This system asks a different question: what does project execution look like when AI is the default worker and humans are the decision layer?\n\nThe answer: **decisions are the only scarce resource.** Research, specs, architecture, design, code, tests — agents produce these at near-zero marginal cost. The only thing that cannot be automated is judgment about what to build and whether it's right.\n\nThe system is optimized to make decisions fast, preserve them permanently (HCS), and propagate them to every downstream agent without loss.\n\n**The core principle:** front-load intelligence, back-end autonomy. By the time Build starts, every agent has enough context to execute without a human. The exec gates are in Design and Plan — not in Build.\n\n---"
        },
        {
          "title": "1. Design",
          "level": 3,
          "body": "*What are we building and how, in general, are we building it?*\n\nNo build work starts until Design is locked. Every downstream agent — Priya, Zara, Vikram, Quinn — must be able to execute with zero ambiguity from Design's output.\n\n**Deliverables:**\n\n| Artifact | Owner | Contains |\n|---|---|---|\n| PRD | Priya | Problem, users, user flows, features in/out, success criteria, constraints |\n| UX Spec | Zara | User flows, component specs, interaction patterns, design system decisions |\n| Architecture | Vikram | Data model, service boundaries, API design, tech stack decisions, security model, external integrations |\n| Decision Log | Mindy | Every significant decision made during Design — what was considered, what was chosen, why |\n| Constraints Doc | Mindy | Things Quinn cannot deviate from. Patterns to follow. Patterns to avoid. |\n\n**Design flow:**\n```\nPriya → PRD\n  ↓\nZara + Vikram in parallel (both informed by PRD)\n  ↓\nCoherence review — do UX and Architecture align?\n  ↓\nExec gate — Justin approves Design\n  ↓\nDesign locked\n```\n\n**Test for \"Design is done\":** Could you hand these documents to any agent and have them execute with zero blocked? If any product or architecture decision is unresolved, Design is not done.\n\n---"
        },
        {
          "title": "2. Plan",
          "level": 3,
          "body": "*What are the phases, what are the tasks, what are the specs, what are the dependencies?*\n\nPlan takes Design's decisions and translates them into an executable task graph. By the end of Plan, every Quinn task is fully contracted. Build starts with zero ambiguity.\n\n**Structure:**\n```\nPhase 1 — [name, goal, scope]\n  Task 1.1 — [full spec: schema, API contract, acceptance criteria, branch, constraints, scope boundary]\n  Task 1.2 — [full spec]\n  depends_on: []\n\nPhase 2 — [name, goal, scope]  \n  Task 2.1 — [full spec]\n  depends_on: []  ← default: parallel\n\nPhase 3 — [name, goal, scope]\n  Task 3.1 — [full spec]\n  depends_on: [phase_2]  ← only when genuinely coupled\n```\n\n**Default is parallel.** Phase specs do not depend on each other unless there is genuine coupling. The Architecture doc is the shared dependency — all Priyas read the same Vikram output.\n\n**Plan flow:**\n```\nMindy creates all phase spec tasks (depends_on: [] by default)\n  ↓\nMultiple Priyas spec all phases in parallel\n  ↓\nCoherence review — do all specs fit together?\n  - Interface contracts connect?\n  - No gaps in PRD coverage?\n  - No conflicting schema ownership?\n  ↓\nExec gate — Justin approves Plan\n  ↓\nMindy creates full task graph on HCS (all phases + tasks with depends_on)\nPlan locked → Build starts\n```\n\n---"
        },
        {
          "title": "3. Build",
          "level": 3,
          "body": "*Execute the plan. Autonomous.*\n\nOnce the Plan is approved, Build runs without exec gates unless something breaks the approved plan. Mindy manages. Engine dispatches. Agents execute.\n\n**Build flow:**\n```\nEngine — sees tasks with satisfied depends_on → dispatches to role queues\nQuinn × N — builds in parallel across independent phases\nLuna — verifies Quinn's output against acceptance criteria (tests in prod)\nVikram — code review on completed phases\nMindy — reads outputs, updates project context, handles blocks, adjusts plan if needed\n  → Exec gate only if plan needs to change\n```\n\n**Mindy's authority in Build:**\n- Adjust task briefs before Quinn starts\n- Re-dispatch blocked tasks with revised spec\n- Split a phase into two if needed\n- Cancel and replace tasks\n- Insert new tasks if gaps are discovered\n- Escalate to exec only when a change exceeds the approved plan\n\n---"
        },
        {
          "title": "Mindy — Product Manager",
          "level": 3,
          "body": "The intelligence layer above Engine. Owns the project from Claire handoff through Build completion. The only agent with a persistent relationship to a project over its lifetime.\n\n**Input:** Project from Claire (post exec approval of project definition)  \n**Output:** Completed project — all phases built, tested, reviewed\n\n**Responsibilities:**\n- Maintains the living project context document\n- Creates and adjusts the task graph\n- Dispatches agents (during Design and Plan phases)\n- Monitors Build autonomously\n- Escalates to exec only when the plan needs to change\n- Reads BezelBrain at session start, writes learnings at session end\n\n**Memory:**\n- *Project memory* — living context doc: decisions, constraints, interface contracts, deferred items\n- *Cross-project memory* — BezelBrain: learnings from prior projects injected at session start\n\n**Always knows:**\n- What stage the project is in\n- Who is working on what right now\n- What comes next (dependency graph)\n- What is blocked and why\n\n---"
        },
        {
          "title": "Claire — Coordinator",
          "level": 3,
          "body": "Company-level intake. Routes projects to Mindy. Never goes deep on a single project.\n\n**Input:** Project brief from Justin  \n**Output:** Project + Intake stage created, exec gate for project definition approval, then PM task dispatched to Mindy\n\n---"
        },
        {
          "title": "Priya — Business Analyst",
          "level": 3,
          "body": "Writes the PRD during Design. Writes all phase specs during Plan.\n\n**Input:** Project brief + Architecture (Vikram) + UX Spec (Zara) + phase scope from Mindy  \n**Output (Design):** PRD — problem, users, flows, features, success criteria  \n**Output (Plan):** Phase spec — schema, API contract, acceptance criteria, scope boundary, constraints, branch name, dependencies\n\n**Contract:** Every spec must have all seven elements before Mindy will dispatch it to Quinn. Incomplete specs go back to Priya.\n\n---"
        },
        {
          "title": "Zara — UX Designer",
          "level": 3,
          "body": "Designs the user experience during Design phase. Parallel with Vikram.\n\n**Input:** PRD from Priya  \n**Output:** UX Spec — user flows, component hierarchy, interaction patterns, design system decisions, component specs\n\n**Contract:** Every component Quinn builds must have a corresponding Zara spec. If a spec is missing, Quinn posts blocked.\n\n---"
        },
        {
          "title": "Vikram — Architect / Reviewer",
          "level": 3,
          "body": "Designs the technical architecture during Design. Reviews code during Build.\n\n**Input (Design):** PRD from Priya  \n**Output (Design):** Architecture — data model, API design, service boundaries, tech decisions, patterns, security model\n\n**Input (Review):** Quinn's completed branch + Priya's acceptance criteria  \n**Output (Review):** Pass or fail with specific line references. No vague feedback.\n\n---"
        },
        {
          "title": "Quinn — Developer",
          "level": 3,
          "body": "Implements exactly what the spec says. Never improvises. Posts blocked immediately if spec has a gap.\n\n**Input:** Priya's phase spec (complete) + Vikram's architecture + Zara's component spec + branch name  \n**Output:** Code on branch + summary of what was built + any deviations from spec\n\n**Task sizing:** One vertical slice — one feature or component, completable in one session, ~100–500 LOC, testable in isolation.\n\n**Contract:** If any of the seven spec elements are missing, post blocked immediately. Do not guess.\n\n---"
        },
        {
          "title": "Luna — QA",
          "level": 3,
          "body": "Verifies Quinn's work against acceptance criteria. Tests in prod.\n\n**Input:** Quinn's completed branch + Priya's acceptance criteria  \n**Output:** Pass or fail per criterion. If fail: exact what broke and why.\n\n**Contract:** If Luna fails a phase, it does not advance. Goes back to Quinn with Luna's specific failure report.\n\n---"
        },
        {
          "title": "Engine — State Machine",
          "level": 3,
          "body": "Walks the dependency graph. Dispatches tasks with satisfied dependencies. No intelligence, no opinion.\n\n**Rule:** If depends_on are all complete → post task.available to role queue. That's it.\n\nMindy modifies the graph. Engine executes it.\n\n---"
        },
        {
          "title": "The Task Spec Contract",
          "level": 2,
          "body": "Every task dispatched to Quinn must contain all seven elements:\n\n| Element | Description |\n|---|---|\n| **Scope** | Exactly what to build. Exactly what NOT to touch. |\n| **Schema** | Exact table names, column names, types. No interpretation. |\n| **API contract** | Method, path, request shape, response shape (if applicable) |\n| **Branch name** | Where the work goes |\n| **Acceptance criteria** | Specific, testable conditions. Luna verifies these. |\n| **Dependencies** | What prior work this builds on and where it lives |\n| **Constraints** | Patterns to follow. Patterns to avoid. From Vikram's architecture. |\n\nMissing any element → task goes back to Priya before Quinn sees it. Mindy gates this.\n\n---"
        },
        {
          "title": "Entity Model",
          "level": 2,
          "body": "```\nProject (HCS topic)\n  └── Stage: Intake\n  └── Stage: Design\n        └── Phase: Discovery (Priya)\n        └── Phase: UX Design (Zara)\n        └── Phase: Architecture (Vikram)\n  └── Stage: Plan\n        └── Phase: Spec Phase 1 (Priya)\n        └── Phase: Spec Phase 2 (Priya)\n        └── Phase: Coherence Review (Vikram)\n  └── Stage: Build\n        └── Phase 1\n              └── Task 1.1 (Quinn)\n              └── Task 1.2 (Quinn)\n        └── Phase 2\n              └── Task 2.1 (Quinn)\n  └── Stage: Launch\n```\n\nEvery entity is an HCS topic. The topic ID is the entity ID everywhere — Supabase PK, depends_on references, audit trail. Decisions are permanent and verifiable.\n\n---"
        },
        {
          "title": "The Goal",
          "level": 2,
          "body": "One exec approval unlocks an entire Build stage. Design and Plan are where Justin is deeply involved — reviewing decisions, not code. Build runs autonomously under Mindy's management. \n\nThe system's output isn't just software — it's a complete record of every decision made, on-chain, tamper-proof, from first brief to shipped product."
        }
      ],
      "html_path": "artifacts/2026-04-25-platform-methodology-2efb803830.html",
      "json_path": "artifacts/2026-04-25-platform-methodology-2efb803830.json"
    },
    {
      "id": "2026-04-25-agent-inbox-design-71a08a5ad9",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-25-agent-inbox-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.672Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Agent Inbox Design — HCS-10/11 Compliant Messaging",
      "summary": "Agent Inbox Design — HCS 10/11 Compliant Messaging Date: 2026 04 25 Status: Approved for implementation Overview Every agent (and Justin) has a persistent, on chain inbox. Agent to agent messages are posted to HCS topic topics first — Supabase is the fast read mirror. The listener bridges HCS → Supabase. The runner polls Supabase inbox as the fast path each ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Agent Inbox Design — HCS-10/11 Compliant Messaging",
          "level": 1,
          "body": "**Date:** 2026-04-25  \n**Status:** Approved for implementation\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Every agent (and Justin) has a persistent, on-chain inbox. Agent-to-agent messages are posted to HCS topic topics first — Supabase is the fast-read mirror. The listener bridges HCS → Supabase. The runner polls Supabase inbox as the fast path each cycle.\n\n---"
        },
        {
          "title": "Topic Structure Per Agent (HCS-10 Compliant)",
          "level": 2,
          "body": "Each agent gets **two HCS topics**, created once and stored in `agent_definitions`:\n\n| Topic | Memo Format | Purpose |\n|---|---|---|\n| **Inbound** | `hcs-10:0:3600:0:{accountId}` | Receives messages from other agents and system |\n| **Outbound** | `hcs-10:0:3600:1` | Agent's public activity log (future use) |\n\n`agent_definitions` gains two new columns: `inbound_topic_id`, `outbound_topic_id`.  \nExisting `hcs_topic_id` column is retired (was never populated).\n\nJustin (`slug: justin`) gets topics too — he is a first-class participant.\n\n---"
        },
        {
          "title": "Message Format (HCS-10 Compatible)",
          "level": 2,
          "body": "Messages posted to an agent's inbound topic:\n\n```json\n{\n  \"p\": \"hcs-10\",\n  \"op\": \"message\",\n  \"operator_id\": \"{sender_inbound_topic}@{sender_account}\",\n  \"data\": {\n    \"message_type\": \"task.blocked | task.complete | task.note | phase.note | project.note | feedback | fyi | review.request\",\n    \"subject\": \"Human-readable subject line\",\n    \"payload\": {},\n    \"ref_id\": \"0.0.XXXXX\",\n    \"ref_type\": \"task | phase | stage | project | agent\",\n    \"priority\": 1\n  },\n  \"ts\": \"ISO8601\"\n}\n```\n\n**Priority:** 1=urgent, 2=high, 3=normal, 4=low, 5=fyi\n\n**Internal shortcut:** Trusted internal agents can post directly without the full HCS-10 connection handshake. External agent interop (connection_request → connection_created → connection topic) is a future enhancement.\n\n---"
        },
        {
          "title": "Entity Notes",
          "level": 2,
          "body": "Agents can post notes directly to entity topics (tasks, phases, stages, projects):\n\n```json\n{\n  \"type\": \"task.note | phase.note | project.note\",\n  \"from_agent\": \"quinn\",\n  \"note\": \"markdown content\",\n  \"notify\": [\"mindy\", \"justin\"],\n  \"ts\": \"ISO8601\"\n}\n```\n\nThe listener routes `*.note` messages → inbox of agents in `notify` list.\n\n---"
        },
        {
          "title": "Supabase Inbox Table (`inbox`)",
          "level": 2,
          "body": "Fast-read mirror. Runner polls this each cycle.\n\n```sql\ninbox (\n  id                   uuid PK,\n  to_agent             text NOT NULL,       -- agent slug or 'ALL'\n  from_agent           text NOT NULL,       -- agent slug or 'system'\n  message_type         text NOT NULL,\n  subject              text NOT NULL,\n  payload              jsonb,\n  context              jsonb,               -- additional context for rich info sharing\n  ref_id               text,               -- entity topic_id or UUID\n  ref_type             text,               -- task | phase | stage | project | agent\n  priority             int DEFAULT 3,\n  processed            bool DEFAULT false,\n  processed_at         timestamptz,\n  processed_by_session uuid,\n  created_at           timestamptz DEFAULT now()\n)\n```\n\nIndexes: `(to_agent, processed, created_at)`, `(ref_id)`, `(from_agent, created_at desc)`\n\n---"
        },
        {
          "title": "New: `handle_agent_topics()`",
          "level": 3,
          "body": "- Queries `agent_definitions` for all `inbound_topic_id` values\n- Polls each, processes `op: \"message\"` → writes to Supabase `inbox`\n- Handles `*.note` on entity topics → routes to `notify` list inboxes"
        },
        {
          "title": "New: `send_inbox()` helper",
          "level": 3,
          "body": "Direct Supabase write for system-originated notifications (no round-trip through HCS):\n\n| Event observed | Who gets inbox message | Priority |\n|---|---|---|\n| `task.blocked` | mindy + justin | 1 (urgent) |\n| `task.complete` | engine | 3 (normal) |\n| `phase.complete` | engine + mindy | 2 (high) |\n| `*.note` | agents in `notify` field | per note |\n\n---"
        },
        {
          "title": "Runner Changes",
          "level": 2,
          "body": "`fetch_inbox()` in `base.py` already queries `inbox` table — no change needed once migration is applied and table exists.\n\n---"
        },
        {
          "title": "MCP Tool: `send_message`",
          "level": 2,
          "body": "Agents call this during sessions to send a message to another agent or Justin:\n\n```json\n{\n  \"name\": \"send_message\",\n  \"description\": \"Send a message to another agent or Justin. Posts to their HCS inbound topic (on-chain) and writes to Supabase inbox (fast-read). Use for: blocked issues, review requests, FYIs, feedback, questions.\",\n  \"inputSchema\": {\n    \"to_agent\": \"string — agent slug or 'ALL' or 'justin'\",\n    \"message_type\": \"string — 'feedback' | 'fyi' | 'review.request' | 'task.note' | ...\",\n    \"subject\": \"string\",\n    \"payload\": \"object — structured content\",\n    \"ref_id\": \"string — entity topic_id\",\n    \"ref_type\": \"string — task | phase | stage | project | agent\",\n    \"priority\": \"integer — 1-5\"\n  }\n}\n```\n\n**Flow:** `send_message` → post to recipient's `inbound_topic_id` on HCS → listener materializes to `inbox` on next cycle → recipient's runner sees it on next poll.\n\n**Fast-path alternative:** For urgent messages (priority ≤ 2), `send_message` also writes directly to Supabase `inbox` in addition to HCS, so recipient sees it within seconds not minutes.\n\n---"
        },
        {
          "title": "MCP Tool: `post_note`",
          "level": 2,
          "body": "Post a note to an entity topic. Creates on-chain commentary thread per entity.\n\n```json\n{\n  \"name\": \"post_note\",\n  \"description\": \"Post a note to a task, phase, stage, or project topic. Creates permanent on-chain record. Notified agents receive inbox message immediately.\",\n  \"inputSchema\": {\n    \"entity_id\": \"string — topic_id (0.0.XXXXX)\",\n    \"entity_type\": \"string — task | phase | stage | project\",\n    \"note\": \"string — markdown content\",\n    \"notify\": \"array of agent slugs to notify\"\n  }\n}\n```\n\n---"
        },
        {
          "title": "Implementation Steps",
          "level": 2,
          "body": "1. **Migration** `supabase/migrations/021_agent_topic_columns.sql` — add `inbound_topic_id`, `outbound_topic_id` to `agent_definitions`\n2. **Migration** `supabase/migrations/020_inbox.sql` — inbox table (already written)\n3. **Script** `scripts/create-agent-topics.js` — create HCS topics for all agents, update Supabase, republish HCS-11 profiles\n4. **Listener** — add `handle_agent_topics()`, `send_inbox()` helper, entity event routing\n5. **hedera-tools.js** — add `send_message` and `post_note` tools\n6. **Justin's inbox** — `node scripts/inbox.js` CLI reader\n\n---"
        },
        {
          "title": "HCS-11 Profile Shape Per Agent",
          "level": 2,
          "body": "Published to the shared definitions topic when agent topics are created:\n\n```json\n{\n  \"type\": \"agent_definition\",\n  \"agent\": {\n    \"slug\": \"quinn\",\n    \"name\": \"Quinn\",\n    \"hcs11_profile\": {\n      \"version\": \"1.0\",\n      \"type\": 1,\n      \"display_name\": \"Quinn\",\n      \"aiAgent\": {\n        \"type\": 1,\n        \"model\": \"claude-sonnet-4-6\",\n        \"capabilities\": [4, 16, 18]\n      },\n      \"inboundTopicId\": \"0.0.XXXXX\",\n      \"outboundTopicId\": \"0.0.XXXXX\"\n    }\n  }\n}\n```\n\nCapability codes used: 4=Code Generation, 16=Multi-Agent Coordination, 18=Workflow Automation. Per-agent capabilities differ by role."
        }
      ],
      "html_path": "artifacts/2026-04-25-agent-inbox-design-71a08a5ad9.html",
      "json_path": "artifacts/2026-04-25-agent-inbox-design-71a08a5ad9.json"
    },
    {
      "id": "2026-04-24-platform-entity-model-4bc903c65d",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-24-platform-entity-model.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.670Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "RedKey Platform — Entity Model v2",
      "summary": "RedKey Platform — Entity Model v2 Date: 2026 04 24 Status: Design complete, awaiting implementation spec Next step: Priya specs the implementation. Vikram architects the migration. What This Is A foundational redesign of how RedKey models work. The current system has workflow instances, UUIDs, and a flat execution model that can't express project lifecycles,...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "RedKey Platform — Entity Model v2",
          "level": 1,
          "body": "**Date:** 2026-04-24  \n**Status:** Design complete, awaiting implementation spec  \n**Next step:** Priya specs the implementation. Vikram architects the migration.\n\n---"
        },
        {
          "title": "What This Is",
          "level": 2,
          "body": "A foundational redesign of how RedKey models work. The current system has workflow_instances, UUIDs, and a flat execution model that can't express project lifecycles, department-agnostic work, or real control actions (cancel, hold, replace). This spec defines the clean model everything else builds on.\n\nKV continues on the current model. This lands as Platform Phase 3.\n\n---"
        },
        {
          "title": "Core Principles",
          "level": 2,
          "body": "**1. Workers receive tasks only.**  \nPriya, Quinn, Vikram, and all worker agents never see project, stage, or phase structure. They receive a task with a self-contained brief and execute it. Operations roles (Claire, Engine, Justin) own the structure above tasks.\n\n**2. HCS topic ID is the entity ID.**  \nEvery entity — project, stage, phase, task — has an HCS topic. The topic ID (`0.0.XXXXX`) is the primary key everywhere: Supabase tables, message payloads, dependency references, URLs. No UUIDs. Topic creation is always step one.\n\n**3. Supabase is current state, not a mirror.**  \nOne row per entity showing where it is right now. The listener applies HCS events as state transitions. If you need history, read the HCS topic. If you need current state, read Supabase. `cluster_events` becomes an audit log only.\n\n**4. Control actions originate on-chain.**  \nCancel, hold, resume — all HCS messages first. Supabase state follows from the listener. Writing status directly to Supabase is never a control action.\n\n**5. Stage types are configurable, not hardcoded.**  \nThe taxonomy works for engineering, sales, marketing, finance. Stage vocabulary is defined per deployment via the definitions topic.\n\n---"
        },
        {
          "title": "Entity Taxonomy",
          "level": 2,
          "body": "```\nProject  →  Stage  →  Phase  →  Task\n```\n\n| Entity | What it is | Example |\n|---|---|---|\n| **Project** | The thing being built. Long-lived, outlives all execution. | Knowledge Vault AI |\n| **Stage** | A major lifecycle episode with a defined type. | Build, Design, Release, Qualify |\n| **Phase** | A logical chunk of work within a stage. Optional for simple stages. | Phase 1: Foundation |\n| **Task** | The atomic work item an agent executes. Self-contained brief. | Write schema migrations |\n\n**Simpler work collapses levels naturally:**\n- One-off task: just a Task, no project or stage overhead\n- Small feature: Project → Stage → Task (no phases)\n- Full project: Project → multiple Stages → Phases → Tasks\n\n---"
        },
        {
          "title": "Stage Types",
          "level": 2,
          "body": "Configurable per deployment. Published to the `definitions` topic. Examples:\n\n**Engineering:** `design | architect | planning | build | break_fix | release | feature | maintenance`  \n**Sales:** `prospect | qualify | demo | proposal | negotiate | close | onboard`  \n**Marketing:** `strategy | brief | produce | review | publish | analyze`  \n**Finance:** `collect | reconcile | review | approve | file | report`\n\nStage type definitions are published to HCS like agent and role definitions. The engine treats all stage types identically — it routes tasks, checks dependencies, advances state. Meaning is in the persona and the brief.\n\n---"
        },
        {
          "title": "Operations vs Execution Roles",
          "level": 2,
          "body": "| Layer | Roles | What they see |\n|---|---|---|\n| Operations | coordinator (Claire), engine, exec (Justin) | Projects, stages, phases, tasks — create structure, advance state |\n| Execution | developer, reviewer, architect, ba, content, analyst, ... | Tasks only — self-contained brief, output path, prior output refs |\n\nRole definitions include a `role_type: operations | worker` field.\n\n---"
        },
        {
          "title": "Static topics (fixed at deployment)",
          "level": 3,
          "body": "| Logical name | What it is |\n|---|---|\n| `definitions` | Agent, role, stage-type, workflow template registry |\n| `roles.coordinator` | Operations queue — Claire |\n| `roles.engine` | Engine queue |\n| `roles.exec` | Justin exec review |\n| `roles.developer` | Work queue — Quinn |\n| `roles.reviewer` | Work queue — Vikram |\n| `roles.architect` | Work queue — Vikram |\n| `roles.ba` | Work queue — Priya |\n| `agents.*` | Per-agent status topics (unchanged) |"
        },
        {
          "title": "Dynamic topics (created per entity, topic ID = entity ID)",
          "level": 3,
          "body": "| Entity | Topic pattern | Created by |\n|---|---|---|\n| Project | `0.0.XXXXX` | Justin / intake agent |\n| Stage | `0.0.XXXXX` | Claire / coordinator |\n| Phase | `0.0.XXXXX` | Engine / claire_spawn |\n| Task | `0.0.XXXXX` | Engine |\n\nListener discovers dynamic topics by querying entity tables in Supabase each poll cycle.\n\n---"
        },
        {
          "title": "Project topic",
          "level": 3,
          "body": "```\nproject.created        title, brief, client_id, created_by, stage_sequence[]\nproject.stage_changed  from_stage, to_stage\nproject.on_hold        reason\nproject.resumed\nproject.deferred       reason, revisit_date\nproject.cancelled      reason\nproject.complete\n```"
        },
        {
          "title": "Stage topic",
          "level": 3,
          "body": "```\nstage.created          project_id, stage_type, title, step_snapshot[]\nstage.transition       from_step, to_step, output_ref\nstage.on_hold          reason\nstage.resumed\nstage.cancelled        reason\nstage.superseded       replaced_by: 0.0.XXXXX\nstage.complete\n```"
        },
        {
          "title": "Phase topic",
          "level": 3,
          "body": "```\nphase.created          stage_id, project_id, name, depends_on: [0.0.XXXXX]\nphase.started\nphase.on_hold          reason\nphase.resumed\nphase.cancelled        reason\nphase.complete\n```"
        },
        {
          "title": "Task topic",
          "level": 3,
          "body": "```\ntask.created           phase_id?, stage_id, project_id?, role, brief, depends_on: [0.0.XXXXX]\ntask.assigned          role, model_hint\ntask.claimed           agent, ts\ntask.on_hold           reason\ntask.resumed\ntask.blocked           reason\ntask.cancelled         reason, replaced_by: 0.0.XXXXX\ntask.complete          output_ref, cost_usd, duration_seconds, agent\n```"
        },
        {
          "title": "Role topics (work queues — shape change only)",
          "level": 3,
          "body": "```\ntask.available         task_id: 0.0.XXXXX, model_hint, posted_at\ntask.claim             task_id: 0.0.XXXXX, agent, ts\n```\n\nBrief is no longer in the role topic message. Agent fetches from `tasks.brief` in Supabase. Eliminates the HFS brief workaround entirely.\n\n---"
        },
        {
          "title": "Supabase Entity Tables",
          "level": 2,
          "body": "One row per entity. PK is the HCS topic ID (`0.0.XXXXX`)."
        },
        {
          "title": "`projects`",
          "level": 3,
          "body": "```sql\nid          text primary key,  -- 0.0.XXXXX\nclient_id   text not null,\ntitle       text not null,\nbrief       text,\nstatus      text not null,     -- active | on_hold | deferred | cancelled | complete\nactive_stage_id text,          -- current stage topic ID\ncreated_by  text,\ncreated_at  timestamptz\n```"
        },
        {
          "title": "`stages`",
          "level": 3,
          "body": "```sql\nid          text primary key,  -- 0.0.XXXXX\nproject_id  text references projects(id),\nclient_id   text not null,\nstage_type  text not null,     -- build | qualify | produce | etc (configurable)\ntitle       text,\nstatus      text not null,     -- active | paused | cancelled | superseded | complete\ncurrent_step int,\nsteps       jsonb,             -- step snapshot\ncreated_at  timestamptz\n```"
        },
        {
          "title": "`phases`",
          "level": 3,
          "body": "```sql\nid          text primary key,  -- 0.0.XXXXX\nstage_id    text references stages(id),\nproject_id  text,\nclient_id   text not null,\nname        text not null,\nstatus      text not null,     -- pending | active | on_hold | cancelled | complete\ndepends_on  text[],            -- phase topic IDs\ncreated_at  timestamptz\n```"
        },
        {
          "title": "`tasks`",
          "level": 3,
          "body": "```sql\nid          text primary key,  -- 0.0.XXXXX\nphase_id    text,              -- nullable — tasks can exist without a phase\nstage_id    text references stages(id),\nproject_id  text,\nclient_id   text not null,\nrole        text not null,\nagent       text,\nstatus      text not null,     -- created | assigned | claimed | in_progress | on_hold | blocked | cancelled | complete\nbrief       text,              -- materialized from task.created for fast agent lookup\ndepends_on  text[],            -- task topic IDs\noutput_ref  text,\nreplaced_by text,              -- task topic ID if cancelled and replaced\ncost_usd    numeric,\nduration_seconds int,\ncreated_at  timestamptz,\nupdated_at  timestamptz\n```\n\n---"
        }
      ],
      "html_path": "artifacts/2026-04-24-platform-entity-model-4bc903c65d.html",
      "json_path": "artifacts/2026-04-24-platform-entity-model-4bc903c65d.json"
    },
    {
      "id": "2026-04-24-crm-design-02967b1939",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-24-crm-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.669Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "RedKey CRM — Design Spec",
      "summary": "RedKey CRM — Design Spec Date: 2026 04 24 Status: Design approved, awaiting implementation plan Scope: BezelIQ internal CRM (first), client deployment pattern (follow on) Overview RedKey CRM is company infrastructure, not a SaaS subscription. Contacts, deals, and activities live in Supabase. Agents do all operational work. Justin only provides strategic inpu...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "RedKey CRM — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-24\n**Status:** Design approved, awaiting implementation plan\n**Scope:** BezelIQ internal CRM (first), client deployment pattern (follow-on)\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "RedKey CRM is company infrastructure, not a SaaS subscription. Contacts, deals, and activities live in Supabase. Agents do all operational work. Justin only provides strategic input. The CRM gets smarter as agents run — no manual data entry, no per-client licensing, no external dependency beyond Resend for email sending.\n\nTwenty CRM is used as the UI bootstrap for BezelIQ. Its data model is adopted as the schema foundation. The Twenty application is dissolved over time as the RedKey cockpit grows to cover the same views.\n\n---"
        },
        {
          "title": "Architecture",
          "level": 2,
          "body": "```\nTwenty full app (Docker on VPS)\n        ↓ connects to\nRedKey Supabase (Twenty's migrations applied)\n        ↓\nStable views (crm_contacts, crm_deals, crm_activities...)\n        ↓\n┌───────────────────────┬──────────────────────┐\n↓                       ↓                      ↓\nRedKey agents      Cockpit UI              Twenty UI\n(read/write views) (grows over time)      (used now, dissolves as cockpit grows)\n```\n\n**Single source of truth:** RedKey Supabase. Agents read and write directly via stable views. Any UI — Twenty or cockpit — is a view layer. No sync, no drift.\n\n**Dissolution path:**\n1. Launch: Twenty UI covers everything, cockpit covers nothing\n2. Build cockpit pipeline view → retire Twenty's pipeline view\n3. Build cockpit contact view → retire Twenty's contact view\n4. Build cockpit activity feed → retire Twenty's activity timeline\n5. Twenty app retired when cockpit coverage is complete\n\n---"
        },
        {
          "title": "Layer 1 — Twenty's tables (their migrations)",
          "level": 3,
          "body": "Twenty's app runs its own migrations against Supabase. These are Twenty's tables, Twenty's names. Agents never query these directly.\n\n| Table | What it is |\n|---|---|\n| `people` | Contacts — name, email, phone, LinkedIn |\n| `companies` | Companies / accounts |\n| `opportunities` | Deals — stage, amount, close date |\n| `pipeline_stages` | Configurable stages per pipeline |\n| `activities` | Emails, calls, meetings logged |\n| `notes` | Notes attached to any record |\n| `attachments` | Files |\n\nTwenty's `metadata` schema (custom objects/fields system) is left untouched."
        },
        {
          "title": "Layer 2 — Stable views (our abstraction)",
          "level": 3,
          "body": "Created immediately on top of Twenty's tables. Agents only ever touch these — never Twenty's raw tables. When Twenty upgrades and renames a column, the view is fixed — agents are unaffected.\n\n```sql\ncrm_contacts    → people          (filter by workspace_id, expose as client_id)\ncrm_companies   → companies       (filter by workspace_id, expose as client_id)\ncrm_deals       → opportunities   (filter by workspace_id, expose as client_id)\ncrm_activities  → activities      (filter by workspace_id, expose as client_id)\ncrm_pipeline    → pipeline_stages + pipelines (read-only join view)\n```\n\n**Client scoping:** Twenty uses `workspace_id` for multi-tenancy. Each BezelIQ workspace maps to one `client_id`. Stable views filter by `workspace_id` and expose it as `client_id` for consistency with the rest of RedKey. BezelIQ's CRM data and client CRM data never mix.\n\n**View writability:** Single-table views (`crm_contacts`, `crm_companies`, `crm_deals`, `crm_activities`) are directly updatable in Postgres — arlo writes to them like any table. Join views (`crm_pipeline`) are read-only; pipeline mutations go through a Supabase function rather than a direct view write."
        },
        {
          "title": "Strategic vs operational field separation",
          "level": 3,
          "body": "Strategic fields are human-owned. Operational fields are agent-owned. Neither crosses into the other's territory — enforced at the schema level.\n\n```sql\n-- Operational fields (arlo-owned, never human-edited)\nlast_activity_at, enriched_at, email_thread_count, open_count,\nlinkedin_url, company_size, industry, sequence_step, sequence_enrolled_at\n\n-- Strategic fields (Justin-owned, never agent-overwritten)\nstage_id, priority, strategy_note, relationship_note, recontact_at\n```"
        },
        {
          "title": "Sequence tables (new, not in Twenty)",
          "level": 3,
          "body": "```sql\ncrm_sequences         — sequence definition (name, steps as jsonb, client_id)\ncrm_sequence_contacts — enrollment: contact_id, sequence_id, current_step,\n                        next_due_at, status (active/complete/paused), client_id\n```\n\n---"
        },
        {
          "title": "Arlo — the CRM agent",
          "level": 3,
          "body": "**Agent ID:** `arlo`\n**Role topic:** `roles.crm`\n**Model:** Sonnet\n**Timer:** 30s (same as Engine)\n\nArlo handles all CRM work. Engine creates tasks, arlo claims and executes, posts results. Standard RedKey pattern — nothing novel.\n\n**Task types:**\n\n| Task | Trigger | What arlo does |\n|---|---|---|\n| Contact enrichment scan | Engine timer (hourly) | Scans `crm_contacts` for unenriched records, calls enrichment APIs, writes operational fields back |\n| Pipeline health check | Engine timer (daily) | Flags deals with no activity past threshold, posts summary to `roles.exec` |\n| Sequence step | Engine timer (30s) | Checks `crm_sequence_contacts` for `next_due_at` past due, drafts + sends via Resend, logs to `crm_activities`, advances `next_due_at` |\n| Strategic CRM write | Justin via Atlas | Atlas creates a task on `roles.crm` from conversation input — arlo writes to strategic fields only |\n| Ad-hoc CRM query | Justin via Atlas | Summarise pipeline, draft follow-up, flag contacts — any one-off work |"
        },
        {
          "title": "How arlo reads and writes",
          "level": 3,
          "body": "Direct Supabase client against stable views. No MCP server needed for data access. Resend is registered in `api_library` — arlo calls the Resend API for all outbound email.\n\n---"
        },
        {
          "title": "CRM Write Model",
          "level": 2,
          "body": "**The core principle:** Justin never manually updates operational data. The only input he provides is strategic judgment and relationship context — things an agent cannot supply."
        },
        {
          "title": "Operational data — automated",
          "level": 3,
          "body": "All contact data, activity history, email threads, meeting logs, enrichment, sequence tracking, and email engagement metrics flow in automatically from the ingestion layer.\n\n| Source | Connection | What arlo writes |\n|---|---|---|\n| Email | Twenty's native Gmail sync | Activities, contact discovery, thread history |\n| Calendar | Twenty's native calendar sync | Meetings logged, attendees linked to deals |\n| Quill meeting notes | Quill webhook → edge function → HCS → arlo | Notes on contact/deal, next steps extracted |\n| Website forms | Form POST → Supabase directly | New contact record, source tagged |\n| Resend | Resend webhook → HCS → arlo | Email sent/opened/clicked logged to `crm_activities` |\n| LinkedIn enrichment | Arlo timer (hourly) | Company, role, LinkedIn URL, headcount written to operational fields |"
        },
        {
          "title": "Strategic data — Justin via Atlas",
          "level": 3,
          "body": "Justin never opens a form. He tells Atlas in conversation:\n\n> *\"The Acme deal is stalled — budget freeze until Q3, recontact in July\"*\n> *\"Mark Sarah at Meridian as a priority — strong champion, CFO relationship\"*\n> *\"Move the Volta deal to Negotiation, we're close\"*\n\nAtlas creates a task on `roles.crm`. Arlo writes the strategic fields. Justin's input becomes a structured CRM record without him touching the UI.\n\n---"
        },
        {
          "title": "Email Stack",
          "level": 2,
          "body": "**Resend** is the sending infrastructure for all outbound CRM email.\n\n- Verify `bezeliq.com` (or `mail.bezeliq.com` for reputation isolation) in Resend\n- Set DNS once: SPF, DKIM, DMARC\n- All outbound — sequences and broadcasts — goes through Resend from `@bezeliq.com`\n- Resend handles deliverability, bounces, unsubscribes, open tracking\n- Resend webhooks post events back to an edge function → HCS → arlo logs to `crm_activities`\n- Resend registered in `api_library` for resolver to find on CRM intent\n\n**Domain warm-up:** warm `bezeliq.com` before sequences start at volume. Low-volume early-stage sending (BezelIQ's current state) is fine without warmup.\n\n---"
        },
        {
          "title": "Client Deployment Pattern",
          "level": 2,
          "body": "By the time RedKey deploys company infrastructure for clients, the cockpit has enough CRM coverage that clients never need to see Twenty. Clients get the RedKey-native CRM from day one.\n\n**Client onboarding sequence:**\n1. CRM migrations run against client's Supabase (same tables, same views)\n2. Arlo deployed with `client_id` scope\n3. Cockpit CRM views provisioned\n4. Client ingestion sources connected (their Gmail, calendar, forms, meeting notes)\n5. Client's sending domain verified in Resend\n\n**Full stack per client:**\n\n| Layer | What | Hosted where |\n|---|---|---|\n| Data | CRM tables + stable views | Client's Supabase |\n| Agent | Arlo (client_id scoped) | VPS (shared runner) |\n| Email | Resend (client's domain) | Resend (SaaS, per domain) |\n| UI | Cockpit CRM views | Client's cockpit deployment |\n| Ingestion | Gmail sync, calendar, forms, Quill | Connected at onboarding |\n\n**The product value:** clients get a CRM that is owned infrastructure (no SaaS subscription), natively integrated with their agent workflows, and zero manual data entry from day one. Every agent run teaches the system. Every deal, every contact, every activity is captured automatically.\n\n---"
        },
        {
          "title": "Open Questions",
          "level": 2,
          "body": "- **Quill API/webhook:** confirm Quill supports outbound webhooks or API for meeting note retrieval before designing the ingestion connector\n- **Twenty → Supabase compatibility:** test Twenty's Docker Compose with `PG_DATABASE_URL` pointed at Supabase before committing — RLS defaults and connection pooling (pgBouncer) may need configuration\n- **Arlo enrichment APIs:** choose enrichment provider (Clearbit, Apollo, People Data Labs) — evaluate cost, data quality, API availability. Clearbit is being absorbed into HubSpot which may affect availability.\n- **Sequence reply detection:** Resend webhooks cover opens/clicks but not replies. Reply detection requires Gmail API polling or a dedicated inbound email handler (e.g., Resend inbound, Postmark inbound).\n- **Broadcast vs sequence distinction in schema:** `crm_sequences` covers 1:1 sequences. Broadcast campaigns (mass email to a list) may need a separate `crm_campaigns` table — out of scope for v1 but worth noting."
        }
      ],
      "html_path": "artifacts/2026-04-24-crm-design-02967b1939.html",
      "json_path": "artifacts/2026-04-24-crm-design-02967b1939.json"
    },
    {
      "id": "2026-04-24-completion-verification-ee9fb7e284",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-24-completion-verification.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.667Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Completion Verification — Runner-Owned Task Governance",
      "summary": "Completion Verification — Runner Owned Task Governance Date: 2026 04 24 Status: Design Backlog: completion verification Problem Workers currently post task.complete themselves via the hedera tools MCP. The HCS topic receives completions before anything can validate them. The Engine advances workflow state based on the claim alone — there is no verification t...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Completion Verification — Runner-Owned Task Governance",
          "level": 1,
          "body": "**Date:** 2026-04-24  \n**Status:** Design  \n**Backlog:** `completion-verification`\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "Workers currently post `task.complete` themselves via the hedera-tools MCP. The HCS topic receives completions before anything can validate them. The Engine advances workflow state based on the claim alone — there is no verification that work was actually done, correctly, or at all.\n\nThis creates three failure modes:\n1. Worker produces no output (bug, timeout, misunderstood brief)\n2. Worker produces output that exists but is wrong (technically valid, semantically broken)\n3. Worker produces output that partially addresses the task (missing criteria)\n\nAll three advance the workflow as if complete.\n\n---"
        },
        {
          "title": "Core Principle",
          "level": 3,
          "body": "**The worker's job is to produce output. The runner's job is to verify it and own the HCS protocol.**\n\nWorkers stop knowing about `task.complete`. Their prompt says: write your output to `{output_path}` and stop. The runner handles everything from there — validation, retry, and posting to HCS.\n\nThis means **only verified completions ever reach HCS**. The on-chain record is clean.\n\n---"
        },
        {
          "title": "Completion Contract",
          "level": 3,
          "body": "Each step in a workflow template defines what \"done\" looks like. This is the completion contract. The runner reads it from the task brief and validates against it.\n\n```yaml\nsteps:\n  - role: developer\n    brief: \"implement the feature\"\n    completion:\n      type: file\n      path: \"feature/{task_id}/output.md\"\n      min_length: 100\n      evaluate: \"Must address all acceptance criteria in the brief. Code must be syntactically valid and complete.\"\n\n  - role: reviewer\n    brief: \"review and approve the PR\"\n    completion:\n      type: signal\n      signal: approved\n      evaluate: \"Must include a clear verdict (approved/rejected) and specific reasoning.\"\n\n  - role: ba\n    brief: \"run the integration tests\"\n    completion:\n      type: none          # pure side-effect — runner posts complete immediately after worker exits cleanly\n```\n\n**Completion types:**\n\n| Type | What runner checks |\n|---|---|\n| `file` | Path exists, non-empty, optionally `min_length` met |\n| `signal` | Worker output JSON contains the specified signal field |\n| `none` | Worker exits cleanly — runner posts complete immediately, no validation |\n\nThe `evaluate` field is optional. When present, Haiku reads it alongside the output to assess semantic correctness.\n\n---"
        },
        {
          "title": "Runner Verification Loop",
          "level": 3,
          "body": "```\n1. Runner assembles brief (includes completion contract)\n2. Invoke Claude CLI — worker attempt 1\n3. Mechanical check against completion contract\n   FAIL → skip Haiku, go to step 6 with mechanical failure reason\n\n4. Haiku evaluation (if evaluate field present)\n   Input: original brief + completion contract + worker output\n   Output: pass / fail + specific diagnosis\n   PASS → step 5\n   FAIL → go to step 6 with Haiku's diagnosis\n\n5. Post task.complete to HCS → done\n\n6. Build revisionist brief:\n   - Original task brief\n   - Completion contract (\"here is what done looks like\")\n   - Specific failure reason from step 3 or 4\n   - Explicit instruction: produce output that satisfies the contract\n\n7. Invoke Claude CLI — revisionist attempt\n8. Mechanical check\n   FAIL → post task.blocked (see below) → done\n\n9. Haiku evaluation (if evaluate field present)\n   PASS → post task.complete → done\n   FAIL → post task.blocked (see below) → done\n```\n\nOne attempt. If the revisionist can't fix it, block. The diagnosis quality is what makes one attempt sufficient — the worker knows exactly what it got wrong.\n\n---"
        },
        {
          "title": "Haiku Evaluator",
          "level": 3,
          "body": "Haiku is used for semantic evaluation only — it never produces task output. It receives:\n\n- The original task brief\n- The completion contract (type, path/signal, evaluate criteria)\n- The worker's output (file content or signal value)\n\nIt returns a structured verdict:\n\n```json\n{\n  \"pass\": false,\n  \"diagnosis\": \"Output addresses acceptance criteria 1 and 3 but omits error handling for the edge case described in criterion 2. No test coverage for the null input path.\"\n}\n```\n\n**Haiku is not invoked when `evaluate` is absent** — mechanical check is sufficient for those steps.\n\n**Haiku is skipped entirely when `type: none`** — no output, no evaluation.\n\nCost profile: Haiku evaluation is a small read-only call against an existing output. Negligible cost relative to the Sonnet worker invocation.\n\n---"
        },
        {
          "title": "task.blocked Payload",
          "level": 3,
          "body": "When both attempts fail, the runner posts `task.blocked` with full context:\n\n```json\n{\n  \"type\": \"task.blocked\",\n  \"task_id\": \"uuid\",\n  \"workflow_instance_id\": \"uuid\",\n  \"step_num\": 3,\n  \"agent\": \"quinn\",\n  \"completion_spec\": {\n    \"type\": \"file\",\n    \"path\": \"feature/abc/output.md\",\n    \"evaluate\": \"Must address all acceptance criteria...\"\n  },\n  \"attempts\": [\n    {\n      \"attempt\": 1,\n      \"stage\": \"haiku_evaluation\",\n      \"failure\": \"Output addresses criteria 1 and 3 but omits error handling for criterion 2. No test coverage for null input.\"\n    },\n    {\n      \"attempt\": 2,\n      \"stage\": \"mechanical\",\n      \"failure\": \"Output file missing at feature/abc/output.md\"\n    }\n  ],\n  \"ts\": \"ISO8601\"\n}\n```\n\nThe Engine escalates to Sonnet on `task.blocked`. Sonnet has enough context to decide: re-post to `roles.exec` for human review, or attempt a different resolution.\n\nThe `roles.exec` item Justin sees is specific and actionable — not \"Quinn got blocked\" but the exact criteria, the exact failures, and what each attempt produced.\n\n---"
        },
        {
          "title": "Worker Prompt Change",
          "level": 3,
          "body": "Current worker prompt includes instruction to post `task.complete` via hedera-tools MCP. This is removed.\n\nReplacement:\n\n```\nWhen your work is complete, write your output to: {output_path}\n\nDo not post any task.complete or task.blocked messages. The runner handles protocol.\nYour only job is to produce correct output at the specified path.\n```\n\nFor `type: signal` tasks, the worker writes a JSON file to `output_path` containing the signal field:\n\n```json\n{ \"signal\": \"approved\", \"reasoning\": \"...\" }\n```\n\nFor `type: none` tasks, no output instruction is needed — runner posts complete on clean exit.\n\n---"
        },
        {
          "title": "What Moves Where",
          "level": 3,
          "body": "| Responsibility | Before | After |\n|---|---|---|\n| Post `task.complete` | Worker (via MCP) | Runner |\n| Post `task.blocked` | Worker (via MCP) | Runner |\n| Validate output | Nobody | Runner (mechanical + Haiku) |\n| Retry on failure | Nobody | Runner (one revisionist attempt) |\n| Failure diagnosis | Nobody | Haiku evaluator |\n\n---"
        },
        {
          "title": "Implementation Notes",
          "level": 3,
          "body": "- Completion contract fields added to `workflow_steps` schema (migration)\n- Runner reads `completion` block from task brief at startup\n- Mechanical validation is a simple utility in `agents/shared/runner.py`\n- Haiku evaluation is a second Claude CLI invocation with a short, structured prompt\n- Revisionist brief is assembled by the runner — not a separate agent, just a re-invocation with additional context prepended\n- `task.blocked` payload extended with `completion_spec` + `attempts` array\n- Worker persona updated to remove HCS posting instructions\n\n---"
        },
        {
          "title": "What This Delivers",
          "level": 2,
          "body": "- **Clean on-chain record** — only verified completions reach HCS\n- **Self-healing by default** — most failures resolved in the runner, no human needed\n- **Actionable blocks** — when escalation is needed, Justin sees exactly why\n- **No output cases handled** — `type: none` is a first-class completion type\n- **Semantic correctness** — Haiku catches \"technically valid, functionally wrong\" before the workflow advances\n- **Cheap** — Haiku evaluation adds minimal cost; revisionist only fires on failure"
        }
      ],
      "html_path": "artifacts/2026-04-24-completion-verification-ee9fb7e284.html",
      "json_path": "artifacts/2026-04-24-completion-verification-ee9fb7e284.json"
    },
    {
      "id": "2026-04-23-semantic-intent-layer-0221f2221c",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-23-semantic-intent-layer.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.666Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Semantic Intent Layer",
      "summary": "Semantic Intent Layer Date: 2026 04 23 Status: Design Related: docs/specs/2026 04 23 brain architecture.md, docs/execution model.md Overview The intent layer sits between natural language expression and RedKey execution. A human (or agent) expresses what they want. The intent layer resolves that to RedKey workflow primitives, executes, and self heals when AP...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Semantic Intent Layer",
          "level": 1,
          "body": "**Date:** 2026-04-23  \n**Status:** Design  \n**Related:** `docs/specs/2026-04-23-brain-architecture.md`, `docs/execution-model.md`\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "The intent layer sits between natural language expression and RedKey execution. A human (or agent) expresses what they want. The intent layer resolves that to RedKey workflow primitives, executes, and self-heals when APIs break — without human intervention.\n\nThis is what makes BezelIQ's \"never breaks\" guarantee possible.\n\n```\nHuman/AI expression\n        ↓\n  Intent Layer  ←──── BezelBrain (human judgment)\n        ↓        ←──── Agent Brain (system knowledge)\n        ↓        ←──── API Library (available capabilities)\n  RedKey Orchestration\n  (Claire → Engine → Workers)\n```\n\n---"
        },
        {
          "title": "Position in Stack",
          "level": 2,
          "body": "Today, Claire receives raw natural language and classifies it from scratch. The intent layer becomes Claire's upstream — it does the resolution work, Claire confirms and executes. As the intent layer matures, Claire's classification role narrows.\n\n```\nToday:    Human → roles.coordinator → Claire (classifies) → workflow\nFuture:   Human → Intent Layer (resolves) → roles.coordinator → Claire (confirms) → workflow\n```\n\nBoth paths coexist. The intent layer is additive, not a replacement.\n\n---"
        },
        {
          "title": "The New Agent: Intent Resolver",
          "level": 2,
          "body": "**Agent ID:** `resolver`  \n**Role topic:** `roles.intent` (new topic to be created on HCS)  \n**Model:** Sonnet — judgment is required  \n**Timer:** 30s (same as Engine)\n\nThe resolver subscribes to `roles.intent`. When a message arrives it:\n1. Pulls context from BezelBrain + Agent Brain + API Library\n2. Resolves the intent to a structured workflow spec\n3. Posts to `roles.coordinator` for Claire to execute\n\nThe resolver never executes work directly. It resolves and hands off. Execution stays in the existing layer.\n\n---"
        },
        {
          "title": "Resolution Process",
          "level": 2,
          "body": "```\n1. Receive intent message from roles.intent\n   { content: \"find all HubSpot deals closing this quarter with no contact in 30 days\" }\n\n2. Query in parallel:\n   - BezelBrain: semantic search for relevant corporate knowledge + past decisions\n   - Agent Brain: semantic search for relevant resolution patterns + API behavior\n   - API Library: semantic search for capable APIs (\"CRM\", \"deal pipeline\", \"contact history\")\n\n3. Assess:\n   - Which APIs can fulfill this? (HubSpot — authenticated, available)\n   - Has this intent been resolved before? (check Agent Brain)\n   - Any corporate preferences that apply? (check BezelBrain)\n\n4. Resolve → structured workflow spec:\n   {\n     workflow_type: \"data_query\",\n     steps: [\n       { role: \"developer\", instruction: \"Query HubSpot for deals...\", api: \"hubspot\" }\n     ],\n     confidence: 0.92,\n     reasoning: \"HubSpot is the connected CRM. Matched prior resolution pattern.\"\n   }\n\n5. Post spec to roles.coordinator → Claire picks up\n```\n\n---"
        },
        {
          "title": "Confidence Model",
          "level": 2,
          "body": "| Confidence | Action |\n|---|---|\n| ≥ 0.85 | Execute directly — post to coordinator |\n| 0.60 – 0.84 | Present plan to human for confirmation before posting |\n| 0.40 – 0.59 | Ask one clarifying question, then re-resolve |\n| < 0.40 | Escalate to exec role with explanation |\n\nConfidence is calculated from: semantic match quality + prior resolution history + API availability + BezelBrain alignment.\n\n---"
        },
        {
          "title": "Self-Healing Loop",
          "level": 2,
          "body": "When a worker posts `task.blocked` with a schema/API error, the engine escalates to the resolver instead of halting the workflow.\n\n```\nWorker posts task.blocked\n  { reason: \"api_schema_error\", detail: \"field 'close_date' not found\", api: \"hubspot\" }\n\n  ↓ Engine detects escalation condition\n\nResolver receives re-resolution request:\n  1. Classify failure type: schema_change | auth_expired | deprecated | rate_limit | unknown\n  2. Query Agent Brain: \"HubSpot close_date schema error\" → finds prior pattern if exists\n  3. Re-resolve: inspect HubSpot OpenAPI spec, find correct field name\n  4. Patch the step instruction with updated field mapping\n  5. Re-post the step to roles.developer\n\n  ↓ On success:\n  Write to Agent Brain via teach_agent:\n    \"HubSpot: close_date renamed to expected_close as of [date]\"\n\n  ↓ On failure (unresolvable):\n  Post to roles.exec with full context\n  Mark workflow step as blocked with human-readable explanation\n  Do not halt entire workflow — other independent steps continue\n```\n\nEvery self-heal writes a learning. The corpus grows with every failure.\n\n---"
        },
        {
          "title": "API Library Integration",
          "level": 2,
          "body": "The resolver has read access to `api_library` (pgvector on RedKey Supabase).\n\nWhen resolving intent, semantic search finds capable APIs:\n- \"I need weather data\" → Open-Meteo (free, no auth), OpenWeatherMap (key)\n- \"I need deal pipeline data\" → HubSpot (OAuth, connected), Salesforce (not connected)\n- \"I need company filings\" → SEC EDGAR (free, no auth)\n\nThe resolver:\n- Prefers already-authenticated connections\n- Falls back to free/public APIs when capability is equivalent\n- Flags when no capable API is available — surfaced in resolution output\n\n---"
        },
        {
          "title": "API Library Schema",
          "level": 2,
          "body": "```sql\nCREATE TABLE api_library (\n  id              uuid PRIMARY KEY DEFAULT gen_random_uuid(),\n  api_id          text UNIQUE NOT NULL,        -- 'hubspot', 'open-meteo', 'sec-edgar'\n  name            text NOT NULL,\n  description     text,\n  capabilities    text[],                      -- human-readable: [\"deal pipeline\", \"contact history\"]\n  capabilities_embedding vector(1536),         -- semantic search target\n  auth_type       text NOT NULL,               -- 'none' | 'api_key' | 'oauth'\n  spec_url        text,                        -- OpenAPI/Swagger spec URL\n  base_url        text,\n  status          text NOT NULL DEFAULT 'active', -- 'active' | 'degraded' | 'deprecated'\n  discovered_by   text,                        -- 'api-scout' | 'manual'\n  hcs_sequence    bigint,                      -- sequence number from library.apis topic\n  last_verified   timestamptz,\n  metadata        jsonb,\n  created_at      timestamptz DEFAULT now()\n);\n\nCREATE INDEX api_library_capabilities_idx ON api_library\n  USING hnsw (capabilities_embedding vector_cosine_ops);\n```\n\n---"
        },
        {
          "title": "API Scout Agent",
          "level": 2,
          "body": "Continuously discovers new APIs and publishes them to HCS `library.apis` topic.\n\n**Agent ID:** `api-scout`  \n**Role topic:** `roles.scout` (timer-driven, no inbound work items)  \n**Timer:** 6 hours  \n\n**Sources scanned:**\n- Public API directories (APIs.guru, RapidAPI public listings)\n- Government data portals (data.gov, EDGAR, census.gov)\n- GitHub repos tagged `public-api`\n- Hacker News \"Show HN\" posts with API launches\n- Product Hunt (filter: developer tools, APIs)\n\n**On discovery:**\n1. Fetch OpenAPI spec if available\n2. Generate semantic description of capabilities using Haiku\n3. Publish to HCS `library.apis` topic\n4. Listener writes to `api_library` table\n\n**HCS message schema:**\n```json\n{\n  \"type\": \"api.discovered\",\n  \"api_id\": \"open-meteo\",\n  \"name\": \"Open-Meteo\",\n  \"capabilities\": [\"current weather\", \"forecast\", \"historical weather\", \"air quality\"],\n  \"auth_type\": \"none\",\n  \"spec_url\": \"https://open-meteo.com/en/docs\",\n  \"base_url\": \"https://api.open-meteo.com\",\n  \"discovered_by\": \"api-scout\",\n  \"client_id\": \"redkey\"\n}\n```\n\n---"
        },
        {
          "title": "Sentinel Agent",
          "level": 2,
          "body": "Monitors for competitive signals — specifically the self-healing + HCS combination being published before BezelIQ launches.\n\n**Agent ID:** `sentinel`  \n**Timer:** 1 hour  \n\n**Monitors:**\n- Hacker News: \"self-healing workflow\", \"self-healing API\", \"HCS agent\", \"Hedera orchestration\"\n- GitHub: new repos combining `hedera` + `orchestration` + `agent`\n- arXiv: papers on self-healing systems, agentic workflow execution\n- USPTO: patent filings on self-healing API/workflow systems\n- TechCrunch, VentureBeat: agent platform launches\n- Product Hunt: new launches tagged automation/workflow/agents\n- Hedera ecosystem: blog posts, developer announcements\n\n**On signal:**\n1. Write to `brain_memory` with `scope = 'corporate'`, `category = 'external'`, `source = 'sentinel'`\n2. Post alert to Atlas context injection (surfaces at next session start)\n3. If high relevance (competitive threat): also write to `roles.exec` for immediate review\n\n---"
        },
        {
          "title": "Expression Paths",
          "level": 2,
          "body": "Three ways intent enters the system:\n\n**1. Direct (current model)**\nHuman posts to `roles.coordinator`. Claire classifies from scratch. No resolver involved. Continues to work as-is.\n\n**2. Via BezelBrain**\nHuman promotes an idea via `brain-mcp` `contribute_to_project()`. brain-mcp posts to `roles.intent`. Resolver picks up with full BezelBrain context already available.\n\n**3. Via Atlas**\nAtlas has an `intent_resolve` tool in `mcp-atlas.json`. Justin describes what he wants in conversation. Atlas calls the tool. Resolver handles it.\n\n---"
        },
        {
          "title": "Learning Loop",
          "level": 2,
          "body": "```\nIntent expressed\n  ↓\nResolved → executed → complete\n  → write: \"intent X resolved via workflow Y, confidence Z\" → Agent Brain\n\nResolved → executed → step failed → self-healed → continued\n  → write: \"API X failure pattern, resolved by Y\" → Agent Brain\n\nResolved → executed → step failed → unresolvable → escalated\n  → write: \"intent X unresolvable with current API surface, reason Y\" → Agent Brain\n\nEvery execution teaches. Corpus grows. Self-healing improves.\n```\n\n---"
        },
        {
          "title": "What Gets Built (Implementation Sequence)",
          "level": 2,
          "body": "1. **Migration 014** — `brain_memory` table (brain architecture prerequisite)\n2. **Migration 015** — `api_library` table\n3. **`library.apis` HCS topic** — created on testnet\n4. **`roles.intent` HCS topic** — created on testnet\n5. **`brain-mcp` Edge Function** — on RedKey Supabase\n6. **`atlas-context.js` update** — BezelBrain section injection\n7. **`api-scout` agent** — definition + runner wiring\n8. **`sentinel` agent** — definition + runner wiring\n9. **`resolver` agent** — definition + runner wiring, `contribute_to_project` bridge\n10. **Engine update** — self-healing escalation to resolver on `task.blocked`\n11. **`mcp-atlas.json` update** — add `intent_resolve` tool\n\n---"
        },
        {
          "title": "Open Problems",
          "level": 2,
          "body": "- **Knowledge decay** — BezelBrain needs a periodic review surface for aging ideas. Not blocking v1 but needed before BezelBrain gets large.\n- **Confidence tuning** — thresholds (0.85, 0.60, 0.40) are estimated. Need real execution data to calibrate.\n- **Spec-less APIs** — many public APIs have no OpenAPI spec. Scout needs a fallback: capability inference from docs pages via scraping + Haiku.\n- **OAuth token lifecycle** — token refresh, expiry handling for authenticated APIs. Needs a credential manager component."
        }
      ],
      "html_path": "artifacts/2026-04-23-semantic-intent-layer-0221f2221c.html",
      "json_path": "artifacts/2026-04-23-semantic-intent-layer-0221f2221c.json"
    },
    {
      "id": "2026-04-23-project-structure-backlog-design-6962c31d9f",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-23-project-structure-backlog-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.664Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Project Structure + Backlog Design",
      "summary": "Project Structure + Backlog Design Date: 2026 04 23 Status: Approved Problem No persistent, machine readable record of what work is active or queued. At session start, Justin must reconstruct intent from conversation. Atlas has no \"what are we building\" signal beyond session summaries and memory search. Secondary: docs/ accumulated files from multiple conven...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Project Structure + Backlog Design",
          "level": 1,
          "body": "**Date:** 2026-04-23  \n**Status:** Approved\n\n---"
        },
        {
          "title": "Problem",
          "level": 2,
          "body": "No persistent, machine-readable record of what work is active or queued. At session start, Justin must reconstruct intent from conversation. Atlas has no \"what are we building\" signal beyond session summaries and memory search.\n\nSecondary: `docs/` accumulated files from multiple conventions with no clear separation between platform docs and client docs.\n\n---"
        },
        {
          "title": "Two Layers of Work",
          "level": 3,
          "body": "**RedKey (platform)** — work on the engine, agents, HCS infra, Atlas. Lives in this repo forever.\n\n**Client deployments** — projects that run *through* RedKey (CCOS2, CCOS3, future clients). Each client gets their own repo eventually. This repo holds a bootstrap stub until migration.\n\n---"
        },
        {
          "title": "Folder Structure",
          "level": 3,
          "body": "```\nredkey/\n  backlog.yaml              ← platform work items (RedKey engine, infra, Atlas)\n  ccos2/\n    backlog.yaml            ← CCOS2 work items (migrates to ccos2 repo)\n    docs/                   ← CCOS2 specs, briefs, design docs (migrates)\n    definitions/            ← agent definitions (already exists)\n  docs/                     ← platform docs only\n    execution-model.md\n    topic-map.md\n    roadmap.md\n    plans/                  ← dated implementation plans\n    specs/                  ← dated design specs\n    ideas/                  ← vision/exploration docs\n```\n\nClient migration: when CCOS2 gets its own repo, `ccos2/` lifts out wholesale. No restructuring needed.\n\n---"
        },
        {
          "title": "Backlog Schema",
          "level": 3,
          "body": "```yaml"
        },
        {
          "title": "backlog.yaml",
          "level": 1,
          "body": "items:\n  - id: slug-style-id\n    description: one line — what we're building or deciding\n    status: active        # active | queued | blocked | done\n    priority: 1           # lower = higher priority\n    notes: optional context, blockers, links\n```\n\nRules:\n- `done` items stay in the file as audit trail — Atlas filters them out at session start\n- You own the file. Atlas proposes changes mid-session; you commit.\n- One backlog per layer: `backlog.yaml` (platform), `ccos2/backlog.yaml` (CCOS2)\n\n---"
        },
        {
          "title": "Atlas Context Injection",
          "level": 3,
          "body": "`scripts/atlas-context.js` gets a new **Active Work** section injected before recent sessions. Logic:\n\n1. Read `backlog.yaml` from repo root\n2. If `ATLAS_CLIENT_ID` matches a client folder (e.g. `ccos2`), also read `ccos2/backlog.yaml`\n3. Filter out `status: done`, sort by `priority`\n4. Output as a markdown block:\n\n```"
        },
        {
          "title": "Active Work",
          "level": 2,
          "body": "**Platform**\n1. [active] quinn-step3 — Check Quinn completed marketing site step 3\n2. [queued] project-planning-design — Design phase/depends_on model for Claire + Engine\n\n**CCOS2**\n1. [active] marketing-site — redkey-marketing-site workflow in progress\n```\n\nIf no backlog file exists, section is omitted silently.\n\n---"
        },
        {
          "title": "Docs Convention",
          "level": 3,
          "body": "| Type | Location |\n|---|---|\n| Platform architecture docs | `docs/` root |\n| Design specs | `docs/specs/YYYY-MM-DD-<topic>-design.md` |\n| Implementation plans | `docs/plans/YYYY-MM-DD-<topic>.md` |\n| Ideas / exploration | `docs/ideas/` |\n| Client specs + briefs | `ccos2/docs/` (or `<client>/docs/`) |\n\n`docs/superpowers/` is removed. CLAUDE.md declares `docs/specs/` as the canonical spec location — this overrides the brainstorming skill default.\n\n---"
        },
        {
          "title": "What This Is Not",
          "level": 2,
          "body": "- Not a Supabase-backed work queue. That's Phase 3+ if needed.\n- Not agent-writable autonomously. Agents propose; humans commit.\n- Not a project management system. One flat prioritized list per layer is enough for now.\n\n---"
        },
        {
          "title": "Implementation",
          "level": 2,
          "body": "1. Create `backlog.yaml` at root with current platform items\n2. Create `ccos2/backlog.yaml` with current CCOS2 items\n3. Create `ccos2/docs/` folder\n4. Update `scripts/atlas-context.js` to inject Active Work section\n5. Update `redkey.yaml` atlas section to reference `atlas.sh` (not `run-architect.sh`)"
        }
      ],
      "html_path": "artifacts/2026-04-23-project-structure-backlog-design-6962c31d9f.html",
      "json_path": "artifacts/2026-04-23-project-structure-backlog-design-6962c31d9f.json"
    },
    {
      "id": "2026-04-23-platform-roadmap-0daca9b0ff",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-23-platform-roadmap.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.663Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "BezelIQ Platform Roadmap",
      "summary": "BezelIQ Platform Roadmap Date: 2026 04 23 Status: Active Supersedes: docs/roadmap.md The Play Build a platform to demonstrate, show its power, and generate quick cash. Two revenue tracks run in parallel: Product sale — we build your AI operations team, lump sum. CCOS2 is the proof. Tech license — here's the platform, deploy it yourself, revenue share. The de...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "BezelIQ Platform Roadmap",
          "level": 1,
          "body": "**Date:** 2026-04-23  \n**Status:** Active  \n**Supersedes:** `docs/roadmap.md`\n\n---"
        },
        {
          "title": "The Play",
          "level": 2,
          "body": "Build a platform to demonstrate, show its power, and generate quick cash. Two revenue tracks run in parallel:\n\n- **Product sale** — we build your AI operations team, lump sum. CCOS2 is the proof.\n- **Tech license** — here's the platform, deploy it yourself, revenue share.\n\nThe demo sequence proves both: **small → medium → big.**\n\n1. **Assistant** — personal AI, daily brief, task management, scheduled routines\n2. **Marketing** — content calendar, BDR outreach, watch it run in real time\n3. **Dev project** — big project decomposes into phases → tasks → execution, watch a phase complete end-to-end\n\n---"
        },
        {
          "title": "Priority 1 — Dev Projects",
          "level": 3,
          "body": "The platform must handle big projects today. A project decomposes into phases. Phases decompose into tasks. Tasks have dependencies. Claire orchestrates at every level.\n\n**What gets built:**\n\n**Data model extension:**\n- `workflow_instances` gains `parent_id uuid references workflow_instances(id)`\n- Three templates: `project`, `phase`, `dev_task`\n- `workflow_steps` gains `depends_on uuid[]` — task dependencies\n\n**Who does what:**\n- **BA (Priya)** does the intellectual decomposition — receives the project brief, produces the phase breakdown with specs, receives each phase and produces the task list. The thinking work.\n- **Claire** orchestrates state — spawns instances, routes work to the right role, advances the workflow when steps complete, holds at exec gates. The plumbing work.\n\n**Workflow hierarchy:**\n```\nProject instance\n  → Claire posts to roles.ba\n      → BA (Priya) produces: phase list, each phase named + scoped + specced\n      → Exec gate: Justin reviews phase breakdown before anything spawns\n  → Claire spawns N Phase instances, posts each to roles.ba\n      → BA (Priya) produces: task list for the phase, each task specced with dependencies\n      → Exec gate (optional): Justin reviews task breakdown\n  → Claire spawns M Task instances respecting dependency order\n      → dev_task: spec → code → review (existing)\n      → All tasks in phase complete → phase done → Claire reports up\n  → All phases complete → project done\n```\n\n**Claire's orchestration loop (extended):**\n- Receives BA output at each level, materializes child instances\n- Dependency gate: task not posted to queue until all `depends_on` tasks are complete\n- Holds at exec gates — workflow does not advance until approval recorded in Exec Inbox\n\n**Exec gates:**\n- Project phase breakdown complete → exec review before phases spawn\n- Phase task breakdown complete → exec review before tasks spawn (optional per template)\n- Gates surface in Exec Inbox (Priority 2)\n\n**Agent messaging + inbox:**\n- Any agent can post a message to any other agent via `agents.*` topics — informational only\n- Any agent can post to `roles.exec` to reach Justin directly — this is messaging, not task routing\n- Hard guardrail: only Claire posts to peer role topics (`roles.ba`, `roles.developer`, etc.) to route tasks\n- Each agent reads its own `agents.*` inbox at session start — messages injected as context alongside memory\n- `agents.justin` = lightweight channel for things worth knowing but not decisions needed\n- Messages that require a decision surface in Exec Inbox instead\n\n**Inbox read model:**\n- HCS messages mirrored into Supabase `agent_messages` table with status: `unread | relevant | consumed | skipped`\n- On session start, runner fetches all `unread` messages for the agent\n- **Haiku** classifies each message against the current task: relevant or not?\n- Relevant → inject into session context, mark `relevant`\n- Not relevant → do not inject, do not mark read — stays `unread` for a future task\n- After session completes → injected messages marked `consumed`\n- Messages are never silently dropped — they persist until a task makes them relevant\n\n**`agent_messages` table:**\n```sql\nagent_messages (\n  id            uuid PRIMARY KEY,\n  to_agent      text NOT NULL,\n  from_agent    text NOT NULL,\n  content       text NOT NULL,\n  context       jsonb,          -- workflow_instance_id, task_id if applicable\n  status        text DEFAULT 'unread',  -- unread | relevant | consumed | skipped\n  hcs_sequence  bigint,\n  hcs_topic     text,\n  created_at    timestamptz DEFAULT now(),\n  consumed_at   timestamptz\n)\n```\n\n---"
        },
        {
          "title": "Priority 2 — Cockpit (Project Monitor)",
          "level": 3,
          "body": "The Cockpit is the operational view for running projects. Not the full Boardroom yet — just the project and agent monitoring surface needed to run real work.\n\n**Four sections:**\n\n**Timeline**\n- Per-project Gantt view: phases as bars, tasks within phases\n- Status color: pending / in-progress / blocked / complete\n- Target dates on phases (set at project spawn, tracked against actual)\n- Dependency visualization — blocked tasks show what they're waiting on\n\n**Cost**\n- Per-project, per-phase, per-task: token usage × model rate = dollar cost\n- Running total as work progresses\n- Cost pulled from `task.complete` payloads (`model`, `token_count`, `duration_seconds`)\n\n**Structure**\n- Per-project breakdown view: how the project was decomposed by BA\n- Phase list with status, owner, target date\n- Each phase links to its artifacts: spec doc, design doc, roadmap, HCS definition snapshot\n- Task list within each phase — dependencies visualized, what's blocking what\n- The full paper trail from brief → phases → tasks, all in one place\n\n**Exec Inbox**\n- Everything needing Justin's attention: gates, blocked workflows, flagged items, escalations from agents\n- Priority-sorted. Oldest blocking item at top.\n- Each item: context, what's blocked, what decision is needed\n\n**Agent Status (sidebar)**\n- All running agents: role, current task, last activity timestamp\n- Idle agents shown — confirms platform is live\n- Quick view of what each agent completed today\n\n---"
        },
        {
          "title": "Full Platform Vision",
          "level": 2,
          "body": "Everything beyond the immediate priorities. Ordered by logical sequence."
        },
        {
          "title": "Phase 3 — Scheduling Primitive",
          "level": 3,
          "body": "Time-triggered and event-triggered workflows. Needed before Assistant and Marketing demos.\n\n- `scheduled_triggers` table: `id`, `name`, `workflow_type`, `schedule` (cron), `payload`, `client_id`, `active`\n- `pg_cron` job fires due triggers → posts work items to queue\n- Event triggers: `event_triggers` table, conditions evaluated on Supabase DB events or webhook inbound\n- Calendar data model: every workflow instance gets `scheduled_at`, `started_at`, `completed_at`"
        },
        {
          "title": "Phase 4 — The Boardroom",
          "level": 3,
          "body": "Full company OS. Extends the Cockpit into a strategic operating surface.\n\n**Sections:**\n- **Now** — live operations feed. BDR sent LinkedIn at 8:30, 8:47, 9:02. Who she sent to. What assistant is doing.\n- **Strategy** — declared goals and priorities. Lives in BezelBrain. Atlas owns it. Updated by talking to Atlas.\n- **Measuring Strategy** — KPIs tracking against strategic goals. Gap detection automated.\n- **Gaps** — delta between strategy and reality. Surfaced automatically.\n- **Planned** — calendar view of scheduled workflows. Content calendar. Upcoming milestones.\n- **Projects** — the Cockpit project view, embedded.\n- **Finance** — revenue, expenses, runway, invoices. Stripe + Mercury.\n- **Pipeline** — deals in flight, stage, expected close. HubSpot.\n- **Team** — agent roster. Who's running, idle, what they accomplished today.\n- **Exec Queue** — promoted from Cockpit, cross-domain. All decisions needed.\n- **Intelligence Digest** — what the system learned this week. BezelBrain contributions, Sentinel signals, patterns.\n\n**On naming:** The Boardroom, not Cockpit. This is where the company runs from."
        },
        {
          "title": "Phase 5 — Business Function Agents",
          "level": 3,
          "body": "Agent definitions + workflow templates for each business function.\n\n- **Assistant** — daily brief, task management, calendar awareness, morning routine\n- **Marketing / BDR** — content creation, LinkedIn outreach, campaign workflows, content calendar\n- **Sales** — HubSpot pipeline management, deal follow-ups, meeting prep\n- **Finance** — Stripe/Mercury reporting, invoice management, weekly revenue summary\n- **Sentinel** — competitive monitoring, signals posted to BezelBrain\n- **API Scout** — discovers new APIs, populates API Library"
        },
        {
          "title": "Phase 6 — Intelligence Layer",
          "level": 3,
          "body": "Intent expression → workflow execution. Self-healing when APIs break.\n\nFull spec: `docs/specs/2026-04-23-semantic-intent-layer.md`\n\n- Intent Resolver agent (`roles.intent`)\n- API Library (pgvector semantic search over available integrations)\n- Self-healing loop: `task.blocked` → escalate to resolver → re-resolve → continue\n- Every heal writes a learning to Agent Brain"
        },
        {
          "title": "Phase 7 — Platform / Multi-Tenant",
          "level": 3,
          "body": "RedKey as a licensable product.\n\n- Onboarding flow: new deployment in < 30 minutes via scripts\n- Usage billing: per-client token cost tracking → Stripe billing\n- Agent marketplace: browse and deploy community agent definitions\n- Customer portal: client-facing view of their own workflows\n\n---"
        },
        {
          "title": "Demo Script (When Ready)",
          "level": 2,
          "body": "**Small — Assistant:**\nOpen The Boardroom. Show Now section. Morning brief running. Daily tasks queued. \"This is your AI chief of staff.\"\n\n**Medium — Marketing:**\nShow calendar. BDR messages scheduled. Watch one fire at exactly 8:30 — LinkedIn outreach to a named prospect. Content post went live at 9am. \"This is your AI marketing and sales team.\"\n\n**Big — Dev project:**\nSubmit a real project brief. Priya (BA) reads it, breaks it into 4 phases with specs. Exec Inbox fires — review the breakdown, approve. Claire spawns Phase 1. Priya specs the tasks, dependencies mapped. Agents claim and work. Open Structure view — see the full paper trail: brief → phases → tasks → specs linked. \"This is your AI engineering team taking a project from brief to shipped.\"\n\n---"
        },
        {
          "title": "What Stays Hidden",
          "level": 2,
          "body": "The underlying infrastructure is not referenced in any UI, demo, or external document. All external language uses: \"durable execution,\" \"distributed agents,\" \"guaranteed delivery,\" \"permanent audit trail.\" The specific technology is a strategic advantage revealed at the right moment — not before.\n\n---"
        },
        {
          "title": "Gaps Still Open",
          "level": 2,
          "body": "- **Testing framework** — how do you test a workflow before running on production? Needed before platform licensing.\n- **Credential manager** — OAuth token lifecycle for multi-tenant authenticated APIs.\n- **Notification system** — webhooks and email when workflows fail or need attention.\n- **Strategy definition format** — how Strategy is structured in BezelBrain for measurement. Atlas-owned but needs a schema."
        },
        {
          "title": "Deferred — Saved to BezelBrain",
          "level": 2,
          "body": "- **Agent reflection** (BezelBrain ID: f5e5b842-6ecc-4130-956b-f6873b78db96) — after task.complete, agents reflect on their own work. Two patterns: immediate reflection as final workflow step; cool-down reflection via scheduled_trigger 24h after phase complete. Severity model routes findings to backlog, Exec Inbox, or immediate halt. Compounding intelligence via Agent Brain. Build after inbox capabilities ship."
        }
      ],
      "html_path": "artifacts/2026-04-23-platform-roadmap-0daca9b0ff.html",
      "json_path": "artifacts/2026-04-23-platform-roadmap-0daca9b0ff.json"
    },
    {
      "id": "2026-04-23-brain-architecture-94c50b47a8",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-23-brain-architecture.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.661Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Brain Architecture",
      "summary": "Brain Architecture Date: 2026 04 23 Status: Design Related: docs/specs/2026 04 23 semantic intent layer.md, docs/specs/2026 04 22 atlas agent memory design.md Overview Three distinct knowledge layers with clear ownership, access boundaries, and promotion paths. Each layer serves a different purpose and has different access rules. Personal Brain What it is: P...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Brain Architecture",
          "level": 1,
          "body": "**Date:** 2026-04-23  \n**Status:** Design  \n**Related:** `docs/specs/2026-04-23-semantic-intent-layer.md`, `docs/specs/2026-04-22-atlas-agent-memory-design.md`\n\n---"
        },
        {
          "title": "Overview",
          "level": 2,
          "body": "Three distinct knowledge layers with clear ownership, access boundaries, and promotion paths. Each layer serves a different purpose and has different access rules.\n\n```\nPersonal Brain     — per person, private, never reaches agents\nBezelBrain         — company intelligence, shared, agents read it\nAgent Brain        — platform learning, agents write it, powers self-healing\n```\n\n---"
        },
        {
          "title": "Personal Brain",
          "level": 2,
          "body": "**What it is:** Private thought capture per operator. Justin's thoughts stay Justin's. Richard's stay Richard's. Nothing in Personal Brain is ever surfaced to agents or to other people.\n\n**Storage:** `brain_memory` WHERE `scope = 'personal'` AND `user_id = '<person>'`\n\n**Access:** Exclusively via `brain-mcp` with the correct per-user key. No other path exists to this data.\n\n**Use:** Think out loud, capture observations, park half-formed ideas. The only action that moves data out of Personal Brain is an explicit promote.\n\n---"
        },
        {
          "title": "BezelBrain",
          "level": 2,
          "body": "**What it is:** BezelIQ's organizational intelligence hub. Shared across all team members. Captures thoughts, ideas, knowledge, and external intelligence. Ideas promote into RedKey projects. As the company grows, this is the onboarding corpus — everything the company knows lives here.\n\n**Storage:** `brain_memory` WHERE `scope = 'corporate'`\n\n**Access:**\n- Write: via `brain-mcp` (direct capture or promoted from Personal Brain)\n- Read by humans: via `brain-mcp` search tools\n- Read by agents: via `atlas-context.js` only — not open MCP access. No agent MCP config includes `brain-mcp`.\n\n**Categories:**\n- `thought` — observation, note, reaction\n- `idea` — something worth doing, not yet a project\n- `knowledge` — established fact, decision, principle the company holds\n- `external` — competitive signal, research, API discovery, sentinel output\n- `agent_insight` — surfaced from Agent Brain, worth human attention\n\n**Promotion paths:**\n1. Personal → BezelBrain: `contribute(thought_id)` in brain-mcp — scope becomes `corporate`\n2. BezelBrain idea → RedKey project: `contribute_to_project(thought_id, context?)` — brain-mcp posts to coordinator topic, Claire picks up, Priya specs it, workflow created\n3. Agent Brain → BezelBrain: agents write `category = 'agent_insight'` when they identify something worth human attention (e.g. \"HubSpot schema changed again — third time this quarter\")\n\n**Visibility field:** `visibility = 'team' | 'public'` — default `team`. Added now so future contractor/external scoping doesn't require a migration.\n\n---"
        },
        {
          "title": "Agent Brain",
          "level": 2,
          "body": "**What it is:** What the platform learns through execution. Written by agents, not humans. This is the memory that powers self-healing — API behavior patterns, resolution history, what worked when something broke.\n\n**Storage:** Existing `agent_memory` table in RedKey Supabase.\n\n**Written by:**\n- `teach_agent` MCP tool (Atlas injecting learnings into specific agents)\n- Self-healing loop (resolution patterns when APIs break and get fixed)\n- Agents proactively via `teach_agent` when they identify a durable learning\n\n**Read by:**\n- `atlas-context.js` (relevant memories injected into Atlas sessions)\n- Intent layer (queried during resolution and self-healing)\n\n**Upward flow to BezelBrain:** When an agent identifies an insight worth human attention, it writes to `brain_memory` with `scope = 'corporate'`, `category = 'agent_insight'`, `source = 'agent'`. This surfaces in Atlas context for human review.\n\n---"
        },
        {
          "title": "brain_memory",
          "level": 3,
          "body": "```sql\nCREATE TABLE brain_memory (\n  id              uuid PRIMARY KEY DEFAULT gen_random_uuid(),\n  content         text NOT NULL,\n  embedding       vector(1536),\n  user_id         text,                        -- 'justin' | 'richard' | null (for corporate-direct)\n  scope           text NOT NULL DEFAULT 'personal', -- 'personal' | 'corporate'\n  category        text,                        -- 'thought' | 'idea' | 'knowledge' | 'external' | 'agent_insight'\n  contributed_by  text,                        -- who originally created it (preserved through promotion)\n  visibility      text NOT NULL DEFAULT 'team', -- 'team' | 'public'\n  tags            text[],\n  source          text,                        -- 'brain-mcp' | 'sentinel' | 'api-scout' | 'agent'\n  workflow_context jsonb,                      -- active workflow/step at capture time (auto-tagged)\n  metadata        jsonb,\n  created_at      timestamptz DEFAULT now(),\n  updated_at      timestamptz DEFAULT now()\n);\n\nCREATE INDEX brain_memory_embedding_idx ON brain_memory\n  USING hnsw (embedding vector_cosine_ops);\n\nCREATE INDEX brain_memory_scope_idx ON brain_memory (scope);\nCREATE INDEX brain_memory_user_scope_idx ON brain_memory (user_id, scope);\n```\n\n---"
        },
        {
          "title": "brain-mcp Edge Function",
          "level": 2,
          "body": "**Hosted on:** RedKey Supabase (`tseqkbyqyrctrkihllss`)  \n**Auth:** `x-brain-key` header or `?key=` query param → resolves to `user_id`  \n**Secrets:** `BRAIN_KEY_JUSTIN`, `BRAIN_KEY_RICHARD` (one per operator)"
        },
        {
          "title": "Tools",
          "level": 3,
          "body": "**capture_thought**\n```\ncontent: string\nscope?: 'personal' | 'corporate'  — default 'personal'\ncategory?: string\ntags?: string[]\n```\nSaves to `brain_memory`. Auto-tags `workflow_context` by querying RedKey for active workflows at capture time.\n\n**search_thoughts**\n```\nquery: string\nscope?: 'personal' | 'corporate' | 'both'  — default: personal for user's own, corporate for both\nlimit?: number  — default 10\nthreshold?: number  — default 0.5\n```\nSemantic search via pgvector. Personal searches are user-scoped. Corporate searches see all corporate entries regardless of contributor.\n\n**list_thoughts**\n```\nscope?: string\ncategory?: string\nlimit?: number\ndays?: number\n```\n\n**contribute**\n```\nthought_id: string\n```\nPromotes a personal thought to corporate. Preserves `contributed_by`. Scope becomes `corporate`.\n\n**contribute_to_project**\n```\nthought_id: string\ncontext?: string  — additional framing for Claire/Priya\n```\nPromotes idea to BezelBrain as `scope = 'corporate'`, then posts to `roles.coordinator` HCS topic to trigger a RedKey workflow. Claire picks it up, Priya specs it.\n\n**thought_stats**\nSummary: total by scope, category distribution, top tags, top contributors."
        },
        {
          "title": "System awareness",
          "level": 3,
          "body": "`brain-mcp` has read access to RedKey Supabase (`workflow_instances`, `cluster_events`) to:\n- Auto-tag captures with current workflow context\n- Enrich search results with system state relevance\n- Proactively surface relevant thoughts when context changes\n\n---"
        },
        {
          "title": "atlas-context.js Integration",
          "level": 2,
          "body": "Corporate brain is injected into every Atlas session before recent memories:\n\n```js\n// Query corporate brain — recent + semantically relevant\nconst corporate = await supabase\n  .from('brain_memory')\n  .select('content, category, contributed_by, created_at, tags')\n  .eq('scope', 'corporate')\n  .order('created_at', { ascending: false })\n  .limit(15);\n\n// If topic provided, also run semantic search on corporate brain\nif (topic) {\n  const relevant = await semanticSearch('brain_memory', topic, { scope: 'corporate', limit: 10 });\n}\n```\n\nAppears as `## BezelBrain` section in Atlas context, above recent memories.\n\n---"
        },
        {
          "title": "Access Summary",
          "level": 2,
          "body": "| Layer | brain-mcp (personal key) | atlas-context.js | Agent MCP | Intent layer |\n|---|---|---|---|---|\n| Personal Brain | ✅ own only | ✗ | ✗ | ✗ |\n| BezelBrain | ✅ read/write | ✅ read | ✗ | ✅ read |\n| Agent Brain | ✗ | ✅ read | ✅ write via teach_agent | ✅ read/write |\n\n---"
        },
        {
          "title": "What This Replaces",
          "level": 2,
          "body": "- `open-brain-mcp` in the `ccos` repo — retired\n- `capture_thought` tool in `ccos2-gateway` — retired\n- `park_idea` tool in `ccos2-gateway` — retired\n- Thought data migration from both sources → `brain_memory` (follow-on task)"
        }
      ],
      "html_path": "artifacts/2026-04-23-brain-architecture-94c50b47a8.html",
      "json_path": "artifacts/2026-04-23-brain-architecture-94c50b47a8.json"
    },
    {
      "id": "2026-04-22-atlas-agent-memory-design-cb2806df3c",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-22-atlas-agent-memory-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.659Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Atlas + Agent Memory — Design Spec",
      "summary": "Atlas + Agent Memory — Design Spec Date: 2026 04 22 Status: Draft — pending implementation plan Author: Justin King + Claude (brainstorming session) Why We Are Building This RedKey's differentiator is not that it runs agents — every platform does that. The differentiator is that RedKey agents learn . Every session, every task, every review leaves a trace. Th...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Atlas + Agent Memory — Design Spec",
          "level": 1,
          "body": "**Date:** 2026-04-22  \n**Status:** Draft — pending implementation plan  \n**Author:** Justin King + Claude (brainstorming session)\n\n---"
        },
        {
          "title": "Why We Are Building This",
          "level": 2,
          "body": "RedKey's differentiator is not that it runs agents — every platform does that. The differentiator is that **RedKey agents learn**. Every session, every task, every review leaves a trace. The longer the platform runs, the smarter every agent becomes. This is institutional knowledge as infrastructure.\n\nWithout this, agents reset every session. Quinn solves the same problem twice. Vikram flags the same issue on the twentieth PR that he flagged on the first. Priya writes specs that repeat historical mistakes. The platform is stateless, which means it doesn't compound.\n\nWith Supabase-backed semantic memory, the platform compounds. Insights are embedded, indexed, and retrieved when relevant. A pattern noticed on CCOS2 improves behavior on a new client deployment. A decision made six months ago surfaces automatically when the same question arises again.\n\nThis is the investor story: *our agents don't just respond — they build institutional knowledge. The longer they run, the better they get.*\n\n---"
        },
        {
          "title": "Atlas",
          "level": 2,
          "body": "Atlas is the platform-level strategic architect for RedKey. He is not a workflow worker. He does not process tasks on a timer. He is Justin's thinking partner for designing and improving the RedKey platform itself — how to make agents smarter, workflows better, the architecture stronger.\n\n**Atlas is distinct from Vikram.** Vikram is the dev architect: he reviews specs and PRs, enforces the stack, gates merges. Atlas operates upstream — he helps design the system before anything reaches Vikram.\n\nAtlas has two capabilities no other agent has:\n\n1. **Cross-client visibility** — he sees memory and patterns across all deployments (CCOS2, RedKey, new co, and future clients) with no client scoping\n2. **Memory curation** — he can inject learnings directly into other agents' memories, improving the fleet without persona changes or redeployment\n\nAtlas runs as an **interactive Claude Code session**, not a headless daemon. You launch him via a script, have a design conversation, and he walks in oriented every time — pre-loaded with relevant past decisions, recent session summaries, and cross-client patterns.\n\n**Agent definition:** Atlas is registered as a RedKey employee — an `agent_definition` on HCS with `roles.architect`. He does not run on a timer. His \"deployment\" is the launch script.\n\n---"
        },
        {
          "title": "Memory Taxonomy — Who Needs What",
          "level": 2,
          "body": "Different agents need different memory. The design is unified (same tables, same retrieval pattern) but scoped per agent type.\n\n| Agent | Personal memory | Project memory | Cross-client? |\n|---|---|---|---|\n| **Atlas** | All platform design history, decisions, architectural patterns | All workflow instances across the portfolio | Yes — that's his job |\n| **Claire** | Classification patterns, workflow template selection history | Prior projects for this client | No |\n| **Priya** | What specs have worked, what got rejected, successful brief patterns | All prior steps of the current workflow | No |\n| **Vikram** | Recurring violations, stack patterns, PR review history | Full project thread — spec, exec approval, Quinn's build | No |\n| **Quinn** | How he's solved similar problems, tech debt he's noticed | Spec + exec approval + prior output | No |\n| **Engine** | None — deterministic state machine | Already held in `workflow_instances` | No |\n\n**Project memory is not a separate concept.** It is `agent_memory` rows tagged with `workflow_instance_id`. Any agent on a workflow queries their personal memory plus the project thread using the same table and the same retrieval mechanism — just different tag filters.\n\n---"
        },
        {
          "title": "Schema",
          "level": 2,
          "body": "Three tables. All client-scoped. Identical whether stored in one Supabase (Option A, current) or per-client Supabase instances (Option B, future). Atlas queries without client scope.\n\n```sql\n-- Enable pgvector\ncreate extension if not exists vector;\n\n-- Semantic memory — embedded insights, decisions, patterns, learnings\n-- NOTE: vector(1536) matches OpenAI text-embedding-3-small / ada-002.\n-- The embedding model must be chosen before the table is created — the dimension\n-- is fixed at creation time and cannot be altered without dropping and rebuilding\n-- the index. Implementation must commit to a model and document it.\ncreate table agent_memory (\n  id          uuid primary key default gen_random_uuid(),\n  client_id   text not null,\n  agent_id    text not null,\n  session_id  uuid,\n  content     text not null,\n  embedding   vector(1536),\n  tags        text[],           -- e.g. ['pr-review', 'workflow:uuid', 'decision']\n  created_at  timestamptz default now()\n);\ncreate index on agent_memory using ivfflat (embedding vector_cosine_ops);\ncreate index on agent_memory (client_id, agent_id, created_at desc);\n\n-- Sessions — one row per conversation or worker run\ncreate table agent_sessions (\n  id              uuid primary key default gen_random_uuid(),\n  client_id       text not null,\n  agent_id        text not null,\n  summary         text,\n  started_at      timestamptz default now(),\n  ended_at        timestamptz,\n  last_checkpoint timestamptz,\n  metadata        jsonb default '{}'\n);\ncreate index on agent_sessions (client_id, agent_id, started_at desc);\n\n-- Messages — full conversation log (Atlas) or task log (workers)\ncreate table agent_messages (\n  id          uuid primary key default gen_random_uuid(),\n  session_id  uuid references agent_sessions(id),\n  client_id   text not null,\n  agent_id    text not null,\n  role        text not null,   -- 'user' | 'assistant'\n  content     text not null,\n  created_at  timestamptz default now()\n);\ncreate index on agent_messages (session_id, created_at);\n```\n\n**RLS:** Worker agents enforce `WHERE client_id = ?` at the policy level. Atlas uses service-role — no client restriction.\n\n---"
        },
        {
          "title": "Session Start — Context Assembly",
          "level": 3,
          "body": "Before Claude launches, the context script runs:\n\n1. Embed the opening topic or seed phrase\n2. Semantic search: retrieve top-K relevant memories for this agent (+ cross-client for Atlas)\n3. Pull last 3 session summaries for recency context\n4. If recovering from a crash (session with no `ended_at`): load raw message log as additional context\n5. Assemble context block → write to temp file → pass via `--append-system-prompt-file`\n\nThe agent walks in oriented. No manual loading step. No skill to invoke."
        },
        {
          "title": "Mid-Session — Durable Capture",
          "level": 3,
          "body": "Memory is written continuously, not only at the end:\n\n- **Every turn:** message written to `agent_messages` via Claude Code post-turn hook (Atlas) or MCP tool (worker agents). Session is durable from the first exchange.\n- **Every 5–10 turns:** checkpoint triggered automatically — extract insights from recent turns, embed, write to `agent_memory`. `last_checkpoint` updated on session row.\n- **Manual force:** `/log` skill — triggers immediate checkpoint on demand. Use when you've just made an important decision and want it locked in before the conversation moves on."
        },
        {
          "title": "Session End — Memory Consolidation",
          "level": 3,
          "body": "1. Summarize the full session (1 paragraph) → stored in `agent_sessions.summary`\n2. Extract 3–10 discrete insights (\"we decided X\", \"pattern Y recurring on CCOS2\", \"Atlas flagged Z as technical debt\")\n3. Embed each insight → insert into `agent_memory` with tags\n4. `ended_at` written on session row\n\n---"
        },
        {
          "title": "Atlas Launch Script",
          "level": 2,
          "body": "```bash\n#!/usr/bin/env bash"
        },
        {
          "title": "run-architect.sh — assemble Supabase context, launch interactive Atlas session",
          "level": 1,
          "body": "topic=\"${1:-}\"\nnode scripts/atlas-context.js \"$topic\" > /tmp/atlas-context.md\nexec claude \\\n  --append-system-prompt-file definitions/agents/atlas-persona.md \\\n  --append-system-prompt-file /tmp/atlas-context.md \\\n  --add-dir .\n```\n\nShell alias for seamless invocation from anywhere:\n\n```bash\nalias atlas=\"~/downloads/cc/projects/redkey/run-architect.sh\"\n```\n\n`atlas` → context assembles from Supabase → session opens with full orientation.\n\n---"
        },
        {
          "title": "Forcing Improvements Into Agent Memory",
          "level": 2,
          "body": "Agents improve through two mechanisms:"
        },
        {
          "title": "Manual — `/teach` Skill",
          "level": 3,
          "body": "A skill that writes directly to `agent_memory` for any agent, from any session:\n\n```\n/teach vikram \"Always verify async error handling coverage before PR approval — Quinn consistently misses this\"\n/teach quinn \"Prefer explicit error types over generic catch blocks — Vikram flags this on every review\"\n/teach priya \"Specs must include explicit output contracts for every step — Claire needs these to create workflow instances\"\n```\n\nThe learning is embedded and written immediately. It surfaces for the target agent whenever semantically relevant work triggers it. No persona update. No redeployment. No retraining.\n\n**Dependency:** `/teach` calls the same embedding API used by the memory system to generate the vector before writing. The embedding model must be consistent across all writes to `agent_memory` — mixing models produces incomparable vectors and breaks similarity search."
        },
        {
          "title": "Autonomous — Atlas as Memory Curator",
          "level": 3,
          "body": "Atlas has cross-client, cross-agent visibility. As part of his role, he identifies patterns no single agent can see:\n\n- Quinn on CCOS2 and Quinn on new co are both missing the same thing\n- Vikram has flagged the same stack violation twelve times across three clients\n- Priya's specs for a particular workflow type consistently underspecify async contracts\n\nWhen Atlas identifies a pattern, he pushes the learning into the relevant agent's memory directly — the same write path as `/teach`, but initiated by Atlas. The agent fleet improves without any human intervention.\n\n**This is the compound flywheel:** Atlas observes patterns, injects learnings, agents improve, Atlas observes the improvement, the cycle repeats. The platform gets smarter with every deployment.\n\n---"
        },
        {
          "title": "What This Replaces",
          "level": 2,
          "body": "| Current | Replacement |\n|---|---|\n| `/cockpit` skill — manual context load at session start | Atlas launch script — automatic Supabase context assembly |\n| `/session-close` skill — manual summary and commit | Session end hook — automatic summarisation and memory persistence |\n| `/log` skill — manual mid-session write to file | `/log` skill updated — writes to `agent_memory` + `agent_sessions` in Supabase |\n\n`/log` is retained as the manual force-checkpoint. The rest are retired.\n\n---"
        },
        {
          "title": "Migration Path — Option A to Option B",
          "level": 2,
          "body": "**Option A (current):** All agent memory in the central RedKey Supabase (`tseqkbyqyrctrkihllss`), `client_id` on every row.\n\n**Option B (future):** Per-client Supabase instances. Each deployment holds its own memory. Atlas queries multiple instances.\n\n**Why the schema is migration-ready:**\n- Schema is identical in both options — no redesign required\n- Memory access is abstracted behind a `MemoryRepository` that resolves `client_id → Supabase URL`\n- Option A: all client_ids → same URL\n- Option B: lookup table maps `client_id → client Supabase URL`\n- Migration = data move (dump rows by client_id, restore to client-specific instance) + resolver config update\n- Zero schema change. Zero agent code change.\n\n---"
        },
        {
          "title": "Summary",
          "level": 2,
          "body": "| Concept | What it is |\n|---|---|\n| `agent_memory` | Embedded insights, decisions, learnings — retrieved semantically at session start |\n| `agent_sessions` | One row per conversation or worker run — holds summary, timestamps, checkpoint state |\n| `agent_messages` | Full message log — durable mid-session, used for crash recovery and audit |\n| Atlas | Strategic platform architect — cross-client, interactive, memory curator for the fleet |\n| `/teach` | Manual memory injection — push a learning into any agent from any session |\n| Atlas curation | Autonomous memory injection — Atlas identifies cross-client patterns, improves agents proactively |\n| Project memory | `agent_memory` rows tagged with `workflow_instance_id` — same table, different filter |\n| Option A → B | Config change in resolver — zero schema or agent code change |"
        }
      ],
      "html_path": "artifacts/2026-04-22-atlas-agent-memory-design-cb2806df3c.html",
      "json_path": "artifacts/2026-04-22-atlas-agent-memory-design-cb2806df3c.json"
    },
    {
      "id": "2026-04-21-orchestration-design-86732c4244",
      "scope": "redkey",
      "source_of_truth": "repo",
      "source_path": "docs/specs/2026-04-21-orchestration-design.md",
      "source_kind": "markdown",
      "visibility": "internal",
      "renderer_id": "design_doc.dreamborn-forge.generated.v1",
      "design_system": "dreamborn-design-system:forge",
      "generated_at": "2026-05-09T13:00:55.657Z",
      "artifact_type": "design_doc",
      "schema_version": "design_doc.generated.v1",
      "title": "Orchestration Design",
      "summary": "Orchestration Design Date: 2026 04 21 Status: Approved What This Covers The orchestration layer for CCOS2 — how work enters the system, how it gets routed, how it gets decomposed, and what templates govern each type of work. Dev templates are fully defined here. Other department templates are deferred pending further design sessions. Orchestration Hierarchy ...",
      "format_source": "markdown",
      "sections": [
        {
          "title": "Orchestration Design",
          "level": 1,
          "body": "**Date:** 2026-04-21\n**Status:** Approved\n\n---"
        },
        {
          "title": "What This Covers",
          "level": 2,
          "body": "The orchestration layer for CCOS2 — how work enters the system, how it gets routed, how it gets decomposed, and what templates govern each type of work. Dev templates are fully defined here. Other department templates are deferred pending further design sessions.\n\n---"
        },
        {
          "title": "Orchestration Hierarchy",
          "level": 2,
          "body": "Three tiers:\n\n```\nCOO (future)        — cross-department DAG coordination, parallel workstream management\n  └── Claire        — department-level routing, template selection, decomposition, brief validation\n        └── Workers — execute one step, post result, know nothing about the workflow\n```\n\n**COO** is future-state. When cross-department projects need dependency tracking across departments, the COO decomposes them and posts department-scoped tasks to `roles.orchestrator`. Claire handles everything within a department.\n\n**Claire** is active now. She pulls from `roles.orchestrator`, validates the brief, selects the template, assesses size, decomposes if needed, and dispatches work to role topics. She is the only agent that advances workflow state.\n\n---"
        },
        {
          "title": "Department Taxonomy",
          "level": 2,
          "body": "Five departments. Each owns a set of roles. Agents fill roles — Justin fills exec roles today; other departments have dedicated agents (current or planned).\n\n| Department | Roles |\n|---|---|\n| dev | `ba`, `developer`, `reviewer`, `architect` |\n| sales_and_marketing | `bdr`, `sales`, `customer_success`, `content`, `designer`, `podcast` |\n| governance | `finance`, `legal` |\n| knowledge | `researcher`, `librarian` |\n| exec | `justin`, `coo` (future) |\n\n---"
        },
        {
          "title": "Project Payload Schema",
          "level": 2,
          "body": "Work arrives on `roles.orchestrator` as a `task.available` message:\n\n```json\n{\n  \"type\": \"task.available\",\n  \"task_id\": \"uuid\",\n  \"department\": \"dev\",\n  \"work_type\": \"dev_task\",\n  \"brief\": \"...\",\n  \"priority\": \"low | normal | high | urgent\",\n  \"depends_on\": [],\n  \"posted_at\": \"ISO8601\"\n}\n```\n\n- `department` + `work_type` together select the template. Claire does not infer either.\n- `depends_on` is optional. Array of `task_id`s that must complete before this task dispatches.\n- `priority` flows through to all sub-tasks Claire creates.\n- Cross-department projects arrive as multiple messages — one per department, each with their own `depends_on` if sequencing is needed.\n\n---"
        },
        {
          "title": "Brief Quality Requirements",
          "level": 2,
          "body": "Claire validates the brief before dispatching to brainstorm. She checks for **presence only** — not quality. Missing fields block the task and route to `justin` for completion.\n\n| work_type | Required fields |\n|---|---|\n| `hotfix` | What is broken, what done looks like |\n| `dev_task` | Goals, who it serves |\n| `initiative` | Goals, who it serves, timeline, context |\n\nValidation is inline behavior — not a formal template step. If the brief passes, Claire dispatches. If not, she posts to `justin` with the specific missing fields.\n\n**Brainstorm handles quality.** Claire only checks presence. If a stated goal is vague or a timeline is unrealistic, brainstorm surfaces that — not Claire.\n\n---"
        },
        {
          "title": "hotfix",
          "level": 3,
          "body": "Single isolated bug fix. No spec, no architect.\n\n| Step | Role |\n|---|---|\n| 1. brainstorm | `ba` |\n| 2. code | `developer` |\n| 3. pr | `developer` |\n| 4. review | `reviewer` |"
        },
        {
          "title": "dev_task",
          "level": 3,
          "body": "Standard feature or improvement.\n\n| Step | Role |\n|---|---|\n| 1. brainstorm | `ba` |\n| 2. spec | `ba` |\n| 3. arch | `architect` |\n| 4. code | `developer` |\n| 5. pr | `developer` |\n| 6. review | `reviewer` |"
        },
        {
          "title": "initiative",
          "level": 3,
          "body": "Multi-phase project. Claire decomposes into phases after arch completes.\n\n| Step | Role |\n|---|---|\n| 1. brainstorm | `ba` |\n| 2. arch | `architect` |\n| 3. decompose | Claire (inline) |\n| 4+ | Each phase = `dev_task` workflow |\n\n**Phase rules:**\n- Each phase is a full `dev_task` (brainstorm → spec → arch → code → pr → review)\n- Phases declare `depends_on` other phases\n- Claire dispatches phases as their dependencies resolve — parallel where possible, sequential where declared\n- Phases are the unit of dependency, not individual steps\n\n---"
        },
        {
          "title": "Template JSON Schema",
          "level": 2,
          "body": "```json\n{\n  \"slug\": \"dev_task\",\n  \"name\": \"Dev Task\",\n  \"department\": \"dev\",\n  \"description\": \"Standard feature: brainstorm → spec → arch → code → pr → review\",\n  \"steps\": [\n    { \"step_num\": 1, \"name\": \"brainstorm\", \"role\": \"ba\" },\n    { \"step_num\": 2, \"name\": \"spec\",       \"role\": \"ba\" },\n    { \"step_num\": 3, \"name\": \"arch\",       \"role\": \"architect\" },\n    { \"step_num\": 4, \"name\": \"code\",       \"role\": \"developer\" },\n    { \"step_num\": 5, \"name\": \"pr\",         \"role\": \"developer\" },\n    { \"step_num\": 6, \"name\": \"review\",     \"role\": \"reviewer\" }\n  ]\n}\n```\n\n---"
        },
        {
          "title": "Deferred: Non-Dev Templates",
          "level": 2,
          "body": "Templates for `sales_and_marketing`, `governance`, and `knowledge` are not defined here. Each department has distinct workflows that require more detailed design. These will be addressed in a follow-up session with voice access.\n\nDepartments and roles are defined above — implementation can proceed with dev templates and the full department/role topology. Non-dev templates slot in when ready without any structural changes.\n\n---"
        },
        {
          "title": "Open Items",
          "level": 2,
          "body": "- [ ] Define `sales_and_marketing` templates: `bdr`, `sales`, `customer_success`, `content`, `design`, `podcast`\n- [ ] Define `governance` templates: `finance`, `legal`\n- [ ] Define `knowledge` templates: `research`, `library`\n- [ ] Design COO agent and its relationship to Claire\n- [ ] Define `exec` role topic and escalation pattern"
        }
      ],
      "html_path": "artifacts/2026-04-21-orchestration-design-86732c4244.html",
      "json_path": "artifacts/2026-04-21-orchestration-design-86732c4244.json"
    }
  ]
}