fastscript 3.0.0 → 3.0.2

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/README.md CHANGED
@@ -1,136 +1,161 @@
1
- # FastScript
2
-
3
- FastScript is a proprietary, source-available JavaScript-first full-stack runtime built around a first-class `.fs` file format.
4
-
5
- It is designed to feel easier to read than heavyweight stack combinations while staying compatible with the JavaScript ecosystem developers already use.
6
-
7
- - Write normal JavaScript or TypeScript in `.fs`
8
- - Write pages, APIs, middleware, jobs, and database workflows in `.fs`
1
+ # FastScript
2
+
3
+ FastScript is a proprietary, source-available JavaScript-first full-stack runtime built around a first-class `.fs` file format.
4
+
5
+ It is designed to feel easier to read than heavyweight stack combinations while staying compatible with the JavaScript ecosystem developers already use.
6
+
7
+ - Write normal JavaScript or TypeScript in `.fs`
8
+ - Write pages, APIs, middleware, jobs, and database workflows in `.fs`
9
9
  - Keep compatibility with normal `.js` packages and modules
10
10
  - Treat FastScript-specific syntax as optional sugar, not a requirement
11
+ - Govern compatibility claims through a source-of-truth support matrix
11
12
  - Compile to optimized JavaScript for production deployment
12
- - Deploy the same app to Node, Vercel, or Cloudflare
13
- - Run one quality gate for formatting, linting, typecheck, tests, smoke checks, benchmarks, and interop
14
- - Build on the same language/runtime foundation that powers the future FastScript AI coding products
15
-
16
- FastScript v3 is built for product teams that want a simpler, faster full-stack pipeline without surrendering compatibility with the ground-level JavaScript platform.
17
-
18
- The v3 product contract is simple:
19
-
20
- - `.fs` is a universal JS/TS container for the FastScript runtime
21
- - FastScript-specific syntax is optional sugar
22
- - valid JS/TS failures in `.fs` are FastScript compatibility bugs
23
- - the speed story is earned by the runtime/compiler/toolchain and backed by release proof artifacts
24
-
25
- ## What FastScript Is
26
-
27
- FastScript combines:
28
-
29
- 1. A JS/TS-compatible source container: `.fs`
30
- 2. A compiler and CLI
31
- 3. A full-stack app runtime
32
- 4. A deployment pipeline for multiple targets
33
- 5. A bridge back to standard JavaScript and TypeScript export paths
34
-
35
- That means a single project can contain:
36
-
37
- - UI pages
38
- - API handlers
39
- - middleware
40
- - database migrations
41
- - seed scripts
42
- - jobs and workers
43
- - deploy adapters
44
-
45
- ## Core Positioning
46
-
47
- FastScript is built to be:
48
-
49
- - Simpler than stacking TypeScript + framework + glue code everywhere
50
- - Faster to build and ship than heavier pipeline combinations
51
- - Compatible with existing JavaScript libraries
52
- - Friendly to AI-assisted generation because the language surface is smaller and more regular
53
- - Easy to migrate into and easy to export back out
54
-
55
- ## Current Measured Numbers
56
-
57
- These are the real measured numbers from the current repo benchmark report:
58
-
13
+ - Deploy the same app to Node, Vercel, or Cloudflare
14
+ - Run one quality gate for formatting, linting, typecheck, tests, smoke checks, benchmarks, and interop
15
+ - Build on the same language/runtime foundation that powers the future FastScript AI coding products
16
+
17
+ FastScript v3 is built for product teams that want a simpler, faster full-stack pipeline without surrendering compatibility with the ground-level JavaScript platform.
18
+
19
+ The v3 product contract is simple:
20
+
21
+ - `.fs` is a universal JS/TS container for the FastScript runtime
22
+ - FastScript-specific syntax is optional sugar
23
+ - valid JS/TS failures in `.fs` are FastScript compatibility bugs
24
+ - the speed story is earned by the runtime/compiler/toolchain and backed by release proof artifacts
25
+
26
+ ## What FastScript Is
27
+
28
+ FastScript combines:
29
+
30
+ 1. A JS/TS-compatible source container: `.fs`
31
+ 2. A compiler and CLI
32
+ 3. A full-stack app runtime
33
+ 4. A deployment pipeline for multiple targets
34
+ 5. A bridge back to standard JavaScript and TypeScript export paths
35
+
36
+ That means a single project can contain:
37
+
38
+ - UI pages
39
+ - API handlers
40
+ - middleware
41
+ - database migrations
42
+ - seed scripts
43
+ - jobs and workers
44
+ - deploy adapters
45
+
46
+ ## Core Positioning
47
+
48
+ FastScript is built to be:
49
+
50
+ - Simpler than stacking TypeScript + framework + glue code everywhere
51
+ - Faster to build and ship than heavier pipeline combinations
52
+ - Compatible with existing JavaScript libraries
53
+ - Friendly to AI-assisted generation because the language surface is smaller and more regular
54
+ - Easy to migrate into and easy to export back out
55
+
56
+ ## Current Measured Numbers
57
+
58
+ These are the real measured numbers from the current repo benchmark report:
59
+
59
60
  - Build time: `702.98ms`
60
61
  - JS first-load gzip: `2.71KB`
61
62
  - Routes in benchmark app: `16`
62
63
  - API routes in benchmark app: `5`
63
- - Interop matrix: `13/13` passing
64
+ - Interop matrix: `17/17` passing
64
65
  - Current website deploy target: Node, Vercel, and Cloudflare adapters supported
