Skip to content

Commit d30416a

Browse files
committed
docs: chart json-render package wayfinder
1 parent d31b345 commit d30416a

12 files changed

Lines changed: 393 additions & 0 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Research upstream json-render contracts
2+
3+
Type: research
4+
Status: resolved
5+
Blocked by: none
6+
7+
## Question
8+
9+
Which public contracts and runtime semantics in the current `@json-render/core` and `@json-render/vue` releases must the Devframes packages adopt, re-export, configure, or deliberately constrain? Compare the current release with the version embedded by `vitejs/devtools`, covering schema/catalog typing, registries, state and binding expressions, actions and validation, streaming, extension composition, renderer lifecycle, package stability, and licensing.
10+
11+
## Answer
12+
13+
See [Upstream json-render contracts](../research/upstream-json-render.md).
14+
15+
The current upstream pair is `@json-render/core@0.19.0` and `@json-render/vue@0.19.0`. Its catalog and registry types aid authoring but do not fully validate component props, authorize actions, compose extensions, or guarantee lifecycle behavior. A direct Devframes re-export therefore needs reviewed named exports, exact upstream pinning, a separately versioned protocol validator, and compatibility tests. The report also records the Apache-2.0 obligations and recommends keeping streaming optional until the protocol decision explicitly adopts it.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Inventory existing JSON-render and runtime seams
2+
3+
Type: research
4+
Status: resolved
5+
Blocked by: none
6+
7+
## Question
8+
9+
What behavior currently exists in this repository and `vitejs/devtools`, and which devframe and hub seams can host it without violating their boundaries? Trace the current hub types, `createJsonRenderer`, shared-state transport, dock projection, Vite viewer, standalone adapters, static dumps, client host, package build conventions, and tests. Record concrete compatibility obligations and architectural constraints rather than proposing the final API.
10+
11+
## Answer
12+
13+
See [Existing JSON-render integration seams](../research/existing-integration-seams.md).
14+
15+
The current repository owns permissive hub types, a hub-only shared-state factory, and a JSON-render dock discriminator; `vitejs/devtools` owns the only renderer and catalog. Wire projection accidentally strips renderer methods and leaves `_stateKey`, standalone adapters have no renderer assets or factory, and static dumps can replay specs but not RPC actions. The hub's existing headless client boundary is suitable for renderer substitution, while stable scoped identities, explicit serialization, cleanup, standalone assets, declared-action isolation, and dedicated tests are missing.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define package ownership and public exports
2+
3+
Type: grilling
4+
Status: open
5+
Blocked by: 01, 02
6+
7+
## Question
8+
9+
What does each package own and export, and what dependency direction keeps the protocol stable, devframe-native, and renderer-swappable? Resolve the direct `@json-render/core` re-export surface, schema and catalog exports, renderer handles, Vue registry and shell exports, subpath exports, peer dependencies, type names, and the boundary with `devframe` and `@devframes/hub`.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define catalog, state, and action semantics
2+
3+
Type: grilling
4+
Status: open
5+
Blocked by: 01, 03
6+
7+
## Question
8+
9+
What makes a Devframes JSON-render spec valid and portable? Define the versioned base catalog, extension catalogs and compatibility metadata, declared and validated actions, state ownership and binding updates, replacement versus incremental updates, whether streaming/generative-UI primitives enter the initial protocol, serialization limits, validation timing, failure behavior, and how direct upstream re-exports coexist with a stable Devframes protocol.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define devframe runtime integration
2+
3+
Type: grilling
4+
Status: open
5+
Blocked by: 02, 03, 04
6+
7+
## Question
8+
9+
How does an author declare and update one or more JSON-render views on a devframe, and how does the same definition run through CLI, dev, SPA, build, Vite, and embedded adapters? Resolve view identity and lifecycle, scoped shared state and RPC actions, static snapshot behavior, default standalone UI assets, ownership of `createJsonRenderer`, disposal, reconnects, and whether the integration requires a general devframe view primitive.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define hub projection and renderer substitution
2+
3+
Type: grilling
4+
Status: open
5+
Blocked by: 03, 04, 05
6+
7+
## Question
8+
9+
How does a hub discover and project a devframe JSON-render view into a dock while remaining headless and UI-framework neutral? Define dock metadata, client-host responsibilities, renderer selection and injection, use of the official Vue UI versus a third-party implementation, catalog compatibility checks, loading and error states, disposal, and migration of the current hub-owned JSON-render types and factory.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Define the official Vue and Antfu Design UI
2+
3+
Type: grilling
4+
Status: open
5+
Blocked by: 04
6+
7+
## Question
8+
9+
What exactly does `@devframes/json-render-ui` ship as the opinionated Vue implementation? Resolve its base component registry, fidelity and intentional changes from the Vite DevTools catalog, `@antfu/design` component mapping, semantic tokens and UnoCSS integration, icons, accessibility, loading and error surfaces, registry extension, renderer shell APIs, static-app assets, Storybook coverage, and theming responsibilities.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Prototype the end-to-end consumer API
2+
3+
Type: prototype
4+
Status: open
5+
Blocked by: 05, 06, 07
6+
7+
## Question
8+
9+
Does one small, disposable API prototype make the intended seams natural for all key consumers? Demonstrate one view authored once, rendered by the official Vue registry standalone and in a hub dock, replaced by a third-party registry, updated through declared live actions and state, and emitted as a static snapshot. Use the prototype to resolve awkward ownership, naming, lifecycle, and configuration before the specification is assembled.
10+
11+
## Answer
12+
13+
Pending.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Assemble the implementation-ready specification
2+
3+
Type: task
4+
Status: open
5+
Blocked by: 01, 02, 03, 04, 05, 06, 07, 08
6+
7+
## Question
8+
9+
Consolidate the resolved decisions and prototype into the destination specification without reopening them. Include package manifests and exports, public TypeScript API sketches, runtime and data flows, component catalog, extension and substitution model, devframe and hub changes, migration of existing repository APIs, diagnostics, documentation, test matrix, acceptance criteria, and an ordered implementation sequence suitable for follow-up tickets.
10+
11+
## Answer
12+
13+
Pending.

