agileflow 2.85.0 → 2.87.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.
@@ -106,7 +106,7 @@ RULE #4: SYNTHESIS REQUIREMENTS
106
106
  3. Collect ALL results before synthesizing
107
107
  4. Always flag conflicts in final answer
108
108
  5. Provide recommendation with rationale
109
- 6. 🧪 EXPERIMENTAL: For quality gates (coverage ≥ X%, tests pass), use nested loops - see "NESTED LOOP MODE" section
109
+ 6. For quality gates (coverage ≥ X%, tests pass), use nested loops - see "NESTED LOOP MODE" section
110
110
 
111
111
  <!-- COMPACT_SUMMARY_END -->
112
112
 
@@ -459,10 +459,12 @@ Proceed with integration?
459
459
 
460
460
  ---
461
461
 
462
- ## NESTED LOOP MODE (Experimental)
462
+ ## NESTED LOOP MODE
463
463
 
464
464
  When agents need to iterate until quality gates pass, use **nested loops**. Each agent runs its own isolated loop with quality verification.
465
465
 
466
+ > **Status**: Stable (v2.85+). Thread type: `big` (B-thread). See [Thread-Based Engineering](../../02-practices/thread-based-engineering.md).
467
+
466
468
  ### When to Use
467
469
 
468
470
  | Scenario | Use Nested Loops? |
@@ -621,3 +623,34 @@ If an agent loop fails:
621
623
  - Consider if 80% is achievable
622
624
  - May need to reduce threshold or add more test cases
623
625
  ```
626
+
627
+ ### Troubleshooting Nested Loops
628
+
629
+ | Issue | Cause | Solution |
630
+ |-------|-------|----------|
631
+ | Agent never starts loop | Loop ID not passed in prompt | Ensure `--loop-id=xyz` is included in prompt instructions |
632
+ | Gate always fails | Wrong threshold | Check `--threshold` matches realistic target |
633
+ | Timeout exceeded | Complex work | Increase timeout or split into smaller loops |
634
+ | Regression abort | Flaky tests | Fix test flakiness before using coverage gate |
635
+ | Max iterations reached | Insufficient changes | Review agent's iteration logs for patterns |
636
+ | "Loop not found" error | --init not run | Agent must run `--init` before `--check` |
637
+
638
+ **Debugging commands:**
639
+ ```bash
640
+ # View all active loops
641
+ cat .agileflow/state/loops.json
642
+
643
+ # View loop history for specific ID
644
+ node .agileflow/scripts/agent-loop.js --history --loop-id=abc12345
645
+
646
+ # Force abort a stuck loop
647
+ node .agileflow/scripts/agent-loop.js --abort --loop-id=abc12345
648
+
649
+ # Clear all loops (reset)
650
+ rm .agileflow/state/loops.json
651
+ ```
652
+
653
+ **Common patterns:**
654
+ - **Coverage stalls at 70%**: Usually means edge cases aren't tested. Agent needs clearer guidance on what to cover.
655
+ - **Visual verification loops forever**: Ensure screenshots use `verified-` prefix convention.
656
+ - **Type gate fails repeatedly**: Check for implicit `any` types or missing declarations.