66
+ - Governed `.fs` parity corpus: `18` passing checks across JS/TS, Next-style, React, Node, and Vue patterns
67
+
68
+ See:
69
+
70
+ - `benchmarks/latest-report.md`
71
+ - `benchmarks/suite-latest.json`
72
+ - `benchmarks/interop-latest.json`
73
+ - `docs/PROOF_PACK.md`
74
+
75
+ ## Why Teams Pick FastScript
76
+
77
+ - Smaller client payloads than heavier framework baselines
78
+ - Faster build loops and stricter release gates in one toolchain
79
+ - One runtime-native source container for pages, APIs, jobs, and middleware
80
+ - Package compatibility without giving up a proprietary language/runtime moat
81
+ - A direct path into the next FastScript AI assistant stack
82
+
83
+ ## Why Developers Choose FastScript
84
+
85
+ FastScript is built for developers who want one system instead of a pile of cooperating tools.
86
+
87
+ - Write ordinary TS/JS/JSX/TSX in `.fs`
88
+ - Use the same runtime for frontend pages, backend APIs, middleware, jobs, and workers
89
+ - Keep npm packages and ecosystem code while migrating incrementally
90
+ - See exactly what is `proven`, `partial`, `planned`, or `blocked` in the governed support matrix
91
+ - Convert existing route-based codebases safely with dry-run previews, diff artifacts, validation, and rollback
92
+ - Ship through Node, Vercel, or Cloudflare deploy adapters without rebuilding your app around each target
93
+
94
+ The strongest public developer guide lives at `/why-fastscript`, and the compatibility lane for edge cases lives at:
65
95
 
66
- See:
67
-
68
- - `benchmarks/latest-report.md`
69
- - `benchmarks/suite-latest.json`
70
- - `benchmarks/interop-latest.json`
71
- - `docs/PROOF_PACK.md`
72
-
73
- ## Why Teams Pick FastScript
74
-
75
- - Smaller client payloads than heavier framework baselines
76
- - Faster build loops and stricter release gates in one toolchain
77
- - One runtime-native source container for pages, APIs, jobs, and middleware
78
- - Package compatibility without giving up a proprietary language/runtime moat
79
- - A direct path into the next FastScript AI assistant stack
80
-
81
- ## Install
82
-
83
- ### Option 1: npm install
84
-
85
- ```bash
86
- npm install -g fastscript
87
- fastscript --help
88
- ```
89
-
90
- The published npm package is generated as a self-contained release bundle, so the CLI works without a second private npm package.
91
-
92
- ### Option 2: local repo workflow
93
-
94
- ```bash
95
- git clone https://github.com/lordolami/fastscript.git
96
- cd fastscript
97
- npm install
98
- ```
99
-
100
- ### Option 3: global CLI link for daily use
101
-
102
- ```bash
103
- git clone https://github.com/lordolami/fastscript.git
104
- cd fastscript
105
- npm install
106
- npm link
107
- fastscript --help
108
- ```
109
-
110
- This gives you a global `fastscript` command backed by your local clone.
111
-
112
- The source repos remain split for development, but npm users get a clean self-contained public package.
113
-
114
- To use the CLI directly during development:
115
-
116
- ```bash
117
- node ./src/cli.mjs --help
118
- ```
119
-
120
- If you publish or link the package locally, the command is:
96
+ - `https://github.com/lordolami/fastscript/issues/new?template=compatibility-gap.yml`
121
97
 
122
- ```bash
123
- fastscript
124
- ```
98
+ The canonical real-world adoption flow for greenfield apps and incremental migration lives at:
125
99
 
126
- ## Quick Start
100
+ - `/docs/adoption`
127
101
 
128
- ### Create a project
129
-
130
- ```bash
131
- npm run create
132
- ```
102
+ The first official greenfield product baseline lives at:
133
103
 
104
+ - `/docs/team-dashboard-saas`
105
+
106
+ ## Install
107
+
108
+ ### Option 1: npm install
109
+
110
+ ```bash
111
+ npm install -g fastscript
112
+ fastscript --help
113
+ ```
114
+
115
+ The published npm package is generated as a self-contained release bundle, so the CLI works without a second private npm package.
116
+
117
+ ### Option 2: local repo workflow
118
+
119
+ ```bash
120
+ git clone https://github.com/lordolami/fastscript.git
121
+ cd fastscript
122
+ npm install
123
+ ```
124
+
125
+ ### Option 3: global CLI link for daily use
126
+
127
+ ```bash
128
+ git clone https://github.com/lordolami/fastscript.git
129
+ cd fastscript
130
+ npm install
131
+ npm link
132
+ fastscript --help
133
+ ```
134
+
135
+ This gives you a global `fastscript` command backed by your local clone.
136
+
137
+ The source repos remain split for development, but npm users get a clean self-contained public package.
138
+
139
+ To use the CLI directly during development:
140
+
141
+ ```bash
142
+ node ./src/cli.mjs --help
143
+ ```
144
+
145
+ If you publish or link the package locally, the command is:
146
+
147
+ ```bash
148
+ fastscript
149
+ ```
150
+
151
+ ## Quick Start
152
+
153
+ ### Create a project
154
+
155
+ ```bash
156
+ npm run create
157
+ ```
158
+
134
159
  Or use one of the included templates:
135
160
 
136
161
  ```bash
@@ -138,511 +163,542 @@ npm run create:fullstack
138
163
  npm run create:startup-mvp
139
164
  ```
