In scope
- Derived architecture, domain/class, ERM, flow, dependency, and knowledge views.
- Worktree/session coordination, work-item board, audit explorer, and staged prompts.
- Multiple terminal/visual/prompt tabs within a workspace.
PRODUCT SPECIFICATION · T2 · 2026-08-24
A local-first workspace for directing coding agents across worktrees while inspecting code-derived architecture, domain/data models, process flow, knowledge, audit history, prompts, and coordinated work as linked visual evidence.
Canonical Markdown specification · Privacy review · Grounding knowledge hub
Multiple coding agents, terminals, worktrees, code artifacts, infrastructure files, and audit records are currently disconnected. The product must let the operator inspect their relationships without creating a hand-maintained architecture model.
In the core scenario, a technical lead selects a domain aggregate, traces it through data/service/infrastructure relationships, identifies an affected worktree/session, inspects the audit evidence, prepares feedback, and explicitly dispatches that reviewed prompt to the intended ready session.
| Story | Observable outcome |
|---|---|
| Implemented architecture | Filter, expand, and inspect code/infra relationships with provenance, confidence, and stale/failed refresh state. |
| Domain and data | Distinguish hierarchy, aggregate/entity/value-object classifications, ERM evidence, and missing/inferred joins. |
| Flow and impact | Show static and runtime flow differently; return bounded impact results with published limits and continuation. |
| Knowledge | Search and navigate source artifacts, knowledge, and audit decisions as distinct, source-backed information spaces. |
| Coordination | Show work intent separately from current evidence-derived state, session, agent, worktree, dependency, and freshness. |
| Prompt staging | Keep a revisioned rich-text draft until the user confirms an immutable revision and target session/generation. |
| Audit history | Read eligible audit entries with integrity/redaction/duration state; never turn missing information into a clean empty result. |
| Workspace tabs | Preserve tab identity/context and provide non-destructive recovery instead of silently retargeting a terminal or view. |
The model separates Workspace Registry, Evidence and Projection, Agent Operations, Work Coordination, and Audit Reading so source-derived truth, user intent, and audit evidence cannot silently become the same thing.
| Aggregate / fact | Invariant |
|---|---|
| Workspace Registry | Canonical repository/worktree membership is unique in the workspace and rejects path-escaped membership. |
| Relationship Claim + Evidence Assertion | Every displayed relationship has attributable assertion evidence; no evidence renders as not recorded, not a claim. |
| Agent Session | An active session has at most one active worktree reference at a time and has a generation-bound readiness state. |
| Prompt Draft + Delivery Receipt | One immutable prompt revision, workspace, target session generation, and dispatch key identify one delivery outcome. |
| Work Item + Work-State Assessment | Human work intent is distinct from an evidence-derived assessment; stale, unknown, and conflicted override success-shaped status. |
| Audit Entry / Derived View | Audit records are append-only source evidence; a view is rebuildable projection and never implementation truth. |
The primary operator is an expert working under cognitive load. The experience is dense, not cramped; calm, not passive; powerful, not opaque. Reading evidence is parallel; composing and dispatching a prompt is serial and deliberate.
Repositories, worktrees, sessions, and health.
Architecture, Domain, Data, Flows, Dependencies, Knowledge.
Work board, claims, slices, conflicts.
Prompt drafts, context references, target session.
Timeline, prompts, responses, artifacts, decisions.
Every flow has an explicit recovery path: source refresh can retry, inspect provenance, or return to Explore; dispatch can revalidate, retarget, or preserve a draft and exit; coordination can show no-match/conflict/write-failure states; audit and tabs preserve identity when a source/session is unavailable.
The shell uses the B1 Keyboard-Velocity GUI archetype because the dominant job is rapid expert navigation across many sessions and evidence views. It embeds spatial/graph and telemetry views where their jobs require them; it is not a generic equal-weight dashboard.
Type:OLTP · Arch:SPA · Layout:MasterDetail · Density:Compact ·
Nav:CommandPalette+Sidebar · Input:KeyboardFirst+PrecisionPointer ·
A11y:WCAG_2.2_AA
DESIGN.md is a required design-gate artifact with token modes and measured AA contrast.| Gate | Required control |
|---|---|
| Trust boundaries | Canonical path containment, safe terminal/renderer behavior, generation-bound prompt binding, default-deny MCP capabilities, bounded parsing, audit integrity, and dependency provenance. |
| Privacy | Workspace owner and repository-policy precedence; egress deny by default; source/audit classification before indexing; purpose-minimum retention/deletion; opaque allowlisted telemetry. |
| Indirect model egress | Session declares LocalOnly, ExternalProcessing, or UnknownProcessing. Unknown fails closed for rich prompt/context transfer; external processing requires provider/residency/retention/policy preview. |
| Verification | Versioned fixtures and deterministic oracles for every user story; red-first security/privacy/accessibility tests and benchmark results before implementation approval. |
The linked privacy review adds the LINDDUN-lite data inventory, rights/deletion path, unsafe-audit fail-closed rule, and future external-processing approval requirements.
Handoff: proceed to /define-architecture only after the named
spikes are planned; no implementation choice is made by this specification.