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
feat: add relaunchJobForCorrection to Orchestrator
New method relaunches a failed job in its existing worktree with a
correction prompt containing the original task, touchSet violations,
and allowed patterns. Reuses branch/worktree, kills stale tmux session,
creates fresh tmux + job entry, and lets the agent fix violations
before touchSet re-validates on completion.
// Build correction prompt with context from the original task
932
+
constcorrectionPrompt=
933
+
`CORRECTION TASK — TouchSet Violation\n\n`+
934
+
`The previous task in this worktree was:\n"${job.prompt}"\n\n`+
935
+
`It completed successfully but modified files outside the allowed scope.\n\n`+
936
+
`Violations (files you must revert):\n${violations.map((v)=>` - ${v}`).join('\n')}\n\n`+
937
+
`Allowed patterns (files you may keep):\n${touchSetPatterns.map((p)=>` - ${p}`).join('\n')}\n\n`+
938
+
`Instructions:\n`+
939
+
`1. Review the changes on this branch (git log, git diff)\n`+
940
+
`2. Revert ONLY the violating files listed above — do NOT break the intended work\n`+
941
+
`3. If a violating file is genuinely required, explain why in your commit message\n`+
942
+
`4. Commit your corrections and report completion`;
943
+
944
+
constmcReportSuffix=`\n\nCRITICAL — STATUS REPORTING REQUIRED:
945
+
You MUST call the mc_report tool at these points — this is NOT optional:
946
+
947
+
1. IMMEDIATELY when you start: mc_report(status: "working", message: "Starting: <brief description>")
948
+
2. At each major milestone: mc_report(status: "progress", message: "<what you accomplished>", progress: <0-100>)
949
+
3. If you get stuck or need input: mc_report(status: "blocked", message: "<what's blocking you>")
950
+
4. WHEN YOU ARE COMPLETELY DONE: mc_report(status: "completed", message: "<summary of what was done>")
951
+
952
+
The "completed" call is MANDATORY — it signals Mission Control that your job is finished. Without it, your job will appear stuck as "running" and block the pipeline. Always call mc_report(status: "completed", ...) as your FINAL action.
953
+
954
+
If your work needs human review before it can proceed: mc_report(status: "needs_review", message: "<what needs review>")`;
? `\n\nIMPORTANT: When you have completed ALL of your work, you MUST commit your changes before finishing. Stage all modified and new files, then create a commit with a conventional commit message (e.g. "feat: ...", "fix: ...", "docs: ...", "refactor: ...", "chore: ..."). Do NOT skip this step.`
0 commit comments