Rescriptum

How to use Rescriptum

Master the complete workflow of autonomous, compiler-verified agent coding.

Rescriptum is designed for developers who want multi-round agent autonomy without losing control or dealing with broken code. Here is how to get the most out of the engine.

Structuring Effective Prompts

Because Rescriptum features an automated compiler verification gate, the most effective prompts define both the **target outcome** and the **verification condition**:

  • **Good**: "Refactor the session token generation in src/auth.rs to use argon2id, and run cargo test to confirm all auth tests pass."
  • **Even Better**: "Plan a database migration for user preferences. Show me the plan first in Plan mode before making changes."
  • **Avoid**: Vague prompts like "fix the code" without mentioning which files or behaviors are broken.

The Turn Lifecycle

When you submit a prompt in Agent mode, Rescriptum executes a structured turn loop:

1. **Reconnaissance**: The agent identifies target files and invokes Tree-sitter AST symbol slicing (read_symbol, find_interface_slice) to inspect functions without burning token budget on whole files.

2. **Patch Application**: Edits are applied using patch_file or str_replace, processed through the 6-tier matcher (exact, indentation-padded, Unicode-normalized, line-sequence, and whitespace-collapsed).

3. **Fast LSP Pass**: Within 1.5 seconds of writing, the background LSP and typecheck daemon verify syntax.

4. **Compiler Verification**: The agent runs your project's test suite or build command (npm test, cargo test, pytest).

5. **Auto-Revert Guard**: If verification fails, the tree is automatically rolled back to the last green state unless auto-revert is explicitly disabled.

Managing Approvals During a Run

Rescriptum never runs dangerous terminal commands or silent destructive disk changes without permission. You can approve individual tool calls as they appear, or switch to **Balanced** or **Permissive** trust presets in the chat header when working on trusted tasks.