140
165
 
141
- ### Run locally
142
-
143
- ```bash
144
- npm run dev
145
- ```
146
-
147
- ### Link the CLI globally from your clone
148
-
149
- ```bash
150
- npm link
151
- fastscript create my-app
152
- ```
153
-
154
- ### Build for production
155
-
156
- ```bash
157
- npm run build
158
- ```
159
-
160
- ### Start the production build
161
-
162
- ```bash
163
- npm run start
164
- ```
165
-
166
+ `startup-mvp` is the stable template id for the Team Dashboard SaaS reference app, which is now the first official FastScript greenfield product baseline.
167
+
168
+ ### Run locally
169
+
170
+ ```bash
171
+ npm run dev
172
+ ```
173
+
174
+ ### Link the CLI globally from your clone
175
+
176
+ ```bash
177
+ npm link
178
+ fastscript create my-app
179
+ ```
180
+
181
+ ### Build for production
182
+
183
+ ```bash
184
+ npm run build
185
+ ```
186
+
187
+ ### Start the production build
188
+
189
+ ```bash
190
+ npm run start
191
+ ```
192
+
166
193
  ### Run the full quality gate
167
194
 
168
195
  ```bash
169
196
  npm run qa:all
170
197
  ```
171
198
 
172
- ## The `.fs` Language At A Glance
173
-
174
- FastScript keeps normal JavaScript module structure and adds a few core forms:
175
-
176
- - `fn` for functions
177
- - `state` for named stateful declarations
178
- - `~name = ...` for lightweight reactive-style declarations
179
- - type syntax that can be stripped at compile time
180
- - file conventions for pages, APIs, and runtime hooks
181
-
182
- ### Example: basic page
183
-
184
- ```fs
185
- export default fn Page() {
186
- state title = "FastScript"
187
- ~subtitle = "Write once. Ship anywhere."
188
-
189
- return `
190
- <section>
191
- <h1>${title}</h1>
192
- <p>${subtitle}</p>
193
- </section>
194
- `
195
- }
196
- ```
197
-
198
- ### Example: load data for a page
199
-
200
- ```fs
201
- export async fn load(ctx) {
202
- const user = await ctx.db.get("users", ctx.params.id)
203
- if (!user) return { notFound: true }
204
- return { user }
205
- }
206
-
207
- export default fn Page({ user }) {
208
- return `<h1>${user.name}</h1>`
209
- }
210
- ```
211
-
212
- ### Example: API route
213
-
214
- ```fs
215
- export const schemas = {
216
- POST: { sku: "string", qty: "int" }
217
- }
218
-
219
- export async fn POST(ctx) {
220
- const body = await ctx.input.validateBody(schemas.POST)
221
- const order = { id: Date.now().toString(36), ...body }
222
- ctx.db.collection("orders").set(order.id, order)
223
- ctx.queue.enqueue("send-order-email", { orderId: order.id })
224
- return ctx.helpers.json({ ok: true, order })
225
- }
226
- ```
227
-
228
- ### Example: middleware
229
-
230
- ```fs
231
- export async fn middleware(ctx, next) {
232
- ctx.state.requestStartedAt = Date.now()
199
+ ## Real-World Adoption
233
200
 
234
- if (ctx.url.pathname.startsWith("/private") && !ctx.session?.user) {
235
- return ctx.helpers.redirect("/")
236
- }
201
+ Use this rule before starting product work:
237
202
 
238
- return next()
239
- }
240
- ```
241
-
242
- ### Example: hydration hook for client behavior
243
-
244
- ```fs
245
- export function hydrate({ root }) {
246
- const button = root.querySelector("[data-action]")
247
- if (!button) return
248
-
249
- button.addEventListener("click", () => {
250
- console.log("hydrated")
251
- })
252
- }
253
- ```
254
-
255
- ## Page Contract
256
-
257
- A FastScript page can export any of the following:
258
-
259
- - `export default fn Page(...)` or `export default function Page(...)`
260
- - `export async fn load(ctx)` for server-side data loading
261
- - `export function hydrate({ root, ...ctx })` for client behavior
262
- - HTTP method handlers like `POST`, `PUT`, `PATCH`, `DELETE`
263
-
264
- ### Minimal page
265
-
266
- ```fs
267
- export default fn Page() {
268
- return `<h1>Hello</h1>`
269
- }
270
- ```
271
-
272
- ### Page with loader
273
-
274
- ```fs
275
- export async fn load(ctx) {
276
- return { now: new Date().toISOString() }
277
- }
278
-
279
- export default fn Page({ now }) {
280
- return `<p>${now}</p>`
281
- }
282
- ```
283
-
284
- ## Routing
285
-
286
- FastScript uses file-based routing under `app/pages`.
287
-
288
- ### Route examples
289
-
290
- - `app/pages/index.fs` -> `/`
291
- - `app/pages/blog/index.fs` -> `/blog`
292
- - `app/pages/blog/[slug].fs` -> `/blog/:slug`
293
- - `app/pages/docs/[...slug].fs` -> `/docs/:slug*`
294
- - `app/pages/[[...slug]].fs` -> optional catch-all
295
- - `app/pages/blog/[id:int].fs` -> typed param route
296
- - `app/pages/404.fs` -> not-found page
297
- - `app/pages/_layout.fs` -> global layout wrapper
298
-
299
- ## Full-Stack Surface Area
300
-
301
- FastScript currently includes first-party support for:
302
-
303
- - pages
304
- - layouts
305
- - API routes
306
- - middleware
307
- - auth/session flows
308
- - database migrations
309
- - database seed scripts
310
- - storage and upload handlers
311
- - jobs and worker runtime
312
- - deploy targets
313
- - benchmark and interop reporting
314
- - docs indexing and API reference generation
315
-
316
- ## Interop Story
317
-
318
- FastScript is designed to sit on top of the JavaScript ecosystem, not replace it with an isolated wall.
319
-
320
- ### What works
321
-
322
- - normal `.js` dependencies
323
- - ESM/CJS compatibility checks
324
- - export from `.fs` to `.js`
325
- - export from `.fs` to `.ts`
326
- - migration tooling from page-based JS/TS apps into `.fs`
327
-
328
- ### Why that matters
329
-
330
- Developers should be able to:
331
-
332
- 1. migrate into FastScript without rewriting the whole world
333
- 2. use existing libraries
334
- 3. export back out when needed
335
- 4. keep real production optionality
336
-
337
- ## Commands
338
-
339
- ### Main app lifecycle
340
-
341
- ```bash
342
- npm run dev
343
- npm run start
344
- npm run build
345
- npm run build:ssg
346
- npm run create
347
- npm run check
348
- npm run validate
349
- ```
350
-
351
- ### Language and migration
352
-
353
- ```bash
354
- npm run migrate
355
- npm run convert
356
- npm run migrate:rollback
357
- npm run manifest
358
- npm run wizard:migrate
359
- npm run export:js
360
- npm run export:ts
361
- npm run compat
362
- npm run typecheck
363
- npm run typecheck:pass
364
- npm run lint:fs
365
- npm run lint:fs:pass
366
- npm run diagnostics
367
- npm run permissions
368
- npm run format
369
- npm run format:check
370
- ```
371
-
372
- `migrate` now runs strict compatibility-first conversion (rename-only + import extension rewrites + manifest/validation/fidelity reports).
373
- Example: `npm run migrate -- app --dry-run`
374
- Full proof mode: `npm run migrate -- app --fidelity-level full --fail-on-unproven-fidelity`
375
-
376
- Latest trust artifacts are written to `.fastscript/conversion/latest`:
377
- `conversion-manifest.json`, `diff-preview.json`, `validation-report.json`, `fidelity-report.json`.
203
+ 1. Check `/docs/support` for the framework, runtime, and syntax lanes you depend on.
204
+ 2. Use `/docs/adoption` for the canonical path:
205
+ - greenfield `.fs` app via `fastscript create`
206
+ - incremental migration from existing TS/JS via `npm run migrate -- app --dry-run`
207
+ 3. Prefer the Team Dashboard SaaS baseline when you want the strongest product-shaped starting point:
208
+ - `fastscript create startup-mvp --template startup-mvp`
209
+ - reference guide at `/docs/team-dashboard-saas`
210
+ 4. Treat any valid JS/TS failure in `.fs` as a compatibility bug and report it through the public compatibility lane.
378
211
 
