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,132 +1,159 @@
1
- ---
2
- name: refacil:verify
3
- description: Validar que la implementacion cumple con las specs — construye un briefing con testCommand y criterios CA/CR, delega al sub-agente refacil-validator para el reporte y maneja correcciones con aprobacion del usuario
4
- user-invocable: true
5
- ---
6
-
7
- # refacil:verify — Entrypoint de Verificacion
8
-
9
- Este skill es un **wrapper** que construye un **briefing estructurado** con el comando de test y los criterios ya extraidos, delega el analisis al sub-agente `refacil-validator`, y maneja la interaccion con el usuario para aplicar correcciones.
10
-
11
- **Prerequisitos**: perfil `openspec` de `refacil-prereqs/SKILL.md` + reglas de `METHODOLOGY-CONTRACT.md`.
12
-
13
- ## Flujo
14
-
15
- ### Paso 0: Resolver scope
16
-
17
- Determina el scope antes de invocar al sub-agente. Prioriza este orden:
18
- 1. Argumento del usuario (`$ARGUMENTS`).
19
- 2. Cambio activo en `openspec/changes/`.
20
- 3. Si hay multiples cambios activos y no hay `$ARGUMENTS`, **detente** y pide al usuario seleccionar explicitamente cual cambio validar.
21
-
22
- No invoques al sub-agente con scope ambiguo.
23
-
24
- ### Paso 0.5: Archivos ocultos bajo `openspec/changes/` (evitar falsos negativos)
25
-
26
- Si **esta sesion** inspecciona el directorio del cambio antes o despues de delegar, aplica **`refacil-prereqs/METHODOLOGY-CONTRACT.md` §8**.
27
-
28
- ### Paso 0.6: Construir briefing para el sub-agente (reduce tool calls del validator)
29
-
30
- Antes de invocar al sub-agente, extrae el contexto que de otro modo el validator calcularía por su cuenta:
31
-
32
- 1. **Comando de test** lee `refacil-prereqs/METHODOLOGY-CONTRACT.md` §3. Extrae el comando exacto.
33
-
34
- 2. **Criterios CA/CR** si hay cambio activo, lee la especificacion en `openspec/changes/<changeName>/`:
35
- - `specs.md` si existe, y/o archivos bajo `specs/` (recursivo).
36
- - Extrae la lista de CA-XX (criterios de aceptacion) y CR-XX (criterios de rechazo) con su descripcion.
37
- - Si no hay specs o el scope es `git-diff`, omite este campo.
38
-
39
- 3. **Archivos del scope** — ejecuta `git diff --name-only HEAD` para obtener los archivos modificados en este cambio.
40
-
41
- Construye el bloque BRIEFING:
42
-
43
- ```
44
- BRIEFING:
45
- changeName: <nombre o null si scope=git-diff>
46
- testCommand: <comando exacto>
47
- criteria:
48
- acceptance:
49
- - CA-01: <descripcion>
50
- - CA-02: <descripcion>
51
- rejection:
52
- - CR-01: <descripcion>
53
- changedFiles: [ruta/archivo-1.ts, ...]
54
- mode: conciso | detailed
55
- ```
56
-
57
- ### Paso 1: Delegar al sub-agente refacil-validator
58
-
59
- Invoca a `refacil-validator` pasandole el BRIEFING del paso anterior.
60
-
61
- El sub-agente:
62
- - Usa `testCommand` del briefing directamente (sin buscarlo en METHODOLOGY-CONTRACT.md).
63
- - Usa `criteria` del briefing para la verificacion (sin re-leer specs desde cero).
64
- - Usa `changedFiles` para enfocar el scope de verificacion OpenSpec.
65
- - Delega a OpenSpec verify para issues contra la spec.
66
- - Corre los tests y verifica coverage.
67
- - Opcionalmente consulta el bus cross-repo ante ambigüedades.
68
- - Retorna reporte combinado + bloque JSON fenced como ` ```refacil-verify-result `.
69
-
70
- ### Paso 2: Presentar el reporte
71
-
72
- Muestra el **reporte combinado** (todo lo anterior al bloque `refacil-verify-result`) al usuario. No muestres el bloque JSON — es metadata interna.
73
-
74
- **Si el sub-agente retorno un error de scope** (sin bloque JSON): propaga al usuario y pide clarificacion.
75
-
76
- ### Paso 3: Procesar el resultado
77
-
78
- Parsea el bloque ` ```refacil-verify-result ` del sub-agente.
79
-
80
- #### Si `result` es APROBADO:
81
-
82
- ```
83
- RESULTADO: APROBADO
84
-
85
- El siguiente paso es el review de calidad con checklist del equipo.
86
- Quieres que continue con `/refacil:review`?
87
- ```
88
-
89
- #### Si `result` es REQUIERE CORRECCIONES:
90
-
91
- Presenta los issues y pregunta:
92
-
93
- ```
94
- RESULTADO: REQUIERE CORRECCIONES
95
-
96
- Correcciones necesarias:
97
- 1. [CRITICAL/WARNING] [descripcion] — [fix sugerido]
98
- 2. ...
99
-
100
- Quieres que aplique estas correcciones? (si/no)
101
- - Si: aplicare los fixes y re-verificare automaticamente
102
- - No: puedes corregirlos manualmente y luego continuo con /refacil:verify
103
- ```
104
-
105
- ### Paso 4: Aplicar correcciones (si el usuario acepta)
106
-
107
- **Solo aplica fixes despues de aprobacion explicita del usuario.**
108
-
109
- 1. Aplica SOLO las correcciones listadas — no agregar funcionalidad nueva, no refactorizar codigo no relacionado.
110
- 2. Si hay tests que necesitan ajuste, ajustarlos tambien.
111
- 3. Muestra resumen de archivos modificados.
112
- 4. **Re-ejecuta automaticamente desde el Paso 1** (re-invoca al sub-agente con el mismo briefing) para confirmar que las correcciones resolvieron los issues.
113
- 5. Maximo **2 rondas** de correccion automatica. Si persisten issues, listarlos para correccion manual.
114
-
115
- **Si el usuario no acepta:** lista los issues para correccion manual. Sugiere `/refacil:verify` de nuevo.
116
-
117
- ## Reglas
118
-
119
- - **Siempre construye el briefing (Paso 0.6) antes de delegar** — reduce los tool calls del sub-agente.
120
- - **Siempre delega al sub-agente** para el analisis. No repliques aqui la logica de lectura de specs ni de ejecucion de tests.
121
- - **Dotfiles en `openspec/changes/`**: nunca afirmes ausencia de `.review-passed` sin `-a`; ver §8.
122
- - **Las correcciones SOLO las aplica este wrapper** (Paso 4), despues de aprobacion explicita.
123
- - **No muestres el bloque JSON al usuario**.
124
- - **Las correcciones deben ser quirurgicas**: solo lo necesario para resolver los issues reportados.
125
- - Maximo 2 rondas de correccion automatica antes de escalar a manual.
126
- - Si el sub-agente retorno algo fuera de formato, informa: "El validator retorno un reporte no estructurado — continua manualmente."
127
- - **Continuidad del flujo**: si el resultado es APROBADO y el usuario confirma afirmativamente, invocar inmediatamente el **Skill tool** con `skill: "refacil:review"`. (Ver `METHODOLOGY-CONTRACT.md §5`.)
128
-
129
- ## Ver tambien
130
-
131
- - Sub-agente: `.claude/agents/refacil-validator.md` (fuente: `refacil-sdd-ai/agents/validator.md`)
132
- - Bus cross-repo: `refacil-prereqs/BUS-CROSS-REPO.md`
1
+ ---
2
+ name: refacil:verify
3
+ description: Validate that the implementation meets the specs — builds a briefing with testCommand and CA/CR criteria, delegates to the refacil-validator sub-agent for the report, and handles corrections with user approval
4
+ user-invocable: true
5
+ ---
6
+
7
+ # refacil:verify — Verification Entrypoint
8
+
9
+ This skill is a **wrapper** that builds a **structured briefing** with the test command and criteria already extracted, delegates the analysis to the `refacil-validator` sub-agent, and handles the interaction with the user to apply corrections.
10
+
11
+ **Prerequisites**: `sdd` profile from `refacil-prereqs/SKILL.md` + rules from `METHODOLOGY-CONTRACT.md`.
12
+
13
+ ## Flow
14
+
15
+ ### Step 0: Resolve scope
16
+
17
+ Determine the scope before invoking the sub-agent. Prioritize in this order:
18
+ 1. User argument (`$ARGUMENTS`).
19
+ 2. Active change in `refacil-sdd/changes/`.
20
+ 3. If there are multiple active changes and no `$ARGUMENTS`, **stop** and ask the user to explicitly select which change to validate.
21
+
22
+ Do not invoke the sub-agent with ambiguous scope.
23
+
24
+ If you already have a `changeName`, run `refacil-sdd-ai sdd status <changeName> --json` to verify that the artifacts exist (`artifacts.proposal`, `artifacts.tasks`, `artifacts.specs` = true). If critical artifacts are missing, inform the user before continuing.
25
+
26
+ ### Step 0.5: Hidden files under `refacil-sdd/changes/` (avoid false negatives)
27
+
28
+ If **this session** inspects the change directory before or after delegating, apply **`refacil-prereqs/METHODOLOGY-CONTRACT.md` §8**.
29
+
30
+ ### Step 0.6: Verify validator agent is installed (blocking CA-12)
31
+
32
+ Before doing anything else, check that `.claude/agents/refacil-validator.md` exists (read by explicit path or `ls -la .claude/agents/refacil-validator.md`).
33
+
34
+ **If the file does NOT exist**, stop immediately:
35
+ ```
36
+ El agente `refacil-validator` no está instalado. Ejecuta `/refacil:update` y reinicia la sesión antes de volver a correr `/refacil:verify`.
37
+ ```
38
+ Do not continue and do not escalate to any other agent.
39
+
40
+ ### Step 1: Build briefing for the sub-agent (reduces validator tool calls)
41
+
42
+ Before invoking the sub-agent, extract the context that the validator would otherwise calculate on its own:
43
+
44
+ 1. **Test command** — read `refacil-prereqs/METHODOLOGY-CONTRACT.md` §3. Extract the exact command.
45
+
46
+ 2. **CA/CR criteria** — if there is an active change, read the specification in `refacil-sdd/changes/<changeName>/`:
47
+ - `specs.md` if it exists, and/or files under `specs/` (recursively).
48
+ - Extract the list of CA-XX (acceptance criteria) and CR-XX (rejection criteria) with their descriptions.
49
+ - If there are no specs or the scope is `git-diff`, omit this field.
50
+
51
+ 3. **Scope files** — run `git diff --name-only HEAD` to get the files modified in this change.
52
+
53
+ 4. **Cross-skill memory** — if `changeName` is not null and `refacil-sdd/changes/<changeName>/memory.yaml` exists, read it and extract:
54
+ - `commandsRun` the test command(s) already executed by the tester. Include in the briefing so the validator uses the same command without re-discovering it.
55
+ - `criteriaRun` — the CA-XX/CR-XX already tested. Include in the briefing so the validator can skip re-reading specs for those criteria.
56
+ If the file does not exist, omit these fields — do not block (CR-04).
57
+
58
+ Build the BRIEFING block:
59
+
60
+ ```
61
+ BRIEFING:
62
+ changeName: <name or null if scope=git-diff>
63
+ testCommand: <exact command>
64
+ criteria:
65
+ acceptance:
66
+ - CA-01: <description>
67
+ - CA-02: <description>
68
+ rejection:
69
+ - CR-01: <description>
70
+ changedFiles: [path/file-1.ts, ...]
71
+ mode: concise | detailed
72
+ commandsRun: [<command>, ...] # from memory.yaml omit if not present
73
+ criteriaRun: [CA-01, CR-01, ...] # from memory.yaml — omit if not present
74
+ ```
75
+
76
+ ### Step 2: Delegate to the refacil-validator sub-agent
77
+
78
+ Invoke `refacil-validator` passing it the BRIEFING from the previous step.
79
+
80
+ The sub-agent:
81
+ - Uses `testCommand` from the briefing directly (without looking it up in METHODOLOGY-CONTRACT.md).
82
+ - Uses `criteria` from the briefing for verification (without re-reading specs from scratch).
83
+ - Uses `changedFiles` to focus the 3D verification on those files.
84
+ - Applies the 3D framework (Completeness/Correctness/Coherence) directly.
85
+ - Runs the tests and verifies coverage.
86
+ - Optionally consults the bus cross-repo for ambiguities.
87
+ - Returns combined report + JSON block fenced as ` ```refacil-verify-result `.
88
+
89
+ ### Step 3: Present the report
90
+
91
+ Show the user the **combined report** (everything before the `refacil-verify-result` block). Do not show the JSON block — it is internal metadata.
92
+
93
+ **If the sub-agent failed to load** (tool error, agent type not found, or no response at all): stop immediately and do NOT escalate to any other agent:
94
+ ```
95
+ The validator sub-agent could not be loaded — retry or run `/refacil:verify` again.
96
+ ```
97
+
98
+ **If the sub-agent responded but without a `refacil-verify-result` block** (unstructured output): show the raw report and stop:
99
+ ```
100
+ The validator returned an unstructured report — continue manually.
101
+ ```
102
+ Do not re-invoke a different agent.
103
+
104
+ **If the sub-agent returned a scope error** (`SCOPE_ERROR: <reason>`, without JSON block): propagate to the user and ask for clarification. This is NOT the CA-01 failsafe — the agent loaded correctly but found an ambiguous scope.
105
+
106
+ ### Step 4: Process the result
107
+
108
+ Parse the ` ```refacil-verify-result ` block from the sub-agent.
109
+
110
+ #### If `result` is APPROVED:
111
+
112
+ ```
113
+ RESULT: APPROVED
114
+
115
+ The next step is the quality review with the team checklist.
116
+ Do you want me to continue with `/refacil:review`?
117
+ ```
118
+
119
+ #### If `result` is REQUIRES_CORRECTIONS:
120
+
121
+ Present the issues and ask:
122
+
123
+ ```
124
+ RESULT: REQUIRES_CORRECTIONS
125
+
126
+ Required corrections:
127
+ 1. [CRITICAL/WARNING] [description] [suggested fix]
128
+ 2. ...
129
+
130
+ Do you want me to apply these corrections? (yes/no)
131
+ - Yes: I will apply the fixes and automatically re-verify
132
+ - No: you can fix them manually and then continue with /refacil:verify
133
+ ```
134
+
135
+ ### Step 5: Apply corrections (if the user accepts)
136
+
137
+ **Only apply fixes after explicit user approval.**
138
+
139
+ 1. Apply ONLY the listed corrections — do not add new functionality, do not refactor unrelated code.
140
+ 2. If there are tests that need adjustment, adjust them as well.
141
+ 3. Show summary of modified files.
142
+ 4. **Automatically re-run from Step 2** (re-invoke the sub-agent with the same briefing) to confirm the corrections resolved the issues.
143
+ 5. Maximum **2 rounds** of automatic correction. If issues persist, list them for manual correction.
144
+
145
+ **If the user does not accept:** list the issues for manual correction. Suggest `/refacil:verify` again.
146
+
147
+ ## Rules
148
+
149
+ - **Always build the briefing (Step 1) before delegating** — reduces the sub-agent tool calls.
150
+ - **Always delegate to the sub-agent** for the analysis. Do not replicate spec reading or test execution logic here.
151
+ - **Dotfiles in `refacil-sdd/changes/`**: never assert absence of `.review-passed` without `-a`; see §8.
152
+ - **Corrections are ONLY applied by this wrapper** (Step 5), after explicit approval.
153
+ - **Corrections must be surgical**: only what is necessary to resolve the reported issues.
154
+ - Maximum 2 rounds of automatic correction before escalating to manual.
155
+ - **Sub-agent failsafe (CA-01)**: if the validator fails to load (tool error) or returns no response — stop and inform the user. Do NOT escalate to any other agent.
156
+ - **Unstructured output (CA-02)**: if the validator responds but without a `refacil-verify-result` block — show the raw report and stop. Do NOT re-invoke another agent.
157
+ - **SCOPE_ERROR (CR-03)**: if the validator returns `SCOPE_ERROR: <reason>` — propagate and ask for clarification. CA-01 does NOT apply here.
158
+ - **Agent missing (CA-12)**: checked in Step 0.6 — stop before delegating if `.claude/agents/refacil-validator.md` is absent.
159
+ - **Flow continuity**: if the result is APPROVED and the user confirms affirmatively, immediately invoke the **Skill tool** with `skill: "refacil:review"`. (See `METHODOLOGY-CONTRACT.md §5`.)
@@ -1,45 +1,45 @@
1
- <!-- AUTO-GENERADO por refacil-sdd-ai. No edites entre los marcadores; el contenido se refresca en cada sesion. -->
2
-
3
- ## Eficiencia de tokens
4
-
5
- Reglas para minimizar el consumo de contexto al trabajar en este repositorio.
6
-
7
- **Lectura de archivos**
8
- - Usa `Read` con `offset` y `limit` cuando conozcas la zona relevante del archivo.
9
- - No leas archivos de mas de 500 lineas completos; segmenta por rango.
10
- - Para descubrir estructura del repo: usa `Glob` en lugar de `ls -R` o `find`.
11
- - No releas el archivo completo si ya leiste el bloque relevante; continua desde ese contexto.
12
- - Antes de leer un archivo largo, ubica simbolos con busqueda y luego lee solo rangos candidatos.
13
-
14
- **Busqueda**
15
- - Usa `Grep` con `head_limit` en vez de dump crudo.
16
- - Cuando solo necesites ubicaciones, usa `output_mode: "files_with_matches"`.
17
- - Acota siempre con `glob` o `type` para no escanear de mas.
18
-
19
- **Git (via Bash)**
20
- - Historial: `git log --oneline -20` por defecto; amplia solo si es insuficiente.
21
- - Diffs: empieza con `git diff --stat`; pide el diff completo solo del archivo que vas a tocar.
22
- - Status: `git status -s` (short format).
23
- - Show: `git show --stat` antes del full.
24
-
25
- **Tests**
26
- - Reporta solo failures; no enumeres los passes en el output visible.
27
- - Si el runner tiene modo silencioso o summary (`jest --silent --reporters=summary`, `pytest -q`), usalo.
28
- - Si el runner es verboso por defecto, redirige: `2>&1 | tail -80`.
29
-
30
- **Logs y errores**
31
- - No pegues stack traces enteros; extrae solo el frame relevante con el mensaje.
32
- - Resume logs repetidos: "(N ocurrencias de <mensaje>)".
33
- - Para archivos de log: `tail -100` o filtra por nivel ERROR/WARN.
34
-
35
- **Build y lint**
36
- - `tsc`, `eslint`, `biome`: agrupa errores por archivo o por regla; no enumeres linea por linea.
37
- - Construccion exitosa: confirma con una sola linea, no pegues el output completo.
38
- - Si hay muchos errores similares: muestra un ejemplo y el conteo.
39
-
40
- **Docker y contenedores**
41
- - `docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"`.
42
- - `docker logs --tail 100` siempre; nunca logs completos.
43
-
44
- **Regla general**
45
- Cuando dudes entre verbosidad y concision, elige concision. El usuario puede pedir detalle bajo demanda.
1
+ <!-- AUTO-GENERATED by refacil-sdd-ai. Do not edit between markers; content is refreshed every session. -->
2
+
3
+ ## Token efficiency
4
+
5
+ Rules to minimize context consumption when working in this repository.
6
+
7
+ **File reading**
8
+ - Use `Read` with `offset` and `limit` when you know the relevant area of the file.
9
+ - Do not read files longer than 500 lines in full; segment by range.
10
+ - To discover repo structure: use `Glob` instead of `ls -R` or `find`.
11
+ - Do not re-read the entire file if you already read the relevant block; continue from that context.
12
+ - Before reading a long file, locate symbols with search and then read only candidate ranges.
13
+
14
+ **Search**
15
+ - Use `Grep` with `head_limit` instead of raw dumps.
16
+ - When you only need locations, use `output_mode: "files_with_matches"`.
17
+ - Always narrow with `glob` or `type` to avoid over-scanning.
18
+
19
+ **Git (via Bash)**
20
+ - History: `git log --oneline -20` by default; expand only if insufficient.
21
+ - Diffs: start with `git diff --stat`; request the full diff only for the file you are about to touch.
22
+ - Status: `git status -s` (short format).
23
+ - Show: `git show --stat` before the full show.
24
+
25
+ **Tests**
26
+ - Report only failures; do not enumerate passes in visible output.
27
+ - If the runner has a silent or summary mode (`jest --silent --reporters=summary`, `pytest -q`), use it.
28
+ - If the runner is verbose by default, redirect: `2>&1 | tail -80`.
29
+
30
+ **Logs and errors**
31
+ - Do not paste full stack traces; extract only the relevant frame with the message.
32
+ - Summarize repeated logs: "(N occurrences of <message>)".
33
+ - For log files: `tail -100` or filter by ERROR/WARN level.
34
+
35
+ **Build and lint**
36
+ - `tsc`, `eslint`, `biome`: group errors by file or by rule; do not enumerate line by line.
37
+ - Successful build: confirm with a single line, do not paste the full output.
38
+ - If there are many similar errors: show one example and the count.
39
+
40
+ **Docker and containers**
41
+ - `docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"`.
42
+ - `docker logs --tail 100` always; never full logs.
43
+
44
+ **General rule**
45
+ When in doubt between verbosity and conciseness, choose conciseness. The user can request detail on demand.
@@ -1,54 +1,58 @@
1
- Instrucciones completas del proyecto: ver `AGENTS.md`. Si falta, ejecuta `/refacil:setup`.
1
+ Full project instructions: see `AGENTS.md`. If missing, run `/refacil:setup`.
2
2
 
