| name | Lua |
| description | Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow). |
| version | 1.0.0 |
| category | languages |
| author | Rulebook |
| tags | ["languages","language"] |
| dependencies | [] |
| conflicts | [] |
Lua Project Rules
Agent Automation Commands
CRITICAL: Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
stylua --check .
luacheck .
busted
Lua Configuration
CRITICAL: Use Lua 5.4 or LuaJIT with linting.
- Version: Lua 5.4 or LuaJIT 2.1+
- Linter: luacheck
- Formatter: StyLua
- Testing: busted or luaunit
Code Quality Standards
Mandatory Quality Checks
IMPORTANT: These commands MUST match your GitHub Actions workflows!
stylua --check src/ tests/
luacheck src/ tests/ --std luajit --no-unused-args
busted tests/
Why This Matters:
- Example: Using
stylua (writes) locally but stylua --check in CI = failure
Testing Example (busted)
describe("DataProcessor", function()
local processor
before_each(function()
processor = require("data_processor").new()
end)
it("processes valid input", function()
local result = processor:process({1, 2, 3})
assert.are.same({2, 4, 6}, result)
end)
it("handles empty input", function()
assert.has_no.errors(function()
processor:process({})
end)
end)
end)