intent-compiler turns Markdown protocols into deterministic artifacts —
typed, validated, versioned. No more prompt drift.
Write protocol. Compile to behavior.
// the problem
There are two broken approaches to prompts in production today. Neither scales. Neither is maintainable. Both make debugging a nightmare.
The prompt is buried inside Python functions, concatenated with f-strings, mixed with business logic.
The prompt is thrown at the AI ad-hoc, with no validation, no output schema, no versioning.
// live demo
Write your protocol on the left. Watch the resolver emit a structured artifact on the right — in real time.
// the full picture
Define once. Generate everything. Deterministic prompts mean predictable AI behavior — no more "it worked yesterday" excuses.
// the solution
intent-compiler compiles Markdown protocols into typed, validated artifacts. Every prompt becomes a deterministic contract — with a schema, slot types, and CI-enforced rules. Version it in Git. Lint it before merge. Ship with confidence.
"If your Dockerfile defines what runs, your protocol.md defines how your model thinks. One governs the container. The other governs the cognition."intent-compiler manifesto
Dynamic values are declared as typed slots in the .md file. If your code tries to inject a slot that doesn't exist, the build fails.
The protocol defines hard rules the model must follow. The SDK enforces them before returning the response to your application.
If the model's output doesn't match the declared schema, the SDK throws. Not silently. Not eventually. Immediately.
Protocol changes are git commits. Behavior history is git log. Rollback is git revert. The model's cognition has a changelog.
// mvp status
intent-compiler ships parser + validator + CLI + tests. Run checks locally. Gate every PR. Know exactly what your model will do — before it runs.
// why it matters
Slots are declared with types. Inject the wrong type or a missing slot and the build breaks. Same discipline as typed code.
Every protocol has a semver. Breaking changes to slots or schema are major bumps. Your app pins the version.
Output is validated against the declared schema before it reaches your application. No more surprise shapes in production.
Protocols can import and extend each other. Build a library of reusable cognitive contracts like Lego.
Declare the model in the protocol. Switch from Claude to GPT to Gemini by changing one line. Your code stays the same.
It's Markdown. Non-engineers can read, review, and understand what the AI is instructed to do. PRs are meaningful.
// get started
Four steps. No magic. Just structure you should have had from the start.
The MVP runs directly from the repository. Install runtime dependencies and use the local CLI.
$ pip install pyyaml jsonschema
Create a protocols/
directory and add a `.md` protocol with frontmatter, slots, constraints and schema.
$ cp protocols/valid_protocol.md protocols/my_first.md
Run `proto lint` locally and in CI. If slots are mismatched or schema is missing, the pipeline fails with exit code 1.
$ intent lint protocols
$ pytest tests/ -v
Use GitHub Actions to run syntax checks, tests and CLI smoke checks on every push/PR to `main`.
$ git add .
$ git push origin main # quality-check.yml runs automatically
Your model's behavior deserves the same discipline as your code. Version it. Lint it. Compile it.