Spaces:
Paused
Paused
File size: 1,262 Bytes
9c08e35 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # Workflow: screen-debug
> **Capture and analyze screen state for debugging agent behavior.**
## Prerequisites
- `screencapture` available (macOS built-in)
- `WindowManager` class available in `agent_controller.py`
## Steps
1. **Declare capture**
- Log: `[ScreenDebug] Capturing screen for debugging at {timestamp}`
- Purpose: "debug"
- This satisfies Rule 00: No stealth capture
2. **Capture all windows**
- For each window index 0-3:
- `WindowManager.capture_window_screenshot(window_index)`
- Save path to list
3. **Capture full screen**
- `screencapture -x /tmp/screen_debug_{timestamp}.png`
4. **OCR each window**
- Run `_ocr_screenshot()` on each capture
- Log OCR quality score and first 200 chars
5. **Run vision model (if OCR quality < 30)**
- Use `ollama.vision()` as fallback
- Log vision model response
6. **Analyze agent state**
- Log: which agents are alive (`thread.is_alive()`)
- Log: last output timestamp for each agent
- Log: message bus recent messages
7. **Write report**
- Save analysis to `/tmp/screen_debug_{timestamp}.md`
- Include: screenshot paths, OCR text, agent states, bus messages
8. **Write receipt**
- Artifact: debug report
- Use `/create-receipt` workflow
|