- .claude/agents/planer.md - .claude/workflows/plankritik.js - .vault-tools/plan-kopie/LIESMICH.md - .vault-tools/plan-kopie/mutanten_lauf.py - .vault-tools/plan-kopie/mutanten_lauf_ENTWURF.md - .vault-tools/plan-kopie/mutanten_lauf_kopie.sh - .vault-tools/plan-kopie/mutanten_lauf_treiber.py - .vault-tools/workflow-pruefung/faelle_workflows.mjs - .vault-tools/workflow-pruefung/mutanten_workflows.py - AI/Regelwerk/codeworkflow.md - CLAUDE.md Erzeugt vom PostToolUse-Hook .vault-tools/auto-push/auto_push.py. Co-Authored-By: Claude Opus 5 <[email protected]>
65 lines
2.2 KiB
Bash
65 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Mutantenlauf auf einer Kopie der Kopie, gedacht fuer den Hilfsagenten der Plankritik
|
|
# (.claude/workflows/plankritik.js). Nie in der uebergebenen Kopie selbst arbeiten: Die Linsen
|
|
# fahren dort gleichzeitig Tests, und mutanten_lauf.py setzt Dateien zwischenzeitlich zurueck.
|
|
#
|
|
# Aufruf: bash mutanten_lauf_kopie.sh <kopie als Windows-Pfad> <planordner als Windows-Pfad> <modus>
|
|
# modus ist "voll" oder "muster". Der ganze Lauf ist auf BUDGET_S Sekunden begrenzt (Vorgabe 540),
|
|
# weil das Bash-Werkzeug eines Hilfsagenten nach hoechstens zehn Minuten endet; eine ueberschrittene
|
|
# Grenze meldet die Zeile ZEITGRENZE, die bis dahin gefahrenen Mutanten stehen in der Ausgabe.
|
|
# Beide Pfade sind Windows-Pfade (auch Kurznamen wie PASCAL~1),
|
|
# die dieses Skript selbst mit wslpath in WSL-Pfade umwandelt.
|
|
set -u
|
|
|
|
KOPIE_WIN="${1:-}"
|
|
PLANORDNER_WIN="${2:-}"
|
|
MODUS="${3:-}"
|
|
|
|
if [ -z "$KOPIE_WIN" ] || [ -z "$PLANORDNER_WIN" ] || [ -z "$MODUS" ]; then
|
|
echo "MUTANTEN_LAUF_FEHLER: Aufruf braucht <kopie> <planordner> <modus>"
|
|
exit 2
|
|
fi
|
|
|
|
if [ "$MODUS" != "voll" ] && [ "$MODUS" != "muster" ]; then
|
|
echo "MUTANTEN_LAUF_FEHLER: modus muss voll oder muster sein, nicht $MODUS"
|
|
exit 2
|
|
fi
|
|
BUDGET_S="${BUDGET_S:-540}"
|
|
|
|
KOPIE=$(wslpath -u "$KOPIE_WIN")
|
|
PLANORDNER=$(wslpath -u "$PLANORDNER_WIN")
|
|
|
|
if [ ! -d "$KOPIE" ]; then
|
|
echo "MUTANTEN_LAUF_FEHLER: Kopie fehlt: $KOPIE"
|
|
exit 2
|
|
fi
|
|
if [ ! -d "$PLANORDNER" ]; then
|
|
echo "MUTANTEN_LAUF_FEHLER: Planordner fehlt: $PLANORDNER"
|
|
exit 2
|
|
fi
|
|
|
|
MUTANTEN_TOML="$PLANORDNER/mutanten.toml"
|
|
if [ ! -f "$MUTANTEN_TOML" ]; then
|
|
echo "KEINE_MUTANTEN_TOML"
|
|
exit 0
|
|
fi
|
|
|
|
TMPKOPIE=$(mktemp -d /tmp/plankritik-mut-XXXXXX)
|
|
trap 'rm -rf "$TMPKOPIE"' EXIT
|
|
|
|
cp -a "$KOPIE/." "$TMPKOPIE/"
|
|
find "$TMPKOPIE" -name __pycache__ -type d -prune -exec rm -rf {} +
|
|
|
|
MUSTER_SCHALTER=""
|
|
if [ "$MODUS" = "muster" ]; then
|
|
MUSTER_SCHALTER="--nur-muster"
|
|
fi
|
|
|
|
timeout "$BUDGET_S" python3 /mnt/d/Claude/.vault-tools/plan-kopie/mutanten_lauf.py --wurzel "$TMPKOPIE" --mutanten "$MUTANTEN_TOML" $MUSTER_SCHALTER
|
|
EXITCODE=$?
|
|
if [ "$EXITCODE" -eq 124 ]; then
|
|
echo "ZEITGRENZE: Mutantenlauf nach $BUDGET_S s abgebrochen; Mutanten ohne Zeile oben sind nicht gefahren"
|
|
fi
|
|
echo "EXIT mutanten_lauf: $EXITCODE"
|
|
exit $EXITCODE
|