refacil-sdd-ai 4.2.4 → 4.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.
Files changed (47) hide show
  1. package/README.md +239 -214
  2. package/agents/auditor.md +189 -184
  3. package/agents/debugger.md +201 -204
  4. package/agents/implementer.md +150 -149
  5. package/agents/investigator.md +80 -89
  6. package/agents/proposer.md +219 -124
  7. package/agents/tester.md +140 -144
  8. package/agents/validator.md +153 -145
  9. package/bin/cli.js +158 -116
  10. package/lib/bus/askFulfillment.js +17 -17
  11. package/lib/bus/broker.js +599 -599
  12. package/lib/bus/ui/app.js +318 -318
  13. package/lib/commands/sdd.js +447 -0
  14. package/lib/hooks.js +236 -236
  15. package/lib/installer.js +58 -2
  16. package/lib/methodology-migration-pending.js +101 -136
  17. package/package.json +4 -6
  18. package/skills/apply/SKILL.md +139 -120
  19. package/skills/archive/SKILL.md +105 -107
  20. package/skills/ask/SKILL.md +78 -78
  21. package/skills/attend/SKILL.md +70 -70
  22. package/skills/bug/SKILL.md +121 -128
  23. package/skills/explore/SKILL.md +73 -63
  24. package/skills/guide/SKILL.md +79 -79
  25. package/skills/inbox/SKILL.md +43 -43
  26. package/skills/join/SKILL.md +82 -82
  27. package/skills/prereqs/BUS-CROSS-REPO.md +55 -55
  28. package/skills/prereqs/METHODOLOGY-CONTRACT.md +122 -115
  29. package/skills/prereqs/SKILL.md +30 -37
  30. package/skills/propose/SKILL.md +103 -102
  31. package/skills/reply/SKILL.md +44 -44
  32. package/skills/review/SKILL.md +163 -126
  33. package/skills/review/checklist-back.md +92 -92
  34. package/skills/review/checklist-front.md +72 -72
  35. package/skills/review/checklist.md +114 -114
  36. package/skills/say/SKILL.md +38 -38
  37. package/skills/setup/SKILL.md +85 -141
  38. package/skills/setup/troubleshooting.md +38 -35
  39. package/skills/test/SKILL.md +104 -94
  40. package/skills/test/testing-patterns.md +63 -63
  41. package/skills/up-code/SKILL.md +108 -108
  42. package/skills/update/SKILL.md +109 -132
  43. package/skills/verify/SKILL.md +159 -132
  44. package/templates/compact-guidance.md +45 -45
  45. package/templates/methodology-guide.md +46 -42
  46. package/config/openspec-config.yaml +0 -8
  47. package/skills/prereqs/OPENSPEC-DELTAS.md +0 -51