212
+ FastScript 3.0.1 is the first real-world adoption line. The public product contract stays anchored to the support matrix, proof pack, and release-blocking compatibility checks.
213
+
214
+ ## The `.fs` Language At A Glance
215
+
216
+ FastScript keeps normal JavaScript module structure and adds a few core forms:
217
+
218
+ - `fn` for functions
219
+ - `state` for named stateful declarations
220
+ - `~name = ...` for lightweight reactive-style declarations
221
+ - type syntax that can be stripped at compile time
222
+ - file conventions for pages, APIs, and runtime hooks
223
+
224
+ ### Example: basic page
225
+
226
+ ```fs
227
+ export default fn Page() {
228
+ state title = "FastScript"
229
+ ~subtitle = "Write once. Ship anywhere."
230
+
231
+ return `
232
+ <section>
233
+ <h1>${title}</h1>
234
+ <p>${subtitle}</p>
235
+ </section>
236
+ `
237
+ }
238
+ ```
239
+
240
+ ### Example: load data for a page
241
+
242
+ ```fs
243
+ export async fn load(ctx) {
244
+ const user = await ctx.db.get("users", ctx.params.id)
245
+ if (!user) return { notFound: true }
246
+ return { user }
247
+ }
248
+
249
+ export default fn Page({ user }) {
250
+ return `<h1>${user.name}</h1>`
251
+ }
252
+ ```
253
+
254
+ ### Example: API route
255
+
256
+ ```fs
257
+ export const schemas = {
258
+ POST: { sku: "string", qty: "int" }
259
+ }
260
+
261
+ export async fn POST(ctx) {
262
+ const body = await ctx.input.validateBody(schemas.POST)
263
+ const order = { id: Date.now().toString(36), ...body }
264
+ ctx.db.collection("orders").set(order.id, order)
265
+ ctx.queue.enqueue("send-order-email", { orderId: order.id })
266
+ return ctx.helpers.json({ ok: true, order })
267
+ }
268
+ ```
269
+
270
+ ### Example: middleware
271
+
272
+ ```fs
273
+ export async fn middleware(ctx, next) {
274
+ ctx.state.requestStartedAt = Date.now()
275
+
276
+ if (ctx.url.pathname.startsWith("/private") && !ctx.session?.user) {
277
+ return ctx.helpers.redirect("/")
278
+ }
279
+
280
+ return next()
281
+ }
282
+ ```
283
+
284
+ ### Example: hydration hook for client behavior
285
+
286
+ ```fs
287
+ export function hydrate({ root }) {
288
+ const button = root.querySelector("[data-action]")
289
+ if (!button) return
290
+
291
+ button.addEventListener("click", () => {
292
+ console.log("hydrated")
293
+ })
294
+ }
295
+ ```
296
+
297
+ ## Page Contract
298
+
299
+ A FastScript page can export any of the following:
300
+
301
+ - `export default fn Page(...)` or `export default function Page(...)`
302
+ - `export async fn load(ctx)` for server-side data loading
303
+ - `export function hydrate({ root, ...ctx })` for client behavior
304
+ - HTTP method handlers like `POST`, `PUT`, `PATCH`, `DELETE`
305
+
306
+ ### Minimal page
307
+
308
+ ```fs
309
+ export default fn Page() {
310
+ return `<h1>Hello</h1>`
311
+ }
312
+ ```
313
+
314
+ ### Page with loader
315
+
316
+ ```fs
317
+ export async fn load(ctx) {
318
+ return { now: new Date().toISOString() }
319
+ }
320
+
321
+ export default fn Page({ now }) {
322
+ return `<p>${now}</p>`
323
+ }
324
+ ```
325
+
326
+ ## Routing
327
+
328
+ FastScript uses file-based routing under `app/pages`.
329
+
330
+ ### Route examples
331
+
332
+ - `app/pages/index.fs` -> `/`
333
+ - `app/pages/blog/index.fs` -> `/blog`
334
+ - `app/pages/blog/[slug].fs` -> `/blog/:slug`
335
+ - `app/pages/docs/[...slug].fs` -> `/docs/:slug*`
336
+ - `app/pages/[[...slug]].fs` -> optional catch-all
337
+ - `app/pages/blog/[id:int].fs` -> typed param route
338
+ - `app/pages/404.fs` -> not-found page
339
+ - `app/pages/_layout.fs` -> global layout wrapper
340
+
341
+ ## Full-Stack Surface Area
342
+
343
+ FastScript currently includes first-party support for:
344
+
345
+ - pages
346
+ - layouts
347
+ - API routes
348
+ - middleware
349
+ - auth/session flows
350
+ - database migrations
351
+ - database seed scripts
352
+ - storage and upload handlers
353
+ - jobs and worker runtime
354
+ - deploy targets
355
+ - benchmark and interop reporting
356
+ - docs indexing and API reference generation
357
+
358
+ ## Interop Story
359
+
360
+ FastScript is designed to sit on top of the JavaScript ecosystem, not replace it with an isolated wall.
361
+
362
+ ### What works
363
+
364
+ - normal `.js` dependencies
365
+ - ESM/CJS compatibility checks
366
+ - export from `.fs` to `.js`
367
+ - export from `.fs` to `.ts`
368
+ - migration tooling from page-based JS/TS apps into `.fs`
369
+
370
+ ### Why that matters
371
+
372
+ Developers should be able to:
373
+
374
+ 1. migrate into FastScript without rewriting the whole world
375
+ 2. use existing libraries
376
+ 3. export back out when needed
377
+ 4. keep real production optionality
378
+
379
+ ## Migration Story
380
+
381
+ FastScript is meant to meet existing teams where they are:
382
+
383
+ 1. keep your current TS/JS modules
384
+ 2. run `npm run migrate -- <path> --dry-run`
385
+ 3. inspect `diff-preview.json`, manifests, validation, and fidelity output
386
+ 4. convert route-by-route into `.fs`
387
+ 5. preserve CSS, assets, and existing libraries
388
+ 6. keep authoring normal TS/JS directly in `.fs` after conversion
389
+
390
+ If valid JS/TS or a real framework pattern fails in `.fs`, that is a FastScript compatibility gap and should be reported through the public compatibility issue lane.
391
+
392
+ ## Commands
393
+
394
+ ### Main app lifecycle
395
+
396
+ ```bash
397
+ npm run dev
398
+ npm run start
399
+ npm run build
400
+ npm run build:ssg
401
+ npm run create
402
+ npm run check
403
+ npm run validate
404
+ ```
405
+
406
+ ### Language and migration
407
+
408
+ ```bash
409
+ npm run migrate
410
+ npm run convert
411
+ npm run migrate:rollback
412
+ npm run manifest
413
+ npm run wizard:migrate
414
+ npm run export:js
415
+ npm run export:ts
416
+ npm run compat
417
+ npm run typecheck
418
+ npm run typecheck:pass
419
+ npm run lint:fs
420
+ npm run lint:fs:pass
421
+ npm run diagnostics
422
+ npm run permissions
423
+ npm run format
424
+ npm run format:check
425
+ ```
426
+
427
+ `migrate` now runs strict compatibility-first conversion (rename-only + import extension rewrites + manifest/validation/fidelity reports).
428
+ Example: `npm run migrate -- app --dry-run`
429
+ Full proof mode: `npm run migrate -- app --fidelity-level full --fail-on-unproven-fidelity`
430
+
431
+ Latest trust artifacts are written to `.fastscript/conversion/latest`:
432
+ `conversion-manifest.json`, `diff-preview.json`, `validation-report.json`, `fidelity-report.json`.
433
+
379
434
  Authored `.fs` now accepts normal JS/TS/JSX/TSX-style code directly. Proof artifacts for the current parity contract are written to `.fastscript/proofs/js-ts-syntax-proof.json` and `.fastscript/proofs/fs-parity-matrix.json`.
