Reviewed-on: #1
This repository keeps the current LLM-first CRUD generation architecture as the primary working baseline.
It is not a new generator engine and it is not a compiler platform. The repository remains:
- an AI generation context
- an active generated and maintained fullstack CRUD project
server/as the active backend target output pathclient/as the active frontend target output path- an LLM-first orchestration baseline with CLI-first framework bootstrap
- a compact rule set that strengthens the existing pipeline with:
api-summary.json(deterministic intermediate context)- a physical root-level realm artifact
- a lightweight automated validation gate
Active knowledge blocks
The master generation prompt is prompts/general-prompt.md. It contains the complete
generation workflow, type mappings, naming conventions, and all core rules.
Companion rule files for artifact-specific details:
- prompts/general-prompt.md — master generation prompt
- prompts/auth-rules.md — auth seam / realm spec
- prompts/backend-rules.md — backend reference
- prompts/frontend-rules.md — frontend reference
- prompts/prisma-rules.md — Prisma schema rules
- prompts/runtime-rules.md — runtime / bootstrap
- prompts/validation-rules.md — validation gate
Baseline contracts
domain/*.api.dslis the single source of truth for the domain model and API contract.- api-summary.json is a derived artifact for LLM stabilization and validation.
- toir-realm.json is the physical Keycloak bootstrap artifact baseline.
server/andclient/are the active target output paths for this repository.server/must remain a valid NestJS workspace baseline.client/must remain a valid Vite React TypeScript workspace baseline.
Scaffold baseline
- Generation remains LLM-first for orchestration and domain-derived feature code.
- Framework bootstrap is CLI-first:
- backend baseline starts from official Nest CLI conventions
- frontend baseline starts from official Vite React TypeScript conventions
- If
server/orclient/drift away from a valid workspace, repair the workspace baseline before generating more feature code. - Do not replace the framework workspace with a hand-written minimal skeleton.
Anti-regression contract
- The active prompts define forbidden generation patterns, required invariants, and recovery rules for future agents.
- Buildability is part of the baseline contract, not an optional follow-up.
- Validation targets
domain/*.api.dslas reusable source inputs, while TOiR names remain project defaults/examples.
Repository layout
- docs/repository-structure.md explains the normalized folder structure.
- Active prompts live in
prompts/. - Helper scripts live in
tools/.
Commands
npm run generate:api-summary
npm run validate:generation
npm run validate:generation:runtime
npm run eval:generation
npm run validate:generation checks both contract shape and workspace validity. When dependencies are installed, it also verifies npm run build in server/ and client/. If dependencies are missing, it reports build verification as skipped instead of pretending the baseline is fully green.
AID export (OpenAPI)
HTTP-экспортёр для интеграции с AID: POST /aid/export/openapi (api-format → OpenAPI 3.0). Подробно: docs/AID_EXPORT_README.md.
Note: The
POST /aid/export/appendpoint (DSL → generated app bundle) is currently non-operative because its backing script (generation/generate.mjs) was removed during the architecture migration to api.dsl-first generation. Seedocs/AID_EXPORT_README.mdfor details.