devflow-kit 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/cli/commands/learning.js +25 -5
  4. package/dist/commands/code-review.md +1 -1
  5. package/dist/commands/debug.md +1 -1
  6. package/dist/commands/dynamic-build.md +141 -94
  7. package/dist/commands/dynamic-plan.md +1 -1
  8. package/dist/commands/explore.md +1 -1
  9. package/dist/commands/implement.md +133 -133
  10. package/dist/commands/resolve.md +27 -16
  11. package/dist/commands/self-review.md +16 -11
  12. package/dist/core/agent-models.js +10 -7
  13. package/dist/core/learning-tuning-config.js +8 -0
  14. package/dist/core/plugins.js +7 -2
  15. package/dist/skills/git/references/tracker/github/gather-release-evidence.md +1 -1
  16. package/dist/skills/git/references/tracker/jira/gather-release-evidence.md +1 -1
  17. package/dist/skills/git/references/tracker/linear/gather-release-evidence.md +1 -1
  18. package/package.json +1 -1
  19. package/src/assets/agents/code.md +71 -18
  20. package/src/assets/agents/design.md +10 -0
  21. package/src/assets/agents/diagnose.md +16 -11
  22. package/src/assets/agents/evaluate.md +14 -25
  23. package/src/assets/agents/knowledge.md +5 -3
  24. package/src/assets/agents/learning.md +4 -6
  25. package/src/assets/agents/research.md +19 -0
  26. package/src/assets/agents/review.md +10 -0
  27. package/src/assets/agents/scrutinize.md +34 -10
  28. package/src/assets/agents/simplify.md +20 -0
  29. package/src/assets/agents/skim.md +4 -2
  30. package/src/assets/agents/synthesize.md +12 -0
  31. package/src/assets/agents/test.md +2 -2
  32. package/src/assets/agents/triage.md +7 -1
  33. package/src/assets/agents/validate.md +7 -2
  34. package/src/assets/commands/_partials/_engine.mds +21 -24
  35. package/src/assets/commands/_partials/_knowledge.mds +1 -1
  36. package/src/assets/commands/_partials/_plan_contract.mds +1 -1
  37. package/src/assets/commands/_partials/_wave.mds +8 -6
  38. package/src/assets/commands/code-review.mds +1 -1
  39. package/src/assets/commands/dynamic-build.mds +111 -63
  40. package/src/assets/commands/implement.mds +132 -132
  41. package/src/assets/commands/resolve.mds +26 -15
  42. package/src/assets/commands/self-review.mds +15 -10
  43. package/src/assets/mds/tracker/_common.mds +1 -1
  44. package/src/assets/scripts/ci-wait.cjs +636 -0
  45. package/src/assets/scripts/hooks/assets/orchestrator-charter.md +1 -1
  46. package/src/assets/scripts/hooks/background-memory-update +290 -9
  47. package/src/assets/scripts/release-trace.cjs +27 -10
  48. package/src/assets/skills/accessibility/SKILL.md +1 -1
  49. package/src/assets/skills/apply-decisions/SKILL.md +12 -82
  50. package/src/assets/skills/apply-feature-knowledge/SKILL.md +8 -42
  51. package/src/assets/skills/architecture/SKILL.md +1 -1
  52. package/src/assets/skills/boundary-validation/SKILL.md +1 -1
  53. package/src/assets/skills/complexity/SKILL.md +1 -1
  54. package/src/assets/skills/compliance/SKILL.md +1 -1
  55. package/src/assets/skills/consistency/SKILL.md +1 -1
  56. package/src/assets/skills/database/SKILL.md +1 -1
  57. package/src/assets/skills/dependencies/SKILL.md +1 -1
  58. package/src/assets/skills/dependency-research/SKILL.md +3 -6
  59. package/src/assets/skills/design-review/SKILL.md +1 -1
  60. package/src/assets/skills/docs-framework/SKILL.md +1 -1
  61. package/src/assets/skills/documentation/SKILL.md +1 -1
  62. package/src/assets/skills/gap-analysis/SKILL.md +1 -1
  63. package/src/assets/skills/git/SKILL.md +1 -1
  64. package/src/assets/skills/go/SKILL.md +1 -1
  65. package/src/assets/skills/java/SKILL.md +1 -1
  66. package/src/assets/skills/patterns/SKILL.md +1 -1
  67. package/src/assets/skills/performance/SKILL.md +1 -1
  68. package/src/assets/skills/python/SKILL.md +1 -1
  69. package/src/assets/skills/qa/SKILL.md +1 -3
  70. package/src/assets/skills/quality-gates/SKILL.md +9 -12
  71. package/src/assets/skills/quality-gates/references/report-template.md +20 -20
  72. package/src/assets/skills/react/SKILL.md +1 -1
  73. package/src/assets/skills/regression/SKILL.md +1 -1
  74. package/src/assets/skills/reliability/SKILL.md +1 -1
  75. package/src/assets/skills/research-codebase/SKILL.md +1 -1
  76. package/src/assets/skills/research-competitor/SKILL.md +1 -1
  77. package/src/assets/skills/research-external/SKILL.md +1 -1
  78. package/src/assets/skills/research-technology/SKILL.md +1 -1
  79. package/src/assets/skills/review-methodology/SKILL.md +1 -1
  80. package/src/assets/skills/rust/SKILL.md +1 -1
  81. package/src/assets/skills/security/SKILL.md +1 -1
  82. package/src/assets/skills/software-design/SKILL.md +1 -1
  83. package/src/assets/skills/test-driven-development/SKILL.md +9 -29
  84. package/src/assets/skills/testing/SKILL.md +1 -1
  85. package/src/assets/skills/typescript/SKILL.md +1 -1
  86. package/src/assets/skills/ui-design/SKILL.md +1 -1
  87. package/src/assets/skills/worktree-support/SKILL.md +3 -55
  88. package/src/assets/skills/worktree-support/references/discovery.md +48 -0
  89. package/src/assets/skills/worktree-support/references/roots.md +2 -2