380
-
381
- ### Database and data
382
-
383
- ```bash
384
- npm run db:migrate
385
- npm run db:seed
386
- npm run db:rollback
387
- ```
388
-
389
- ### Deploy and runtime
390
-
391
- ```bash
392
- npm run deploy:node
393
- npm run deploy:vercel
394
- npm run deploy:cloudflare
395
- npm run worker
396
- npm run worker:replay-dead-letter
397
- ```
398
-
399
- ### Quality and testing
400
-
401
- ```bash
402
- npm run smoke:dev
403
- npm run smoke:start
404
- npm run test:core
405
- npm run test:conformance
406
- npm run test:plugins
407
- npm run test:routes
408
- npm run test:interop-matrix
409
- npm run test:vscode-language
410
- npm run qa:gate
411
- npm run qa:all
412
- ```
413
-
414
- ### Benchmarks, reports, and ops
415
-
416
- ```bash
417
- npm run bench
418
- npm run bench:discipline
419
- npm run regression
420
- npm run profile
421
- npm run trace
422
- npm run bench:report
423
- npm run benchmark:suite
424
- npm run interop:report
425
- npm run sbom:generate
426
- npm run proof:publish
427
- npm run backup:create
428
- npm run backup:restore
429
- npm run backup:verify
430
- npm run retention:sweep
431
- npm run kpi:track
432
- npm run deploy:zero-downtime
433
- ```
434
-
435
- ### Release and tooling
436
-
437
- ```bash
438
- npm run release:patch
439
- npm run release:minor
440
- npm run release:major
441
- npm run pack:check
442
- npm run hooks:install
443
- npm run repo:lock
444
- npm run plugins:marketplace-sync
445
- npm run docs:index
446
- npm run docs:api-ref
447
- npm run style:generate
448
- npm run style:check
449
- ```
450
-
451
- ## Recommended Developer Flow
452
-
453
- For normal development:
454
-
455
- ```bash
456
- npm install
457
- npm run dev
458
- ```
459
-
460
- Before shipping:
461
-
462
- ```bash
463
- npm run qa:all
464
- ```
465
-
466
- For deployment:
467
-
468
- ```bash
469
- npm run deploy:cloudflare
470
- ```
471
-
472
- Or:
473
-
474
- ```bash
475
- npm run deploy:node
476
- npm run deploy:vercel
477
- ```
478
-
479
- ## Project Layout
480
-
481
- ```txt
482
- app/
483
- api/
484
- auth.fs
485
- docs-search.fs
486
- hello.fs
487
- upload.fs
488
- webhook.fs
489
- db/
490
- migrations/
491
- 001_init.fs
492
- seed.fs
493
- design/
494
- class-allowlist.json
495
- tokens.json
496
- pages/
497
- _layout.fs
498
- index.fs
499
- learn.fs
500
- examples.fs
501
- benchmarks.fs
502
- roadmap.fs
503
- docs/
504
- index.fs
505
- latest.fs
506
- playground.fs
507
- search.fs
508
- v1/
509
- index.fs
510
- v1.1/
511
- index.fs
512
- blog/
513
- index.fs
514
- [slug].fs
515
- env.schema.fs
516
- middleware.fs
517
- styles.css
518
- styles.generated.css
519
- src/
520
- cli.mjs
521
- build.mjs
522
- server-runtime.mjs
523
- examples/
524
- fullstack/
525
- startup-mvp/
526
- spec/
527
- LANGUAGE_V1_SPEC.md
528
- MASTER_TODO.md
529
- ```
530
-
531
- ## Example Projects Included
532
-
533
- ### `examples/fullstack`
534
- A production-style full-stack starter with:
535
-
536
- - pages
537
- - API route
538
- - migration
539
- - seed script
540
- - job handler
541
- - layout
542
-
435
+ The governed compatibility registry and generated support matrix live in `spec/compatibility-registry.json` and `docs/SUPPORT_MATRIX.md`.
436
+
437
+ ### Database and data
438
+
439
+ ```bash
440
+ npm run db:migrate
441
+ npm run db:seed
442
+ npm run db:rollback
443
+ ```
444
+
445
+ ### Deploy and runtime
446
+
447
+ ```bash
448
+ npm run deploy:node
449
+ npm run deploy:vercel
450
+ npm run deploy:cloudflare
451
+ npm run worker
452
+ npm run worker:replay-dead-letter
453
+ ```
454
+
455
+ ### Quality and testing
456
+
457
+ ```bash
458
+ npm run smoke:dev
459
+ npm run smoke:start
460
+ npm run test:core
461
+ npm run test:conformance
462
+ npm run test:plugins
463
+ npm run test:routes
464
+ npm run test:interop-matrix
465
+ npm run test:vscode-language
466
+ npm run qa:gate
467
+ npm run qa:all
468
+ ```
469
+
470
+ ### Benchmarks, reports, and ops
471
+
472
+ ```bash
473
+ npm run bench
474
+ npm run bench:discipline
475
+ npm run regression
476
+ npm run profile
477
+ npm run trace
478
+ npm run bench:report
479
+ npm run benchmark:suite
480
+ npm run interop:report
481
+ npm run sbom:generate
482
+ npm run proof:publish
483
+ npm run backup:create
484
+ npm run backup:restore
485
+ npm run backup:verify
486
+ npm run retention:sweep
487
+ npm run kpi:track
488
+ npm run deploy:zero-downtime
489
+ ```
490
+
491
+ ### Release and tooling
492
+
493
+ ```bash
494
+ npm run release:patch
495
+ npm run release:minor
496
+ npm run release:major
497
+ npm run pack:check
498
+ npm run hooks:install
499
+ npm run repo:lock
500
+ npm run plugins:marketplace-sync
501
+ npm run docs:index
502
+ npm run docs:api-ref
503
+ npm run style:generate
504
+ npm run style:check
505
+ ```
506
+
507
+ ## Recommended Developer Flow
508
+
509
+ For normal development:
510
+
511
+ ```bash
512
+ npm install
513
+ npm run dev
514
+ ```
515
+
516
+ Before shipping:
517
+
518
+ ```bash
519
+ npm run qa:all
520
+ ```
521
+
522
+ For deployment:
523
+
524
+ ```bash
525
+ npm run deploy:cloudflare
526
+ ```
527
+
528
+ Or:
529
+
530
+ ```bash
531
+ npm run deploy:node
532
+ npm run deploy:vercel
533
+ ```
534
+
535
+ ## Project Layout
536
+
537
+ ```txt
538
+ app/
539
+ api/
540
+ auth.fs
541
+ docs-search.fs
542
+ hello.fs
543
+ upload.fs
544
+ webhook.fs
545
+ db/
546
+ migrations/
547
+ 001_init.fs
548
+ seed.fs
549
+ design/
550
+ class-allowlist.json
551
+ tokens.json
552
+ pages/
553
+ _layout.fs
554
+ index.fs
555
+ learn.fs
556
+ examples.fs
557
+ benchmarks.fs
558
+ roadmap.fs
559
+ docs/
560
+ index.fs
561
+ latest.fs
562
+ playground.fs
563
+ search.fs
564
+ v1/
565
+ index.fs
566
+ v1.1/
567
+ index.fs
568
+ blog/
569
+ index.fs
570
+ [slug].fs
571
+ env.schema.fs
572
+ middleware.fs
573
+ styles.css
574
+ styles.generated.css
575
+ src/
576
+ cli.mjs
577
+ build.mjs
578
+ server-runtime.mjs
579
+ examples/
580
+ fullstack/
581
+ startup-mvp/
582
+ spec/
583
+ LANGUAGE_V1_SPEC.md
584
+ MASTER_TODO.md
585
+ ```
586
+
587
+ ## Example Projects Included
588
+
589
+ ### `examples/fullstack`
590
+ A production-style full-stack starter with:
591
+
592
+ - pages
593
+ - API route
594
+ - migration
595
+ - seed script
596
+ - job handler
597
+ - layout
598
+
543
599
  ### `examples/startup-mvp`