plans/json-render/map.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# JSON Render Packages Wayfinder
2+
3+
## Destination
4+
5+
Produce an implementation-ready specification for `@devframes/json-render` and `@devframes/json-render-ui`: their package boundaries, public APIs, protocol semantics, official Vue renderer, devframe runtime support, hub integration, migration inside this repository, acceptance criteria, and implementation sequence.
6+
7+
## Notes
8+
9+
- This map plans the work; implementing or releasing the packages is outside its destination.
10+
- `@devframes/json-render` is a stable, devframe-native protocol package. It directly re-exports the relevant `@json-render/core` API and owns the Devframes catalog, declared-action contract, runtime handles, and integration helpers.
11+
- `@devframes/json-render-ui` is the official Vue implementation. Its registry implements the catalog with `@antfu/design`, while third-party registries can replace it.
12+
- The catalog has a versioned portable base and explicit extensions. A registry is a framework-specific implementation of a catalog.
13+
- Views work in standalone and hub deployments across live and static devframe outputs. Live outputs can use RPC actions; static behavior must be specified explicitly.
14+
- Specs invoke only actions declared for that view. An arbitrary string-to-RPC bridge is not part of the target contract.
15+
- The final specification covers this repository. Adoption and code removal in `vitejs/devtools` is a separate effort.
16+
- Relevant skills: `research`, `grilling`, `domain-modeling`, `prototype`, `antfu`, `antfu-design`, `vue-best-practices`, `unocss`, `vite`, `tsdown`, and `vitest`.
17+
- Local tracker operations: tickets are files under `issues/`; `Status: open` is unclaimed, `Status: claimed` is in progress, and `Status: resolved` is closed. A ticket is on the frontier when every number in `Blocked by` is resolved.
18+
19+
## Decisions so far
20+
21+
- [Research upstream json-render contracts](issues/01-research-upstream-json-render.md) — Upstream `0.19.0` is structurally reusable but pre-1.0 typing is not a validation or authorization boundary; direct re-exports require pinning and a Devframes-owned protocol guard.
22+
- [Inventory existing JSON-render and runtime seams](issues/02-research-existing-integration-seams.md) — The current hub transports whole specs through shared state and an accidental `_stateKey` projection; portable standalone/static rendering, stable identity, action isolation, cleanup, and tests remain to be designed.
23+
24+
## Not yet specified
25+
26+
- The implementation slices and test matrix. These become precise after the public API prototype establishes the package seams.
27+
28+
## Out of scope
29+
30+
- Implementing, publishing, or releasing the packages.
31+
- Changing `vitejs/devtools` to consume the packages or deleting its current implementation.
32+
- Official React, Solid, Svelte, or vanilla registries; third-party renderer compatibility is specified through the core contract.
33+
- Agent-driven UI generation beyond any protocol capability required to keep the base catalog compatible with json-render.

0 commit comments

Comments
 (0)