elsabro 7.3.2 → 7.4.0
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/README.md +79 -23
- package/agents/elsabro-executor.md +32 -0
- package/agents/elsabro-orchestrator.md +39 -0
- package/agents/elsabro-qa.md +37 -0
- package/agents/elsabro-verifier.md +37 -0
- package/commands/elsabro/execute.md +66 -2
- package/flow-engine/src/graph.js +16 -4
- package/flow-engine/src/index.js +10 -0
- package/flow-engine/src/template.js +6 -5
- package/flow-engine/tests/cli.test.js +3 -2
- package/flow-engine/tests/execute-dispatcher.test.js +2 -1
- package/flow-engine/tests/graph.test.js +27 -26
- package/flow-engine/tests/integration.test.js +30 -34
- package/flows/development-flow.json +109 -12
- package/hooks/auto-sync-check.sh +238 -0
- package/hooks/check-review-skills.sh +45 -0
- package/hooks/hooks-config-updated.json +31 -10
- package/hooks/review-gate.sh +90 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"description": "ELSABRO Hooks Configuration v3.
|
|
4
|
-
"version": "3.
|
|
3
|
+
"description": "ELSABRO Hooks Configuration v3.3 (hook config version) for ELSABRO v7.3.2 - Agent Teams + Blocking Review + Skill Discovery + Persistent Mode + Auto-Sync",
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
|
|
6
6
|
"hooks": {
|
|
7
7
|
"PreFlow": [
|
|
@@ -73,6 +73,22 @@
|
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
75
|
|
|
76
|
+
"PostCommand": [
|
|
77
|
+
{
|
|
78
|
+
"id": "auto-sync-check",
|
|
79
|
+
"name": "auto-sync-check",
|
|
80
|
+
"description": "Valida sincronizacion de archivos criticos despues de cada comando ELSABRO",
|
|
81
|
+
"command": "bash ./hooks/auto-sync-check.sh",
|
|
82
|
+
"timeout": 10000,
|
|
83
|
+
"enabled": true,
|
|
84
|
+
"errorPolicy": "continue",
|
|
85
|
+
"errorPolicyRationale": "Sync check es informativo - reporta desyncs pero no bloquea workflow. Errores en stderr, JSON en stdout.",
|
|
86
|
+
"outputFormat": "json",
|
|
87
|
+
"outputNote": "stdout JSON: {status: ok|fixed|desync, version, timestamp, errors: {count, items}, warnings: {count, items}, fixes_applied: {count, items}, files_checked: [...]}. Exit 0=ok/fixed, 1=desync. Claude should fix any errors before completing the command.",
|
|
88
|
+
"triggerOn": "elsabro-command-complete"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
|
|
76
92
|
"Notification": [
|
|
77
93
|
{
|
|
78
94
|
"id": "task-complete-notify",
|
|
@@ -86,11 +102,12 @@
|
|
|
86
102
|
|
|
87
103
|
"profiles": {
|
|
88
104
|
"development": {
|
|
89
|
-
"description": "Perfil balanceado para desarrollo diario con skill discovery",
|
|
105
|
+
"description": "Perfil balanceado para desarrollo diario con skill discovery y auto-sync",
|
|
90
106
|
"auto-test-on-edit": true,
|
|
91
107
|
"lint-on-save": true,
|
|
92
108
|
"confirm-destructive": true,
|
|
93
|
-
"skill-discovery": true
|
|
109
|
+
"skill-discovery": true,
|
|
110
|
+
"auto-sync-check": true
|
|
94
111
|
},
|
|
95
112
|
|
|
96
113
|
"fast": {
|
|
@@ -102,12 +119,13 @@
|
|
|
102
119
|
},
|
|
103
120
|
|
|
104
121
|
"careful": {
|
|
105
|
-
"description": "Perfil estricto con todas las verificaciones
|
|
122
|
+
"description": "Perfil estricto con todas las verificaciones, skill discovery y auto-sync",
|
|
106
123
|
"auto-test-on-edit": true,
|
|
107
124
|
"lint-on-save": true,
|
|
108
125
|
"confirm-destructive": true,
|
|
109
126
|
"skill-discovery": true,
|
|
110
|
-
"skill-discovery-strict": true
|
|
127
|
+
"skill-discovery-strict": true,
|
|
128
|
+
"auto-sync-check": true
|
|
111
129
|
},
|
|
112
130
|
|
|
113
131
|
"ci": {
|
|
@@ -134,7 +152,8 @@
|
|
|
134
152
|
"skill-discovery": true,
|
|
135
153
|
"agent-teams": true,
|
|
136
154
|
"blocking-review": true,
|
|
137
|
-
"max-review-iterations": 5
|
|
155
|
+
"max-review-iterations": 5,
|
|
156
|
+
"auto-sync-check": true
|
|
138
157
|
},
|
|
139
158
|
|
|
140
159
|
"persistent-mode": {
|
|
@@ -147,7 +166,7 @@
|
|
|
147
166
|
},
|
|
148
167
|
|
|
149
168
|
"persistent-teams": {
|
|
150
|
-
"description": "Perfil completo - persistent mode + Agent Teams + blocking review",
|
|
169
|
+
"description": "Perfil completo - persistent mode + Agent Teams + blocking review + auto-sync",
|
|
151
170
|
"auto-test-on-edit": true,
|
|
152
171
|
"lint-on-save": true,
|
|
153
172
|
"confirm-destructive": true,
|
|
@@ -155,7 +174,8 @@
|
|
|
155
174
|
"elsabro-persistent-mode": true,
|
|
156
175
|
"agent-teams": true,
|
|
157
176
|
"blocking-review": true,
|
|
158
|
-
"max-review-iterations": 5
|
|
177
|
+
"max-review-iterations": 5,
|
|
178
|
+
"auto-sync-check": true
|
|
159
179
|
},
|
|
160
180
|
|
|
161
181
|
"bmad": {
|
|
@@ -171,7 +191,8 @@
|
|
|
171
191
|
"require-manifest": true,
|
|
172
192
|
"require-solution": true,
|
|
173
193
|
"spec-compliance-review": true,
|
|
174
|
-
"bmad-phases": ["analysis", "planning", "solutioning", "implementation"]
|
|
194
|
+
"bmad-phases": ["analysis", "planning", "solutioning", "implementation"],
|
|
195
|
+
"auto-sync-check": true
|
|
175
196
|
}
|
|
176
197
|
},
|
|
177
198
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# review-gate.sh - ELSABRO Review Gate Hook
|
|
3
|
+
#
|
|
4
|
+
# PostToolUse hook: Sets .review-pending flag when code is written/edited.
|
|
5
|
+
# PreToolUse hook: Blocks git commit if review is pending.
|
|
6
|
+
#
|
|
7
|
+
# Usage:
|
|
8
|
+
# PostToolUse (Write/Edit): bash ./hooks/review-gate.sh set
|
|
9
|
+
# PreToolUse (git commit): bash ./hooks/review-gate.sh check
|
|
10
|
+
# After review completes: bash ./hooks/review-gate.sh clear
|
|
11
|
+
# Query status: bash ./hooks/review-gate.sh status
|
|
12
|
+
#
|
|
13
|
+
# Flag file: .elsabro/.review-pending
|
|
14
|
+
# This file tracks whether code was modified without a subsequent code review.
|
|
15
|
+
|
|
16
|
+
set -euo pipefail
|
|
17
|
+
|
|
18
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
20
|
+
ELSABRO_DIR="${PROJECT_ROOT}/.elsabro"
|
|
21
|
+
FLAG_FILE="${ELSABRO_DIR}/.review-pending"
|
|
22
|
+
|
|
23
|
+
# Colores para stderr
|
|
24
|
+
RED='\033[0;31m'
|
|
25
|
+
GREEN='\033[0;32m'
|
|
26
|
+
YELLOW='\033[1;33m'
|
|
27
|
+
NC='\033[0m'
|
|
28
|
+
PREFIX="[ELSABRO:review-gate]"
|
|
29
|
+
|
|
30
|
+
ensure_dir() {
|
|
31
|
+
mkdir -p "$ELSABRO_DIR" 2>/dev/null || true
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
cmd_set() {
|
|
35
|
+
ensure_dir
|
|
36
|
+
# Record what files were modified and when
|
|
37
|
+
local timestamp
|
|
38
|
+
timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
39
|
+
# Sanitize tool_input: only allow safe path characters, strip newlines to prevent line injection
|
|
40
|
+
local tool_input
|
|
41
|
+
tool_input=$(printf '%s' "${2:-unknown}" | tr -cd '[:alnum:]/._ -')
|
|
42
|
+
|
|
43
|
+
# Always append (>> creates file if not exists, avoids race condition)
|
|
44
|
+
echo "$timestamp|$tool_input" >> "$FLAG_FILE"
|
|
45
|
+
echo -e "${YELLOW}${PREFIX}${NC} Review pending: code modified ($tool_input)" >&2
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
cmd_check() {
|
|
49
|
+
if [[ -f "$FLAG_FILE" ]]; then
|
|
50
|
+
local count
|
|
51
|
+
count=$(wc -l < "$FLAG_FILE" | tr -d ' ')
|
|
52
|
+
echo -e "${RED}${PREFIX}${NC} BLOCKED: $count file(s) modified without code review" >&2
|
|
53
|
+
echo -e "${RED}${PREFIX}${NC} Run code review first, then: bash hooks/review-gate.sh clear" >&2
|
|
54
|
+
# Return non-zero to block the operation
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
echo -e "${GREEN}${PREFIX}${NC} OK: No pending review" >&2
|
|
58
|
+
exit 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
cmd_clear() {
|
|
62
|
+
if [[ -f "$FLAG_FILE" ]]; then
|
|
63
|
+
rm -f "$FLAG_FILE"
|
|
64
|
+
echo -e "${GREEN}${PREFIX}${NC} Review gate cleared - code review completed" >&2
|
|
65
|
+
else
|
|
66
|
+
echo -e "${GREEN}${PREFIX}${NC} No pending review to clear" >&2
|
|
67
|
+
fi
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
cmd_status() {
|
|
71
|
+
if [[ -f "$FLAG_FILE" ]]; then
|
|
72
|
+
local count
|
|
73
|
+
count=$(wc -l < "$FLAG_FILE" | tr -d ' ')
|
|
74
|
+
echo "{\"pending\":true,\"count\":$count}"
|
|
75
|
+
else
|
|
76
|
+
echo '{"pending":false,"count":0}'
|
|
77
|
+
fi
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# Main
|
|
81
|
+
case "${1:-status}" in
|
|
82
|
+
set) cmd_set "$@" ;;
|
|
83
|
+
check) cmd_check ;;
|
|
84
|
+
clear) cmd_clear ;;
|
|
85
|
+
status) cmd_status ;;
|
|
86
|
+
*)
|
|
87
|
+
echo "Usage: review-gate.sh {set|check|clear|status}" >&2
|
|
88
|
+
exit 1
|
|
89
|
+
;;
|
|
90
|
+
esac
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elsabro",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Sistema de desarrollo AI-powered para Claude Code - BMAD Method Integration, Spec-Driven Development, Party Mode, Next Step Suggestions, Stitch UI Design, Agent Teams, blocking code review, orquestación avanzada con flows declarativos",
|
|
5
5
|
"bin": {
|
|
6
6
|
"elsabro": "bin/install.js",
|