DTRAC Builder: Chat, paired authoring areas and Engine Chat is illustrated with hypothetical user and AI bubbles plus a reply field, not a real transcript. Read left to right: Chat, one central authoring stage containing Agent coordination above Design workspace as peer areas, then explicit app apply, JSON, build/install and DTRAC Engine. Research Partner coordinates selected model roles and host tools/checks. The workspace shows GUI and KMP/Wasm Preview around one revisioned design draft. Scoped canvas calls exchange draft context and proposed edits; this does not mean every research Chat message edits the canvas or that both areas always execute simultaneously. GUI edits directly; Preview selection returns to GUI and simulated interaction does not write design JSON. Study context remains distinct from the design draft. Conversation App runtime Chat EXAMPLE You Add a daily mood survey. AI What time should it run? Reply… Illustrative UI Request, review, then refine. Compose & refine Two connected authoring areas Agent coordination Design workspace Direct GUI edits Research Partner MODEL + HOST delegate review Selected model roles Protocol Agent Rules + schedules UI Agent Screens + navigation Data Agent Fields + storage Tools + checks CODE Read · validate · save Contracts · KMP · revisions · Feasibility · Assurance Draft context ↔ scoped edits Shared draft · revisioned JSON edit render GUI Screen Survey Selected context → Chat Preview KMP/Wasm simulated Mood Selection returns to GUI Study context · protocol / decisions / revisions Apply to app EXPLICIT Applied JSON UI · surveys nav + bindings build DTRAC Engine Install + run DEVICE Device execution Task-dependent roles · Direct GUI edits · Apply and build are explicit
DTRAC Builder agent architecture
Read the diagram

Chat and two peer authoring areas. The miniature Chat, GUI outline and Preview use a hypothetical daily mood-survey example; they are illustrative UI, not a real transcript, execution log or exact product screenshot. User requests and returned AI replies stay in Chat. Agent coordination and Design workspace share one Compose & refine stage, with Agent coordination above Design workspace. Their equal headings and two-way link describe peer areas, not a top-to-bottom processing sequence. The scoped-canvas connection exchanges draft context and proposed edits; it does not mean every research Chat request edits the canvas or that both areas always execute at the same time. Selected specialist review, host tool observations and validation retain their implementation boundaries. GUI edits the shared revisioned draft directly; KMP/Wasm Preview renders it and returns selection to GUI. Selected context can be sent to Chat. Study context is distinct from the design draft. The main reading direction is Chat → paired authoring areas → explicit app apply/JSON → build/install → Engine.

Chat, GUI and Preview share the design workflow. GUI node/property edits and scoped canvas AI proposals read and save the same revisioned design draft. Selecting an element in KMP/Wasm Preview highlights the GUI target; the GUI can stage that selection in Chat. The researcher sends feedback or edits directly, and updated JSON snapshots render again. Preview also supports simulated screen and survey interaction; these runtime values do not rewrite design JSON or become participant data. Drag/drop edits use the surrounding GUI overlay and host draft editor. App files change only after explicit Apply to app and host checks; build/install remains separate. General research Chat also edits study state through its own tools, so not every Chat turn targets this canvas draft.

Arrows show calls and returned results. Research Partner denotes the model-assisted workflow together with its host orchestration, not one model that directly writes files. Selected domain calls return typed reviews and constraints to host coordination. Study authoring returns synchronous tool observations to the model loop. The shared context is revisioned application state, not an invented autonomous memory. Data Agent is the compact label for Data Collection Agent. The design/canvas route is separately dispatched and can bypass specialist review.

Routes are task-dependent. Study authoring, selected domain reviews and direct canvas composition are alternatives. Not every request calls all three specialists. The host owns dispatch; model calls supply interpretations and structured candidates. General Agent shares authoring tools; LangGraph is an optional configured route, with legacy as the default dispatcher.

Authoring and review have different contracts. The study-authoring loop can take up to 16 model/tool steps and cannot generate screens. Host tools prepare, validate, atomically save and read back amendments, reject stale or partial changes, and preserve later edits during selective undo. Missing research decisions stay questions; saving settings does not complete researcher review.

Selected domain agents make separate role-prompt model calls. A lead precedes peer reviews and bounded reconciliation, with up to six calls on the reviewed path. They share a base revision and exchange owned patches, constraints, questions and evidence. Roles may use the same model; cached or conservative fallback results are possible. Legacy persona names are not extra agents.

Design stays a draft until explicit apply. Composition uses component, action and binding contracts, JSON compilation, KMP render checks and bounded repair. Direct canvas edits bypass domain review when that route is selected. Apply checks current revisions and requirements before writing app artifacts.

Host checks apply along each path. Feasibility describes supported, generatable, constrained or unsupported capability. Assurance reports passed, warning or blocked; build initially remains not_run. Optional persona wording cannot change a capability verdict. The host-check group summarizes these boundaries; it is not one additional model stage.

Outputs are distinct. Saved study configuration supplies later generation. Applied screen, navigation and survey JSON plus runtime bindings enter the Android build runner. APK/AAB checking, installation and launch are explicit steps. KMP preview does not verify Android execution.

Chat / GUI / Preview implementation evidence

