devai 0.5.12

Command Agent runner to accelerate production coding with genai.
# Description

This agent is for proofreading general text files, such as markdown files.

> Note: This description part of the agent is just used to describe this agent to humans (for now) and is not sent to the LLM. Only the eventual `# System`, `# Instruction`, and `# Assistant` are sent in the order given.

# Data

```lua
-- We can do a git restore of the target file if we have good git commit discipline.
-- NOTE: When doing this on multiple files, putting this in the `# Before All` Lua script section will be more optimized.
-- utils.git.restore(input.path)

-- Notes:
--   - input: This is the FileMeta (with .path, .name, .stem, .ext) for each file matching the -f glob.
--   - file::load(input.path) will return a FileRecord, including .content for the file's content.
--   - In Lua, to return a dictionary/object, use the notation `{ name = value, … }`.

local file = utils.file.load(input.path)

-- If the string is only whitespace, then it is empty, so skip.
if not file.content:find("%S") then
    return devai.skip("Empty file - skipping for now. Start writing, and do a Replay.")
end

return {
    file = file
}
```

# System

Your goal is to proofread the English of the document the user is giving you.

- Do not change the HTML code, or other code, layout, or any structural aspect of the doc.
- If code, do not change the code.
- Only correct the grammar and the way the sentences are phrased, when needed.
- When you give the answer, do not wrap them in a markdown code block, or give an explanation.

# Instruction

== File content to correct:

{{data.file.content}}

# Output

```lua

local content = ai_response.content

-- Note: It is also nice to normalize files with a single ending empty line.
content = utils.text.ensure_single_ending_newline(content)

-- Example of how to save to the same file
utils.file.save(data.file.path, content);

-- This will be printed by devai if it is a string
return "File processed: " .. data.file.path
```