Overview
D-Engine is a deterministic harness for bounded LLM code edits. Instead of giving a model an open-ended agentic loop, it asks for SEARCH/REPLACE blocks, applies them locally, and lets a compilation gate determine whether the change can reach the working branch.
The approach keeps the model away from the real branch while making the acceptance condition explicit: the edited project must pass TypeScript compilation.
Key Features
- Selects target files automatically according to a token budget, while also allowing a target file to be chosen manually.
- Applies proposed edits through exact matching, normalized newlines, ignored trailing whitespace, and fuzzy matching with a 0.85 threshold.
- Performs changes inside a shadow Git worktree rather than directly on the active branch.
- Uses
tsc --noEmitas the deterministic validation gate before merging. - Offers Fast, Verify, and Shadow safety modes for different levels of checking and merge control.
How It Works
The user provides a change description and optionally names a target file. D-Engine sends one bounded request to the language model, which returns patch blocks rather than directly operating on the repository.
The local runtime applies those blocks in the isolated worktree and runs the TypeScript compiler. A successful compile permits the merge under the selected safety mode; a failed check leaves the real branch untouched. Verify adds a semantic audit, while Shadow requires permission before merging.
Requirements and Limitations
D-Engine requires Node.js, Git, and TypeScript in the target repository. Its current version cannot create new files, fuzzy matching remains a weaker application path, and the automatic file selector is not deterministic. The published roadmap includes new-file creation, a retry loop using compiler feedback, and mandatory verification for patches applied through fuzzy matching.