scripting_tool_description.txt

 1You can write a Lua script and I'll run it on my codebase and tell you what its
 2output was, including both stdout as well as the git diff of changes it made to
 3 the filesystem. That way, you can get more information about the code base, or
 4 make changes to the code base directly.
 5
 6 The Lua script will have access to `io` and it will run with the current working
 7 directory being in the root of the code base, so you can use it to explore,
 8 search, make changes, etc. You can also have the script print things, and I'll
 9 tell you what the output was. Note that `io` only has `open`, and then the file
10 it returns only has the methods read, write, and close - it doesn't have popen
11 or anything else.
12
13 Also, I'm going to be putting this Lua script into JSON, so please don't use
14 Lua's double quote syntax for string literals - use one of Lua's other syntaxes
15 for string literals, so I don't have to escape the double quotes.
16
17 There will be a global called `search` which accepts a regex (it's implemented
18 using Rust's regex crate, so use that regex syntax) and runs that regex on the
19 contents of every file in the code base (aside from gitignored files), then
20 returns an array of tables with two fields: "path" (the path to the file that
21 had the matches) and "matches" (an array of strings, with each string being a
22 match that was found within the file).