3
- ## Metodologia SDD-AI (Refacil)
3
+ ## SDD-AI Methodology
4
4
 
5
- Skills identicas en `.claude/skills/refacil-*/` (Claude Code) y `.cursor/skills/refacil-*/` (Cursor). Instaladas por `refacil-sdd-ai init`.
5
+ Skills are identical in `.claude/skills/refacil-*/` (Claude Code) and `.cursor/skills/refacil-*/` (Cursor). Installed by `refacil-sdd-ai init`.
6
6
 
7
- | Comando | Descripcion |
7
+ | Command | Description |
8
8
  |---------|-------------|
9
- | `/refacil:setup` | Instalar OpenSpec y generar AGENTS.md |
10
- | `/refacil:guide` | Guia interactivaque comando usar |
11
- | `/refacil:explore` | Explorar el codebase sin cambios |
12
- | `/refacil:propose` | Crear propuesta de cambio |
13
- | `/refacil:apply` | Implementar tasks del cambio |
14
- | `/refacil:test` | Generar tests unitarios |
15
- | `/refacil:verify` | Validar implementacion vs specs |
16
- | `/refacil:review` | Review con checklist de calidad |
17
- | `/refacil:archive` | Archivar cambio completado |
18
- | `/refacil:up-code` | Subir codigo y crear PR |
19
- | `/refacil:bug` | Flujo guiado de bugfix |
20
- | `/refacil:update` | Migrar documentacion al patron actual (.agents/) |
21
-
22
- Flujo: `setup` → `propose` → `apply` → `test` → `verify` → `review` → `archive` → `up-code`
23
-
24
- ## Bus entre agentes (refacil-bus)
25
-
26
- Canal local de texto plano entre sesiones de Claude Code / Cursor corriendo en distintos repos. Evita que el dev haga de transcriptor manual entre sus propios agentes.
27
-
28
- | Comando | Descripcion |
9
+ | `/refacil:setup` | Generate `AGENTS.md`, `.agents/`, `refacil-sdd/changes/`, and IDE index files for the project |
10
+ | `/refacil:guide` | Interactive guidewhich command to use |
11
+ | `/refacil:explore` | Explore the codebase without changes |
12
+ | `/refacil:propose` | Create a change proposal |
13
+ | `/refacil:apply` | Implement change tasks |
14
+ | `/refacil:test` | Generate unit tests |
15
+ | `/refacil:verify` | Validate implementation vs specs |
16
+ | `/refacil:review` | Quality checklist review |
17
+ | `/refacil:archive` | Archive a completed change |
18
+ | `/refacil:up-code` | Push code and create PR |
19
+ | `/refacil:bug` | Guided bugfix flow |
20
+ | `/refacil:update` | Apply pending **methodology** migrations (same engine as `notify-update`; e.g. `AGENTS.md` → `.agents/` index pattern) |
21
+
22
+ **Typical feature flow:** `setup` → `explore` (optional) → `propose` → `apply` → `test` → `verify` → `review` → `archive` → `up-code`.
23
+
24
+ **Bug flow:** `bug` replaces `propose`/`apply` for the fix path; then `test` / `review` / `archive` / `up-code` as appropriate (see skill `refacil:bug`).
25
+
26
+ **Legacy layout:** if the repo still has **`openspec/changes/`**, run any **`refacil-sdd-ai sdd …`** command or open a session ( **`check-update`** ) to migrate into **`refacil-sdd/`**; then remove **`openspec/`** when no longer referenced. Optional OpenSpec CLI (**`opsx:*`**) may coexist; SDD-AI uses **`refacil-sdd/`** and **`/refacil:*`** as the primary interface.
27
+
28
+ ## Inter-agent bus (refacil-bus)
29
+
30
+ Local plain-text channel between Claude Code / Cursor sessions running in different repos. Prevents the developer from manually transcribing context between their own agents.
31
+
32
+ | Command | Description |
29
33
  |---------|-------------|
