Skip to content

Epic: NetScript DevTools contribution and host architecture #400

Description

@rickylabs

Epic: NetScript DevTools — the Aspire/Scalar satellite that drives the framework

Re-baselined 2026-08-11 onto RFC 0005 — DevTools contribution architecture, merged on main via PR #1450 and ratified by the owner.

What changed: this epic no longer invents its own discovery/registry/contribution mechanism, and the beta.6 framing and the S1–S13 screen list are retired. What survives verbatim: the ownership thesis and the three acceptance lines below — RFC 0005 §11 adopts them as normative acceptance criteria, not prose.

Ownership thesis — unchanged, and now normative in RFC 0005 §11.2

Aspire owns: resources, console/structured logs, raw traces, metrics, health, process lifecycle.

  • Scalar owns: API reference, schemas, try-it, code samples.
  • The dashboard owns: primitive run-state (executions/attempts, saga instances incl. compensating, trigger firings, stream deliveries), the runtime override/config layer including gated write-back, plugin-registry wiring + doctor + contribution axes, contract provenance/coverage/duality, route→contract binding, codegen/scaffold state (migrations, drift), the per-capability management loop (create → configure(tabs) → monitor), and the live request journey across framework seams (S13).

Product surfaces retained as RFC 0005 consumers

Acceptance lines (MANDATORY, gate every slice)

Acceptance

  1. Non-duplication. No dashboard screen may render, as an owned surface: an OTLP trace waterfall / span-bar gantt, a structured/console log tail, a metrics chart, a resource start/stop/restart panel, or an OpenAPI operation list / try-it console. Each is Aspire's or Scalar's job and MUST be a deep-link out. Every merged panel must pass "why can't this just deep-link to Aspire/Scalar?" with a NetScript-only answer recorded in its issue — only-NetScript state, only-NetScript action (CLI-mirroring), or framework-seam semantics raw OTLP cannot express.
  2. One generator, two callers. Every dashboard mutation invokes the same contract route / CLI scaffolder the terminal does and renders its CLI-equivalent line (netscript … CodeBlock). No dashboard-only write paths, no forked codegen.
  3. Flow ≠ waterfall. S13 renders a primitive-grouped causal chain with payloads at seams, assembled from NetScript's own seam events; the moment raw timing/span detail is needed it out-links to Aspire /traces/detail/{id}. No span bars, no time-proportional gantt, no log tails in S13 — ever.

Integration seams (four seams, one URL scheme)

  1. Aspire → dashboard: WithUrl("NetScript Dashboard", /resource/{name}) on every scaffolded resource + two framework withCommands — typed links in [devtools W1b] add typed deep-link resolution #1472 and generated host/CLI wiring in [devtools W3a] generate the DevTools host and CLI command group #1477, Seam A widening (command/app kinds) on [dashboard DDX-1] @netscript/aspire command + app resource kinds #411, Seam B interim.
  2. Dashboard → Aspire: correlation-only TelemetryQueryPort ([dashboard DDX-3] TelemetryQueryPort + aspire-otlp-http adapter #413) resolves a traceId, then out-links to {aspireBase}/traces/detail/{id}, /structuredlogs?resource=, /consolelogs/resource/, /metrics/resource/. Never re-renders OTLP. The S13 flow plane does not widen this port.
  3. Dashboard → Scalar: /api/docs (+ operation anchor) deep-links only; externalDocs optional polish.
  4. Data plane: owned /_netscript/* introspection ([dashboard DDX-13] Introspection endpoint (/_netscript/*) #423) over already-shipped oRPC contracts, plus /_netscript/flows (SSE): the DevTools data plane joins the shipped per-primitive streams on the stamped traceparent; co-req DDX-23 ([dashboard DDX-23] seam-event flow plane: unified envelope + HTTP boundary events (S13 co-req) #557) adds the unified seam-event envelope + HTTP boundary events.

Killed / folded surfaces (documented so they don't creep back)

Slice map / dependencies

Plumbing: #410 (fresh-ui L3 blocks) → #412 (core scaffold, + FlowRecord) → #414 (thin plugin) · #411 (Seam A) · #413 (+#408 telemetry T7) · #423 (introspection + flows join) · #424 (CLI/deep-links/generator) · #427 (panel seam — the Directus-validated contribution axis).
Screens: #415, #416, #417, #418 (S13), #419, #420, #428#431, DDX-20/21/22 (#551 #552 #553).
Management wave (beta.7): #432 elevated — "Add resource" scaffold-from-UI keystone; DDX-23 seam-event envelope #557; template-gallery create entries in S5/S7–S10.
Design evidence from completed #507 is ratified in RFC 0005. UI quality remains #509.
Gate: #426 (E2E join + panel smoke; v2 adds the S13 flow-chain assertion, still no owned-waterfall assertion).
Co-requisites (wave:defer): TriggerDlqPort contract route #554, queue DeadLetterStore CLI/API #555. Co-requisite (beta.7): runtime-config mutation use-cases #556 (S3 write-back — surface check 2026-07-06: the store is read+watch-only today).
Deferred convergences: in-dashboard AI-on-codegen (with #238), in-app plugin marketplace beyond S5 marketplace-lite.

Refs #301 (road to stable). Co-lands with epic:telemetry-revamp (#399) for T4–T7 correlation fidelity.

Architecture — now owned by RFC 0005

Question Where it is answered
What DevTools is §5 — a separate first-party host process: CLI-generated root, own Vite process, own port, loopback-bound, dev-only
Production behaviour §5 — no production tier, enforced by two independent mechanisms
How plugins contribute §6 — { family: 'devtools', major: 1 } on a family-neutral envelope in packages/devtools-core (owner fork F-1: self-contained, built first)
Which contribution kinds exist §7 — three: panel, link, diagnostic (the last a reuse of the shipped plugin doctor seam). Each names a real first-party consumer
How a panel gets data §8 — host-owned deny-by-default read contract; no URL-shaped input anywhere; worked end-to-end contributor path in §8 D-6.4b
Trust and threat model §9 — exposure-graded tiers, INV-1/INV-2/INV-9, and threats labelled UNPROVEN where no gate exists yet
Information architecture §11 — <base>/ is a ranked problem feed answering "what is broken?", with a full state matrix (10 surfaces × 9 arms)
Packages and gates §13 — A1 packages/devtools-core + A6 CLI emission + A5 thin plugin; host app is generated userland
Roadmap §14 — 16 slices, each naming files, the contract it introduces, and one proving command

Sub-issues

Filed 2026-08-11 from the ratified one-shot manifest. Ordered by RFC §14's dependency DAG.

Relationship to existing boards

Notes (non-gating)

  • Milestone train unchanged: children remain on 0.0.15 per the owner-ratified 2026-07-19 train; this epic stays on Backlog / Triage.
  • Planning record: .llm/runs/plan-devtools-contribution--seed/.
  • The Plan-Gate was cleared by written owner waiver (drift D-18). The formal evaluator returned FAIL_PLAN twice and no evaluator PASS exists — do not cite one.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions