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
50
examples/rust-wordcount/README.md
Normal file
50
examples/rust-wordcount/README.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Rust Word Counter
|
||||
|
||||
Liest stdin und gibt die Anzahl der Wörter aus.
|
||||
Zeilen- und Zeichenzählung sowie CLI-Flags fehlen noch.
|
||||
|
||||
## Aktueller Stand
|
||||
|
||||
```
|
||||
src/main.rs count_words() — nur Wortzählung, kein Argument-Parsing
|
||||
Cargo.toml Version 0.1.0
|
||||
```
|
||||
|
||||
## Demo 1: `/optimize` mit Cargo-Test-Integration
|
||||
|
||||
```
|
||||
/optimize "Ergänze --lines (Zeilenzählung) und --chars (Zeichenzählung) als CLI-Flags.
|
||||
Ohne Flag: Standardausgabe wie bisher (Wörter).
|
||||
Schreibe Tests für alle drei Modi." \
|
||||
--test-cmd "cargo test"
|
||||
```
|
||||
|
||||
**Was pi-coder hier zeigt:**
|
||||
- Rust-Toolchain wird automatisch erkannt
|
||||
- `cargo test`-Output geht an den Judge
|
||||
- Mehrere Compile-Test-Fix-Zyklen möglich
|
||||
|
||||
## Demo 2: `/version` nach dem Feature
|
||||
|
||||
**Voraussetzung:** Das Verzeichnis muss ein git-Repo mit mindestens einem Commit sein.
|
||||
Falls noch kein Repo existiert, vorher einmalig:
|
||||
|
||||
```bash
|
||||
git init && git add -A && git commit -m "feat: initial wordcount"
|
||||
git tag v0.1.0
|
||||
```
|
||||
|
||||
```
|
||||
/version
|
||||
```
|
||||
|
||||
Analysiert die Commits seit `v0.1.0`, erkennt `feat:`-Commits → schlägt `minor`-Bump vor
|
||||
und setzt den Git-Tag `v0.2.0`.
|
||||
|
||||
## Manueller Test
|
||||
|
||||
```bash
|
||||
cargo test
|
||||
echo "Hallo Welt" | cargo run
|
||||
echo -e "Zeile 1\nZeile 2" | cargo run -- --lines
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue