create-minlang-app 0.4.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-minlang-app",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Scaffold a MinLang web app: write one .ml file, compile with ml1, deploy.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,6 +12,17 @@ To change behavior, edit `__APP_NAME__.ml`, then run `make compile`.
12
12
  Never edit files under `app/generated/` — CI recompiles with `--check`
13
13
  and fails the build if they drift from the `.ml` source.
14
14
 
15
+ For UI changes, sketch the intended screens in `ui/design/screens.mlui` first.
16
+ Then translate that sketch into `screen` blocks in `__APP_NAME__.ml`, compile,
17
+ and compare the generated `app/generated/ui/wire/*.mlui` projections. The
18
+ `ui/design` sketch is hand-authored; generated wireframes are not.
19
+
20
+ When product behavior cannot yet fit the language (remote services, uploads,
21
+ rich local UI, AI structured outputs, full app shell/test generation), read
22
+ `MINLANG_LANGUAGE_SUPPORT.md`. `make compile` refreshes
23
+ `app/generated/MINLANG_LANGUAGE_SUPPORT.md`; agents should write any audit
24
+ results to `MINLANG_LANGUAGE_SUPPORT_RESULTS.md`, not into generated output.
25
+
15
26
  ## Language authority (fetch before writing MinLang)
16
27
 
17
28
  Download the single-file language bundle and read it before producing or
@@ -45,6 +56,7 @@ it. `ml1 update` advances the pin for additive upgrades and never edits your
45
56
  | One-time setup | `corepack enable && corepack prepare pnpm@10.33.0 --activate` |
46
57
  | Validate the program | `make validate` |
47
58
  | Compile to `app/generated/` | `make compile` |
59
+ | Refresh language-support prompt without compiling | `ml1 support __APP_NAME__.ml` |
48
60
  | Install shell deps | `pnpm --dir app install` |
49
61
  | Unit + generated test triads | `make test` |
50
62
  | Lint custom skins (`app/skins/`) | `make lint-skins` (also runs in `make test`) |
@@ -0,0 +1,74 @@
1
+ # MinLang language support brief for `__APP_NAME__`
2
+
3
+ This file is for coding agents and maintainers. It is not app code, and it is
4
+ not proof that the capabilities below exist in the current language. It explains
5
+ what MinLang must gain before this project can delete custom web shell, API,
6
+ upload, provider, and test wiring.
7
+
8
+ ## Current status
9
+
10
+ - Current web support covers persisted entities, constraints, pure actions,
11
+ queries, declarative screens, static themes/assets, generated reducers,
12
+ server action boundaries, screen schemas, wireframes, and generated unit tests
13
+ from MinLang test triads.
14
+ - Remote provider calls, uploads, local client state, rich forms, structured AI
15
+ outputs, and full app-shell/test generation need a future bundle and compiler
16
+ work before app authors can rely on them.
17
+
18
+ ## Roadmap checklist
19
+
20
+ ### Declarative secrets, config, and services
21
+
22
+ MinLang needs first-class declarations for provider secrets, environment-backed
23
+ config, base URLs, auth headers, endpoint schemas, generated `.env.example`,
24
+ and safe missing-secret errors.
25
+
26
+ ### Server-only remote effects and action pipelines
27
+
28
+ Provider calls, retries, downloads, fallback chains, and persistence-after-effect
29
+ need an explicit server-only boundary before they can be generated safely.
30
+
31
+ ### File inputs, uploads, and generated image assets
32
+
33
+ Browser file inputs, multipart transport, server-side blobs, previews, MIME
34
+ allowlists, size limits, URL fields, hex colors, and image transparency metadata
35
+ need typed language support.
36
+
37
+ ### AI prompt templates and structured outputs
38
+
39
+ Prompt construction, vision inputs, provider model selection, JSON schemas,
40
+ normalization, fallback chains, and traceable prompt persistence need language
41
+ and validator ownership.
42
+
43
+ ### Rich screens, local state, forms, and events
44
+
45
+ Full product UI needs local screen state, form controls, event handlers,
46
+ conditional result panels, root-route bindings, and richer accessibility
47
+ metadata.
48
+
49
+ ### Structured theme, layout, and component variants
50
+
51
+ Product-grade web styling needs validated stack/grid/card/panel/result-grid
52
+ primitives and tokenized variants for buttons, tabs, fields, previews, alerts,
53
+ and swatches.
54
+
55
+ ### Complete app shell and generated test suites
56
+
57
+ The web target should eventually generate package/config/env examples, seed
58
+ adapter binding, unit and pipeline tests, UI flows, accessibility, keyboard,
59
+ performance, and E2E checks from MinLang declarations.
60
+
61
+ ## Agent prompt
62
+
63
+ Read this file together with the current MinLang bundle and the app source.
64
+ Then write findings to `MINLANG_LANGUAGE_SUPPORT_RESULTS.md` with:
65
+
66
+ 1. The product behavior still implemented outside MinLang.
67
+ 2. The language/runtime/codegen feature that would absorb each behavior.
68
+ 3. The validation rule or detector needed to keep it deterministic and safe.
69
+ 4. The generated files that should disappear once the feature exists.
70
+ 5. The tests required before deleting handwritten code.
71
+
72
+ Do not edit a published language bundle in place. New syntax or enforcement
73
+ rules require a new full versioned bundle, a migration ledger entry, parser and
74
+ validator support, codegen support, docs, and deterministic tests.
@@ -3,6 +3,12 @@
3
3
  A MinLang web app. The whole application lives in `__APP_NAME__.ml`;
