Skip to content

feat: agent mode — autonomous multi-step execution with diff review #22

@VforVitorio

Description

@VforVitorio

What problem does this solve?

In auto mode, file writes are applied immediately with no opportunity to review the cumulative changes. Users working on larger refactors want to see a unified diff of all modifications before they are committed to disk.

Proposed solution

Add an agent mode — a high-autonomy mode where lmcode reads, edits, and creates files automatically, then shows a unified diff of all changes for review before finalising.

User flow:

● lmcode (model)  [agent]  ›  add docstrings to all functions in src/utils/

⠋ reading src/utils/helpers.py…
⠋ writing src/utils/helpers.py…
⠋ reading src/utils/parsers.py…
⠋ writing src/utils/parsers.py…

─── changes (3 files) ────────────────────
+ src/utils/helpers.py   +12 lines
+ src/utils/parsers.py   +8 lines

apply changes? [y/n/diff] › diff
[shows unified diff]
apply changes? [y/n] › y
✓ 2 files updated

Key differences from auto mode:

  • auto applies writes immediately; agent stages them and shows diff first
  • agent tracks all file writes in a staging area
  • On completion (or /done), presents a summary diff and asks to apply

Dependencies:

  • write_file tool must be implemented (feat/tools-write)
  • Staging/rollback mechanism for file writes
  • Unified diff display (difflib or similar)

Alternatives considered

None considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions