Skip to content

Commit 8a8a92e

Browse files
committed
chore: Add framework shorthand and attribute guidance
Extend AGENTS.md with a "Framework Shorthand" section defining common abbreviations (L1, L1.5, L2, NB, BR, OOOS, Suspense, Reveal, Plan, Optimizer) to standardize terminology across ADRs, issues, reviews, and prompts. Also add an "Attribute Example Style" section that recommends NB shorthand prefixes (async:, signal:, on:, class:, intersect:), treats data-* forms as compatibility variants, and prefers async:reveal-style forms with documented data-async-* fallbacks for reveal examples. These additions aim to improve consistency and clarity in documentation and examples.
1 parent 5df49ab commit 8a8a92e

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,48 @@ root workspace `AGENTS.md` still applies.
3030
registry, snapshot, server-envelope, route-partial, cache, and boundary
3131
protocol.
3232

33+
## Framework Shorthand
34+
35+
Use these abbreviations in ADRs, issues, review notes, and Codex prompts:
36+
37+
- `L1`: Layer 1, the no-build browser runtime core. It owns DOM scanning,
38+
attribute prefixes, event binding, signals, command handlers, startup, and the
39+
smallest usable runtime.
40+
- `L1.5`: Layer 1.5, the ordering layer above the runtime core. It owns the
41+
scheduler, async signal settling, boundary ordering, route partial activation,
42+
stream sequencing, and reveal/OOS coordination that still works without a
43+
compiler.
44+
- `L2`: Layer 2, the app/server integration layer. It owns server functions,
45+
routes, SSR output, build adapters, cache partitions, and higher-level
46+
conventions layered onto L1 and L1.5 protocols.
47+
- `NB`: no-build profile. Author HTML and JavaScript run directly with
48+
`Async.start(...)`, default shorthand attributes, and no compiler.
49+
- `BR`: build-required profile. Author JSX/TSX uses imports such as
50+
`@async/framework/jsx`; the compiler/optimizer emits L1/L1.5/L2-compatible
51+
output.
52+
- `OOOS`: out-of-order streaming/rendering. Chunks may become ready in a
53+
different order than source order.
54+
- `Suspense`: async boundary ownership for fallback and final content.
55+
- `Reveal`: OOS commit policy for sibling boundaries, such as `as-ready`,
56+
`forwards`, `backwards`, `together`, plus tail visibility.
57+
- `Plan`: generated or virtual framework plan. In BR it is private compiler
58+
plumbing, not a hand-written author API.
59+
- `Optimizer`: the BR compiler pipeline that classifies source, signals,
60+
ownership, events, Suspense/Reveal, runtime slices, chunks, and plan output.
61+
62+
## Attribute Example Style
63+
64+
- In NB docs and examples, prefer the default shorthand prefixes:
65+
`async:`, `signal:`, `on:`, `class:`, and `intersect:`.
66+
- Treat `data-async-*`, `data-signal-*`, `data-on-*`, and related data
67+
attributes as configured compatibility forms. Use them in examples only when
68+
documenting custom attribute configuration or raw compatibility behavior.
69+
- For reveal examples, prefer `async:reveal`, `async:reveal-order`, and
70+
`async:reveal-tail`. The configured compatibility form
71+
`data-async-reveal`, `data-async-reveal-order`, and
72+
`data-async-reveal-tail` must continue to work when the `async` prefix maps
73+
to `data-async-`.
74+
3375
## Generated Artifacts And Pipeline
3476

3577
- Edit source, tests, examples, scripts, specs, `package.json`, and

0 commit comments

Comments
 (0)