4
4
  `app/generated/` is compiler output (committed, never edited); `app/` holds
5
5
  the thin Next.js shell consuming the published `@minlang/*` runtime.
6
+ Sketch screen changes first in `ui/design/screens.mlui`, then encode them in
7
+ the `.ml` `screen` blocks and compare against `app/generated/ui/wire/*.mlui`
8
+ after compile.
9
+ Read `MINLANG_LANGUAGE_SUPPORT.md` when the app needs behavior the current
10
+ bundle cannot express yet; generated compiles also refresh a copy under
11
+ `app/generated/`.
6
12
 
7
13
  ```bash
8
14
  corepack enable && corepack prepare pnpm@10.33.0 --activate
@@ -0,0 +1,74 @@
1
+ Source ASCII UI design for examples/welcome/welcome.ml.
2
+ Author this first, then encode it as MinLang `screen` blocks and compare with
3
+ web/generated/ui/wire/*.mlui after `make compile-web EXAMPLE=welcome`.
4
+
5
+ ── Welcome ───────────────────────────────────────────────────────────────────
6
+ ┌──────────────────────────────────────────────────────────────────────────────┐
7
+ │ Welcome to MinLang │
8
+ ├──────────────────────────────────────────────────────────────────────────────┤
9
+ │ The whole app is one .ml file. Edit it, run make compile, and this UI │
10
+ │ updates. │
11
+ │ │
12
+ │ Try the demo: add a note below, then take the tour. │
13
+ │ │
14
+ │ Notes │
15
+ │ ┌──────────────────────────────────────────────────────────────────────────┐ │
16
+ │ │ Greeting │ │
17
+ │ ├──────────────────────────────────────────────────────────────────────────┤ │
18
+ │ │ Hi from MinLang │ │
19
+ │ └──────────────────────────────────────────────────────────────────────────┘ │
20
+ │ │
21
+ │ [ Say hello ] │
22
+ │ [ What's in this project ] [ Learn more ] │
23
+ └──────────────────────────────────────────────────────────────────────────────┘
24
+
25
+ ── Files ─────────────────────────────────────────────────────────────────────
26
+ ┌──────────────────────────────────────────────────────────────────────────────┐
27
+ │ What's in this project │
28
+ ├──────────────────────────────────────────────────────────────────────────────┤
29
+ │ Everything is generated from your .ml source. Edit it, never app/generated. │
30
+ │ │
31
+ │ ┌───────────────────────┬──────────────────────────────────────────────────┐ │
32
+ │ │ File │ Purpose │ │
33
+ │ ├───────────────────────┼──────────────────────────────────────────────────┤ │
34
+ │ │ *.ml │ Entities, constraints, actions, screens, tests │ │
35
+ │ │ app/generated/ │ Compiler output; never hand-edited │ │
36
+ │ │ AGENTS.md │ Instructions for AI coding agents │ │
37
+ │ └───────────────────────┴──────────────────────────────────────────────────┘ │
38
+ │ │
39
+ │ [ How to enhance it ] [ Back to start ] │
40
+ └──────────────────────────────────────────────────────────────────────────────┘
41
+
42
+ ── Enhance ───────────────────────────────────────────────────────────────────
43
+ ┌──────────────────────────────────────────────────────────────────────────────┐
44
+ │ Make it yours │
45
+ ├──────────────────────────────────────────────────────────────────────────────┤
46
+ │ Describe your own domain in the .ml, then compile and test. │
47
+ │ │
48
+ │ ┌────────────────────┬─────────────────────────────────────────────────────┐ │
49
+ │ │ Step │ Detail │ │
50
+ │ ├────────────────────┼─────────────────────────────────────────────────────┤ │
51
+ │ │ Edit *.ml │ Model entities, constraints, actions, screens │ │
52
+ │ │ make compile │ Regenerate app/generated │ │
53
+ │ │ make test │ Run generated triads and integration tests │ │
54
+ │ └────────────────────┴─────────────────────────────────────────────────────┘ │
55
+ │ │
56
+ │ [ Resources ] [ Back to start ] │
57
+ └──────────────────────────────────────────────────────────────────────────────┘
58
+
59
+ ── Resources ─────────────────────────────────────────────────────────────────
60
+ ┌──────────────────────────────────────────────────────────────────────────────┐
61
+ │ Learn more │
62
+ ├──────────────────────────────────────────────────────────────────────────────┤
63
+ │ The language bundle has the full rules and the web authoring guide. │
64
+ │ │
65
+ │ ┌────────────────────┬─────────────────────────────────────────────────────┐ │
66
+ │ │ Topic │ Link │ │
67
+ │ ├────────────────────┼─────────────────────────────────────────────────────┤ │
68
+ │ │ Language rules │ releases/latest/download/minlang-language-bundle.md │ │
69
+ │ │ Run it │ make dev │ │
70
+ │ │ Enhance it │ edit *.ml, then make compile && make test │ │
71
+ │ └────────────────────┴─────────────────────────────────────────────────────┘ │
72
+ │ │
73
+ │ [ Back to start ] [ What's in this project ] │
74
+ └──────────────────────────────────────────────────────────────────────────────┘