@@ -404,7 +404,7 @@ Every line of a `## Test Plan` section, or of a PR's test-plan block, follows th
404
404
 
405
405
  #### Consumption by Gate 2
406
406
 
407
- The Evaluate agent panel receives: the per-ticket plan + the numbered acceptance criteria (positive and negative).
407
+ The Evaluate agent receives: the per-ticket plan + the numbered acceptance criteria (positive and negative).
408
408
 
409
409
  The Test agent receives: the test plan's TP lines, once `check tp` has admitted them.
410
410
 
@@ -150,7 +150,7 @@ If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The machine
150
150
  **Step 2 — Evaluate whether write-back is warranted:**
151
151
 
152
152
  Only proceed if **at least one** of these is true:
153
- - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed).
153
+ - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed). Knowledge bases are written through at that point, never on a background schedule.
154
154
  - This workflow surfaced durable, cross-cutting knowledge about a codebase area that would help future agents working in the same area — patterns, anti-patterns, integration points, gotchas not visible from a single file read.
155
155
 
156
156
  **Never spawn unconditionally.** If neither condition is met, skip write-back silently.
@@ -45,7 +45,7 @@ When the user explicitly asks to re-validate, re-check, or re-run quality gates
45
45
  1. **Branch safety check**: If on a protected branch (main, master, develop, etc.), run Phase 1 to create/switch to a work branch. If already on a work branch, skip Phase 1.
46
46
  2. **Skip Phase 2** — no Code agent needed, user already made changes.
47
47
  3. **Detect FILES_CHANGED**: `git diff --name-only {base_branch}...HEAD`
48
- 4. **Run Phases 3-8** — full quality gate pipeline on detected changes.
48
+ 4. **Run Phases 3-8** — Simplify, Self-Review, Alignment, the one full Validate, QA Testing and the conditional Re-Validate, on the detected changes.
49
49
  5. **Proceed to Phase 10** (Create PR), **Phase 10b** (Evidence) and **Phase 11** (Report).
50
50
 
51
51
  If the user prompt does NOT match re-validation, proceed with the full pipeline below.
@@ -243,7 +243,7 @@ The index is one direct file read, written at render time by `render-decisions.c
243
243
 
244
244
  When `DECISIONS_CONTEXT` is not `(none)`, follow `devflow:apply-decisions` to scan the index, identify plausibly-relevant entries, Read full entry bodies on demand, and cite verbatim IDs in downstream agent prompts and reasoning.
245
245
 
246
- Pass to Code agent (Phase 2) and Scrutinize agent (Phase 5).
246
+ Pass to Code agent (Phase 2) and Scrutinize agent (Phase 4).
247
247
 
248
248
  ### Load Feature Knowledge
249
249
 
@@ -313,7 +313,8 @@ Based on Setup context (plan document, issue body, or conversation context), use
313
313
 
314
314
  ```
315
315
  Agent(subagent_type="Code"):
316
- "TASK_ID: {task-id}
316
+ "OPERATION: implement
317
+ TASK_ID: {task-id}
317
318
  TASK_DESCRIPTION: {description}
318
319
  BASE_BRANCH: {base branch}
319
320
  EXECUTION_PLAN: {full plan from setup context}
@@ -339,7 +340,8 @@ Spawn Code agents one at a time, passing handoff summaries between phases:
339
340
  **Phase 1 Code agent:**
340
341
  ```
341
342
  Agent(subagent_type="Code"):
342
- "TASK_ID: {task-id}
343
+ "OPERATION: implement
344
+ TASK_ID: {task-id}
343
345
  TASK_DESCRIPTION: {phase 1 description}
344
346
  BASE_BRANCH: {base branch}
345
347
  EXECUTION_PLAN: {phase 1 steps}
@@ -359,7 +361,8 @@ HANDOFF_FILE: {worktree}/.devflow/docs/handoff-{branch_slug}.md"
359
361
  **Phase 2+ Code agents** (after prior phase completes):
360
362
  ```
361
363
  Agent(subagent_type="Code"):
362
- "TASK_ID: {task-id}
364
+ "OPERATION: implement
365
+ TASK_ID: {task-id}
363
366
  TASK_DESCRIPTION: {phase N description}
364
367
  BASE_BRANCH: {base branch}
365
368
  EXECUTION_PLAN: {phase N steps}
@@ -390,7 +393,8 @@ Spawn multiple Code agents **in a single message**, each with independent subtas
390
393
 
