siesa-agents 2.1.44 → 2.1.46-alpha.4

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 (105) hide show
  1. package/README.md +10 -24
  2. package/bmad/_config/workflow-manifest.csv +2 -1
  3. package/bmad/bmm/agents/dev.md +1 -1
  4. package/bmad/bmm/data/git-flow-siesa.md +50 -0
  5. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +7 -1
  6. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/architecture-patterns.md +71 -42
  7. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/database-conventions.md +667 -0
  8. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/frontend-standards.md +1087 -263
  9. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/technical-preferences-ux.md +97 -96
  10. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/technology-stack.md +72 -13
  11. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/company-standards/vite-config-standard.md +535 -0
  12. package/bmad/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +1 -1
  13. package/bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +8 -0
  14. package/bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +3 -3
  15. package/bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +15 -13
  16. package/bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +42 -1
  17. package/bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +66 -2
  18. package/bmad/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +15 -0
  19. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-01-load-story.md +101 -0
  20. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-02-build-plan.md +89 -0
  21. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-03-review.md +91 -0
  22. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-04-fix.md +92 -0
  23. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-05-sync-sprint.md +70 -0
  24. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-06-jira-sync.md +135 -0
  25. package/bmad/bmm/workflows/4-implementation/code-review/steps/step-07-commit-push.md +174 -0
  26. package/bmad/bmm/workflows/4-implementation/code-review/workflow.md +57 -0
  27. package/bmad/bmm/workflows/4-implementation/create-story/steps/step-06-finalize.md +41 -1
  28. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-01-find-story.md +109 -0
  29. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-02-check-branch.md +108 -0
  30. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-03-load-context.md +46 -0
  31. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-04-env-readiness.md +45 -0
  32. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-05-review-check.md +57 -0
  33. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-06-mark-in-progress.md +52 -0
  34. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-07-implement.md +62 -0
  35. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-08-test-authoring.md +39 -0
  36. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-09-run-tests.md +43 -0
  37. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-10-validate-task.md +63 -0
  38. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-11-mark-review.md +50 -0
  39. package/bmad/bmm/workflows/4-implementation/dev-story/steps/step-12-communication.md +45 -0
  40. package/bmad/bmm/workflows/4-implementation/dev-story/workflow.md +44 -0
  41. package/bmad/bmm/workflows/4-implementation/sprint-planning/checklist.md +1 -0
  42. package/bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +56 -5
  43. package/bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +8 -0
  44. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/README.md +635 -0
  45. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/data/excel-structure-guide.md +255 -0
  46. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/prompts/prompt_design_test.md +95 -0
  47. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-01-init.md +1175 -0
  48. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-01b-continue.md +333 -0
  49. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-02-build-traceability.md +488 -0
  50. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-03-interpret-tests.md +1047 -0
  51. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-04-generate-plans.md +937 -0
  52. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/steps/step-05-export.md +261 -0
  53. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/README.md +256 -0
  54. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/epic-test-plan-template.md +215 -0
  55. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/test-cases-reference.csv +11 -0
  56. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/test-cases-structure.md +568 -0
  57. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/test-cases-summary-template.md +74 -0
  58. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/test-cases-template.csv +11 -0
  59. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/templates/traceability-map-template.md +59 -0
  60. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/workflow.md +493 -0
  61. package/bmad/bmm/workflows/4-implementation/traceability-and-testing/workflow.yaml +138 -0
  62. package/bmad/bmm/workflows/generate-project-context/steps/step-01-discover.md +12 -1
  63. package/bmad/bmm/workflows/generate-project-context/steps/step-02-generate.md +1 -1
  64. package/bmad/bmm/workflows/sync-epics-stories/completion-summary-sync-epics-stories.md +43 -0
  65. package/bmad/bmm/workflows/sync-epics-stories/data/templates/epic-template.json +13 -0
  66. package/bmad/bmm/workflows/sync-epics-stories/data/templates/story-template.json +13 -0
  67. package/bmad/bmm/workflows/sync-epics-stories/data/templates/subtask-template.json +4 -0
  68. package/bmad/bmm/workflows/sync-epics-stories/data/templates/task-template.json +7 -0
  69. package/bmad/bmm/workflows/sync-epics-stories/steps/step-01-init.md +150 -0
  70. package/bmad/bmm/workflows/sync-epics-stories/steps/step-01b-continue.md +79 -0
  71. package/bmad/bmm/workflows/sync-epics-stories/steps/step-02-setup.md +117 -0
  72. package/bmad/bmm/workflows/sync-epics-stories/steps/step-03-scope.md +70 -0
  73. package/bmad/bmm/workflows/sync-epics-stories/steps/step-04-epics.md +107 -0
  74. package/bmad/bmm/workflows/sync-epics-stories/steps/step-05-stories.md +163 -0
  75. package/bmad/bmm/workflows/sync-epics-stories/workflow-plan-sync-epics-stories.md +252 -0
  76. package/bmad/bmm/workflows/sync-epics-stories/workflow.md +54 -0
  77. package/bmad/bmm/workflows/testarch/framework/checklist.md +1 -1
  78. package/bmad/bmm/workflows/testarch/framework/instructions.md +1 -1
  79. package/claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +5 -1
  80. package/claude/commands/bmad/bmm/workflows/create-prd.md +7 -1
  81. package/claude/commands/bmad/bmm/workflows/dev-story.md +2 -2
  82. package/claude/commands/bmad/bmm/workflows/sprint-planning.md +3 -2
  83. package/claude/commands/bmad/bmm/workflows/sync-epics-stories.md +5 -0
  84. package/claude/commands/bmad/bmm/workflows/traceability-and-testing.md +5 -0
  85. package/claude/commands/jira_sync/feature_sync.md +131 -0
  86. package/claude/settings.local.json +0 -22
  87. package/gemini/commands/bmad-workflow-bmm-create-epics-and-stories.toml +5 -1
  88. package/gemini/commands/bmad-workflow-bmm-create-prd.toml +7 -1
  89. package/gemini/commands/bmad-workflow-bmm-dev-story.toml +2 -2
  90. package/gemini/commands/bmad-workflow-bmm-sprint-planning.toml +3 -2
  91. package/gemini/commands/bmad-workflow-bmm-sync-epics-stories.toml +4 -0
  92. package/gemini/commands/bmad-workflow-bmm-traceability-and-testing.toml +4 -0
  93. package/package.json +1 -1
  94. package/resources/fonts/Inter_18pt-Bold.ttf +0 -0
  95. package/resources/fonts/Inter_18pt-Light.ttf +0 -0
  96. package/resources/fonts/Inter_18pt-Regular.ttf +0 -0
  97. package/bmad/bmm/workflows/4-implementation/dev-story/instructions.xml +0 -471
  98. package/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -25
  99. package/claude/hooks/file-restriction-hook.py +0 -51
  100. package/claude/hooks/track-agent.py +0 -67
  101. package/resources/fonts/SiesaBT-Bold.otf +0 -0
  102. package/resources/fonts/SiesaBT-Light.otf +0 -0
  103. package/resources/fonts/SiesaBT-Regular.otf +0 -0
  104. /package/bmad/bmm/workflows/4-implementation/code-review/{instructions.xml → instructions.xml.bak} +0 -0
  105. /package/bmad/bmm/workflows/4-implementation/code-review/{workflow.yaml → workflow.yaml.bak} +0 -0
