fastscript 3.0.0 → 3.0.1

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,648 +1,679 @@
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
65
-
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:
121
-
122
- ```bash
123
- fastscript
124
- ```
125
-
126
- ## Quick Start
127
-
128
- ### Create a project
129
-
130
- ```bash
131
- npm run create
132
- ```
133
-
134
- Or use one of the included templates:
135
-
136
- ```bash
137
- npm run create:fullstack
138
- npm run create:startup-mvp
139
- ```
140
-
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
- ### Run the full quality gate
167
-
168
- ```bash
169
- npm run qa:all
170
- ```
171
-
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()
233
-
234
- if (ctx.url.pathname.startsWith("/private") && !ctx.session?.user) {
235
- return ctx.helpers.redirect("/")
236
- }
237
-
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`.
378
-
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:
95
+
96
+ - `https://github.com/lordolami/fastscript/issues/new?template=compatibility-gap.yml`
97
+
98
+ ## Install
99
+
100
+ ### Option 1: npm install
101
+
102
+ ```bash
103
+ npm install -g fastscript
104
+ fastscript --help
105
+ ```
106
+
107
+ The published npm package is generated as a self-contained release bundle, so the CLI works without a second private npm package.
108
+
109
+ ### Option 2: local repo workflow
110
+
111
+ ```bash
112
+ git clone https://github.com/lordolami/fastscript.git
113
+ cd fastscript
114
+ npm install
115
+ ```
116
+
117
+ ### Option 3: global CLI link for daily use
118
+
119
+ ```bash
120
+ git clone https://github.com/lordolami/fastscript.git
121
+ cd fastscript
122
+ npm install
123
+ npm link
124
+ fastscript --help
125
+ ```
126
+
127
+ This gives you a global `fastscript` command backed by your local clone.
128
+
129
+ The source repos remain split for development, but npm users get a clean self-contained public package.
130
+
131
+ To use the CLI directly during development:
132
+
133
+ ```bash
134
+ node ./src/cli.mjs --help
135
+ ```
136
+
137
+ If you publish or link the package locally, the command is:
138
+
139
+ ```bash
140
+ fastscript
141
+ ```
142
+
143
+ ## Quick Start
144
+
145
+ ### Create a project
146
+
147
+ ```bash
148
+ npm run create
149
+ ```
150
+
151
+ Or use one of the included templates:
152
+
153
+ ```bash
154
+ npm run create:fullstack
155
+ npm run create:startup-mvp
156
+ ```
157
+
158
+ ### Run locally
159
+
160
+ ```bash
161
+ npm run dev
162
+ ```
163
+
164
+ ### Link the CLI globally from your clone
165
+
166
+ ```bash
167
+ npm link
168
+ fastscript create my-app
169
+ ```
170
+
171
+ ### Build for production
172
+
173
+ ```bash
174
+ npm run build
175
+ ```
176
+
177
+ ### Start the production build
178
+
179
+ ```bash
180
+ npm run start
181
+ ```
182
+
183
+ ### Run the full quality gate
184
+
185
+ ```bash
186
+ npm run qa:all
187
+ ```
188
+
189
+ ## The `.fs` Language At A Glance
190
+
191
+ FastScript keeps normal JavaScript module structure and adds a few core forms:
192
+
193
+ - `fn` for functions
194
+ - `state` for named stateful declarations
195
+ - `~name = ...` for lightweight reactive-style declarations
196
+ - type syntax that can be stripped at compile time
197
+ - file conventions for pages, APIs, and runtime hooks
198
+
199
+ ### Example: basic page
200
+
201
+ ```fs
202
+ export default fn Page() {
203
+ state title = "FastScript"
204
+ ~subtitle = "Write once. Ship anywhere."
205
+
206
+ return `
207
+ <section>
208
+ <h1>${title}</h1>
209
+ <p>${subtitle}</p>
210
+ </section>
211
+ `
212
+ }
213
+ ```
214
+
215
+ ### Example: load data for a page
216
+
217
+ ```fs
218
+ export async fn load(ctx) {
219
+ const user = await ctx.db.get("users", ctx.params.id)
220
+ if (!user) return { notFound: true }
221
+ return { user }
222
+ }
223
+
224
+ export default fn Page({ user }) {
225
+ return `<h1>${user.name}</h1>`
226
+ }
227
+ ```
228
+
229
+ ### Example: API route
230
+
231
+ ```fs
232
+ export const schemas = {
233
+ POST: { sku: "string", qty: "int" }
234
+ }
235
+
236
+ export async fn POST(ctx) {
237
+ const body = await ctx.input.validateBody(schemas.POST)
238
+ const order = { id: Date.now().toString(36), ...body }
239
+ ctx.db.collection("orders").set(order.id, order)
240
+ ctx.queue.enqueue("send-order-email", { orderId: order.id })
241
+ return ctx.helpers.json({ ok: true, order })
242
+ }
243
+ ```
244
+
245
+ ### Example: middleware
246
+
247
+ ```fs
248
+ export async fn middleware(ctx, next) {
249
+ ctx.state.requestStartedAt = Date.now()
250
+
251
+ if (ctx.url.pathname.startsWith("/private") && !ctx.session?.user) {
252
+ return ctx.helpers.redirect("/")
253
+ }
254
+
255
+ return next()
256
+ }
257
+ ```
258
+
259
+ ### Example: hydration hook for client behavior
260
+
261
+ ```fs
262
+ export function hydrate({ root }) {
263
+ const button = root.querySelector("[data-action]")
264
+ if (!button) return
265
+
266
+ button.addEventListener("click", () => {
267
+ console.log("hydrated")
268
+ })
269
+ }
270
+ ```
271
+
272
+ ## Page Contract
273
+
274
+ A FastScript page can export any of the following:
275
+
276
+ - `export default fn Page(...)` or `export default function Page(...)`
277
+ - `export async fn load(ctx)` for server-side data loading
278
+ - `export function hydrate({ root, ...ctx })` for client behavior
279
+ - HTTP method handlers like `POST`, `PUT`, `PATCH`, `DELETE`
280
+
281
+ ### Minimal page
282
+
283
+ ```fs
284
+ export default fn Page() {
285
+ return `<h1>Hello</h1>`
286
+ }
287
+ ```
288
+
289
+ ### Page with loader
290
+
291
+ ```fs
292
+ export async fn load(ctx) {
293
+ return { now: new Date().toISOString() }
294
+ }
295
+
296
+ export default fn Page({ now }) {
297
+ return `<p>${now}</p>`
298
+ }
299
+ ```
300
+
301
+ ## Routing
302
+
303
+ FastScript uses file-based routing under `app/pages`.
304
+
305
+ ### Route examples
306
+
307
+ - `app/pages/index.fs` -> `/`
308
+ - `app/pages/blog/index.fs` -> `/blog`
309
+ - `app/pages/blog/[slug].fs` -> `/blog/:slug`
310
+ - `app/pages/docs/[...slug].fs` -> `/docs/:slug*`
311
+ - `app/pages/[[...slug]].fs` -> optional catch-all
312
+ - `app/pages/blog/[id:int].fs` -> typed param route
313
+ - `app/pages/404.fs` -> not-found page
314
+ - `app/pages/_layout.fs` -> global layout wrapper
315
+
316
+ ## Full-Stack Surface Area
317
+
318
+ FastScript currently includes first-party support for:
319
+
320
+ - pages
321
+ - layouts
322
+ - API routes
323
+ - middleware
324
+ - auth/session flows
325
+ - database migrations
326
+ - database seed scripts
327
+ - storage and upload handlers
328
+ - jobs and worker runtime
329
+ - deploy targets
330
+ - benchmark and interop reporting
331
+ - docs indexing and API reference generation
332
+
333
+ ## Interop Story
334
+
335
+ FastScript is designed to sit on top of the JavaScript ecosystem, not replace it with an isolated wall.
336
+
337
+ ### What works
338
+
339
+ - normal `.js` dependencies
340
+ - ESM/CJS compatibility checks
341
+ - export from `.fs` to `.js`
342
+ - export from `.fs` to `.ts`
343
+ - migration tooling from page-based JS/TS apps into `.fs`
344
+
345
+ ### Why that matters
346
+
347
+ Developers should be able to:
348
+
349
+ 1. migrate into FastScript without rewriting the whole world
350
+ 2. use existing libraries
351
+ 3. export back out when needed
352
+ 4. keep real production optionality
353
+
354
+ ## Migration Story
355
+
356
+ FastScript is meant to meet existing teams where they are:
357
+
358
+ 1. keep your current TS/JS modules
359
+ 2. run `npm run migrate -- <path> --dry-run`
360
+ 3. inspect `diff-preview.json`, manifests, validation, and fidelity output
361
+ 4. convert route-by-route into `.fs`
362
+ 5. preserve CSS, assets, and existing libraries
363
+ 6. keep authoring normal TS/JS directly in `.fs` after conversion
364
+
365
+ 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.
366
+
367
+ ## Commands
368
+
369
+ ### Main app lifecycle
370
+
371
+ ```bash
372
+ npm run dev
373
+ npm run start
374
+ npm run build
375
+ npm run build:ssg
376
+ npm run create
377
+ npm run check
378
+ npm run validate
379
+ ```
380
+
381
+ ### Language and migration
382
+
383
+ ```bash
384
+ npm run migrate
385
+ npm run convert
386
+ npm run migrate:rollback
387
+ npm run manifest
388
+ npm run wizard:migrate
389
+ npm run export:js
390
+ npm run export:ts
391
+ npm run compat
392
+ npm run typecheck
393
+ npm run typecheck:pass
394
+ npm run lint:fs
395
+ npm run lint:fs:pass
396
+ npm run diagnostics
397
+ npm run permissions
398
+ npm run format
399
+ npm run format:check
400
+ ```
401
+
402
+ `migrate` now runs strict compatibility-first conversion (rename-only + import extension rewrites + manifest/validation/fidelity reports).
403
+ Example: `npm run migrate -- app --dry-run`
404
+ Full proof mode: `npm run migrate -- app --fidelity-level full --fail-on-unproven-fidelity`
405
+
406
+ Latest trust artifacts are written to `.fastscript/conversion/latest`:
407
+ `conversion-manifest.json`, `diff-preview.json`, `validation-report.json`, `fidelity-report.json`.
408
+
379
409
  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