30
- | `/refacil:join <sala>` | Crear o unirse a una sala. La primera vez genera un bloque de presentacion en `AGENTS.md`. |
31
- | `/refacil:say "..."` | Anuncio a toda la sala. |
32
- | `/refacil:ask @nombre "..." [--wait N]` | Pregunta dirigida; `@all` (o `*`) pregunta a todos en la sala. `--wait N` bloquea hasta la primera respuesta o N seg. |
33
- | `/refacil:reply "..."` | Responde la ultima pregunta dirigida (autocompleta `correlationId`). |
34
- | `/refacil:attend` | Modo escucha activa: recibe preguntas y el LLM las responde, luego re-invoca para seguir escuchando. |
35
- | `/refacil:inbox` | Ver mensajes nuevos desde la ultima lectura. |
34
+ | `/refacil:join <room>` | Create or join a room. First time generates an introduction block in `AGENTS.md`. |
35
+ | `/refacil:say "..."` | Broadcast to the entire room. |
36
+ | `/refacil:ask @name "..." [--wait N]` | Directed question; `@all` (or `*`) asks everyone in the room. `--wait N` blocks until the first response or N sec. |
37
+ | `/refacil:reply "..."` | Reply to the last directed question (auto-fills `correlationId`). |
38
+ | `/refacil:attend` | Active listen mode: receives questions and the LLM answers them, then re-invokes to keep listening. |
39
+ | `/refacil:inbox` | View new messages since the last read. |
36
40
 
