AI-assisted authoring
An AI assistant can write, check and review a Kanoniq model with you. Kanoniq puts its rules in a file in your repository for the assistant to read, checks every change the assistant makes, and publishes this documentation in forms an assistant reads. What an assistant writes is a draft for you to review: see the AI Disclaimer.
Working with an assistant
- Give it the brief. A repository
kq initmakes holdsAGENTS.md, the authoring brief, which tells an assistant how to write the model: model only what runs, state everything and ask where a choice could go two ways, never write an Id or the.g.kqfile, and validate a change before proposing it.CLAUDE.mdand.github/copilot-instructions.mdpoint Claude Code and GitHub Copilot at it. - Ask for a task in plain words: a draft from a description, the construct for a situation, a review of what is there. Prompt recipes has a prompt for each.
- Let it run the validate loop below on every change.
- Review the change as you would a colleague's, then commit the
.kqfiles and the.g.kqfilekq buildwrites.
Your first model with an AI assistant takes you through it once.
The validate loop
The brief has an assistant check each change with kq validate before it shows the change to you:
- It changes the
.kqfiles undermodel/. - It runs
kq validate --format sarif .at the repository's root, which writes one SARIF log on standard output: each finding with its rule code, its message and the file and line it is on, and each rule linking its page in this documentation, which says how to fix it. - It fixes what the log reports and runs it again, until the model is clean or only questions for you remain, which it asks.
- It runs
kq build ., which writesmodel/<name>.g.kqwith every element's Id.
SARIF output is free, like every format of kq validate, so an assistant needs no license to read the findings. See SARIF in code scanning.
In this section
- The authoring brief: what
AGENTS.mdholds, and how to add or refresh it. - Prompt recipes: prompts that capture a model from what exists, coach you while you write, and review what is written.
- Machine-readable resources: this documentation as Markdown and as data, for an assistant to read.
© 2026 Extenza Works. All rights reserved.