package/README.md CHANGED
@@ -11,15 +11,20 @@ Paquete para instalar y configurar el ecosistema **BMAD v6** con los agentes esp
11
11
  Esta versión está diseñada y optimizada para el siguiente stack tecnológico empresarial:
12
12
 
13
13
  **Frontend:**
14
- - Next.js 16 con TypeScript (App Router)
14
+ - Vite 7+ como bundler (builds rápidos, HMR instantáneo)
15
+ - TanStack Router 1+ (file-based routing, type-safe)
16
+ - React 18+ con TypeScript (strict mode)
17
+ - TanStack Query 5+ para server state
18
+ - Zustand 5+ para client state
15
19
  - Shadcn/ui + Radix UI + TailwindCSS v4
16
- - Zustand para state management
17
20
  - React Hook Form + Zod para formularios
21
+ - Vitest para testing
22
+ - Preparado para microfrontends con Module Federation
18
23
 
19
24
  **Backend:**
20
25
  - .NET 10 con C# Minimal API
21
26
  - Entity Framework Core 10 + linq2db + LinqKit
22
- - PostgreSQL como base de datos primaria
27
+ - PostgreSQL 18+ como base de datos primaria
23
28
  - Arquitectura de Microservicios
24
29
 
25
30
  **Principios Arquitectónicos:**
