Skip to content

Commit 6d0664b

Browse files
committed
feat(agents): update repo for AI agent support
1 parent 3c68294 commit 6d0664b

7 files changed

Lines changed: 619 additions & 1 deletion

File tree

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ end_of_line = lf
55
insert_final_newline = true
66
trim_trailing_whitespace = true
77
charset = utf-8
8+
max_line_length = 100
89

910
[*.lua]
1011
indent_style = space

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Claude Code
2+
.claude/
3+
14
# Compiled Lua sources
25
luac.out
36

.luacheckrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
unused_args = false
22
redefined = false
3-
max_line_length = false
3+
max_line_length = 100
44

55
globals = {
66
-- "ngx",

AGENTS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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

Comments
 (0)