argos-harness 0.1.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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/assets/agents/auditor.md +140 -0
  4. package/assets/agents/commit-pr-pilot.md +154 -0
  5. package/assets/agents/explorer.md +93 -0
  6. package/assets/agents/implementer.md +117 -0
  7. package/assets/agents/leader.md +149 -0
  8. package/assets/agents/researcher.md +89 -0
  9. package/assets/agents/review-readability.md +87 -0
  10. package/assets/agents/review-reliability.md +100 -0
  11. package/assets/agents/review-resilience.md +87 -0
  12. package/assets/agents/review-risk.md +87 -0
  13. package/assets/agents/reviewer.md +167 -0
  14. package/assets/agents/ticket-audit.md +129 -0
  15. package/assets/hooks/argos-guard-destructive.sh +127 -0
  16. package/assets/hooks/argos-quality-gate.sh +129 -0
  17. package/assets/managed/aterrizaje.md +24 -0
  18. package/assets/managed/formato-respuesta.md +21 -0
  19. package/assets/managed/identidad.md +48 -0
  20. package/assets/managed/operaciones-seguras.md +14 -0
  21. package/assets/managed/orquestacion.md +169 -0
  22. package/assets/output-styles/argos.md +71 -0
  23. package/assets/skills/ai-sdk-5/SKILL.md +230 -0
  24. package/assets/skills/angular/SKILL.md +19 -0
  25. package/assets/skills/angular/references/architecture.md +137 -0
  26. package/assets/skills/angular/references/core.md +197 -0
  27. package/assets/skills/angular/references/forms.md +115 -0
  28. package/assets/skills/angular/references/performance.md +124 -0
  29. package/assets/skills/apollo-client/SKILL.md +61 -0
  30. package/assets/skills/app-blueprint/SKILL.md +45 -0
  31. package/assets/skills/app-blueprint/assets/module-template.md +48 -0
  32. package/assets/skills/app-blueprint/assets/system-template.md +38 -0
  33. package/assets/skills/app-blueprint/references/workflow.md +101 -0
  34. package/assets/skills/app-builder/SKILL.md +43 -0
  35. package/assets/skills/app-builder/phases/0-product.md +58 -0
  36. package/assets/skills/app-builder/phases/1-scaffold.md +33 -0
  37. package/assets/skills/app-builder/phases/10-store.md +40 -0
  38. package/assets/skills/app-builder/phases/2-data.md +34 -0
  39. package/assets/skills/app-builder/phases/3-domain.md +33 -0
  40. package/assets/skills/app-builder/phases/4-ui-nav.md +32 -0
  41. package/assets/skills/app-builder/phases/5-identity.md +30 -0
  42. package/assets/skills/app-builder/phases/6-polish.md +34 -0
  43. package/assets/skills/app-builder/phases/7-brand.md +31 -0
  44. package/assets/skills/app-builder/phases/8-web.md +30 -0
  45. package/assets/skills/app-builder/phases/9-docs.md +31 -0
  46. package/assets/skills/app-ia/SKILL.md +54 -0
  47. package/assets/skills/astro/SKILL.md +39 -0
  48. package/assets/skills/axios/SKILL.md +61 -0
  49. package/assets/skills/branch-pr/SKILL.md +200 -0
  50. package/assets/skills/bullmq/SKILL.md +55 -0
  51. package/assets/skills/chained-pr/SKILL.md +48 -0
  52. package/assets/skills/chained-pr/references/chaining-details.md +99 -0
  53. package/assets/skills/cognitive-doc-design/SKILL.md +81 -0
  54. package/assets/skills/comment-writer/SKILL.md +74 -0
  55. package/assets/skills/dashboard-ia/SKILL.md +54 -0
  56. package/assets/skills/django-drf/SKILL.md +180 -0
  57. package/assets/skills/go-testing/SKILL.md +47 -0
  58. package/assets/skills/go-testing/references/examples.md +89 -0
  59. package/assets/skills/issue-creation/SKILL.md +223 -0
  60. package/assets/skills/jira-epic/SKILL.md +306 -0
  61. package/assets/skills/jira-task/SKILL.md +382 -0
  62. package/assets/skills/judgment-day/SKILL.md +52 -0
  63. package/assets/skills/judgment-day/references/prompts-and-formats.md +98 -0
  64. package/assets/skills/lightsail-deploy/SKILL.md +44 -0
  65. package/assets/skills/lightsail-deploy/references/runbook.md +102 -0
  66. package/assets/skills/loop-back-debug/SKILL.md +102 -0
  67. package/assets/skills/mantine-form/SKILL.md +57 -0
  68. package/assets/skills/mongoose/SKILL.md +66 -0
  69. package/assets/skills/nextjs-15/SKILL.md +144 -0
  70. package/assets/skills/not-boring-mobile/SKILL.md +43 -0
  71. package/assets/skills/not-boring-mobile/references/not-boring-playbook.md +65 -0
  72. package/assets/skills/playwright/SKILL.md +315 -0
  73. package/assets/skills/pr-comments/SKILL.md +93 -0
  74. package/assets/skills/pr-create/SKILL.md +64 -0
  75. package/assets/skills/promo-video/SKILL.md +52 -0
  76. package/assets/skills/promo-video/assets/package.template.json +22 -0
  77. package/assets/skills/promo-video/assets/promo.template.tsx +469 -0
  78. package/assets/skills/promo-video/assets/theme.template.ts +27 -0
  79. package/assets/skills/promo-video/references/pipeline.md +119 -0
  80. package/assets/skills/promo-video-web/SKILL.md +51 -0
  81. package/assets/skills/promo-video-web/assets/browser-promo.template.tsx +385 -0
  82. package/assets/skills/promo-video-web/assets/capture.template.ts +70 -0
  83. package/assets/skills/promo-video-web/assets/package.template.json +26 -0
  84. package/assets/skills/promo-video-web/references/pipeline.md +84 -0
  85. package/assets/skills/pytest/SKILL.md +180 -0
  86. package/assets/skills/react-19/SKILL.md +118 -0
  87. package/assets/skills/react-hook-form/SKILL.md +59 -0
  88. package/assets/skills/react-router/SKILL.md +60 -0
  89. package/assets/skills/redux-toolkit/SKILL.md +60 -0
  90. package/assets/skills/review-diff/SKILL.md +101 -0
  91. package/assets/skills/ship-docs/SKILL.md +45 -0
  92. package/assets/skills/ship-docs/references/ship-docs-playbook.md +31 -0
  93. package/assets/skills/skill-creator/SKILL.md +97 -0
  94. package/assets/skills/skill-creator/assets/SKILL-TEMPLATE.md +68 -0
  95. package/assets/skills/skill-creator/references/skill-style-guide.md +79 -0
  96. package/assets/skills/skill-improver/SKILL.md +50 -0
  97. package/assets/skills/skill-improver/references/skill-style-guide.md +79 -0
  98. package/assets/skills/socketio/SKILL.md +58 -0
  99. package/assets/skills/spec-bootstrap/SKILL.md +62 -0
  100. package/assets/skills/store-ship/SKILL.md +52 -0
  101. package/assets/skills/store-ship/assets/android-supply.template.md +22 -0
  102. package/assets/skills/store-ship/assets/eas.template.json +32 -0
  103. package/assets/skills/store-ship/assets/maestro-flow.template.yaml +27 -0
  104. package/assets/skills/store-ship/assets/store.config.template.json +28 -0
  105. package/assets/skills/store-ship/references/pipeline.md +198 -0
  106. package/assets/skills/stripe/SKILL.md +83 -0
  107. package/assets/skills/tailwind-4/SKILL.md +193 -0
  108. package/assets/skills/tamagui/SKILL.md +60 -0
  109. package/assets/skills/tanstack-query/SKILL.md +58 -0
  110. package/assets/skills/ticket-intake/SKILL.md +55 -0
  111. package/assets/skills/typescript/SKILL.md +134 -0
  112. package/assets/skills/verify-before-done/SKILL.md +111 -0
  113. package/assets/skills/webapp-rebuilder/SKILL.md +48 -0
  114. package/assets/skills/webapp-rebuilder/assets/charter-template.md +46 -0
  115. package/assets/skills/webapp-rebuilder/references/workflow.md +47 -0
  116. package/assets/skills/winston-logging/SKILL.md +61 -0
  117. package/assets/skills/work-unit-commits/SKILL.md +84 -0
  118. package/assets/skills/zod-4/SKILL.md +210 -0
  119. package/assets/skills/zustand-5/SKILL.md +216 -0
  120. package/bin/argos.js +6 -0
  121. package/dist/commands/adopt.d.ts +35 -0
  122. package/dist/commands/adopt.d.ts.map +1 -0
  123. package/dist/commands/adopt.js +347 -0
  124. package/dist/commands/adopt.js.map +1 -0
  125. package/dist/commands/doctor.d.ts +20 -0
  126. package/dist/commands/doctor.d.ts.map +1 -0
  127. package/dist/commands/doctor.js +478 -0
  128. package/dist/commands/doctor.js.map +1 -0
  129. package/dist/commands/init.d.ts +32 -0
  130. package/dist/commands/init.d.ts.map +1 -0
  131. package/dist/commands/init.js +358 -0
  132. package/dist/commands/init.js.map +1 -0
  133. package/dist/commands/remove.d.ts +62 -0
  134. package/dist/commands/remove.d.ts.map +1 -0
  135. package/dist/commands/remove.js +487 -0
  136. package/dist/commands/remove.js.map +1 -0
  137. package/dist/commands/workspace.d.ts +73 -0
  138. package/dist/commands/workspace.d.ts.map +1 -0
  139. package/dist/commands/workspace.js +354 -0
  140. package/dist/commands/workspace.js.map +1 -0
  141. package/dist/index.d.ts +2 -0
  142. package/dist/index.d.ts.map +1 -0
  143. package/dist/index.js +24 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/lib/assets.d.ts +29 -0
  146. package/dist/lib/assets.d.ts.map +1 -0
  147. package/dist/lib/assets.js +57 -0
  148. package/dist/lib/assets.js.map +1 -0
  149. package/dist/lib/atomic-write.d.ts +17 -0
  150. package/dist/lib/atomic-write.d.ts.map +1 -0
  151. package/dist/lib/atomic-write.js +41 -0
  152. package/dist/lib/atomic-write.js.map +1 -0
  153. package/dist/lib/backup.d.ts +11 -0
  154. package/dist/lib/backup.d.ts.map +1 -0
  155. package/dist/lib/backup.js +42 -0
  156. package/dist/lib/backup.js.map +1 -0
  157. package/dist/lib/config.d.ts +36 -0
  158. package/dist/lib/config.d.ts.map +1 -0
  159. package/dist/lib/config.js +52 -0
  160. package/dist/lib/config.js.map +1 -0
  161. package/dist/lib/detect.d.ts +58 -0
  162. package/dist/lib/detect.d.ts.map +1 -0
  163. package/dist/lib/detect.js +330 -0
  164. package/dist/lib/detect.js.map +1 -0
  165. package/dist/lib/ficha.d.ts +10 -0
  166. package/dist/lib/ficha.d.ts.map +1 -0
  167. package/dist/lib/ficha.js +38 -0
  168. package/dist/lib/ficha.js.map +1 -0
  169. package/dist/lib/git.d.ts +27 -0
  170. package/dist/lib/git.d.ts.map +1 -0
  171. package/dist/lib/git.js +79 -0
  172. package/dist/lib/git.js.map +1 -0
  173. package/dist/lib/managed-files.d.ts +35 -0
  174. package/dist/lib/managed-files.d.ts.map +1 -0
  175. package/dist/lib/managed-files.js +97 -0
  176. package/dist/lib/managed-files.js.map +1 -0
  177. package/dist/lib/markers.d.ts +64 -0
  178. package/dist/lib/markers.d.ts.map +1 -0
  179. package/dist/lib/markers.js +157 -0
  180. package/dist/lib/markers.js.map +1 -0
  181. package/dist/lib/navori-import.d.ts +42 -0
  182. package/dist/lib/navori-import.d.ts.map +1 -0
  183. package/dist/lib/navori-import.js +65 -0
  184. package/dist/lib/navori-import.js.map +1 -0
  185. package/dist/lib/openclaw-agents.d.ts +53 -0
  186. package/dist/lib/openclaw-agents.d.ts.map +1 -0
  187. package/dist/lib/openclaw-agents.js +118 -0
  188. package/dist/lib/openclaw-agents.js.map +1 -0
  189. package/dist/lib/package-root.d.ts +11 -0
  190. package/dist/lib/package-root.d.ts.map +1 -0
  191. package/dist/lib/package-root.js +23 -0
  192. package/dist/lib/package-root.js.map +1 -0
  193. package/dist/lib/paths.d.ts +11 -0
  194. package/dist/lib/paths.d.ts.map +1 -0
  195. package/dist/lib/paths.js +16 -0
  196. package/dist/lib/paths.js.map +1 -0
  197. package/dist/lib/settings-merge.d.ts +125 -0
  198. package/dist/lib/settings-merge.d.ts.map +1 -0
  199. package/dist/lib/settings-merge.js +373 -0
  200. package/dist/lib/settings-merge.js.map +1 -0
  201. package/dist/lib/version.d.ts +3 -0
  202. package/dist/lib/version.d.ts.map +1 -0
  203. package/dist/lib/version.js +13 -0
  204. package/dist/lib/version.js.map +1 -0
  205. package/dist/lib/which.d.ts +8 -0
  206. package/dist/lib/which.d.ts.map +1 -0
  207. package/dist/lib/which.js +30 -0
  208. package/dist/lib/which.js.map +1 -0
  209. package/dist/lib/workspaces.d.ts +133 -0
  210. package/dist/lib/workspaces.d.ts.map +1 -0
  211. package/dist/lib/workspaces.js +241 -0
  212. package/dist/lib/workspaces.js.map +1 -0
  213. package/dist/lib/zod-messages.d.ts +4 -0
  214. package/dist/lib/zod-messages.d.ts.map +1 -0
  215. package/dist/lib/zod-messages.js +28 -0
  216. package/dist/lib/zod-messages.js.map +1 -0
  217. package/package.json +44 -0
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: typescript
3
+ description: TypeScript strict patterns and best practices. Trigger: When writing TypeScript code - types, interfaces, generics.
4
+ ---
5
+
6
+ ## Const Types Pattern (REQUIRED)
7
+
8
+ ```typescript
9
+ // ✅ ALWAYS: Create const object first, then extract type
10
+ const STATUS = {
11
+ ACTIVE: "active",
12
+ INACTIVE: "inactive",
13
+ PENDING: "pending",
14
+ } as const;
15
+
16
+ type Status = (typeof STATUS)[keyof typeof STATUS];
17
+
18
+ // ❌ NEVER: Direct union types
19
+ type Status = "active" | "inactive" | "pending";
20
+ ```
21
+
22
+ **Why?** Single source of truth, runtime values, autocomplete, easier refactoring.
23
+
24
+ ## Flat Interfaces (REQUIRED)
25
+
26
+ ```typescript
27
+ // ✅ ALWAYS: One level depth, nested objects → dedicated interface
28
+ interface UserAddress {
29
+ street: string;
30
+ city: string;
31
+ }
32
+
33
+ interface User {
34
+ id: string;
35
+ name: string;
36
+ address: UserAddress; // Reference, not inline
37
+ }
38
+
39
+ interface Admin extends User {
40
+ permissions: string[];
41
+ }
42
+
43
+ // ❌ NEVER: Inline nested objects
44
+ interface User {
45
+ address: { street: string; city: string }; // NO!
46
+ }
47
+ ```
48
+
49
+ ## Never Use `any`
50
+
51
+ ```typescript
52
+ // ✅ Use unknown for truly unknown types
53
+ function parse(input: unknown): User {
54
+ if (isUser(input)) return input;
55
+ throw new Error("Invalid input");
56
+ }
57
+
58
+ // ✅ Use generics for flexible types
59
+ function first<T>(arr: T[]): T | undefined {
60
+ return arr[0];
61
+ }
62
+
63
+ // ❌ NEVER
64
+ function parse(input: any): any { }
65
+ ```
66
+
67
+ ## No Nested Ternaries (REQUIRED)
68
+
69
+ ```typescript
70
+ // ❌ NEVER: nested ternaries — unreadable, flagged by SonarCloud/ESLint
71
+ const color = state === "available" ? "green" : state === "busy" ? "red" : "yellow";
72
+
73
+ // ✅ Lookup map keyed by the discriminant — single source of truth, extensible
74
+ const STATE_CONFIG = {
75
+ available: { color: "green", label: "Disponible" },
76
+ busy: { color: "red", label: "Ocupado" },
77
+ lead: { color: "yellow", label: "No reservable aún" },
78
+ } as const;
79
+
80
+ const { color, label } = STATE_CONFIG[state];
81
+
82
+ // ✅ When the value is computed (not a direct key), use early returns
83
+ function slotState(available: boolean, hasReasons: boolean) {
84
+ if (available) return "available";
85
+ if (hasReasons) return "busy";
86
+ return "lead";
87
+ }
88
+
89
+ // ✅ In JSX, prefer independent && blocks over a chained ternary
90
+ {loading && <Loader />}
91
+ {!loading && items.length === 0 && <Empty />}
92
+ {!loading && items.length > 0 && <List />}
93
+ ```
94
+
95
+ **Why?** A nested ternary is a `switch` in disguise — a lookup map or early returns reads top-to-bottom, adds cases without re-nesting, and keeps the config in one place. A single (non-nested) ternary is fine; nesting is the smell.
96
+
97
+ ## Utility Types
98
+
99
+ ```typescript
100
+ Pick<User, "id" | "name"> // Select fields
101
+ Omit<User, "id"> // Exclude fields
102
+ Partial<User> // All optional
103
+ Required<User> // All required
104
+ Readonly<User> // All readonly
105
+ Record<string, User> // Object type
106
+ Extract<Union, "a" | "b"> // Extract from union
107
+ Exclude<Union, "a"> // Exclude from union
108
+ NonNullable<T | null> // Remove null/undefined
109
+ ReturnType<typeof fn> // Function return type
110
+ Parameters<typeof fn> // Function params tuple
111
+ ```
112
+
113
+ ## Type Guards
114
+
115
+ ```typescript
116
+ function isUser(value: unknown): value is User {
117
+ return (
118
+ typeof value === "object" &&
119
+ value !== null &&
120
+ "id" in value &&
121
+ "name" in value
122
+ );
123
+ }
124
+ ```
125
+
126
+ ## Import Types
127
+
128
+ ```typescript
129
+ import type { User } from "./types";
130
+ import { createUser, type Config } from "./utils";
131
+ ```
132
+
133
+ ## Keywords
134
+ typescript, ts, types, interfaces, generics, strict mode, utility types, nested ternary, lookup map, early returns
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: verify-before-done
3
+ description: Aplica la Iron Law de verificación antes de declarar cualquier tarea lista — exige evidencia fresca del comando que respalda el claim, nunca inferencia. Trigger: antes de decir listo/done/completed/approved, antes de un commit o PR, o cuando un subagente reporta éxito sin que se haya visto el diff.
4
+ ---
5
+
6
+ # Verify Before Done
7
+
8
+ ## La ley de hierro
9
+
10
+ ```
11
+ NINGÚN CLAIM DE COMPLETADO SIN EVIDENCIA DE VERIFICACIÓN FRESCA
12
+ ```
13
+
14
+ Si no corriste el comando de verificación EN ESTE TURNO, no puedes afirmar el claim. "Debería funcionar", "la corrida anterior estaba verde", "se ve bien" NO son evidencia.
15
+
16
+ ## Por qué este skill existe
17
+
18
+ El bug recurrente es declarar "listo" en base a inferencia:
19
+
20
+ - "corrí el check hace 2 cambios atrás, debería seguir verde"
21
+ - "el código compila, la UI debería andar"
22
+ - "el adapter está bien, el render debe funcionar"
23
+
24
+ Inferencia ≠ evidencia. Este skill fuerza el rigor.
25
+
26
+ ## Función de gate
27
+
28
+ ANTES de afirmar cualquier "listo / done / completed / approved":
29
+
30
+ 1. **IDENTIFY**: ¿qué comando prueba este claim?
31
+ 2. **RUN**: ejecuta el comando COMPLETO en este turno (no parcial, no cached).
32
+ 3. **READ**: output completo, exit code, contar failures.
33
+ 4. **VERIFY**: ¿el output confirma el claim?
34
+ - NO → declara el estado real con evidencia.
35
+ - SÍ → afirma el claim CON la evidencia visible.
36
+ 5. **ONLY THEN**: haz el claim.
37
+
38
+ Saltarse cualquier step = mentira, no verificación.
39
+
40
+ El comando exacto de cada claim (qué es "fast" y qué es "full") no vive en este skill: se resuelve en runtime leyendo `qualityGate.fast` / `qualityGate.full` en el `argos.config.json` del repo, o la ficha (CLAUDE.md delgado) que `argos adopt` escribió con esos hechos ya resueltos en texto literal. Si el repo no tiene config ni ficha, no asumas un comando — pregunta o revisa `package.json` / scripts del repo antes de declarar nada verde.
41
+
42
+ ## Tabla claim → output requerido → no alcanza
43
+
44
+ | Claim | Output requerido | No alcanza |
45
+ |---|---|---|
46
+ | Quality gate fast verde | Comando fast del repo (resuelto desde `argos.config.json`/ficha) corrido completo en este turno con exit 0 | "corrí antes", "debería estar verde", "lint pasaba ayer" |
47
+ | Quality gate full verde | Comando full del repo (mismo origen) — exit 0 fresco en este turno | "el dev server anda", "build pasó hace rato" |
48
+ | Cero errores nuevos vs baseline | `git stash` → re-run → comparar conteos → `git stash pop` | "lint dijo OK" sin comparar baseline |
49
+ | UI validada (golden path) | Repro step + comportamiento observado en navegador con dev server vivo en este turno | "se ve bien en código", "debería renderizar bien" |
50
+ | Bug arreglado | Reproducir síntoma original y verlo NO ocurrir | "cambié el código, asumí que quedó arreglado", "el diff cubre el caso" |
51
+ | Filtro / feature funciona | Click real + descripción del resultado | "el handler está bien escrito" |
52
+ | Migración estructural completa | Lectura Y escritura van al mismo destino en el flujo afectado, validado en navegador o test | "cambié el service, debería andar" |
53
+ | PR creable | Pre-flight verde (status limpio, no estás en la rama base ni en la rama destino del PR — `branchBase`/`prTarget` de `argos.config.json` —, `gh` auth ok, quality gate verde) EN ESTE TURNO | "el branch tiene commits, podemos crear" |
54
+ | Tests pasan | Suite corrida fresca con exit 0 en este turno + conteo de tests | "no tocamos tests", "deberían seguir verdes" |
55
+ | Type-check limpio | `tsc --noEmit` (o el check equivalente que declare el stack del repo) exit 0 en este turno | "TS no se quejó cuando lo guardé" |
56
+
57
+ ## Señales de alerta (PARA)
58
+
59
+ - Estás por escribir "listo" / "done" / "perfect" / "should work".
60
+ - Estás por hacer `git commit` sin haber corrido el quality gate fast del repo en este turno.
61
+ - Estás por marcar `APPROVED` un review sin haber leído el diff completo.
62
+ - Estás cansado y quieres cerrar.
63
+ - "Solo por esta vez" — NO. Cero excepciones.
64
+ - Confías en el reporte de un subagente sin verificar el diff tú mismo.
65
+
66
+ ## Prevención de racionalización
67
+
68
+ | Excusa | Realidad |
69
+ |---|---|
70
+ | "Tengo confianza" | Confianza ≠ evidencia. |
71
+ | "Si compila, anda" | TS con `strict: false` no atrapa undefined runtime. Verifica UI / runtime. |
72
+ | "El check pasó hace 10 min" | Re-corre. Fresca. |
73
+ | "Es trivial, no hace falta" | Trivialidad no exime de verificación. |
74
+ | "El subagente dijo done" | Mira el diff tú mismo. Confía, pero verifica. |
75
+ | "El usuario tiene prisa" | Prisa ≠ excusa. Verificación rápida es más rápida que rollback. |
76
+ | "Mismo argumento con otras palabras = la regla no aplica" | El espíritu de la regla importa más que la letra. |
77
+
78
+ ## Cuándo se invoca este skill
79
+
80
+ - **`implementer`**: antes de devolver `done -> .claude/progress/impl_<feature>.md`. Antes de pasar al `reviewer`.
81
+ - **`reviewer`**: antes de marcar `APPROVED`.
82
+ - **`commit-pr-pilot`**: antes de `gh pr create`.
83
+ - **Cualquier agent**: antes de decir "listo" al usuario en cualquier respuesta de tarea de código.
84
+
85
+ ## Conexión con el resto del harness
86
+
87
+ - El CLAUDE.md global menciona el quality gate en su sección de cierre. Este skill añade rigor de "evidencia fresca" + cubre dimensiones UI / bug arreglado que el quality gate no toca por sí solo.
88
+ - El `implementer` referencia este skill en su "Evidence-based completion".
89
+ - El `reviewer` debe citar este skill cuando marca `APPROVED`.
90
+ - El `commit-pr-pilot` lo aplica en su pre-flight antes de tocar `gh`.
91
+
92
+ ## Anti-patrones
93
+
94
+ - ❌ Mostrar output cacheado de hace 5 mensajes y decir "ya está verde" — evidencia fresca, no cacheada.
95
+ - ❌ Inferir UI desde el código — la UI necesita repro en navegador.
96
+ - ❌ "Confía en mí, anda en mi máquina" — no es claim válido sin evidencia en el chat.
97
+ - ❌ Hacer el claim ANTES del comando ("voy a correr X y debería estar verde").
98
+ - ❌ Marcar `[x]` un step del plan atómico sin haber corrido la verificación que respalda ese step.
99
+ - ❌ Aceptar el reporte de un subagente sin abrir el diff y validar al menos los archivos críticos.
100
+
101
+ ## Cierre
102
+
103
+ Skill **siempre activa** durante cualquier flow de implementación. No requiere invocación explícita — es principio que aplica a todo claim de "listo".
104
+
105
+ Al aplicarla, el output al usuario debe incluir:
106
+
107
+ 1. El claim explícito (qué se logró).
108
+ 2. El output completo (o referencia al comando corrido) que lo respalda.
109
+ 3. Si algún sub-claim NO pudo verificarse (ej. UI sin browser disponible), decirlo EXPLÍCITO — no inferir.
110
+
111
+ Este skill vive una sola vez en el motor global (`~/.claude/skills/`) y se aplica a cualquier repo. Los checks específicos de un proyecto (comandos que cuentan como evidencia válida, patrones de bug donde la inferencia históricamente falló, áreas críticas con verificación propia) no se editan aquí: viven en la ficha del repo (CLAUDE.md delgado) o en `project.criticalAreas` de su `argos.config.json`, y se leen en runtime al trabajar en ese repo.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: webapp-rebuilder
3
+ description: Trigger: rebuild web app, reconstruir app, rebuild from blueprint, redesign rebuild, webapp rebuilder. Phased web app reconstruction from an app-blueprint: preserve every business rule, redesign UX/UI.
4
+ ---
5
+
6
+ # Webapp Rebuilder
7
+
8
+ ## Activation Contract
9
+
10
+ Activate when the user wants to rebuild an existing web app from its app-blueprint docs (`blueprint/<repo>/`), modernizing stack and redesigning UX/UI while preserving behavior. Requires an existing blueprint; if none exists, run app-blueprint first.
11
+
12
+ ## Hard Rules
13
+
14
+ - The blueprint is the source of truth for BEHAVIOR: business rules (BR-*), API contracts, capabilities. It is NOT a UI spec — redesigning screens, flows, and navigation is encouraged; losing a capability is forbidden.
15
+ - Any feature or BR intentionally dropped must be an explicit entry in the charter kill-list, approved by the user. Nothing is dropped silently.
16
+ - Maintain `_traceability.md` in the new repo: every BR from the blueprint → status (`implemented@test`, `implemented`, `killed@charter`, `pending`). The rebuild is not done until no `pending` remains.
17
+ - Consume backend endpoints exactly as documented in the blueprint's `api-layer.md`. Never invent or "improve" an endpoint contract — the real services are live.
18
+ - Each BR becomes a test before or with its implementation (BRs are already written as testable statements).
19
+ - Orchestrate, never implement inline: delegate each phase to sub-agents per `~/.claude/skills/app-builder/references/orchestration.md`. Complete phases in order; a phase starts only after the previous gate passes.
20
+ - For ANY UI work, load skills via the ui-skills CLI first (`npx ui-skills start`). UI primitives from shadcn/ui copied into `components/ui/*`, owned and editable. Phase 4 builds structural character in grayscale; color arrives in Phase 5.
21
+ - All artifacts in English. Conventional commits, no AI attribution.
22
+
23
+ ## Decision Gates
24
+
25
+ | Situation | Action |
26
+ |-----------|--------|
27
+ | No blueprint for the target app | Stop; run app-blueprint first |
28
+ | Blueprint has `_gaps.md` entries touching a phase | Surface them in that phase's charter section; user decides |
29
+ | BR contradicts observed service behavior during Phase 2 | Trust the live service, note the correction back into the blueprint |
30
+ | Scope creep mid-phase | Log as post-MVP in the charter, finish the current gate |
31
+
32
+ ## Execution Steps
33
+
34
+ 1. Read `references/workflow.md` in full before acting.
35
+ 2. Phase 0: write the rebuild charter from `assets/charter-template.md`; user approves it explicitly before any code.
36
+ 3. Phases 1-6 per the workflow phase table (scaffold → typed API layer → domain/BR tests → UX redesign + UI → visual identity → polish), delegating each to sub-agents with its blueprint slice as spec.
37
+ 4. Phase 7: adversarial traceability audit — every BR accounted for in `_traceability.md`; gaps trigger a fix round.
38
+ 5. Phase 8: ship docs (README + DEPLOYMENT via ship-docs).
39
+
40
+ ## Output Contract
41
+
42
+ A working repo for the rebuilt app plus: `docs/rebuild-charter.md`, `_traceability.md` (100% BRs resolved), per-phase Engram/memory records, and ship docs. Final report: capabilities delivered, BRs implemented/killed, redesign decisions taken.
43
+
44
+ ## References
45
+
46
+ - `references/workflow.md` — phase table with models/skills/gates, blueprint-slice-per-phase mapping, traceability audit rules.
47
+ - `assets/charter-template.md` — rebuild charter template (stack, redesign scope, kill-list).
48
+ - `~/.claude/skills/app-builder/references/orchestration.md` — delegation protocol (shared with app-builder).
@@ -0,0 +1,46 @@
1
+ # Rebuild Charter: {app name}
2
+
3
+ **Source blueprint:** `blueprint/{repo}/` (generated {date}, {N} business rules)
4
+ **Target:** {new repo/workspace path}
5
+ **Status:** draft | approved ({date})
6
+
7
+ ## Goal
8
+
9
+ One paragraph: what this rebuild delivers and why now.
10
+
11
+ ## Target Stack
12
+
13
+ | Layer | Legacy | Rebuild | Why |
14
+ |-------|--------|---------|-----|
15
+ | Framework | | | |
16
+ | Routing | | | |
17
+ | State | | | |
18
+ | Data fetching | | | |
19
+ | UI system | | | |
20
+ | Auth | | | |
21
+
22
+ ## Backend Strategy
23
+
24
+ Which services are consumed as-is (per api-layer.md contracts) and which, if any, change. Default: all as-is.
25
+
26
+ ## Capability Map
27
+
28
+ One line per blueprint module: what the user can do. This is the redesign raw material — screens may be resliced, capabilities may not.
29
+
30
+ | Module | Capabilities | Redesign scope |
31
+ |--------|--------------|----------------|
32
+
33
+ ## Redesign Decisions
34
+
35
+ Flows being rethought, each with the pain point motivating it. Flows rebuilt as-is need no entry.
36
+
37
+ ## Kill-List
38
+
39
+ Every feature/BR intentionally NOT rebuilt. User-approved, one reason each. This list is the only legitimate destination for dropped behavior.
40
+
41
+ | Item | Blueprint ref | Reason | Approved |
42
+ |------|--------------|--------|----------|
43
+
44
+ ## Out of Scope / Post-MVP
45
+
46
+ ## Open Questions
@@ -0,0 +1,47 @@
1
+ # webapp-rebuilder workflow
2
+
3
+ Goal: rebuild a web app from its blueprint with a modern stack and redesigned UX, losing zero behavior. The blueprint gives you what app-builder's Phase 0 has to invent — so Phase 0 here is about DECISIONS, not discovery.
4
+
5
+ Inputs: `blueprint/<repo>/` (README, module docs, api-layer.md, ui-shell.md or route table, state doc, `_inventory.json`). Target: a new repo (or workspace app) chosen in the charter.
6
+
7
+ ## Phase table
8
+
9
+ Model tiers: cheap for mechanical, top tier only where judgment or taste decides. Load listed skills before starting the phase. `ui:*` skills come from the ui-skills CLI.
10
+
11
+ | # | Phase | Input from blueprint | Output | Gate | Model | Skills |
12
+ |---|-------|----------------------|--------|------|-------|--------|
13
+ | 0 | Rebuild charter | README + module index + gotchas/edge-case sections | `docs/rebuild-charter.md` from the template: target stack, backend strategy, UX redesign scope, kill-list, capability map | User approves explicitly | fable | cognitive-doc-design |
14
+ | 1 | Scaffold | charter only | Repo scaffolded (default: Vite + React 19 + TS strict + Tailwind 4 + shadcn/ui + TanStack Router/Query, unless charter overrides), CI-ready, boots | App boots, typecheck clean | haiku | ponytail |
15
+ | 2 | Typed API layer | `api-layer.md` (every consumed endpoint) + auth/interceptor rules | Typed client: one function per endpoint with zod schemas for payload/response, auth token flow, error mapping | Contract smoke test against real services (or recorded fixtures) passes | sonnet | typescript, zod-4, ponytail |
16
+ | 3 | Domain + BR tests | Business Rules sections of every module doc | Pure domain logic; each applicable BR encoded as a unit test (BR id in test name) | All BR tests pass; `_traceability.md` updated | sonnet | typescript, pytest-style discipline via strict TDD |
17
+ | 4 | UX redesign + UI | Screens/routes + capabilities per module doc — treat as a CAPABILITY inventory, not a screen spec | New information architecture: regrouped flows, reduced tap-count, modern navigation; core screens with structural character in grayscale; owned `components/ui/*` | User walks all flows; every blueprint capability reachable; screens have grayscale personality | sonnet | ui:impeccable (PRIMARY), ui:bolder, react-19, tailwind-4 |
18
+ | 4.5 | UX refinement | usage of Phase 4 build | Density audit, flow chaining, empty states, error copy | User confirms flows FEEL right | sonnet | ui:impeccable, ui:relevant, ponytail |
19
+ | 5 | Visual identity | brand inputs from user | Color tokens + real typography pairing + signature element | User confirms distinctive, not generic | fable | frontend-design, ui:typeset, ui:colorize |
20
+ | 6 | Polish | — | Micro-interactions, motion, a11y pass | Verified in browser | fable | ui:motion, verify |
21
+ | 7 | Traceability audit | full blueprint + `_traceability.md` | Adversarial audit: every BR → implemented@test / implemented / killed@charter. Gaps → fix round → re-audit once; leftovers reported, never dropped | Zero `pending` BRs | inherit session model | — |
22
+ | 8 | Ship docs | real repo | README.md + DEPLOYMENT.md | Fresh clone boots from README | sonnet | ship-docs, cognitive-doc-design |
23
+
24
+ ## Phase 0 — charter specifics
25
+
26
+ Read the blueprint README and module index; do NOT re-read source code of the legacy app. Produce the charter with:
27
+
28
+ - **Capability map**: one line per module — what the user can DO (derived from routes + BRs), independent of how old screens sliced it. This is the redesign's raw material.
29
+ - **Kill-list candidates**: mine the blueprint's gotchas/edge-cases/dead-config sections for legacy quirks, disabled features, and dead flows; propose each as keep/kill with a one-line reason. The user decides every entry.
30
+ - **Backend strategy**: default is consuming the existing services per `api-layer.md` unchanged. Migrating a service is out of scope unless the user asks.
31
+ - **Redesign scope**: which flows get rethought (with the pain point motivating it) vs rebuilt as-is.
32
+
33
+ One batched question round with the user, then the document. Target ≤2 iterations.
34
+
35
+ ## Traceability rules
36
+
37
+ - `_traceability.md` lives at the new repo root: a table per module — BR id, one-line rule, status, evidence (test file or charter kill-list ref).
38
+ - Seed it in Phase 0 with every BR at `pending` (script the extraction: `rg '\*\*BR-\d+' blueprint/<repo>/*.md`).
39
+ - Phases 3 and 4 update statuses as they land; Phase 7 verifies claims adversarially (spot-check: open the cited test, run it).
40
+ - A BR that applies only to killed features gets `killed@charter` with the kill-list entry as evidence.
41
+ - UI-behavior BRs (guards, visibility rules, redirects) count as implemented only with a route/component test or an explicit Phase 7 manual verification note.
42
+
43
+ ## Redesign guardrails
44
+
45
+ - Redesign changes HOW a capability is reached, never WHETHER it exists.
46
+ - When collapsing N legacy screens into one flow, list the absorbed routes in the module's traceability section so the audit can match them.
47
+ - Blueprint side effects (emails, notifications, socket events) triggered by user actions must survive the redesign — the trigger may move, the effect may not.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: winston-logging
3
+ description: Logging con winston — Logger.error/warn/info/debug, niveles correctos, mensajes accionables con contexto, nada de console.log. Trigger: al agregar logs o auditar las traces de un bug.
4
+ ---
5
+
6
+ # Winston Logging — patterns del repo
7
+
8
+ El `Logger` del repo (winston, típicamente en `infrastructure/`) reemplaza por completo a `console`. Escribe a consola y archivo en dev, solo consola en prod.
9
+
10
+ ## Cuándo usar este skill
11
+
12
+ Al agregar logs a un controller, job o servicio, elegir el nivel correcto, auditar traces de un bug, o limpiar `console.log` heredados.
13
+
14
+ ## El patrón
15
+
16
+ ```ts
17
+ import Logger from '../../infrastructure/core/Logger';
18
+
19
+ try {
20
+ const created = await Resource.create(dto);
21
+ Logger.info(`[resource:create] ${created._id} owner ${dto.owner}`);
22
+ } catch (err) {
23
+ Logger.error(`Failed to create Resource`, err);
24
+ throw err; // re-throw → middleware global lo mapea a InternalError
25
+ }
26
+ ```
27
+
28
+ Con `format.errors({ stack: true })` (config típica), pasar un `Error` loguea el stack solo. Prefija con `[<scope>:<verb>]` (`[job:sendReminder]`, `[email:welcome]`) para que sea grep-friendly.
29
+
30
+ Si tu framework ya centraliza el error async (`asyncHandler` en Express, exception filters en Nest, error middleware global), NO dupliques try/catch en cada handler. Agrégalo solo para loguear contexto extra, mapear un error específico (ej. `MongoServerError` 11000 → `BadRequestError`), o hacer cleanup antes del re-throw.
31
+
32
+ ## Gotchas que muerden
33
+
34
+ - **`Logger.debug` no se imprime en prod** cuando `logLevel = isDev ? 'debug' : 'info'`. Perfecto para diagnóstico que no quieres exponer; inútil si esperabas verlo en prod.
35
+ - **`JSON.stringify(req)` revienta**: los Request son enormes y tienen circular refs. Loguea solo lo que necesitas.
36
+
37
+ ## Reglas duras
38
+
39
+ 1. `Logger` siempre, nunca `console.log/error/warn`. Borra los `console.log` temporales antes del commit.
40
+ 2. Nivel correcto: `error` (capturado/crítico), `warn` (recuperable pero notable), `info` (evento de dominio: job, login, email), `debug` (solo dev).
41
+ 3. Mensajes accionables: incluye IDs y contexto, no solo "Error"/"Failed".
42
+ 4. No spammees — un `info` por request es ruido; resérvalo para eventos.
43
+ 5. Re-lanza (`throw err`) tras el `Logger.error` cuando el flujo lo necesita; el caller debe enterarse del fallo.
44
+ 6. Nunca loguees secrets (tokens, passwords) ni `JSON.stringify(req)` completo. Nada de `catch (e) {}` tragador.
45
+
46
+ ## Tabla rápida
47
+
48
+ | Situación | Nivel |
49
+ |---|---|
50
+ | Error capturado o evento crítico | `Logger.error(err)` |
51
+ | Recuperable pero notable | `Logger.warn(msg)` |
52
+ | Evento de dominio (job, login, email) | `Logger.info(msg)` |
53
+ | Diagnóstico de desarrollo | `Logger.debug(msg)` |
54
+
55
+ ## Antes de declarar listo
56
+
57
+ - No quedó ningún `console.log` nuevo; los temporales se borraron.
58
+ - Cada log usa el nivel correcto y lleva IDs/contexto accionable.
59
+ - Los errores capturados re-lanzan cuando el flujo lo necesita.
60
+ - No se loguean secrets ni `JSON.stringify(req)` completo.
61
+ - El quality gate del repo (`qualityGate.fast` en `argos.config.json`) en verde.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: work-unit-commits
3
+ description: Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.
4
+ ---
5
+
6
+ ## When to Use
7
+
8
+ Load this skill when deciding what belongs in each commit or PR.
9
+
10
+ Use it for:
11
+
12
+ - Splitting a feature into reviewable work.
13
+ - Preparing commits before opening a PR.
14
+ - Turning a large change into chained or stacked PRs.
15
+ - Keeping reviewer cognitive load healthy.
16
+ - Applying SDD tasks without accidentally producing a PR above 400 changed lines.
17
+
18
+ ## Critical Rules
19
+
20
+ | Rule | Requirement |
21
+ |------|-------------|
22
+ | Commit by work unit | A commit represents a deliverable behavior, fix, migration, or docs unit. |
23
+ | Do not commit by file type | Avoid `models`, then `services`, then `tests` if none works alone. |
24
+ | Keep tests with code | Tests belong in the same commit as the behavior they verify. |
25
+ | Keep docs with the user-visible change | Docs belong with the feature or workflow they explain. |
26
+ | Tell a story | A reviewer should understand why each commit exists from its diff and message. |
27
+ | Future PR-ready | Each commit should be a candidate chained PR when the change grows. |
28
+ | SDD workload guard | If SDD tasks forecast a >400-line change, group commits into chained PR slices before implementation. |
29
+
30
+ ## Work Unit Checklist
31
+
32
+ Before committing, confirm:
33
+
34
+ - [ ] The commit has one clear purpose.
35
+ - [ ] The repo still makes sense after applying only this commit.
36
+ - [ ] Tests or docs for this unit are included when relevant.
37
+ - [ ] Rollback is reasonable without reverting unrelated work.
38
+ - [ ] The commit message explains the outcome, not the file list.
39
+
40
+ ## Split Examples
41
+
42
+ | Weak split | Better work-unit split |
43
+ |------------|------------------------|
44
+ | `add models` | `feat(auth): add token validation domain model and tests` |
45
+ | `add services` | `feat(auth): wire token validation into login flow` |
46
+ | `add tests` | Tests included with each behavior commit |
47
+ | `update docs` | Docs included with the user-facing change they explain |
48
+
49
+ ## PR Relationship
50
+
51
+ Use work-unit commits as the foundation for chained PRs:
52
+
53
+ 1. Build the smallest independent work unit.
54
+ 2. Include verification for that unit.
55
+ 3. Commit it with a Conventional Commit message.
56
+ 4. If the PR approaches 400 changed lines, promote commits or groups of commits into chained PRs.
57
+
58
+ ## SDD Relationship
59
+
60
+ When `sdd-tasks` produces a Review Workload Forecast:
61
+
62
+ - Low risk: keep work-unit commits inside one PR.
63
+ - Medium risk: commit by work unit and monitor changed lines before PR creation.
64
+ - High risk: follow SDD `delivery_strategy` — ask on `ask-on-risk`, auto-slice on `auto-chain`, require `size:exception` on over-budget `single-pr`, or record accepted `size:exception` on `exception-ok`.
65
+
66
+ Each SDD work unit should map cleanly to a commit or PR with:
67
+
68
+ - clear start state,
69
+ - clear finished state,
70
+ - verification in the same unit,
71
+ - rollback that does not remove unrelated work.
72
+
73
+ ## Commands
74
+
75
+ ```bash
76
+ # Review the story before committing
77
+ git diff --stat
78
+ git diff --cached --stat
79
+
80
+ # Check recent commit style
81
+ git log --oneline -5
82
+ ```
83
+
84
+ _Adapted from a skill originally authored by gentleman-programming._