Portal Community

Step 1 — Receive User Request

The user provides:

// Example invocation
Generate a new form in the guard-rails group.
Purpose: Edit an IP allowlist rule (allow/block specific IP ranges).
Fields required:
  - Rule name (text, required)
  - IP range (text, required, CIDR format)
  - Action (select: Allow / Block)
  - Expiry date (date, optional)
  - Notes (textarea, optional)

Step 2 — Read the Group Definition

The AI reads the group's FormGroupDefinition to obtain:

Step 3 — Scan Existing SQL Files

The AI reads all .data.sql files in the group's folder. It extracts:

// Folder scanned
BizFirstFiV3DB/dbo/Data/AtlasForms/GuardRails/
  GuardRails_Category.data.sql
  Atlas_Forms_13000_GuardRail_List.data.sql
  Atlas_Forms_13001_GuardRail_Edit.data.sql
  Atlas_Forms_13002_GuardRail_View.data.sql
  ...
  Atlas_Forms_13006_GuardRail_AccessControl_Edit.data.sql

Step 4 — Learn Patterns

From the scanned schemas the AI extracts:

Step 5 — Generate the Form Schema and Assign FormID

Using the patterns learned, the AI constructs:

  1. The metadata block: next FormID, FormCode, title
  2. Sections matching peer forms
  3. Controls: one per field requirement, using the group's established control types
  4. Actions block: cloned from the group's property form template
  5. Validation rules: applied to each field per the user's requirements

Step 6 — Write the SQL File

The AI writes a .data.sql file containing the form INSERT with IF NOT EXISTS guard and IDENTITY_INSERT blocks. See SQL File Pattern for the exact format.

Workflow Summary

StepInputOutput
1. User requestGroup ID, purpose, field listGeneration task
2. Read groupFormGroupDefinitionRange, ownerApp, AI flag
3. Scan existingAll .data.sql files in folderUsed FormIDs, FormCodes, schemas
4. Learn patternsExtracted schemasNaming, section, control, binding, action patterns
5. Generate schemaPatterns + field requirementsComplete FormSchema JSON + next FormID
6. Write SQLFormSchema JSON + FormIDAtlas_Forms_{id}_{code}.data.sql
The Generator Never Modifies Existing Forms The AI generation pipeline is strictly additive — it only creates new files. It will never modify an existing .data.sql file. Updates to existing forms must be done manually.