plan-module · supabase_json
KnowledgeVault AI plan-module M-11
plan-module artifact · for KnowledgeVault AI · phase M-11 · status draft
tasks
| id | role | brief | title | completion | depends on |
|---|---|---|---|---|---|
| 1 | developer | KnowledgeVault M-11 T1: make Expert Onboarding reachable and contract-complete. Current app has POST /api/experts/signup and ExpertSignupFlow, but no /experts/signup route, no redirect/confirmation route, and signup response lacks stripe_onboarding_url promised by F-01. Implement app route(s) under apps/knowledgevault/src/app/(expert)/signup/ for S-01-a/S-01-b/S-01-c using the existing ExpertSignupFlow where practical. Update POST /api/experts/signup so success returns expert_id, email, onboarding_complete, stripe_onboarding_url, and deferred_bank. If Stripe env/config is unavailable, return a | Finish signup route | - type: file - evaluate: A user can open /experts/signup, submit the form, and POST /api/experts/signup returns the F-01 success contract including stripe_onboarding_url or deferred_bank without leaking service keys. - min length: 200 | |
| 2 | developer | KnowledgeVault M-11 T2: make the capture workflow reachable from Product Pre-Session. Current APIs exist for POST /api/sessions/start, POST /api/sessions/[id]/audio, and POST /api/sessions/[id]/complete, but there is no route for Active Capture Session S-03-a or Session Complete S-03-b. Add apps/knowledgevault/src/app/(expert)/sessions/[id]/page.tsx as a client route that shows the first question/session context, records or accepts audio chunks using existing browser APIs with a graceful text-only fallback, posts chunks to /api/sessions/[id]/audio, displays transcript/micro-object feedback, an | Wire capture screens | - type: file - evaluate: Starting from /products/[id] can navigate to /sessions/[id], submit at least one answer/audio payload, complete the session, and show a completion/evaluation handoff state. - min length: 200 | |
| 3 | developer | KnowledgeVault M-11 T3: expose post-capture evaluation and earnings surfaces. Existing components/screens include EvaluationPendingScreen, ScoreResultsScreen, and EarningsDashboard, and APIs include /api/sessions/[id]/score and /api/experts/[id]/earnings, but the screens are not routed. Add route(s) under apps/knowledgevault/src/app/(expert)/sessions/[id]/score/ and apps/knowledgevault/src/app/(expert)/earnings/ that use these components or equivalent UI. If the approved spec expects GET /api/sessions/[id]/evaluation-status, add a compatibility route that maps current score/evaluating/payment_ | Expose evaluation earnings | - type: file - evaluate: After capture completion, an expert has reachable evaluation status/score and earnings pages backed by existing APIs without conflicting with company virtual-expert routes. - min length: 200 | - 2 |
| 4 | developer | KnowledgeVault M-11 T4: make admin/company demo surfaces navigable. Current M-10 added PlatformAnalyticsPanel and GET /api/analytics/platform, but no page renders the panel. Add an admin analytics page, preferably apps/knowledgevault/src/app/admin/analytics/page.tsx, that renders PlatformAnalyticsPanel and handles auth/error states consistently with the component. Add lightweight navigation links among /dashboard/demo, /search, /experts, and /admin/analytics where appropriate without redesigning the app. Ensure Powered by KnowledgeVault badge remains visible on company/admin surfaces. Keep dem | Expose admin analytics | - type: file - evaluate: /admin/analytics renders the M-10 PlatformAnalyticsPanel, company demo routes remain reachable, and analytics still requires admin API auth. - min length: 200 | |
| 5 | developer | KnowledgeVault M-11 T5: add a release smoke test suite for the demo-critical route/API surface. Create apps/knowledgevault/src/__tests__/release/demoSmoke.test.ts or equivalent Vitest coverage that mechanically asserts the expected route files and API exports exist for expert signup, product queue/pre-session, session capture, evaluation/score, earnings, search, virtual experts, dashboard demo, and admin analytics. Include contract-level tests for the new compatibility endpoints or response shapes added by T1-T4. Keep tests deterministic with mocks only; do not require live Supabase, Stripe, O | Add release smoke tests | - type: file - evaluate: The smoke suite fails if any demo-critical route/API surface is missing, and apps/knowledgevault passes npm test, tsc, and build. - min length: 200 | - 1 - 2 - 3 - 4 |
Agent Handoff
Start Here
| id | role | brief | title | completion | depends on |
|---|---|---|---|---|---|
| 1 | developer | KnowledgeVault M-11 T1: make Expert Onboarding reachable and contract-complete. Current app has POST /api/experts/signup and ExpertSignupFlow, but no /experts/signup route, no redirect/confirmation route, and signup response lacks stripe_onboarding_url promised by F-01. Implement app route(s) under apps/knowledgevault/src/app/(expert)/signup/ for S-01-a/S-01-b/S-01-c using the existing ExpertSignupFlow where practical. Update POST /api/experts/signup so success returns expert_id, email, onboarding_complete, stripe_onboarding_url, and deferred_bank. If Stripe env/config is unavailable, return a | Finish signup route | - type: file - evaluate: A user can open /experts/signup, submit the form, and POST /api/experts/signup returns the F-01 success contract including stripe_onboarding_url or deferred_bank without leaking service keys. - min length: 200 | |
| 2 | developer | KnowledgeVault M-11 T2: make the capture workflow reachable from Product Pre-Session. Current APIs exist for POST /api/sessions/start, POST /api/sessions/[id]/audio, and POST /api/sessions/[id]/complete, but there is no route for Active Capture Session S-03-a or Session Complete S-03-b. Add apps/knowledgevault/src/app/(expert)/sessions/[id]/page.tsx as a client route that shows the first question/session context, records or accepts audio chunks using existing browser APIs with a graceful text-only fallback, posts chunks to /api/sessions/[id]/audio, displays transcript/micro-object feedback, an | Wire capture screens | - type: file - evaluate: Starting from /products/[id] can navigate to /sessions/[id], submit at least one answer/audio payload, complete the session, and show a completion/evaluation handoff state. - min length: 200 | |
| 3 | developer | KnowledgeVault M-11 T3: expose post-capture evaluation and earnings surfaces. Existing components/screens include EvaluationPendingScreen, ScoreResultsScreen, and EarningsDashboard, and APIs include /api/sessions/[id]/score and /api/experts/[id]/earnings, but the screens are not routed. Add route(s) under apps/knowledgevault/src/app/(expert)/sessions/[id]/score/ and apps/knowledgevault/src/app/(expert)/earnings/ that use these components or equivalent UI. If the approved spec expects GET /api/sessions/[id]/evaluation-status, add a compatibility route that maps current score/evaluating/payment_ | Expose evaluation earnings | - type: file - evaluate: After capture completion, an expert has reachable evaluation status/score and earnings pages backed by existing APIs without conflicting with company virtual-expert routes. - min length: 200 | - 2 |
| 4 | developer | KnowledgeVault M-11 T4: make admin/company demo surfaces navigable. Current M-10 added PlatformAnalyticsPanel and GET /api/analytics/platform, but no page renders the panel. Add an admin analytics page, preferably apps/knowledgevault/src/app/admin/analytics/page.tsx, that renders PlatformAnalyticsPanel and handles auth/error states consistently with the component. Add lightweight navigation links among /dashboard/demo, /search, /experts, and /admin/analytics where appropriate without redesigning the app. Ensure Powered by KnowledgeVault badge remains visible on company/admin surfaces. Keep dem | Expose admin analytics | - type: file - evaluate: /admin/analytics renders the M-10 PlatformAnalyticsPanel, company demo routes remain reachable, and analytics still requires admin API auth. - min length: 200 | |
| 5 | developer | KnowledgeVault M-11 T5: add a release smoke test suite for the demo-critical route/API surface. Create apps/knowledgevault/src/__tests__/release/demoSmoke.test.ts or equivalent Vitest coverage that mechanically asserts the expected route files and API exports exist for expert signup, product queue/pre-session, session capture, evaluation/score, earnings, search, virtual experts, dashboard demo, and admin analytics. Include contract-level tests for the new compatibility endpoints or response shapes added by T1-T4. Keep tests deterministic with mocks only; do not require live Supabase, Stripe, O | Add release smoke tests | - type: file - evaluate: The smoke suite fails if any demo-critical route/API surface is missing, and apps/knowledgevault passes npm test, tsc, and build. - min length: 200 | - 1 - 2 - 3 - 4 |
Completion Evidence
No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.
Artifact Shape
- notes: 3 items
- tasks: 5 items
- module id: M-11
- module name: Demo Integration & Release Hardening
- schema version: 1.0
- depends on modules: 1 item
Structured Payload
Machine-readable source fields
notes
- Created by Atlas-Codex after M-10 release/acceptance pass on 2026-05-01.
- M-00 through M-10 verify green, but approved Feature+UX Spec surfaces are not fully reachable as routes and F-01 still lacks stripe_onboarding_url.
- This module integrates existing components/APIs into demo-ready routes and adds a smoke safety net; it should stay narrow and not redesign completed module internals.
tasks
| id | role | brief | title | completion | depends on |
|---|---|---|---|---|---|
| 1 | developer | KnowledgeVault M-11 T1: make Expert Onboarding reachable and contract-complete. Current app has POST /api/experts/signup and ExpertSignupFlow, but no /experts/signup route, no redirect/confirmation route, and signup response lacks stripe_onboarding_url promised by F-01. Implement app route(s) under apps/knowledgevault/src/app/(expert)/signup/ for S-01-a/S-01-b/S-01-c using the existing ExpertSignupFlow where practical. Update POST /api/experts/signup so success returns expert_id, email, onboarding_complete, stripe_onboarding_url, and deferred_bank. If Stripe env/config is unavailable, return a | Finish signup route | - type: file - evaluate: A user can open /experts/signup, submit the form, and POST /api/experts/signup returns the F-01 success contract including stripe_onboarding_url or deferred_bank without leaking service keys. - min length: 200 | |
| 2 | developer | KnowledgeVault M-11 T2: make the capture workflow reachable from Product Pre-Session. Current APIs exist for POST /api/sessions/start, POST /api/sessions/[id]/audio, and POST /api/sessions/[id]/complete, but there is no route for Active Capture Session S-03-a or Session Complete S-03-b. Add apps/knowledgevault/src/app/(expert)/sessions/[id]/page.tsx as a client route that shows the first question/session context, records or accepts audio chunks using existing browser APIs with a graceful text-only fallback, posts chunks to /api/sessions/[id]/audio, displays transcript/micro-object feedback, an | Wire capture screens | - type: file - evaluate: Starting from /products/[id] can navigate to /sessions/[id], submit at least one answer/audio payload, complete the session, and show a completion/evaluation handoff state. - min length: 200 | |
| 3 | developer | KnowledgeVault M-11 T3: expose post-capture evaluation and earnings surfaces. Existing components/screens include EvaluationPendingScreen, ScoreResultsScreen, and EarningsDashboard, and APIs include /api/sessions/[id]/score and /api/experts/[id]/earnings, but the screens are not routed. Add route(s) under apps/knowledgevault/src/app/(expert)/sessions/[id]/score/ and apps/knowledgevault/src/app/(expert)/earnings/ that use these components or equivalent UI. If the approved spec expects GET /api/sessions/[id]/evaluation-status, add a compatibility route that maps current score/evaluating/payment_ | Expose evaluation earnings | - type: file - evaluate: After capture completion, an expert has reachable evaluation status/score and earnings pages backed by existing APIs without conflicting with company virtual-expert routes. - min length: 200 | - 2 |
| 4 | developer | KnowledgeVault M-11 T4: make admin/company demo surfaces navigable. Current M-10 added PlatformAnalyticsPanel and GET /api/analytics/platform, but no page renders the panel. Add an admin analytics page, preferably apps/knowledgevault/src/app/admin/analytics/page.tsx, that renders PlatformAnalyticsPanel and handles auth/error states consistently with the component. Add lightweight navigation links among /dashboard/demo, /search, /experts, and /admin/analytics where appropriate without redesigning the app. Ensure Powered by KnowledgeVault badge remains visible on company/admin surfaces. Keep dem | Expose admin analytics | - type: file - evaluate: /admin/analytics renders the M-10 PlatformAnalyticsPanel, company demo routes remain reachable, and analytics still requires admin API auth. - min length: 200 | |
| 5 | developer | KnowledgeVault M-11 T5: add a release smoke test suite for the demo-critical route/API surface. Create apps/knowledgevault/src/__tests__/release/demoSmoke.test.ts or equivalent Vitest coverage that mechanically asserts the expected route files and API exports exist for expert signup, product queue/pre-session, session capture, evaluation/score, earnings, search, virtual experts, dashboard demo, and admin analytics. Include contract-level tests for the new compatibility endpoints or response shapes added by T1-T4. Keep tests deterministic with mocks only; do not require live Supabase, Stripe, O | Add release smoke tests | - type: file - evaluate: The smoke suite fails if any demo-critical route/API surface is missing, and apps/knowledgevault passes npm test, tsc, and build. - min length: 200 | - 1 - 2 - 3 - 4 |
module id
M-11
module name
Demo Integration & Release Hardening
schema version
1.0
depends on modules
- M-10