544
600
  A more startup-shaped example with:
545
601
 
546
- - cart + checkout APIs
547
- - dashboard page
548
- - migrations
549
- - email job flow
550
-
551
- ## Deploy Targets
552
-
553
- FastScript currently has deploy adapters for:
554
-
555
- - Node
556
- - Vercel
557
- - Cloudflare
558
-
559
- The long-term direction is one language, many targets:
560
-
561
- - web
562
- - server
563
- - mobile
564
- - desktop
565
-
566
- That roadmap is tracked in:
567
-
568
- - `spec/MULTI_TARGET_APP_PLAN.md`
569
- - `app/pages/roadmap.fs`
570
-
571
- ## Documentation Map
572
-
573
- Key docs in this repo:
574
-
575
- - `spec/LANGUAGE_V1_SPEC.md`
576
- - `spec/STYLING_V1_SPEC.md`
577
- - `docs/GOVERNANCE_VERSIONING_POLICY.md`
578
- - `docs/LANGUAGE_V1_MIGRATION.md`
579
- - `docs/COMPILER_ERROR_CODES.md`
580
- - `docs/AI_CONTEXT_PACK_V1.md`
581
- - `docs/PLUGIN_API_CONTRACT.md`
582
- - `docs/INCIDENT_PLAYBOOK.md` (public stub; full version lives in private core)
583
- - `docs/DEPLOY_GUIDE.md`
584
- - `docs/SUPPORT_MATRIX.md`
585
- - `docs/RELEASE_PROCESS.md`
586
- - `docs/TROUBLESHOOTING.md`
587
- - `docs/ARCHITECTURE_OVERVIEW.md`
588
- - `docs/KNOWN_LIMITATIONS.md`
589
- - `docs/CONTRIBUTING.md`
590
- - `docs/OBSERVABILITY.md` (public stub; full version lives in private core)
591
- - `docs/RUNTIME_PERMISSIONS.md`
592
- - `docs/ROLLOUT_GUIDE.md` (public stub; full version lives in private core)
593
- - `SECURITY.md`
594
-
595
- ## Protection, Licensing, and Commercial Use
596
-
597
- FastScript is being built as the core language layer for a larger AI product. Because of that, the repository is not licensed under a permissive open-source license.
598
-
599
- What that means in practice:
600
-
601
- - you can review the repository and evaluate it internally;
602
- - you cannot commercially use, redistribute, relicense, or build competing products on top of this code without written permission;
603
- - you cannot use this repository to train, fine-tune, improve, or evaluate a commercial AI product without written permission;
604
- - trademark rights in the FastScript name, logo, and branding are reserved.
605
-
606
- If you need commercial use, partnership, integration, or platform rights, contact:
607
-
608
- - `legal@fastscript.dev`
609
-
610
- ## Contributing
611
-
612
- FastScript is evolving quickly. If you contribute:
613
-
614
- 1. keep the canonical repo lock intact
615
- 2. run `npm run qa:all`
616
- 3. keep `.fs` and `.js` interop working
617
- 4. avoid unnecessary ecosystem lock-in
618
- 5. preserve the language goal: simpler, faster, still grounded in JavaScript
619
-
620
- Contribution review does not grant any right to commercially reuse the platform outside the repository license.
621
-
622
- ## Public/Private Boundary
623
-
624
- This public repository is the developer-facing FastScript surface. Sensitive compiler/runtime/platform materials now live in the protected private repository `https://github.com/lordolami/fastscript-core-private`. The public repo consumes private-core modules through bridge files and tracks the boundary in `docs/PRIVATE_CORE_SPLIT.md`.
625
-
626
- ## Canonical Repo
627
-
628
- Canonical repo lock:
629
-
630
- `github.com/lordolami/fastscript`
631
-
632
- The repo lock script is:
633
-
634
- ```bash
635
- npm run repo:lock
636
- ```
637
-
638
- ## License
639
-
640
- This repository is licensed under the FastScript Source-Available License v1.
641
-
642
- See:
643
-
644
- - `LICENSE`
645
- - `SECURITY.md`
602
+ - public marketing page
603
+ - authenticated workspace dashboard
604
+ - projects, team, billing, settings, and admin routes
605
+ - migrations plus queue-backed receipt/notification jobs
606
+
607
+ ## Deploy Targets
608
+
609
+ FastScript currently has deploy adapters for:
610
+
611
+ - Node
612
+ - Vercel
613
+ - Cloudflare
614
+
615
+ The long-term direction is one language, many targets:
616
+
617
+ - web
618
+ - server
619
+ - mobile
620
+ - desktop
621
+
622
+ That roadmap is tracked in:
623
+
624
+ - `spec/MULTI_TARGET_APP_PLAN.md`
625
+ - `app/pages/roadmap.fs`
626
+
627
+ ## Documentation Map
628
+
629
+ Key docs in this repo:
630
+
631
+ - `spec/LANGUAGE_V1_SPEC.md`
632
+ - `spec/STYLING_V1_SPEC.md`
633
+ - `docs/GOVERNANCE_VERSIONING_POLICY.md`
634
+ - `docs/LANGUAGE_V1_MIGRATION.md`
635
+ - `docs/COMPILER_ERROR_CODES.md`
636
+ - `docs/AI_CONTEXT_PACK_V1.md`
637
+ - `docs/PLUGIN_API_CONTRACT.md`
638
+ - `docs/INCIDENT_PLAYBOOK.md` (public stub; full version lives in private core)
639
+ - `docs/DEPLOY_GUIDE.md`
640
+ - `docs/SUPPORT_MATRIX.md`
641
+ - `docs/RELEASE_PROCESS.md`
642
+ - `docs/TROUBLESHOOTING.md`
643
+ - `docs/ARCHITECTURE_OVERVIEW.md`
644
+ - `docs/KNOWN_LIMITATIONS.md`
645
+ - `docs/CONTRIBUTING.md`
646
+ - `docs/OBSERVABILITY.md` (public stub; full version lives in private core)
647
+ - `docs/RUNTIME_PERMISSIONS.md`
648
+ - `docs/ROLLOUT_GUIDE.md` (public stub; full version lives in private core)
649
+ - `SECURITY.md`
650
+
651
+ ## Protection, Licensing, and Commercial Use
652
+
653
+ FastScript is being built as the core language layer for a larger AI product. Because of that, the repository is not licensed under a permissive open-source license.
654
+
655
+ What that means in practice:
656
+
657
+ - you can review the repository and evaluate it internally;
658
+ - you cannot commercially use, redistribute, relicense, or build competing products on top of this code without written permission;
659
+ - you cannot use this repository to train, fine-tune, improve, or evaluate a commercial AI product without written permission;
660
+ - trademark rights in the FastScript name, logo, and branding are reserved.
661
+
662
+ If you need commercial use, partnership, integration, or platform rights, contact:
663
+
664
+ - `legal@fastscript.dev`
665
+
666
+ ## Contributing
667
+
668
+ FastScript is evolving quickly. If you contribute:
669
+
670
+ 1. keep the canonical repo lock intact
671
+ 2. run `npm run qa:all`
672
+ 3. keep `.fs` and `.js` interop working
673
+ 4. avoid unnecessary ecosystem lock-in
674
+ 5. preserve the language goal: simpler, faster, still grounded in JavaScript
675
+
676
+ Contribution review does not grant any right to commercially reuse the platform outside the repository license.
677
+
678
+ ## Public/Private Boundary
679
+
680
+ This public repository is the developer-facing FastScript surface. Sensitive compiler/runtime/platform materials now live in the protected private repository `https://github.com/lordolami/fastscript-core-private`. The public repo consumes private-core modules through bridge files and tracks the boundary in `docs/PRIVATE_CORE_SPLIT.md`.
681
+
682
+ ## Canonical Repo
683
+
684
+ Canonical repo lock:
685
+
686
+ `github.com/lordolami/fastscript`
687
+
688
+ The repo lock script is:
689
+
690
+ ```bash
691
+ npm run repo:lock
692
+ ```
693
+
694
+ ## License
695
+
696
+ This repository is licensed under the FastScript Source-Available License v1.
697
+
698
+ See:
699
+
700
+ - `LICENSE`
701
+ - `SECURITY.md`
646
702
  - `app/pages/license.fs`
647
703
 
648
704