chore: add Claude tooling and optimize token efficiency
- .claude/scripts/bump.sh: one-command version bump + commit + push - .claude/scripts/new-feature.sh: branch creation helper - .claude/session-context.md: session start context - CLAUDE.md: reduced to dispatch table, no rule duplication - docs/project-structure.md: restructured as dense module reference Version: 0.2.1
This commit is contained in:
41
.claude/scripts/new-feature.sh
Normal file
41
.claude/scripts/new-feature.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# new-feature.sh – Feature- oder Fix-Branch aus develop erstellen und pushen
|
||||
#
|
||||
# Verwendung:
|
||||
# bash .claude/scripts/new-feature.sh feature <name>
|
||||
# bash .claude/scripts/new-feature.sh fix <name>
|
||||
# bash .claude/scripts/new-feature.sh debug <name>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TYPE="${1:-}"
|
||||
NAME="${2:-}"
|
||||
|
||||
if [[ -z "$TYPE" || -z "$NAME" ]]; then
|
||||
echo "Verwendung: bash .claude/scripts/new-feature.sh [feature|fix|debug] <name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$TYPE" in
|
||||
feature|fix|debug) ;;
|
||||
*)
|
||||
echo "Fehler: Ungültiger Typ '$TYPE'. Erlaubt: feature, fix, debug"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
BRANCH="$TYPE/$NAME"
|
||||
ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
# Sicherstellen dass develop aktuell ist
|
||||
echo "Wechsle zu develop und aktualisiere..."
|
||||
git -C "$ROOT" checkout develop
|
||||
git -C "$ROOT" pull origin develop
|
||||
|
||||
# Branch erstellen und pushen
|
||||
echo "Erstelle Branch: $BRANCH"
|
||||
git -C "$ROOT" checkout -b "$BRANCH"
|
||||
git -C "$ROOT" push -u origin "$BRANCH"
|
||||
|
||||
echo "Fertig: Branch '$BRANCH' erstellt und gepusht."
|
||||
echo "Aktiver Branch: $(git -C "$ROOT" branch --show-current)"
|
||||
Reference in New Issue
Block a user