Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.

Commit 1e9a5fc

Browse files
committed
Add Phase 25 (Macro Plugin System) to roadmap
Extract defc/defstyle from kiso core into su-side macro plugins, fixing the implicit kiso→su reverse dependency.
1 parent fa7f2f9 commit 1e9a5fc

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎.dev/roadmap.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,26 @@ Pre-release quality improvements across codegen, CI, documentation, and general
281281
- 24.6 Documentation + examples update (docstring, defstyle D11, latest API)
282282
- 24.7 General quality audit and fixes
283283

284+
## Phase 25: Macro Plugin System (Future)
285+
286+
Extract su-specific macros (`defc`, `defstyle`) from kiso core into a plugin architecture.
287+
Currently these 2 macros are hard-coded in `kiso/analyzer/macros.ts`, creating
288+
an implicit reverse dependency from kiso → su. This phase fixes that.
289+
290+
- 25.1 TypeScript-level macro plugin API (`MacroPlugin` interface in `CompileOptions`)
291+
- 25.2 Move `defc` expansion to `su/src/macros.ts` (su-side plugin registration)
292+
- 25.3 Move `defstyle` expansion to `su/src/macros.ts`
293+
- 25.4 Verify kiso has zero su-specific knowledge after migration
294+
295+
**Rationale**: kiso should be a pure compiler + runtime with no framework-specific macros.
296+
The existing `codegenHooks` pattern (su registers hooks at compile time) is the right model —
297+
`macroPlugins` extends this to the macro expansion phase. This enables third-party frameworks
298+
to define their own macros without forking kiso.
299+
300+
**Related cleanup** (optional, lower priority):
301+
- Attribute handler registry for `applyAttrs` (replace ad-hoc branching with chain-of-responsibility)
302+
- Explicit component lifecycle phase model for su
303+
284304
## Known Gaps / Future Work
285305

286306
- `alter-var-root` not implemented (set! is sufficient for current model)

0 commit comments

Comments
 (0)