37
- Uso tipico: antes de arrancar una tarea que puede requerir contexto de otros repos, el dev pone al agente de cada otro repo en `/refacil:attend`. Despues, en su repo de trabajo, el LLM puede pedir contexto con `/refacil:ask @<repo> "..." --wait` y recibir la respuesta automaticamente sin que el dev salte entre ventanas.
41
+ Typical usage: before starting a task that may require context from other repos, the developer puts the agent in each other repo into `/refacil:attend`. Then, in their working repo, the LLM can request context with `/refacil:ask @<repo> "..." --wait` and receive the response automatically without the developer switching between windows.
38
42
 
39
- Si en la sala se acuerdan cambios que afectan un repo, en ese repo se sigue el flujo SDD-AI (`/refacil:propose`, etc.) y quien implementa **avisa por el bus** al que pidio el cambio al terminar (detalle en `refacil-prereqs/BUS-CROSS-REPO.md` en el paquete). Los **`ask` que piden trabajo** en otro repo deben ir con **alcance claro**; el destino usa **`/refacil:propose`** por convención (no hace falta pegar la guía en el mensaje). Skill `/refacil:ask`.
43
+ If changes affecting a repo are agreed upon in the room, the SDD-AI flow (`/refacil:propose`, etc.) is followed in that repo and the implementer **notifies via the bus** when done (details in `refacil-prereqs/BUS-CROSS-REPO.md` in the package). **`ask` requests that involve work** in another repo must include **clear scope**; the destination uses **`/refacil:propose`** by convention. See skill `/refacil:ask`.
40
44
 
