@kudzujs/core 0.8.26 → 0.8.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION_ROADMAP.md +8 -0
- package/README.md +1 -1
- package/RELEASES.md +30 -0
- package/docs/next-architecture/README.md +10 -6
- package/docs/next-architecture/compiler-current-architecture.md +1 -1
- package/docs/next-architecture/goal-c-state-resource-research.md +34 -0
- package/docs/next-architecture/large-application-ai-native-roadmap.md +452 -0
- package/docs/next-architecture/versioning.md +2 -1
- package/framework/compiler/source-compiler.mjs +7 -3
- package/package.json +1 -1
package/MIGRATION_ROADMAP.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This document is the source of truth for Kudzu's product direction, architecture invariants, and future development order. Read it before extending React-shaped syntax or browser capabilities.
|
|
4
4
|
|
|
5
|
+
The executable post-`0.8.27` compiler and large-application sequence is maintained in [`docs/next-architecture/large-application-ai-native-roadmap.md`](./docs/next-architecture/large-application-ai-native-roadmap.md). Follow its PR dependencies for implementation work; this document remains authoritative when selecting or accepting a migration capability.
|
|
6
|
+
|
|
5
7
|
[`GOAL_A.md`](./GOAL_A.md) and [`GOAL_B.md`](./GOAL_B.md) are completed capability-validation records. Their commerce and realtime dashboard fixtures prove general lifecycle, navigation, async-workflow, and Worker capabilities; they are not separate product verticals or future priority lists.
|
|
6
8
|
|
|
7
9
|
## North Star
|
|
@@ -262,6 +264,12 @@ This queue orders the next investigations by general migration value. Start only
|
|
|
262
264
|
- The standard suite counts exact route-entry transforms across repeated, distinct, and new-build sources and protects the safe keyed bulk-mount guard plus its per-root fallback.
|
|
263
265
|
- Goal B records which build, output, keyed, Worker, integration, and heap evidence exists; no new optimization is authorized without another reproduced material loss.
|
|
264
266
|
|
|
267
|
+
### Characterized In 0.8.27
|
|
268
|
+
|
|
269
|
+
- A reduced E2B Dashboard terminal fixture establishes callback-shared mutable browser resources, asynchronous generation invalidation, and BFCache retain/resume/discard behavior as a concrete Goal C boundary.
|
|
270
|
+
- Unsupported page-level mutable value refs fail during source analysis with a source location and the existing effect-owned animation-frame exception; no resource API or runtime is added.
|
|
271
|
+
- The large-application and AI-native execution plan orders symbol resolution, semantic operations, project/module analysis, IR authority, application foundations, ecosystem compatibility, AI tooling, and scale validation before broad feature work.
|
|
272
|
+
|
|
265
273
|
## Cross-Cutting Performance Gates
|
|
266
274
|
|
|
267
275
|
Every migration feature must preserve:
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Kudzu compiles ordinary React-shaped TypeScript and TSX into complete static HTM
|
|
|
14
14
|
|
|
15
15
|
> Experimental `0.8.x`: the compiler API and supported TSX surface may change.
|
|
16
16
|
|
|
17
|
-
**Latest release: 0.8.
|
|
17
|
+
**Latest release: 0.8.27 - Large-application compiler roadmap.** A reduced E2B terminal fixture now establishes the first Goal C resource boundary with a source-located diagnostic, while the architecture packet fixes the ordered semantic-compiler, application-scale, compatibility, AI-tooling, and production-validation program. Read the [release notes](./RELEASES.md#0827---large-application-compiler-roadmap), open the [release page](https://github.com/kudzujs/kudzu/releases/tag/v0.8.27), or follow the [architecture packet](./docs/next-architecture/README.md).
|
|
18
18
|
|
|
19
19
|
- [Documentation](https://kudzujs.cloud/docs)
|
|
20
20
|
- [Installation guide](https://kudzujs.cloud/docs#install)
|
package/RELEASES.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Kudzu Releases
|
|
2
2
|
|
|
3
|
+
## 0.8.27 - Large-application compiler roadmap
|
|
4
|
+
|
|
5
|
+
Kudzu 0.8.27 records the evidence-backed path from the current static-first compiler to large production applications without adding a React runtime, generic client framework, or speculative resource API.
|
|
6
|
+
|
|
7
|
+
### Changed in 0.8.27
|
|
8
|
+
|
|
9
|
+
- A reduced fixture from E2B Dashboard preserves a callback-shared terminal handle, asynchronous generation token, BFCache retention, resume, and discard cleanup as the first concrete Goal C resource-ownership boundary.
|
|
10
|
+
- Unsupported page-level mutable value refs now fail during source analysis with the source location and the existing effect-owned animation-frame exception instead of reaching the build-time DOM-ref runtime error.
|
|
11
|
+
- Goal C records independent WebSocket/SSE, shared request, and optimistic transaction candidates while explicitly withholding store, resource, query, cache, Provider, subscription, and scheduler APIs.
|
|
12
|
+
- The new large-application and AI-native execution plan audits the current compiler, IR, runtime, navigation, package, build, fixture, and benchmark boundaries and orders the next twelve independently verifiable PRs.
|
|
13
|
+
- The next implementation is fixed as a source-local binding index followed by symbol-aware descriptor discovery; ecosystem features cannot skip those semantic dependencies.
|
|
14
|
+
|
|
15
|
+
### Architecture Boundary
|
|
16
|
+
|
|
17
|
+
- Existing ComponentAnalysis, ModuleIR, RouteIR, CapabilityIR, complete HTML, direct DOM ownership, native navigation, and capability runtimes remain the incremental foundation.
|
|
18
|
+
- The plan generalizes symbol identity, semantic state operations, component/module dataflow, resource/range ownership, artifact references, code splitting, diagnostics, migration analysis, and application-scale evidence without introducing a browser component tree.
|
|
19
|
+
- React ecosystem support is classified as Native, Compiled, Migrated, Adapter, Partial, or Unsupported so package-specific knowledge can move behind a compatibility boundary instead of accumulating in the core compiler.
|
|
20
|
+
|
|
21
|
+
### Validation
|
|
22
|
+
|
|
23
|
+
- `npm run check`, `npm run test:package`, and all 176 tests pass.
|
|
24
|
+
- The E2B fixture remains an expected failure at its proven source boundary; no browser resource runtime or public API is emitted.
|
|
25
|
+
- Static-route zero JavaScript, existing animation-frame support, keyed-row diagnostics, setter-child diagnostics, and all current browser ownership behavior remain covered.
|
|
26
|
+
|
|
27
|
+
### Upgrade
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @kudzujs/core@^0.8.27
|
|
31
|
+
```
|
|
32
|
+
|
|
3
33
|
## 0.8.26 - Goal B benchmark hardening
|
|
4
34
|
|
|
5
35
|
Kudzu 0.8.26 makes the retained Goal B optimizations reproducible and directly regression-tested without changing generated runtime behavior or authoring support.
|
|
@@ -11,6 +11,8 @@ The top-level [`GOAL_A.md`](../../GOAL_A.md) and [`GOAL_B.md`](../../GOAL_B.md)
|
|
|
11
11
|
| C: state/resource model | Research only | Reduced fixtures expose a limitation |
|
|
12
12
|
| D: routing compatibility | Current behavior preserved | Revisit only with migration evidence and invariant review |
|
|
13
13
|
|
|
14
|
+
The active post-`0.8.27` implementation sequence is [`large-application-ai-native-roadmap.md`](./large-application-ai-native-roadmap.md). It orders compiler semantic generalization, large-application foundations, compatibility boundaries, AI tooling, and production validation without changing the invariants below.
|
|
15
|
+
|
|
14
16
|
## Required Invariants
|
|
15
17
|
|
|
16
18
|
- Every route remains a complete static HTML document.
|
|
@@ -24,16 +26,18 @@ The top-level [`GOAL_A.md`](../../GOAL_A.md) and [`GOAL_B.md`](../../GOAL_B.md)
|
|
|
24
26
|
## Reading Order
|
|
25
27
|
|
|
26
28
|
1. [`compiler-current-architecture.md`](./compiler-current-architecture.md): exact current responsibilities and data flow.
|
|
27
|
-
2. [`
|
|
28
|
-
3. [`
|
|
29
|
-
4. [`
|
|
30
|
-
5. [`
|
|
31
|
-
6. [`goal-
|
|
32
|
-
7. [`goal-
|
|
29
|
+
2. [`large-application-ai-native-roadmap.md`](./large-application-ai-native-roadmap.md): active direction, priorities, PR queue, and completion evidence.
|
|
30
|
+
3. [`goal-a-compiler-foundation.md`](./goal-a-compiler-foundation.md): completed extraction and generator foundation.
|
|
31
|
+
4. [`versioning.md`](./versioning.md): completed patch sequence and future sequencing rules.
|
|
32
|
+
5. [`performance-gates.md`](./performance-gates.md): output, build, and browser gates.
|
|
33
|
+
6. [`goal-b-optimization-benchmarks.md`](./goal-b-optimization-benchmarks.md): active measurements, retained optimizations, and continuation rules.
|
|
34
|
+
7. [`goal-c-state-resource-research.md`](./goal-c-state-resource-research.md): research boundary only.
|
|
35
|
+
8. [`goal-d-routing-compatibility-decisions.md`](./goal-d-routing-compatibility-decisions.md): routing and islands decisions.
|
|
33
36
|
|
|
34
37
|
## Resume Checklist
|
|
35
38
|
|
|
36
39
|
- [ ] Read [`MIGRATION_ROADMAP.md`](../../MIGRATION_ROADMAP.md) and this directory before planning migration work.
|
|
40
|
+
- [ ] Follow the PR dependency order in [`large-application-ai-native-roadmap.md`](./large-application-ai-native-roadmap.md); update it before broadening or reordering a patch.
|
|
37
41
|
- [ ] Confirm `package.json` still reports the actual current version; never infer release status from this plan.
|
|
38
42
|
- [ ] Inspect the worktree and preserve unrelated or uncommitted changes.
|
|
39
43
|
- [ ] Start later architecture work only by an explicit decision from the completed Goal A baseline.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Current Compiler Architecture
|
|
2
2
|
|
|
3
|
-
This maps the current `0.8.
|
|
3
|
+
This maps the current `0.8.27` architecture built on the completed `0.8.23` Goal A compiler foundation. File and function names are the stable references; line numbers are intentionally omitted because later work may still move code.
|
|
4
4
|
|
|
5
5
|
## Responsibility Map
|
|
6
6
|
|
|
@@ -36,6 +36,40 @@ Before any proposal, provide:
|
|
|
36
36
|
- output and ownership costs;
|
|
37
37
|
- an explanation of why existing async build rendering, state/effects, layout ownership, native platform storage, or effect-owned resources are insufficient.
|
|
38
38
|
|
|
39
|
+
## First Application Survey
|
|
40
|
+
|
|
41
|
+
The first GitHub survey used active licensed React/TypeScript applications rather than library demos. It found four distinct pressure families:
|
|
42
|
+
|
|
43
|
+
| Application evidence | Ownership pressure | Research disposition |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| [E2B Dashboard terminal](https://github.com/e2b-dev/dashboard/blob/97164c9cbc8ced05b9039415318550f4e4df3874/src/features/dashboard/terminal/dashboard-terminal.tsx) | Mutable remote handle and generation tokens survive callbacks; BFCache entry retains the handle, real discard closes it, and restore resumes it | First reduced fixture because it is the smallest precise lifetime |
|
|
46
|
+
| [Mattermost WebSocket client](https://github.com/mattermost/mattermost/blob/53373e3752c6e8d7979b787f342fea4c56e68472/webapp/platform/client/src/websocket.ts) and [Twenty SSE provider](https://github.com/twentyhq/twenty/blob/cd288d84470503ba897c0823a9d98701fa9986ab/packages/twenty-front/src/modules/sse-db-event/components/SSEProvider.tsx) | One document/layout transport has many independently mounted route subscribers plus reconnect and replay state | Strong cross-owner subscription research; too broad for the first fixture |
|
|
47
|
+
| [Actual Budget queries](https://github.com/actualbudget/actual/blob/87e33e49eb4d666c33e0c0f172faf340d1b7aa0a/packages/desktop-client/src/payees/queries.ts) and [Plane workspace wrapper](https://github.com/makeplane/plane/blob/31853ab2b8b7810c59dc30d22e52c8f4b5a71a47/apps/web/core/layouts/auth-layout/workspace-wrapper.tsx) | Shared keyed request results outlive route consumers and are invalidated by external events or owner changes | Candidate for keyed layout/document ownership, not authorization for a query API |
|
|
48
|
+
| [InstantDB optimistic update](https://github.com/instantdb/instant/blob/30561b01ea850514dd4e0270bdd6ff3ed159bbb1/client/www/lib/auth.ts) and [Raven reaction update](https://github.com/The-Commit-Company/raven/blob/a29a274466b7a060754839b3c8e29bbee012a61d/packages/lib/hooks/useReactToMessage.ts) | Multiple consumers observe one optimistic snapshot that must commit or roll back atomically | Two independent examples of shared optimistic transactions; still research only |
|
|
49
|
+
|
|
50
|
+
### E2B Reduced Fixture
|
|
51
|
+
|
|
52
|
+
The repository-owned fixture at `test/fixtures/goal-c-e2b-terminal` preserves the relevant conventional React shape without E2B's UI, SDK, or `useEffectEvent` dependency:
|
|
53
|
+
|
|
54
|
+
- one `null`-initialized remote handle ref;
|
|
55
|
+
- one numeric generation ref invalidating late asynchronous opens;
|
|
56
|
+
- `pagehide.persisted` retaining the handle for BFCache;
|
|
57
|
+
- non-persisted `pagehide` and effect cleanup closing it;
|
|
58
|
+
- `pageshow.persisted` resuming the retained handle;
|
|
59
|
+
- one unrelated static sibling route.
|
|
60
|
+
|
|
61
|
+
The build fails before BFCache behavior can be evaluated:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
src/pages/index.tsx:7:25 Mutable value useRef() is unsupported except for an effect-owned useRef(0) animation-frame handle; otherwise keep resource-private mutable values inside the owning effect
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The failure is triggered by the ordinary `useRef(0)` generation token during source analysis. Existing animation-frame specialization cannot safely cover this shape: the generation token has different writes and callback ownership, while the remote handle is a browser-only non-serializable value rather than a DOM ref. Supporting only the token would expose incorrect DOM-ref semantics for the handle.
|
|
68
|
+
|
|
69
|
+
The remaining question before any state/resource API discussion is whether independent fixtures justify a narrow specialization for callback-shared effect resources with document and BFCache ownership. Until then, the source-located diagnostic preserves the current boundary.
|
|
70
|
+
|
|
71
|
+
An effect-local rewrite is a useful control, but requiring applications to restructure ordinary callback-shared refs is not automatically an acceptable migration solution. The fixture remains an expected failure until research answers that boundary.
|
|
72
|
+
|
|
39
73
|
## Decision Boundary
|
|
40
74
|
|
|
41
75
|
Research may produce notes, fixtures, measurements, or a narrow compiler-specialization proposal. It must not publish `createStore`, `resource`, `query`, cache, Provider, subscription, or scheduler APIs. A public API requires separate approval after at least two independent migration fixtures establish the same semantics and after zero-cost exclusion is demonstrated.
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
# Large Application And AI-Native Development Plan
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Active execution plan after `0.8.27`. This document turns the current compiler audit into an ordered implementation program. It does not mark any planned capability as supported and does not authorize a React runtime, VDOM, hydration, retained browser component tree, generic rerenderer, public store/query/resource API, SPA router, or islands.
|
|
6
|
+
|
|
7
|
+
[`MIGRATION_ROADMAP.md`](../../MIGRATION_ROADMAP.md) remains authoritative for product invariants and fixture-driven feature selection. This plan is authoritative for the order and completion evidence of compiler generalization, large-application foundations, compatibility boundaries, AI tooling, and scale validation. If implementation evidence changes a boundary, update this document before broadening a patch.
|
|
8
|
+
|
|
9
|
+
## Product Outcome
|
|
10
|
+
|
|
11
|
+
Kudzu must support ordinary React-shaped TypeScript and TSX from small static sites through production SaaS, dashboards, CRUD, commerce, authenticated applications, realtime collaboration, data-heavy interfaces, and large module graphs. The browser should receive complete HTML and only the capabilities required by each route or application lifetime.
|
|
12
|
+
|
|
13
|
+
The differentiating KPI is `cost per successful task`, not source line count alone. A successful task includes build, browser behavior, accessibility, output, and ownership checks. Track input/output/reasoning tokens, files read and modified, tool calls, compiler attempts, failed attempts, correction cycles, completion time, source retention, and final client bytes.
|
|
14
|
+
|
|
15
|
+
The governing principle is:
|
|
16
|
+
|
|
17
|
+
> Write what AI already knows. Compile away what AI should not need to reason about.
|
|
18
|
+
|
|
19
|
+
## Audited Baseline
|
|
20
|
+
|
|
21
|
+
The current implementation already provides:
|
|
22
|
+
|
|
23
|
+
- complete route HTML and zero JavaScript for static routes;
|
|
24
|
+
- synchronous logical state with direct DOM commits;
|
|
25
|
+
- route, layout, conditional, keyed, effect, ref, and Worker ownership;
|
|
26
|
+
- stable keyed row identity with nested lists, state, refs, effects, and SVG;
|
|
27
|
+
- stale effect-invocation isolation and explicit cleanup;
|
|
28
|
+
- narrow React, React Router, and Zustand-shaped normalization;
|
|
29
|
+
- JSON-safe ComponentAnalysis, ModuleIR, RouteIR v1, and CapabilityIR v1;
|
|
30
|
+
- no-write source compilation and capability-specific runtime emission;
|
|
31
|
+
- source-located fail-closed diagnostics and broad reduced-fixture coverage.
|
|
32
|
+
|
|
33
|
+
The current limiting architecture is observable in these files:
|
|
34
|
+
|
|
35
|
+
| Concern | Current owner | Limitation to remove |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Project graph | `framework/compiler/source-graph.mjs`, `framework/build.mjs` | Global root, repeated parsing, narrow export resolution, no incremental project session |
|
|
38
|
+
| Normalization | `framework/compiler/source-compiler.mjs`, focused passes | Pass order and package ownership are implicit; semantically equal source often follows different shape-specific paths |
|
|
39
|
+
| Component/state analysis | `framework/compiler/source-compiler.mjs`, `analysis/component-analysis.mjs` | AST identity, identifier text, source offsets, and caller-side AST specialization remain central |
|
|
40
|
+
| Handler/binding analysis | `framework/compiler/descriptor-session.mjs`, `handler-lowering.mjs` | Capture/import/state discovery is name-based and arbitrary handlers become code before IR finalization |
|
|
41
|
+
| Effect/resource analysis | `effect-analysis.mjs`, resource-specific passes | Selected browser APIs have exact-shape ownership checks; there is no package-neutral resource model |
|
|
42
|
+
| Lists/ranges | `source-compiler.mjs`, `list-runtime.js` | Strong keyed ownership, but syntax recognition and runtime branches are list-specific and not a general range/window primitive |
|
|
43
|
+
| ModuleIR | `compiler/ir/module-ir.mjs` | Numeric slots, names, export strings, and formatted owner strings coexist; several sections are descriptive rather than authoritative inputs |
|
|
44
|
+
| RouteIR/CapabilityIR | `route-capability-planner.mjs` | Validation is shallow and capability selection is site-wide across interactive routes |
|
|
45
|
+
| Build/codegen | `framework/build.mjs`, runtime generators | Full destructive builds, serialized-string handler reachability, source-text runtime surgery, no route chunk/CSS closure report |
|
|
46
|
+
| Browser lifetime | `native-runtime.js`, `effect-runtime.js`, `navigation-runtime.js` | Effects invalidate stale work, but pending native handlers can write after route unmount |
|
|
47
|
+
| Compatibility | React/Router/Zustand passes plus core branches | Package-specific knowledge is not contained behind one adapter boundary |
|
|
48
|
+
| AI interface | CLI and string diagnostics | No stable diagnostic codes, semantic index, explain, fix, or migration analysis output |
|
|
49
|
+
|
|
50
|
+
## Architecture Direction
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
ProjectSession
|
|
54
|
+
-> parsed module and package graph
|
|
55
|
+
-> compatibility adapter registry
|
|
56
|
+
-> normalized modules with stable declaration/site identities
|
|
57
|
+
-> binding and symbol resolution
|
|
58
|
+
-> source semantic analysis
|
|
59
|
+
component and prop edges
|
|
60
|
+
state, derived, event, and operation edges
|
|
61
|
+
effect and resource ownership
|
|
62
|
+
collection and range ownership
|
|
63
|
+
-> strengthened existing ModuleIR
|
|
64
|
+
-> build-time render instantiation
|
|
65
|
+
-> RouteBuildRecord with RouteIR and artifact edges
|
|
66
|
+
-> per-route capability signature and chunk closure
|
|
67
|
+
-> HTML, CSS, and capability-specific ESM
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This is an incremental evolution of the current repository:
|
|
71
|
+
|
|
72
|
+
- Keep ComponentAnalysis and ModuleIR; make their references stable and their records authoritative.
|
|
73
|
+
- Keep `renderPage()` for build-known execution and concrete route ownership IDs; stop using it to rediscover source semantics already present in ModuleIR.
|
|
74
|
+
- Keep RouteIR and CapabilityIR; deepen validation and replace parallel route facts with one RouteBuildRecord.
|
|
75
|
+
- Keep existing browser runtimes; extract package-neutral semantic primitives only after fixtures prove repeated ownership needs.
|
|
76
|
+
- Do not introduce a general JavaScript bytecode VM or model the complete TypeScript language in a new IR.
|
|
77
|
+
|
|
78
|
+
## Required Invariants
|
|
79
|
+
|
|
80
|
+
- Static routes remain zero JavaScript.
|
|
81
|
+
- Interactive routes add no capability unrelated to their source and route lifetime.
|
|
82
|
+
- Complete HTML remains the initial document.
|
|
83
|
+
- Native navigation remains the fallback and default.
|
|
84
|
+
- React and ecosystem package source may be accepted, normalized, migrated, or adapted without executing React.
|
|
85
|
+
- Package-specific knowledge must not leak beyond the compatibility boundary into generic ownership, dataflow, IR, or browser runtime code.
|
|
86
|
+
- New semantic support starts from a real or reduced failing application fixture.
|
|
87
|
+
- Every patch is independently reviewable, fail-closed, and measured against representative output.
|
|
88
|
+
- A compiler refactor must preserve accepted source, diagnostics, RouteIR, HTML, assets, and browser ownership unless its scope explicitly changes one contract.
|
|
89
|
+
|
|
90
|
+
## Preserve, Refactor, Avoid
|
|
91
|
+
|
|
92
|
+
### Preserve
|
|
93
|
+
|
|
94
|
+
- Build-known execution and complete static output.
|
|
95
|
+
- Direct DOM ownership and synchronous logical state.
|
|
96
|
+
- Route/layout/key-path lifetime semantics.
|
|
97
|
+
- Keyed identity and exact state/effect/ref release.
|
|
98
|
+
- Effect invalidation and cleanup.
|
|
99
|
+
- JSON-safe, versioned stage boundaries.
|
|
100
|
+
- Source-located diagnostics.
|
|
101
|
+
- Rendered Worker exclusion and content hashing.
|
|
102
|
+
- Capability-specific output with no React runtime.
|
|
103
|
+
|
|
104
|
+
### Refactor
|
|
105
|
+
|
|
106
|
+
- Identifier text into resolved SymbolRef records.
|
|
107
|
+
- AST identity and `pos:end` keys into stable source-local declaration/site IDs.
|
|
108
|
+
- Exact setter syntax into semantic value and state-operation analysis.
|
|
109
|
+
- Caller-side component AST copying into a component/prop/callback graph.
|
|
110
|
+
- Manual export discovery into a project module-symbol graph.
|
|
111
|
+
- Primitive-only dependencies into property-path and derived dependencies.
|
|
112
|
+
- Resource-specific ownership passes into a package-neutral ResourceIR when evidence permits.
|
|
113
|
+
- Serialized handler URL searches into explicit artifact references.
|
|
114
|
+
- Site-wide capability unions into route capability signatures.
|
|
115
|
+
- Full destructive development builds into project-session invalidation and atomic output.
|
|
116
|
+
- String-only diagnostics into structured diagnostics suitable for machines and AI agents.
|
|
117
|
+
|
|
118
|
+
### Avoid
|
|
119
|
+
|
|
120
|
+
- React runtime fallback, hydration, islands, or a browser component tree.
|
|
121
|
+
- Public Kudzu-specific router, query, store, form, or scheduler APIs before migration evidence.
|
|
122
|
+
- One core pass per ecosystem package.
|
|
123
|
+
- A generic rerender engine or general callback registry.
|
|
124
|
+
- Incomplete dynamic import support.
|
|
125
|
+
- Speculative cache, virtualization, portal, stream, or resource runtimes.
|
|
126
|
+
- File splitting that does not reduce semantic coupling.
|
|
127
|
+
|
|
128
|
+
## Priority Program
|
|
129
|
+
|
|
130
|
+
### P0: Semantic Correctness And Compiler Foundation
|
|
131
|
+
|
|
132
|
+
P0 creates the semantic base required by every later large-application capability. Do not begin broad ecosystem or application features before the relevant P0 dependencies are complete.
|
|
133
|
+
|
|
134
|
+
| Order | Objective | Dependency | Completion evidence |
|
|
135
|
+
|---|---|---|---|
|
|
136
|
+
| P0.1 | Source-local binding index | None | Local, parameter, import, capture, global, and unresolved references are classified consistently |
|
|
137
|
+
| P0.2 | Descriptor consumers use SymbolRef | P0.1 | Handler/effect/binding capture and import discovery no longer depends only on text names |
|
|
138
|
+
| P0.3 | Graph diagnostics | P0.1 | Relative dynamic imports and unresolved runtime edges fail at the source location |
|
|
139
|
+
| P0.4 | Async native handler ownership | None | Pending handlers cannot write after route or DOM ownership is released |
|
|
140
|
+
| P0.5 | Atomic collision-safe build | None | Failed builds preserve prior output and public files cannot overwrite generated artifacts |
|
|
141
|
+
| P0.6 | Explicit ProjectSession | P0.1 | Root and caches are build-scoped; two projects can compile safely in one process |
|
|
142
|
+
| P0.7 | Parsed module/export cache | P0.6 | Shared modules are parsed and summarized once per build |
|
|
143
|
+
| P0.8 | Stable ModuleSymbol and SiteId | P0.6-P0.7 | Imports, re-exports, aliases, owners, and call sites use stable identities outside a pass |
|
|
144
|
+
| P0.9 | Semantic state-operation analysis | P0.1, P0.8 | Equivalent setter/helper forms lower to the same state operation |
|
|
145
|
+
| P0.10 | ModuleIR reference unification | P0.8-P0.9 | Signals, bindings, effects, keyed blocks, handlers, and owners use validated slots/symbols |
|
|
146
|
+
| P0.11 | Explicit route artifact graph | P0.10 | Handler/Worker/CSS/chunk retention uses structural references, not serialized string searches |
|
|
147
|
+
| P0.12 | Deep RouteIR and CapabilityIR validation | P0.10-P0.11 | Invalid state, effect, binding, list, ownership, and artifact references fail before codegen |
|
|
148
|
+
|
|
149
|
+
### P1: Large Application Foundations
|
|
150
|
+
|
|
151
|
+
| Objective | Required result |
|
|
152
|
+
|---|---|
|
|
153
|
+
| Cross-module component and prop dataflow | Deep composition, callbacks, setters, refs, context, and children retain semantic links without repeated AST inlining |
|
|
154
|
+
| Property-level derived dependencies | Object state can expose path-level dependencies without splitting application state into artificial primitives |
|
|
155
|
+
| Package-neutral shared state and actions | Existing Zustand support lowers through generic signal/action records; Redux-shaped research has a reusable target |
|
|
156
|
+
| Resource ownership | WebSocket, SSE, subscriptions, timers, observers, Workers, and imperative SDKs can share acquire/owner/dependency/cleanup semantics |
|
|
157
|
+
| Browser-only package modules | Native JS packages may be bundled only into effect/handler/resource chunks without build-time execution |
|
|
158
|
+
| Range ownership | Conditional, keyed, overlay, and future virtualized DOM ranges share release and identity primitives where semantics match |
|
|
159
|
+
| Route/layout graph | Nested persistent layouts and route lifetimes remain complete-document based and recoverable through native navigation |
|
|
160
|
+
| Route capability and chunk closure | Every route reports exact runtime, handler, package, Worker, and shared chunk edges |
|
|
161
|
+
| Route/layout CSS closure | Unrelated feature CSS is absent from a route unless configured global |
|
|
162
|
+
| Incremental development build | A source change recompiles and rerenders only affected modules/routes while preserving full reload correctness |
|
|
163
|
+
| Source-scale benchmark | At least 500 reachable modules, 50,000 TS/TSX lines, 50 routes, phase timings, and peak RSS |
|
|
164
|
+
|
|
165
|
+
### P2: Compatibility And Migration
|
|
166
|
+
|
|
167
|
+
- Add an internal compatibility adapter registry.
|
|
168
|
+
- Consolidate React compatibility ownership behind one adapter contract.
|
|
169
|
+
- Register React Router ownership without changing native navigation semantics.
|
|
170
|
+
- Move Zustand-specific logic out of generic core, handler, and state paths onto package-neutral shared-state/action IR.
|
|
171
|
+
- Characterize Redux/RTK, TanStack Query, React Hook Form, Zod, Radix/Headless UI/MUI, CSS-in-JS, animation, chart, drag/drop, virtualization, auth, REST, and GraphQL against real application fixtures.
|
|
172
|
+
- Prefer native packages and Web APIs, then compilation, deterministic migration, adapters, partial support, or explicit unsupported status in that order.
|
|
173
|
+
- Publish no public adapter API until an external adapter requires independent versioning.
|
|
174
|
+
|
|
175
|
+
### P3: AI Compiler Interface
|
|
176
|
+
|
|
177
|
+
- `kudzu check --json` with stable code, stage, file/range, symbols, module/component/ownership paths, compatibility status, suggestions, and safe fixes.
|
|
178
|
+
- `kudzu explain [route|symbol] --json` from the semantic and artifact graphs.
|
|
179
|
+
- `kudzu fix` only for deterministic changes whose preconditions the compiler proves.
|
|
180
|
+
- `kudzu migrate --analyze` for module, component, route, package, state, effect, resource, and blocker inventory.
|
|
181
|
+
- Migration readiness percentages must be calculated from actual classified modules/use sites, never estimated.
|
|
182
|
+
|
|
183
|
+
### P4: Production And Scale Validation
|
|
184
|
+
|
|
185
|
+
- Maintain Tier 1 reduced fixtures, Tier 2 complete small/medium apps, Tier 3 large production slices, and Tier 4 whole existing React applications.
|
|
186
|
+
- Require Chrome, Firefox, and WebKit journeys for production candidates.
|
|
187
|
+
- Add source maps, accessibility automation, keyboard journeys, security checks, output manifests, long-navigation heap tests, and deployment/cache guidance.
|
|
188
|
+
- Compare Kudzu and React + Vite first with the same agent, model, tools, task, and acceptance checks; expand only after the protocol is stable.
|
|
189
|
+
- Report median and range for tokens, cost, file reads, tool calls, builds, failures, completion time, source retention, output bytes, and accepted behavior.
|
|
190
|
+
|
|
191
|
+
## PR Execution Queue
|
|
192
|
+
|
|
193
|
+
### PR 1: Source-Local Binding Index
|
|
194
|
+
|
|
195
|
+
**Objective:** establish one correct reference classifier before further compiler generalization.
|
|
196
|
+
|
|
197
|
+
**Current problem:** `descriptor-session.mjs`, migration passes, and source analysis use identifier text plus separate shadow walkers. A local named like a browser global or import can be classified incorrectly, and later cross-module work has no stable foundation.
|
|
198
|
+
|
|
199
|
+
**Files:**
|
|
200
|
+
|
|
201
|
+
- Add `framework/compiler/analysis/binding-index.mjs`.
|
|
202
|
+
- Add `test/binding-index.test.mjs`.
|
|
203
|
+
- Update `framework/compiler/ast-helpers.mjs` only for shared scope primitives proven necessary.
|
|
204
|
+
- Update a narrow capture/import consumer in `framework/compiler/descriptor-session.mjs`.
|
|
205
|
+
|
|
206
|
+
**Internal contract:**
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
resolveReference(identifier)
|
|
210
|
+
-> local declaration
|
|
211
|
+
-> parameter
|
|
212
|
+
-> import
|
|
213
|
+
-> outer lexical capture
|
|
214
|
+
-> known global
|
|
215
|
+
-> unresolved
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Every result carries a stable source-local binding slot, debug name, declaration range when present, and reference range. AST nodes remain source-session-local and do not enter JSON-safe IR.
|
|
219
|
+
|
|
220
|
+
**Not in scope:**
|
|
221
|
+
|
|
222
|
+
- Cross-module TypeScript Program.
|
|
223
|
+
- Component graph changes.
|
|
224
|
+
- New accepted React syntax.
|
|
225
|
+
- Handler operation IR.
|
|
226
|
+
- Public API or runtime changes.
|
|
227
|
+
|
|
228
|
+
**Tests:**
|
|
229
|
+
|
|
230
|
+
- Shadowed `document`, `location`, `history`, `navigator`, and `console`.
|
|
231
|
+
- Imported name shadowed by callback parameter or local declaration.
|
|
232
|
+
- Outer component capture versus callback-local binding.
|
|
233
|
+
- State/setter name collision across owners.
|
|
234
|
+
- Existing Router, React, binding, native handler, and effect fixtures.
|
|
235
|
+
|
|
236
|
+
**Performance check:** create a focused synthetic source with at least 1,000 references and record index construction and lookup time. The purpose is a regression guard, not an optimization claim.
|
|
237
|
+
|
|
238
|
+
**Done condition:** capture/import classification uses the binding index for the selected consumer, all existing tests pass, representative generated artifacts remain byte-identical except for an explicitly corrected shadowing case, and no browser bytes are added.
|
|
239
|
+
|
|
240
|
+
### PR 2: Symbol-Aware Descriptor Discovery
|
|
241
|
+
|
|
242
|
+
**Objective:** move native handler, effect, and binding capture/import discovery onto the P0.1 binding index.
|
|
243
|
+
|
|
244
|
+
**Files:** `descriptor-session.mjs`, `handler-lowering.mjs`, `effect-analysis.mjs`, compiler tests.
|
|
245
|
+
|
|
246
|
+
**Tests:** shadowed imports/globals in native handlers, effects, bindings, and list evaluators; JSON-safe HandlerIR/BindingIR round trips.
|
|
247
|
+
|
|
248
|
+
**Done condition:** these analyses no longer decide identity from identifier text alone; output and diagnostics remain equivalent for existing accepted source.
|
|
249
|
+
|
|
250
|
+
### PR 3: Graph Failure Diagnostics
|
|
251
|
+
|
|
252
|
+
**Objective:** fail early for runtime graph edges the compiler cannot emit safely.
|
|
253
|
+
|
|
254
|
+
**Files:** `source-graph.mjs`, `source-compiler.mjs`; add page/helper/re-export invalid fixtures.
|
|
255
|
+
|
|
256
|
+
**Done condition:** unresolved relative imports/re-exports and ordinary dynamic imports report importer, source range, and specifier; no generated `.kudzu` path is the primary diagnostic.
|
|
257
|
+
|
|
258
|
+
### PR 4: Async Native Handler Invalidation
|
|
259
|
+
|
|
260
|
+
**Objective:** prevent late async event work from mutating released route/keyed ownership.
|
|
261
|
+
|
|
262
|
+
**Files:** `native-runtime.js`, navigation/list ownership integration, browser test fixture.
|
|
263
|
+
|
|
264
|
+
**Performance check:** compare synchronous event dispatch before and after; no material regression.
|
|
265
|
+
|
|
266
|
+
**Done condition:** a handler resolving after enhanced navigation or row removal cannot recreate or mutate released state, refs, or DOM.
|
|
267
|
+
|
|
268
|
+
### PR 5: Atomic And Collision-Safe Output
|
|
269
|
+
|
|
270
|
+
**Objective:** make production builds safe before scaling the build graph.
|
|
271
|
+
|
|
272
|
+
**Files:** `build.mjs`, build integration tests.
|
|
273
|
+
|
|
274
|
+
**Tests:** public collisions with route HTML, core runtime, handler entry, chunk, Worker namespace, source CSS, and configured CSS; failed build preserves prior `dist`.
|
|
275
|
+
|
|
276
|
+
**Done condition:** output is staged, validated, and atomically promoted; public content cannot silently replace generated artifacts.
|
|
277
|
+
|
|
278
|
+
### PR 6: ProjectSession And Explicit Root
|
|
279
|
+
|
|
280
|
+
**Objective:** remove import-time project globals and establish build-scoped graph/cache ownership.
|
|
281
|
+
|
|
282
|
+
**Files:** add `compiler/project-session.mjs`; update build, source graph, source compiler, and tests.
|
|
283
|
+
|
|
284
|
+
**Done condition:** two independent roots compile in one process, current CLI behavior and artifacts remain unchanged, and source caches cannot leak between projects.
|
|
285
|
+
|
|
286
|
+
### PR 7: Parsed Module And Export Summary Cache
|
|
287
|
+
|
|
288
|
+
**Objective:** make work proportional to unique modules instead of importer edges.
|
|
289
|
+
|
|
290
|
+
**Dependency:** PR 6.
|
|
291
|
+
|
|
292
|
+
**Test fixture:** at least 100 importers sharing component/helper modules; expose parse/summary counters in tests without production logging.
|
|
293
|
+
|
|
294
|
+
**Done condition:** each unchanged module is parsed and summarized once per project session; transformed mutable AST is not shared across transformer contexts.
|
|
295
|
+
|
|
296
|
+
### PR 8: Stable ModuleSymbol And SiteId
|
|
297
|
+
|
|
298
|
+
**Objective:** represent declarations, imports, re-exports, component calls, hooks, and ownership sites independently of transformed AST identity.
|
|
299
|
+
|
|
300
|
+
**Tests:** default/named exports, aliases, barrel chains, `export *`, cycles, and deterministic IDs after repeated compilation.
|
|
301
|
+
|
|
302
|
+
**Done condition:** cross-module semantic consumers use ModuleSymbol records and source-local SiteId values; readable names remain diagnostic metadata.
|
|
303
|
+
|
|
304
|
+
### PR 9: Semantic State Operations
|
|
305
|
+
|
|
306
|
+
**Objective:** lower semantically equivalent state updates to the existing structured HandlerIR path.
|
|
307
|
+
|
|
308
|
+
**Required source equivalence:**
|
|
309
|
+
|
|
310
|
+
```tsx
|
|
311
|
+
setCount(count + 1)
|
|
312
|
+
const next = count + 1; setCount(next)
|
|
313
|
+
const increment = () => setCount(count + 1); increment()
|
|
314
|
+
function increment(value) { setCount(value + 1) }; increment(count)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Internal scope:** extend existing command/value representation only for proven pure state operations. Keep arbitrary safe browser handlers as generated ESM; do not invent a general JavaScript IR.
|
|
318
|
+
|
|
319
|
+
**Done condition:** the equivalent forms produce the same StateWrite semantics, browser result, ownership references, and zero-unused-runtime behavior; recursion, escape, mutation, and dynamic dispatch fail with explicit diagnostics.
|
|
320
|
+
|
|
321
|
+
### PR 10: ModuleIR Reference Unification
|
|
322
|
+
|
|
323
|
+
**Objective:** replace mixed state names, export strings, formatted owner strings, and slots with validated source-local slots and SymbolRef records.
|
|
324
|
+
|
|
325
|
+
**Tests:** malformed references, duplicate exports, parent/child reciprocity, cycles, version rejection, and JSON round trips.
|
|
326
|
+
|
|
327
|
+
**Done condition:** every HandlerIR, BindingIR, DerivedIR, EffectIR, KeyedBlockIR, and component specialization edge validates before build-module generation.
|
|
328
|
+
|
|
329
|
+
### PR 11: RouteBuildRecord And Artifact Graph
|
|
330
|
+
|
|
331
|
+
**Objective:** make route artifact selection structural.
|
|
332
|
+
|
|
333
|
+
**Files:** add a focused route-artifact module; update `build.mjs` and capability planning.
|
|
334
|
+
|
|
335
|
+
**Done condition:** handler, effect, Worker, CSS, package, and chunk reachability derives from explicit route edges; serialized `includes()` searches and parallel route-fact maps are removed.
|
|
336
|
+
|
|
337
|
+
### PR 12: Deep RouteIR And CapabilityIR Validation
|
|
338
|
+
|
|
339
|
+
**Objective:** fail before codegen for invalid concrete route references and capability projections.
|
|
340
|
+
|
|
341
|
+
**Done condition:** duplicate/missing state IDs, invalid event/effect dependencies, broken list ownership, invalid binding descriptors, and artifact mismatches have focused tests and deterministic diagnostics.
|
|
342
|
+
|
|
343
|
+
## Large Application Capability Order
|
|
344
|
+
|
|
345
|
+
After the relevant P0 foundations, investigate capabilities in this order:
|
|
346
|
+
|
|
347
|
+
1. Property-level derived dependencies over ordinary object state.
|
|
348
|
+
2. Multi-boundary component/prop/callback/ref/context dataflow.
|
|
349
|
+
3. Package-neutral shared state/actions and migration of current Zustand internals.
|
|
350
|
+
4. Browser-only package imports in owned effect/resource modules.
|
|
351
|
+
5. ResourceIR from at least two independent WebSocket/SSE/SDK fixtures with the same semantics.
|
|
352
|
+
6. Route/layout capability and CSS chunk closure.
|
|
353
|
+
7. Incremental source and affected-route builds.
|
|
354
|
+
8. Range ownership and virtualization only after a real data-heavy fixture establishes direct DOM limits.
|
|
355
|
+
9. Optimistic shared transactions only after independent mutation fixtures establish commit/rollback semantics.
|
|
356
|
+
|
|
357
|
+
## Compatibility Strategy
|
|
358
|
+
|
|
359
|
+
Classify every package or category as one of:
|
|
360
|
+
|
|
361
|
+
- Native: ordinary JS/TS/Web package; use it directly in an allowed build or browser module.
|
|
362
|
+
- Compiled: package-shaped source lowers to package-neutral semantics and the import is erased.
|
|
363
|
+
- Migrated: deterministic source transformation replaces a React runtime implementation with native/Kudzu source.
|
|
364
|
+
- Adapter: repeated package semantics justify an internal compatibility adapter.
|
|
365
|
+
- Partial: only an explicit API subset is supported.
|
|
366
|
+
- Unsupported: safe transformation is not proven; report the reason and migration path.
|
|
367
|
+
|
|
368
|
+
Current factual baseline:
|
|
369
|
+
|
|
370
|
+
| Ecosystem | Current classification |
|
|
371
|
+
|---|---|
|
|
372
|
+
| React source | Compiled, partial |
|
|
373
|
+
| React Router | Compiled, partial |
|
|
374
|
+
| Zustand | Compiled, partial, insufficiently isolated |
|
|
375
|
+
| Redux/RTK | Unsupported |
|
|
376
|
+
| TanStack Query | Migrated recipe, partial |
|
|
377
|
+
| React Hook Form | Migrated recipe, partial |
|
|
378
|
+
| Zod | Unsupported in ordinary shared schema placement; native-package candidate after module work |
|
|
379
|
+
| Radix dialog | Migrated to native dialog, partial |
|
|
380
|
+
| Headless UI/MUI | Unsupported |
|
|
381
|
+
| Plain CSS | Native |
|
|
382
|
+
| CSS Modules | Compiled, partial |
|
|
383
|
+
| Tailwind | Application-owned CSS adapter boundary |
|
|
384
|
+
| CSS-in-JS | Unsupported |
|
|
385
|
+
| Native SVG/canvas charts | Native/compiled |
|
|
386
|
+
| React chart, animation, drag/drop, virtualization packages | Unsupported or migration candidates |
|
|
387
|
+
| REST `fetch` | Native/compiled, partial async model |
|
|
388
|
+
| GraphQL/auth/browser SDKs | Unsupported until browser package/resource ownership exists |
|
|
389
|
+
|
|
390
|
+
## Application Corpus
|
|
391
|
+
|
|
392
|
+
| Tier | Required evidence |
|
|
393
|
+
|---|---|
|
|
394
|
+
| Tier 1 | Existing reduced positive/negative fixtures with exact semantic boundaries |
|
|
395
|
+
| Tier 2 | Complete small/medium React applications such as CRUD, forms, commerce, admin, chat, and calendar |
|
|
396
|
+
| Tier 3 | Production slices with 100-500 modules, shared state, routing, packages, forms, server state, charts, auth, and resources |
|
|
397
|
+
| Tier 4 | At least two whole existing React applications, including one stateful/realtime app, with 500+ modules and 100,000+ reachable lines where available |
|
|
398
|
+
|
|
399
|
+
Every corpus entry records upstream URL/commit/license, acquisition hash, original source, migration patch, retained-source percentage, package classification, unsupported census, route/module/component counts, browser/a11y journeys, artifact bytes, build/rebuild/RSS metrics, and AI task traces.
|
|
400
|
+
|
|
401
|
+
## AI Cost And Tooling Gates
|
|
402
|
+
|
|
403
|
+
Architecture work must connect to measurable AI cost reduction:
|
|
404
|
+
|
|
405
|
+
| Compiler capability | Expected cost reduction |
|
|
406
|
+
|---|---|
|
|
407
|
+
| Symbol graph | Fewer file searches, alias mistakes, and capture debugging cycles |
|
|
408
|
+
| Semantic operations | Fewer rewrites into exact compiler-recognized syntax |
|
|
409
|
+
| Component dataflow | Less component flattening and callback forwarding surgery |
|
|
410
|
+
| Property dependencies | Less artificial primitive-state decomposition |
|
|
411
|
+
| Compatibility registry | Less Kudzu-specific package knowledge and documentation lookup |
|
|
412
|
+
| Structured diagnostics | Fewer log-parsing and source-location tool calls |
|
|
413
|
+
| Explain graph | Fewer files read to understand a route or mutation |
|
|
414
|
+
| Deterministic fixes | Fewer repetitive source edits and retries |
|
|
415
|
+
| Incremental build | Lower feedback time per compiler attempt |
|
|
416
|
+
| Artifact graph | Faster runtime/chunk/debugging attribution |
|
|
417
|
+
|
|
418
|
+
The first comparison is Kudzu versus React + Vite using the same agent, model, tools, prompt, task, and acceptance suite. Record at least five attempts per task and report medians and ranges. A build-only result is not success.
|
|
419
|
+
|
|
420
|
+
## Production Gates Before 1.0
|
|
421
|
+
|
|
422
|
+
- Async native and effect work cannot write after ownership release.
|
|
423
|
+
- Build output is atomic and collision-safe.
|
|
424
|
+
- Source maps connect generated route code to TS/TSX diagnostics.
|
|
425
|
+
- Chrome, Firefox, and WebKit pass required journeys.
|
|
426
|
+
- Accessibility automation and keyboard checks cover forms, navigation, dialogs, menus, charts, and errors.
|
|
427
|
+
- Route, module, package, CSS, Worker, and chunk closures are inspectable.
|
|
428
|
+
- Clean build, one-file rebuild, peak RSS, long-navigation heap, and mixed keyed ownership benchmarks have maintained baselines.
|
|
429
|
+
- Package compatibility status and version guarantees are public and machine-readable.
|
|
430
|
+
- Deployment cache, CSP, authentication, private-data, upload, and error-handling guidance is explicit.
|
|
431
|
+
- At least one complete content application and one complete stateful/realtime application pass production gates.
|
|
432
|
+
- AI benchmark results report cost per successful task and context surface area per successful task.
|
|
433
|
+
|
|
434
|
+
## Per-PR Required Evidence
|
|
435
|
+
|
|
436
|
+
- [ ] State the exact producer and consumer boundary changed.
|
|
437
|
+
- [ ] Name the real fixture or correctness failure authorizing the patch.
|
|
438
|
+
- [ ] Add a focused check that fails before the implementation.
|
|
439
|
+
- [ ] Preserve unrelated source support and diagnostics.
|
|
440
|
+
- [ ] Compare representative ModuleIR, RouteIR, HTML, emitted paths, and bytes.
|
|
441
|
+
- [ ] Prove static sibling routes remain zero JavaScript.
|
|
442
|
+
- [ ] Prove identity, cleanup, cancellation, and late-completion behavior where ownership changes.
|
|
443
|
+
- [ ] Record build/runtime measurements for nontrivial paths.
|
|
444
|
+
- [ ] Run `npm run check`, `npm test`, and package smoke when package output changes.
|
|
445
|
+
- [ ] Update this plan before combining or reordering scopes.
|
|
446
|
+
- [ ] Update release notes only after the implementation is complete and published.
|
|
447
|
+
|
|
448
|
+
## Immediate Decision
|
|
449
|
+
|
|
450
|
+
The first implementation PR is **PR 1: Source-Local Binding Index**. It is compile-time only, adds no browser bytes or public API, fixes an existing correctness class, and creates the stable semantic foundation required by component graphs, state operations, cross-module analysis, compatibility adapters, structured diagnostics, and AI explanation tooling.
|
|
451
|
+
|
|
452
|
+
The next PR is **PR 2: Symbol-Aware Descriptor Discovery**. Do not skip directly to a store, resource, router, virtualization, or ecosystem package feature.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Planned Version Sequence
|
|
2
2
|
|
|
3
|
-
This is an execution sequence, not release history. `0.8.16` through `0.8.
|
|
3
|
+
This is an execution sequence, not release history. `0.8.16` through `0.8.27` are completed scopes represented by package/release records.
|
|
4
4
|
|
|
5
5
|
Keep each patch behavior-preserving and independently reviewable. If a boundary proves inseparable, revise this plan before combining releases; do not silently broaden a patch.
|
|
6
6
|
|
|
@@ -17,6 +17,7 @@ Keep each patch behavior-preserving and independently reviewable. If a boundary
|
|
|
17
17
|
| `0.8.24` | Start Goal B with measured large keyed restoration and no-op normalization optimizations. | Fresh-profile keyed restoration improves materially; alternating 1,000-product builds improve materially; correctness, output, and byte deltas are recorded. |
|
|
18
18
|
| `0.8.25` | Reuse byte-identical generated native, parameter, and effect route-entry transforms within one build and strengthen compiler/release boundaries. | Alternating 1,011-page builds improve materially with identical deploy hashes; normalization and ModuleIR fail closed; Node, Chrome, package, and registry gates pass. |
|
|
19
19
|
| `0.8.26` | Harden Goal B benchmark reproducibility and ordinary regression coverage without changing runtime behavior. | Commerce comparison defaults to exact output; route transform counts and keyed bulk/fallback guards are protected by the standard suite; baseline coverage and limits are explicit. |
|
|
20
|
+
| `0.8.27` | Characterize the first Goal C browser-resource boundary and publish the ordered large-application and AI-native compiler execution plan. | The E2B-derived fixture fails with a source-located diagnostic, no resource runtime or API is added, and the next PR dependencies and completion evidence are explicit. |
|
|
20
21
|
|
|
21
22
|
## Sequence Rules
|
|
22
23
|
|
|
@@ -629,9 +629,13 @@ function createKudzuTransformer({ semantic, handlerUrl, file, sourceFiles, sourc
|
|
|
629
629
|
}
|
|
630
630
|
if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && ts.isCallExpression(node.initializer) && ts.isIdentifier(node.initializer.expression)) {
|
|
631
631
|
const owner = nearestFunction(node)
|
|
632
|
-
if (owner && node.initializer.expression.text === "useRef"
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
if (owner && node.initializer.expression.text === "useRef") {
|
|
633
|
+
const nullInitializer = node.initializer.arguments.length === 1 && node.initializer.arguments[0].kind === ts.SyntaxKind.NullKeyword
|
|
634
|
+
if (!nullInitializer && owner.modifiers?.some(modifier => modifier.kind === ts.SyntaxKind.DefaultKeyword)) throw sourceNodeError(node.initializer, sourceFile, "Mutable value useRef() is unsupported except for an effect-owned useRef(0) animation-frame handle; otherwise keep resource-private mutable values inside the owning effect")
|
|
635
|
+
if (nullInitializer) {
|
|
636
|
+
ensureOwner(owner)
|
|
637
|
+
componentAnalysis.registerRef(owner, { name: node.name.text, source: analysisSource(node) })
|
|
638
|
+
}
|
|
635
639
|
}
|
|
636
640
|
if (owner && node.initializer.expression.text === "useId" && node.initializer.arguments.length === 0) {
|
|
637
641
|
ensureOwner(owner)
|