391
394
  ```
392
395
  Agent(subagent_type="Code"): # Code agent 1
393
- "TASK_ID: {task-id}-part1
396
+ "OPERATION: implement
397
+ TASK_ID: {task-id}-part1
394
398
  TASK_DESCRIPTION: {independent subtask 1}
395
399
  BASE_BRANCH: {base branch}
396
400
  EXECUTION_PLAN: {subtask 1 steps}
@@ -405,7 +409,8 @@ ISSUE_NUMBER: {ISSUE_ID captured in Phase 1, or (none)}
405
409
  ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}"
406
410
 
407
411
  Agent(subagent_type="Code"): # Code agent 2 (same message)
408
- "TASK_ID: {task-id}-part2
412
+ "OPERATION: implement
413
+ TASK_ID: {task-id}-part2
409
414
  TASK_DESCRIPTION: {independent subtask 2}
410
415
  BASE_BRANCH: {base branch}
411
416
  EXECUTION_PLAN: {subtask 2 steps}
@@ -426,74 +431,28 @@ ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}"
426
431
  - Different files/modules with no imports between them
427
432
  - Each subtask is self-contained
428
433
 
429
- ### Phase 3: Validate
430
-
431
- **Produces:** VALIDATION_RESULT
432
- **Requires:** FILES_CHANGED
433
-
434
- After Code agent completes, spawn Validate agent to verify correctness:
435
-
436
- ```
437
- Agent(subagent_type="Validate"):
438
- "FILES_CHANGED: {list of files from Code agent output}
439
- VALIDATION_SCOPE: full
440
- Run build, typecheck, lint, test. Report pass/fail with failure details."
441
- ```
442
-
443
- **If FAIL:**
444
- 1. Extract failure details from Validate agent output
445
- 2. Increment `validation_retry_count`
446
- 3. If `validation_retry_count <= 2`:
447
- - Spawn Code agent with fix context:
448
- ```
449
- Agent(subagent_type="Code"):
450
- "TASK_ID: {task-id}
451
- TASK_DESCRIPTION: Fix validation failures
452
- OPERATION: validation-fix
453
- VALIDATION_FAILURES: {parsed failures from Validate agent}
454
- SCOPE: Fix only the listed failures, no other changes
455
- CREATE_PR: false
456
- ISSUE_NUMBER: {ISSUE_ID captured in Phase 1, or (none)}
457
- ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}
458
- COMPLIANCE_FRAMEWORKS: {COMPLIANCE_FRAMEWORKS}"
459
- ```
460
- - Loop back to Phase 3 (re-validate)
461
- 4. If `validation_retry_count > 2`: Report failures to user and halt
462
-
463
- **If PASS:** append a `gate:validate` claim, then continue to Phase 4.
464
-
465
- **Evidence claims** are lines appended to the `## Claims` section of `EVIDENCE_FILE` — the file's last section, created when absent. Append only: never edit or remove a claim; the last valid one per target wins. Each line takes exactly one of these shapes, where `<head>` is the 40-hex `HEAD:` the agent's report shows:
466
-
467
- ```
468
- - gate:validate PASS sha:<head> by:validate
469
- - TP-<n> <PASS|FAIL|SKIP> sha:<head> by:test exit:<0-255>
470
- ```
471
-
472
- - `gate:validate` — after a Phase 3 or Phase 6 PASS.
473
- - `TP-<n>` — after every Phase 8 run, one line per `### Test Plan Evidence` row whose TP is in `TEST_PLAN`, with the row's outcome; the line ends at `by:test` when the row's Exit is not a number from 0 to 255.
474
- - Append nothing from a report whose `HEAD:` is not a single 40-hex SHA — a reported before/after change included — and say so in the Phase 11 report.
475
-
476
- ### Phase 4: Simplify
434
+ ### Phase 3: Simplify
477
435
 
478
436
  **Produces:** SIMPLIFY_OUTPUT
479
437
  **Requires:** FILES_CHANGED
480
438
 
481
- After validation passes, spawn Simplify agent to polish the code:
439
+ After the Code agent completes, spawn Simplify agent to polish the code. The Phase 6 Validate covers its commits.
482
440
 
483
441
  ```
484
442
  Agent(subagent_type="Simplify"):
485
443
  "Simplify recently implemented code
486
444
  Task: {task description}
487
445
  FILES_CHANGED: {list of files from Code agent output}
488
- Focus on code modified by Code agent, apply project standards, enhance clarity"
446
+ Focus on code modified by Code agent, apply project standards, enhance clarity
447
+ Commit any improvements with a conventional-commit message."
489
448
  ```
490
449
 
491
- ### Phase 5: Self-Review
450
+ ### Phase 4: Self-Review
492
451
 
493
452
  **Produces:** SCRUTINIZE_OUTPUT
494
453
  **Requires:** FILES_CHANGED
495
454
 
496
- After Simplify agent completes, spawn Scrutinize agent as final quality gate:
455
+ After Simplify agent completes, spawn Scrutinize agent as the quality gate:
497
456
 
498
457
  ```
499
458
  Agent(subagent_type="Scrutinize"):
@@ -504,32 +463,14 @@ FEATURE_KNOWLEDGE: {feature_knowledge}
504
463
  Evaluate 9 pillars, fix P0/P1 issues, report status"
505
464
  ```
506
465
 
507
- If Scrutinize agent returns BLOCKED, report to user and halt.
466
+ Scrutinize agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
508
467
 
