Output format markers for the real-time stream formatter. Use when building prompts for streaming analysis to ensure proper progress display...
Define output markers that the StreamFormatter (internal/agent/stream.go) detects and displays as real-time progress.
The formatter buffers streaming text and uses regex patterns to detect phases and findings. When markers are found:
\r)**📄 DOCUMENTS RECEIVED**
1. W2_2024.pdf - W-2 for John Smith, Employer: Acme Corp
2. paystub_jan.pdf - Pay period ending 01/15/2025
[etc...]
This should be output FIRST to provide immediate feedback while the model processes documents.
**📋 GUIDELINE: B3-3.1-01 - Employment Documentation**
Requirement: [from guideline]
Finding: [what was found]
Status: ✅ COMPLIANT
Status options:
Status: ✅ COMPLIANT → Shows green checkmarkStatus: ⚠️ ISSUE → Shows warningStatus: ❌ NON-COMPLIANT → Shows error**🔍 CROSS-CHECK: W2 vs Paystubs**
Result: MATCH
Result options:
MATCH (without MISMATCH nearby) → Shows "Match confirmed"MISMATCH → Shows warning "Mismatch detected"**🧮 INCOME CALCULATION**
Base annual salary: $85,000.00
Total qualifying monthly income: $7,083.33
Extracted amounts (regex patterns):
base annual or base salary followed by $X,XXX.XXtotal qualifying monthly income followed by $X,XXX.XXThese are detected automatically from natural language:
| Pattern | Display |
|---|---|
| "identical" + "ytd" | 🚨 FRAUD INDICATOR: Identical YTD |
| "Lorem Ipsum" or "placeholder text" | 🚨 FRAUD INDICATOR: Placeholder text |
| "conflicting" or "two different" | ⚠️ Conflicting document versions |
| "missing" + "document" | 📋 Missing required documentation |
**✅ FINAL DETERMINATION**
Status: APPROVED
Status options:
Status: APPROVED or Status: ✅ → Shows ✅ APPROVEDStatus: DENIED or Status: ❌ → Shows ❌ DENIEDStatus: NEEDS REVIEW or Status: CONDITIONAL → Shows ⚠️ NEEDS REVIEWExtracting structured results...
**📋 GUIDELINE: B3-3.1-01 - General Income Information**
Requirement: Verify stable income history for past 2 years
Finding: W2s provided for 2022 and 2023 showing consistent employment
Status: ✅ COMPLIANT
**📋 GUIDELINE: B3-3.1-03 - Base Pay Verification**
Requirement: Document current base salary with recent paystubs
Finding: Paystub dated 2024-01-15 shows base salary $85,000/year
Status: ✅ COMPLIANT
**🔍 CROSS-CHECK: W2 vs Paystubs**
W2 2023: $85,000 annual
Paystub YTD annualized: $85,000
Result: MATCH
**🧮 INCOME CALCULATION**
Base annual salary: $85,000.00
No additional income sources documented
Total qualifying monthly income: $7,083.33
**✅ FINAL DETERMINATION**
Status: APPROVED
Confidence: 0.92
The above produces this real-time display:
⏳ Checking B3-3.1-01 - General Income Information
✅ B3-3.1-01 - General Income Information: Compliant
⏳ Checking B3-3.1-03 - Base Pay Verification
✅ B3-3.1-03 - Base Pay Verification: Compliant
⏳ Cross-checking W2 vs Paystubs
✓ Document cross-check: Match confirmed
⏳ Calculating qualifying income...
💰 Base salary: $85,000/year
📈 Qualifying monthly income: $7,083.33
⏳ Making final determination...
✅ APPROVED
To add new detected patterns, edit internal/agent/stream.go:
parseAndDisplay()sf.shown["key"] check to prevent duplicatessf.updateStatus() for transient status or sf.printFinding() for persistent findingsinternal/agent/stream.go - StreamFormatter implementationinternal/agent/income/income.go - Example prompt using these markers