@the-bearded-bear/claude-craft 9.2.1 → 9.3.0-next.14ef109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/base/Common/hooks/scripts/block-dangerous-commands.sh +1 -1
- package/Dev/i18n/base/Common/hooks/scripts/guard-network.sh +1 -1
- package/Dev/i18n/base/Common/hooks/scripts/notify-slack.sh +1 -1
- package/Dev/i18n/base/Common/hooks/scripts/output-filter.sh +2 -2
- package/Dev/i18n/base/Common/hooks/scripts/output-size-hint.sh +3 -3
- package/Dev/i18n/base/Common/hooks/scripts/post-edit-lint.sh +3 -3
- package/Dev/i18n/base/Common/hooks/scripts/post-tool-failure.sh +2 -2
- package/Dev/i18n/base/Common/hooks/scripts/pre-commit-check.sh +7 -7
- package/Dev/i18n/base/Common/hooks/scripts/pre-compact.sh +8 -8
- package/Dev/i18n/base/Common/hooks/scripts/protect-sensitive-files.sh +2 -2
- package/Dev/i18n/base/Common/hooks/scripts/quality-gate.sh +10 -10
- package/Dev/i18n/base/Common/hooks/scripts/session-end.sh +3 -3
- package/Dev/i18n/base/Common/hooks/scripts/session-init.sh +8 -8
- package/Dev/i18n/de/Workflow/commands/start.md +1 -1
- package/Dev/i18n/en/Workflow/commands/start.md +1 -1
- package/Dev/i18n/es/Workflow/commands/start.md +1 -1
- package/Dev/i18n/fr/Workflow/commands/start.md +1 -1
- package/Dev/i18n/pt/Workflow/commands/start.md +1 -1
- package/Dev/scripts/lib/install-tech-common.sh +39 -39
- package/Dev/scripts/tcl-common.sh +23 -23
- package/Infra/install-ansible-rules.sh +26 -26
- package/Infra/install-coolify-rules.sh +26 -26
- package/Infra/install-docker-rules.sh +26 -26
- package/Infra/install-frankenphp-rules.sh +26 -26
- package/Infra/install-hcloud-rules.sh +26 -26
- package/Infra/install-kubernetes-rules.sh +26 -26
- package/Infra/install-opentofu-rules.sh +26 -26
- package/Infra/install-pgbouncer-rules.sh +26 -26
- package/Project/i18n/de/templates/sprint-status.md +4 -0
- package/Project/i18n/en/templates/sprint-status.md +4 -0
- package/Project/i18n/es/templates/sprint-status.md +4 -0
- package/Project/i18n/fr/templates/sprint-status.md +4 -0
- package/Project/i18n/pt/templates/sprint-status.md +4 -0
- package/Project/install-project-commands.sh +9 -9
- package/Project/templates/sprint-status.yaml.template +4 -0
- package/README.md +13 -1
- package/Tools/ProjectConfig/claude-projects.sh +2 -2
- package/Tools/RTK/install-rtk.sh +1 -1
- package/Tools/Ralph/hooks/lib/ralph-common.sh +3 -3
- package/Tools/Ralph/hooks/pre-tool-context.sh +2 -2
- package/Tools/Ralph/hooks/session-restore.sh +8 -8
- package/Tools/Ralph/hooks/stop-dod-gate.sh +6 -6
- package/Tools/Ralph/lib/metrics-exporter.sh +3 -3
- package/Tools/Ralph/lib/parallel-manager.sh +1 -1
- package/Tools/Ralph/lib/recovery-engine.sh +2 -1
- package/Tools/Ralph/lib/sprint-conductor.sh +20 -7
- package/bundles/cursor/.cursorrules +1 -1
- package/bundles/windsurf/.windsurfrules +1 -1
- package/cli/kanban/client/dist/assets/{BurndownView-B6D7QRcK.css → BurndownView-CnsZ1jie.css} +1 -1
- package/cli/kanban/client/dist/assets/BurndownView-s2wpjiqE.js +3 -0
- package/cli/kanban/client/dist/assets/DepsView-Bo8sRS7i.js +1 -0
- package/cli/kanban/client/dist/assets/DocsView-QjjjfhpV.js +1 -0
- package/cli/kanban/client/dist/assets/SprintsView-B4toxGc4.css +1 -0
- package/cli/kanban/client/dist/assets/SprintsView-BSh9XshU.js +1 -0
- package/cli/kanban/client/dist/assets/actions-D0g4C88h.js +2 -0
- package/cli/kanban/client/dist/assets/de-CpCArOVg.js +1 -0
- package/cli/kanban/client/dist/assets/es-CnARpMvm.js +1 -0
- package/cli/kanban/client/dist/assets/fr-CIeAvktE.js +1 -0
- package/cli/kanban/client/dist/assets/index-BimcLpOz.css +1 -0
- package/cli/kanban/client/dist/assets/index-CdlYlxD5.js +2 -0
- package/cli/kanban/client/dist/assets/palette.svelte-BymgBiMI.js +1 -0
- package/cli/kanban/client/dist/assets/pt-Cs89lHuV.js +1 -0
- package/cli/kanban/client/dist/assets/router.svelte-CKx0fx-k.js +1 -0
- package/cli/kanban/client/dist/index.html +4 -2
- package/cli/kanban/client/src/App.svelte +212 -105
- package/cli/kanban/client/src/app.css +234 -62
- package/cli/kanban/client/src/components/Avatar.svelte +6 -4
- package/cli/kanban/client/src/components/CapacityBar.svelte +57 -0
- package/cli/kanban/client/src/components/CloseSprintDialog.svelte +114 -0
- package/cli/kanban/client/src/components/ConfirmDialog.svelte +125 -0
- package/cli/kanban/client/src/components/FilterBar.svelte +179 -0
- package/cli/kanban/client/src/components/KeyboardShortcuts.svelte +16 -0
- package/cli/kanban/client/src/components/MoveMenu.svelte +42 -0
- package/cli/kanban/client/src/components/NotFound.svelte +10 -0
- package/cli/kanban/client/src/components/Points.svelte +8 -2
- package/cli/kanban/client/src/components/PriorityChip.svelte +4 -1
- package/cli/kanban/client/src/components/ProgressRing.svelte +7 -4
- package/cli/kanban/client/src/components/PromptDialog.svelte +95 -54
- package/cli/kanban/client/src/components/SprintForm.svelte +189 -0
- package/cli/kanban/client/src/components/StoryCreateDialog.svelte +133 -0
- package/cli/kanban/client/src/components/StoryDetail.svelte +744 -76
- package/cli/kanban/client/src/components/StoryForm.svelte +340 -0
- package/cli/kanban/client/src/components/StoryRow.svelte +45 -0
- package/cli/kanban/client/src/components/TaskProgress.svelte +4 -2
- package/cli/kanban/client/src/components/TddPip.svelte +10 -8
- package/cli/kanban/client/src/components/Toasts.svelte +52 -0
- package/cli/kanban/client/src/components/TweaksPanel.svelte +86 -32
- package/cli/kanban/client/src/components/WipSettings.svelte +130 -0
- package/cli/kanban/client/src/lib/actions.js +49 -0
- package/cli/kanban/client/src/lib/announce.js +28 -0
- package/cli/kanban/client/src/lib/api.js +77 -0
- package/cli/kanban/client/src/lib/backlog.js +38 -4
- package/cli/kanban/client/src/lib/board-card.js +50 -0
- package/cli/kanban/client/src/lib/board-nav.js +111 -0
- package/cli/kanban/client/src/lib/burndown.js +15 -0
- package/cli/kanban/client/src/lib/config.js +8 -0
- package/cli/kanban/client/src/lib/deps-style.js +5 -2
- package/cli/kanban/client/src/lib/deps-table.js +51 -0
- package/cli/kanban/client/src/lib/detail.svelte.js +31 -23
- package/cli/kanban/client/src/lib/docs-tree.js +30 -0
- package/cli/kanban/client/src/lib/events.js +73 -8
- package/cli/kanban/client/src/lib/filter.js +68 -0
- package/cli/kanban/client/src/lib/health.svelte.js +19 -0
- package/cli/kanban/client/src/lib/i18n/index.svelte.js +73 -0
- package/cli/kanban/client/src/lib/i18n/locales/de.js +587 -0
- package/cli/kanban/client/src/lib/i18n/locales/en.js +588 -0
- package/cli/kanban/client/src/lib/i18n/locales/es.js +584 -0
- package/cli/kanban/client/src/lib/i18n/locales/fr.js +584 -0
- package/cli/kanban/client/src/lib/i18n/locales/pt.js +583 -0
- package/cli/kanban/client/src/lib/i18n/translate.js +86 -0
- package/cli/kanban/client/src/lib/icons.js +0 -5
- package/cli/kanban/client/src/lib/leave-guard.js +29 -0
- package/cli/kanban/client/src/lib/markdown.js +99 -0
- package/cli/kanban/client/src/lib/opener.js +12 -0
- package/cli/kanban/client/src/lib/optimistic.js +44 -0
- package/cli/kanban/client/src/lib/palette.svelte.js +10 -0
- package/cli/kanban/client/src/lib/points.js +6 -0
- package/cli/kanban/client/src/lib/query.js +92 -0
- package/cli/kanban/client/src/lib/router.svelte.js +70 -11
- package/cli/kanban/client/src/lib/shell.js +56 -0
- package/cli/kanban/client/src/lib/sprint-actions.svelte.js +151 -0
- package/cli/kanban/client/src/lib/sprint-plan.js +141 -0
- package/cli/kanban/client/src/lib/sprints.js +38 -1
- package/cli/kanban/client/src/lib/store.svelte.js +195 -78
- package/cli/kanban/client/src/lib/story-actions.svelte.js +236 -0
- package/cli/kanban/client/src/lib/story-form.js +205 -0
- package/cli/kanban/client/src/lib/toasts.js +84 -0
- package/cli/kanban/client/src/lib/tweaks.svelte.js +6 -9
- package/cli/kanban/client/src/lib/velocity.js +35 -0
- package/cli/kanban/client/src/lib/wip.js +17 -0
- package/cli/kanban/client/src/views/BacklogView.svelte +206 -91
- package/cli/kanban/client/src/views/BurndownView.svelte +203 -104
- package/cli/kanban/client/src/views/DepsView.svelte +176 -100
- package/cli/kanban/client/src/views/DocsView.svelte +170 -122
- package/cli/kanban/client/src/views/KanbanView.svelte +377 -356
- package/cli/kanban/client/src/views/SprintsView.svelte +313 -179
- package/cli/kanban/client/src/views.css +1518 -305
- package/cli/kanban/server/app.js +38 -241
- package/cli/kanban/server/cli-options.js +58 -0
- package/cli/kanban/server/middleware/security.js +28 -2
- package/cli/kanban/server/routes/http-errors.js +55 -0
- package/cli/kanban/server/routes/settings.js +24 -0
- package/cli/kanban/server/routes/sprints.js +364 -0
- package/cli/kanban/server/routes/stories.js +565 -0
- package/cli/kanban/server/services/event-bus.js +3 -2
- package/cli/kanban/server/services/file-scanner.js +2 -1
- package/cli/kanban/server/services/file-watcher.js +27 -10
- package/cli/kanban/server/services/file-writer.js +12 -58
- package/cli/kanban/server/services/frontmatter.js +44 -6
- package/cli/kanban/server/services/idempotency.js +77 -0
- package/cli/kanban/server/services/kanban-config.js +122 -0
- package/cli/kanban/server/services/lock.js +138 -0
- package/cli/kanban/server/services/markdown-metadata.js +27 -13
- package/cli/kanban/server/services/repository.js +268 -165
- package/cli/kanban/server/services/sprint-cache.js +24 -136
- package/cli/kanban/server/services/sprint-ops.js +223 -0
- package/cli/kanban/server/services/state-machine.js +8 -11
- package/cli/kanban/server/services/status-store.js +385 -0
- package/cli/kanban/server/services/story-files.js +282 -0
- package/cli/kanban/shared/ids.js +42 -0
- package/cli/kanban/shared/schemas.js +106 -12
- package/cli/kanban/shared/transitions.js +25 -0
- package/cli/lib/doctor.js +4 -4
- package/cli/lib/installer.js +2 -2
- package/cli/lib/kanban.js +11 -7
- package/package.json +2 -1
- package/cli/kanban/client/dist/assets/BurndownView-BBl1LOfu.js +0 -3
- package/cli/kanban/client/dist/assets/DepsView-D0N9Tg4d.css +0 -1
- package/cli/kanban/client/dist/assets/DepsView-DXREli3v.js +0 -1
- package/cli/kanban/client/dist/assets/DocsView--bhcgCS3.js +0 -1
- package/cli/kanban/client/dist/assets/DocsView-CBBzt7Ru.css +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-8AMci9M2.css +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-CLKf2BTm.js +0 -1
- package/cli/kanban/client/dist/assets/index-DI89vrQ2.js +0 -4
- package/cli/kanban/client/dist/assets/index-DRj2q7mf.css +0 -1
- package/cli/kanban/client/src/lib/kanban-nav.js +0 -119
|
@@ -13,7 +13,7 @@ set -u
|
|
|
13
13
|
hook_require_parser
|
|
14
14
|
hook_input
|
|
15
15
|
CMD=$(hook_get tool_input.command)
|
|
16
|
-
[ -n "$CMD" ] || exit 0
|
|
16
|
+
[[ -n "$CMD" ]] || exit 0
|
|
17
17
|
|
|
18
18
|
# Corps de heredoc retirés, puis un segment par ligne (hook_shell_segments) : le texte
|
|
19
19
|
# cité est une donnée, sauf après sh -c / eval et dans $(…) / `…`. Un segment "|"
|
|
@@ -11,10 +11,10 @@ hook_has_parser || exit 0
|
|
|
11
11
|
hook_input
|
|
12
12
|
OUT=$(hook_get tool_response.stdout)
|
|
13
13
|
LEN=${#OUT}
|
|
14
|
-
[ "$LEN" -gt 50000 ] || exit 0
|
|
14
|
+
[[ "$LEN" -gt 50000 ]] || exit 0
|
|
15
15
|
|
|
16
16
|
INTERRUPTED=false
|
|
17
|
-
[ "$(hook_get tool_response.interrupted)" != true ] || INTERRUPTED=true
|
|
17
|
+
[[ "$(hook_get tool_response.interrupted)" != true ]] || INTERRUPTED=true
|
|
18
18
|
HEAD=$(printf '%s' "$OUT" | head -c 8000)
|
|
19
19
|
hook_replace_bash_output \
|
|
20
20
|
"[output truncated by the output-filter hook: ${LEN} chars total, first 8000 shown. Re-run with a narrower command (grep/head/tail) to see more.]
|
|
@@ -8,12 +8,12 @@ set -u
|
|
|
8
8
|
hook_has_parser || exit 0
|
|
9
9
|
hook_input
|
|
10
10
|
OUT=$(hook_get tool_response.stdout)
|
|
11
|
-
[ -n "$OUT" ] || OUT=$(hook_get tool_response)
|
|
11
|
+
[[ -n "$OUT" ]] || OUT=$(hook_get tool_response)
|
|
12
12
|
LEN=${#OUT}
|
|
13
13
|
|
|
14
|
-
if [ "$LEN" -gt 50000 ]; then
|
|
14
|
+
if [[ "$LEN" -gt 50000 ]]; then
|
|
15
15
|
hook_context PostToolUse "Output very large (${LEN} chars). Summarize key findings only; do not repeat output verbatim."
|
|
16
|
-
elif [ "$(hook_get tool_name)" = "Bash" ] && [ "$LEN" -gt 10000 ]; then
|
|
16
|
+
elif [[ "$(hook_get tool_name)" = "Bash" ]] && [[ "$LEN" -gt 10000 ]]; then
|
|
17
17
|
hook_context PostToolUse "Output: $(printf '%s\n' "$OUT" | wc -l | tr -d ' ') lines. Extract only relevant information."
|
|
18
18
|
fi
|
|
19
19
|
exit 0
|
|
@@ -8,18 +8,18 @@ set -u
|
|
|
8
8
|
hook_has_parser || exit 0
|
|
9
9
|
hook_input
|
|
10
10
|
FILE_PATH=$(hook_get tool_input.file_path)
|
|
11
|
-
[ -n "$FILE_PATH" ] || exit 0
|
|
11
|
+
[[ -n "$FILE_PATH" ]] || exit 0
|
|
12
12
|
|
|
13
13
|
have() { command -v "$1" >/dev/null 2>&1; }
|
|
14
14
|
|
|
15
15
|
case "${FILE_PATH##*.}" in
|
|
16
16
|
js | jsx | ts | tsx)
|
|
17
|
-
if have npx && [ -f package.json ]; then npx --no-install eslint --fix "$FILE_PATH" >/dev/null 2>&1 || true; fi
|
|
17
|
+
if have npx && [[ -f package.json ]]; then npx --no-install eslint --fix "$FILE_PATH" >/dev/null 2>&1 || true; fi
|
|
18
18
|
;;
|
|
19
19
|
php)
|
|
20
20
|
if have php-cs-fixer; then
|
|
21
21
|
php-cs-fixer fix "$FILE_PATH" --quiet >/dev/null 2>&1 || true
|
|
22
|
-
elif [ -x vendor/bin/php-cs-fixer ]; then
|
|
22
|
+
elif [[ -x vendor/bin/php-cs-fixer ]]; then
|
|
23
23
|
vendor/bin/php-cs-fixer fix "$FILE_PATH" --quiet >/dev/null 2>&1 || true
|
|
24
24
|
fi
|
|
25
25
|
;;
|
|
@@ -12,7 +12,7 @@ hook_input
|
|
|
12
12
|
TOOL=$(hook_get tool_name)
|
|
13
13
|
ERROR=$(hook_get error)
|
|
14
14
|
CWD=$(hook_get cwd)
|
|
15
|
-
[ -z "$CWD" ] || cd "$CWD" 2>/dev/null || true
|
|
15
|
+
[[ -z "$CWD" ]] || cd "$CWD" 2>/dev/null || true
|
|
16
16
|
|
|
17
17
|
has() { printf '%s' "$ERROR" | grep -qiE -e "$1"; }
|
|
18
18
|
|
|
@@ -46,5 +46,5 @@ printf '[%s] [%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$severity" "$TOOL
|
|
|
46
46
|
"$(printf '%s' "$ERROR" | tr '\n' ' ' | cut -c1-300)" >>.claude/logs/tool-failures.log 2>/dev/null
|
|
47
47
|
|
|
48
48
|
HINT=$(recovery_hint)
|
|
49
|
-
[ -z "$HINT" ] || hook_context PostToolUseFailure "$HINT"
|
|
49
|
+
[[ -z "$HINT" ]] || hook_context PostToolUseFailure "$HINT"
|
|
50
50
|
exit 0
|
|
@@ -12,9 +12,9 @@ set -u
|
|
|
12
12
|
hook_require_parser
|
|
13
13
|
hook_input
|
|
14
14
|
CMD=$(hook_get tool_input.command)
|
|
15
|
-
[ -n "$CMD" ] || exit 0
|
|
15
|
+
[[ -n "$CMD" ]] || exit 0
|
|
16
16
|
cwd=$(hook_get cwd)
|
|
17
|
-
[ -z "$cwd" ] || cd "$cwd" 2>/dev/null || exit 0
|
|
17
|
+
[[ -z "$cwd" ]] || cd "$cwd" 2>/dev/null || exit 0
|
|
18
18
|
|
|
19
19
|
# Lignes émises : `commit`, `all` (commit -a), `add` (git add), `dir <chemin>` (git -C).
|
|
20
20
|
facts=$(printf '%s\n' "$CMD" | hook_strip_heredocs | tr "'\"" ' ' | awk '
|
|
@@ -41,7 +41,7 @@ facts=$(printf '%s\n' "$CMD" | hook_strip_heredocs | tr "'\"" ' ' | awk '
|
|
|
41
41
|
case "$facts" in *commit*) ;; *) exit 0 ;; esac
|
|
42
42
|
|
|
43
43
|
dir=$(printf '%s\n' "$facts" | sed -n 's/^dir //p' | head -n 1)
|
|
44
|
-
[ -z "$dir" ] || cd "$dir" 2>/dev/null || exit 0
|
|
44
|
+
[[ -z "$dir" ]] || cd "$dir" 2>/dev/null || exit 0
|
|
45
45
|
top=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0
|
|
46
46
|
cd "$top" || exit 0
|
|
47
47
|
|
|
@@ -50,19 +50,19 @@ if printf '%s\n' "$facts" | grep -qxE 'add|all'; then
|
|
|
50
50
|
files=$(printf '%s\n%s\n%s\n' "$files" "$(git diff --name-only HEAD 2>/dev/null)" "$(git ls-files -o --exclude-standard 2>/dev/null)")
|
|
51
51
|
fi
|
|
52
52
|
files=$(printf '%s\n' "$files" | sed '/^$/d' | sort -u)
|
|
53
|
-
[ -n "$files" ] || exit 0
|
|
53
|
+
[[ -n "$files" ]] || exit 0
|
|
54
54
|
|
|
55
55
|
existing=()
|
|
56
56
|
while IFS= read -r f; do
|
|
57
57
|
if is_sensitive_path "$f"; then hook_block "Attempting to commit a sensitive file: $f"; fi
|
|
58
|
-
[ -f "$f" ] && existing+=("$f")
|
|
58
|
+
[[ -f "$f" ]] && existing+=("$f")
|
|
59
59
|
done <<EOF
|
|
60
60
|
$files
|
|
61
61
|
EOF
|
|
62
|
-
[ ${#existing[@]} -gt 0 ] || exit 0
|
|
62
|
+
[[ ${#existing[@]} -gt 0 ]] || exit 0
|
|
63
63
|
|
|
64
64
|
for p in '-----BEGIN [A-Z ]*PRIVATE KEY-----' 'AKIA[0-9A-Z]{16}' 'ghp_[A-Za-z0-9]{36}' 'xox[baprs]-[A-Za-z0-9-]{10,}'; do
|
|
65
65
|
hit=$(grep -lIE -e "$p" -- "${existing[@]}" 2>/dev/null | head -n 1)
|
|
66
|
-
[ -z "$hit" ] || hook_block "Potential secret detected in $hit"
|
|
66
|
+
[[ -z "$hit" ]] || hook_block "Potential secret detected in $hit"
|
|
67
67
|
done
|
|
68
68
|
exit 0
|
|
@@ -11,7 +11,7 @@ set -u
|
|
|
11
11
|
hook_has_parser || exit 0
|
|
12
12
|
hook_input
|
|
13
13
|
CWD=$(hook_get cwd)
|
|
14
|
-
[ -z "$CWD" ] || cd "$CWD" 2>/dev/null || true
|
|
14
|
+
[[ -z "$CWD" ]] || cd "$CWD" 2>/dev/null || true
|
|
15
15
|
SESSION_ID=$(hook_get session_id)
|
|
16
16
|
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
17
17
|
STAMP=$(date -u +%Y%m%d%H%M%S)
|
|
@@ -28,25 +28,25 @@ prune() {
|
|
|
28
28
|
local f i=0
|
|
29
29
|
while IFS= read -r f; do
|
|
30
30
|
i=$((i + 1))
|
|
31
|
-
[ "$i" -le 10 ] || rm -f "$f"
|
|
31
|
+
[[ "$i" -le 10 ]] || rm -f "$f"
|
|
32
32
|
done < <(ls -t "$1"/*.yaml 2>/dev/null)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
log "Context compaction triggered (session: ${SESSION_ID:-unknown})"
|
|
36
36
|
SAVED=""
|
|
37
|
-
if [ -f .bmad/sprint-status.yaml ]; then
|
|
37
|
+
if [[ -f .bmad/sprint-status.yaml ]]; then
|
|
38
38
|
backup .bmad/sprint-status.yaml .bmad/backups sprint-status && SAVED="$SAVED .bmad/sprint-status.yaml"
|
|
39
39
|
fi
|
|
40
|
-
if [ -f .bmad/current-story.yaml ]; then
|
|
40
|
+
if [[ -f .bmad/current-story.yaml ]]; then
|
|
41
41
|
backup .bmad/current-story.yaml .bmad/backups current-story && SAVED="$SAVED .bmad/current-story.yaml"
|
|
42
42
|
fi
|
|
43
|
-
if [ -d .recette/sessions ]; then
|
|
43
|
+
if [[ -d .recette/sessions ]]; then
|
|
44
44
|
ACTIVE=$(find .recette/sessions -name '*.yaml' -mmin -60 2>/dev/null | head -n 1)
|
|
45
|
-
[ -z "$ACTIVE" ] || backup "$ACTIVE" .recette/backups "$(basename "$ACTIVE" .yaml)"
|
|
45
|
+
[[ -z "$ACTIVE" ]] || backup "$ACTIVE" .recette/backups "$(basename "$ACTIVE" .yaml)"
|
|
46
46
|
fi
|
|
47
47
|
for d in .bmad/backups .recette/backups; do
|
|
48
|
-
[ ! -d "$d" ] || prune "$d"
|
|
48
|
+
[[ ! -d "$d" ]] || prune "$d"
|
|
49
49
|
done
|
|
50
50
|
|
|
51
|
-
[ -z "$SAVED" ] || printf 'When compacting, keep the current BMAD sprint and story context (backed up:%s).\n' "$SAVED"
|
|
51
|
+
[[ -z "$SAVED" ]] || printf 'When compacting, keep the current BMAD sprint and story context (backed up:%s).\n' "$SAVED"
|
|
52
52
|
exit 0
|
|
@@ -8,9 +8,9 @@ set -u
|
|
|
8
8
|
hook_require_parser
|
|
9
9
|
hook_input
|
|
10
10
|
FILE=$(hook_get tool_input.file_path)
|
|
11
|
-
[ -n "$FILE" ] || FILE=$(hook_get tool_input.notebook_path)
|
|
11
|
+
[[ -n "$FILE" ]] || FILE=$(hook_get tool_input.notebook_path)
|
|
12
12
|
|
|
13
|
-
if [ -n "$FILE" ] && is_sensitive_path "$FILE"; then
|
|
13
|
+
if [[ -n "$FILE" ]] && is_sensitive_path "$FILE"; then
|
|
14
14
|
hook_block "Cannot modify sensitive file: $FILE"
|
|
15
15
|
fi
|
|
16
16
|
exit 0
|
|
@@ -11,29 +11,29 @@ set -u
|
|
|
11
11
|
|
|
12
12
|
hook_has_parser || exit 0
|
|
13
13
|
hook_input
|
|
14
|
-
[ "$(hook_get stop_hook_active)" = "true" ] && exit 0
|
|
14
|
+
[[ "$(hook_get stop_hook_active)" = "true" ]] && exit 0
|
|
15
15
|
cwd=$(hook_get cwd)
|
|
16
|
-
[ -z "$cwd" ] || cd "$cwd" 2>/dev/null || exit 0
|
|
16
|
+
[[ -z "$cwd" ]] || cd "$cwd" 2>/dev/null || exit 0
|
|
17
17
|
|
|
18
18
|
# Commande de test du projet (vide si aucun framework détecté).
|
|
19
19
|
detect_cmd() {
|
|
20
|
-
if [ -n "${QUALITY_GATE_CMD:-}" ]; then printf '%s' "$QUALITY_GATE_CMD"; return; fi
|
|
21
|
-
if [ -f package.json ]; then
|
|
20
|
+
if [[ -n "${QUALITY_GATE_CMD:-}" ]]; then printf '%s' "$QUALITY_GATE_CMD"; return; fi
|
|
21
|
+
if [[ -f package.json ]]; then
|
|
22
22
|
local saved=$HOOK_INPUT script
|
|
23
23
|
HOOK_INPUT=$(cat package.json)
|
|
24
24
|
script=$(hook_get scripts.test)
|
|
25
25
|
HOOK_INPUT=$saved
|
|
26
26
|
case "$script" in "" | *"no test specified"*) ;; *) printf 'npm test'; return ;; esac
|
|
27
27
|
fi
|
|
28
|
-
if [ -f composer.json ] && [ -x vendor/bin/phpunit ]; then printf 'vendor/bin/phpunit'
|
|
29
|
-
elif { [ -f pyproject.toml ] || [ -f setup.py ]; } && command -v pytest >/dev/null 2>&1; then printf 'pytest -q'
|
|
30
|
-
elif [ -f pubspec.yaml ] && command -v flutter >/dev/null 2>&1; then printf 'flutter test'
|
|
31
|
-
elif [ -f go.mod ] && command -v go >/dev/null 2>&1; then printf 'go test ./...'
|
|
28
|
+
if [[ -f composer.json ]] && [[ -x vendor/bin/phpunit ]]; then printf 'vendor/bin/phpunit'
|
|
29
|
+
elif { [[ -f pyproject.toml ]] || [[ -f setup.py ]]; } && command -v pytest >/dev/null 2>&1; then printf 'pytest -q'
|
|
30
|
+
elif [[ -f pubspec.yaml ]] && command -v flutter >/dev/null 2>&1; then printf 'flutter test'
|
|
31
|
+
elif [[ -f go.mod ]] && command -v go >/dev/null 2>&1; then printf 'go test ./...'
|
|
32
32
|
fi
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
cmd=$(detect_cmd)
|
|
36
|
-
[ -n "$cmd" ] || exit 0
|
|
36
|
+
[[ -n "$cmd" ]] || exit 0
|
|
37
37
|
|
|
38
38
|
# Empreinte de l'arbre de travail (hors journaux) : vide hors dépôt git => pas de cache.
|
|
39
39
|
fingerprint=""
|
|
@@ -41,7 +41,7 @@ if git rev-parse --git-dir >/dev/null 2>&1; then
|
|
|
41
41
|
fingerprint=$({ git status --porcelain -- . ':!.claude/logs'; git diff HEAD -- . ':!.claude/logs'; } 2>/dev/null | cksum)
|
|
42
42
|
fi
|
|
43
43
|
ok_file=.claude/logs/quality-gate.ok
|
|
44
|
-
if [ -n "$fingerprint" ] && [ -f "$ok_file" ] && [ "$(cat "$ok_file")" = "$fingerprint" ]; then
|
|
44
|
+
if [[ -n "$fingerprint" ]] && [[ -f "$ok_file" ]] && [[ "$(cat "$ok_file")" = "$fingerprint" ]]; then
|
|
45
45
|
exit 0
|
|
46
46
|
fi
|
|
47
47
|
|
|
@@ -9,7 +9,7 @@ set -u
|
|
|
9
9
|
hook_has_parser || exit 0
|
|
10
10
|
hook_input
|
|
11
11
|
CWD=$(hook_get cwd)
|
|
12
|
-
[ -z "$CWD" ] || cd "$CWD" 2>/dev/null || true
|
|
12
|
+
[[ -z "$CWD" ]] || cd "$CWD" 2>/dev/null || true
|
|
13
13
|
SESSION_ID=$(hook_get session_id)
|
|
14
14
|
REASON=$(hook_get reason)
|
|
15
15
|
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
@@ -24,13 +24,13 @@ FILES=$(git status --porcelain -- . ':!.claude' 2>/dev/null | wc -l | tr -d ' ')
|
|
|
24
24
|
|
|
25
25
|
# Échecs d'outils du jour ; `|| true` : grep -c affiche déjà 0 et sort en 1 sans correspondance.
|
|
26
26
|
FAILURES=0
|
|
27
|
-
if [ -f .claude/logs/tool-failures.log ]; then
|
|
27
|
+
if [[ -f .claude/logs/tool-failures.log ]]; then
|
|
28
28
|
FAILURES=$(grep -c "^\[$(date -u +%Y-%m-%d)" .claude/logs/tool-failures.log) || true
|
|
29
29
|
fi
|
|
30
30
|
|
|
31
31
|
STORY=none
|
|
32
32
|
STATUS=unknown
|
|
33
|
-
if [ -f .bmad/current-story.yaml ]; then
|
|
33
|
+
if [[ -f .bmad/current-story.yaml ]]; then
|
|
34
34
|
STORY=$(grep '^id:' .bmad/current-story.yaml | head -n 1 | cut -d' ' -f2) || true
|
|
35
35
|
STATUS=$(grep '^status:' .bmad/current-story.yaml | head -n 1 | cut -d' ' -f2) || true
|
|
36
36
|
fi
|
|
@@ -9,12 +9,12 @@ set -u
|
|
|
9
9
|
hook_has_parser || exit 0
|
|
10
10
|
hook_input
|
|
11
11
|
CWD=$(hook_get cwd)
|
|
12
|
-
[ -z "$CWD" ] || cd "$CWD" 2>/dev/null || true
|
|
12
|
+
[[ -z "$CWD" ]] || cd "$CWD" 2>/dev/null || true
|
|
13
13
|
|
|
14
14
|
# Variables sûres de .env.local, au format `export NAME=valeur`. Valeurs limitées à
|
|
15
15
|
# [A-Za-z0-9_.:/-] : CLAUDE_ENV_FILE est sourcé par le shell, pas de métacaractères.
|
|
16
16
|
# DATABASE_URL est exclue (identifiants possibles) ; commentaires et lignes vides ignorés.
|
|
17
|
-
if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -f .env.local ]; then
|
|
17
|
+
if [[ -n "${CLAUDE_ENV_FILE:-}" ]] && [[ -f .env.local ]]; then
|
|
18
18
|
sed -n -E 's#^(NODE_ENV|APP_ENV|APP_DEBUG|DATABASE_HOST|DATABASE_PORT|LOG_LEVEL|PORT|HOST)=([A-Za-z0-9_.:/-]*)$#export \1=\2#p' \
|
|
19
19
|
.env.local >>"$CLAUDE_ENV_FILE" 2>/dev/null
|
|
20
20
|
fi
|
|
@@ -29,18 +29,18 @@ json_field() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
CONTEXT=""
|
|
32
|
-
add() { [ -z "$2" ] || CONTEXT="$CONTEXT$1 $2, "; }
|
|
32
|
+
add() { [[ -z "$2" ]] || CONTEXT="$CONTEXT$1 $2, "; }
|
|
33
33
|
|
|
34
|
-
if [ -f composer.json ]; then
|
|
34
|
+
if [[ -f composer.json ]]; then
|
|
35
35
|
add Symfony "$(json_field composer.json 'require.symfony/framework-bundle')"
|
|
36
36
|
add PHP "$(json_field composer.json require.php)"
|
|
37
37
|
fi
|
|
38
|
-
if [ -f package.json ]; then
|
|
38
|
+
if [[ -f package.json ]]; then
|
|
39
39
|
add React "$(json_field package.json dependencies.react)"
|
|
40
40
|
add Next.js "$(json_field package.json dependencies.next)"
|
|
41
41
|
fi
|
|
42
|
-
[ ! -f pubspec.yaml ] || CONTEXT="${CONTEXT}Flutter/Dart, "
|
|
43
|
-
[ ! -f pyproject.toml ] || CONTEXT="${CONTEXT}Python, "
|
|
42
|
+
[[ ! -f pubspec.yaml ]] || CONTEXT="${CONTEXT}Flutter/Dart, "
|
|
43
|
+
[[ ! -f pyproject.toml ]] || CONTEXT="${CONTEXT}Python, "
|
|
44
44
|
|
|
45
45
|
# Services déclarés dans les fichiers Compose (noms canoniques et historiques).
|
|
46
46
|
COMPOSE=$(cat compose.yaml compose.yml docker-compose.yaml docker-compose.yml 2>/dev/null)
|
|
@@ -49,5 +49,5 @@ for svc in postgres:PostgreSQL mysql:MySQL redis:Redis; do
|
|
|
49
49
|
done
|
|
50
50
|
|
|
51
51
|
CONTEXT=${CONTEXT%, }
|
|
52
|
-
[ -z "$CONTEXT" ] || hook_context SessionStart "Project stack: $CONTEXT"
|
|
52
|
+
[[ -z "$CONTEXT" ]] || hook_context SessionStart "Project stack: $CONTEXT"
|
|
53
53
|
exit 0
|
|
@@ -248,7 +248,7 @@ Punkte |
|
|
|
248
248
|
2. `metadata`: `sprint_id` (`sprint-{N}`), `name`, `start_date`, `end_date`, `goal`, `capacity_points`, aus `sprint-goal.md` übernommen.
|
|
249
249
|
3. `stories`: ein Eintrag pro ausgewählter US: `title`, `status: ready-for-dev`, `story_points`, `epic_id`, `priority` (MoSCoW), `dependencies`, `tasks`, `history: []`.
|
|
250
250
|
4. Datei für **dieselbe** `sprint_id` bereits vorhanden: bestehende Status beibehalten (eine Story nie zurücksetzen) und nur neue US ergänzen.
|
|
251
|
-
5. Datei für einen **anderen** Sprint vorhanden: zuerst
|
|
251
|
+
5. Datei für einen **anderen** Sprint vorhanden: zuerst nur die **abgeschlossenen (`done`) Stories dieses vorherigen Sprints** nach `archived_sprints.<alte sprint_id>` (`status`, `points`) verschieben — nie die von `/workflow:plan` erfassten Backlog-Stories —, dann den neuen Sprint schreiben. Nicht abgeschlossene Stories bleiben in `stories` (mit aktualisierter `sprint_id`, falls dieser Schlüssel verwendet wird).
|
|
252
252
|
|
|
253
253
|
```yaml
|
|
254
254
|
# .bmad/sprint-status.yaml
|
|
@@ -248,7 +248,7 @@ Points |
|
|
|
248
248
|
2. `metadata`: `sprint_id` (`sprint-{N}`), `name`, `start_date`, `end_date`, `goal`, `capacity_points`, taken from `sprint-goal.md`.
|
|
249
249
|
3. `stories`: one entry per selected US: `title`, `status: ready-for-dev`, `story_points`, `epic_id`, `priority` (MoSCoW), `dependencies`, `tasks`, `history: []`.
|
|
250
250
|
4. File already present for the **same** `sprint_id`: keep the existing statuses (never move a story back) and only add the new US.
|
|
251
|
-
5. File present for **another** sprint: first move
|
|
251
|
+
5. File present for **another** sprint: first move under `archived_sprints.<old sprint_id>` (`status`, `points`) only the **finished (`done`) stories of that previous sprint** — never the backlog stories recorded by `/workflow:plan` — then write the new sprint. Unfinished stories stay in `stories` (with `sprint_id` updated if that key is used).
|
|
252
252
|
|
|
253
253
|
```yaml
|
|
254
254
|
# .bmad/sprint-status.yaml
|
|
@@ -248,7 +248,7 @@ Puntos |
|
|
|
248
248
|
2. `metadata`: `sprint_id` (`sprint-{N}`), `name`, `start_date`, `end_date`, `goal`, `capacity_points`, tomados de `sprint-goal.md`.
|
|
249
249
|
3. `stories`: una entrada por US seleccionada: `title`, `status: ready-for-dev`, `story_points`, `epic_id`, `priority` (MoSCoW), `dependencies`, `tasks`, `history: []`.
|
|
250
250
|
4. Archivo ya presente para el **mismo** `sprint_id`: conservar los estados existentes (nunca hacer retroceder una story) y añadir solo las nuevas US.
|
|
251
|
-
5. Archivo presente para **otro** sprint: mover primero
|
|
251
|
+
5. Archivo presente para **otro** sprint: mover primero a `archived_sprints.<sprint_id anterior>` (`status`, `points`) únicamente las stories **terminadas (`done`) de ese sprint anterior** —nunca las stories de backlog registradas por `/workflow:plan`— y luego escribir el nuevo sprint. Las stories no terminadas permanecen en `stories` (con `sprint_id` actualizado si se usa esa clave).
|
|
252
252
|
|
|
253
253
|
```yaml
|
|
254
254
|
# .bmad/sprint-status.yaml
|
|
@@ -248,7 +248,7 @@ Points |
|
|
|
248
248
|
2. `metadata` : `sprint_id` (`sprint-{N}`), `name`, `start_date`, `end_date`, `goal`, `capacity_points`, repris de `sprint-goal.md`.
|
|
249
249
|
3. `stories` : une entrée par US sélectionnée : `title`, `status: ready-for-dev`, `story_points`, `epic_id`, `priority` (MoSCoW), `dependencies`, `tasks`, `history: []`.
|
|
250
250
|
4. Fichier déjà présent pour le **même** `sprint_id` : conserver les statuts existants (ne jamais faire reculer une story) et n'ajouter que les nouvelles US.
|
|
251
|
-
5. Fichier présent pour un **autre** sprint : déplacer d'abord
|
|
251
|
+
5. Fichier présent pour un **autre** sprint : déplacer d'abord sous `archived_sprints.<ancien sprint_id>` (`status`, `points`) uniquement les stories **terminées (`done`) de ce sprint précédent** — jamais les stories de backlog enregistrées par `/workflow:plan` —, puis écrire le nouveau sprint. Les stories non terminées restent dans `stories` (avec `sprint_id` mis à jour si cette clé est utilisée).
|
|
252
252
|
|
|
253
253
|
```yaml
|
|
254
254
|
# .bmad/sprint-status.yaml
|
|
@@ -248,7 +248,7 @@ Pontos |
|
|
|
248
248
|
2. `metadata`: `sprint_id` (`sprint-{N}`), `name`, `start_date`, `end_date`, `goal`, `capacity_points`, retirados de `sprint-goal.md`.
|
|
249
249
|
3. `stories`: uma entrada por US selecionada: `title`, `status: ready-for-dev`, `story_points`, `epic_id`, `priority` (MoSCoW), `dependencies`, `tasks`, `history: []`.
|
|
250
250
|
4. Arquivo já presente para o **mesmo** `sprint_id`: manter os status existentes (nunca fazer uma story retroceder) e adicionar apenas as novas US.
|
|
251
|
-
5. Arquivo presente para **outro** sprint: mover primeiro
|
|
251
|
+
5. Arquivo presente para **outro** sprint: mover primeiro para `archived_sprints.<sprint_id anterior>` (`status`, `points`) apenas as stories **concluídas (`done`) desse sprint anterior** — nunca as stories de backlog registradas por `/workflow:plan` — e depois escrever o novo sprint. As stories não concluídas permanecem em `stories` (com `sprint_id` atualizado se essa chave for usada).
|
|
252
252
|
|
|
253
253
|
```yaml
|
|
254
254
|
# .bmad/sprint-status.yaml
|