Writing code with AI
When you ask ChatGPT, Claude, Gemini, Cursor or another AI tool for FreeGrid code, have it read https://freegrid.app/llms-full.txt first: every option,…
When you ask ChatGPT, Claude, Gemini, Cursor or another AI tool for FreeGrid code, have it read https://freegrid.app/llms-full.txt first: every option, method, event and example in one file written for AI tools. /llms.txt is the short version. If the tool cannot browse, paste the file into the chat.
Name the version (0.8), your framework, and the columns and behavior you want, and tell it not to invent options that are not in the file. That removes most wrong answers.
Read https://freegrid.app/llms-full.txt and answer with @freegridjs/core 0.8.
Do not invent options or methods that are not in that file; say so if something is missing.
[What to build]
An orders grid in React:
- Columns: order no. (pinned left), order date (date), customer, qty, unit price, amount (qty × price), status (select: new / shipping / done)
- Qty, price and status are editable; qty must be 0 or more
- A total row at the bottom and an Export to Excel buttonIf you use AI coding tools in a project, put these lines in a rules file such as AGENTS.md, CLAUDE.md or .cursorrules so it writes grid code the same way every time.
# FreeGrid (AGENTS.md, CLAUDE.md or .cursorrules)
- Data grids use @freegridjs/core (React: @freegridjs/react, Vue: @freegridjs/vue,
Svelte: @freegridjs/svelte, Angular: @freegridjs/angular). Import '@freegridjs/core/styles.css' once.
- Reference: https://freegrid.app/llms-full.txt — use only the options, methods and events listed there.
- The grid container needs a height. Give rows a stable id with getRowId.
- Prefer built-in features (summary, filters, export, editing rules) over custom code.Run and check what the AI writes. If it fails, send the error back and ask it to fix the code against llms-full.txt.