git init
This commit is contained in:
78
README.md
Normal file
78
README.md
Normal file
@@ -0,0 +1,78 @@
|
||||
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 path
|
||||
- `client/` 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:
|
||||
|
||||
1. [prompts/general-prompt.md](prompts/general-prompt.md) — master generation prompt
|
||||
2. [prompts/auth-rules.md](prompts/auth-rules.md) — auth seam / realm spec
|
||||
3. [prompts/backend-rules.md](prompts/backend-rules.md) — backend reference
|
||||
4. [prompts/frontend-rules.md](prompts/frontend-rules.md) — frontend reference
|
||||
5. [prompts/prisma-rules.md](prompts/prisma-rules.md) — Prisma schema rules
|
||||
6. [prompts/runtime-rules.md](prompts/runtime-rules.md) — runtime / bootstrap
|
||||
7. [prompts/validation-rules.md](prompts/validation-rules.md) — validation gate
|
||||
|
||||
## Baseline contracts
|
||||
|
||||
- `domain/*.api.dsl` is the single source of truth for the domain model and API contract.
|
||||
- [api-summary.json](api-summary.json) is a derived artifact for LLM stabilization and validation.
|
||||
- [toir-realm.json](toir-realm.json) is the physical Keycloak bootstrap artifact baseline.
|
||||
- `server/` and `client/` 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/` or `client/` 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.dsl` as reusable source inputs, while TOiR names remain project defaults/examples.
|
||||
|
||||
## Repository layout
|
||||
|
||||
- [docs/repository-structure.md](docs/repository-structure.md) explains the normalized folder structure.
|
||||
- Active prompts live in `prompts/`.
|
||||
- Helper scripts live in `tools/`.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
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](docs/AID_EXPORT_README.md)**.
|
||||
|
||||
> **Note:** The `POST /aid/export/app` endpoint (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. See `docs/AID_EXPORT_README.md`
|
||||
> for details.
|
||||
Reference in New Issue
Block a user