the typeglish workflow · humans stay in control

You set the rules,
AI writes the prompt.

Agents write your prompts now. The Loop keeps you in control: every draft lands in TypeGlish you can read, and a compiler enforces your rules on every change, so the prompt never becomes a black box nobody understands.

scroll · you'll go around once
stage 01 / 06convert

Your agent writes its first TypeGlish

01 · CONVERT

Your agent writes its first TypeGlish

Converting the prompts you already have is one command; writing fresh ones reads like plain English. Either way, every word now has a meaning a compiler can check.

02 · UNDERSTAND

Understand the impact of every word

What was a wall of prose is now legible logic: every sentence binds to a subject, a rule, or a test. Ask any line what it does and why it is there.

03 · RULES

Set custom compiler rules and linting practices

One glish file declares your banned words, required terms, and hard requirements. The compiler enforces it on every draft, from every agent, automatically.

04 · OPTIMIZE

Clean up redundant words, inconsistent logic, and soft instructions

The compiler flags every redundant line, proves no rules contradict, and catches the soft phrasing models treat as optional. Leaner and graded, before you ever read it.

05 · RUNTIME

Reduce error and cost by eliminating conditionals in prompts

IF-this-THEN-that branches leave the prompt and run as code. The model never reads a rule that doesn't apply right now: fewer misreads, cheaper calls.

06 · ITERATE

Agentic prompt iteration with the safety of your rules

Agents edit, every change is re-proven against your rules and tests, and production results point at the exact lines to revisit. Around again.

§ 1Where TypeGlish fits your workflow

you

Intended change

"Refunds must always cite policy."

the loop · runs until it passes
your coding agent

Drafts the .tg

Writes the prompt, patches every finding.

draft✗ findings
the compiler

tg check · tg score

Proves your rules, grades the prompt.

can only exit when your rules pass
✓ pass
the artifact

Compiled prompt

Byte-exact, never hand-edited.

destination

Your platform

Voiceflow, OpenAI, Anthropic, or your own runtime.

Nothing else changes: same repo, same PRs, same CI. TypeGlish sits between your coding agent and your platform, iterating until the compiler and score pass, so only a proven prompt ever reaches the destination.

§ 2Where the agent sits

The agent owns

  • Draft - author the .tg: give words types, add the `$TEST` beside each rule
  • Fix - run `tg check` after every edit; findings are build breaks to fix, never override
  • Report - open the PR with the findings and before/after scores

The agent never touches

  • Your rules - the dictionary, lint, and MUSTs are yours; agents comply, they don't amend
  • The success criterion - humans decide what "done" means before the edit
  • The measurements - the numbers are the loop's memory; agents don't grade their own work
if you are a coding agent reading this

Your edits enter production through the Loop or not at all. Author in `.tg` source, run `tg check` after every change, ship the artifact `tg build` gives you, and report findings with file and line. The machine-readable version of this page lives at typeglish.dev/loop.md - put it in your context.

§ 3TypeGlish reduces error and cost

§ 4Related reading

Your prompt argues with itselfdeep dive Say what you mean: eight prompting rules that survive productionbest practices Teardown: a support agent's system prompt, line by lineteardown

Start your first pass.

Install the CLI, or hand the whole loop to your coding agent - it learns the working rules and starts at stage 3.