@@ -27,25 +32,6 @@ Esta versión está diseñada y optimizada para el siguiente stack tecnológico
27
32
  - Test-Driven Development (TDD)
28
33
  - Database per Microservice
29
34
 
30
- ## Sistema de Publicación Automática
31
-
32
- Este proyecto cuenta con un sistema de CI/CD automatizado que maneja las publicaciones de manera inteligente:
33
-
34
- ### Versiones Estables (`latest`)
35
- - **Rama**: `npm-package`
36
- - **Propósito**: Versiones oficiales para producción
37
- - **Funcionamiento**: Cada commit en esta rama incrementa automáticamente la versión y la publica en npm
38
-
39
- ### Versiones de Desarrollo (`dev`)
40
- - **Rama**: `developer`
41
- - **Propósito**: Versiones de prueba y desarrollo
42
- - **Funcionamiento**: Incrementa automáticamente el contador de desarrollo
43
-
44
- ### Flujo de Trabajo
45
- 1. **Desarrollo**: Trabaja en la rama `developer` para cambios experimentales
46
- 2. **Estable**: Mueve cambios finalizados a `npm-package` para versiones oficiales
47
- 3. **Automático**: El sistema maneja todo el versionado sin intervención manual
48
-
49
35
  ## Instalación
50
36
 
51
37
  ### Instalación única con npx (Recomendado)
@@ -105,8 +91,8 @@ El sistema detectará automáticamente que ya existe una instalación y la actua
105
91
 
106
92
  ## Requisitos
107
93
 
108
- - Node.js >= 14.0.0
109
- - npm >= 6.0.0
94
+ - Node.js >= 20.0.0
95
+ - npm >= 8.0.0 (o pnpm >= 8.0.0 recomendado)
110
96
  - Python >= 3.7 (requerido para hooks de Claude Code)
111
97
 
112
98
  ## Estructura de archivos instalados
@@ -17,7 +17,7 @@ name,description,module,path
17
17
  "code-review","Perform an ADVERSARIAL Senior Developer code review that finds 3-10 specific problems in every story. Challenges everything: code quality, test coverage, architecture compliance, security, performance. NEVER accepts `looks good` - must find minimum issues and can auto-fix with user approval.","bmm","_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml"
18
18
  "correct-course","Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation","bmm","_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml"
19
19
  "create-story","Create the next user story from epics+stories with enhanced context analysis and direct ready-for-dev marking","bmm","_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml"
20
- "dev-story","Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria","bmm","_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml"
20
+ "dev-story","Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria","bmm","_bmad/bmm/workflows/4-implementation/dev-story/workflow.md"
21
21
  "retrospective","Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic","bmm","_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml"
22
22
  "sprint-planning","Generate and manage the sprint status tracking file for Phase 4 implementation, extracting all epics and stories from epic files and tracking their status through the development lifecycle","bmm","_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml"
23
23
  "sprint-status","Summarize sprint-status.yaml, surface risks, and route to the right implementation workflow.","bmm","_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml"
