docs(requirements): tighten codegen rows
Add explicit northstar ring fields to codegen requirements and shorten generated-artifact and event-name rows without changing behavior. req: codegen/001 req: codegen/002 req: codegen/003 req: codegen/004 req: codegen/005 req: codegen/006 req: codegen/007 req: codegen/008 req: codegen/009
This commit is contained in:
@@ -62,7 +62,7 @@ Keep it stable. Prefer pointers to canonical sources over copied structure, file
|
||||
- `examples/html_examples` is the copy-paste HTML pattern gallery for htmx-style examples; keep exact htmx URL slugs visible while translating behavior to boring `.heml`, generated resources, and server-owned Rust state, not HTMX syntax or selector targeting. Boost containers enhance same-origin descendants only and preserve native external/download/new-tab behavior. req: htmx_equivalents/001 req: htmx_equivalents/003 req: htmx_equivalents/005 req: examples/007 req: page_swap/007 req: page_swap/008
|
||||
- Use `cargo run -p hemx-xtask -- app new PATH` for the generic page/form/keyed-row/notice starter, and `cargo run -p hemx-xtask -- app new --mobile PATH` for the phone-first starter with host capabilities, recovery truth, and release-kit commands; do not treat it as a mobile framework or store-submission bot. req: ceremony/005 req: ceremony/006 req: ceremony/007
|
||||
- The public component-reuse explanation lives in `docs/recipes/reusable-partials.md`; do not grow a client component framework to explain partial composition.
|
||||
- The stable public `.heml` authoring surface lives in `docs/hemplate-syntax.md`; Hemlate examples must use that real hemplate syntax, not Vue/Handlebars sketches. hemx-build consumes hemplate Surface facts and must not grow an independent `.heml` parser or CSS-path identity model. req: surface/001 req: surface/002 req: surface/003 req: surface/004 req: surface/005 req: surface/006 req: surface/007 req: surface/008 req: surface/009 req: surface/010
|
||||
- The stable public `.heml` authoring surface lives in `docs/hemplate-syntax.md`; Hemlate examples must use that real hemplate syntax, not Vue/Handlebars sketches. hemx-build consumes hemplate Surface facts and must not grow an independent `.heml` parser or CSS-path identity model. Generated resources, form/handle metadata, atoms, and event constants come from hemx-build facts, not hand-written app plumbing. req: surface/001 req: surface/002 req: surface/003 req: surface/004 req: surface/005 req: surface/006 req: surface/007 req: surface/008 req: surface/009 req: surface/010 req: codegen/001 req: codegen/003 req: codegen/004 req: codegen/005 req: codegen/006
|
||||
- Optional `.heml` editor overlays must share authority with `hemx-build` diagnostics and `docs/hemplate-syntax.md`; `hemx-lsp` owns editor protocol glue for diagnostics/completion/hover and derive-known template facts, while VS Code/Cursor/Neovim keep normal HTML/tree-sitter tooling. Do not create a second template language, selector model, formatter, Rust type system, or custom editor framework. req: diagnostics/004 req: diagnostics/005 req: diagnostics/006
|
||||
- JS runtime changes must preserve root-scoped lookup, fail-closed request handling, root-scoped error outlets, and tiny pending/failure/trigger-timing conventions without selectors, VDOM, expressions, or per-node listeners. req: runtime/005 req: convention/001 req: convention/003 req: convention/005 req: convention/007
|
||||
- Opaque island JavaScript is a leaf adapter for high-frequency local behavior only; it must not introduce a component runtime, client state graph, VDOM, or second UI model. req: canonical_authoring/017
|
||||
|
||||
+9
-9
@@ -319,31 +319,31 @@ a `data-*` handle param is statically known or runtime-extracted. [north_star]
|
||||
## codegen
|
||||
|
||||
### req: codegen/001
|
||||
001 `hemx_build` generates three artifacts from the generic Surface IR: (a) `hemx.generated.rs` containing ergonomic resource modules (`slots`, `targets`, `handles`, `forms`, `atoms`), (b) `hemx.syms` for proc-macro validation, (c) runtime id-lowering tables. `hemx_build` interprets tool-specific conventions (`data-hemx-*`, `h-for`, `h-key`, form controls) from the Surface. [north_star]
|
||||
0 001 `hemx_build` generates `hemx.generated.rs` resource modules, `hemx.syms` proc-macro facts, and runtime id-lowering tables from Surface IR. It interprets `data-hemx-*`, `h-for`, `h-key`, and form-control conventions from Surface. [north_star]
|
||||
|
||||
### req: codegen/002
|
||||
002 Generated view modules expose ergonomic root-level target objects and commands that hide render/lower details for text, partial, and keyed collection slots. [north_star]
|
||||
0 002 Generated view modules expose ergonomic root-level target objects and commands that hide render/lower details for text, partial, and keyed collection slots. [north_star]
|
||||
|
||||
### req: codegen/009
|
||||
009 Generated form targets provide `clear()`, `clear(field)`, and `focus(field)` commands. [north_star]
|
||||
0 009 Generated form targets provide `clear()`, `clear(field)`, and `focus(field)` commands. [north_star]
|
||||
|
||||
### req: codegen/007
|
||||
007 String-keyed generated target objects accept displayable domain ids without caller-side `.to_string()` noise. [north_star]
|
||||
0 007 String-keyed generated target objects accept displayable domain ids without caller-side `.to_string()` noise. [north_star]
|
||||
|
||||
### req: codegen/008
|
||||
008 Generated commands return `impl IntoEffect`, compose in plain Rust, preserve generated lowering, and fail to generate when the template lacks facts needed to infer the slot, key, form, or renderable view type. [north_star]
|
||||
0 008 Generated commands return `impl IntoEffect`, compose in plain Rust, preserve generated lowering, and fail to generate when the template lacks facts needed to infer the slot, key, form, or renderable view type. [north_star]
|
||||
|
||||
### req: codegen/003
|
||||
003 Generated module `handles` exports typed constants: `Handle<I>` where `I` is `Form<T>`, a param type, or `()`. Users rarely reference handles directly; they are consumed by `#[hemx::handler]` for validation.
|
||||
0 003 Generated module `handles` exports typed constants: `Handle<I>` where `I` is `Form<T>`, a param type, or `()`. Users rarely reference handles directly; they are consumed by `#[hemx::handler]` for validation. [north_star]
|
||||
|
||||
### req: codegen/004
|
||||
004 Generated module `forms` exports `FormContract` metadata (field names, HTML control kinds, required). `#[hemx::handler]` compares the `Form<T>` type against the contract. Domain types (`Email`, `TodoId`) remain user-authored; no auto-generated structs.
|
||||
0 004 Generated module `forms` exports `FormContract` metadata (field names, HTML control kinds, required). `#[hemx::handler]` compares `Form<T>` against the contract. Domain types remain user-authored; no auto-generated structs. [north_star]
|
||||
|
||||
### req: codegen/005
|
||||
005 Generated module `atoms` exports `Atom<T>` for values that must be addressable, bootstrapped, or synced. Ordinary Rust fields on app/components are not automatically atoms.
|
||||
0 005 Generated module `atoms` exports `Atom<T>` for values that must be addressable, bootstrapped, or synced. Ordinary Rust fields on app/components are not automatically atoms. [north_star]
|
||||
|
||||
### req: codegen/006
|
||||
006 `hemx-build` discovers `data-hemx-on` event names from hemplate Surface inputs and emits generated `hemx::EventName` constants. Event constants are metadata for checked Rust authoring and diagnostics; they do not create a trigger mini-language or new browser runtime semantics. [north_star]
|
||||
0 006 `hemx-build` discovers `data-hemx-on` event names from Surface inputs and emits `hemx::EventName` constants for checked Rust authoring and diagnostics. Constants do not create a trigger mini-language or new browser semantics. [north_star]
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user