specleap-framework 2.1.1 → 2.1.5
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/.agents/backend.md +3 -3
- package/.agents/frontend.md +2 -2
- package/.agents/producto.md +9 -11
- package/.claude/hooks/spec-guard.sh +132 -0
- package/.claude/settings.json.template +15 -0
- package/.clinerules +3 -3
- package/.coderabbit.yaml +2 -4
- package/.commands/compliance.md +89 -0
- package/.commands/inicio.md +15 -15
- package/.commands/nuevo/README.md +2 -2
- package/.commands/planificar.md +1 -1
- package/.continue/rules/04-git-workflow.md +5 -5
- package/.continuerules +3 -4
- package/.cursorrules +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.specleap/i18n/en.json +177 -0
- package/.specleap/i18n/es.json +177 -0
- package/.specleap/i18n.sh +63 -0
- package/CHANGELOG.md +276 -0
- package/CLAUDE.md +54 -13
- package/README.md +169 -529
- package/SETUP.md +16 -13
- package/openspec/INDEX.md +53 -0
- package/openspec/README.md +104 -0
- package/openspec/SPEC-FORMAT.md +168 -0
- package/openspec/changes/.gitkeep +0 -0
- package/openspec/cli/COMMAND_REFERENCE.md +817 -0
- package/openspec/cli/README.md +189 -0
- package/openspec/cli/apply.sh +229 -0
- package/openspec/cli/archive.sh +240 -0
- package/openspec/cli/code-review.sh +207 -0
- package/openspec/cli/common.sh +171 -0
- package/openspec/cli/enrich.sh +188 -0
- package/openspec/cli/ff.sh +329 -0
- package/openspec/cli/new.sh +260 -0
- package/openspec/cli/openspec +82 -0
- package/openspec/cli/report.sh +244 -0
- package/openspec/cli/status.sh +178 -0
- package/openspec/cli/verify.sh +246 -0
- package/openspec/config.yaml +76 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/00-original-user-story.md +5 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/01-refined-user-story.md +106 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/README.md +333 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/design.md +461 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/proposal.md +124 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/functional/F001-authentication.spec.md +399 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/technical/T001-jwt-implementation.spec.md +606 -0
- package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/tasks.md +433 -0
- package/openspec/examples/MERMAID_DIAGRAMS.md +481 -0
- package/openspec/examples/README.md +334 -0
- package/openspec/specs/functional/.gitkeep +0 -0
- package/openspec/specs/integration/.gitkeep +0 -0
- package/openspec/specs/security/.gitkeep +0 -0
- package/openspec/specs/technical/.gitkeep +0 -0
- package/openspec/templates/.coderabbit.yaml +259 -0
- package/openspec/templates/design.md +181 -0
- package/openspec/templates/proposal.md +79 -0
- package/openspec/templates/tasks.md +193 -0
- package/package.json +10 -5
- package/rules/git-workflow.md +3 -3
- package/rules/session-protocol.md +3 -3
- package/scripts/README.md +13 -25
- package/scripts/compliance-audit.sh +325 -0
- package/scripts/generate-contract.sh +4 -4
- package/scripts/install-skills.sh +8 -8
- package/scripts/lib/render-contrato.py +1 -1
- package/scripts/quality-baseline.sh +210 -0
- package/scripts/quality-healing.sh +241 -0
- package/setup.sh +3 -3
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
- package/scripts/lib/jira-project-utils.sh +0 -222
- package/scripts/setup-mcp.sh +0 -654
- package/scripts/test-cuestionario.sh +0 -428
package/.agents/backend.md
CHANGED
|
@@ -91,7 +91,7 @@ Cuando se te pide planificar un ticket backend:
|
|
|
91
91
|
- Lee `proyectos/[proyecto]/context/architecture.md`
|
|
92
92
|
- Lee `proyectos/[proyecto]/context/tech-stack.md`
|
|
93
93
|
- Lee `proyectos/[proyecto]/context/conventions.md`
|
|
94
|
-
- Lee
|
|
94
|
+
- Lee la tarea de Asana (vía ASANA_ACCESS_TOKEN)
|
|
95
95
|
|
|
96
96
|
### 2. Analizar Requisitos
|
|
97
97
|
|
|
@@ -362,7 +362,7 @@ Cuando revises código backend, verifica:
|
|
|
362
362
|
- [ ] Error handling claro
|
|
363
363
|
- [ ] Código sigue conventions.md
|
|
364
364
|
- [ ] Commits descriptivos
|
|
365
|
-
- [ ] PR vinculado a
|
|
365
|
+
- [ ] PR vinculado a Asana
|
|
366
366
|
|
|
367
367
|
---
|
|
368
368
|
|
|
@@ -405,7 +405,7 @@ Tu mensaje final DEBE incluir:
|
|
|
405
405
|
- **Bash** — Ejecutar comandos del sistema
|
|
406
406
|
- **Read** — Leer archivos del proyecto
|
|
407
407
|
- **Write** — Crear el archivo del plan
|
|
408
|
-
- **
|
|
408
|
+
- **Asana API** — Leer tareas de Asana (via ASANA_ACCESS_TOKEN)
|
|
409
409
|
- **MCP Context7** — Consultar docs de Laravel (si está configurado)
|
|
410
410
|
|
|
411
411
|
---
|
package/.agents/frontend.md
CHANGED
|
@@ -96,7 +96,7 @@ Cuando se te pide planificar un ticket frontend:
|
|
|
96
96
|
- Lee `proyectos/[proyecto]/context/architecture.md`
|
|
97
97
|
- Lee `proyectos/[proyecto]/context/tech-stack.md`
|
|
98
98
|
- Lee `proyectos/[proyecto]/context/conventions.md`
|
|
99
|
-
- Lee
|
|
99
|
+
- Lee la tarea de Asana (vía ASANA_ACCESS_TOKEN)
|
|
100
100
|
|
|
101
101
|
### 2. Generar Design System (CRÍTICO)
|
|
102
102
|
|
|
@@ -563,7 +563,7 @@ Tu mensaje final DEBE incluir:
|
|
|
563
563
|
- **Bash** — Ejecutar comandos del sistema
|
|
564
564
|
- **Read** — Leer archivos del proyecto
|
|
565
565
|
- **Write** — Crear el archivo del plan
|
|
566
|
-
- **
|
|
566
|
+
- **Asana API** — Leer tareas de Asana (via ASANA_ACCESS_TOKEN)
|
|
567
567
|
- **MCP Context7** — Consultar docs de React/Vite (si está configurado)
|
|
568
568
|
|
|
569
569
|
---
|
package/.agents/producto.md
CHANGED
|
@@ -324,7 +324,7 @@ Cuando se te pide refinar una user story (comando `refinar`):
|
|
|
324
324
|
|
|
325
325
|
### 1. Leer Contexto
|
|
326
326
|
|
|
327
|
-
- Lee
|
|
327
|
+
- Lee la tarea de Asana original
|
|
328
328
|
- Lee `proyectos/[proyecto]/CONTRATO.md` para entender el proyecto
|
|
329
329
|
- Lee `proyectos/[proyecto]/context/` para conocer stack y decisiones
|
|
330
330
|
- Identifica el módulo al que pertenece
|
|
@@ -363,22 +363,20 @@ Expande la user story siguiendo el template completo, incluyendo:
|
|
|
363
363
|
- Requisitos no funcionales
|
|
364
364
|
- Estimación y riesgos
|
|
365
365
|
|
|
366
|
-
### 5. Actualizar
|
|
366
|
+
### 5. Actualizar Asana (Si ASANA_ACCESS_TOKEN está disponible)
|
|
367
367
|
|
|
368
|
-
Si tienes acceso
|
|
368
|
+
Si tienes acceso a Asana:
|
|
369
369
|
|
|
370
370
|
1. Actualiza el ticket con el contenido enriquecido
|
|
371
371
|
2. Usa secciones claras con headings (h2, h3)
|
|
372
372
|
3. Formatea código en bloques code
|
|
373
373
|
4. Aplica listas y tablas donde ayude
|
|
374
|
-
5.
|
|
375
|
-
|
|
376
|
-
ciona el ticket a "Refinado" o "Ready for Dev"
|
|
374
|
+
5. Transiciona el ticket a "Refinado" o "Ready for Dev"
|
|
377
375
|
|
|
378
376
|
Si NO tienes acceso al MCP:
|
|
379
377
|
|
|
380
378
|
1. Guarda el contenido enriquecido en `proyectos/[proyecto]/specs/[TICKET-ID]_refined.md`
|
|
381
|
-
2. Proporciona el contenido al usuario para que lo copie manualmente a
|
|
379
|
+
2. Proporciona el contenido al usuario para que lo copie manualmente a Asana
|
|
382
380
|
|
|
383
381
|
---
|
|
384
382
|
|
|
@@ -459,7 +457,7 @@ Cuando refinas una user story:
|
|
|
459
457
|
3. **Haz preguntas** si es necesario
|
|
460
458
|
4. **Presenta** la user story refinada completa
|
|
461
459
|
5. **Destaca** puntos críticos
|
|
462
|
-
6. **Confirma** antes de actualizar
|
|
460
|
+
6. **Confirma** antes de actualizar Asana
|
|
463
461
|
|
|
464
462
|
**Ejemplo:**
|
|
465
463
|
> "He refinado la user story SCRUM-23. La original era muy escueta (solo 2 líneas).
|
|
@@ -470,7 +468,7 @@ Cuando refinas una user story:
|
|
|
470
468
|
> - Flujo de usuario paso a paso
|
|
471
469
|
> - Estimación: 3 días (backend 1.5d, frontend 1d, testing 0.5d)
|
|
472
470
|
>
|
|
473
|
-
> ¿Apruebas que actualice
|
|
471
|
+
> ¿Apruebas que actualice la tarea en Asana?"
|
|
474
472
|
|
|
475
473
|
---
|
|
476
474
|
|
|
@@ -494,7 +492,7 @@ Tu mensaje final DEBE incluir:
|
|
|
494
492
|
|
|
495
493
|
🔄 **Próximo paso:**
|
|
496
494
|
- [ ] Revisar refinamiento
|
|
497
|
-
- [ ] Actualizar
|
|
495
|
+
- [ ] Actualizar Asana (o copiar manualmente)
|
|
498
496
|
- [ ] Ejecutar `planificar [TICKET-ID]` cuando esté listo
|
|
499
497
|
```
|
|
500
498
|
|
|
@@ -502,7 +500,7 @@ Tu mensaje final DEBE incluir:
|
|
|
502
500
|
|
|
503
501
|
## Herramientas Disponibles
|
|
504
502
|
|
|
505
|
-
- **
|
|
503
|
+
- **Asana API** — Leer y actualizar tareas (si ASANA_ACCESS_TOKEN está configurado)
|
|
506
504
|
- **Read** — Leer archivos del proyecto
|
|
507
505
|
- **Write** — Guardar user story refinada localmente
|
|
508
506
|
- **Bash** — Ejecutar comandos del sistema
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SpecLeap — Spec-guard pre-tool-use hook
|
|
3
|
+
# Blocks Write/Edit/NotebookEdit on protected branches (main/stage/develop).
|
|
4
|
+
# Fail-open philosophy: any internal error results in exit 0 (allow).
|
|
5
|
+
#
|
|
6
|
+
# Input: stdin JSON from Claude Code PreToolUse hook
|
|
7
|
+
# { "tool_name": "Write", "tool_input": { "file_path": "src/X.ts" }, ... }
|
|
8
|
+
#
|
|
9
|
+
# Exit codes:
|
|
10
|
+
# 0 allow
|
|
11
|
+
# 2 block (stderr is shown to the user)
|
|
12
|
+
|
|
13
|
+
set +e # never abort on unexpected errors; we fail-open explicitly
|
|
14
|
+
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
16
|
+
# The hook lives at <project>/.claude/hooks/, so root is two levels up
|
|
17
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
18
|
+
|
|
19
|
+
# Try to load i18n helper if available (we live in a consumer project,
|
|
20
|
+
# so .specleap may or may not exist there)
|
|
21
|
+
if [ -f "$PROJECT_ROOT/.specleap/i18n.sh" ]; then
|
|
22
|
+
# shellcheck source=/dev/null
|
|
23
|
+
source "$PROJECT_ROOT/.specleap/i18n.sh" 2>/dev/null || true
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Translation helper with hard-coded English fallback
|
|
27
|
+
# so the hook works even without SpecLeap i18n present.
|
|
28
|
+
translate() {
|
|
29
|
+
local key="$1"
|
|
30
|
+
local fallback="$2"
|
|
31
|
+
if command -v t &>/dev/null; then
|
|
32
|
+
local result
|
|
33
|
+
result=$(t "$key" 2>/dev/null)
|
|
34
|
+
if [ -n "$result" ] && [ "$result" != "$key" ]; then
|
|
35
|
+
echo "$result"
|
|
36
|
+
return
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
echo "$fallback"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
# Read stdin (hook input from Claude Code)
|
|
43
|
+
INPUT=""
|
|
44
|
+
if [ -t 0 ]; then
|
|
45
|
+
# No stdin available (ran manually for testing) — allow
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
INPUT=$(cat 2>/dev/null)
|
|
49
|
+
[ -z "$INPUT" ] && exit 0
|
|
50
|
+
|
|
51
|
+
# Parse tool_name and file_path
|
|
52
|
+
TOOL=""
|
|
53
|
+
FILE=""
|
|
54
|
+
if command -v jq &>/dev/null; then
|
|
55
|
+
TOOL=$(echo "$INPUT" | jq -r '.tool_name // empty' 2>/dev/null)
|
|
56
|
+
FILE=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
|
|
57
|
+
else
|
|
58
|
+
# Fallback without jq — crude regex extraction
|
|
59
|
+
TOOL=$(echo "$INPUT" | grep -o '"tool_name":[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"\([^"]*\)"$/\1/')
|
|
60
|
+
FILE=$(echo "$INPUT" | grep -o '"file_path":[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"\([^"]*\)"$/\1/')
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Only care about file-writing tools
|
|
64
|
+
case "$TOOL" in
|
|
65
|
+
Write|Edit|NotebookEdit) ;;
|
|
66
|
+
*) exit 0 ;;
|
|
67
|
+
esac
|
|
68
|
+
|
|
69
|
+
[ -z "$FILE" ] && exit 0
|
|
70
|
+
|
|
71
|
+
# Only enforce on typical app-code paths.
|
|
72
|
+
# Accept both absolute and relative forms.
|
|
73
|
+
case "$FILE" in
|
|
74
|
+
*"/src/"*|"src/"*|\
|
|
75
|
+
*"/app/"*|"app/"*|\
|
|
76
|
+
*"/tests/"*|"tests/"*|\
|
|
77
|
+
*"/test/"*|"test/"*|\
|
|
78
|
+
*"/lib/"*|"lib/"*)
|
|
79
|
+
;;
|
|
80
|
+
*)
|
|
81
|
+
exit 0
|
|
82
|
+
;;
|
|
83
|
+
esac
|
|
84
|
+
|
|
85
|
+
# Determine current git branch. If not a git repo → fail-open.
|
|
86
|
+
BRANCH=""
|
|
87
|
+
if command -v git &>/dev/null; then
|
|
88
|
+
BRANCH=$(git -C "$PROJECT_ROOT" rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
89
|
+
fi
|
|
90
|
+
[ -z "$BRANCH" ] && exit 0
|
|
91
|
+
|
|
92
|
+
# Protected branches list
|
|
93
|
+
PROTECTED="main stage develop"
|
|
94
|
+
|
|
95
|
+
BLOCKED=0
|
|
96
|
+
for p in $PROTECTED; do
|
|
97
|
+
if [ "$BRANCH" = "$p" ]; then
|
|
98
|
+
BLOCKED=1
|
|
99
|
+
break
|
|
100
|
+
fi
|
|
101
|
+
done
|
|
102
|
+
|
|
103
|
+
[ "$BLOCKED" -eq 0 ] && exit 0
|
|
104
|
+
|
|
105
|
+
# --- Blocked: print pedagogical message to stderr and exit 2 ---
|
|
106
|
+
|
|
107
|
+
HEADER=$(translate 'quality.spec_guard.blocked_header' 'SpecLeap: write blocked on protected branch')
|
|
108
|
+
ON_BRANCH=$(translate 'quality.spec_guard.blocked_branch' 'You are on protected branch:')
|
|
109
|
+
HINT_CREATE=$(translate 'quality.spec_guard.hint_create_branch' 'Create a feature branch:')
|
|
110
|
+
HINT_CMD=$(translate 'quality.spec_guard.hint_command' 'git checkout -b feature/[project]-[ticket]-[description]')
|
|
111
|
+
HINT_EXAMPLE=$(translate 'quality.spec_guard.hint_example' 'Example: git checkout -b feature/app-tienda-23-cart')
|
|
112
|
+
HINT_FLOW=$(translate 'quality.spec_guard.hint_flow' 'Flow: feature → stage → main (via PR)')
|
|
113
|
+
|
|
114
|
+
{
|
|
115
|
+
echo ""
|
|
116
|
+
echo "╔═════════════════════════════════════════════════════════╗"
|
|
117
|
+
echo "║ $HEADER"
|
|
118
|
+
echo "╚═════════════════════════════════════════════════════════╝"
|
|
119
|
+
echo ""
|
|
120
|
+
echo " $ON_BRANCH $BRANCH"
|
|
121
|
+
echo " → $FILE"
|
|
122
|
+
echo ""
|
|
123
|
+
echo " $HINT_CREATE"
|
|
124
|
+
echo " $HINT_CMD"
|
|
125
|
+
echo ""
|
|
126
|
+
echo " $HINT_EXAMPLE"
|
|
127
|
+
echo ""
|
|
128
|
+
echo " $HINT_FLOW"
|
|
129
|
+
echo ""
|
|
130
|
+
} >&2
|
|
131
|
+
|
|
132
|
+
exit 2
|
package/.clinerules
CHANGED
|
@@ -61,7 +61,7 @@ Usuario: planificar
|
|
|
61
61
|
|
|
62
62
|
### 3. Implementar por Tickets
|
|
63
63
|
```
|
|
64
|
-
Usuario: implementar
|
|
64
|
+
Usuario: implementar app-tienda-23
|
|
65
65
|
```
|
|
66
66
|
→ Descarga spec del ticket Asana
|
|
67
67
|
→ Implementa según especificación
|
|
@@ -77,7 +77,7 @@ Usuario: implementar PROJ-123
|
|
|
77
77
|
|
|
78
78
|
### OBLIGATORIAS (ver `rules/`)
|
|
79
79
|
1. **Spec-First:** NUNCA codificar sin CONTRATO.md aprobado
|
|
80
|
-
2. **Git Workflow:** Siempre feature branches (`feature/
|
|
80
|
+
2. **Git Workflow:** Siempre feature branches (`feature/app-tienda-23-descripcion`)
|
|
81
81
|
3. **Testing:** Tests obligatorios para lógica de negocio
|
|
82
82
|
4. **Environment Protection:** NUNCA hardcodear credenciales
|
|
83
83
|
|
|
@@ -210,7 +210,7 @@ Leer y mostrar contenido de `.commands/ayuda.md`
|
|
|
210
210
|
|
|
211
211
|
🔗 Próximos pasos:
|
|
212
212
|
1. Commit: git commit -m "feat(scope): descripción"
|
|
213
|
-
2. Push: git push origin feature/
|
|
213
|
+
2. Push: git push origin feature/app-tienda-23
|
|
214
214
|
3. CodeRabbit revisará automáticamente
|
|
215
215
|
```
|
|
216
216
|
|
package/.coderabbit.yaml
CHANGED
|
@@ -229,8 +229,7 @@ chat:
|
|
|
229
229
|
auto_reply: true
|
|
230
230
|
art: false
|
|
231
231
|
integrations:
|
|
232
|
-
|
|
233
|
-
usage: "enabled"
|
|
232
|
+
# Asana integration handled directly via scripts/ (no MCP needed)
|
|
234
233
|
linear:
|
|
235
234
|
usage: "disabled"
|
|
236
235
|
|
|
@@ -250,8 +249,7 @@ knowledge_base:
|
|
|
250
249
|
scope: "global"
|
|
251
250
|
issues:
|
|
252
251
|
scope: "global"
|
|
253
|
-
|
|
254
|
-
usage: "enabled"
|
|
252
|
+
# Asana integration handled directly via scripts/ (no MCP needed)
|
|
255
253
|
pull_requests:
|
|
256
254
|
scope: "global"
|
|
257
255
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Comando: compliance
|
|
2
|
+
|
|
3
|
+
**Trigger:** Usuario escribe `compliance`, `auditoria` o `audit` (case-insensitive).
|
|
4
|
+
|
|
5
|
+
**Objetivo:** Ejecutar una auto-auditoría del framework SpecLeap y reportar al usuario una nota 0-100 en 6 dimensiones, más acciones concretas para subir la nota si hay drift.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Qué dimensiones se auditan
|
|
10
|
+
|
|
11
|
+
1. **Version** — El `package.json.version` coincide con el último tag de git.
|
|
12
|
+
2. **Skills** — El número de carpetas en `~/.skills/` coincide con los counters declarados en `CLAUDE.md`, `README.md` y `.quality/baselines/baseline.json`.
|
|
13
|
+
3. **i18n** — Todas las claves de `.specleap/i18n/es.json` existen en `.specleap/i18n/en.json` y viceversa.
|
|
14
|
+
4. **Hooks** — `.claude/hooks/spec-guard.sh` existe, tiene shebang, es ejecutable y está referenciado en `.claude/settings.json.template`.
|
|
15
|
+
5. **Baseline** — `.quality/baselines/baseline.json.repo_snapshot` no difiere >20% de los counters reales del repo.
|
|
16
|
+
6. **Docs** — Ningún `.md` raíz tiene residuos de marcas pasadas (`iapanderson`, `archspec`, `openclaw`, `pamela`) excluyendo `CHANGELOG.md` (histórico).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Flujo que la IA debe seguir
|
|
21
|
+
|
|
22
|
+
### Paso 1: Ejecutar el script de auditoría
|
|
23
|
+
|
|
24
|
+
Desde la raíz del framework:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bash scripts/compliance-audit.sh
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
El script imprime un resumen a stdout y escribe un JSON detallado en `.quality/evidence/compliance/audit-$(timestamp).json`.
|
|
31
|
+
|
|
32
|
+
### Paso 2: Mostrar el resultado al usuario
|
|
33
|
+
|
|
34
|
+
Lee el output del script y preséntalo al usuario con formato markdown. Ejemplo:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## SpecLeap Compliance Audit
|
|
38
|
+
|
|
39
|
+
| Dimensión | Puntuación | Observaciones |
|
|
40
|
+
|-----------|------------|---------------|
|
|
41
|
+
| Version | 100/100 | |
|
|
42
|
+
| Skills | 100/100 | |
|
|
43
|
+
| i18n | 95/100 | Falta clave `quality.spec_guard.hint_flow` en `en.json` |
|
|
44
|
+
| Hooks | 100/100 | |
|
|
45
|
+
| Baseline | 85/100 | `repo_snapshot` desactualizado |
|
|
46
|
+
| Docs | 100/100 | |
|
|
47
|
+
|
|
48
|
+
**Total: 96/100**
|
|
49
|
+
|
|
50
|
+
Detalle guardado en: `.quality/evidence/compliance/audit-2026-04-23T18:55:12Z.json`
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Paso 3: Sugerencias de mejora (solo si hay dimensiones <100)
|
|
54
|
+
|
|
55
|
+
Si alguna dimensión está por debajo de 100, lista las **acciones concretas** para subirla:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
### Acciones recomendadas
|
|
59
|
+
|
|
60
|
+
- **i18n:** Añadir la clave `quality.spec_guard.hint_flow` a `en.json` para alinear con `es.json`.
|
|
61
|
+
- **Baseline:** Ejecutar `bash scripts/quality-baseline.sh snapshot` para refrescar `repo_snapshot`.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Usa las observaciones del script como base. No inventes acciones; si el script dice "missing key X", di "añadir key X".
|
|
65
|
+
|
|
66
|
+
### Paso 4: Mensaje final según el total
|
|
67
|
+
|
|
68
|
+
- **Total = 100/100:** felicitación breve. Una frase, sin exagerar. Ejemplo: *"Framework al día, cero drift detectado."*
|
|
69
|
+
- **Total 80-99:** resumen neutral. Ejemplo: *"Hay X dimensiones con drift menor. Las acciones de arriba lo resuelven."*
|
|
70
|
+
- **Total 60-79:** advertencia moderada. Ejemplo: *"Drift notable en X dimensiones. Revisa las acciones antes del próximo release."*
|
|
71
|
+
- **Total < 60:** advertencia fuerte. Ejemplo: *"Drift significativo. Recomiendo no publicar nueva versión hasta resolver los ítems listados."*
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Reglas
|
|
76
|
+
|
|
77
|
+
1. **El script es la fuente de verdad.** No inventes puntuaciones ni observaciones; solo presenta lo que el script devuelve.
|
|
78
|
+
2. **No ejecutes acciones correctivas automáticamente.** Solo presenta las recomendaciones. El usuario decide cuándo aplicarlas.
|
|
79
|
+
3. **Si el script falla** (error de bash, falta `jq`, etc.), reporta el error tal cual al usuario sin intentar auditar manualmente.
|
|
80
|
+
4. **Sin mencionar otros frameworks.** La auditoría es interna de SpecLeap; no compares con otros sistemas.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Referencias
|
|
85
|
+
|
|
86
|
+
- **Script:** `scripts/compliance-audit.sh`
|
|
87
|
+
- **Evidencia:** `.quality/evidence/compliance/` (gitignored)
|
|
88
|
+
- **Baseline de referencia:** `.quality/baselines/baseline.json`
|
|
89
|
+
- **Claves i18n:** namespace `quality.compliance` en `.specleap/i18n/{es,en}.json`
|
package/.commands/inicio.md
CHANGED
|
@@ -645,12 +645,12 @@ proyectos/casa-de-peli/
|
|
|
645
645
|
Abre `CONTRATO.md` para revisar el contrato completo
|
|
646
646
|
|
|
647
647
|
2. **Crear tickets en Asana:**
|
|
648
|
-
Lee `.
|
|
648
|
+
Lee `.commands/crear-tickets.md` y ejecuta
|
|
649
649
|
|
|
650
650
|
3. **Empezar desarrollo:**
|
|
651
651
|
Elige un ticket:
|
|
652
|
-
- `refinar
|
|
653
|
-
- `planificar
|
|
652
|
+
- `refinar [proyecto]-XXX` — Refinar user story
|
|
653
|
+
- `planificar [proyecto]-XXX` — Generar plan de implementación
|
|
654
654
|
- `implementar @plan.md` — Ejecutar el plan
|
|
655
655
|
|
|
656
656
|
**¿Quieres crear ahora los tickets en Asana?**
|
|
@@ -666,7 +666,7 @@ proyectos/casa-de-peli/
|
|
|
666
666
|
✅ Perfecto. Voy a crear los tickets ahora...
|
|
667
667
|
```
|
|
668
668
|
|
|
669
|
-
**Acción:** Leer `.
|
|
669
|
+
**Acción:** Leer `.commands/crear-tickets.md` y ejecutar las instrucciones paso a paso.
|
|
670
670
|
|
|
671
671
|
#### Si el usuario responde "No":
|
|
672
672
|
|
|
@@ -676,7 +676,7 @@ proyectos/casa-de-peli/
|
|
|
676
676
|
**Para crearlos después, escribe:**
|
|
677
677
|
|
|
678
678
|
```
|
|
679
|
-
Lee .
|
|
679
|
+
Lee .commands/crear-tickets.md y ejecuta
|
|
680
680
|
```
|
|
681
681
|
|
|
682
682
|
**O desde terminal:**
|
|
@@ -690,11 +690,11 @@ cd proyectos/[nombre-proyecto]
|
|
|
690
690
|
|
|
691
691
|
| Comando | Cómo ejecutarlo |
|
|
692
692
|
|---------|-----------------|
|
|
693
|
-
| Crear tickets Asana | `Lee .
|
|
694
|
-
| Refinar story | `Lee .
|
|
695
|
-
| Planificar implementación | `Lee .
|
|
696
|
-
| Implementar | `Lee .
|
|
697
|
-
| Adoptar proyecto legacy | `Lee .
|
|
693
|
+
| Crear tickets Asana | `Lee .commands/crear-tickets.md y ejecuta` |
|
|
694
|
+
| Refinar story | `Lee .commands/refinar.md y ejecuta` |
|
|
695
|
+
| Planificar implementación | `Lee .commands/planificar.md y ejecuta` |
|
|
696
|
+
| Implementar | `Lee .commands/implementar.md y ejecuta` |
|
|
697
|
+
| Adoptar proyecto legacy | `Lee .commands/adoptar.md y ejecuta` |
|
|
698
698
|
|
|
699
699
|
¿Hay algo más en lo que pueda ayudarte?
|
|
700
700
|
```
|
|
@@ -750,12 +750,12 @@ Responde A o B:
|
|
|
750
750
|
**¿Qué ticket vas a trabajar?**
|
|
751
751
|
|
|
752
752
|
Opciones:
|
|
753
|
-
- Dime el ID del ticket (ejemplo:
|
|
753
|
+
- Dime el ID del ticket (ejemplo: app-tienda-23)
|
|
754
754
|
- O describe la tarea que vas a hacer
|
|
755
755
|
|
|
756
756
|
**Comandos disponibles:**
|
|
757
|
-
- `refinar
|
|
758
|
-
- `planificar
|
|
757
|
+
- `refinar [proyecto]-XXX` — Refinar user story
|
|
758
|
+
- `planificar [proyecto]-XXX` — Generar plan de implementación
|
|
759
759
|
- `implementar @plan.md` — Ejecutar el plan
|
|
760
760
|
- `explicar [concepto]` — Explicar código o arquitectura
|
|
761
761
|
```
|
|
@@ -782,7 +782,7 @@ Archivos del proyecto:
|
|
|
782
782
|
|
|
783
783
|
## Flujo C: Adoptar Proyecto Legacy
|
|
784
784
|
|
|
785
|
-
Ver `.
|
|
785
|
+
Ver `.commands/adoptar.md` para el flujo completo de adopción.
|
|
786
786
|
|
|
787
787
|
---
|
|
788
788
|
|
|
@@ -820,5 +820,5 @@ Ver `.commandsadoptar.md` para el flujo completo de adopción.
|
|
|
820
820
|
- **Preguntas:** `scripts/lib/questions.json` (58 preguntas completas)
|
|
821
821
|
- **Template:** `proyectos/_template/CONTRATO.md`
|
|
822
822
|
- **Agentes:** `.agents/backend.md`, `.agents/frontend.md`, `.agents/producto.md`
|
|
823
|
-
- **Otros Comandos:** `.
|
|
823
|
+
- **Otros Comandos:** `.commands/refinar.md`, `.commands/planificar.md`, etc.
|
|
824
824
|
- **Standards:** `specs/base-standards.mdc`
|
|
@@ -280,9 +280,9 @@ cat proyectos/casa-de-peli/CONTRATO.md
|
|
|
280
280
|
|
|
281
281
|
## 🔧 Próximos Pasos (Fase 3)
|
|
282
282
|
|
|
283
|
-
- [ ] Parser CONTRATO →
|
|
283
|
+
- [ ] Parser CONTRATO → Asana (`parse-contract-to-asana.sh`)
|
|
284
284
|
- [ ] Integración con `planificar`
|
|
285
|
-
- [ ] Sincronización bidireccional
|
|
285
|
+
- [ ] Sincronización bidireccional Asana ↔ CONTRATO
|
|
286
286
|
|
|
287
287
|
## 📚 Referencias
|
|
288
288
|
|
package/.commands/planificar.md
CHANGED
|
@@ -25,7 +25,7 @@ tipo(alcance): descripción corta en español
|
|
|
25
25
|
- Tests añadidos/modificados
|
|
26
26
|
|
|
27
27
|
## Refs
|
|
28
|
-
-
|
|
28
|
+
- Asana: [proyecto]-XXX
|
|
29
29
|
- Spec: openspec/specs/functional/FXXX-nombre.spec.md
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -45,13 +45,13 @@ tipo(alcance): descripción corta en español
|
|
|
45
45
|
## Branch Naming
|
|
46
46
|
|
|
47
47
|
```
|
|
48
|
-
tipo/
|
|
48
|
+
tipo/[proyecto]-XXX-descripcion-corta
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Ejemplos:
|
|
52
|
-
- `feat/
|
|
53
|
-
- `fix/
|
|
54
|
-
- `refactor/
|
|
52
|
+
- `feat/app-tienda-23-user-authentication`
|
|
53
|
+
- `fix/app-tienda-24-login-redirect`
|
|
54
|
+
- `refactor/app-tienda-25-cleanup-utils`
|
|
55
55
|
|
|
56
56
|
## Reglas
|
|
57
57
|
|
package/.continuerules
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# Continue Rules for
|
|
1
|
+
# Continue Rules for SpecLeap
|
|
2
2
|
|
|
3
|
-
You are a development assistant working under **Spec-Driven Development (SDD)** methodology via
|
|
3
|
+
You are a development assistant working under **Spec-Driven Development (SDD)** methodology via SpecLeap.
|
|
4
4
|
|
|
5
5
|
## Critical Rules
|
|
6
6
|
|
|
7
7
|
1. **NEVER write code without a spec first.** If no spec exists, create one with `openspec new`.
|
|
8
8
|
2. **NEVER skip the approval step.** Present spec/proposal and wait for confirmation before implementing.
|
|
9
9
|
3. **NEVER hardcode values.** Everything configurable goes in env/config files.
|
|
10
|
-
4. **ALWAYS link commits to specs and
|
|
10
|
+
4. **ALWAYS link commits to specs and Asana tasks.**
|
|
11
11
|
|
|
12
12
|
## Workflow (mandatory)
|
|
13
13
|
|
|
@@ -21,7 +21,6 @@ SPEC → APPROVE → CODE → TEST → REVIEW → SHIP
|
|
|
21
21
|
- `openspec apply CHANGE-XXX` — Implement approved proposal
|
|
22
22
|
- `openspec verify CHANGE-XXX` — Run tests + verify spec
|
|
23
23
|
- `openspec status` — List active proposals
|
|
24
|
-
- `openspec jira ls` — List open Jira issues
|
|
25
24
|
|
|
26
25
|
## Before writing any code:
|
|
27
26
|
|
package/.cursorrules
CHANGED
|
@@ -30,7 +30,7 @@ Primero la especificación, luego el código. Nunca al revés.
|
|
|
30
30
|
## Commits
|
|
31
31
|
Formato: `tipo(alcance): descripción en español`
|
|
32
32
|
Tipos: feat, fix, refactor, docs, test, chore, style, perf
|
|
33
|
-
Incluir: refs a
|
|
33
|
+
Incluir: refs a Asana y Spec
|
|
34
34
|
|
|
35
35
|
## Testing Report (OBLIGATORIO)
|
|
36
36
|
Cada feature documenta:
|