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
74
examples/README.md
Normal file
74
examples/README.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
# pi-coder Beispielprojekte
|
||||
|
||||
Vier kleine, eigenständige Projekte als Demonstrationsgrundlage für die pi-coder-Features.
|
||||
Jedes Projekt startet bewusst unvollständig — genau der Ausgangspunkt, für den pi-coder gebaut ist.
|
||||
|
||||
## Übersicht
|
||||
|
||||
| Verzeichnis | Sprache | Demonstriert |
|
||||
|---|---|---|
|
||||
| `python-calculator/` | Python | `/optimize` mit `--test-cmd pytest` |
|
||||
| `rust-wordcount/` | Rust | `/optimize` mit `--test-cmd "cargo test"` + `/version` |
|
||||
| `go-fibonacci/` | Go | `/optimize --interactive` + `/continue` + `/shipit` |
|
||||
| `c-linkedlist/` | C | `/quick_check` + `/fix` + `/patch` |
|
||||
|
||||
## Demo-Workflow
|
||||
|
||||
### Schritt 1 — Vorbereitung: Sub-Repos anlegen
|
||||
|
||||
Jedes Example braucht ein eigenes git-Repo, damit pi-coder commit-basierte
|
||||
Features nutzen kann (Loop-Erkennung, Diff-Anzeige, `/version`):
|
||||
|
||||
```bash
|
||||
for dir in python-calculator rust-wordcount go-fibonacci c-linkedlist; do
|
||||
cd examples/$dir
|
||||
git init && git add -A && git commit -m "feat: initial $dir"
|
||||
cd ../..
|
||||
done
|
||||
```
|
||||
|
||||
Für `/version` im rust-wordcount-Beispiel zusätzlich:
|
||||
|
||||
```bash
|
||||
cd examples/rust-wordcount && git tag v0.1.0
|
||||
```
|
||||
|
||||
### Schritt 2 — Demo ausführen
|
||||
|
||||
In pi das jeweilige Unterverzeichnis als Arbeitsverzeichnis öffnen.
|
||||
Die genauen Befehle stehen im README.md des jeweiligen Examples.
|
||||
Zeitmessung: Systemuhr notieren oder Terminal-Kommando `time` nutzen.
|
||||
|
||||
### Schritt 3 — Protokoll ausfüllen
|
||||
|
||||
Jedes Example enthält eine `PROTOKOLL.md`.
|
||||
Startzeit, Endzeit, Rundenanzahl und Endergebnis eintragen.
|
||||
|
||||
### Schritt 4 — Ausgangszustand wiederherstellen
|
||||
|
||||
```bash
|
||||
bash examples/restore-all.sh
|
||||
```
|
||||
|
||||
Das Skript löscht Sub-Repos, restauriert alle Quelldateien aus dem Haupt-Repo
|
||||
und bereinigt Build-Artefakte (`target/`, `__pycache__` etc.).
|
||||
|
||||
---
|
||||
|
||||
## Empfohlene Demo-Reihenfolge
|
||||
|
||||
| # | Beispiel | Geschätzte Dauer | Highlights |
|
||||
|---|---|---|---|
|
||||
| 1 | `python-calculator` | ~5–10 min | Einstieg, Test-Loop |
|
||||
| 2 | `c-linkedlist` | ~5 min | `/quick_check` + `/fix`, kein Loop |
|
||||
| 3 | `rust-wordcount` | ~10–15 min | Loop + `/version` |
|
||||
| 4 | `go-fibonacci` | ~15–20 min | `--interactive` + `/shipit` |
|
||||
|
||||
---
|
||||
|
||||
## Weitere Details
|
||||
|
||||
[python-calculator](python-calculator/README.md) ·
|
||||
[rust-wordcount](rust-wordcount/README.md) ·
|
||||
[go-fibonacci](go-fibonacci/README.md) ·
|
||||
[c-linkedlist](c-linkedlist/README.md)
|
||||
Loading…
Add table
Add a link
Reference in a new issue