docs: add AGENTS.md with contributor and agent guidance - #11
Merged
Conversation
Captures the conventions that are not discoverable from the code: that vendor/ is a verbatim upstream copy and must not be patched, that argument validation goes through CheckArgs and Lua errors through ThrowLuaError, that relative stack indices must be resolved before pushing, and that unprotected Lua errors abort the process rather than throwing. Also records the workflow rules that caused real friction: branch from the default branch rather than stacking, since merges are squash-only; PR titles drive the release version; and CodeQL results must be read from a default-branch analysis, because pull-request analyses only report alerts new relative to the base and so read as clean when they are not. Contains no personal information. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guidance for AI agents and new contributors, covering what is not discoverable by reading the code.
Conventions in
src/vendor/is a verbatim upstream copy and must not be patched — that is what keeps a Lua upgrade a file copy rather than a mergeCheckArgs; Lua errors throughThrowLuaError, which owns thelua_popthat is easy to forgetabs_indexbefore pushing — this was a real bug, whereSetField(-1, ...)assigned into the value it had just pushedlongjmp, which skips destructorsWorkflow rules that caused real friction here
DIRTYandBEHINDare different. One is a conflict, the other just needs "Update branch".results=0on a PR reads as clean when the branch has open alerts. That misled this repo once already.src/—npm testruns against the last compiled binary and will pass on stale output.Verified
NAPI_DISABLE_CPP_EXCEPTIONSpresent inbinding.gyp, all five helper names exist, 29 vendored Lua sources,filesallowlist present🤖 Generated with Claude Code