Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aiparlance.org/llms.txt

Use this file to discover all available pages before exploring further.

Agents and prompts

Guide for LLMs and agents that write AI Parlance. Spec: Specification. Core syntax: Syntax.

How the AI should write .aip

  1. Predictable structure: appentitycrudpolicyworkflow
  2. Clear domain names; one language per file
  3. Explicit semantics (required, belongs_to, policy predicates)
  4. Avoid long imperative logic inside workflow
  5. Do not duplicate auth if already on app

Minimal prompt → output

Prompt:
Create a CRM with users, leads, and tasks.
Expected output:
app CRM @0.1 {
  database postgres
  auth jwt
}

entity User {
  name: string required
  email: email required unique
}

entity Lead {
  name: string required
  phone: phone required
}

entity Task {
  title: string required
  lead: belongs_to Lead optional
}

crud User
crud Lead
crud Task
Add policies and workflows only when the prompt asks for access rules or behavior.

Prompting strategy

Describe: entities, relations, business rules, who can do what. Avoid asking for: “generate in Go/TypeScript”, framework details, manual route boilerplate.
Domain: [description]
Entities: [fields]
Rules: [validation, duplicates, assignment]
Access: [roles / resource owner]
Events: [what triggers automation]

ai_context

Semantic context for agents, validators, and RAG — not emitted as target code directly.
ai_context Lead {
  description "
    Leads from the marketing site.
    No duplicate phone numbers after normalization.
    Assign to the first available seller.
  "
}

Controlled grammar

Few alternative forms for the same structure — see grammar. Prefer inline validation on entity over duplicate validation blocks.

Agent → software flow

Prompt → LLM → .aip → Validator → AST → Transpilers → artifacts
On validation failure, fix .aip — not generated Go/TS.

Pre-delivery checklist

  • app with database and auth when using authenticated / role
  • every referenced entity exists
  • owner_* policies reference a real FK field
  • workflow has when
  • emit uses declared event types
  • canonical modifier order
  • @0.1 on app when using beta blocks

Full reference

examples/crm-reference.aip — adapt, do not rewrite from scratch per chapter. Minimal Core: examples/minimal.aip.