You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document touchSet enforcement, relaunch, and updated mc_plan_approve
Add TouchSet Enforcement section explaining the three violation options.
Update mc_plan_approve reference with retry and relaunch parameters.
Expand touchSet field description in JobSpec table.
Add touchSet validation step to Merge Train flow.
Add FAQ entry for touchSet violations.
Copy file name to clipboardExpand all lines: README.md
+46-6Lines changed: 46 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -504,7 +504,7 @@ Create and start a multi-job orchestrated plan.
504
504
|`name`|`string`| Yes | Unique job name |
505
505
|`prompt`|`string`| Yes | Task prompt for the AI agent |
506
506
|`dependsOn`|`string[]`| No | Job names this job depends on (must complete and merge first) |
507
-
|`touchSet`|`string[]`| No | File globs this job expects to modify |
507
+
|`touchSet`|`string[]`| No | File globs this job expects to modify. After completion, the orchestrator validates that only files matching these patterns were changed. Violations pause the plan — see [TouchSet Enforcement](#touchset-enforcement).|
508
508
|`mode`|`"vanilla"`\|`"plan"`\|`"ralph"`\|`"ulw"`| No | Execution mode override (defaults to `omo.defaultMode` config) |
509
509
|`copyFiles`|`string[]`| No | Files to copy into the worktree |
510
510
|`symlinkDirs`|`string[]`| No | Directories to symlink into the worktree |
@@ -563,11 +563,21 @@ Show the current state of the active plan — job statuses, progress, and any ch
563
563
564
564
#### `mc_plan_approve`
565
565
566
-
Approve a copilot plan to start execution, or clear a supervisor checkpoint to continue.
566
+
Approve a pending copilot plan, clear a supervisor checkpoint, or handle a failed job. When a touchSet violation pauses the plan, three actions are available:
567
567
568
568
| Parameter | Type | Required | Description |
569
569
|-----------|------|----------|-------------|
570
570
|`checkpoint`|`"pre_merge"`\|`"on_error"`\|`"pre_pr"`| No | Specific checkpoint to clear (supervisor mode) |
571
+
|`retry`|`string`| No | Name of a failed/conflict/needs_rebase job to retry after manual fix. Re-validates touchSet before proceeding. |
572
+
|`relaunch`|`string`| No | Name of a touchSet-failed job to relaunch. Spawns a new agent in the existing worktree with a correction prompt. |
573
+
574
+
**TouchSet violation options:**
575
+
576
+
| Action | Command | Behavior |
577
+
|--------|---------|----------|
578
+
|**Accept**|`mc_plan_approve(checkpoint: "on_error")`| Violations are legitimate — skip validation and proceed to merge |
579
+
|**Relaunch**|`mc_plan_approve(checkpoint: "on_error", relaunch: "job")`| Spawn agent to fix — relaunches in existing worktree with violation details |
580
+
|**Retry**|`mc_plan_approve(checkpoint: "on_error", retry: "job")`| You fixed it manually — re-validates touchSet, then proceeds if clean |
571
581
572
582
#### `mc_plan_cancel`
573
583
@@ -622,14 +632,38 @@ Result:
622
632
623
633
> **Why not `mc_launch`?** You *could* launch these sequentially, merging each into main before starting the next. But you'd lose the automated test gating, the single integration PR, and the parallel execution of `dashboard-ui` and `docs`. The plan handles the dependency graph, merge ordering, and PR creation — you just check `mc_plan_status` or wait for the completion notification.
624
634
635
+
### TouchSet Enforcement
636
+
637
+
When a job specifies `touchSet` patterns, the orchestrator validates the job's changes after completion — before the job enters the merge train. If the job modified files that don't match any `touchSet` glob, the plan pauses with an `on_error` checkpoint:
638
+
639
+
```
640
+
❌ Job "db-schema" modified files outside its touchSet:
You fix, re-check: mc_plan_approve(checkpoint: "on_error", retry: "db-schema")
648
+
```
649
+
650
+
| Option | When to use |
651
+
|--------|-------------|
652
+
|**Accept**| You reviewed the violations and they're legitimate (e.g., the agent needed to update shared types) |
653
+
|**Relaunch**| The violations are accidental — a new agent spawns in the same worktree with a correction prompt to revert them |
654
+
|**Retry**| You manually fixed the branch — Mission Control re-validates the touchSet before proceeding |
655
+
656
+
The **relaunch** path reuses the existing worktree and branch. The correction agent sees the full git history and receives a prompt with the original task, the specific violations, and the allowed patterns. After the agent completes, touchSet validation runs again automatically.
657
+
625
658
### Merge Train
626
659
627
660
The Merge Train is the engine behind plan integration. Each completed job's branch is merged into a dedicated **integration branch** (`mc/integration-{plan-id}`):
628
661
629
-
1.**Merge** — `git merge --no-ff {job-branch}` into the integration worktree
630
-
2.**Test** — If a `testCommand` is configured (or detected from `package.json`), it runs after each merge
631
-
3.**Rollback** — If tests fail or time out, the merge is automatically rolled back (`git merge --abort` or `git reset --hard HEAD~1`)
632
-
4.**Conflict detection** — Merge conflicts are caught, reported with file-level detail, and the merge is aborted
662
+
1.**TouchSet validation** — If `touchSet` is configured, verify the job only modified allowed files (violations pause the plan)
663
+
2.**Merge** — `git merge --no-ff {job-branch}` into the integration worktree
664
+
3.**Test** — If a `testCommand` is configured (or detected from `package.json`), it runs after each merge
665
+
4.**Rollback** — If tests fail or time out, the merge is automatically rolled back (`git merge --abort` or `git reset --hard HEAD~1`)
666
+
5.**Conflict detection** — Merge conflicts are caught, reported with file-level detail, and the merge is aborted
633
667
634
668
Once all jobs are merged and tests pass, the integration branch is pushed and a PR is created.
635
669
@@ -803,6 +837,12 @@ Yes. Use `mc_attach` to get the tmux command, then run it in your terminal. You'
803
837
If the configured `testCommand` fails after a merge, the merge is automatically rolled back. The job is marked as failed and the plan status updates accordingly (in supervisor mode, it pauses for your review).
804
838
</details>
805
839
840
+
<details>
841
+
<summary><strong>What happens if a job modifies files outside its touchSet?</strong></summary>
842
+
843
+
The plan pauses at an `on_error` checkpoint with three options: **accept** the violations if they're legitimate, **relaunch** the agent with a correction prompt to fix them, or **retry** after you fix the branch manually. See [TouchSet Enforcement](#touchset-enforcement) for details.
844
+
</details>
845
+
806
846
<details>
807
847
<summary><strong>Why not just tell my agents to run <code>git worktree add</code> themselves?</strong></summary>
0 commit comments