@@ -43,3 +43,4 @@ name,description,module,path
43
43
  "innovation-strategy","Identify disruption opportunities and architect business model innovation. This workflow guides strategic analysis of markets, competitive dynamics, and business model innovation to uncover sustainable competitive advantages and breakthrough opportunities.","cis","_bmad/cis/workflows/innovation-strategy/workflow.yaml"
44
44
  "problem-solving","Apply systematic problem-solving methodologies to crack complex challenges. This workflow guides through problem diagnosis, root cause analysis, creative solution generation, evaluation, and implementation planning using proven frameworks.","cis","_bmad/cis/workflows/problem-solving/workflow.yaml"
45
45
  "storytelling","Craft compelling narratives using proven story frameworks and techniques. This workflow guides users through structured narrative development, applying appropriate story frameworks to create emotionally resonant and engaging stories for any purpose.","cis","_bmad/cis/workflows/storytelling/workflow.yaml"
46
+ "sync-epics-stories","Synchronize Bmad generated epics and stories documentation with Jira","bmm","_bmad/bmm/workflows/sync-epics-stories/workflow.md"
@@ -61,7 +61,7 @@ You must fully embody this agent's persona and follow all activation instruction
61
61
  <menu>
62
62
  <item cmd="MH or fuzzy match on menu or help">[MH] Redisplay Menu Help</item>
63
63
  <item cmd="CH or fuzzy match on chat">[CH] Chat with the Agent about anything</item>
64
- <item cmd="DS or fuzzy match on dev-story" workflow="{project-root}/_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml">[DS] Execute Dev Story workflow (full BMM path with sprint-status)</item>
64
+ <item cmd="DS or fuzzy match on dev-story" workflow="{project-root}/_bmad/bmm/workflows/4-implementation/dev-story/workflow.md">[DS] Execute Dev Story workflow (full BMM path with sprint-status)</item>
65
65
  <item cmd="CR or fuzzy match on code-review" workflow="{project-root}/_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml">[CR] Perform a thorough clean context code review (Highly Recommended, use fresh context and different LLM)</item>
66
66
  <item cmd="PM or fuzzy match on party-mode" exec="{project-root}/_bmad/core/workflows/party-mode/workflow.md">[PM] Start Party Mode</item>
67
67
  <item cmd="DA or fuzzy match on exit, leave, goodbye or dismiss agent">[DA] Dismiss Agent</item>
@@ -0,0 +1,50 @@
1
+ # Protocolo de Git: Creación de Ramas y Commits - SiesaTeams
2
+
3
+ Este documento establece el flujo obligatorio para la creación de ramas y el estándar de mensajes de commit para asegurar el cumplimiento de la gobernanza.
4
+
5
+ ---
6
+
7
+ ## 1. Validación de Rama Padre (Feature)
8
+ Para cualquier desarrollo de funcionalidad (**feature**), la rama de origen debe ser estrictamente `develop`.
9
+
10
+ **Procedimiento del Agente:**
11
+ 1. Validar que se encuentra en: `develop`.
12
+ 2. Ejecutar: `git checkout develop && git pull origin develop`.
13
+ 3. Confirmar que no hay cambios pendientes antes de ramificar.
14
+
15
+ ---
16
+
17
+ ## 2. Nomenclatura de la Rama
18
+ La estructura del nombre debe seguir el formato:
19
+ `rama-padre-team-owner-rq-descripcion`.
20
+
21
+ **Parámetros Sugeridos:**
22
+ * **Rama Padre:** `develop`.
23
+ * **Team:** (Debe coincidir con un prefijo válido, ej: `legacy-erp-nomina`).
24
+ * **Owner:** `gaduranb` (Basado en el correo corporativo gaduranb@siesa.com).
25
+ * **RQ:** Número de requerimiento asignado.
26
+ * **Descripción:** Breve, en minúsculas y con guiones.
27
+
28
+ **Ejemplo de comando:**
29
+ `git checkout -b develop-legacy-erp-nomina-gaduranb-rq1234-nueva-interfaz`.
30
+
31
+ ---
32
+
33
+ ## 3. Estándar de Mensajes de Commit
34
+ Se adopta el formato de **Conventional Commits** para mejorar la legibilidad y automatización.
35
+
36
+ | Tipo | Formato del Mensaje | Uso |
37
+ | :--- | :--- | :--- |
38
+ | **Feature** | `feat: descripción clara del cambio` | Nuevas funcionalidades. |
39
+ | **Fix** | `fix: descripción del error corregido` | Corrección de errores (bugs). |
40
+
41
+ **Ejemplos:**
42
+ * `git commit -m "feat: implementar validación de identidad mediante SSO"`.
43
+ * `git commit -m "fix: corregir cálculo de nómina en rama legacy"`.
44
+
45
+ ---
46
+
47
+ ## 4. Reglas de Oro de Gobernanza
48
+ * **Todo en Minúsculas:** Los nombres de ramas y repositorios no deben contener mayúsculas.
49
+ * **Protección de Ramas:** `main` y `develop` están protegidas; el push directo está prohibido.
50
+ * **Nota:** Esta automatización solo podrá crear las ramas como se indica y realizar push a las mismas en caso de ser necesario.
@@ -109,7 +109,13 @@ Define component library strategy and design custom components not covered by th
109
109
  - `{company_standards_path}/frontend-standards.md`