41
- CLI util para el dev: `refacil-sdd-ai bus view` (abre UI web en el navegador), `bus watch <session>` (panel en terminal), `bus status`, `bus rooms`. No consumen tokens.
45
+ Useful CLI for the developer: `refacil-sdd-ai bus view` (opens web UI in browser), `bus watch <session>` (terminal panel), `bus status`, `bus rooms`. These do not consume tokens.
42
46
 
43
- ## Estructura de documentacion del proyecto
47
+ ## Project documentation structure
44
48
 
45
- El detalle del proyecto vive en `.agents/` — un archivo `.md` por area (summary, architecture, stack, testing, commands...).
46
- `AGENTS.md` es el indice: una linea por archivo indicando que contiene y cuando leerlo.
47
- `CLAUDE.md` y `.cursorrules` son indices minimos que solo apuntan a `AGENTS.md` — no contienen detalle de proyecto.
49
+ Project detail lives in `.agents/` — one `.md` file per area (summary, architecture, stack, testing, commands...).
50
+ `AGENTS.md` is the index: one line per file indicating what it contains and when to read it.
51
+ `CLAUDE.md` and `.cursorrules` are minimal indices that only point to `AGENTS.md` — they contain no project detail.
48
52
 
49
- ## Eficiencia de tokens (automatica)
53
+ ## Token efficiency (automatic)
50
54
 
