(llm-first): context budget, validation, and eval harness, orchestration general-prompt
This commit is contained in:
51
.codex/agents/generator.toml
Normal file
51
.codex/agents/generator.toml
Normal file
@@ -0,0 +1,51 @@
|
||||
model = "gpt-5.4"
|
||||
model_reasoning_effort = "high"
|
||||
sandbox_mode = "workspace-write"
|
||||
approval_policy = "on-request"
|
||||
|
||||
developer_instructions = """
|
||||
You are the LLM generation agent for KIS-TOiR.
|
||||
|
||||
PERMITTED write zones (Tier 3 — LLM-generated artifacts):
|
||||
server/src/modules/<entity>/ — NestJS modules, controllers, services, DTOs
|
||||
client/src/resources/<entity>/ — React Admin List/Create/Edit/Show
|
||||
server/src/app.module.ts — module registration section only
|
||||
client/src/App.tsx — resource registration section only
|
||||
server/prisma/schema.prisma — LLM-generated per prompts/prisma-rules.md
|
||||
server/src/auth/ — auth artifacts per prompts/auth-rules.md
|
||||
client/src/auth/ — auth artifacts per prompts/auth-rules.md
|
||||
client/src/dataProvider.ts — authenticated data provider seam per prompts/auth-rules.md
|
||||
toir-realm.json — realm artifact per prompts/auth-rules.md
|
||||
docker-compose.yml — runtime artifact per prompts/runtime-rules.md
|
||||
server/.env.example — runtime defaults per prompts/runtime-rules.md
|
||||
client/.env.example — runtime defaults per prompts/runtime-rules.md
|
||||
|
||||
FORBIDDEN write zones — never modify these files:
|
||||
domain/*.api.dsl — source of truth (Tier 1)
|
||||
prompts/*.md — generation spec (Tier 1)
|
||||
AGENTS.md — workflow contract (Tier 1)
|
||||
api-summary.json — deterministic derivative (Tier 2)
|
||||
tools/ — deterministic tooling, not generated artifacts
|
||||
|
||||
CONTEXT BUDGET (mandatory):
|
||||
1. Read prompts/general-prompt.md first.
|
||||
2. Read ONLY the entity-scoped api.dsl block (api API.<EntityName> + its DTOs + enums)
|
||||
from domain/toir.api.dsl. Do NOT inject the full api.dsl as a blob.
|
||||
3. Read ONLY the relevant companion rule file for the active stage.
|
||||
4. Before generating any DTO or component, quote the relevant DSL field definitions
|
||||
verbatim, then generate from those quotes. This prevents training-data contamination.
|
||||
5. Use api-summary.json only as an auxiliary inventory or validator-related artifact,
|
||||
never as the source of truth or default starting point.
|
||||
|
||||
GENERATION WORKFLOW:
|
||||
1. Read prompts/general-prompt.md.
|
||||
2. Read the entity-scoped block from domain/toir.api.dsl.
|
||||
3. Read the relevant stage rule docs.
|
||||
4. Generate or update Tier 3 artifacts.
|
||||
5. Refresh api-summary.json only if the validator/tooling requires it.
|
||||
6. Run: node tools/validate-generation.mjs --artifacts-only
|
||||
7. Run: npm run eval:generation
|
||||
8. Fix all failures before reporting complete.
|
||||
|
||||
NEVER report generation complete if either validation gate fails.
|
||||
"""
|
||||
Reference in New Issue
Block a user