production-implementation-plan · supabase_json
Bezel Workflow production-implementation-plan
production-implementation-plan artifact · for Bezel Workflow · status draft
phases
| id | name | objective | deliverables | verification |
|---|---|---|---|---|
| W0 | Contracts and Boundaries | Establish same-repo separate-layer architecture and machine-readable contracts. | - runtime-boundary-spec approved - repo/module layout approved - FLOW.json contract package - compiler test fixtures | - contract tests pass - FLOW fixture compiles to valid PlanIntake - no secrets in fixtures |
| W1 | Flow Compiler MVP | Compile sequential and fan-out FLOW.json into existing Bezel API plan/task graph. | - packages/workflow-contracts - packages/workflow-compiler - tests for validation and graph compilation | - compiler output passes validatePlanIntake - fan-out dependencies are correct - cycle/missing dependency errors are deterministic |
| W2 | Runtime Metadata and Timeline | Preserve enough step metadata for human run timelines without leaking sensitive task input. | - task metadata strategy - workflow event extensions if needed - dashboard-safe read model | - timeline reads show flow/step labels, connector/action, status, claim events - task input remains absent from public read APIs |
| W3 | Connector Manifest and Local Connector Runner | Add manifest-driven connector action execution locally for first connectors. | - connector manifest schema - HTTP connector - Gmail/Sheets/HubSpot manifest skeletons - local runner interface | - manifest validation tests - local HTTP action executes against mock server - credential refs resolve through local adapter without raw secret persistence |
| W4 | Router Agent / Flow Engine Loop | Introduce persistent Router behavior over structured completions, retries, failures, and fan-in. | - router loop contract - completion consumption behavior - retry/failure policy enforcement | - router advances sequential flow - router handles parallel completion order - router returns expired/failed work to appropriate path |
| W5 | Workflow Product Surface | Build the human-readable surface: create/edit/test/activate flow, connector setup, run timeline. | - initial product screen in apps/dashboard or apps/workflow - manual test execution - run timeline - connector credential setup shell | - user can create a valid flow without writing JSON - manual run emits timeline - invalid flow shows actionable validation errors |
| W6 | Production Hardening | Make local-first Workflow reliable enough to operate real internal automations. | - persistence strategy - backup/export/import - credential audit logs - rate limit handling - run cancellation - retry controls - operational runbook | - restart recovery - idempotency checks - claim lease tests - connector failure tests - security audit for secret leakage |
| W7 | Hosted Runtime Alignment | Map local Workflow contracts cleanly onto Bezel API hosted routes for multi-tenant operation. | - hosted adapter - API route extensions as needed - SDK support - production smoke covering compiled FLOW run | - same FLOW fixture runs locally and hosted - SDK types compile - live smoke passes without task input leakage |
Agent Handoff
Start Here
| id | name | objective | deliverables | verification |
|---|---|---|---|---|
| W0 | Contracts and Boundaries | Establish same-repo separate-layer architecture and machine-readable contracts. | - runtime-boundary-spec approved - repo/module layout approved - FLOW.json contract package - compiler test fixtures | - contract tests pass - FLOW fixture compiles to valid PlanIntake - no secrets in fixtures |
| W1 | Flow Compiler MVP | Compile sequential and fan-out FLOW.json into existing Bezel API plan/task graph. | - packages/workflow-contracts - packages/workflow-compiler - tests for validation and graph compilation | - compiler output passes validatePlanIntake - fan-out dependencies are correct - cycle/missing dependency errors are deterministic |
| W2 | Runtime Metadata and Timeline | Preserve enough step metadata for human run timelines without leaking sensitive task input. | - task metadata strategy - workflow event extensions if needed - dashboard-safe read model | - timeline reads show flow/step labels, connector/action, status, claim events - task input remains absent from public read APIs |
| W3 | Connector Manifest and Local Connector Runner | Add manifest-driven connector action execution locally for first connectors. | - connector manifest schema - HTTP connector - Gmail/Sheets/HubSpot manifest skeletons - local runner interface | - manifest validation tests - local HTTP action executes against mock server - credential refs resolve through local adapter without raw secret persistence |
| W4 | Router Agent / Flow Engine Loop | Introduce persistent Router behavior over structured completions, retries, failures, and fan-in. | - router loop contract - completion consumption behavior - retry/failure policy enforcement | - router advances sequential flow - router handles parallel completion order - router returns expired/failed work to appropriate path |
| W5 | Workflow Product Surface | Build the human-readable surface: create/edit/test/activate flow, connector setup, run timeline. | - initial product screen in apps/dashboard or apps/workflow - manual test execution - run timeline - connector credential setup shell | - user can create a valid flow without writing JSON - manual run emits timeline - invalid flow shows actionable validation errors |
| W6 | Production Hardening | Make local-first Workflow reliable enough to operate real internal automations. | - persistence strategy - backup/export/import - credential audit logs - rate limit handling - run cancellation - retry controls - operational runbook | - restart recovery - idempotency checks - claim lease tests - connector failure tests - security audit for secret leakage |
| W7 | Hosted Runtime Alignment | Map local Workflow contracts cleanly onto Bezel API hosted routes for multi-tenant operation. | - hosted adapter - API route extensions as needed - SDK support - production smoke covering compiled FLOW run | - same FLOW fixture runs locally and hosted - SDK types compile - live smoke passes without task input leakage |
Completion Evidence
No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.
Phases
- Contracts and Boundaries: id: string, name: string, objective: string, deliverables: object, verification: object
- Flow Compiler MVP: id: string, name: string, objective: string, deliverables: object, verification: object
- Runtime Metadata and Timeline: id: string, name: string, objective: string, deliverables: object, verification: object
- Connector Manifest and Local Connector Runner: id: string, name: string, objective: string, deliverables: object, verification: object
- Router Agent / Flow Engine Loop: id: string, name: string, objective: string, deliverables: object, verification: object
- Workflow Product Surface: id: string, name: string, objective: string, deliverables: object, verification: object
- Production Hardening: id: string, name: string, objective: string, deliverables: object, verification: object
- Hosted Runtime Alignment: id: string, name: string, objective: string, deliverables: object, verification: object
Structured Payload
Machine-readable source fields
kind
production-implementation-plan
repo
/Users/justinking/Vaults/Projects/bezel-api
phases
| id | name | objective | deliverables | verification |
|---|---|---|---|---|
| W0 | Contracts and Boundaries | Establish same-repo separate-layer architecture and machine-readable contracts. | - runtime-boundary-spec approved - repo/module layout approved - FLOW.json contract package - compiler test fixtures | - contract tests pass - FLOW fixture compiles to valid PlanIntake - no secrets in fixtures |
| W1 | Flow Compiler MVP | Compile sequential and fan-out FLOW.json into existing Bezel API plan/task graph. | - packages/workflow-contracts - packages/workflow-compiler - tests for validation and graph compilation | - compiler output passes validatePlanIntake - fan-out dependencies are correct - cycle/missing dependency errors are deterministic |
| W2 | Runtime Metadata and Timeline | Preserve enough step metadata for human run timelines without leaking sensitive task input. | - task metadata strategy - workflow event extensions if needed - dashboard-safe read model | - timeline reads show flow/step labels, connector/action, status, claim events - task input remains absent from public read APIs |
| W3 | Connector Manifest and Local Connector Runner | Add manifest-driven connector action execution locally for first connectors. | - connector manifest schema - HTTP connector - Gmail/Sheets/HubSpot manifest skeletons - local runner interface | - manifest validation tests - local HTTP action executes against mock server - credential refs resolve through local adapter without raw secret persistence |
| W4 | Router Agent / Flow Engine Loop | Introduce persistent Router behavior over structured completions, retries, failures, and fan-in. | - router loop contract - completion consumption behavior - retry/failure policy enforcement | - router advances sequential flow - router handles parallel completion order - router returns expired/failed work to appropriate path |
| W5 | Workflow Product Surface | Build the human-readable surface: create/edit/test/activate flow, connector setup, run timeline. | - initial product screen in apps/dashboard or apps/workflow - manual test execution - run timeline - connector credential setup shell | - user can create a valid flow without writing JSON - manual run emits timeline - invalid flow shows actionable validation errors |
| W6 | Production Hardening | Make local-first Workflow reliable enough to operate real internal automations. | - persistence strategy - backup/export/import - credential audit logs - rate limit handling - run cancellation - retry controls - operational runbook | - restart recovery - idempotency checks - claim lease tests - connector failure tests - security audit for secret leakage |
| W7 | Hosted Runtime Alignment | Map local Workflow contracts cleanly onto Bezel API hosted routes for multi-tenant operation. | - hosted adapter - API route extensions as needed - SDK support - production smoke covering compiled FLOW run | - same FLOW fixture runs locally and hosted - SDK types compile - live smoke passes without task input leakage |
posture
Production product track, not demo. The plan must produce durable local-first and hosted-compatible workflow automation, with testable runtime contracts at each slice.
project
Bezel Workflow
created by
atlas-codex
updated at
2026-05-09T13:17:30.522Z
schema version
implementation-plan.v1
source memory id
99edd8d2-5780-43a2-bbd0-03982353768a
autopilot next slice
id
W0-S1
scope
- packages/workflow-contracts
- packages/workflow-compiler tests if package is created in same slice
title
Create workflow contract package and FLOW fixture tests
hold conditions
- Do not build visual UI until contracts compile and tests pass.
- Do not add hosted API routes until local compiler contract is stable.
expected changes
- schema/types for FLOW.json
- sample invoice fan-out fixture
- validation tests
- compiler stub or minimal compiler to PlanIntake
architecture decision ref
3a1bb081-67f9-41ae-9600-a91fbb14ecda