Primary product UI for the Lotus ecosystem, consumed through lotus-gateway.
Repository-local engineering context: REPOSITORY-ENGINEERING-CONTEXT.md
Product architecture blueprint: docs/documentation/product-architecture-blueprint.md
Canonical front-office local runtime: docs/operations/canonical-front-office-local-runtime.md
lotus-workbench owns the user-facing product experience for Lotus.
It is responsible for:
- coherent front-office user experience
- truthful summary-first workflows
- detail-on-demand product modules
- rendering gateway-backed data in a banking-grade product surface
- canonical local runtime and browser validation for supported product flows
It does not own portfolio, performance, risk, advisory, reporting, or AI business truth. Those stay
behind governed backend contracts, primarily lotus-gateway.
lotus-workbench is the primary product client in the Lotus ecosystem.
It depends on:
lotus-gatewayprimary backend contract for product flows- canonical
*.dev.lotusruntime and ingress governed local validation and screenshot posture - repo-local design-system and shell primitives shared presentation and interaction foundations
Boundary rules that matter:
- supported UI states must be backed by supported gateway behavior
- direct raw service consumption is not the default pattern
- presentation can prioritize and frame data, but domain authority stays upstream
- visual polish must not introduce fake data, duplicate meaning, or unsupported workflow states
PortfolioandPerformanceare the most mature live workflows.lotus-workbenchuseslotus-gatewayas its primary backend contract.- Canonical local product proof uses the governed front-office runtime and seeded portfolio
PB_SG_GLOBAL_BAL_001. Data Productsis available at/data-productsfor gateway-backed catalog, dependency, and live trust discovery./workbench/{portfolioId}is the Manage workspace. It uses the shared Workbench left rail and focusedmodesub-surfaces instead of stacking every Manage/DPM panel into one long page: overview,mode=mandate,mode=waves,mode=construction,mode=memory,mode=copilot,mode=reviews,mode=quality, andmode=proof.- Manage surfaces are Gateway-backed and cover RFC-0038 mandate command center, RFC-0041
rebalance waves, RFC-0039 construction alternatives, RFC40-WTBD-010 portfolio memory,
RFC-0042 outcome reviews, RFC-0040 proof-pack evidence, RFC-0043 exception-summary requests,
and rebalance action-register supportability. Workbench renders Gateway/manage/lotus-ai truth
and does not calculate mandate health, wave readiness, optimizer output, outcome variance,
proof-pack hashes, report inputs, AI prompts, PM memos, narratives, or execution claims locally.
mode=copilotcentralizes the existing Gateway-backed proof-pack PM memo, wave PM memo, operations handoff summary, exception summary, outcome narrative, and PM quality support-summary workflow-pack requests without browser-owned prompt construction, generated text storage, PM ranking, client contact, order, or OMS claims. - Recommendations remain compatibility paths.
mode=cockpitis now the Gateway-backed RFC-0026 advisor operating cockpit for Advise-owned action items, supportability, meeting preparation, and bounded acknowledgements.mode=opportunitiesnow renders the Lotus Idea advisor review queue through Gateway instead of treating Advise draft proposals as sourced opportunities. Proposals are a bounded direct advisory workspace surface for the Gateway-backed proposal queue and RFC-0023 advisor narrative delivery posture, while the top-levelProposalshell entry remains disabled pending broader product promotion. - Top-level shell navigation is capability-gated:
Portfolio,Performance, andRiskare active, whileProposalandAdvisoryremain disabled in the current normalized shell bootstrap contract. - Canonical review-ready browser evidence comes from
npm run live:validateartifacts underoutput/playwright/live-canonical/, not from ad hoc localhost screenshots.
Route mounting comes from src/app/, while app-local ownership lives under src/apps/.
Current main surfaces:
portfolio/portfolio,/portfolios,/positions,/transactions,/income,/cashflow,/intakeperformance/performancewith performance, risk, advisor-brief, and evidence modesworkbench/workbench/*compatibility and portfolio-linked Manage workspace entry, including Gateway-backed DPM mandate, waves, construction, memory, reviews, proof-pack, and action-register supportability sub-surfaces when Gateway/manage have materialized the relevant evidencedata-products/data-productsself-serve catalog, dependency, and live trust discovery through gatewayapi/bffinternal Next.js proxy bridge tolotus-gateway
Current shell navigation truth:
- active:
Portfolio,Performance,Risk - currently disabled by capability posture:
Proposal,Advisory
Current route posture:
/recommendationsredirects to supported active surfaces/recommendations?mode=cockpitGateway-backed RFC-0026 advisor cockpit over Advise-owned action items, supportability, meeting preparation, tactical house-view impact review, and acknowledgement posture/recommendations?mode=copilotGateway-backed RFC-0027 advisory copilot over Advise-owned proposal-version source projection, action execution, human review posture, and blocked client-publication boundaries/recommendations?mode=opportunitiesGateway-backed Lotus Idea review queue over Idea-owned candidate ranking, score, source signals, durable-storage posture, and supported-feature promotion posture/proposalsdirect Gateway-backed proposal queue for advisor follow-up/proposals/[proposalId]direct Gateway-backed proposal detail with RFC-0023 advisor narrative review and delivery posture/proposals/simulateGateway-backed advisory proposal draft entry backed bylotus-adviseproposal simulation
Key code areas:
src/app/Next.js app-router entrypoints and route mountingsrc/apps/portfolio/portfolio workspacesrc/apps/performance/performance and risk product surfacessrc/apps/recommendations/current compatibility redirect behavior for legacy recommendation entrysrc/design-system/shared UI primitives and tokenssrc/shell/app shell, navigation, and app registrytests/unit, integration, and Playwright smoke coverage
src/app/route entries, layouts, and the/api/bffgateway proxy bridgesrc/apps/app-local product surfacessrc/design-system/shared tokens, components, and data-display primitivessrc/shell/navigation, app registry, and shared shell structuresrc/features/reusable feature-specific API and view-model logicdocs/product architecture, operations, automation, demo, and review guidancewiki/canonical authored source for GitHub wiki publication
Install dependencies:
make installLocal development server:
make runCanonical local identities:
- product UI:
http://workbench.dev.lotus - gateway:
http://gateway.dev.lotus
Set:
BFF_BASE_URL=http://gateway.dev.lotusThe Workbench BFF adds governed caller-context headers before proxying to Gateway when an interactive request does not already provide them. Defaults are suitable for the canonical local front-office runtime and can be overridden for targeted validation:
WORKBENCH_BFF_ACTOR_ID=workbench-system
WORKBENCH_BFF_CALLER_APPLICATION=lotus-workbench
WORKBENCH_BFF_TENANT_ID=tenant-sg
WORKBENCH_BFF_REGION=APAC
WORKBENCH_BFF_BOOKING_CENTER_CODE=SG
WORKBENCH_BFF_ROLE=advisor
WORKBENCH_DPM_MANDATE_ID=MANDATE_PB_SG_GLOBAL_BAL_001
WORKBENCH_DPM_MODEL_PORTFOLIO_ID=MODEL_PB_SG_GLOBAL_BAL_DPM
WORKBENCH_DPM_BOOKING_CENTER_CODE=Singapore
WORKBENCH_DPM_SOURCE_AS_OF_DATE=2026-04-10Canonical front-office runtime:
npm run live:stack:up
npm run live:validateQuick local browser-facing path:
http://workbench.dev.lotus/portfolio
http://workbench.dev.lotus/performance
http://workbench.dev.lotus/performance?portfolioId=PB_SG_GLOBAL_BAL_001&mode=risk
http://workbench.dev.lotus/recommendations?portfolioId=PB_SG_GLOBAL_BAL_001&mode=cockpit
http://workbench.dev.lotus/workbench/PB_SG_GLOBAL_BAL_001
http://workbench.dev.lotus/data-productsmake installinstall dependenciesmake lintlint the Next.js appmake typecheckTypeScript typecheckmake test-coverageVitest coverage-backed unit and integration gatemake test-e2ePlaywright smoke validationmake checklocal feature-lane parity: lint, typecheck, coverage, buildmake ci-local-dockerDocker parity checknpm run live:stack:upcanonical front-office stack bring-upnpm run live:validatecanonical front-office validation against the running stacknpm run live:validate:constructionfocused live proof for the Gateway/manage-backed construction alternatives lab
lotus-workbench follows the Lotus multi-lane model:
Remote Feature LanePull Request Merge GateMain Releasability Gate
Repo-native gate mapping:
make checklint, typecheck, coverage-backed tests, buildmake test-e2ePlaywright smokemake ci-local-dockerDocker paritynpm run live:validatecanonical integrated product validation when cross-app flows changenpm run live:validate:constructionfocused browser proof for RFC-0039 construction alternatives when the construction lab changes
Important current product and route truths:
- the active front-office surfaces are
PortfolioandPerformance Riskis currently served through thePerformanceroute via mode-based behavior, not as a separate top-level route/recommendationsremains a compatibility route./proposals,/proposals/simulate, and/proposals/{proposalId}are direct Gateway-backed advisory routes, but theProposalshell navigation item remains capability-disabled and should not be documented as a promoted top-level shell app.- the internal
/api/bff/*route proxies tolotus-gatewayand preserves gateway-first integration posture /data-productsconsumes only gateway domain-product discovery and trust-certification endpoints; it must not read platform files directly or fabricate trust posture- shell navigation availability is contract-driven and currently exposes disabled
ProposalandAdvisoryitems rather than live product routes - evidence-oriented performance views must be documented truthfully as runtime-governed product behavior, not as a promise of separate unsupported backend ownership inside Workbench
- RFC-0042 outcome-review rendering on
/workbench/{portfolioId}?mode=reviewsis backed by Gateway/api/v1/dpm/command-center/outcome-reviews*; Workbench may normalize presentation shape but must not derive expected, realized, variance, lineage, source freshness, supportability, report input, or AI evidence eligibility outside the Gateway/manage contract. - RFC-0039 construction alternatives rendering on
/workbench/{portfolioId}?mode=constructionis backed by Gateway/api/v1/dpm/command-center/construction/alternative-sets*; Workbench sends a stateful source selector and option overrides through Gateway and must not synthesize stateless portfolio snapshots, prices, optimization results, objective scores, supportability, or PM selection truth. - RFC-0040 proof-pack evidence rendering on
/workbench/{portfolioId}?mode=proofis backed by Gateway/api/v1/dpm/command-center/proof-packs*; Workbench may render Gateway/manage proof-pack identity, sections, hashes, Markdown, report-input readiness, AI-evidence readiness, and lotus-ai PM memo workflow-pack posture through Gateway, but must not rebuild proof-pack sections, compute hashes, synthesize Markdown, construct report input, construct AI evidence, construct PM memo prompts, or calllotus-manage,lotus-report, orlotus-aidirectly. - RFC-0041 rebalance-wave rendering on
/workbench/{portfolioId}?mode=wavesis backed by Gateway/api/v1/dpm/command-center/waves*; Workbench may render Gateway/manage wave state, report-input readiness, lotus-ai wave PM memo workflow-pack posture, lotus-ai operations-handoff summary posture, and Manage campaign workflow audit evidence through Gateway, but must not build report input, construct AI prompts, generate memo text locally, calculate campaign membership or readiness, mutate maker-checker or assignment state, score PMs, approve trades independently, contact clients, place orders, or call upstream services directly. - RFC-0043 PM copilot workspace rendering on
/workbench/{portfolioId}?mode=copilotis backed by existing Gateway BFF routes for proof-pack PM memo, wave PM memo, operations handoff summary, monitoring-exception summary, outcome-review narrative, and PM operating-quality support summary. Workbench presents one governed action surface over Manage-owned evidence and lotus-ai workflow-pack execution posture, but does not construct prompts, persist generated model output, rank PMs, infer missing source facts, contact clients, approve trades, generate orders, route orders, or claim OMS execution. - RFC-0023 advisor proposal narrative posture is rendered on
/proposals/{proposalId}through Gateway proposal endpoints only:/api/v1/proposals/{proposal_id}/versions/{version_no}/narrative/review,/api/v1/proposals/{proposal_id}/report-requests,/api/v1/proposals/{proposal_id}/delivery-summary, and/api/v1/proposals/{proposal_id}/delivery-events. Workbench may record advisor-use review and request reviewed narrative report packaging through Gateway, but it must not generate narrative, infer client-ready publication, render documents, archive artifacts, contact clients, or calllotus-advise,lotus-report,lotus-render, orlotus-archivedirectly. Canonical front-office validation now creates a seeded advisor-review narrative proposal, exercises the panel, and captures governedproposal.narrative_posturescreenshot evidence. - RFC-0024 advisor memo and evidence-pack posture is rendered on
/proposals/{proposalId}through Gateway proposal memo endpoints only:/api/v1/proposals/{proposal_id}/versions/{version_no}/memo,/api/v1/proposals/{proposal_id}/versions/{version_no}/memo/review,/api/v1/proposals/{proposal_id}/versions/{version_no}/memo/projection,/api/v1/proposals/{proposal_id}/versions/{version_no}/memo/report-package,/api/v1/proposals/{proposal_id}/versions/{version_no}/memo/ai-commentary,/api/v1/proposals/{proposal_id}/memos/lineage, and/api/v1/proposals/{proposal_id}/versions/{version_no}/memo/replay-evidence. Workbench may create or replay an advisor-use memo, record advisor-use review, request advisor-use report-package posture, and request non-authoritative commentary through Gateway, but it must not infer memo facts, promote client-ready release, render documents, synthesize archive references, treat commentary as authoritative evidence, contact clients, or call source services directly. Canonical front-office validation captures governedproposal.memo_evidence_packscreenshot evidence alongsideproposal.narrative_posture. - RFC-0026 advisor cockpit rendering on
/recommendations?mode=cockpitis backed by Gateway advisor cockpit endpoints only:/api/v1/advisor-cockpit/actions,/api/v1/advisor-cockpit/preparation-packets,/api/v1/advisor-cockpit/actions/{action_item_id},/api/v1/advisor-cockpit/snapshot,/api/v1/advisor-cockpit/supportability, and/api/v1/advisor-cockpit/actions/{action_item_id}/acknowledgements; canonical automation also seeds/api/v1/advisor-cockpit/house-view-cohorts/evaluatebefore proving the cockpit list. Workbench may render source-owned action items, snapshot counts, supportability posture, unsupported-capability boundaries, meeting-preparation packets, tactical house-view impact review items, and bounded advisor acknowledgements through Gateway, but it must not calculate suitability, clear blockers, infer client-ready publication, contact clients, place orders, or calllotus-advisedirectly. Canonical front-office validation now proves the action list, house-view cohort seed, preparation packet route, snapshot, supportability, an idempotent acknowledgement, replay-safe already-acknowledged source state, andadvisory.advisor_cockpitscreenshot evidence. - RFC-0027 advisory copilot rendering on
/recommendations?mode=copilotis backed by Gateway advisory copilot endpoints only:/api/v1/advisory-copilot/evidence-packets/from-proposal-version,/api/v1/advisory-copilot/actions,/api/v1/advisory-copilot/actions/{run_id}/reviews, and/api/v1/advisory-copilot/supportability. Workbench requests proposal-version-scoped evidence projection from Gateway and does not construct evidence sections, prompts, guardrails, review state, model lineage, policy semantics, client-ready publication, client communication, orders, or execution posture locally. Canonical front-office validation now proves all six first-wave copilot action families, internal review recording, client-ready guardrail rejection, proposal-version run lineage, Gateway-backed rendering, andadvisory.advisory_copilotscreenshot evidence. - RFC-0028 bank-demo proof rendering on
/recommendations?mode=proofis backed by Gateway RFC-0028 proof endpoints only:/api/v1/advisory/bank-demo-proof/scenario-contractand/api/v1/advisory/bank-demo-proof/supported-claim-register. Workbench renders the Advise-owned scenario contract, supported-claim classifications, proof marker, publication boundaries, proof-handling rules, and source-evidence posture without constructing proof packs, promoting client-ready publication, approving sign-off, contacting clients, creating orders, or claiming OMS/fill/settlement truth. Canonical front-office validation verifies the Gateway proof contracts and captures governedadvisory.bank_demo_proofscreenshot evidence. - Lotus Idea opportunity rendering on
/recommendations?mode=opportunitiesis backed by Gateway/api/v1/ideas/review-queues/advisoronly. Workbench passes the active portfolio as caller entitlement scope, renders Idea-owned candidate rank, score, review posture, source-signal ids, reason codes, durable-storage posture, policy version, and supported-feature promotion posture, and links only to Gateway candidate detail. Workbench must not rerank candidates, clone Idea scoring, infer downstream conversion, create proposals automatically, grant suitability or execution authority, or promote Lotus Idea as a supported feature before canonical browser proof, data-product certification, andlotus-ideasupported-feature evidence exist.
Copy-paste route and runtime examples live in wiki/API-Surface.md.
- primary backend contract:
lotus-gateway - canonical local runtime:
*.dev.lotusdirect ingress and governed seeded data - contract rule: workbench should consume gateway-shaped product contracts instead of recreating backend semantics in the browser
- use
workbench.dev.lotusandgateway.dev.lotusfor canonical local product proof - use
npm run live:stack:upandnpm run live:validatefor governed integrated validation - use seeded portfolio
PB_SG_GLOBAL_BAL_001unless the slice explicitly targets another dataset - keep demo screenshots separate from diagnostic captures until canonical validation passes
- canonical live validation artifacts are written under
output/playwright/live-canonical/ - use
output/playwright/live-canonical/live-validation-summary.jsonas the structured evidence record for review and troubleshooting
- product architecture: docs/documentation/product-architecture-blueprint.md
- canonical local runtime: docs/operations/canonical-front-office-local-runtime.md
- demo guidance: docs/demo/README.md
- architecture review ledger: docs/architecture/CODEBASE-REVIEW-LEDGER.md
- RFC inventory: docs/rfcs/README.md
- wiki home: wiki/Home.md
Repository-authored wiki pages live under wiki/. If the GitHub wiki is published later,
keep wiki/ as the canonical source and treat any separate *.wiki.git clone as publication
plumbing only.