Using AI with HTMQL
HTMQL is well-suited to AI-assisted development. Because every page is a single self-contained file with SQL, authorization, and HTML, an AI assistant can read one .htmql file and immediately understand everything that page does. There is no need to gather context from multiple files, layers, or configurations.
Point your AI at AGENTS.md. Every HTMQL app ships with an AGENTS.md file that gives AI tools a complete reference for the page format, common patterns, and all supported features. Loading this file into your AI session at the start means it can write correct HTMQL pages and modify existing ones without guessing at syntax or conventions.
Describe what you want in business terms. Because HTMQL pages map closely to SQL queries and HTML output, you can prompt your AI the same way you would describe the requirement to a colleague: "Add a page that lists all open invoices, sorted by due date, with a button to mark each one paid." The AI can translate that directly into a working .htmql file.
Use AI for the parts that vary. HTMQL handles authentication, sessions, transactions, PDF, email, and file handling without any code. AI is most useful for the things unique to your application: writing the SQL queries for your schema, building the HTML layout you want, and adding any custom JavaScript behavior.
Use the sample pages as a model. The included .htmql sample pages cover many common scenarios. Paste one into your AI session alongside AGENTS.md and it has everything it needs to understand the format and generate new pages that follow the same patterns.
Paste an existing page as a starting point. When adding a page similar to one that already exists in your app, paste the existing .htmql file into your AI session and ask it to adapt it. Because pages are compact and fully self-contained, this works reliably - the AI has everything it needs in one paste.