Atlas Forms
AI Form Generation Overview
When a Form Group has aiGenerationEnabled: true, an AI agent can generate new form schemas and SQL deploy files that are consistent with every other form in the group — same naming conventions, same section structure, same binding patterns, same action configuration — without any manual schema authoring.
Why AI Generation?
Form Groups often have dozens of property forms, all structurally similar. Writing each one by hand is error-prone and slow. The AI generation pipeline solves this by:
- Reading all existing SQL files in the group to extract current schemas
- Learning the group's patterns: naming conventions, section layout, control types, binding paths, actions
- Generating a new form that is consistent with those patterns
- Assigning the next available FormID in the group's range
- Writing production-ready SQL with
IF NOT EXISTSguards andIDENTITY_INSERTblocks
What Consistency the AI Enforces
| Concern | What the AI Learns and Enforces |
|---|---|
| FormCode naming | Follows {GroupName}_{SubType?}_{Action} pattern from existing forms |
| Section structure | Uses the same section IDs and titles as peer property forms |
| Control types | Selects controls already used in the group for similar field purposes |
| Binding paths | Uses the same $json or $context path patterns as existing forms |
| Action configuration | Copies the Save/Cancel/Back action block from the group's property form template |
| SQL file format | Produces Atlas_Forms_{formId}_{FormCode}.data.sql with IF NOT EXISTS guard |
aiGenerationEnabled Flag
// The flag is set at group registration — not per-form
const guardRailsGroup: FormGroupDefinition = {
formGroupId: 'guard-rails',
// ...
aiGenerationEnabled: true, // Allow the AI pipeline to generate in this group
};
When aiGenerationEnabled is false, the AI pipeline refuses to generate in the group and returns an error. This protects groups where manual control is required (e.g., compliance-sensitive forms).
Pages in This Guide
| Page | Topic |
|---|---|
| 6-Step Workflow | The end-to-end AI generation process |
| AI Prompt Context | What data the AI receives before generating |
| What the AI Learns | Naming, structure, controls, bindings, actions |
| Generated Artefacts | JSON schema, SQL file, readme.txt |
| FormID Assignment | How the AI picks the next safe FormID |
| SQL File Pattern | IF NOT EXISTS, IDENTITY_INSERT, file naming |
| Validating Generated Forms | Review checklist before deployment |