

DSL compiler & linter
Compare the prompts of two or more agents that work together. You see how alike they are, every difference marked side by side, and the conflicts: places where one agent is told to do something another agent is told never to do. Add each agent's prompt below; the results update as you type.
Write prompts that an AI follows the same way every time. No technical background needed.
An AI follows your prompt word for word, and fills every gap with a guess. This tool reads your prompt like a strict reviewer. It points out where the AI would have to guess, where two instructions clash, and where the wording is too soft to be followed reliably.
Nothing you type leaves your computer.
Start with one line that sets its role. Everything else is read from that point of view.
Start each instruction with You MUST or You NEVER. Two actions in one line are hard to check.
If you couldn't tick a box by reading the AI's reply, the AI can't reliably follow it either.
Long prompts often say one thing on line 5 and the opposite on line 50. The AI picks one at random.
If your rules mention a helper or a fact by name, define it once near the top.
| Check | What it asks |
|---|---|
| Can it be checked? | Does each instruction ask for something you could see in the reply? |
| Firm wording | Do instructions use MUST and NEVER rather than "should" or "try to"? |
| Talks to the AI directly | Are instructions written as "You MUST …", so it's clear who acts? |
| No contradictions | Do any instructions clash? Is every name defined? |
| Tidy layout | Are sections and spacing neat? |
| Spelling & typing | Any typos, repeated words, or odd characters? |
| No secrets leaked | Is a password or secret key pasted in? |
| Says it plainly | Does it read like plain instructions, or like AI-written text (long dashes, buzzwords, hype words, "not X, but Y" lines)? |
MUST, NEVER, ALWAYS, DO NOTshould, may, prefertry to, if possible, maybe, ideally, hopefullyappropriate, relevant, properly, as needed, etc.sometimes, usually, rarely—), you are not X, you are Y, elite, seamless, delve, feel free toUse IF (or WHEN) for the situation, then THEN for what to do:
IF the user is angry THEN You MUST apologize once. WHEN the user asks about a refund THEN You MUST transfer the chat to `billing_agent`.
Without THEN, the AI knows the situation but not what to do.
Put names in backticks (`name`) at the start of a line, under a heading. Then use the same spelling everywhere.
# Agent Registry - `billing_agent`: agent that handles invoices and refunds. - `tech_agent`: agent that handles login problems. # Variables - `is_vip` is boolean. - `order_total` is number.
Each kind of quote means one thing: `name` for a name you defined, 'Section' for a heading in this prompt, and "text" for exact words (say "Thank you for calling."). A quote of the wrong kind shows Wrong kind of quotes, with the fix.
The Names tab lists everything you defined. If a rule uses a name you forgot to define, you'll see Name used but never defined.
In ⚙ Settings → Target models, tick the models you write for. Lines that a model is known to read differently get a blue note, for example stacked emphasis (CRITICAL: You absolutely MUST) that makes newer models over-apply a rule. Each note links to the vendor's guide it comes from and the date it was checked.
Notes never change the score or the grade. With nothing ticked, no notes show. A fine-tuned open-weight model uses its base model's entry; a model that isn't listed has no notes.
When two or more AI agents share the same customers, their prompts must agree. Open Compare (next to Temper) and paste each agent's prompt into its own card. Compare shows:
If a difference is on purpose, press Mark as intended. It stays hidden until its text changes.
Temper (next to Editor at the top) is a small repair game. Each of its 10 stages is a broken prompt. Move word tiles into the blanks until the grade reaches A and every goal is ticked.
A short guided tour opens on your first stage. To see it again, press ? How to play next to the stage title. Hints help when you are stuck, but they lower the stars you can earn. Your level here sets how hard each stage is.
Once you know these habits, switch to . You'll see the same issues with their technical names alongside the plain explanation. That makes it easier to discuss prompts with engineers.
Every technical message, translated. Use this to understand results and to talk with engineers about them.
Each finding shows three things:
undeclared-entity. Engineers and the exported file use this name.| Beginner wording | Technical term | Meaning |
|---|---|---|
| Instruction | Rule, directive | A line that tells the AI to do or not do something. |
| Command word | Modal | MUST, NEVER, SHOULD, MAY, DO NOT. |
| Firm / soft wording | Hard / soft constraint | MUST and NEVER are hard. SHOULD and MAY are soft. |
| Action word | Verb (catalog) | The word after the modal, like send or ask. It must be in the engine's catalog to be checked. |
| Can it be checked? | Enforceability | Share of instructions that are actionable, measurable, and provable. |
| Hard to check | Unprovable | Firm, but shaped so it can't be verified: two actions, an unknown verb, a malformed number limit, or a before/after/until part that isn't an action. |
| Too vague to check | Unmeasurable | Nothing observable in the reply, like "be concise". |
| Not an instruction yet | Unparsed | Reads like a rule but has no modal or no recognized verb. |
| Firm wording | Hardness | Average strength of the command words used. |
| Talks to the AI directly | Directness | Imperative, second-person instructions. Each passive line (voice/passive) counts half. |
| No contradictions | Consistency | No proven conflicts and no undeclared names. |
| Says it plainly | Literalness | No phrasing typical of AI-generated text. Each literal/* warning costs a fixed number of points. |
| Defined name | Entity, declaration | A quoted name or pointer at the start of a top-level line, followed by is or :. |
| Helper | Agent | An entity another conversation can be routed to. |
| Fact that can change | Variable | An entity with a value: boolean, number, one of, or text. |
| Sets a value | Assignment | IF … THEN 'x' is true. It changes a variable at run time; it never defines one. |
| Situation | Condition | The IF / WHEN … THEN part. A condition line ending in THEN opens an indented block. |
| Must fix / should fix / tips | Error / warning / note | Errors cap the grade at F and the score at 49, and zero their check's bar. |
| Issues · Top fixes · Instructions · Names · Checks | Findings · Fixes · Rules · Entities · Checks | The same five tabs. |
Every code the engine can report. The first part of the code is the area: logic, clarity, prompt, structure, grammar, style, security, literal (AI-sounding phrasing), or nlp (optional hints).
| Code | Plain name | In plain words |
|---|
| Status | Beginner wording | Meaning |
|---|---|---|
✓ read | ✓ Clear | A firm instruction the checker can verify. |
✓ read (soft) | ✓ Clear, but soft | Readable, but SHOULD or MAY lets the AI skip it. |
~ unprovable | ~ Hard to check | Firm, but its shape can't be verified: split it, or move the extra clause into IF … THEN. |
~ unmeasurable | ~ Too vague to check | Nothing observable; add a number or a concrete action. |
✗ unparsed | ✗ Not an instruction yet | Add a modal (MUST / NEVER) and lead with an action verb. |
= fact | = Statement, not an instruction | "It is important to …" states an opinion; rewrite as MUST. |
# Role You are a <role>. # Agent Registry - '<agent_name>': agent that <does what>. # Variables - '<flag_name>' is boolean. - '<tier>' is one of 'gold', 'silver'. - '<topics>' is list of 'billing', 'roaming'. # Rules - You MUST <action> <object>. - You NEVER <action> <object>. - IF '<flag_name>' is true THEN You MUST <action>. - IF '<topics>' includes 'billing' THEN You MUST <action>. # Routing - WHEN <situation> THEN You MUST transfer the chat to '<agent_name>'.
| Check (technical name) | Weight |
|---|---|
| Can it be checked? (Enforceability) | 20% |
| No contradictions (Consistency) | 20% |
| Firm wording (Hardness) | 15% |
| Tidy layout (Structure) | 10% |
| Talks to the AI directly (Directness) | 10% |
| No secrets leaked (Security) | 10% |
| Says it plainly (Literalness) | 10% |
| Spelling & typing (Style) | 5% |
Errors, warnings, and notes subtract points from their check, scaled by the prompt's length. Literalness is the exception: each match costs a fixed number of points, up to a cap per pattern. The optional NLP hints never affect the grade.
Errors. Any error (red) drops the grade to F and the score to 49 or less, and sets the check it belongs to to 0: a contradiction empties "No contradictions", an unreadable number limit empties "Tidy layout", a leaked key empties "No secrets leaked".
Grade caps. A check that scores too low limits the grade, however good the rest is. Today: "Can it be checked?" (Enforceability) below 80 caps the grade at B, below 60 at C; "Says it plainly" (Literalness) below 70 caps it at B, below 40 at C. The number is lowered to the top of that grade (89 for B, 79 for C), and the first item in Fixes says how to lift the cap.
| Grade | Score |
|---|---|
| A | 90 or more |
| B | 80–89 |
| C | 65–79 |
| D | 50–64 |
| F | below 50, or any error |
Weights, grade bands, and caps are part of the scoring rules.
Temper drills one construct per stage: firm modals, roles, measurable limits, agent and tool references, conditions, ordering, IF / ELSE, gates and overlapping guards. Every move is graded by the Editor's own rules, so the status line shows which findings that move fixed or added. A stage clears at grade A with every slot filled and every goal met.
Hints come in steps: Beginner gets three (what, where, the exact move), Intermediate two, Expert one. Each step lowers the stars. The guided tour opens on your first stage; ? How to play reopens it.
Switch to when you want the technical output only, the full parser reference, or the exported AST format for engineering handoff.
A complete operational manual for product managers, analysts, and developers to write provable, deterministic, high-efficiency prompts.
Every line in a prompt serves a specific mechanical purpose. The engine classifies lines in strict priority order:
# Role, ### Constraints): Organizes context sections. Treated as metadata, not scored constraints.`risk_flag` is boolean, - `billing_agent`: handles invoices): Binds a variable, agent, or tool to a definition. Only a backticked name or pointer at the start of a top-level line registers in the Entities schema (see section 8).IF `risk_flag` is true THEN `current_risk` is true): Changes runtime state when a condition holds. Assignments never declare a variable; the variable must already exist in the schema.@{variable}, @[tool]): Use formal pointers to reference declared entities, variables, or system tools. The compiler treats these as unbreakable atomic references.IF / WHEN / UNLESS / WHILE / WHENEVER / ONCE / AFTER / AS SOON AS … THEN): Establishes a trigger boundary. Directs the AI to only activate the rule when the condition evaluates to true. A condition line with nothing after THEN opens a block: every more-indented line below it belongs to that condition.MUST …, NEVER …): Actionable commands. These are the *only* lines that populate the Rules Tab.You are a helpful assistant): Background setup. Ignored by the contradiction engine because prose cannot be mathematically tested.Under these headings a line describes; it is not read as a rule. A line that opens with a capitalised verb (Output the JSON.) is no command there, and a passive line gets no rewrite hint. Modal lines (MUST, NEVER) are still rules.
role, persona, context, background, notes, noteexample, examples (# Examples of correct conditions)Every other section reads its lines as rules. Under a registry heading (Variables, State, Tools, Agents, Inputs, Glossary …) text in backticks is a name: `elite-mode` gets no hype, buzzword, hedge or vague note. The same words outside the backticks, or in any other section, are flagged.
If Lines 1 through 10 are headings, role descriptions, and data declarations, they are structural. The engine only surfaces a line in the Rules tab once it encounters an actionable directive (e.g., Line 11: You MUST follow below instructions:). The tab displays verified rules, not raw editor line numbers.
The engine scans for specific force-multiplier words to establish whether a rule is an unbreakable law, a casual suggestion, or an unprovable opinion:
MUST, ALWAYS, REQUIRE, ENSURENEVER, MUST NOT, MUST NEVER, DO NOT, DON'T, MUSTN'T, CANNOT, CAN'TSHOULD, PREFER, MAYSHOULD NOT, SHOULDN'T, AVOIDsometimes, occasionally, at times, usually, mostly, generally, typically, rarely, seldom.try to, attempt to, if possible, where possible, whenever possible, when possible, as much as possible, if you can, ideally, perhaps, maybe, hopefully.as needed, appropriately, appropriate, properly, proper, relevant, etc, reasonable, reasonably, suitable, suitably, adequate, adequately, sufficient, sufficiently, as appropriate, where necessary, if necessary, and so on, various.For a directive to be proven, its action must lead with an observable, unambiguous verb recognized by the compiler. The engine strictly recognizes the following catalog:
say, speak, tell, state, mention, imply, quote, name, acknowledge, respond, reply, answer, explain, describe, clarify, elaborate, summarize, repeat, suggest, recommend, warn, inform, notify, remind, apologize, thank, ask, request, prompt, confirm, deny, verify, double-check, greet, welcome, talk, contactoutput, emit, print, display, show, send, include, return, provide, offer, give, share, present, list, cite, reference, link, revealwithhold, suppress, hide, omit, block, skip, exclude, redact, censor, avoid, refraincheck, search, fetch, pull, find, locate, retrieve, query, load, capture, record, store, save, hold, collect, gather, log, track, read, writetransfer, escalate, forward, redirect, start, begin, stop, halt, cease, allow, permit, forbid, wait, pause, delay, stall, open, close, join, leave, schedule, cancelmake, create, build, generate, produce, draft, compose, prepare, add, insert, append, attach, put, place, update, change, modify, edit, set, replace, rename, convert, translate, rewrite, refactor, debug, reword, fix, correct, adjust, trim, shorten, expand, remove, delete, strip, discard, clear, format, structure, organize, arrange, sort, group, capitalize, indentreview, analyze, evaluate, assess, think, learn, teach, look, listen, watch, see, feel, try, decide, plan, act, behave, choose, select, pickhandle, issue, receive, process, resolve, help, support, solve, protect, pay, buy, sell, book, refund, charge, bill, sign, meet, visit, serve, assist, guide, leadfollow, adhere, comply, stick, obey, respect, honor, match, mirror, approve, reject, accept, decline, grant, refuse, ensure, remember, recall, consider, assume, treat, prioritize, focus, ignore, disregard, keep, maintain, preserve, retainfire, call, invoke, run, trigger, execute, use, perform, apply, do, have, take, bring, move, turn, point, lower, raise, let, get, go, come, stay, remain, be. (These cannot stand alone; they must name their target object, e.g., "MUST execute the plan").Each metric evaluates a structural dimension of prompt safety and performance:
Measures whether statements can be programmatically verified against output text. Evaluates if verbs are observable and bounds are measurable.
Measures the ratio of hard constraints (MUST/NEVER) to soft suggestions (SHOULD/MAY). High hardness minimizes hallucinations.
Checks for imperative syntax. Passive voice and third-person references introduce execution latency and role ambiguity.
Every passive (is defined, must be closed, are reviewed) is a voice/passive warning, always on, and the line counts 0.5 in the Directness average. Inside a condition (IF the user is verified THEN, Once the idea is defined, …) the fix is a declared variable: IF `user_verified` is true THEN …. Auxiliaries, participles, and the 0.5 are part of the scoring rules.
The contradiction engine. Scans for overlapping numerical ranges, mutually exclusive rules, conflicting frequencies, or inverted quantities.
Validates hierarchy, XML tag encapsulation (<rules>…</rules>), nested indentation, and uniform list bullet formatting.
Evaluates prompt hygiene: eliminates trailing whitespaces, repeated words ("the the"), typographical spelling mistakes, and curly lookalike quotes.
Scans for accidentally committed secrets: AWS Access Keys, OpenAI tokens, Anthropic API keys, Slack Webhooks, or private RSA keys.
Flags phrasing typical of AI-generated text. A SyntaxForge prompt reads like pseudo-code: one literal, checkable instruction per line. Each match is a literal/* warning that costs its pattern's points, up to the pattern's cap (see section 11). Grade caps: Literalness below 70 caps the grade at B (number clamped to 89); below 40 caps it at C (79). Caps for any facet are set in the scoring rules.
The engine proves mathematical impossibility before deployment. Any proven conflict sets its KPI to 0, clamps the score to 49, and locks the grade to an F:
at most 3 sentences vs at least 5 sentences. Both cannot simultaneously be satisfied.within 90 seconds vs at least 2 minutes. Units of time are converted before comparing.at most 50 USD vs at least 100 USD.There is only one tool alongside There are several tools.All refunds are approved alongside No refunds are approved.MUST send the survey before you close the chat alongside MUST close the chat before you send the survey. Rules under exclusive conditions (IF `vip` is true / OTHERWISE) keep separate timelines and never deadlock."gold" is higher priority than "silver" alongside "silver" is higher priority than "gold".MAY issue a refund only if `verified` is true alongside an unconditional MUST issue a refund (logic/only-gate).How bounds are compared. Each bound becomes a range: at most 3 is [0, 3], at least 5 is [5, ∞), less than 3 is [0, 3). A prohibition flips it: NEVER write more than 3 sentences is [0, 3]. Two ranges on the same unit, under the same conditions, that do not overlap are a contradiction when at least one of the two rules is hard.
Bound syntax is strict. A number in a rule must be written as comparator + number + unit, all from the scoring rules: at most 3 sentences, exactly 2 options, within 5 minutes. Anything else (list 3 options, at most $50, at most 1 clarifying question) is a syntax/invalid-bound error.
and / or in directives?The engine utilizes a Recursive Descent Parser to build an Abstract Syntax Tree (AST) in memory. This means it physically maps the grammatical branches of your sentence rather than just scanning for keywords.
When you write a compound statement like "You MUST classify @{query} AND select @{agent}", the AST automatically decouples the sentence into distinct execution branches:
MUST → classify → @{query}MUST → select → @{agent}The Result: You can safely write natural, token-efficient compound sentences without breaking the contradiction engine. If Line 80 says "NEVER select @{agent}", the compiler will mathematically cross-reference the AST branches and instantly catch the collision against the second half of your compound statement.
The NLP hints setting (under ⚙ Settings in the toolbar) turns on a second opinion from compromise.js, a small part-of-speech tagger that ships with this app and runs offline in your browser. Its notes appear under Notes in the Findings tab. They never change the score: the grade comes only from the deterministic rules and the verb catalog above.
use.A name enters the schema only when all of these hold:
`risk_flag`) or a pointer (@{query}, @[search_kb]) at the start of a line or bullet.is, are, :, =, or means.IF condition or a THEN outcome, inline or in an indented block, is never registered.Under a heading such as # Agent Registry, # Variables, or # Tools, bare bullet names also register (- risk_flag: boolean). JSON inside code fences or brace blocks is ignored.
The engine infers a kind for each entry. It uses the heading (agents, tools, variables), the pointer type (@[…] is a tool, @<…> is an agent), and the definition (boolean, number, one of "a", "b", list of "a", "b", default to …).
A variable declared as list of "a", "b" can hold several values at once (for example, every topic the customer raised). Test it in a condition with includes or does not include; several values joined by or test for any of them.
- `topics` is list of "billing", "roaming". - IF `topics` includes "billing" THEN You MUST transfer the chat to `billing_agent`. - IF `topics` does not include "billing" or "roaming" THEN You MUST ask what the customer needs.
These words are read inside conditions only. In a rule, does not include keeps its usual meaning. Two includes rules on different values both apply when the list holds both, so they never raise guard-priority; two that can match the same value do.
Every pointer, every backticked name, and every quoted name shaped like a variable (snake_case, dotted.path, camelCase), is checked against the schema. So is any quoted name on the left of a condition or assignment. A miss raises undeclared-entity. A dotted path such as `historical_overage.has_overage` passes when its root is declared.
Literal values are not checked. That covers the right side of a comparison (`tier` is "gold") and quoted phrases (say "Thank you for calling").
IF `risk_flag` is true THEN `current_risk` is true. with no declaration of `current_risk`- `current_risk` is boolean. to the Variables block.Export AST downloads the parsed syntax tree as JSON or YAML for backend orchestration. The file holds the entity map, every node with its condition scope and action branches, all variable references, the diagnostics, and the current score. It is validated before download. The format is identified by schema: "syntaxforge/ast" and version: 1.
Every pattern below is part of the scoring rules, with its points, its cap, and its wording. The facet scores 100 − Σ min(cap, points × matches). Code fences, comments, notes, and tag lines are never scanned.
| Code | Family | Pattern | Points / cap | Instead of |
|---|---|---|---|---|
| Loads with the grammar. | ||||
Each stage is a prompt with kind-typed slots (modal, verb, cond, ref, limit…). Placed tiles serialize into plain prompt text, which SyntaxForge.review() grades exactly as in the Editor; Temper adds no scoring of its own. A stage clears at A with every slot filled and its structural goals met on the parse.
Expert gets one hint step (the fault, no pointer); stars are 3, or 2 after a hint. The guided tour opens on the first stage; ? How to play reopens it.