|
| 1 | +# Guidance for AI agents |
| 2 | + |
| 3 | +This file is the main entry point for AI tools working in this repository. It provides project context and points to authoritative sources for conventions. |
| 4 | + |
| 5 | +Other files to follow from this main entry point: |
| 6 | + |
| 7 | +| Path | Purpose | |
| 8 | +|------|---------| |
| 9 | +| [`CONTRIBUTING.md`](./CONTRIBUTING.md) | for contributing guidelines | |
| 10 | +| [`spec/AGENTS.md`](spec/AGENTS.md) | for test conventions | |
| 11 | +| [.luacheckrc](.luacheckrc) and [.editorconfig](.editorconfig) | for project wide style and lint rules | |
| 12 | +| [doc_topics/](./doc_topics/) | The context for this project | |
| 13 | + |
| 14 | + |
| 15 | +## What this project is |
| 16 | + |
| 17 | +The context can be acquired from `doc_topics/` (to prevent duplication here). If the contents are still just the template placeholders, then an AI Agent may suggest to scan the codebase and generate/update the contents. |
| 18 | + |
| 19 | + |
| 20 | +## Project layout |
| 21 | + |
| 22 | +| Path | Purpose | |
| 23 | +|------|---------| |
| 24 | +| `src/` | Lua source | |
| 25 | +| `spec/` | Tests (Busted); see [`spec/AGENTS.md`](spec/AGENTS.md) for test conventions | |
| 26 | +| `examples/` | Example scripts | |
| 27 | +| `doc_topics/` | user facing generic documentation about purpose, design etc. | |
| 28 | +| `bin/` | Commandline scripts, see [rockspec]([module-name]-scm-1.rockspec) | |
| 29 | +| `.luacheckrc` | LuaCheck lint configuration (authoritative for lint) | |
| 30 | +| `.editorconfig` | Editor/formatting preferences | |
| 31 | +| `config.ld` | ldoc configuration for API docs | |
| 32 | +| `AGENTS.md` | main entrypoint for AI agents | |
| 33 | + |
| 34 | +## Testing |
| 35 | + |
| 36 | +**Every new feature, bug fix, or behavioural change MUST be accompanied by tests.** Do not submit code changes without corresponding test coverage. If a test is genuinely not applicable, document the reason. |
| 37 | + |
| 38 | +For test file conventions, isolation rules, code style, and vertical whitespace rules, see **[spec/AGENTS.md](spec/AGENTS.md)**. |
| 39 | + |
| 40 | +## Lua compatibility |
| 41 | + |
| 42 | +All code MUST be compatible with the Lua versions specified in the [rockspec]([module-name]-scm-1.rockspec). This includes LuaJIT. Do not use features specific to a single Lua version without a compatibility shim. |
| 43 | + |
| 44 | +## Code style |
| 45 | + |
| 46 | +Code style is defined in [CONTRIBUTING.md](CONTRIBUTING.md). Ensure `luacheck .` passes with zero warnings before committing. |
0 commit comments