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
fix(rules): encode status verification rules into parallel-orchestrator and taskMaestro
- Add systemPrompt with 7 status verification rules to parallel-orchestrator.json
- Enhance taskMaestro status_check with 3-factor analysis (30-line error scan, active/completed spinner discrimination)
- Add RESULT.json issue field validation to status_check
- Add artifact cleanup (rm -f RESULT.json TASK.md) after worktree creation
- Update assign_tasks worker prompt with git add safety and artifact commit ban
- Add Status Verification Rules section to Important Notes
Closes#888
Copy file name to clipboardExpand all lines: .claude/skills/taskmaestro/SKILL.md
+75-9Lines changed: 75 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -440,6 +440,9 @@ create_worktrees() {
440
440
local wt_dir="${WORKTREE_BASE}/wt-${i}"
441
441
local branch="taskmaestro/$(date +%s)/pane-${i}"
442
442
git worktree add "$wt_dir" -b "$branch" master
443
+
444
+
# Artifact cleanup: remove ephemeral files that may exist from previous runs
445
+
rm -f "${wt_dir}/RESULT.json""${wt_dir}/TASK.md"
443
446
done
444
447
}
445
448
```
@@ -508,7 +511,9 @@ assign_tasks() {
508
511
foriin"${!issues[@]}";do
509
512
local pane="${SESSION}:0.${i}"
510
513
local issue="${issues[$i]}"
511
-
local prompt="AUTO: Issue #${issue} 구현"
514
+
515
+
# Worker prompt includes git add safety rules and artifact commit ban
516
+
local prompt="Read the file TASK.md in this directory carefully and execute ALL instructions exactly as written. Follow codingbuddy PLAN→ACT→EVAL. Run 'yarn install' first if node_modules missing. NEVER use 'git add -A' — always stage specific files. If errors occur, diagnose and fix yourself. Use /ship to create PR, then write RESULT.json. Start now."
-**Conductor layout requires tmux ≥ 2.3** — uses `-f` flag for full-width `join-pane`
807
862
-**After layout setup, conductor is the last pane** — pane indices shift during `swap-pane` + `break-pane` + `join-pane`
808
863
-**Worker status colors are pane-local** — use `set_worker_status()` to update border colors per pane
864
+
865
+
## Status Verification Rules
866
+
867
+
-**RESULT.json is NOT the sole source of truth** — always validate the `issue` field matches the assigned task AND cross-verify with `capture-pane` output
868
+
-**3-factor analysis for status** — every status check must evaluate: (1) error scan across 30 lines, (2) active spinner presence, (3) completed spinner presence
869
+
-**Active vs Completed spinner discrimination** — animating characters (`⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏`) = active work; static characters (`✓✗✔✘`) = step complete. Never confuse them.
870
+
-**"thinking" ≠ productive work** when errors are visible — if errors appear alongside thinking/reasoning indicators, the worker is stuck in a retry loop
871
+
-**Stall detection** — duration >5 minutes on the same step with no token/cost change = STALLED. Intervene immediately.
872
+
-**NEVER use `git add -A` or `git add .`** — always stage specific files by name. This applies to both the conductor and all worker prompts.
873
+
-**RESULT.json and TASK.md must NEVER be committed** — these are ephemeral per-worktree artifacts. If found in staged changes, unstage immediately.
874
+
-**Stale RESULT.json auto-removal** — if RESULT.json `issue` field does not match the currently assigned task, remove it (`rm -f RESULT.json`) before the worker starts.
"description": "Rules for verifying worker status during parallel execution",
266
+
"rules": [
267
+
{
268
+
"id": "result_json_not_sole_truth",
269
+
"rule": "RESULT.json is NOT the sole source of truth. Always validate the issue field matches the assigned task AND cross-verify with capture-pane output.",
270
+
"rationale": "RESULT.json can be stale from a previous run or contain data from a different issue."
271
+
},
272
+
{
273
+
"id": "spinner_discrimination",
274
+
"rule": "Discriminate between Active spinner (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏ animating) and Completed spinner (✓ or ✗ static). Active means work in progress; Completed means the step finished. Never confuse a completed spinner for active work.",
275
+
"rationale": "Misreading a completed spinner as active leads to false 'working' status reports."
276
+
},
277
+
{
278
+
"id": "error_scan_depth",
279
+
"rule": "Error detection requires scanning at least 30 lines of capture-pane output, not just the last 8. Errors may appear above the visible fold.",
280
+
"rationale": "Shallow scans miss errors that scrolled up but are still relevant to the current state."
281
+
},
282
+
{
283
+
"id": "thinking_not_productive",
284
+
"rule": "'thinking' or 'reasoning' indicators do NOT equal productive work when error messages are visible in the same capture-pane output. If errors are present alongside thinking indicators, the worker is likely stuck in a retry loop.",
285
+
"rationale": "Workers can appear busy while repeatedly failing on the same error."
286
+
},
287
+
{
288
+
"id": "stall_detection",
289
+
"rule": "Duration >5 minutes on the same step with no token/cost change = STALLED. Intervene immediately — do not wait for the worker to self-recover.",
290
+
"rationale": "Stalled workers waste time and pane resources. Early detection enables faster recovery."
291
+
},
292
+
{
293
+
"id": "git_add_safety",
294
+
"rule": "NEVER use `git add -A` or `git add .` — always stage specific files by name. This applies to both the conductor and all worker prompts.",
295
+
"rationale": "Blanket staging captures RESULT.json, TASK.md, and other artifacts that must not be committed."
296
+
},
297
+
{
298
+
"id": "artifact_commit_ban",
299
+
"rule": "RESULT.json and TASK.md must NEVER be committed to the repository. These are ephemeral per-worktree artifacts. If found in staged changes, unstage them immediately.",
300
+
"rationale": "These files are task-specific runtime artifacts that pollute the repository and cause merge conflicts."
0 commit comments