chore: enforce config placement

This commit is contained in:
2025-11-08 22:46:42 +01:00
parent b3716b7de0
commit c0465c7f26
3 changed files with 15 additions and 9 deletions

View File

@@ -7,6 +7,8 @@
## Layout & Conventions
- `scripts/` — every Lua script lives here; filenames stay unique and map 1:1 to `script-name` values.
- `scripts/<name>.lua` — script headers must summarize behavior, configuration, and dependencies because per-script AGENTS docs were removed.
- Script structure stays predictable: the configuration block (e.g., `local config = {}` or equivalent) follows immediately after the header comment so future editors can adjust settings without scanning the rest of the file.
- Add a short note near the config block clarifying that edits below that block are not required unless someone explicitly wants to modify behavior; this reassures casual users that they can stop there.
- Root configs (`.luacheckrc`, `stylua.toml`) apply to the entire tree; do not duplicate them inside subdirectories.
- Tests, fixtures, or helper assets should be placed alongside the script that depends on them using clear suffixes (e.g., `*_spec.lua`).