509
- ### Phase 6: Re-Validate (if Scrutinize agent made changes)
510
-
511
- **Produces:** REVALIDATION_RESULT
512
- **Requires:** SCRUTINIZE_OUTPUT
513
-
514
- If Scrutinize agent made code changes (status: FIXED), spawn Validate agent to verify:
515
-
516
- ```
517
- Agent(subagent_type="Validate"):
518
- "FILES_CHANGED: {files modified by Scrutinize agent}
519
- VALIDATION_SCOPE: changed-only
520
- Verify Scrutinize agent's fixes didn't break anything."
521
- ```
522
-
523
- **If FAIL:** Report to user - Scrutinize agent broke tests, needs manual intervention.
524
-
525
- **If PASS:** append a `gate:validate` claim (Phase 3's **Evidence claims**), then continue to Phase 7.
526
-
527
- ### Phase 7: Alignment Check
468
+ ### Phase 5: Alignment Check
528
469
 
529
470
  **Produces:** ALIGNMENT_RESULT
530
471
  **Requires:** FILES_CHANGED, EXECUTION_PLAN
531
472
 
532
- After Scrutinize agent passes (and re-validation if needed), spawn Evaluate agent to validate alignment:
473
+ After Scrutinize agent passes, spawn Evaluate agent to validate alignment. Evaluate agent receives `FEATURE_KNOWLEDGE` as acceptance context only; pattern and anti-pattern judgments belong to Scrutinize agent:
533
474
 
534
475
  ```
535
476
  Agent(subagent_type="Evaluate"):
@@ -541,7 +482,7 @@ FEATURE_KNOWLEDGE: {feature_knowledge}
541
482
  Validate alignment with request and plan. Report ALIGNED or MISALIGNED with details."
542
483
  ```
543
484
 
544
- **If ALIGNED:** Continue to Phase 8
485
+ **If ALIGNED:** Continue to Phase 6
545
486
 
546
487
  **If MISALIGNED:**
547
488
  1. Extract misalignment details from Evaluate agent output
@@ -550,9 +491,9 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
550
491
  - Spawn Code agent to fix misalignments:
551
492
  ```
552
493
  Agent(subagent_type="Code"):
553
- "TASK_ID: {task-id}
494
+ "OPERATION: alignment-fix
495
+ TASK_ID: {task-id}
554
496
  TASK_DESCRIPTION: Fix alignment issues
555
- OPERATION: alignment-fix
556
497
  MISALIGNMENTS: {structured misalignments from Evaluate agent}
557
498
  SCOPE: Fix only the listed misalignments, no other changes
558
499
  CREATE_PR: false
@@ -560,22 +501,62 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
560
501
  ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}
561
502
  COMPLIANCE_FRAMEWORKS: {COMPLIANCE_FRAMEWORKS}"
562
503
  ```
563
- - Spawn Validate agent to verify fix didn't break tests:
504
+ - Loop back to Phase 5 (re-check alignment). The fix is not validated here: the Phase 6 run covers it.
505
+ 4. If `alignment_fix_count > 2`: Report misalignments to user for decision
506
+
507
+ ### Phase 6: Validate
508
+
509
+ **Produces:** VALIDATION_RESULT, VALIDATED_HEAD
510
+ **Requires:** BASE_BRANCH
511
+
512
+ Validate takes the one full-suite slot, after every commit it must cover: Code, Simplify, Scrutinize and the alignment fixes. After Evaluate agent passes, spawn Validate agent. `FILES_CHANGED` is the branch diff, because the Code agent's own list misses the Simplify, Scrutinize and fix commits (`{base}` is `BASE_BRANCH`):
513
+
514
+ ```
515
+ Agent(subagent_type="Validate"):
516
+ "FILES_CHANGED: {output of `git diff --name-only {base}...HEAD`}
517
+ VALIDATION_SCOPE: full
518
+ Run build, typecheck, lint, test. Report pass/fail with failure details."
519
+ ```
520
+
521
+ **If FAIL:**
522
+ 1. Extract failure details from Validate agent output
523
+ 2. Increment `validation_retry_count`
524
+ 3. If `validation_retry_count <= 2`:
525
+ - Spawn Code agent with fix context:
564
526
  ```
565
- Agent(subagent_type="Validate"):
566
- "FILES_CHANGED: {files modified by fix Code agent}
567
- VALIDATION_SCOPE: changed-only"
527
+ Agent(subagent_type="Code"):
528
+ "OPERATION: validation-fix
529
+ TASK_ID: {task-id}
530
+ TASK_DESCRIPTION: Fix validation failures
531
+ VALIDATION_FAILURES: {parsed failures from Validate agent}
532
+ SCOPE: Fix only the listed failures, no other changes
533
+ CREATE_PR: false
534
+ ISSUE_NUMBER: {ISSUE_ID captured in Phase 1, or (none)}
535
+ ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}
536
+ COMPLIANCE_FRAMEWORKS: {COMPLIANCE_FRAMEWORKS}"
568
537
  ```
569
- - If Validate agent FAIL: Report to user
570
- - If Validate agent PASS: Loop back to Phase 7 (re-check alignment)
571
- 4. If `alignment_fix_count > 2`: Report misalignments to user for decision
538
+ - Loop back to Phase 6 (re-validate at the new HEAD, full scope)
539
+ 4. If `validation_retry_count > 2`: Report failures to user and halt
540
+
541
+ **If PASS:** append a `gate:validate` claim, run `git rev-parse HEAD` and record the result as `VALIDATED_HEAD`, then continue to Phase 7.
572
542
 
573
- ### Phase 8: QA Testing
543
+ **Evidence claims** are lines appended to the `## Claims` section of `EVIDENCE_FILE` — the file's last section, created when absent. Append only: never edit or remove a claim; the last valid one per target wins. Each line takes exactly one of these shapes, where `<head>` is the 40-hex `HEAD:` the agent's report shows:
544
+
545
+ ```
546
+ - gate:validate PASS sha:<head> by:validate
547
+ - TP-<n> <PASS|FAIL|SKIP> sha:<head> by:test exit:<0-255>
548
+ ```
549
+
550
+ - `gate:validate` — after a Phase 6 or Phase 8 PASS.
551
+ - `TP-<n>` — after every Phase 7 run, one line per `### Test Plan Evidence` row whose TP is in `TEST_PLAN`, with the row's outcome; the line ends at `by:test` when the row's Exit is not a number from 0 to 255.
552
+ - Append nothing from a report whose `HEAD:` is not a single 40-hex SHA — a reported before/after change included — and say so in the Phase 11 report.
553
+
554
+ ### Phase 7: QA Testing
574
555
 
575
556
  **Produces:** QA_RESULT
576
- **Requires:** FILES_CHANGED, EXECUTION_PLAN, TEST_PLAN
557
+ **Requires:** FILES_CHANGED, EXECUTION_PLAN, TEST_PLAN, VALIDATED_HEAD
577
558
 
578
- After Evaluate agent passes, spawn Test agent for scenario-based acceptance testing:
559
+ After Phase 6 passes, spawn Test agent for scenario-based acceptance testing:
579
560
 
580
561
  ```
581
562
  Agent(subagent_type="Test"):
@@ -587,9 +568,9 @@ TEST_PLAN: {the TP lines of the evidence file's ## Test Plan section, or (none)}
587
568
  Design and execute scenario-based acceptance tests. Report PASS or FAIL with evidence."
588
569
  ```
589
570
 
590
- After every Test agent run — PASS or FAIL, first run or retry — append its TP claims (Phase 3's **Evidence claims**).
571
+ After every Test agent run — PASS or FAIL, first run or retry — append its TP claims (Phase 6's **Evidence claims**).
591
572
 
592
- **If PASS:** Continue to Phase 9
573
+ **If PASS:** Continue to Phase 8
593
574
 
594
575
  **If FAIL:**
595
576
  1. Extract failure details from Test agent output
@@ -598,9 +579,9 @@ After every Test agent run — PASS or FAIL, first run or retry — append its T
598
579
  - Spawn Code agent to fix QA failures:
599
580
  ```
600
581
  Agent(subagent_type="Code"):
601
- "TASK_ID: {task-id}
582
+ "OPERATION: qa-fix
583
+ TASK_ID: {task-id}
602
584
  TASK_DESCRIPTION: Fix QA test failures
603
- OPERATION: qa-fix
604
585
  QA_FAILURES: {structured failures from Test agent}
605
586
  SCOPE: Fix only the listed failures, no other changes
606
587
  CREATE_PR: false
@@ -608,15 +589,26 @@ After every Test agent run — PASS or FAIL, first run or retry — append its T
608
589
  ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}
609
590
  COMPLIANCE_FRAMEWORKS: {COMPLIANCE_FRAMEWORKS}"
610
591
  ```
611
- - Spawn Validate agent to verify fix didn't break tests:
612
- ```
613
- Agent(subagent_type="Validate"):
614
- "FILES_CHANGED: {files modified by fix Code agent}
615
- VALIDATION_SCOPE: changed-only"
616
- ```
617
- - If Validate agent FAIL: Report to user
618
- - If Validate agent PASS: Loop back to Phase 8 (re-run Test agent)
619
- 4. If `qa_retry_count > 2`: Report QA failures to user for decision
592
+ - Loop back to Phase 7 (re-run Test agent). The fix is not validated here: Phase 8 covers it.
593
+ 4. If `qa_retry_count > 2`: Report QA failures to user for decision. The run stops at the report (Phase 11), so Phases 8 and 9 do not run.
594
+
595
+ ### Phase 8: Re-Validate (only if a qa-fix committed)
596
+
597
+ **Produces:** REVALIDATION_RESULT
598
+ **Requires:** QA_RESULT, VALIDATED_HEAD
599
+
600
+ Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); otherwise skip it and continue to Phase 9. Spawn Validate agent over what changed since the Phase 6 run:
601
+
602
+ ```
603
+ Agent(subagent_type="Validate"):
604
+ "FILES_CHANGED: {output of `git diff --name-only VALIDATED_HEAD..HEAD`}
605
+ VALIDATION_SCOPE: changed-only
606
+ Verify the qa-fix commits did not break anything."
607
+ ```
608
+
609
+ **If FAIL:** Report the failures to user and halt.
610
+
611
+ **If PASS:** append a `gate:validate` claim (Phase 6's **Evidence claims**), then continue to Phase 9.
620
612
 
621
613
  ### Phase 9: CI Status Gate
622
614
 
@@ -625,14 +617,22 @@ After every Test agent run — PASS or FAIL, first run or retry — append its T
625
617
 
626
618
  Strategy-conditional: run when the PR already exists — **SINGLE_CODE_AGENT** and **SEQUENTIAL_CODE_AGENTS** (the Phase 2 Code agent with `CREATE_PR: true` creates it); skip for **PARALLEL_CODE_AGENTS** (its unified PR is created in Phase 10).
627
619
 
620
+ **Push first, outside the gate block.** The gate reads CI for the pushed head, and the Simplify, Scrutinize and fix commits reach the PR only by a push. Push once — never force, and no retry:
621
+
622
+ ```bash
623
+ git push origin HEAD; echo "exit=$?"
624
+ ```
625
+
626
+ `exit=0` continues to the gate. Any other result, a rejected non-fast-forward push included, records `TRACEABILITY: DEGRADED (ci push failed)` for the Phase 11 report, reports "CI status unknown — verify manually before merging" and proceeds to Phase 10 without waiting. `PR_NUMBER` is the number in `PR_URL`.
627
+
628
628
  <!-- PATTERN: ci-status-gate -->
629
- 1. Spawn `Agent(subagent_type="Git")` with `OPERATION: check-ci-status` and `PR_NUMBER` from PR_URL.
629
+ 1. Wait: run `cd {worktree} && HEAD_SHA=$(git rev-parse HEAD) && node "$HOME/.devflow/scripts/ci-wait.cjs" --pr {PR_NUMBER} --head "$HEAD_SHA"` through the Bash tool with `timeout: 600000`. Each run is one wait of at most 570 seconds and prints one line, `CI <STATUS> pr=… head=… failing=… pending=… waited=…` (INDETERMINATE adds `reason=…`). A missing or unparseable line, a status outside the six below, or a non-zero exit is INDETERMINATE.
630
630
  2. **If PASSING** → proceed to Phase 10.
631
631
  3. **If NO_PR or NO_CI** → skip: "No PR/CI configured, skipping CI validation." Proceed to Phase 10.
632
- 4. **If PENDING** → poll every 60 seconds (global budget, see step 7). Re-spawn Git agent each poll. If PASSING → proceed. If still PENDING after budget exhausted → report "CI still running — verify manually before merging" and proceed.
633
- 5. **If INDETERMINATE** → poll as PENDING within the same budget. If still INDETERMINATE after budget exhausted → report "CI status unknown — verify manually before merging" and proceed.
634
- 6. **If FAILING** → report failing checks. Spawn `Agent(subagent_type="Code")` with `COMPLIANCE_FRAMEWORKS` to fix CI failures based on check names and failure context. After fix, push and re-check. Max 2 fix attempts. If still failing → report failures and proceed.
635
- 7. **Total budget**: max 10 polls and max 2 fix attempts across all check/fix cycles combined. If budget exhausted, report current status and proceed.
632
+ 4. **If PENDING** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI still running — verify manually before merging" and proceed.
633
+ 5. **If INDETERMINATE** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI status unknown — verify manually before merging" and proceed.
634
+ 6. **If FAILING** and fewer than 2 fixes have run → report the failing checks from the line. Spawn `Agent(subagent_type="Code")` whose prompt opens with `OPERATION: ci-fix`, with `COMPLIANCE_FRAMEWORKS`, `CI_FAILURES` and `PUSH: false`; `CI_FAILURES` holds the failing-check names from the line and nothing else, because the Code agent fetches the full names and reads the logs itself and this command reads none. After a fix, push with the command above and, if a wait remains, wait again (step 1); a failed push records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and stops waiting. After the second fix still FAILING → report the failing checks and proceed.
635
+ 7. **Budget**: at most 3 waits and 2 fixes in all. When one is spent, report the current status and proceed.
636
636
  <!-- /PATTERN: ci-status-gate -->
637
637
 
638
638
  ### Phase 10: Create PR
@@ -646,9 +646,9 @@ Strategy-conditional: run when the PR already exists — **SINGLE_CODE_AGENT** a
646
646
 
647
647
  ```
648
648
  Agent(subagent_type="Code"):
649
- "TASK_ID: {task-id}
649
+ "OPERATION: pr-create
650
+ TASK_ID: {task-id}
650
651
  TASK_DESCRIPTION: Create the unified PR for the parallel implementation
651
- OPERATION: pr-create
652
652
  BASE_BRANCH: {base branch}
653
653
  CREATE_PR: true
654
654
  PR_DESCRIPTION_GUIDANCE: {pr_description_guidance}
@@ -698,7 +698,7 @@ Display completion summary with phase status, PR info, and next steps.
698
698
 
699
699
  Show the test plan's evidence from Phase 10b: `Test plan: {VERIFIED-CI + ATTESTED-LOCAL}/{total} verified (VERIFIED-CI {n}, ATTESTED-LOCAL {n})`, read from the `EVIDENCE` line and never inferred, then its `**Body**:` / `**Comment**:` line verbatim. Without an `EVIDENCE` line, show `Test plan: evidence unavailable`; with no test plan, `Test plan: missing`.
700
700
 
701
- If any Git agent output emitted `TRACEABILITY: DEGRADED ({reason})` lines during the run, or Phase 10b's push recorded one, surface them verbatim in the report under a `### Traceability` subsection so the user can act on them.
701
+ If any Git agent output emitted `TRACEABILITY: DEGRADED ({reason})` lines during the run, or Phase 9's push or Phase 10b's push recorded one, surface them verbatim in the report under a `### Traceability` subsection so the user can act on them.
702
702
 
703
703
  If Phase 1 recorded an evidence exception, show its `## Evidence Exceptions` lines in the report.
704
704
 
@@ -729,7 +729,7 @@ If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The machine
729
729
  **Step 2 — Evaluate whether write-back is warranted:**
730
730
 
731
731
  Only proceed if **at least one** of these is true:
732
- - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed).
732
+ - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed). Knowledge bases are written through at that point, never on a background schedule.
733
733
  - This workflow surfaced durable, cross-cutting knowledge about a codebase area that would help future agents working in the same area — patterns, anti-patterns, integration points, gotchas not visible from a single file read.
734
734
 
735
735
  **Never spawn unconditionally.** If neither condition is met, skip write-back silently.
@@ -786,30 +786,30 @@ When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, the files
786
786
  │ ├─ SEQUENTIAL_CODE_AGENTS (15%): N Code agents with handoff summaries
787
787
  │ └─ PARALLEL_CODE_AGENTS (5%): N Code agents in single message (rare)
788
788
  │
789
- ├─ Phase 3: Validate
790
- │ └─ Validate agent (build, typecheck, lint, test)
791
- │ └─ If FAIL: Code agent fix loop (max 2 retries) → re-validate
792
- │ └─ If PASS: gate:validate claim → evidence file
793
- │
794
- ├─ Phase 4: Simplify
789
+ ├─ Phase 3: Simplify
795
790
  │ └─ Simplify agent (refines code clarity and consistency)
796
791
  │
797
- ├─ Phase 5: Self-Review
798
- │ └─ Scrutinize agent (final quality gate, fixes P0/P1)
792
+ ├─ Phase 4: Self-Review
793
+ │ └─ Scrutinize agent (quality gate, fixes P0/P1; status PASS | FIXED | BLOCKED)
799
794
  │
800
- ├─ Phase 6: Re-Validate (if Scrutinize agent made changes)
801
- │ └─ Validate agent (verify Scrutinize agent fixes)
802
- │
803
- ├─ Phase 7: Alignment Check
795
+ ├─ Phase 5: Alignment Check
804
796
  │ └─ Evaluate agent (validates alignment - reports only, no fixes)
805
- │ └─ If MISALIGNED: Code agent fix loop (max 2 iterations) → Validate agent → re-check
797
+ │ └─ If MISALIGNED: Code agent fix loop (max 2 iterations) → re-check alignment
798
+ │
799
+ ├─ Phase 6: Validate (the one full-suite slot)
800
+ │ └─ Validate agent (build, typecheck, lint, test over the branch diff)
801
+ │ └─ If FAIL: Code agent fix loop (max 2 retries) → re-validate at the new HEAD
802
+ │ └─ If PASS: record VALIDATED_HEAD, gate:validate claim → evidence file
806
803
  │
807
- ├─ Phase 8: QA Testing
804
+ ├─ Phase 7: QA Testing
808
805
  │ └─ Test agent (scenario-based acceptance tests, TEST_PLAN) → one claim per TP row → evidence file
809
- │ └─ If FAIL: Code agent fix loop (max 2 retries) → Validate agent → re-test
806
+ │ └─ If FAIL: Code agent fix loop (max 2 retries) → re-test
807
+ │
808
+ ├─ Phase 8: Re-Validate (only if a qa-fix committed)
809
+ │ └─ Validate agent (changed-only over VALIDATED_HEAD..HEAD) → gate:validate claim
810
810
  │
811
811
  ├─ Phase 9: CI Status Gate (SINGLE_CODE_AGENT + SEQUENTIAL_CODE_AGENTS; skipped for PARALLEL_CODE_AGENTS)
812
- │ └─ Git agent (check-ci-status) → poll/fix cycle (10 polls + 2 fix budget)
812
+ │ └─ Push the branch, then ci-wait.cjs (inline, one wait ≤ 570 s) → Code agent on FAILING (3 waits + 2 fixes)
813
813
  │
814
814
  ├─ Phase 10: Create PR (if needed)
815
815
  │ └─ SINGLE_CODE_AGENT: already created by the Phase 2 Code agent
@@ -828,7 +828,7 @@ When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, the files
828
828
 
829
829
  ## Principles
830
830
 
831
- 1. **Orchestration only** - Command spawns agents, never does work itself
831
+ 1. **Orchestration only** - Command spawns agents, never does work itself; the inline calls are the bounded plumbing the charter allows: the Phase 9 and Phase 10b pushes, the Phase 9 ci-wait call and the evidence script checks
832
832
  2. **Plan-first** - Plan documents from `/plan` skip exploration/planning overhead entirely
833
833
  3. **Coherence-first** - Single Code agent produces more consistent code (default ~80% of tasks)
834
834
  4. **Agent ownership** - Each agent owns its output completely
@@ -838,7 +838,7 @@ When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, the files
838
838
  8. **Strict delegation** - Never perform agent work in main session. "Spawn X" means call Agent tool with X, not do X's work yourself
839
839
  9. **Validate agent owns validation** - Never run `npm test`, `npm run build`, or similar in main session; always delegate to Validate agent
840
840
  10. **Code agent owns fixes** - Never implement fixes in main session; spawn Code agent for validation failures and alignment fixes
841
- 11. **Loop limits** - Max 2 validation retries, max 2 alignment fix iterations before escalating to user
841
+ 11. **Loop limits** - Max 2 validation retries, max 2 alignment fix iterations, max 2 QA retries before escalating to user; the CI gate allows at most 3 waits and 2 fixes
842
842
  12. **CI awareness** - CI status is checked before merge for SINGLE_CODE_AGENT and SEQUENTIAL_CODE_AGENTS, whose PR exists from Phase 2; skipped for PARALLEL_CODE_AGENTS, whose PR is created in Phase 10; test-plan evidence (Phase 10b) is recorded under every strategy once the PR exists
843
843
 
844
844
  ## Error Handling
@@ -24,7 +24,7 @@ Process issues from code review reports: triage every issue through the blast-ra
24
24
 
25
25
  1. **Discover resolvable worktrees** using the `devflow:worktree-support` skill discovery algorithm:
26
26
  - Run `git worktree list --porcelain` → parse, filter (skip protected/detached/mid-rebase), dedup by branch, sort by recent commit
27
- - See the `devflow:worktree-support` skill for the full 7-step algorithm and canonical protected branch list
27
+ - Invoke the `devflow:worktree-support` skill, then Read its `references/discovery.md` from the skill's base directory for the full 7-step algorithm; the canonical protected branch list stays in the skill
28
28
  - Additional filter: must have unresolved reviews (latest review directory has no `resolution-summary.md`)
29
29
  2. **If `--path` flag provided:** use only that worktree, skip discovery
30
30
  **`--path` validation**: Before proceeding, verify the path exists as a directory and appears in `git worktree list` output. If not: report error and stop.
@@ -302,8 +302,8 @@ For each batch, spawn Code agent with `OPERATION: issue-fix` and `PUSH: false`:
302
302
 
303
303
  ```
304
304
  Agent(subagent_type="Code"):
305
- "TASK_ID: resolve-{batch-id}
306
- OPERATION: issue-fix
305
+ "OPERATION: issue-fix
306
+ TASK_ID: resolve-{batch-id}
307
307
  ISSUES: {fix_now_issues_in_batch}
308
308
  SCOPE: {risk_tier_per_issue}
309
309
  PUSH: false
@@ -348,7 +348,8 @@ Agent(subagent_type="Simplify", run_in_background=false):
348
348
  "TASK_DESCRIPTION: Issue resolution fixes
349
349
  WORKTREE_PATH: {worktree_path} (omit if cwd)
350
350
  FILES_CHANGED: {list of files modified by Code agents}
351
- Simplify and refine the fixes for clarity and consistency"
351
+ Simplify and refine the fixes for clarity and consistency
352
+ Commit any improvements with a conventional-commit message."
352
353
  ```
353
354
 
354
355
  ### Phase 7: Verification Gate
@@ -376,8 +377,8 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
376
377
  - Spawn Code agent with fix context:
377
378
  ```
378
379
  Agent(subagent_type="Code"):
379
- "TASK_ID: resolve-{batch-id}-valfix-{count}
380
- OPERATION: validation-fix
380
+ "OPERATION: validation-fix
381
+ TASK_ID: resolve-{batch-id}-valfix-{count}
381
382
  VALIDATION_FAILURES: {parsed failures from Validate agent}
382
383
  SCOPE: Fix only the listed failures, no other changes
383
384
  PUSH: false
@@ -415,14 +416,24 @@ If `fork_no_push` is set → skip: "Cannot push to fork — skipping CI validati
415
416
 
416
417
  Otherwise, for each worktree with fixes:
417
418
 
418
- <!-- PATTERN: ci-status-gate — shared polling/classification/budget logic; context-specific preamble lives outside this block -->
419
- 1. Spawn `Agent(subagent_type="Git")` with `OPERATION: check-ci-status` and `WORKTREE_PATH`.
419
+ `PR_NUMBER` is the worktree's `pr_number` from Phase 0; when it is absent, skip: "No PR/CI configured, skipping CI validation."
420
+
421
+ **Push first, outside the gate block.** The gate waits on the pushed head, so push once more with the gate's own command — never forced, and no retry:
422
+
423
+ ```bash
424
+ git -C {worktree} push; echo "exit=$?"
425
+ ```
426
+
427
+ Phase 7 has pushed already, so this is a no-op unless the head moved since. `exit=0` continues to the gate. Any other result records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and skips the wait for this worktree. Pass `WORKTREE_PATH: {worktree_path}` on the fix spawn below.
428
+
429
+ <!-- PATTERN: ci-status-gate -->
430
+ 1. Wait: run `cd {worktree} && HEAD_SHA=$(git rev-parse HEAD) && node "$HOME/.devflow/scripts/ci-wait.cjs" --pr {PR_NUMBER} --head "$HEAD_SHA"` through the Bash tool with `timeout: 600000`. Each run is one wait of at most 570 seconds and prints one line, `CI <STATUS> pr=… head=… failing=… pending=… waited=…` (INDETERMINATE adds `reason=…`). A missing or unparseable line, a status outside the six below, or a non-zero exit is INDETERMINATE.
420
431
  2. **If PASSING** → proceed to next phase.
421
432
  3. **If NO_PR or NO_CI** → skip: "No PR/CI configured, skipping CI validation." Proceed to next phase.
422
- 4. **If PENDING** → poll every 60 seconds (global budget, see step 7). Re-spawn Git agent each poll. If PASSING → proceed. If still PENDING after budget exhausted → report "CI still running — verify manually before merging" and proceed.
423
- 5. **If INDETERMINATE** → poll as PENDING within the same budget. If still INDETERMINATE after budget exhausted → report "CI status unknown — verify manually before merging" and proceed.
424
- 6. **If FAILING** → report failing checks. Spawn `Agent(subagent_type="Code")` with `COMPLIANCE_FRAMEWORKS` to fix CI failures based on check names and failure context. After fix, push and re-check. Max 2 fix attempts. If still failing → report failures and proceed.
425
- 7. **Total budget**: max 10 polls and max 2 fix attempts across all check/fix cycles combined. If the budget is exhausted, report current status and proceed.
433
+ 4. **If PENDING** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI still running — verify manually before merging" and proceed.
434
+ 5. **If INDETERMINATE** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI status unknown — verify manually before merging" and proceed.
435
+ 6. **If FAILING** and fewer than 2 fixes have run → report the failing checks from the line. Spawn `Agent(subagent_type="Code")` whose prompt opens with `OPERATION: ci-fix`, with `COMPLIANCE_FRAMEWORKS`, `CI_FAILURES` and `PUSH: false`; `CI_FAILURES` holds the failing-check names from the line and nothing else, because the Code agent fetches the full names and reads the logs itself and this command reads none. After a fix, push with the command above and, if a wait remains, wait again (step 1); a failed push records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and stops waiting. After the second fix still FAILING → report the failing checks and proceed.
436
+ 7. **Budget**: at most 3 waits and 2 fixes in all, per worktree. When one is spent, report the current status and proceed.
426
437
  <!-- /PATTERN: ci-status-gate -->
427
438
 
428
439
  ### Phase 9: Manage Debt (Sequential)
@@ -455,7 +466,7 @@ After manage-debt completes:
455
466
 
456
467
  **Step 9b-0: Re-verify stale test-plan items**
457
468
 
458
- Run this step only when this run's Phase 7 push succeeded — the one way /resolve moves the PR head — and a PR is known; otherwise skip it and Step 9b-3, and record `STALE_REVERIFICATION` as `SKIPPED (head unchanged)`. Detection needs no Git agent: from the worktree root, run the evidence script, which re-derives every test-plan state at the new head and writes the stale TP lines whose text the PR's trusted evidence record vouches for:
469
+ Run this step only when a push of this run succeeded — Phase 7's, or the push of Phase 8's gate — and a PR is known; otherwise skip it and Step 9b-3, and record `STALE_REVERIFICATION` as `SKIPPED (head unchanged)`. Detection needs no Git agent: from the worktree root, run the evidence script, which re-derives every test-plan state at the new head and writes the stale TP lines whose text the PR's trusted evidence record vouches for:
459
470
 
460
471
  ```bash
461
472
  cd {worktree} && node "$HOME/.devflow/scripts/verify-evidence.cjs" verify --pr {pr_number} --stale-out "{TARGET_DIR_REL}/stale-plan.md"; echo "exit=$?"
@@ -607,7 +618,7 @@ Final gate: {PASS | FAILED after N attempts}
607
618
  - Resolution comment: {POSTED | POSTED+TRUNCATED | SKIPPED (already posted) | SKIPPED (publication off) | SKIPPED (no PR) | DEGRADED (reason)}
608
619
  - Publication: {FULL (private repo) | FULL (config override) | STUB (public repository) | OFF (publication disabled by config) | STUB (visibility undeterminable) | STUB (evidence policy)}
609
620
  - Thread replies: {COMPLETE | PARTIAL | TRUNCATED | SKIPPED (reason) | DEGRADED (reason)}
610
- - Push: {pushed | skipped (no fixes) | skipped (cannot push to fork)}
621
+ - Push: {pushed (Phase 7, a CI-fix push, or both) | skipped (no fixes) | skipped (cannot push to fork) | DEGRADED (ci push failed)}
611
622
  - Test-plan re-verification: {Test plan: n stale, m re-verified | SKIPPED (head unchanged) | DEGRADED (reason)}
612
623
  - Test-plan evidence: {the EVIDENCE line's VERIFIED-CI + ATTESTED-LOCAL / total, then the Body / Comment line | SKIPPED (reason) | DEGRADED (reason)}
613
624
 
@@ -648,7 +659,7 @@ If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The machine
648
659
  **Step 2 — Evaluate whether write-back is warranted:**
649
660
 
650
661
  Only proceed if **at least one** of these is true:
651
- - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed).
662
+ - This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed). Knowledge bases are written through at that point, never on a background schedule.
652
663
  - This workflow surfaced durable, cross-cutting knowledge about a codebase area that would help future agents working in the same area — patterns, anti-patterns, integration points, gotchas not visible from a single file read.
653
664
 
654
665
  **Never spawn unconditionally.** If neither condition is met, skip write-back silently.
@@ -718,7 +729,7 @@ When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, the files
718
729
  ├─ Phase 7: Verification Gate [Validate agent, haiku] + push + Code agent validation-fix loop ≤2
719
730
  │
720
731
  ├─ Phase 8: CI Status Gate (conditional — skipped if no fixes or verification FAILED)
721
- │ └─ Git agent (check-ci-status) → poll/fix loop
732
+ │ └─ push, then ci-wait.cjs (inline, one wait ≤ 570 s) → Code agent on FAILING (3 waits + 2 fixes per worktree)
722
733
  │
723
734
  ├─ Phase 9: Git agent (manage-debt) — FIX_SEPARATE + TECH_DEBT → backfill Tracked={ISSUE_REF} (or TRACEABILITY: DEGRADED on failure)
724
735
  │ SEQUENTIAL across worktrees