Move codegen out of mizan-django: protocol/mizan-generate/
The codegen consumes a schema from any backend and emits typed client code for any frontend — it doesn't belong inside a backend adapter. That placement was historical sediment from when there was only a Django backend; it predates the AFI generalization. New top-level slot: `protocol/` for protocol-level tooling. Tree is now: backends/ server protocol adapters frontends/ client kernel + per-framework adapters cores/ shared language-level primitives protocol/ protocol-level tooling workers/ runtime workers / bridges Codegen moves to `protocol/mizan-generate/`. Same file layout under `generator/` (cli.mjs, lib/), preserved via git mv. Package metadata cleaned up: - name: "generate" (placeholder) → "mizan-generate" - description filled in - type: module (cli.mjs is .mjs ESM, was previously declared "commonjs") - bin entry added so `npx mizan-generate --config <config.mjs>` works once the package is published, instead of `node path/to/cli.mjs`. Path-reference fixups: - backends/mizan-django/README.md: `node path/to/...` → `npx mizan-generate` - backends/mizan-fastapi/README.md: same - ISSUES.md: file paths in three issue entries - CLAUDE.md: codegen description + Package Layout section refreshed (added protocol/, mizan-fastapi entry, mizan-python entry) - docs/AFI_ARCHITECTURE.md: Package Layout refreshed identically Verified codegen runs from new location: regenerated the FastAPI example harness's api/ output, identical to pre-move. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ The kernel stores only `{params, refetch}`. No `data`, `status`, `error`. Every
|
||||
## Remaining High
|
||||
|
||||
### H5. Mutation hooks expose no loading/error state
|
||||
**File:** `mizan-django/generate/generator/lib/adapters/react.mjs`
|
||||
**File:** `protocol/mizan-generate/generator/lib/adapters/react.mjs`
|
||||
Returns bare `useCallback`. No `isPending`, `error`, `isSuccess`.
|
||||
|
||||
### H7. Redis SCAN blocks request path at scale
|
||||
@@ -38,11 +38,11 @@ Returns bare `useCallback`. No `isPending`, `error`, `isSuccess`.
|
||||
Synchronous SCAN at 1M keys: multi-second blocking.
|
||||
|
||||
### H8. Svelte codegen uses Svelte 4 stores
|
||||
**File:** `mizan-django/generate/generator/lib/adapters/svelte.mjs`
|
||||
**File:** `protocol/mizan-generate/generator/lib/adapters/svelte.mjs`
|
||||
Should use Svelte 5 `$state`/`$derived` runes.
|
||||
|
||||
### H9. Svelte destroy() not auto-called
|
||||
**File:** `mizan-django/generate/generator/lib/adapters/svelte.mjs`
|
||||
**File:** `protocol/mizan-generate/generator/lib/adapters/svelte.mjs`
|
||||
Memory leak if user forgets `onDestroy`.
|
||||
|
||||
### H12. Forms triggerValidation captures stale data
|
||||
|
||||
Reference in New Issue
Block a user