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.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -3
- package/lib/colors.js +23 -0
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +53 -50
- package/scripts/agileflow-welcome.js +25 -8
- package/scripts/batch-pmap-loop.js +528 -0
- package/scripts/lib/colors.sh +106 -0
- package/scripts/lib/file-tracking.js +5 -3
- package/scripts/obtain-context.js +206 -85
- package/scripts/session-boundary.js +3 -3
- package/scripts/session-manager.js +339 -18
- package/scripts/test-session-boundary.js +80 -0
- package/src/core/agents/mentor.md +40 -2
- package/src/core/agents/orchestrator.md +35 -2
- package/src/core/commands/babysit.md +273 -689
- package/src/core/commands/batch.md +117 -2
- package/src/core/commands/metrics.md +62 -9
- package/src/core/commands/rpi.md +500 -0
- package/src/core/commands/session/new.md +30 -22
- package/src/core/commands/session/status.md +35 -2
- package/src/core/templates/session-state.json +32 -3
- package/tools/cli/commands/config.js +43 -21
- package/tools/cli/commands/doctor.js +8 -5
- package/tools/cli/commands/setup.js +14 -7
- package/tools/cli/commands/uninstall.js +8 -5
- package/tools/cli/commands/update.js +20 -10
- package/tools/cli/lib/content-injector.js +80 -0
- package/tools/cli/lib/error-handler.js +173 -0
- package/tools/cli/lib/ui.js +3 -2
|
@@ -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.
|
|
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
|
|
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.
|