# AppWithAI — model working session Protocol v2 · EML 1.2.0 · Updated 2026-10-24 · `https://www.appwithai.org/llms.txt` Goal: one complete `.mmd`, all Mermaid, checker-clean and audit-clean. Host: write the URL in full, every time: `https://www.appwithai.org`. Write the URL in full, never a bare host. ## 1. Working session PREREQUISITE (ChatGPT only) P1. If you are ChatGPT, the TinyFish plugin is mandatory: it is how you read the chunks and the validators. Before M1, confirm it is installed and signed in: it appears among your tools, or it can fetch `https://www.appwithai.org/working-session.txt`. P2. Not installed or not signed in: STOP. Reply with only the install steps below, then wait. Do not research, draft or validate until it works. Install: ChatGPT > Plugins > search TinyFish > Install plugin > sign in to your TinyFish account. Business, Enterprise and Edu workspaces may need an admin to approve it. Docs: `https://docs.tinyfish.ai/plugins`. If the plugin is not offered, add the custom connector `https://agent.tinyfish.ai/mcp/chatgpt`. P3. Read every chunk and validator through TinyFish (checker-rules.txt §8.4.1). Use it for `https://www.appwithai.org` only; never send the user's model to it. Any other surface: P1–P3 do not apply. MUST M1. Mode by one fact. User attached a `.mmd`: ENHANCE. Otherwise: NEW. M2. ENHANCE: the attached file is the only authoritative model. Read all of it. Never rebuild it from memory, history or a summary. Never start from a blank document. M3. ENHANCE: inventory first (entities, columns, relationships, enums, help, sections, rules, workflows, roles, reports). Check the original bytes and record the verdict. M4. Both modes, before any question or draft: think at full depth, research the domain widely, then attack your own plan as a hostile expert and fix what survives. A `.mmd` in hand does not skip this. M5. Ask the pace once: "walk me through it" (gated, one decision at a time) or "just build it" (one pass, assumptions listed). M6. ENHANCE: apply only the requested change plus dictionary gaps. Preserve everything else. M7. Dictionary is mandatory: FK on every reference, enum binding on every closed list, help on every entity, column and section, every form in `%%section` rows. M8. Validation is mandatory: checker, fixer if needed, checker again, then audit, on the exact bytes delivered. Never state a count or verdict a run did not print. M9. Deliver exactly one complete `.mmd` (ENHANCE: original filename). Never a patch, excerpt, diff or abbreviated model. First non-blank line starts with `%%`. M10. Prose about a model is not a model. Headings and glossaries fail the checker with `EML004`. M11. A state field (the `status`/`state`/`stage` a `kind: state` machine drives) is system-managed: no person changes it through a form; only background workflows do. Each state a machine enters needs a saga writing it, started by a rule on the fact the move depends on (`EML507`). No `%%rbac` grants a transition (`EML215`). Never put it in a `%%section` row (`EML178`): the form shows it read-only in its header and the list grid always shows it. LOAD (lazy) Fetch a chunk only when its step arrives. Read it fully, then follow it. Never load one twice. Never act on a chunk from memory. L1. `https://www.appwithai.org/working-session.txt`: before the first question. Modes, research, review, gates A–D, delivery. L2. `https://www.appwithai.org/eml-syntax.txt`: before writing or changing any EML. Types, relationships, rules, workflows, access, directives. L3. `https://www.appwithai.org/eml-dictionary.txt`: before writing any entity. Lookups, enums, help, form layout. L4. `https://www.appwithai.org/eml-reporting.txt`: only if the model has or needs `%%report`, or the user asks about reports. L5. `https://www.appwithai.org/checker-rules.txt`: before writing the file (§1.2) and before validating (§1.3, §8, §10). Also whenever a validator cannot be reached (§8.4). L6. `https://www.appwithai.org/enhancement-examples.txt`: only if a rule is still unclear. WORKFLOW 1. Decide mode (M1). 2. ENHANCE: acquire the file, load L5, inventory, baseline check (M2, M3). 3. Load L1. Research, then adversarial review (M4). 4. Pace, then gates with the user (M5). Load L2 and L3 before the dictionary gate. 5. Write the complete file (M6, M7). 6. Validate (M8). Repair and re-run until clean. 7. ENHANCE: compare before/after counts. Nothing may fall. 8. Deliver (M9). VALIDATE `curl -sO https://www.appwithai.org/guide/check-model.mjs` then `node check-model.mjs .mmd` `curl -sO https://www.appwithai.org/guide/audit-model.mjs` then `node audit-model.mjs .mmd` Exit 0 means accepted. Read each run's last line. A clean checker is not a finished model: the audit must end `23 passed, 0 failed`. Host unreachable is a fact about your network, not a reason to skip: load L5, §8.4. STOP S1. ENHANCE requested, no file: ask for it once. S2. Requested change missing or ambiguous: ask. S3. A required chunk cannot be fetched: ask the user to attach it (ChatGPT: first confirm P1). Do not proceed from memory. S4. Required model content cannot be read completely: stop. S5. Every validator route exhausted: deliver labelled not validated (checker-rules.txt §1.3.5). Never invent results. OUTPUT Original inventory and verdict. Research findings and objections. Applied changes. Before/after counts. Checker and audit verdicts, verbatim. One complete downloadable `.mmd`.