110
110
  - Check if siesa-ui-kit documentation exists in project
111
111
 
112
- "Before we analyze components, let me load the company standards and siesa-ui-kit to ensure we follow Siesa's component guidelines."
112
+ 🔴 **MANDATORY - Load siesa-ui-kit Component Inventory:**
113
+ - Fetch the component catalog from: `https://siesa-ui-kit.pages.dev/llms.txt`
114
+ - This file contains the complete, up-to-date list of all available siesa-ui-kit components with their descriptions, variants, and capabilities
115
+ - Parse and use this inventory as the **authoritative source** for determining which components are available in siesa-ui-kit
116
+ - If the URL is unreachable, warn the user: "⚠️ No se pudo acceder al catálogo de siesa-ui-kit en llms.txt. Por favor verificar conectividad o proporcionar la lista de componentes manualmente."
117
+
118
+ "Before we analyze components, let me load the company standards and the **siesa-ui-kit component catalog** to ensure we follow Siesa's component guidelines and use all available components."
113
119
 
114
120
  ### 2. Analyze Component Coverage (siesa-ui-kit FIRST)
115
121
 
@@ -7,26 +7,34 @@
7
7
 
8
8
  ### Folder Structure
9
9
 
10
- Next.js 16 App Router Structure with Clean Architecture + DDD:
10
+ Vite + TanStack Router Structure with Clean Architecture + DDD:
11
11
 