@@ -1,114 +1,114 @@
1
- # Checklist General Equipo Refacil
2
-
3
- > Aplica a **todos** los repositorios (backend, frontend, fullstack), independiente del lenguaje o framework.
4
- > Antes de evaluar, lee `AGENTS.md` del proyecto para adaptar cada seccion al stack real.
5
- > Si `AGENTS.md` no existe, aplica este checklist como baseline y marca N/A en reglas que dependan de convenciones no documentadas.
6
- > **Ademas de este checklist**, carga el checklist especifico del tipo de proyecto:
7
- > - Backend: [checklist-back.md](checklist-back.md)
8
- > - Frontend: [checklist-front.md](checklist-front.md)
9
-
10
- ## Como usar este checklist (metodologia)
11
- 1. Define alcance de revision: `$ARGUMENTS` > `openspec/changes/` > `git diff`.
12
- 2. Evalua primero bloqueantes: Alcance, Spec, Testing y Seguridad.
13
- 3. Luego evalua Calidad, Arquitectura, Errores, Dependencias y Mantenibilidad.
14
- 4. Marca cada item como PASS, FAIL o N/A con una justificacion breve.
15
- 5. Para cada FAIL, agrega severidad: CRITICO, ALTO, MEDIO o BAJO.
16
- 6. Si hay muchos FAIL, prioriza los 5 de mayor impacto.
17
-
18
- ## 1. Alcance y foco
19
- - El cambio hace **una sola cosa** (no mezcla features con refactors, ni correcciones con mejoras no solicitadas)
20
- - No se implemento funcionalidad fuera del alcance de la spec o del bug reportado
21
- - Si hay cambios no relacionados, deben estar en un commit o PR separado
22
- - El tamano del cambio es razonable para revisar (si es demasiado grande, sugerir dividir)
23
-
24
- ## 2. Conformidad con Spec
25
- - Todos los criterios de aceptacion de la spec estan cubiertos
26
- - Los criterios de rechazo (edge cases) estan manejados
27
- - El modelo de datos coincide con lo especificado
28
- - No hay diferencias entre lo que dice la spec y lo que hace el codigo
29
-
30
- ## 3. Calidad de Codigo
31
-
32
- ### Tipado (estandar Refacil)
33
- - No hay uso de tipos genericos sin restriccion (ej. `any`, `object`, `dynamic`) — usar interfaces, tipos concretos o genericos tipados
34
- - Se definen interfaces/DTOs para el transporte de datos entre capas
35
-
36
- ### Validacion de objetos (estandar Refacil)
37
- - Se valida el objeto Y la propiedad antes de acceder (null-safe access o guard clause)
38
- - No hay accesos directos a propiedades de objetos que pueden ser nulos o indefinidos
39
-
40
- ### Naming (estandar Refacil)
41
- - **Variables**: camelCase — **Clases**: PascalCase — **Archivos**: kebab-case con tipo de componente
42
- - Nombres autodocumentados: el nombre explica el fin del componente sin necesidad de comentarios
43
-
44
- ### Limpieza
45
- - El codigo sigue los patrones existentes del repo (consultar AGENTS.md)
46
- - No hay codigo duplicado que pueda extraerse
47
- - Se prefieren variables inmutables (evitar mutaciones innecesarias)
48
- - No hay prints/logs de debug sueltos, TODO sin ticket asociado, o codigo comentado sin razon
49
- - Se usan enums y constantes para valores fijosvalores configurables van en archivos de configuracion, no hardcodeados
50
- - Los imports usan los alias del proyecto (si aplica)
51
- - No hay dependencias circulares nuevas
52
-
53
- ## 4. Arquitectura
54
- - **SRP**: cada clase/funcion tiene una sola responsabilidad
55
- - **KISS**: la solucion es tan simple como sea posible — no hay sobreingenieria ni abstracciones prematuras
56
- - La logica esta separada en unidades con un solo fin, reutilizables
57
- - No se envian mas de 4 parametros a un metodo si se necesitan mas, encapsular en un objeto/DTO
58
- - Se respetan los limites y capas definidos en AGENTS.md
59
- - No se introduce acoplamiento innecesario entre modulos o servicios
60
-
61
- > La arquitectura varia por proyecto. Consultar AGENTS.md para saber cual aplica.
62
-
63
- ## 5. Manejo de errores
64
- - Los errores se manejan de forma consistente con el resto del proyecto
65
- - Los mensajes de error son utiles para diagnosticar (que fallo, en que contexto)
66
- - No se exponen detalles internos al usuario/consumidor (stack traces, rutas internas, IDs de BD)
67
- - Los errores esperados (validacion, negocio) se distinguen de los inesperados (sistema, infraestructura)
68
- - No hay errores silenciados (catch vacio sin log ni manejo)
69
-
70
- ## 6. Testing
71
- - Cada archivo nuevo/modificado tiene su archivo de test correspondiente
72
- - Los tests cubren los criterios de aceptacion de la spec
73
- - Hay tests para edge cases y escenarios de error
74
- - Los tests validan **comportamiento**, no detalles de implementacion (no se rompen al refactorizar)
75
- - Los mocks son minimos y necesarios no se mockea lo que se puede probar directamente
76
- - Los tests son independientes entre si (no dependen de orden de ejecucion ni de estado compartido)
77
- - Coverage >= 80% en archivos nuevos
78
- - Los tests pasan sin errores (ejecutar el comando de test indicado en AGENTS.md)
79
-
80
- ## 7. Seguridad
81
- - No hay secrets hardcodeados (passwords, API keys, tokens, URLs internas de servicios)
82
- - Los inputs del usuario estan validados antes de procesarse
83
- - Los endpoints o rutas sensibles tienen autorizacion adecuada
84
- - No se expone informacion sensible en logs, respuestas de error o codigo fuente del cliente
85
- - No hay dependencias con vulnerabilidades conocidas criticas (verificar si el proyecto tiene audit configurado)
86
-
87
- ## 8. Dependencias
88
- - Las dependencias nuevas estan justificadas (no se agrega una libreria para algo que se puede hacer en pocas lineas)
89
- - La licencia es compatible con el proyecto
90
- - La dependencia esta activamente mantenida (no abandonada)
91
- - No duplica funcionalidad que ya existe en el proyecto o en otra dependencia instalada
92
- - La version esta fijada o usa rango seguro (no `*` ni `latest`)
93
-
94
- ## 9. Mantenibilidad y observabilidad
95
- - El codigo es autoexplicativo (comentarios solo donde la logica no es obvia)
96
- - Los archivos no son excesivamente largos (< 400 lineas como guia)
97
- - Si algo falla en produccion, hay suficiente informacion para diagnosticar (logs, trazas, contexto en errores)
98
- - Los cambios en configuracion estan documentados (variables de entorno nuevas, flags, parametros)
99
-
100
- ## 10. Git y Deploy
101
- - Los commits son atomicos y tienen mensajes descriptivos
102
- - No hay archivos generados, temporales o sensibles en el commit (verificar .gitignore)
103
- - No hay breaking changes no documentados
104
- - Si hay migraciones, son reversibles y no rompen datos existentes
105
-
106
- ## 11. Reglas especificas del proyecto
107
- - Consultar la seccion "Reglas criticas" de AGENTS.md
108
- - Evaluar contra las reglas de "Siempre hacer", "Nunca hacer" y "Preguntar primero"
109
- - Si AGENTS.md define reglas adicionales, verificar su cumplimiento
110
-
111
- ## Criterio de salida del review
112
- - **APROBADO**: No hay FAILs CRITICOS/ALTOS.
113
- - **APROBADO CON OBSERVACIONES**: Solo FAILs MEDIOS/BAJOS.
114
- - **REQUIERE CORRECCIONES**: Existe al menos un FAIL CRITICO/ALTO.
1
+ # General Checklist — Refacil Team
2
+
3
+ > Applies to **all** repositories (backend, frontend, fullstack), regardless of language or framework.
4
+ > Before evaluating, read the project's `AGENTS.md` to adapt each section to the actual stack.
5
+ > If `AGENTS.md` does not exist, apply this checklist as a baseline and mark N/A for rules that depend on undocumented conventions.
6
+ > **In addition to this checklist**, load the project-type specific checklist:
7
+ > - Backend: [checklist-back.md](checklist-back.md)
8
+ > - Frontend: [checklist-front.md](checklist-front.md)
9
+
10
+ ## How to use this checklist (methodology)
11
+ 1. Define review scope: `$ARGUMENTS` > `refacil-sdd/changes/` > `git diff`.
12
+ 2. Evaluate blockers first: Scope, Spec, Testing, and Security.
13
+ 3. Then evaluate Quality, Architecture, Errors, Dependencies, and Maintainability.
14
+ 4. Mark each item as PASS, FAIL, or N/A with a brief justification.
15
+ 5. For each FAIL, add severity: CRITICAL, HIGH, MEDIUM, or LOW.
16
+ 6. If there are many FAILs, prioritize the 5 with the highest impact.
17
+
18
+ ## 1. Scope and focus
19
+ - The change does **one single thing** (does not mix features with refactors, or fixes with unsolicited improvements)
20
+ - No functionality was implemented outside the scope of the spec or the reported bug
21
+ - If there are unrelated changes, they must be in a separate commit or PR
22
+ - The change size is reasonable to review (if too large, suggest dividing)
23
+
24
+ ## 2. Spec compliance
25
+ - All acceptance criteria from the spec are covered
26
+ - Rejection criteria (edge cases) are handled
27
+ - The data model matches what was specified
28
+ - There are no differences between what the spec says and what the code does
29
+
30
+ ## 3. Code quality
31
+
32
+ ### Typing (Refacil standard)
33
+ - No use of unconstrained generic types (e.g. `any`, `object`, `dynamic`) — use interfaces, concrete types, or typed generics
34
+ - Interfaces/DTOs are defined for data transport between layers
35
+
36
+ ### Object validation (Refacil standard)
37
+ - Both the object AND the property are validated before accessing (null-safe access or guard clause)
38
+ - No direct property access on objects that may be null or undefined
39
+
40
+ ### Naming (Refacil standard)
41
+ - **Variables**: camelCase — **Classes**: PascalCase — **Files**: kebab-case with component type
42
+ - Self-documenting names: the name explains the component's purpose without needing comments
43
+
44
+ ### Cleanliness
45
+ - The code follows existing repo patterns (check AGENTS.md)
46
+ - No duplicated code that could be extracted
47
+ - Immutable variables are preferred (avoid unnecessary mutations)
48
+ - No loose debug prints/logs, TODOs without an associated ticket, or commented-out code without reason
49
+ - Enums and constants are used for fixed valuesconfigurable values go in configuration files, not hardcoded
50
+ - Imports use project aliases (if applicable)
51
+ - No new circular dependencies
52
+
53
+ ## 4. Architecture
54
+ - **SRP**: each class/function has a single responsibility
55
+ - **KISS**: the solution is as simple as possible — no over-engineering or premature abstractions
56
+ - Logic is separated into single-purpose, reusable units
57
+ - No more than 4 parameters are passed to a methodif more are needed, encapsulate in an object/DTO
58
+ - The boundaries and layers defined in AGENTS.md are respected
59
+ - No unnecessary coupling is introduced between modules or services
60
+
61
+ > Architecture varies by project. Consult AGENTS.md to know which applies.
62
+
63
+ ## 5. Error handling
64
+ - Errors are handled consistently with the rest of the project
65
+ - Error messages are useful for diagnosis (what failed, in what context)
66
+ - Internal details are not exposed to the user/consumer (stack traces, internal paths, DB IDs)
67
+ - Expected errors (validation, business) are distinguished from unexpected ones (system, infrastructure)
68
+ - No silenced errors (empty catch without log or handling)
69
+
70
+ ## 6. Testing
71
+ - Each new/modified file has a corresponding test file
72
+ - Tests cover the acceptance criteria from the spec
73
+ - There are tests for edge cases and error scenarios
74
+ - Tests validate **behavior**, not implementation details (they do not break when refactoring)
75
+ - Mocks are minimal and necessarydo not mock what can be tested directly
76
+ - Tests are independent of each other (do not depend on execution order or shared state)
77
+ - Coverage >= 80% on new files
78
+ - Tests pass without errors (run the test command indicated in AGENTS.md)
79
+
80
+ ## 7. Security
81
+ - No hardcoded secrets (passwords, API keys, tokens, internal service URLs)
82
+ - User inputs are validated before processing
83
+ - Sensitive endpoints or routes have appropriate authorization
84
+ - Sensitive information is not exposed in logs, error responses, or client source code
85
+ - No dependencies with known critical vulnerabilities (check if the project has audit configured)
86
+
87
+ ## 8. Dependencies
88
+ - New dependencies are justified (no library added for something that can be done in a few lines)
89
+ - The license is compatible with the project
90
+ - The dependency is actively maintained (not abandoned)
91
+ - Does not duplicate functionality that already exists in the project or another installed dependency
92
+ - The version is pinned or uses a safe range (not `*` or `latest`)
93
+
94
+ ## 9. Maintainability and observability
95
+ - The code is self-explanatory (comments only where logic is not obvious)
96
+ - Files are not excessively long (< 400 lines as a guideline)
97
+ - If something fails in production, there is enough information to diagnose (logs, traces, context in errors)
98
+ - Configuration changes are documented (new environment variables, flags, parameters)
99
+
100
+ ## 10. Git and Deploy
101
+ - Commits are atomic and have descriptive messages
102
+ - No generated, temporary, or sensitive files in the commit (check .gitignore)
103
+ - No undocumented breaking changes
104
+ - If there are migrations, they are reversible and do not break existing data
105
+
106
+ ## 11. Project-specific rules
107
+ - Consult the "Critical rules" section of AGENTS.md
108
+ - Evaluate against the "Always do", "Never do", and "Ask first" rules
109
+ - If AGENTS.md defines additional rules, verify their compliance
110
+
111
+ ## Review exit criteria
112
+ - **APROBADO**: No CRITICAL/HIGH FAILs.
113
+ - **APROBADO CON OBSERVACIONES**: Only MEDIUM/LOW FAILs.
114
+ - **REQUIERE CORRECCIONES**: At least one CRITICAL/HIGH FAIL exists.
@@ -1,38 +1,38 @@
1
- ---
2
- name: refacil:say
3
- description: Enviar un mensaje a toda la sala del bus (broadcast). Para anuncios generales, no para preguntas dirigidas.
4
- user-invocable: true
5
- ---
6
-
7
- # refacil:say — Broadcast a la sala
8
-
9
- Envía un mensaje visible para todos los miembros de la sala en la que está esta sesión. **$ARGUMENTS** = texto del mensaje.
10
-
11
- ## Instrucciones
12
-
13
- ### Paso 1: Ejecutar el broadcast
14
-
15
- Ejecuta vía `Bash`:
16
-
17
- ```bash
18
- refacil-sdd-ai bus say --text "<texto>"
19
- ```
20
-
21
- Donde `<texto>` es $ARGUMENTS (o lo que el usuario te pidió anunciar). Entrecomilla el texto correctamente.
22
-
23
- ### Paso 2: Confirmar
24
-
25
- Reporta al usuario que el mensaje se envió con su id.
26
-
27
- ## Cuándo usar `say` vs otros comandos del bus
28
-
29
- - **`say`**: anuncio general a la sala — "terminé mi parte", "cambié el contrato de X", "voy a reiniciar el servicio"
30
- - **`ask`**: pregunta dirigida a otra sesión específica (usa `/refacil:ask`)
31
- - **`reply`**: responder una pregunta que te hicieron (usa `/refacil:reply`)
32
-
33
- ## Reglas
34
-
35
- - La sesión debe estar unida a una sala; si no, el CLI retornará error.
36
- - Mensaje corto y útilevita spam en el bus.
37
- - Si el usuario pide "avisa al equipo ...", usa `say`. Si pide "pregúntale a X ...", usa `ask`.
38
- - Si un hilo en sala **acuerda cambios en este repo**, sigue `refacil-prereqs/BUS-CROSS-REPO.md`: **`/refacil:propose`** y cierre por bus con quien pidio el trabajo al terminar.
1
+ ---
2
+ name: refacil:say
3
+ description: Send a message to the entire bus room (broadcast). For general announcements, not directed questions.
4
+ user-invocable: true
5
+ ---
6
+
7
+ # refacil:say — Broadcast to the room
8
+
9
+ Sends a message visible to all members of the room this session is in. **$ARGUMENTS** = message text.
10
+
11
+ ## Instructions
12
+
13
+ ### Step 1: Execute the broadcast
14
+
15
+ Run via `Bash`:
16
+
17
+ ```bash
18
+ refacil-sdd-ai bus say --text "<text>"
19
+ ```
20
+
21
+ Where `<text>` is $ARGUMENTS (or what the user asked you to announce). Correctly quote the text.
22
+
23
+ ### Step 2: Confirm
24
+
25
+ Report to the user that the message was sent with its id.
26
+
27
+ ## When to use `say` vs other bus commands
28
+
29
+ - **`say`**: general announcement to the room — "I finished my part", "I changed the X contract", "I'm going to restart the service"
30
+ - **`ask`**: directed question to another specific session (use `/refacil:ask`)
31
+ - **`reply`**: respond to a question you were asked (use `/refacil:reply`)
32
+
33
+ ## Rules
34
+
35
+ - The session must be joined to a room; if not, the CLI will return an error.
36
+ - Short and useful messageavoid bus spam.
37
+ - If the user asks "tell the team ...", use `say`. If they ask "ask X ...", use `ask`.
38
+ - If a room thread **agrees on changes in this repo**, follow `refacil-prereqs/BUS-CROSS-REPO.md`: **`/refacil:propose`** and close via bus with whoever requested the work when done.