Skip to content

Commit 4245d8f

Browse files
Add iterative development loops with worktree isolation and auditor integration
1 parent 56d0b5c commit 4245d8f

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The local embedding model downloads automatically on install. For API-based embe
3737
- **Bundled Agents** - Ships with Code, Architect, Auditor and Librarian agents preconfigured for memory-aware workflows
3838
- **CLI Tools** - Export, import, list, stats, cleanup, upgrade, status, and cancel commands via `ocm-mem` binary
3939
- **Dimension Mismatch Detection** - Detects embedding model changes and guides recovery via reindex
40+
- **Iterative Development Loops** - Autonomous coding/auditing loop with worktree isolation, session rotation, stall detection, and review finding persistence
4041

4142
## Agents
4243

@@ -424,7 +425,32 @@ Audit findings survive session rotation via the **KV store**. The auditor stores
424425
- Resolved findings are deleted
425426
- Unresolved findings are carried forward into the review
426427

427-
This ensures review findings are never lost between iterations, even as sessions rotate.
428+
### Worktree Isolation
429+
430+
By default, loops run in an isolated git worktree with their own branch (e.g., `opencode/loop-<slug>`). On completion, changes are auto-committed and the worktree is removed (branch preserved for later merge). Set `worktree: false` to run in the current directory instead (skips worktree creation, auto-commit, and cleanup).
431+
432+
### Auditor Integration
433+
434+
After each coding iteration, the auditor agent reviews changes against project conventions and stored review findings. Findings are persisted as `review-finding:` KV entries scoped to the loop's branch. Outstanding findings block completion, and a minimum audit count (`minAudits`, default: `1`) must be met before the completion promise is honored.
435+
436+
### Stall Detection
437+
438+
A watchdog monitors loop activity. If no progress is detected within `stallTimeoutMs` (default: 60s), the current phase is re-triggered. After 5 consecutive stalls, the loop terminates with reason `stall_timeout`.
439+
440+
### Model Configuration
441+
442+
Loops use `loop.model` if set, falling back to `executionModel`, then the platform default. On model errors, automatic fallback to the default model kicks in.
443+
444+
### Safety
445+
446+
- `git push` is denied inside active loop sessions
447+
- Tools like `question`, `memory-plan-execute`, and `memory-loop` are blocked to prevent recursive loops and keep execution autonomous
448+
449+
### Management
450+
451+
- **Slash commands**: `/loop` to start, `/cancel-loop` to cancel
452+
- **Tools**: `memory-loop-status` for checking progress (with restart capability)
453+
- **CLI**: `ocm-mem status` and `ocm-mem cancel` for loop management
428454

429455
### Completion and Termination
430456

0 commit comments

Comments
 (0)