specleap-framework 2.1.1 → 2.1.6
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 +292 -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 +13 -6
- 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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"installer": {
|
|
3
|
+
"welcome": "Welcome to SpecLeap!",
|
|
4
|
+
"setup_start": "Starting installation...",
|
|
5
|
+
"creating_config": "Creating configuration file...",
|
|
6
|
+
"installing_deps": "Installing dependencies...",
|
|
7
|
+
"setup_complete": "✅ Installation complete!",
|
|
8
|
+
"next_steps": "Next steps:",
|
|
9
|
+
"step_1": "1. Read SETUP.md for detailed configuration",
|
|
10
|
+
"step_2": "2. Run: npm install (if using landing/web components)",
|
|
11
|
+
"step_3": "3. Configure your project in proyectos/",
|
|
12
|
+
"step_4": "4. Run: ./scripts/generate-contrato.sh to start",
|
|
13
|
+
"enjoy": "Enjoy SpecLeap!"
|
|
14
|
+
},
|
|
15
|
+
"questionnaire": {
|
|
16
|
+
"title": "🎯 SpecLeap — CONTRACT.md Generator",
|
|
17
|
+
"subtitle": "Define your project specifications",
|
|
18
|
+
"intro_line1": "This questionnaire will ask you 58 questions to automatically",
|
|
19
|
+
"intro_line2": "generate your project's CONTRACT.md.",
|
|
20
|
+
"estimated_time": "⏱️ Estimated time: 15-20 minutes",
|
|
21
|
+
"auto_save": "💾 Auto-save every 10 questions",
|
|
22
|
+
"interrupt_msg": "🔄 You can interrupt with Ctrl+C and continue later",
|
|
23
|
+
"help_label": "💡",
|
|
24
|
+
"options_label": "📋 Options:",
|
|
25
|
+
"example_label": "📝 Example:",
|
|
26
|
+
"location_label": "📄 Location:",
|
|
27
|
+
"analysis_label": "📊 Analysis:",
|
|
28
|
+
"progress": "Progress",
|
|
29
|
+
"question": "Question",
|
|
30
|
+
"of": "of",
|
|
31
|
+
"skip": "Skip",
|
|
32
|
+
"back": "Back",
|
|
33
|
+
"next": "Next",
|
|
34
|
+
"finish": "Finish",
|
|
35
|
+
"generating_contract": "📝 Generating CONTRACT.md from responses...",
|
|
36
|
+
"contract_generated": "✅ CONTRACT.md generated successfully",
|
|
37
|
+
"save_progress": "💾 Saving progress...",
|
|
38
|
+
"loading_state": "📂 Loading previous state...",
|
|
39
|
+
"state_loaded": "✅ Session restored",
|
|
40
|
+
"welcome": "Welcome to the SpecLeap interactive questionnaire",
|
|
41
|
+
"instructions": "Answer the following questions to generate your CONTRACT.md",
|
|
42
|
+
"resume_question": "Continue from question",
|
|
43
|
+
"starting_fresh": "Starting new questionnaire...",
|
|
44
|
+
"checkpoint_saved": "Checkpoint saved (question",
|
|
45
|
+
"session_incomplete": "🔄 Incomplete session detected:",
|
|
46
|
+
"project_label": "Project:",
|
|
47
|
+
"progress_label": "Progress:",
|
|
48
|
+
"questions_label": "questions",
|
|
49
|
+
"last_update": "Last updated:",
|
|
50
|
+
"continue_prompt": "Continue from question",
|
|
51
|
+
"continue_yes_no": "[y/N]:",
|
|
52
|
+
"session_restored": "Session restored. Continuing from question",
|
|
53
|
+
"new_session": "Creating new session..."
|
|
54
|
+
},
|
|
55
|
+
"session": {
|
|
56
|
+
"analyzing_legacy": "Analyzing existing project",
|
|
57
|
+
"dir_not_found": "Directory not found:",
|
|
58
|
+
"cleanup_old": "Cleaning up old sessions..."
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"analyzing_project": "🔍 Analyzing project...",
|
|
62
|
+
"detecting_type": "🔎 Detecting project type...",
|
|
63
|
+
"generating_tasks": "📋 Generating tasks...",
|
|
64
|
+
"estimating_effort": "⏱️ Estimating effort...",
|
|
65
|
+
"creating_structure": "🏗️ Creating structure...",
|
|
66
|
+
"parsing_contract": "📄 Parsing CONTRACT.md...",
|
|
67
|
+
"generating_backlog": "📊 Generating backlog...",
|
|
68
|
+
"error": "❌ Error",
|
|
69
|
+
"success": "✅ Success",
|
|
70
|
+
"warning": "⚠️ Warning",
|
|
71
|
+
"info": "ℹ️ Info"
|
|
72
|
+
},
|
|
73
|
+
"errors": {
|
|
74
|
+
"no_path": "You must provide the project path",
|
|
75
|
+
"invalid_path": "The path does not exist",
|
|
76
|
+
"no_file": "File not found",
|
|
77
|
+
"no_contract": "CONTRACT.md not found",
|
|
78
|
+
"usage": "Usage",
|
|
79
|
+
"missing_token": "API token not configured",
|
|
80
|
+
"missing_config": "Configuration file not found"
|
|
81
|
+
},
|
|
82
|
+
"analyze": {
|
|
83
|
+
"header": "📊 SpecLeap — Legacy Project Analysis",
|
|
84
|
+
"scanning": "Scanning file structure...",
|
|
85
|
+
"detecting_stack": "Detecting technology stack...",
|
|
86
|
+
"calculating_debt": "Calculating technical debt...",
|
|
87
|
+
"estimating": "Estimating adoption effort...",
|
|
88
|
+
"generating_contract": "Generating CONTRACT-LEGACY.md...",
|
|
89
|
+
"complete": "✅ Analysis completed",
|
|
90
|
+
"results_saved": "Results saved in"
|
|
91
|
+
},
|
|
92
|
+
"asana": {
|
|
93
|
+
"header": "📊 SpecLeap — Asana Backlog Generator",
|
|
94
|
+
"checking_token": "Verifying Asana credentials...",
|
|
95
|
+
"selecting_workspace": "Select workspace",
|
|
96
|
+
"creating_project": "Creating project in Asana...",
|
|
97
|
+
"creating_sections": "Creating sections...",
|
|
98
|
+
"creating_tasks": "Creating tasks",
|
|
99
|
+
"complete": "✅ Backlog generated in Asana",
|
|
100
|
+
"view_project": "View project"
|
|
101
|
+
},
|
|
102
|
+
"parse": {
|
|
103
|
+
"header": "📄 SpecLeap — CONTRACT.md Parser",
|
|
104
|
+
"reading": "Reading CONTRACT.md...",
|
|
105
|
+
"extracting": "Extracting modules and features...",
|
|
106
|
+
"validating": "Validating structure...",
|
|
107
|
+
"generating_json": "Generating JSON...",
|
|
108
|
+
"complete": "✅ Parsing completed"
|
|
109
|
+
},
|
|
110
|
+
"quality": {
|
|
111
|
+
"baseline": {
|
|
112
|
+
"init_start": "Initializing quality baseline...",
|
|
113
|
+
"init_done": "Baseline created at .quality/baselines/baseline.json",
|
|
114
|
+
"already_exists": "Baseline already exists, not overwriting:",
|
|
115
|
+
"snapshot_start": "Generating repository snapshot...",
|
|
116
|
+
"snapshot_done": "Snapshot updated",
|
|
117
|
+
"missing_baseline": ".quality/baselines/baseline.json is missing",
|
|
118
|
+
"run_init_first": "Run first: bash scripts/quality-baseline.sh init",
|
|
119
|
+
"jq_required": "This command requires 'jq'. Install it with: brew install jq",
|
|
120
|
+
"evidence_start": "Creating evidence folder for",
|
|
121
|
+
"evidence_done": "Evidence structure created at",
|
|
122
|
+
"missing_slug": "Missing feature slug.",
|
|
123
|
+
"invalid_slug": "Slug can only contain lowercase letters, numbers and hyphens:",
|
|
124
|
+
"usage": "Usage: bash scripts/quality-baseline.sh [init|snapshot|new-evidence FEATURE-SLUG]"
|
|
125
|
+
},
|
|
126
|
+
"healing": {
|
|
127
|
+
"log_done": "Entry appended to",
|
|
128
|
+
"missing_feature": "Missing --feature argument",
|
|
129
|
+
"missing_phase": "Missing --phase argument",
|
|
130
|
+
"missing_action": "Missing --action argument",
|
|
131
|
+
"severity_invalid": "Invalid severity (must be info/warn/error):",
|
|
132
|
+
"no_evidence": "No evidence folder for feature:",
|
|
133
|
+
"run_new_evidence_first": "Run first: bash scripts/quality-baseline.sh new-evidence FEATURE-SLUG",
|
|
134
|
+
"no_log": "No healing.jsonl yet for:",
|
|
135
|
+
"jq_required": "This command requires 'jq'. Install it with: brew install jq",
|
|
136
|
+
"entries": "entries",
|
|
137
|
+
"total_entries": "Total",
|
|
138
|
+
"by_severity": "By severity",
|
|
139
|
+
"by_phase": "By phase",
|
|
140
|
+
"by_action": "By action",
|
|
141
|
+
"usage_log": "Usage: bash scripts/quality-healing.sh log --feature SLUG --phase P --severity S --action A --detail D [--file F]",
|
|
142
|
+
"usage_show": "Usage: bash scripts/quality-healing.sh show --feature SLUG [--last N]",
|
|
143
|
+
"usage_stats": "Usage: bash scripts/quality-healing.sh stats --feature SLUG",
|
|
144
|
+
"usage": "Usage: bash scripts/quality-healing.sh [log|show|stats] --feature SLUG ..."
|
|
145
|
+
},
|
|
146
|
+
"spec_guard": {
|
|
147
|
+
"blocked_header": "SpecLeap: write blocked on protected branch",
|
|
148
|
+
"blocked_branch": "You are on protected branch:",
|
|
149
|
+
"hint_create_branch": "Create a feature branch before writing code:",
|
|
150
|
+
"hint_command": "git checkout -b feature/[project]-[ticket]-[description]",
|
|
151
|
+
"hint_example": "Example: git checkout -b feature/app-tienda-23-cart",
|
|
152
|
+
"hint_flow": "Flow: feature → stage → main (via PR)"
|
|
153
|
+
},
|
|
154
|
+
"compliance": {
|
|
155
|
+
"header": "SpecLeap Compliance Audit",
|
|
156
|
+
"version": "Version",
|
|
157
|
+
"skills": "Skills",
|
|
158
|
+
"i18n": "i18n",
|
|
159
|
+
"hooks": "Hooks",
|
|
160
|
+
"baseline": "Baseline",
|
|
161
|
+
"docs": "Docs",
|
|
162
|
+
"total": "Total",
|
|
163
|
+
"observations": "Observations",
|
|
164
|
+
"details_saved": "Details saved at:",
|
|
165
|
+
"version_mismatch": "package.json version does not match last tag:",
|
|
166
|
+
"skills_mismatch": "Skills count mismatch:",
|
|
167
|
+
"i18n_missing_file": "Missing i18n file (es.json or en.json)",
|
|
168
|
+
"i18n_missing_key": "Missing key in",
|
|
169
|
+
"hook_missing": "Hook file missing:",
|
|
170
|
+
"hook_not_shebang": "Missing proper shebang in:",
|
|
171
|
+
"hook_not_exec": "Not executable (chmod +x):",
|
|
172
|
+
"hook_not_in_template": "Hook not referenced in settings.json.template",
|
|
173
|
+
"baseline_stale": "repo_snapshot stale (run: bash scripts/quality-baseline.sh snapshot)",
|
|
174
|
+
"docs_residual": "Legacy brand residual in"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"installer": {
|
|
3
|
+
"welcome": "¡Bienvenido a SpecLeap!",
|
|
4
|
+
"setup_start": "Iniciando instalación...",
|
|
5
|
+
"creating_config": "Creando archivo de configuración...",
|
|
6
|
+
"installing_deps": "Instalando dependencias...",
|
|
7
|
+
"setup_complete": "✅ Instalación completa!",
|
|
8
|
+
"next_steps": "Próximos pasos:",
|
|
9
|
+
"step_1": "1. Lee SETUP.md para configuración detallada",
|
|
10
|
+
"step_2": "2. Ejecuta: npm install (si usas landing/componentes web)",
|
|
11
|
+
"step_3": "3. Configura tu proyecto en proyectos/",
|
|
12
|
+
"step_4": "4. Ejecuta: ./scripts/generate-contrato.sh para empezar",
|
|
13
|
+
"enjoy": "¡Disfruta SpecLeap!"
|
|
14
|
+
},
|
|
15
|
+
"questionnaire": {
|
|
16
|
+
"title": "🎯 SpecLeap — Generador de CONTRATO.md",
|
|
17
|
+
"subtitle": "Define las especificaciones de tu proyecto",
|
|
18
|
+
"intro_line1": "Este cuestionario te hará 58 preguntas para generar",
|
|
19
|
+
"intro_line2": "automáticamente el CONTRATO.md de tu proyecto.",
|
|
20
|
+
"estimated_time": "⏱️ Tiempo estimado: 15-20 minutos",
|
|
21
|
+
"auto_save": "💾 Guardado automático cada 10 preguntas",
|
|
22
|
+
"interrupt_msg": "🔄 Puedes interrumpir con Ctrl+C y continuar después",
|
|
23
|
+
"help_label": "💡",
|
|
24
|
+
"options_label": "📋 Opciones:",
|
|
25
|
+
"example_label": "📝 Ejemplo:",
|
|
26
|
+
"location_label": "📄 Ubicación:",
|
|
27
|
+
"analysis_label": "📊 Análisis:",
|
|
28
|
+
"progress": "Progreso",
|
|
29
|
+
"question": "Pregunta",
|
|
30
|
+
"of": "de",
|
|
31
|
+
"skip": "Omitir",
|
|
32
|
+
"back": "Atrás",
|
|
33
|
+
"next": "Siguiente",
|
|
34
|
+
"finish": "Finalizar",
|
|
35
|
+
"generating_contract": "📝 Generando CONTRATO.md desde respuestas...",
|
|
36
|
+
"contract_generated": "✅ CONTRATO.md generado exitosamente",
|
|
37
|
+
"save_progress": "💾 Guardando progreso...",
|
|
38
|
+
"loading_state": "📂 Cargando estado anterior...",
|
|
39
|
+
"state_loaded": "✅ Sesión restaurada",
|
|
40
|
+
"welcome": "Bienvenido al cuestionario interactivo de SpecLeap",
|
|
41
|
+
"instructions": "Responde las siguientes preguntas para generar tu CONTRATO.md",
|
|
42
|
+
"resume_question": "¿Continuar desde la pregunta",
|
|
43
|
+
"starting_fresh": "Empezando nuevo cuestionario...",
|
|
44
|
+
"checkpoint_saved": "Checkpoint guardado (pregunta",
|
|
45
|
+
"session_incomplete": "🔄 Sesión incompleta detectada:",
|
|
46
|
+
"project_label": "Proyecto:",
|
|
47
|
+
"progress_label": "Progreso:",
|
|
48
|
+
"questions_label": "preguntas",
|
|
49
|
+
"last_update": "Última actualización:",
|
|
50
|
+
"continue_prompt": "¿Continuar desde la pregunta",
|
|
51
|
+
"continue_yes_no": "[s/N]:",
|
|
52
|
+
"session_restored": "Sesión restaurada. Continuando desde pregunta",
|
|
53
|
+
"new_session": "Creando nueva sesión..."
|
|
54
|
+
},
|
|
55
|
+
"session": {
|
|
56
|
+
"analyzing_legacy": "Analizando proyecto existente",
|
|
57
|
+
"dir_not_found": "Directorio no encontrado:",
|
|
58
|
+
"cleanup_old": "Limpiando sesiones antiguas..."
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"analyzing_project": "🔍 Analizando proyecto...",
|
|
62
|
+
"detecting_type": "🔎 Detectando tipo de proyecto...",
|
|
63
|
+
"generating_tasks": "📋 Generando tareas...",
|
|
64
|
+
"estimating_effort": "⏱️ Estimando esfuerzo...",
|
|
65
|
+
"creating_structure": "🏗️ Creando estructura...",
|
|
66
|
+
"parsing_contract": "📄 Parseando CONTRATO.md...",
|
|
67
|
+
"generating_backlog": "📊 Generando backlog...",
|
|
68
|
+
"error": "❌ Error",
|
|
69
|
+
"success": "✅ Éxito",
|
|
70
|
+
"warning": "⚠️ Advertencia",
|
|
71
|
+
"info": "ℹ️ Info"
|
|
72
|
+
},
|
|
73
|
+
"errors": {
|
|
74
|
+
"no_path": "Debes proporcionar la ruta del proyecto",
|
|
75
|
+
"invalid_path": "La ruta no existe",
|
|
76
|
+
"no_file": "Archivo no encontrado",
|
|
77
|
+
"no_contract": "CONTRATO.md no encontrado",
|
|
78
|
+
"usage": "Uso",
|
|
79
|
+
"missing_token": "Token de API no configurado",
|
|
80
|
+
"missing_config": "Archivo de configuración no encontrado"
|
|
81
|
+
},
|
|
82
|
+
"analyze": {
|
|
83
|
+
"header": "📊 SpecLeap — Análisis de Proyecto Legacy",
|
|
84
|
+
"scanning": "Escaneando estructura de archivos...",
|
|
85
|
+
"detecting_stack": "Detectando stack tecnológico...",
|
|
86
|
+
"calculating_debt": "Calculando deuda técnica...",
|
|
87
|
+
"estimating": "Estimando esfuerzo de adopción...",
|
|
88
|
+
"generating_contract": "Generando CONTRATO-LEGACY.md...",
|
|
89
|
+
"complete": "✅ Análisis completado",
|
|
90
|
+
"results_saved": "Resultados guardados en"
|
|
91
|
+
},
|
|
92
|
+
"asana": {
|
|
93
|
+
"header": "📊 SpecLeap — Generador de Backlog Asana",
|
|
94
|
+
"checking_token": "Verificando credenciales Asana...",
|
|
95
|
+
"selecting_workspace": "Selecciona workspace",
|
|
96
|
+
"creating_project": "Creando proyecto en Asana...",
|
|
97
|
+
"creating_sections": "Creando secciones...",
|
|
98
|
+
"creating_tasks": "Creando tareas",
|
|
99
|
+
"complete": "✅ Backlog generado en Asana",
|
|
100
|
+
"view_project": "Ver proyecto"
|
|
101
|
+
},
|
|
102
|
+
"parse": {
|
|
103
|
+
"header": "📄 SpecLeap — Parser de CONTRATO.md",
|
|
104
|
+
"reading": "Leyendo CONTRATO.md...",
|
|
105
|
+
"extracting": "Extrayendo módulos y features...",
|
|
106
|
+
"validating": "Validando estructura...",
|
|
107
|
+
"generating_json": "Generando JSON...",
|
|
108
|
+
"complete": "✅ Parsing completado"
|
|
109
|
+
},
|
|
110
|
+
"quality": {
|
|
111
|
+
"baseline": {
|
|
112
|
+
"init_start": "Inicializando baseline de calidad...",
|
|
113
|
+
"init_done": "Baseline creado en .quality/baselines/baseline.json",
|
|
114
|
+
"already_exists": "El baseline ya existe, no se sobrescribe:",
|
|
115
|
+
"snapshot_start": "Generando snapshot del repositorio...",
|
|
116
|
+
"snapshot_done": "Snapshot actualizado",
|
|
117
|
+
"missing_baseline": "Falta .quality/baselines/baseline.json",
|
|
118
|
+
"run_init_first": "Ejecuta primero: bash scripts/quality-baseline.sh init",
|
|
119
|
+
"jq_required": "Este comando requiere 'jq'. Instálalo con: brew install jq",
|
|
120
|
+
"evidence_start": "Creando carpeta de evidence para",
|
|
121
|
+
"evidence_done": "Estructura evidence creada en",
|
|
122
|
+
"missing_slug": "Falta el nombre de la feature.",
|
|
123
|
+
"invalid_slug": "El slug solo puede contener minúsculas, números y guiones:",
|
|
124
|
+
"usage": "Uso: bash scripts/quality-baseline.sh [init|snapshot|new-evidence FEATURE-SLUG]"
|
|
125
|
+
},
|
|
126
|
+
"healing": {
|
|
127
|
+
"log_done": "Entrada añadida a",
|
|
128
|
+
"missing_feature": "Falta el argumento --feature",
|
|
129
|
+
"missing_phase": "Falta el argumento --phase",
|
|
130
|
+
"missing_action": "Falta el argumento --action",
|
|
131
|
+
"severity_invalid": "Severity no válido (info/warn/error):",
|
|
132
|
+
"no_evidence": "No existe carpeta evidence para la feature:",
|
|
133
|
+
"run_new_evidence_first": "Ejecuta primero: bash scripts/quality-baseline.sh new-evidence FEATURE-SLUG",
|
|
134
|
+
"no_log": "No hay healing.jsonl todavía para:",
|
|
135
|
+
"jq_required": "Este comando requiere 'jq'. Instálalo con: brew install jq",
|
|
136
|
+
"entries": "entradas",
|
|
137
|
+
"total_entries": "Total",
|
|
138
|
+
"by_severity": "Por severidad",
|
|
139
|
+
"by_phase": "Por fase",
|
|
140
|
+
"by_action": "Por acción",
|
|
141
|
+
"usage_log": "Uso: bash scripts/quality-healing.sh log --feature SLUG --phase P --severity S --action A --detail D [--file F]",
|
|
142
|
+
"usage_show": "Uso: bash scripts/quality-healing.sh show --feature SLUG [--last N]",
|
|
143
|
+
"usage_stats": "Uso: bash scripts/quality-healing.sh stats --feature SLUG",
|
|
144
|
+
"usage": "Uso: bash scripts/quality-healing.sh [log|show|stats] --feature SLUG ..."
|
|
145
|
+
},
|
|
146
|
+
"spec_guard": {
|
|
147
|
+
"blocked_header": "SpecLeap: escritura bloqueada en rama protegida",
|
|
148
|
+
"blocked_branch": "Estás en la rama protegida:",
|
|
149
|
+
"hint_create_branch": "Crea una feature branch antes de escribir código:",
|
|
150
|
+
"hint_command": "git checkout -b feature/[proyecto]-[ticket]-[descripción]",
|
|
151
|
+
"hint_example": "Ejemplo: git checkout -b feature/app-tienda-23-cart",
|
|
152
|
+
"hint_flow": "Flujo: feature → stage → main (vía PR)"
|
|
153
|
+
},
|
|
154
|
+
"compliance": {
|
|
155
|
+
"header": "SpecLeap Compliance Audit",
|
|
156
|
+
"version": "Version",
|
|
157
|
+
"skills": "Skills",
|
|
158
|
+
"i18n": "i18n",
|
|
159
|
+
"hooks": "Hooks",
|
|
160
|
+
"baseline": "Baseline",
|
|
161
|
+
"docs": "Docs",
|
|
162
|
+
"total": "Total",
|
|
163
|
+
"observations": "Observaciones",
|
|
164
|
+
"details_saved": "Detalle guardado en:",
|
|
165
|
+
"version_mismatch": "Versión del package.json no coincide con el último tag:",
|
|
166
|
+
"skills_mismatch": "Conteo de skills discrepa:",
|
|
167
|
+
"i18n_missing_file": "Falta archivo de i18n (es.json o en.json)",
|
|
168
|
+
"i18n_missing_key": "Clave ausente en",
|
|
169
|
+
"hook_missing": "Falta el archivo del hook:",
|
|
170
|
+
"hook_not_shebang": "Falta shebang correcto en:",
|
|
171
|
+
"hook_not_exec": "No es ejecutable (chmod +x):",
|
|
172
|
+
"hook_not_in_template": "Hook no referenciado en settings.json.template",
|
|
173
|
+
"baseline_stale": "repo_snapshot desactualizado (ejecuta: bash scripts/quality-baseline.sh snapshot)",
|
|
174
|
+
"docs_residual": "Residuo de marca pasada en"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SpecLeap i18n Helper
|
|
3
|
+
# Carga traducciones según el idioma configurado
|
|
4
|
+
|
|
5
|
+
# Detectar directorio raíz de SpecLeap
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
SPECLEAP_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
8
|
+
|
|
9
|
+
# Detectar idioma configurado
|
|
10
|
+
if [ -f "$SPECLEAP_ROOT/.specleap/config.json" ]; then
|
|
11
|
+
SPECLEAP_LANG=$(grep -o '"language": "[^"]*"' "$SPECLEAP_ROOT/.specleap/config.json" | cut -d'"' -f4)
|
|
12
|
+
else
|
|
13
|
+
SPECLEAP_LANG="${SPECLEAP_LANG:-es}"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Archivo de traducciones
|
|
17
|
+
I18N_FILE="$SPECLEAP_ROOT/.specleap/i18n/${SPECLEAP_LANG}.json"
|
|
18
|
+
|
|
19
|
+
# Función para obtener traducción
|
|
20
|
+
# Uso: t "questionnaire.title"
|
|
21
|
+
# t "errors.no_path"
|
|
22
|
+
t() {
|
|
23
|
+
local key=$1
|
|
24
|
+
|
|
25
|
+
if [ ! -f "$I18N_FILE" ]; then
|
|
26
|
+
echo "$key"
|
|
27
|
+
return
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Dividir la clave en partes (ej: "questionnaire.title" → ["questionnaire", "title"])
|
|
31
|
+
IFS='.' read -ra PARTS <<< "$key"
|
|
32
|
+
|
|
33
|
+
# Usar jq si está disponible (más robusto)
|
|
34
|
+
if command -v jq &> /dev/null; then
|
|
35
|
+
local jq_query=".${PARTS[0]}"
|
|
36
|
+
for (( i=1; i<${#PARTS[@]}; i++ )); do
|
|
37
|
+
jq_query="${jq_query}.${PARTS[$i]}"
|
|
38
|
+
done
|
|
39
|
+
local value=$(jq -r "$jq_query" "$I18N_FILE" 2>/dev/null)
|
|
40
|
+
|
|
41
|
+
if [ "$value" != "null" ] && [ -n "$value" ]; then
|
|
42
|
+
echo "$value"
|
|
43
|
+
else
|
|
44
|
+
echo "$key"
|
|
45
|
+
fi
|
|
46
|
+
else
|
|
47
|
+
# Fallback: grep simple (menos robusto, pero funciona sin jq)
|
|
48
|
+
local search_key="${PARTS[-1]}"
|
|
49
|
+
local value=$(grep "\"$search_key\":" "$I18N_FILE" | head -1 | sed 's/.*: "\(.*\)".*/\1/')
|
|
50
|
+
|
|
51
|
+
if [ -n "$value" ]; then
|
|
52
|
+
echo "$value"
|
|
53
|
+
else
|
|
54
|
+
echo "$key"
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Exportar variables y funciones
|
|
60
|
+
export SPECLEAP_LANG
|
|
61
|
+
export SPECLEAP_ROOT
|
|
62
|
+
export I18N_FILE
|
|
63
|
+
export -f t 2>/dev/null || true
|