-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Create a feedback loop where common Gemini verdict corrections become Ponder Stibbons auto-fixes, reducing LLM costs and improving iteration speed over time.
The Learning Loop
┌─────────────────────────────────────────────────────────────────────────┐
│ THE LEARNING CYCLE │
│ │
│ Gemini ──► Verdict ──► Analyzer ──► Pattern ──► Ponder Auto-Fix │
│ Review "BLOCK: mines detected fixes it before │
│ missing X" patterns (N>3) Gemini sees it │
│ │ │ │
│ └────── Learning ──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
How It Works
Phase 1: Pattern Mining (Verdict Analyzer)
The Verdict Analyzer already processes Gemini verdicts. Extend it to track:
class VerdictPattern:
pattern_type: str # "missing_section", "wrong_format", "path_typo"
regex_or_rule: str # How to detect this in drafts
fix_strategy: str # How Ponder should fix it
occurrence_count: int # How many times seen
example_verdicts: list # Sample verdict excerptsPhase 2: Promotion Threshold
When a pattern occurs N times (configurable, default 3):
- Verdict Analyzer flags it as "promotion candidate"
- Human reviews and approves promotion
- Pattern becomes a Ponder auto-fix rule
Phase 3: Auto-Fix Integration
Ponder loads promoted rules and applies them pre-review:
# In Ponder's auto_fix.py
def load_promoted_fixes() -> list[AutoFixRule]:
"""Load fixes promoted from verdict analysis."""
rules_path = Path("docs/auto-fix-rules/promoted/")
return [AutoFixRule.from_yaml(f) for f in rules_path.glob("*.yaml")]Phase 4: Impact Measurement
Track metrics:
- Gemini calls saved (fixes that would have triggered BLOCK)
- Time saved (auto-fix is instant vs 30s+ LLM call)
- Accuracy (did the auto-fix actually match what Gemini would want?)
Example Pattern Promotion
Observed: Gemini blocks 5 LLDs for "Section 11 uses ### instead of ##"
Pattern extracted:
name: section_11_header_format
trigger: "Section 11" in verdict AND "header" in verdict
detection: r'^### 11\.'
fix: Replace with '## 11.'
promoted_from: verdicts/2026-02/LLD-099-v1.md, LLD-101-v2.md, ...Result: Next time a draft has ### 11., Ponder fixes it before Gemini review.
Connection to "How the AgentOS Learns"
This is a key learning mechanism:
- Gemini teaches - Blocks drafts with issues
- Analyzer observes - Tracks patterns in blocks
- System learns - Promotes patterns to auto-fixes
- Quality improves - Fewer blocks, faster iteration
Update wiki page: How the AgentOS Learns
Files to Modify
| File | Change |
|---|---|
agentos/workflows/requirements/verdict_analyzer.py |
Add pattern tracking |
agentos/workflows/requirements/nodes/auto_fix.py |
Load promoted rules |
docs/auto-fix-rules/promoted/ |
Store promoted patterns |
wiki/How-the-AgentOS-Learns.md |
Document this loop |
Dependencies
- feat: Ponder Stibbons - The Compositor (auto-fix layer for mechanical corrections) #307 - Ponder Stibbons (The Compositor) must exist first
Success Criteria
- Verdict Analyzer tracks correction patterns
- Patterns with N+ occurrences flagged for promotion
- Promoted patterns loaded by Ponder
- Metrics show reduced Gemini round-trips
- Wiki documents the learning loop
Labels
enhancement, workflow, learning
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels