fabro/graph.fabro
Fabro fb8d5a272d init run
⚒️ Generated with [Fabro](https://fabro.sh)
2026-06-04 14:04:26 -04:00

102 lines
3.4 KiB
Text

digraph SolitaireFast {
graph [
goal="Quickly build a terminal-based Klondike solitaire game in Python with a curses TUI",
rankdir=LR,
default_max_retries=2,
retry_target="implement_app"
]
start [shape=Mdiamond, label="Start"]
exit [shape=Msquare, label="Exit"]
plan_app [
label="Plan App",
shape=box,
prompt="Goal: $goal
Create a concise implementation plan for a Python Klondike solitaire TUI.
Hard requirements:
- Put all app files under solitaire-app/.
- Use Python 3.11+ and standard-library curses for the playable UI.
- Implement draw-one Klondike: tableau, foundations, stock, waste, legal moves, draw/recycle, undo, and win detection.
- Include pytest tests for game rules.
- Include `python3 main.py --smoke` for non-interactive demo verification.
Write the plan to .ai/solitaire-fast-plan.md.
Write status.json at workspace root: outcome=succeeded if the plan is complete, outcome=failed with failure_reason otherwise."
]
implement_app [
label="Implement App",
shape=box,
class="hard",
max_retries=2,
prompt="Read .ai/solitaire-fast-plan.md.
Build the complete app under solitaire-app/ in one focused pass:
- pyproject.toml
- main.py
- src/solitaire_tui/ package
- tests/ package
- README.md
Implement:
- Card, deck, pile, and GameState types
- Initial Klondike deal
- Move validation and execution
- Stock/waste draw and recycle
- Undo
- Win detection
- Curses UI with board rendering, keyboard navigation, help, new game, and quit
- --smoke mode that imports the app, creates a game, renders a text snapshot or summary, and exits without curses interaction
Run:
cd solitaire-app && python3 -m pytest tests/ -v && python3 -m py_compile main.py src/solitaire_tui/*.py && python3 main.py --smoke
Write status.json at workspace root: outcome=succeeded if the app builds, tests pass, and smoke mode works, outcome=failed with failure_reason otherwise."
]
verify_app [
label="Verify App",
shape=box,
class="verify",
goal_gate=true,
prompt="Verify the completed solitaire app.
Run:
cd solitaire-app && python3 -m pytest tests/ -v && python3 -m py_compile main.py src/solitaire_tui/*.py && python3 main.py --smoke
Check:
- The app is under solitaire-app/
- It uses curses for the interactive TUI
- It implements draw-one Klondike rules
- README.md explains setup, run, tests, and controls
- No generated files are outside solitaire-app/ except .ai/ reports and root status.json
Write findings to .ai/solitaire-fast-verify.md.
Write status.json at workspace root: outcome=succeeded if the app is demo-ready, outcome=failed with specific missing or broken items."
]
fix_app [
label="Fix App",
shape=box,
class="hard",
max_retries=2,
prompt="The fast solitaire verification failed.
Read .ai/solitaire-fast-verify.md and fix the issues in solitaire-app/.
Run:
cd solitaire-app && python3 -m pytest tests/ -v && python3 -m py_compile main.py src/solitaire_tui/*.py && python3 main.py --smoke
Write status.json at workspace root: outcome=succeeded if all issues are fixed, outcome=failed with failure_reason otherwise."
]
start -> plan_app -> implement_app -> verify_app
verify_app -> exit [condition="outcome=succeeded"]
verify_app -> fix_app [condition="outcome=failed", label="Fix"]
verify_app -> fix_app [label="Fallback"]
fix_app -> verify_app
}