12
12
  ```
13
- ├── app/ # Next.js App Router directory
14
- │ ├── (dashboard)/ # Route groups for dashboard
15
- │ ├── sales/ # Routes for sales module
16
- │ │ ├── quotes/ # Quote management pages
17
- │ │ └── invoices/ # Invoice pages
18
- │ ├── inventory/ # Inventory routes
19
- │ ├── globals.css # Global styles
20
- │ ├── layout.tsx # Root layout component
21
- │ ├── page.tsx # Home page
22
- │ ├── loading.tsx # Global loading UI
23
- │ └── not-found.tsx # 404 page
24
-
25
13
  ├── src/
26
- │ ├── modules/ # Business modules following DDD
27
- ├── sales/ # Sales module
28
- │ │ ├── quotes/ # Quote domain
29
- │ │ │ ├── cart/ # Shopping cart feature
14
+ │ ├── main.tsx # React entry point
15
+ │ ├── router.tsx # TanStack Router config
16
+ │ ├── routeTree.gen.ts # Auto-generated (DO NOT EDIT)
17
+ │ ├── globals.css # Global styles + Tailwind
18
+ │ │
19
+ │ ├── routes/ # TanStack Router file-based routing
20
+ │ │ ├── __root.tsx # Root layout (providers)
21
+ │ │ ├── index.tsx # Home redirect
22
+ │ │ ├── _auth.tsx # Public layout (pathless)
23
+ │ │ ├── _auth/
24
+ │ │ │ └── login.tsx # /login
25
+ │ │ ├── _app.tsx # Protected layout (pathless)
26
+ │ │ └── _app/
27
+ │ │ ├── dashboard.tsx # /dashboard
28
+ │ │ ├── sales/
29
+ │ │ │ ├── quotes.tsx # /sales/quotes
30
+ │ │ │ └── invoices.tsx # /sales/invoices
31
+ │ │ └── inventory/
32
+ │ │ └── products.tsx # /inventory/products
33
+ │ │
34
+ │ ├── modules/ # Business modules following DDD
35
+ │ │ ├── sales/ # Sales module
36
+ │ │ │ ├── quotes/ # Quote domain
37
+ │ │ │ │ ├── cart/ # Shopping cart feature
30
38
  │ │ │ │ │ ├── domain/
31
39
  │ │ │ │ │ │ ├── entities/
32
40
  │ │ │ │ │ │ ├── repositories/
@@ -41,29 +49,43 @@ Next.js 16 App Router Structure with Clean Architecture + DDD:
41
49
  │ │ │ │ │ │ ├── api/
42
50
  │ │ │ │ │ │ └── adapters/
43
51
  │ │ │ │ │ └── presentation/
44
- │ │ │ │ │ └── components/ # Only components, pages in app/
45
- │ │ │ │ └── products/ # Products feature
46
- │ │ │ └── billing/ # Billing domain
47
- │ │ ├── inventory/ # Inventory module
48
- │ │ └── users/ # User module
52
+ │ │ │ │ │ └── components/
53
+ │ │ │ │ └── products/ # Products feature
54
+ │ │ │ └── billing/ # Billing domain
55
+ │ │ ├── inventory/ # Inventory module
56
+ │ │ └── users/ # User module
49
57
  │ │
50
58
  │ ├── shared/
51
- │ │ ├── components/ # Reusable UI components
52
- │ │ ├── hooks/ # Shared hooks
53
- │ │ ├── utils/ # Utility functions
54
- │ │ ├── types/ # Common TypeScript types
55
- │ │ └── constants/ # App constants
59
+ │ │ ├── components/ # Reusable UI components
60
+ │ │ │ └── ui/ # shadcn/ui components
61
+ │ │ ├── hooks/ # Shared hooks
62
+ │ │ ├── lib/ # Utilities (utils.ts, api-client.ts)
63
+ │ │ ├── types/ # Common TypeScript types
64
+ │ │ └── constants/ # App constants
56
65
  │ │
57
- │ ├── providers/ # React context providers
58
- │ ├── store/ # Global Zustand stores
59
- │ └── middleware.ts # Next.js middleware
66
+ │ ├── app/ # Global configuration
67
+ ├── providers/ # React context providers
68
+ └── store/ # Global Zustand stores
69
+ │ │
70
+ │ └── infrastructure/ # Global external services
71
+ │ ├── api/ # API configuration
72
+ │ ├── storage/ # IndexedDB, localStorage
73
+ │ └── pwa/ # PWA configuration
60
74
 
61
- ├── lib/ # Next.js utilities and configurations
62
- ├── components/ # Global UI components (alternative to src/shared)
63
- ├── public/ # Static assets and PWA manifest
64
- └── styles/ # Additional stylesheets
75
+ ├── public/ # Static assets and PWA manifest
76
+ ├── index.html # Vite entry point
77
+ └── vite.config.ts # Vite + TanStack Router plugin config
65
78
  ```
66
79
 