51
- - El hook `check-update` en `SessionStart` sincroniza el bloque `compact-guidance` en `AGENTS.md`.
52
- - El bloque define reglas de salida compacta (lectura por rango, busqueda acotada, tests/logs resumidos).
53
- - Si `AGENTS.md` aun no existe, la sincronizacion se omite sin error.
54
- - No editar manualmente el contenido entre marcadores `compact-guidance`; se sobreescribe automaticamente.
55
+ - The `check-update` hook at `SessionStart` syncs the `compact-guidance` block in `AGENTS.md`.
56
+ - The block defines compact output rules (range reads, bounded searches, summarized test/log output).
57
+ - If `AGENTS.md` does not exist yet, the sync is skipped without error.
58
+ - Do not manually edit content between the `compact-guidance` markers; it is overwritten automatically.
@@ -1,8 +0,0 @@
1
- # OpenSpec Configuration Template — Equipo Refacil
2
- # Copiar a openspec/config.yaml despues de ejecutar openspec init
3
-
4
- # Idioma: español para artefactos, terminos tecnicos en ingles
5
- language: spanish
6
-
7
- # Las skills refacil:* usan la estructura de OpenSpec por debajo
8
- # No es necesario modificar el schema default (spec-driven)
@@ -1,51 +0,0 @@
1
- # Deltas Refacil sobre OpenSpec
2
-
3
- Lee este archivo **ademas** de la skill `openspec-*` que indique el comando `refacil:*`. No sustituye a OpenSpec; solo fija convenciones del equipo.
4
-
5
- **Ubicacion en el repo:** mismo directorio que `SKILL.md` de `refacil-prereqs` (`.claude/skills/refacil-prereqs/` o `.cursor/skills/refacil-prereqs/`).
6
-
7
- ## Idioma (todas las delegaciones)
8
-
9
- - Respuestas al usuario y artefactos bajo `openspec/`: **español**; terminos tecnicos (API, REST, nombres de tipos, etc.) en **ingles**.
10
-
11
- ## propose — `openspec-propose`
12
-
13
- - **Nombre de carpeta del cambio** (`openspec/changes/<nombre>/`): cumplir **`METHODOLOGY-CONTRACT.md` §9** — el primer caracter **debe** ser letra ASCII; **prohibido** crear el cambio con nombre que empiece por digito (incluye prefijos tipo `YYYY-MM-DD-...`). El CLI OpenSpec falla con esos nombres (`openspec status --change`, etc.). Fijar o validar el slug **antes** de generar artefactos.
14
- - Criterios de aceptacion: formato **Dado / Cuando / Entonces**.
15
- - Incluir **criterios de rechazo** (edge cases) en specs.
16
- - Tasks con estimacion de esfuerzo **S / M / L**.
17
- - Design alineado a **patrones existentes** del repo (desde `AGENTS.md` o exploracion acotada).
18
-
19
- ### Specs: archivo unico vs arbol `specs/` (compatibilidad Refacil)
20
-
21
- OpenSpec puede indicar `specs/**/*.md` y crear **un archivo por capability** (ej. `specs/product-amount-percentile/spec.md`). Los comandos **refacil:*** deben soportar **ambas** formas:
22
-
23
- | Forma | Validacion |
24
- |-------|------------|
25
- | **A** | `specs.md` en la raiz del cambio (`openspec/changes/<id>/specs.md`) |
26
- | **B** | Sin `specs.md`, pero existe al menos un `.md` bajo `openspec/changes/<id>/specs/` (recursivo) |
27
-
28
- - **Si OpenSpec solo genera B:** no es error. **No hace falta** duplicar obligatoriamente en `specs.md` salvo que el equipo quiera un indice unico para humanos.
29
- - **Si coexisten A y B:** lee **ambos**; si hay contradiccion clara entre `specs.md` y los fragmentos, **pregunta al usuario** cual manda antes de `apply`.
30
- - Al cerrar **propose**, en el resumen de revision lista **todas** las rutas de spec (archivo raiz y/o cada `specs/**.md`).
31
-
32
- ## apply — `openspec-apply-change`
33
-
34
- - Respetar **estrictamente** `AGENTS.md`.
35
- - No agregar funcionalidad fuera del alcance de las specs aprobadas.
36
- - No refactorizar codigo no relacionado con el cambio.
37
- - Si una task es ambigua, **preguntar** antes de implementar.
38
- - **Especificacion**: aplica la tabla del Paso 0 de `refacil:apply` (`specs.md` y/o `specs/**/*.md`); no asumas que solo existe `specs.md` en la raiz.
39
-
40
- ## archive — `openspec-archive-change`
41
-
42
- - Si OpenSpec pregunta si sincronizar specs delta a `openspec/specs/`: responder **SI**. La sincronizacion es **obligatoria** en esta metodologia.
43
-
44
- ## explore — `openspec-explore`
45
-
46
- - Solo lectura; no modificar archivos ni generar codigo.
47
- - Enriquecer el informe con puntos de `AGENTS.md` relevantes al tema explorado (ya indicado en la skill `refacil:explore`).
48
-
49
- ## verify — `openspec-verify-change`
50
-
51
- - Sin reglas extra sobre OpenSpec: aplica solo el bloque **Idioma** de arriba a informes y mensajes al usuario.