Source review: October 14, 2026. Shared draft refers to GUI edits and scoped canvas AI proposals. Preview selection and simulated runtime interaction are distinct; no automatic preview-to-design write or autonomous feedback loop is drawn.

  • app-electron/src/renderer/src/studio/StudioShell.tsx:2208–2235; 2788–2804 — GUI selection stages a design draft and opens Chat.
  • app-electron/src/renderer/src/studio/DesignCanvasWorkspace.tsx:253–350; 358–442; 636–689 — GUI mutations, scoped Chat context, draft-backed KMP preview, element selection/drop overlay and explicit apply.
  • app-electron/src/renderer/src/studio/useDesignCanvas.ts:35–118; 133–210 — Versioned draft adoption, GUI save, changed-event reload, undo/redo and explicit apply.
  • app-electron/src/renderer/src/ai/ResearchPartnerChat.tsx:4461–4505; 4592–4607; 5256–5270 — Design context enters partner turn, AI response returns to Chat; researcher submits feedback.
  • app-electron/src/main/llm/designCanvasTurn.ts:18–181 — Scoped model composition, bounded repair, KMP render audits; proposals update the draft, explain/review do not.
  • app-electron/src/main/designCanvas.ts:409–437; 1018–1059; 1116–1207 — GUI and AI both save the canvas draft with revision checks; explicit apply compiles and writes app artifacts.
  • app-electron/src/renderer/src/studio/KmpPreviewHost.tsx:385–395; 485–528; 564–648 — Versioned screen snapshots and editor mode to KMP; selected/navigated/bounds/state messages return with origin/session checks.
  • app-electron/src/renderer/src/studio/ParticipantPreviewSession.tsx:85–122 — Screen and survey try-out use a local preview session; selection mode differs from interaction mode.
  • shared/renderer-web/src/commonMain/kotlin/com/hdil/dtrack/renderer/web/InMemoryRendererEnvironment.kt:160–211 — In-memory bindings and supported preview navigation/actions.
  • shared/renderer-web/src/commonMain/kotlin/com/hdil/dtrack/renderer/web/PreviewRuntimeState.kt:489–536 — Selected element and simulated runtime state are emitted separately from screen definition replacement.
Implementation evidence

Source review: October 13, 2026. Current Builder working tree on research-paper-detail-review, base 8213e6b7 plus local changes. The diagram shows implemented routing and code boundaries, not a trace of a model run performed for this documentation.

Research Partner is a model-assisted workflow with host routing. Domain reviewers use separate role calls when selected; roles may share the configured model. Legacy experts, Feasibility and Assurance are not extra autonomous agents. The selectable General Agent shares study-authoring tools; LangGraph is an optional route. Model access, build tools and device execution still require their own runtime conditions.

  • app-electron/src/shared/agentTaxonomy.mjs:1–25 — Canonical agents, pipeline capabilities and compatibility names.
  • app-electron/src/shared/agentPromptRegistry.mjs:1–69 — Canonical role prompt files versus personas and legacy stage prompts.
  • app-electron/src/main/llm/graph/partnerOrchestrator.ts:20–93 — Actual dispatch: general, configured LangGraph, participant design or partner turn; default legacy.
  • app-electron/src/main/llm/authoringRouting.ts:1–27 — Conditions for using the shared study-authoring loop.
  • app-electron/src/main/llm/authoringLoop.ts:24–152 — Research/collection model loop, structured actions, synchronous tool observations and 16-step bound.
  • app-electron/src/main/llm/authoringTools.ts:244–558 — Revisioned plans, prepare/validate/commit, atomic save, readback and decision receipts.
  • app-electron/src/main/llm/researchPartner.ts:2719–2970 — Separate domain model calls; lead, followers, expansion and bounded reconciliation.
  • app-electron/src/main/llm/domainCoordinationPolicy.ts:1–33 — Six-call coordination budget and revision-scoped semantic cache.
  • app-electron/src/shared/agentCoordination.mjs:1–125 — Typed protocol/UI/data ownership and review contract.
  • app-electron/src/main/llm/partner/participantDesignTurn.ts:1630–1800 — Selected UI review, caching, ownership validation and proposal materialization.
  • app-electron/src/main/llm/designCanvasTurn.ts:18–166 — Direct canvas model call, component contracts, compile/render validation and draft-only changes.
  • app-electron/src/main/llm/experiencePipeline.ts:38–153 — Layout/composition pipeline, deterministic fallback provenance, KMP audits and limits.
  • app-electron/src/main/designCanvas.ts:1018–1056 — Explicit apply, requirement and compiler gates, revision-bound writes and restore on error.
  • app-electron/src/shared/feasibility.mjs:1–94 — Deterministic capability assessment; proposed verdict cannot raise registry support.
  • app-electron/src/shared/researchPartner.mjs:218–271 — Assurance passed/warning/blocked and canonical capability labels; build starts as not_run.
  • app-electron/src/main/llm/persona.ts:1–58 — Optional persona model call only rewrites prose, not feasibility statuses.
  • app-electron/src/main/buildJobs.ts:257–365 — Runtime assets and BuildSpec enter build runner; APK/AAB artifact validation.
  • app-electron/src/main/llm/modelPolicy.ts:1–108 — Shared backend operation/model policy; agent role does not imply a different model.