80
+ ### TanStack Router Conventions
81
+
82
+ | Prefix | Effect | Example |
83
+ |--------|--------|---------|
84
+ | `_` | Pathless layout (no URL segment) | `_app.tsx` → layout only |
85
+ | `.` | Flat routing (nested without folders) | `orders.$id.tsx` → `/orders/:id` |
86
+ | `-` | Ignored by router (colocated files) | `-components/` |
87
+ | `$` | Dynamic parameter | `$orderId.tsx` → `:orderId` |
88
+
67
89
  ### Core Principles
68
90
 
69
91
  #### Clean Architecture First
@@ -71,7 +93,7 @@ Strict separation of:
71
93
  - **Domain layer** - Business entities, repositories interfaces, domain services, and types
72
94
  - **Application layer** - Use cases, hooks, and state management (Zustand stores)
73
95
  - **Infrastructure layer** - Repository implementations, API clients, and adapters
74
- - **Presentation layer** - UI components (pages go in `app/`, components in `presentation/`)
96
+ - **Presentation layer** - UI components in `presentation/`, routes in `routes/`
75
97
 
76
98
  #### Domain-Driven Design
77
99
  Business logic drives architecture decisions. Organize by business modules and domains, not technical layers.
@@ -83,7 +105,7 @@ Build complex UIs from simple, reusable components.
83
105
  Leverage TypeScript for compile-time safety and developer experience.
84
106
 
85
107
  #### Performance by Design
86
- - Lazy loading
108
+ - Lazy loading (automatic with TanStack Router)
87
109
  - Memoization
88
110
  - Bundle optimization
89
111
 
@@ -107,11 +129,16 @@ Use MCP to install Shadcn components instead of creating manually.
107
129
 
108
130
  ### Framework Selection Rules
109
131
 
110
- **Default**: Always use Next.js 16 with App Router unless explicitly told otherwise.
132
+ **Default**: Always use Vite + TanStack Router with TypeScript.
111
133
 
112
- **Exceptions**: Only use pure React + Vite when user specifically mentions offline-first functionality or requests non-Next.js setup.
134
+ **Microfrontends**:
135
+ - **DEFAULT**: Vite + Single-SPA (`vite-plugin-single-spa` + `single-spa-react`) para todos los módulos de negocio
136
+ - **EXCEPCIÓN**: Vite + Module Federation SOLO para módulos transversales/compartidos explícitamente marcados por el ingeniero
113
137
 
114
- **Reasoning**: Next.js provides better developer experience, built-in optimization, and easier deployment while maintaining PWA capabilities.
138
+ **Reasoning**:
139
+ - Single-SPA proporciona aislamiento completo (CSS, JS, lifecycle), mejor hot reload, y error boundaries built-in
140
+ - Module Federation solo se usa cuando hay necesidad explícita de compartir código entre MFEs
141
+ - Ver `vite-config-standard.md` para configuración detallada
115
142
 
116
143
  ## Backend Architecture
117
144
 
@@ -388,9 +415,11 @@ app.MapScalarApiReference(); // NOT app.UseSwagger()
388
415
  ## Summary
389
416
 
390
417
  ### Frontend
391
- - **Framework**: Next.js 16 with TypeScript and App Router
418
+ - **Bundler**: Vite 5+
419
+ - **Router**: TanStack Router (file-based, type-safe)
420
+ - **Framework**: React 18+ with TypeScript (strict mode)
392
421
  - **Architecture**: Clean Architecture + DDD
393
- - **State**: Zustand
422
+ - **State**: Zustand (client) + TanStack Query (server)
394
423
  - **UI**: shadcn/ui + Radix UI + TailwindCSS v4
395
424
  - **Testing**: Vitest + React Testing Library
396
425
  - **Validation**: Zod + React Hook Form
@@ -412,4 +441,4 @@ app.MapScalarApiReference(); // NOT app.UseSwagger()
412
441
  3. **Test-Driven Development** - Tests before/alongside implementation
413
442
  4. **Database per Microservice** - Complete isolation between services
414
443
  5. **Type Safety** - TypeScript (frontend) and C# (backend) strong typing
415
- 6. **Docker for Production** - Local development without containers
444
+ 6. **Docker for Production** - Local development without containers