-
543
- ### `examples/startup-mvp`
544
- A more startup-shaped example with:
545
-
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`
410
+ The governed compatibility registry and generated support matrix live in `spec/compatibility-registry.json` and `docs/SUPPORT_MATRIX.md`.
411
+
412
+ ### Database and data
413
+
414
+ ```bash
415
+ npm run db:migrate
416
+ npm run db:seed
417
+ npm run db:rollback
418
+ ```
419
+
420
+ ### Deploy and runtime
421
+
422
+ ```bash
423
+ npm run deploy:node
424
+ npm run deploy:vercel
425
+ npm run deploy:cloudflare
426
+ npm run worker
427
+ npm run worker:replay-dead-letter
428
+ ```
429
+
430
+ ### Quality and testing
431
+
432
+ ```bash
433
+ npm run smoke:dev
434
+ npm run smoke:start
435
+ npm run test:core
436
+ npm run test:conformance
437
+ npm run test:plugins
438
+ npm run test:routes
439
+ npm run test:interop-matrix
440
+ npm run test:vscode-language
441
+ npm run qa:gate
442
+ npm run qa:all
443
+ ```
444
+
445
+ ### Benchmarks, reports, and ops
446
+
447
+ ```bash
448
+ npm run bench
449
+ npm run bench:discipline
450
+ npm run regression
451
+ npm run profile
452
+ npm run trace
453
+ npm run bench:report
454
+ npm run benchmark:suite
455
+ npm run interop:report
456
+ npm run sbom:generate
457
+ npm run proof:publish
458
+ npm run backup:create
459
+ npm run backup:restore
460
+ npm run backup:verify
461
+ npm run retention:sweep
462
+ npm run kpi:track
463
+ npm run deploy:zero-downtime
464
+ ```
465
+
466
+ ### Release and tooling
467
+
468
+ ```bash
469
+ npm run release:patch
470
+ npm run release:minor
471
+ npm run release:major
472
+ npm run pack:check
473
+ npm run hooks:install
474
+ npm run repo:lock
475
+ npm run plugins:marketplace-sync
476
+ npm run docs:index
477
+ npm run docs:api-ref
478
+ npm run style:generate
479
+ npm run style:check
480
+ ```
481
+
482
+ ## Recommended Developer Flow
483
+
484
+ For normal development:
485
+
486
+ ```bash
487
+ npm install
488
+ npm run dev
489
+ ```
490
+
491
+ Before shipping:
492
+
493
+ ```bash
494
+ npm run qa:all
495
+ ```
496
+
497
+ For deployment:
498
+
499
+ ```bash
500
+ npm run deploy:cloudflare
501
+ ```
502
+
503
+ Or:
504
+
505
+ ```bash
506
+ npm run deploy:node
507
+ npm run deploy:vercel
508
+ ```
509
+
510
+ ## Project Layout
511
+
512
+ ```txt
513
+ app/
514
+ api/
515
+ auth.fs
516
+ docs-search.fs
517
+ hello.fs
518
+ upload.fs
519
+ webhook.fs
520
+ db/
521
+ migrations/
522
+ 001_init.fs
523
+ seed.fs
524
+ design/
525
+ class-allowlist.json
526
+ tokens.json
527
+ pages/
528
+ _layout.fs
529
+ index.fs
530
+ learn.fs
531
+ examples.fs
532
+ benchmarks.fs
533
+ roadmap.fs
534
+ docs/
535
+ index.fs
536
+ latest.fs
537
+ playground.fs
538
+ search.fs
539
+ v1/
540
+ index.fs
541
+ v1.1/
542
+ index.fs
543
+ blog/
544
+ index.fs
545
+ [slug].fs
546
+ env.schema.fs
547
+ middleware.fs
548
+ styles.css
549
+ styles.generated.css
550
+ src/
551
+ cli.mjs
552
+ build.mjs
553
+ server-runtime.mjs
554
+ examples/
555
+ fullstack/
556
+ startup-mvp/
557
+ spec/
558
+ LANGUAGE_V1_SPEC.md
559
+ MASTER_TODO.md
560
+ ```
561
+
562
+ ## Example Projects Included
563
+
564
+ ### `examples/fullstack`
565
+ A production-style full-stack starter with:
566
+
567
+ - pages
568
+ - API route
569
+ - migration
570
+ - seed script
571
+ - job handler
572
+ - layout
573
+
574
+ ### `examples/startup-mvp`
575
+ A more startup-shaped example with:
576
+
577
+ - cart + checkout APIs
578
+ - dashboard page
579
+ - migrations
580
+ - email job flow
581
+
582
+ ## Deploy Targets
583
+
584
+ FastScript currently has deploy adapters for:
585
+
586
+ - Node
587
+ - Vercel
588
+ - Cloudflare
589
+
590
+ The long-term direction is one language, many targets:
591
+
592
+ - web
593
+ - server
594
+ - mobile
595
+ - desktop
596
+
597
+ That roadmap is tracked in:
598
+
599
+ - `spec/MULTI_TARGET_APP_PLAN.md`
600
+ - `app/pages/roadmap.fs`
601
+
602
+ ## Documentation Map
603
+
604
+ Key docs in this repo:
605
+
606
+ - `spec/LANGUAGE_V1_SPEC.md`
607
+ - `spec/STYLING_V1_SPEC.md`
608
+ - `docs/GOVERNANCE_VERSIONING_POLICY.md`
609
+ - `docs/LANGUAGE_V1_MIGRATION.md`
610
+ - `docs/COMPILER_ERROR_CODES.md`
611
+ - `docs/AI_CONTEXT_PACK_V1.md`
612
+ - `docs/PLUGIN_API_CONTRACT.md`
613
+ - `docs/INCIDENT_PLAYBOOK.md` (public stub; full version lives in private core)
614
+ - `docs/DEPLOY_GUIDE.md`
615
+ - `docs/SUPPORT_MATRIX.md`
616
+ - `docs/RELEASE_PROCESS.md`
617
+ - `docs/TROUBLESHOOTING.md`
618
+ - `docs/ARCHITECTURE_OVERVIEW.md`
619
+ - `docs/KNOWN_LIMITATIONS.md`
620
+ - `docs/CONTRIBUTING.md`
621
+ - `docs/OBSERVABILITY.md` (public stub; full version lives in private core)
622
+ - `docs/RUNTIME_PERMISSIONS.md`
623
+ - `docs/ROLLOUT_GUIDE.md` (public stub; full version lives in private core)
624
+ - `SECURITY.md`
625
+
626
+ ## Protection, Licensing, and Commercial Use
627
+
628
+ 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.
629
+
630
+ What that means in practice:
631
+
632
+ - you can review the repository and evaluate it internally;
633
+ - you cannot commercially use, redistribute, relicense, or build competing products on top of this code without written permission;
634
+ - you cannot use this repository to train, fine-tune, improve, or evaluate a commercial AI product without written permission;
635
+ - trademark rights in the FastScript name, logo, and branding are reserved.
636
+
637
+ If you need commercial use, partnership, integration, or platform rights, contact:
638
+
639
+ - `legal@fastscript.dev`
640
+
641
+ ## Contributing
642
+
643
+ FastScript is evolving quickly. If you contribute:
644
+
645
+ 1. keep the canonical repo lock intact
646
+ 2. run `npm run qa:all`
647
+ 3. keep `.fs` and `.js` interop working
648
+ 4. avoid unnecessary ecosystem lock-in
649
+ 5. preserve the language goal: simpler, faster, still grounded in JavaScript
650
+
651
+ Contribution review does not grant any right to commercially reuse the platform outside the repository license.
652
+
653
+ ## Public/Private Boundary
654
+
655
+ 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`.
656
+
657
+ ## Canonical Repo
658
+
659
+ Canonical repo lock:
660
+
661
+ `github.com/lordolami/fastscript`
662
+
663
+ The repo lock script is:
664
+
665
+ ```bash
666
+ npm run repo:lock
667
+ ```
668
+
669
+ ## License
670
+
671
+ This repository is licensed under the FastScript Source-Available License v1.
672
+
673
+ See:
674
+
675
+ - `LICENSE`
676
+ - `SECURITY.md`
646
677
  - `app/pages/license.fs`
647
678
 
648
679