feat: Demo-Examples (Python/Rust/Go/C) mit Protokoll-Templates und Restore-Skript
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fb4e96919a
commit
64c2b7f0fd
21 changed files with 614 additions and 0 deletions
51
examples/python-calculator/README.md
Normal file
51
examples/python-calculator/README.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Python Calculator
|
||||
|
||||
Einfacher Taschenrechner mit `add()` und `subtract()`.
|
||||
Multiply, divide, power und Fehlerbehandlung fehlen noch.
|
||||
|
||||
## Aktueller Stand
|
||||
|
||||
```
|
||||
calculator.py add(), subtract()
|
||||
test_calculator.py 5 pytest-Tests (alle grün)
|
||||
```
|
||||
|
||||
## Demo: `/optimize` mit Test-Integration
|
||||
|
||||
```
|
||||
/optimize "Ergänze multiply, divide (wirft ZeroDivisionError bei 0) und power.
|
||||
Schreibe pytest-Tests für alle neuen Funktionen." \
|
||||
--test-cmd "pytest test_calculator.py -v"
|
||||
```
|
||||
|
||||
**Was pi-coder hier zeigt:**
|
||||
- Coder implementiert, committet
|
||||
- Extension führt `pytest` aus und übergibt das Ergebnis an den Judge
|
||||
- Judge bewertet Korrektheit anhand der Testergebnisse
|
||||
- Bei FAIL: Coder fixt, nächste Runde
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
```bash
|
||||
pip install pytest
|
||||
```
|
||||
|
||||
## Weitere Demo-Befehle nach dem `/optimize`-Lauf
|
||||
|
||||
```
|
||||
/quick_check "Sind alle Randfälle (negative Zahlen, floats) korrekt behandelt?"
|
||||
```
|
||||
Schnelle Einzel-Beurteilung ohne neuen Fix-Loop.
|
||||
|
||||
```
|
||||
/update_doku
|
||||
```
|
||||
Lässt den Coder Code-Kommentare ergänzen, README aktualisieren und eine
|
||||
Bedienungsanleitung erzeugen.
|
||||
|
||||
## Manueller Test
|
||||
|
||||
```bash
|
||||
pytest test_calculator.py -v
|
||||
python calculator.py
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue