@christianmaf80/agentic-workflow 1.24.0-beta.3 → 1.25.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +13 -57
- package/README.md +14 -56
- package/bin/cli.js +22 -29
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/acceptance.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-scores.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/1-dev-agent-scaffold.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/2-dev-agent-manifest-command.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/3-dev-agent-marketplace-evidence.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/4-qa-agent-verify-build.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/analysis.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/architect/review.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/metrics.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/plan.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/researcher/research.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/results-acceptance.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/task.md +0 -6
- package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/verification.md +0 -6
- package/dist/agent/artifacts/11-refinement-capas-constitution/analysis.md +24 -0
- package/dist/agent/artifacts/11-refinement-capas-constitution/roadmap-audit.md +34 -0
- package/dist/agent/artifacts/11-refinement-capas-constitution/task.md +58 -0
- package/dist/agent/artifacts/12-npm-workspaces/acceptance.md +78 -0
- package/dist/agent/artifacts/12-npm-workspaces/analysis.md +179 -0
- package/dist/agent/artifacts/12-npm-workspaces/plan.md +237 -0
- package/dist/agent/artifacts/12-npm-workspaces/researcher/research.md +186 -0
- package/dist/agent/artifacts/12-npm-workspaces/task.md +126 -0
- package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/acceptance.md +75 -0
- package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/researcher/research.md +121 -0
- package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/task.md +104 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/acceptance.md +75 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/architect/analysis.md +90 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/planner/implementation_plan.md +44 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/researcher/research.md +113 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/task.md +107 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/verification/walkthrough.md +37 -0
- package/dist/agent/artifacts/14-re-implement-setup-config-d1/verifier/walkthrough.md +0 -0
- package/dist/agent/artifacts/2-scaffold-vscode-chat-ai-panel/acceptance.md +0 -6
- package/dist/agent/artifacts/2-scaffold-vscode-chat-ai-panel/task.md +0 -6
- package/dist/agent/artifacts/3-new-vscode-agentic-activitybar-chat/acceptance.md +0 -6
- package/dist/agent/artifacts/3-new-vscode-agentic-activitybar-chat/task.md +0 -6
- package/dist/agent/artifacts/4-copiar-estructura-agentic-cliente/acceptance.md +0 -6
- package/dist/agent/artifacts/4-copiar-estructura-agentic-cliente/architect/implementation.md +0 -6
- package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/acceptance.md +0 -6
- package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/agent-tasks/1-dev-agent-reestructurar-carpetas.md +1 -1
- package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/task.md +0 -6
- package/dist/agent/artifacts/6-release-beta-11/task.md +0 -6
- package/dist/agent/artifacts/7-extension-vscode-webview/acceptance.md +70 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-scores.md +24 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/1-vscode-specialist-scaffold-extension.md +99 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/2-vscode-specialist-update-manifest.md +101 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/3-vscode-specialist-webview-provider.md +96 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/4-vscode-specialist-activitybar-icon.md +95 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/5-qa-agent-manual-verify.md +97 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/analysis.md +195 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/architect/review.md +124 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/changelog.md +9 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/metrics.md +43 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/plan.md +181 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/researcher/research.md +118 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/results-acceptance.md +146 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/task.md +119 -0
- package/dist/agent/artifacts/7-extension-vscode-webview/verification.md +81 -0
- package/dist/agent/artifacts/8-create-agentic-runtime-cli-first-as-the-single-execution-engine/task.md +126 -0
- package/dist/agent/artifacts/candidate/acceptance.md +23 -0
- package/dist/agent/artifacts/candidate/brief.md +39 -0
- package/dist/agent/artifacts/candidate/init.md +3 -9
- package/dist/agent/artifacts/candidate/task.md +4 -71
- package/dist/agent/artifacts/task-20260128-reorganize-structure/acceptance.md +0 -6
- package/dist/agent/artifacts/task-20260128-reorganize-structure/brief.md +1 -1
- package/dist/agent/artifacts/task-20260128-reorganize-structure/closure.md +3 -3
- package/dist/agent/artifacts/task-20260128-reorganize-structure/implementation.md +2 -2
- package/dist/agent/artifacts/task-20260128-reorganize-structure/task.md +0 -6
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/acceptance.md +65 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-scores.md +26 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/1-neo-agent-deps-chatkit.md +108 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/15-vscode-specialist-views-router.md +89 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/1b-vscode-specialist-review-deps.md +106 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/2-neo-agent-local-server.md +111 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/22-vscode-specialist-external-js.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/23-qa-agent-coverage-tests.md +85 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/24-vscode-specialist-class-refactor.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/25-vscode-specialist-external-html.md +88 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/26-vscode-specialist-template-js-html.md +110 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/27-vscode-specialist-fix-loading-setup.md +110 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/28-vscode-specialist-webview-debug-setup.md +107 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/29-vscode-specialist-webview-logging.md +109 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/3-neo-agent-webview-ui.md +107 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/30-vscode-specialist-csp-source.md +88 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/31-vscode-specialist-logging-prefix.md +83 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/32-vscode-specialist-logging-visibility.md +85 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/33-vscode-specialist-lit-setup.md +85 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/34-vscode-specialist-core-lit-base.md +89 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/35-vscode-specialist-lit-decorators-ts.md +88 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/36-vscode-specialist-lit-module-start.md +85 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/37-vscode-specialist-lit-ready-state.md +86 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/4-qa-agent-verification.md +106 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/5-vscode-specialist-api-key-ui.md +107 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/6-vscode-specialist-refactor-protocol.md +108 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/7-qa-agent-unit-tests.md +104 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-10-vscode-specialist-api-key-handshake.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-11-vscode-specialist-api-key-button-style.md +83 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-12-vscode-specialist-key-gate-view.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-13-vscode-specialist-status-timeout.md +83 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-14-vscode-specialist-init-flow.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-16-vscode-specialist-view-context.md +87 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-17-vscode-specialist-clear-key-command.md +85 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-18-vscode-specialist-context-sync.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-19-vscode-specialist-setup-visible.md +88 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-20-vscode-specialist-loading-state.md +83 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-21-vscode-specialist-loading-label.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-8-vscode-specialist-api-key-detect.md +89 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-9-vscode-specialist-api-key-state.md +84 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/analysis.md +156 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/architect/review.md +141 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/changelog.md +30 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/metrics.md +43 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/plan.md +151 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/research.md +115 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/results-acceptance.md +171 -0
- package/dist/agent/artifacts/task-20260130-chatkit-mainview/verification.md +87 -0
- package/dist/agent/artifacts/task-20260130-fix-mainview-provider/acceptance.md +64 -0
- package/dist/agent/artifacts/task-20260130-fix-mainview-provider/architect/implementation.md +30 -0
- package/dist/agent/artifacts/task-20260130-fix-mainview-provider/brief.md +102 -0
- package/dist/agent/artifacts/task-20260130-fix-mainview-provider/closure.md +95 -0
- package/dist/agent/artifacts/task-20260130-rol-vscode/acceptance.md +68 -0
- package/dist/agent/artifacts/task-20260130-rol-vscode/architect/implementation.md +33 -0
- package/dist/agent/artifacts/task-20260130-rol-vscode/brief.md +104 -0
- package/dist/agent/artifacts/task-20260130-rol-vscode/closure.md +100 -0
- package/dist/agent/artifacts/task-beta-release/acceptance.md +23 -0
- package/dist/agent/artifacts/task-beta-release/brief.md +39 -0
- package/dist/agent/artifacts/task-beta-release/closure.md +29 -0
- package/dist/agent/artifacts/task-beta-release/init.md +26 -0
- package/dist/agent/artifacts/task-beta-release/task.md +64 -0
- package/dist/agent/index.md +69 -30
- package/dist/agent/rules/constitution/agents-behavior.md +110 -100
- package/dist/agent/rules/constitution/backend.md +27 -0
- package/dist/agent/rules/constitution/background.md +30 -0
- package/dist/agent/rules/constitution/clean-code.md +5 -6
- package/dist/agent/rules/constitution/modular-architecture.md +66 -0
- package/dist/agent/rules/constitution/view.md +41 -0
- package/dist/agent/rules/constitution/vscode-extensions.md +32 -0
- package/dist/agent/rules/roles/architect.md +1 -2
- package/dist/agent/rules/roles/backend.md +21 -0
- package/dist/agent/rules/roles/background.md +20 -0
- package/dist/agent/rules/roles/devops.md +20 -0
- package/dist/agent/rules/roles/engine.md +26 -0
- package/dist/agent/rules/roles/neo.md +12 -13
- package/dist/agent/rules/roles/researcher.md +2 -2
- package/dist/agent/rules/roles/view.md +22 -0
- package/dist/agent/rules/roles/vscode-specialist.md +24 -0
- package/dist/agent/templates/acceptance.md +19 -25
- package/dist/agent/templates/agent-task.md +39 -39
- package/dist/agent/templates/analysis.md +92 -92
- package/dist/agent/templates/brief.md +43 -43
- package/dist/agent/templates/changelog.md +8 -8
- package/dist/agent/templates/closure.md +29 -29
- package/dist/agent/templates/coding/coding-integration-report.md +102 -0
- package/dist/agent/templates/coding/coding-layer-report.md +78 -0
- package/dist/agent/templates/init.md +0 -6
- package/dist/agent/templates/planning.md +73 -73
- package/dist/agent/templates/research.md +43 -43
- package/dist/agent/templates/results-acceptance.md +94 -94
- package/dist/agent/templates/review.md +59 -59
- package/dist/agent/templates/subtask-implementation.md +29 -29
- package/dist/agent/templates/supplemental-report.md +0 -6
- package/dist/agent/templates/task-metrics.md +14 -14
- package/dist/agent/templates/task.md +15 -15
- package/dist/agent/templates/todo-item.md +23 -23
- package/dist/agent/workflows/coding/coding-backend.md +147 -0
- package/dist/agent/workflows/coding/coding-background.md +149 -0
- package/dist/agent/workflows/coding/coding-integration.md +174 -0
- package/dist/agent/workflows/coding/coding-view.md +151 -0
- package/dist/agent/workflows/init.md +83 -90
- package/dist/agent/workflows/scaffold-module.md +38 -0
- package/dist/agent/workflows/tasklifecycle-long/phase-0-acceptance-criteria.md +124 -134
- package/dist/agent/workflows/tasklifecycle-long/phase-1-research.md +103 -97
- package/dist/agent/workflows/tasklifecycle-long/phase-2-analysis.md +107 -102
- package/dist/agent/workflows/tasklifecycle-long/phase-3-planning.md +125 -120
- package/dist/agent/workflows/tasklifecycle-long/phase-4-implementation.md +118 -118
- package/dist/agent/workflows/tasklifecycle-long/phase-5-verification.md +105 -101
- package/dist/agent/workflows/tasklifecycle-long/phase-6-results-acceptance.md +82 -78
- package/dist/agent/workflows/tasklifecycle-long/phase-7-evaluation.md +84 -75
- package/dist/agent/workflows/tasklifecycle-long/phase-8-commit-push.md +94 -89
- package/dist/agent/workflows/tasklifecycle-short/short-phase-1-brief.md +78 -71
- package/dist/agent/workflows/tasklifecycle-short/short-phase-2-implementation.md +79 -71
- package/dist/agent/workflows/tasklifecycle-short/short-phase-3-closure.md +73 -66
- package/dist/cli/commands/create.js +4 -29
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/mcp.js +0 -6
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/runtime/engine/engine.js +29 -57
- package/dist/runtime/engine/engine.js.map +1 -1
- package/dist/runtime/engine/service.js +1 -38
- package/dist/runtime/engine/service.js.map +1 -1
- package/dist/runtime/engine/task-loader.js +1 -1
- package/dist/runtime/engine/task-loader.js.map +1 -1
- package/dist/runtime/engine/workflow-loader.js +17 -25
- package/dist/runtime/engine/workflow-loader.js.map +1 -1
- package/dist/runtime/mcp/server.js +38 -277
- package/dist/runtime/mcp/server.js.map +1 -1
- package/package.json +69 -7
- package/dist/agent/artifacts/index.md +0 -25
- package/dist/agent/rules/constitution/index.md +0 -26
- package/dist/agent/rules/constitution/runtime-integration.md +0 -101
- package/dist/agent/rules/index.md +0 -70
- package/dist/agent/rules/roles/index.md +0 -44
- package/dist/agent/templates/index.md +0 -42
- package/dist/agent/workflows/index.md +0 -30
- package/dist/agent/workflows/tasklifecycle-long/index.md +0 -172
- package/dist/agent/workflows/tasklifecycle-short/index.md +0 -70
- package/dist/cli/commands/register-mcp.js +0 -116
- package/dist/cli/commands/register-mcp.js.map +0 -1
- package/dist/runtime/engine/logger.js +0 -74
- package/dist/runtime/engine/logger.js.map +0 -1
- package/dist/runtime/mcp/check-tools.js +0 -66
- package/dist/runtime/mcp/check-tools.js.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
🏛️ **architect-agent**: Análisis técnico para T012 — Migración a npm workspaces.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
artifact: analysis
|
|
5
|
+
phase: phase-2-analysis
|
|
6
|
+
owner: architect-agent
|
|
7
|
+
status: draft
|
|
8
|
+
related_task: 12-npm-workspaces
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Analysis — 12-npm-workspaces
|
|
12
|
+
|
|
13
|
+
## 1. Resumen ejecutivo
|
|
14
|
+
|
|
15
|
+
**Problema**
|
|
16
|
+
El proyecto es un monolito TypeScript donde todas las dependencias están centralizadas en un único `package.json` y los módulos se comunican mediante rutas relativas. Esto impide el aislamiento de dependencias y dificulta la escalabilidad.
|
|
17
|
+
|
|
18
|
+
**Objetivo**
|
|
19
|
+
Convertir `app`, `core` y `cli` en packages npm privados dentro de un monorepo con npm workspaces.
|
|
20
|
+
|
|
21
|
+
**Criterio de éxito**
|
|
22
|
+
Los tests e2e deben seguir pasando idénticamente tras la migración.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Estado del proyecto (As-Is)
|
|
27
|
+
|
|
28
|
+
- **Estructura relevante**
|
|
29
|
+
- `src/extension/modules/app/` — módulo App (hereda de core)
|
|
30
|
+
- `src/extension/modules/core/` — módulo Core (base classes, logger, messaging, view)
|
|
31
|
+
- `src/cli/` — CLI con 3 comandos (init, create, mcp)
|
|
32
|
+
- `src/infrastructure/` — utilidades de migración y mapping
|
|
33
|
+
- `src/runtime/` — MCP server runtime
|
|
34
|
+
|
|
35
|
+
- **Componentes existentes**
|
|
36
|
+
- **app**: depende de core (4 imports directos con rutas relativas `../core/`)
|
|
37
|
+
- **core**: autónomo, sin dependencias a otros módulos internos
|
|
38
|
+
- **cli**: depende de infrastructure y runtime (rutas `../../infrastructure/`, `../../runtime/`)
|
|
39
|
+
|
|
40
|
+
- **Nucleo / capas base**
|
|
41
|
+
- `tsconfig.json` único con `rootDir: ./src`, `outDir: ./dist`
|
|
42
|
+
- `tsconfig.build.json` excluye `src/extension/**` (solo compila cli/runtime/infra)
|
|
43
|
+
- Build: `tsc -p ./` para extensión, `tsc -p tsconfig.build.json` para npm package
|
|
44
|
+
|
|
45
|
+
- **Limitaciones detectadas**
|
|
46
|
+
- `cli` importa `infrastructure` y `runtime` que NO serán workspaces — rutas relativas deben mantenerse o necesitan otro enfoque
|
|
47
|
+
- `extension.ts` vive fuera de modules y es el entry point de VSCode
|
|
48
|
+
- El output `dist/extension/extension.js` debe mantenerse para que VSCode funcione
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. Cobertura de Acceptance Criteria
|
|
53
|
+
|
|
54
|
+
### AC-1: Tests e2e pasan idénticamente
|
|
55
|
+
- **Interpretación**: `npm run test:e2e` (Playwright) debe producir el mismo resultado antes y después
|
|
56
|
+
- **Verificación**: Ejecutar `npx playwright test` antes y después de la migración
|
|
57
|
+
- **Riesgos**: Si la ruta de resolución de módulos cambia, la extensión podría no compilar
|
|
58
|
+
|
|
59
|
+
### AC-2: `npm install` instala todos los workspaces
|
|
60
|
+
- **Interpretación**: Un solo `npm install` en root resuelve deps de app, core y cli
|
|
61
|
+
- **Verificación**: `npm install && npm ls --ws`
|
|
62
|
+
- **Riesgos**: Versiones conflictivas de la misma dependencia entre packages
|
|
63
|
+
|
|
64
|
+
### AC-3: `npm run compile` compila todos los workspaces
|
|
65
|
+
- **Interpretación**: El comando root debe compilar TypeScript de todos los packages
|
|
66
|
+
- **Verificación**: `npm run compile` debe exit 0
|
|
67
|
+
- **Riesgos**: `tsconfig.json` actual asume `rootDir: ./src` — necesita ajuste
|
|
68
|
+
|
|
69
|
+
### AC-4: Cada package tiene `package.json` con `"private": true`
|
|
70
|
+
- **Interpretación**: Crear 3 package.json independientes
|
|
71
|
+
- **Verificación**: Verificar existencia y contenido de cada archivo
|
|
72
|
+
- **Riesgos**: Bajo
|
|
73
|
+
|
|
74
|
+
### AC-5: Root `package.json` contiene `"workspaces"`
|
|
75
|
+
- **Interpretación**: Configurar el campo `workspaces` apuntando a los 3 packages
|
|
76
|
+
- **Verificación**: Verificar campo en package.json
|
|
77
|
+
- **Riesgos**: Bajo
|
|
78
|
+
|
|
79
|
+
### AC-6: Dependencias inter-package vía `workspace:*`
|
|
80
|
+
- **Interpretación**: app debe declarar `"@agentic-workflow/core": "workspace:*"` en sus deps
|
|
81
|
+
- **Verificación**: `npm ls @agentic-workflow/core`
|
|
82
|
+
- **Riesgos**: Las rutas relativas de import en TypeScript deben cambiar de `../core/` a `@agentic-workflow/core`
|
|
83
|
+
|
|
84
|
+
### AC-7: Extensión VSCode funciona tras migración
|
|
85
|
+
- **Interpretación**: `npm run compile` + F5 Launch Extension funciona
|
|
86
|
+
- **Verificación**: Tests e2e (gate principal)
|
|
87
|
+
- **Riesgos**: El entry point `dist/extension/extension.js` debe seguir existiendo en la misma ruta
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 4. Research técnico — Alternativas
|
|
92
|
+
|
|
93
|
+
- **Alternativa A: npm workspaces sin TypeScript project references**
|
|
94
|
+
- Cada package tiene `package.json` pero comparten un `tsconfig.json` root
|
|
95
|
+
- Los imports cambian de rutas relativas a package names (`@agentic-workflow/core`)
|
|
96
|
+
- TypeScript resuelve vía `node_modules` symlinks creados por npm workspaces
|
|
97
|
+
- Ventajas: Más simple, menos configuración TypeScript
|
|
98
|
+
- Inconvenientes: Sin compilación incremental, un tsconfig
|
|
99
|
+
|
|
100
|
+
- **Alternativa B: npm workspaces + TypeScript project references**
|
|
101
|
+
- Cada package tiene `package.json` Y `tsconfig.json` propio con `composite: true`
|
|
102
|
+
- Root tsconfig usa `references` para compilar en orden
|
|
103
|
+
- Ventajas: Compilación incremental, mejor aislamiento de tipos
|
|
104
|
+
- Inconvenientes: Mayor complejidad de configuración, cada package necesita `declaration: true`
|
|
105
|
+
|
|
106
|
+
**Decisión recomendada**: **Alternativa A** (npm workspaces sin TS project references), por minimizar cambios y riesgos. La Alternativa B se puede adoptar incrementalmente después.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 5. Agentes participantes
|
|
111
|
+
|
|
112
|
+
- **🏛️ architect-agent**
|
|
113
|
+
- Diseño de la estructura de workspaces
|
|
114
|
+
- Configuración de package.json files
|
|
115
|
+
- Actualización de tsconfig
|
|
116
|
+
- Actualización de import paths
|
|
117
|
+
|
|
118
|
+
- **🛡️ qa-agent**
|
|
119
|
+
- Verificación de tests e2e
|
|
120
|
+
- Validación de que compile funciona
|
|
121
|
+
|
|
122
|
+
**Handoffs**
|
|
123
|
+
- architect implementa → qa verifica con tests e2e
|
|
124
|
+
|
|
125
|
+
**Componentes necesarios**
|
|
126
|
+
- **Crear**: 3 `package.json` (app, core, cli)
|
|
127
|
+
- **Modificar**: Root `package.json`, `tsconfig.json`, imports en app (de relativo a package name)
|
|
128
|
+
- **Eliminar**: Ninguno
|
|
129
|
+
|
|
130
|
+
**Demo**: No aplica.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 6. Impacto de la tarea
|
|
135
|
+
|
|
136
|
+
- **Arquitectura**: Se añaden 3 packages internos al monorepo. No cambia la estructura de carpetas.
|
|
137
|
+
- **APIs / contratos**: Los exports de cada package se definen en su `package.json`. Las interfaces TS no cambian.
|
|
138
|
+
- **Compatibilidad**: Los imports cambian de `../core/` a `@agentic-workflow/core`. Es un breaking change interno pero no afecta APIs externas.
|
|
139
|
+
- **Testing**: Los tests e2e son el gate. Los unit tests de app necesitarán ajustar imports.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 7. Riesgos y mitigaciones
|
|
144
|
+
|
|
145
|
+
| Riesgo | Impacto | Mitigación |
|
|
146
|
+
|--------|---------|------------|
|
|
147
|
+
| `cli` importa `infrastructure` y `runtime` con rutas relativas — no son workspaces | Medio | Mantener rutas relativas en cli (no cambiar lo que no es workspace) |
|
|
148
|
+
| `tsconfig.json` rootDir/outDir debe ajustarse para workspaces | Alto | Mantener tsconfig root, los packages heredan o aplican paths |
|
|
149
|
+
| Ruta `dist/extension/extension.js` debe existir para VSCode | Alto | Asegurar que compile produce output en la misma ubicación |
|
|
150
|
+
| Symlinks de npm workspaces pueden causar issues en VSCode bundling | Medio | Verificar con test e2e completo |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 8. Preguntas abiertas
|
|
155
|
+
Ninguna tras Fase 0.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 9. TODO Backlog
|
|
160
|
+
|
|
161
|
+
**Referencia**: `.agent/todo/`
|
|
162
|
+
**Estado actual**: No existe directorio todo
|
|
163
|
+
**Items relevantes para esta tarea**: Ninguno
|
|
164
|
+
**Impacto en el análisis**: Sin impacto
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 10. Aprobación
|
|
169
|
+
Este análisis **requiere aprobación explícita del desarrollador**.
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
approval:
|
|
173
|
+
developer:
|
|
174
|
+
decision: SI
|
|
175
|
+
date: "2026-02-16T07:39:57+01:00"
|
|
176
|
+
comments: null
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
> Sin aprobación, esta fase **NO puede darse por completada** ni avanzar a Phase 3.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
🏛️ **architect-agent**: Plan de implementación para T012 — Migración a npm workspaces.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
artifact: plan
|
|
5
|
+
phase: phase-3-planning
|
|
6
|
+
owner: architect-agent
|
|
7
|
+
status: draft
|
|
8
|
+
related_task: 12-npm-workspaces
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Implementation Plan — 12-npm-workspaces
|
|
12
|
+
|
|
13
|
+
## 1. Resumen del plan
|
|
14
|
+
- **Contexto**: Convertir los módulos app, core y cli en packages npm privados dentro de un monorepo con npm workspaces.
|
|
15
|
+
- **Resultado esperado**: Proyecto configurado como npm workspaces con 3 packages independientes, build unificado funcional y tests e2e pasando.
|
|
16
|
+
- **Alcance**:
|
|
17
|
+
- **Incluye**: Crear 3 `package.json`, configurar workspaces en root, actualizar imports de app→core a package name, ajustar tsconfig
|
|
18
|
+
- **Excluye**: TypeScript project references (se puede adoptar después), cambio de rutas en cli (mantiene relativas a infrastructure/runtime)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. Inputs contractuales
|
|
23
|
+
- **Task**: `.agent/artifacts/12-npm-workspaces/task.md`
|
|
24
|
+
- **Analysis**: `.agent/artifacts/12-npm-workspaces/analysis.md`
|
|
25
|
+
- **Acceptance Criteria**: AC-1 a AC-7 (tests e2e como gate principal)
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
plan:
|
|
29
|
+
workflows:
|
|
30
|
+
- domain: extension-modules
|
|
31
|
+
action: refactor
|
|
32
|
+
workflow: tasklifecycle-long
|
|
33
|
+
|
|
34
|
+
dispatch:
|
|
35
|
+
- domain: core-package
|
|
36
|
+
action: create
|
|
37
|
+
workflow: tasklifecycle-long
|
|
38
|
+
- domain: app-package
|
|
39
|
+
action: refactor
|
|
40
|
+
workflow: tasklifecycle-long
|
|
41
|
+
- domain: cli-package
|
|
42
|
+
action: create
|
|
43
|
+
workflow: tasklifecycle-long
|
|
44
|
+
- domain: root-config
|
|
45
|
+
action: refactor
|
|
46
|
+
workflow: tasklifecycle-long
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 3. Desglose de implementación (pasos)
|
|
52
|
+
|
|
53
|
+
### Paso 1: Crear `package.json` para `@agentic-workflow/core`
|
|
54
|
+
- **Descripción**: Crear `src/extension/modules/core/package.json` con nombre `@agentic-workflow/core`, `private: true`, y las dependencias que usa core (`vscode` como peer, `@fastify/cors`, `fastify` si aplica)
|
|
55
|
+
- **Dependencias**: Ninguna
|
|
56
|
+
- **Entregables**: `src/extension/modules/core/package.json`
|
|
57
|
+
- **Agente responsable**: architect-agent
|
|
58
|
+
|
|
59
|
+
### Paso 2: Crear `package.json` para `@agentic-workflow/app`
|
|
60
|
+
- **Descripción**: Crear `src/extension/modules/app/package.json` con nombre `@agentic-workflow/app`, `private: true`, dependencia a `@agentic-workflow/core` via `workspace:*`, y sus propias deps
|
|
61
|
+
- **Dependencias**: Paso 1 (core package existe)
|
|
62
|
+
- **Entregables**: `src/extension/modules/app/package.json`
|
|
63
|
+
- **Agente responsable**: architect-agent
|
|
64
|
+
|
|
65
|
+
### Paso 3: Crear `package.json` para `@agentic-workflow/cli`
|
|
66
|
+
- **Descripción**: Crear `src/cli/package.json` con nombre `@agentic-workflow/cli`, `private: true`, y sus dependencias de CLI (`commander`, `@clack/prompts`)
|
|
67
|
+
- **Dependencias**: Ninguna
|
|
68
|
+
- **Entregables**: `src/cli/package.json`
|
|
69
|
+
- **Agente responsable**: architect-agent
|
|
70
|
+
|
|
71
|
+
### Paso 4: Configurar workspaces en root `package.json`
|
|
72
|
+
- **Descripción**: Añadir campo `"workspaces"` al root `package.json` apuntando a los 3 packages. Mover dependencias exclusivas de cada package a sus respectivos `package.json`
|
|
73
|
+
- **Dependencias**: Pasos 1-3
|
|
74
|
+
- **Entregables**: Root `package.json` actualizado
|
|
75
|
+
- **Agente responsable**: architect-agent
|
|
76
|
+
|
|
77
|
+
### Paso 5: Actualizar imports en `app` (de relativos a package name)
|
|
78
|
+
- **Descripción**: Cambiar todos los imports de `../core/...` y `../../core/...` en app a `@agentic-workflow/core`. Archivos afectados:
|
|
79
|
+
- `app/index.ts`: `'../core/index.js'` → `'@agentic-workflow/core'`
|
|
80
|
+
- `app/backend/index.ts`: `'../../core/backend/index.js'` → `'@agentic-workflow/core/backend'` o `'@agentic-workflow/core'`
|
|
81
|
+
- `app/background/index.ts`: `'../../core/index.js'` → `'@agentic-workflow/core'`
|
|
82
|
+
- `app/view/index.ts`: `'../../core/view/index.js'` → `'@agentic-workflow/core'`
|
|
83
|
+
- `app/test/unit/background.test.ts`: imports de core → package name
|
|
84
|
+
- **Dependencias**: Paso 4
|
|
85
|
+
- **Entregables**: Imports actualizados en 5 archivos
|
|
86
|
+
- **Agente responsable**: architect-agent
|
|
87
|
+
|
|
88
|
+
### Paso 6: Configurar exports en core `package.json`
|
|
89
|
+
- **Descripción**: Definir `"exports"` en core package.json para exponer los submodules necesarios (backend, view, messaging, etc.) via subpath exports
|
|
90
|
+
- **Dependencias**: Paso 5 (saber qué subpaths se necesitan)
|
|
91
|
+
- **Entregables**: `src/extension/modules/core/package.json` con exports map
|
|
92
|
+
- **Agente responsable**: architect-agent
|
|
93
|
+
|
|
94
|
+
### Paso 7: Ejecutar `npm install` y verificar symlinks
|
|
95
|
+
- **Descripción**: Ejecutar `npm install` desde root para que npm cree los symlinks de workspace. Verificar que `node_modules/@agentic-workflow/core` y `@agentic-workflow/app` existen
|
|
96
|
+
- **Dependencias**: Paso 6
|
|
97
|
+
- **Entregables**: `npm install` exitoso
|
|
98
|
+
- **Agente responsable**: architect-agent
|
|
99
|
+
|
|
100
|
+
### Paso 8: Verificar compilación
|
|
101
|
+
- **Descripción**: Ejecutar `npm run compile` y solucionar errores TypeScript si los hay
|
|
102
|
+
- **Dependencias**: Paso 7
|
|
103
|
+
- **Entregables**: Build exitoso
|
|
104
|
+
- **Agente responsable**: architect-agent
|
|
105
|
+
|
|
106
|
+
### Paso 9: Ejecutar tests e2e
|
|
107
|
+
- **Descripción**: Ejecutar `npm run test:e2e` (Playwright) y verificar que pasan
|
|
108
|
+
- **Dependencias**: Paso 8
|
|
109
|
+
- **Entregables**: Tests e2e passing
|
|
110
|
+
- **Agente responsable**: qa-agent
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 4. Asignación de responsabilidades (Agentes)
|
|
115
|
+
|
|
116
|
+
- **🏛️ architect-agent**
|
|
117
|
+
- Crear package.json files (Pasos 1-4)
|
|
118
|
+
- Actualizar imports y exports (Pasos 5-6)
|
|
119
|
+
- Configurar y verificar build (Pasos 7-8)
|
|
120
|
+
|
|
121
|
+
- **🛡️ qa-agent**
|
|
122
|
+
- Ejecutar y verificar tests e2e (Paso 9)
|
|
123
|
+
- Validar todos los AC
|
|
124
|
+
|
|
125
|
+
**Handoffs**
|
|
126
|
+
- architect-agent → qa-agent: al completar Paso 8 (build exitoso)
|
|
127
|
+
|
|
128
|
+
**Componentes**
|
|
129
|
+
- **Crear**: 3 `package.json` (core, app, cli) — herramienta: editor de archivos
|
|
130
|
+
- **Modificar**: Root `package.json`, imports en app (5 archivos) — herramienta: editor de archivos
|
|
131
|
+
- **Eliminar**: Ninguno
|
|
132
|
+
|
|
133
|
+
**Demo**: No aplica.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 5. Estrategia de testing y validación
|
|
138
|
+
|
|
139
|
+
- **E2E (Gate principal)**
|
|
140
|
+
- Comando: `npx playwright test`
|
|
141
|
+
- Cobertura: Extensión VSCode se activa, módulos se registran, UI funciona
|
|
142
|
+
- Trazabilidad: AC-1
|
|
143
|
+
|
|
144
|
+
- **Unit tests**
|
|
145
|
+
- Comando: `npm run test:unit`
|
|
146
|
+
- Cobertura: `background.test.ts` — verificar que imports de core funcionan con package name
|
|
147
|
+
- Trazabilidad: AC-3, AC-6
|
|
148
|
+
|
|
149
|
+
- **Build verification**
|
|
150
|
+
- Comando: `npm run compile`
|
|
151
|
+
- Cobertura: TypeScript compila sin errores
|
|
152
|
+
- Trazabilidad: AC-3
|
|
153
|
+
|
|
154
|
+
- **Workspace verification**
|
|
155
|
+
- Comando: `npm ls --ws`
|
|
156
|
+
- Cobertura: Todos los workspaces resueltos correctamente
|
|
157
|
+
- Trazabilidad: AC-2, AC-5
|
|
158
|
+
|
|
159
|
+
**Trazabilidad AC → Tests**:
|
|
160
|
+
| AC | Test |
|
|
161
|
+
|----|------|
|
|
162
|
+
| AC-1: Tests e2e pasan | `npx playwright test` |
|
|
163
|
+
| AC-2: npm install funciona | `npm install && npm ls --ws` |
|
|
164
|
+
| AC-3: compile funciona | `npm run compile` |
|
|
165
|
+
| AC-4: package.json con private | Verificación manual de archivos |
|
|
166
|
+
| AC-5: workspaces configurado | `cat package.json \| grep workspaces` |
|
|
167
|
+
| AC-6: deps via workspace:* | `npm ls @agentic-workflow/core` |
|
|
168
|
+
| AC-7: VSCode funciona | `npx playwright test` (e2e) |
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 6. Plan de demo
|
|
173
|
+
No aplica (cambio de infraestructura sin impacto visible en UI).
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 7. Estimaciones y pesos de implementación
|
|
178
|
+
|
|
179
|
+
| Paso | Esfuerzo | Notas |
|
|
180
|
+
|------|----------|-------|
|
|
181
|
+
| 1-3: Crear package.json | Bajo | Archivos nuevos simples |
|
|
182
|
+
| 4: Configurar root workspaces | Bajo | Un campo en package.json |
|
|
183
|
+
| 5: Actualizar imports | Medio | 5 archivos, requiere cuidado |
|
|
184
|
+
| 6: Configurar exports | Medio | Subpath exports pueden ser complejos |
|
|
185
|
+
| 7: npm install | Bajo | Verificación |
|
|
186
|
+
| 8: Verificar compilación | Medio | Posibles errores de resolución |
|
|
187
|
+
| 9: Tests e2e | Bajo | Ejecución y validación |
|
|
188
|
+
|
|
189
|
+
**Suposiciones**: La estructura de carpetas no cambia. Los outputs de compilación deben mantenerse en las mismas rutas.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 8. Puntos críticos y resolución
|
|
194
|
+
|
|
195
|
+
- **Punto crítico 1: Resolución de módulos TypeScript**
|
|
196
|
+
- Riesgo: TypeScript puede no resolver `@agentic-workflow/core` sin TS project references
|
|
197
|
+
- Impacto: Alto — build falla
|
|
198
|
+
- Estrategia: npm workspaces crea symlinks en `node_modules/`, TypeScript con `moduleResolution: NodeNext` los resuelve. Si falla, añadir `paths` en tsconfig.
|
|
199
|
+
|
|
200
|
+
- **Punto crítico 2: Output path de extensión VSCode**
|
|
201
|
+
- Riesgo: El `dist/extension/extension.js` podría generarse en otra ruta
|
|
202
|
+
- Impacto: Alto — extensión no arranca
|
|
203
|
+
- Estrategia: Mantener `rootDir: ./src` y `outDir: ./dist` en el tsconfig root. No crear tsconfig por package.
|
|
204
|
+
|
|
205
|
+
- **Punto crítico 3: Imports de subpaths en core**
|
|
206
|
+
- Riesgo: app importa de `core/backend/index.js` directamente — requiere subpath exports
|
|
207
|
+
- Impacto: Medio — imports específicos fallan
|
|
208
|
+
- Estrategia: Configurar `"exports"` en core package.json para cada subpath usado, o consolidar re-exports en core/index.ts.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 9. Dependencias y compatibilidad
|
|
213
|
+
- **Dependencias internas**: app → core (workspace:*), cli → infrastructure/runtime (rutas relativas, sin cambio)
|
|
214
|
+
- **Dependencias externas**: npm 9+, Node 20+, TypeScript 5.9.3 — todas compatibles
|
|
215
|
+
- **Restricciones arquitectónicas**: Entry point VSCode (`main` en root package.json) debe apuntar a `./dist/extension/extension.js`
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 10. Criterios de finalización
|
|
220
|
+
- [ ] `npm install` exitoso desde root
|
|
221
|
+
- [ ] `npm run compile` exitoso
|
|
222
|
+
- [ ] `npx playwright test` pasa idénticamente
|
|
223
|
+
- [ ] 3 package.json creados con `"private": true`
|
|
224
|
+
- [ ] Root package.json tiene `"workspaces"` configurado
|
|
225
|
+
- [ ] Imports de app→core usan `@agentic-workflow/core`
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 11. Aprobación del desarrollador (OBLIGATORIA)
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
approval:
|
|
233
|
+
developer:
|
|
234
|
+
decision: SI
|
|
235
|
+
date: "2026-02-16T07:42:30+01:00"
|
|
236
|
+
comments: null
|
|
237
|
+
```
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
🔬 **researcher-agent**: Informe de investigación técnica para T012 — npm-workspaces.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
artifact: research
|
|
5
|
+
phase: phase-1-research
|
|
6
|
+
owner: researcher-agent
|
|
7
|
+
status: draft
|
|
8
|
+
related_task: 12-npm-workspaces
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Research Report — 12-npm-workspaces
|
|
12
|
+
|
|
13
|
+
> [!CAUTION]
|
|
14
|
+
> **REGLA PERMANENT**: Este documento es SOLO documentación.
|
|
15
|
+
> El researcher-agent documenta hallazgos SIN analizar, SIN recomendar, SIN proponer soluciones.
|
|
16
|
+
> El análisis corresponde a Phase 2.
|
|
17
|
+
|
|
18
|
+
## 1. Resumen ejecutivo
|
|
19
|
+
- **Problema investigado**: Migración del proyecto monolítico a npm workspaces con packages independientes
|
|
20
|
+
- **Objetivo de la investigación**: Documentar la estructura actual, dependencias entre módulos, y las capacidades de npm workspaces
|
|
21
|
+
- **Principales hallazgos**: El proyecto tiene dependencias cruzadas entre `app→core` y `cli→infrastructure+runtime`. npm workspaces soporta este patrón de forma nativa desde Node 16+
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Necesidades detectadas
|
|
26
|
+
|
|
27
|
+
### Estructura actual del proyecto
|
|
28
|
+
```
|
|
29
|
+
src/
|
|
30
|
+
├── extension/
|
|
31
|
+
│ ├── extension.ts → entry point VSCode (importa app)
|
|
32
|
+
│ └── modules/
|
|
33
|
+
│ ├── app/ → Package candidato @agentic-workflow/app
|
|
34
|
+
│ │ ├── index.ts → importa '../core/index.js'
|
|
35
|
+
│ │ ├── backend/ → importa '../../core/backend/index.js'
|
|
36
|
+
│ │ ├── background/ → importa '../../core/index.js'
|
|
37
|
+
│ │ ├── view/ → importa '../../core/view/index.js'
|
|
38
|
+
│ │ └── test/unit/ → importa '../../../core/...'
|
|
39
|
+
│ └── core/ → Package candidato @agentic-workflow/core
|
|
40
|
+
│ ├── index.ts → re-exports de submodules
|
|
41
|
+
│ ├── backend/ → AbstractBackend, VirtualServer
|
|
42
|
+
│ ├── background/ → Background base class
|
|
43
|
+
│ ├── messaging/ → Transport layer
|
|
44
|
+
│ ├── view/ → View base + templates
|
|
45
|
+
│ ├── logger.ts
|
|
46
|
+
│ ├── constants.ts
|
|
47
|
+
│ └── types.d.ts
|
|
48
|
+
├── cli/ → Package candidato @agentic-workflow/cli
|
|
49
|
+
│ ├── index.ts → re-exports commands
|
|
50
|
+
│ └── commands/
|
|
51
|
+
│ ├── init.ts → importa '../../infrastructure/...'
|
|
52
|
+
│ ├── create.ts → importa '../../infrastructure/...'
|
|
53
|
+
│ └── mcp.ts → importa '../../runtime/...'
|
|
54
|
+
├── infrastructure/ → NO es package (dependencia de cli)
|
|
55
|
+
└── runtime/ → NO es package (dependencia de cli)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Mapa de dependencias cruzadas entre módulos
|
|
59
|
+
| Origen | Destino | Archivos que importan |
|
|
60
|
+
|--------|---------|----------------------|
|
|
61
|
+
| `app/index.ts` | `core/index.js` | `App extends CoreApp` |
|
|
62
|
+
| `app/backend/index.ts` | `core/backend/index.js` | `AbstractBackend` |
|
|
63
|
+
| `app/background/index.ts` | `core/index.js` | `Background, ViewHtml, Message` |
|
|
64
|
+
| `app/view/index.ts` | `core/view/index.js` | `View` |
|
|
65
|
+
| `app/test/unit/background.test.ts` | `core/messaging/background.js`, `core/index.js` | Test imports |
|
|
66
|
+
| `cli/commands/init.ts` | `infrastructure/...`, `runtime/...` | `detectAgentSystem`, `resolver`, `backup`, `startRuntimeMcpServer` |
|
|
67
|
+
| `cli/commands/create.ts` | `infrastructure/mapping/resolver.js` | Resolver |
|
|
68
|
+
| `cli/commands/mcp.ts` | `runtime/mcp/server.js` | `startRuntimeMcpServer` |
|
|
69
|
+
|
|
70
|
+
### Configuración TypeScript actual
|
|
71
|
+
- **tsconfig.json**: `rootDir: ./src`, `outDir: ./dist`, `module: NodeNext`
|
|
72
|
+
- **tsconfig.build.json**: Excluye `src/extension/**` y tests (build solo cli/runtime/infra)
|
|
73
|
+
- Sin TypeScript project references configuradas
|
|
74
|
+
|
|
75
|
+
### Tests existentes
|
|
76
|
+
- **E2E**: `test/e2e/extension.spec.ts` — Playwright, 1 archivo, config en `playwright.config.ts` (testDir: `./test/e2e`)
|
|
77
|
+
- **Unit**: `src/extension/modules/app/test/unit/background.test.ts` — Vitest
|
|
78
|
+
- **Scripts**: `npm run test:e2e` (Playwright), `npm run test:unit` (Vitest), `npm run compile` (tsc + build-view.mjs)
|
|
79
|
+
|
|
80
|
+
### Build pipeline actual
|
|
81
|
+
- `compile`: `tsc -p ./ && node scripts/build-view.mjs`
|
|
82
|
+
- `build`: `clean-dist && tsc -p tsconfig.build.json && copy-assets`
|
|
83
|
+
- `watch`: `tsc -watch -p ./ & node scripts/build-view.mjs --watch`
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 3. Hallazgos técnicos
|
|
88
|
+
|
|
89
|
+
### 3.1 npm Workspaces
|
|
90
|
+
- **Descripción**: Funcionalidad nativa de npm (desde v7 / Node 16) que permite gestionar múltiples packages dentro de un mismo repositorio.
|
|
91
|
+
- **Estado**: Estable, soportado en producción
|
|
92
|
+
- **Documentación oficial**: https://docs.npmjs.com/cli/v10/using-npm/workspaces
|
|
93
|
+
- **Limitaciones conocidas**:
|
|
94
|
+
- Hoisting por defecto; se puede controlar con `.npmrc` (`install-strategy=nested`)
|
|
95
|
+
- `node_modules` compartido en root por defecto
|
|
96
|
+
- Requiere que cada workspace tenga su propio `package.json` con campo `name`
|
|
97
|
+
|
|
98
|
+
### 3.2 workspace: protocol
|
|
99
|
+
- **Descripción**: Protocolo para referenciar packages del workspace como dependencias (`"@agentic-workflow/core": "workspace:*"`)
|
|
100
|
+
- **Estado**: Soportado nativamente por npm desde v9+
|
|
101
|
+
- **Documentación**: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#workspace-dependencies
|
|
102
|
+
- **Limitaciones**: Packages con `workspace:*` no se pueden publicar directamente; npm los reemplaza en `npm pack`/`npm publish`
|
|
103
|
+
|
|
104
|
+
### 3.3 TypeScript Project References
|
|
105
|
+
- **Descripción**: Mecanismo nativo de TypeScript para compilar múltiples proyectos con dependencias entre ellos
|
|
106
|
+
- **Estado**: Estable desde TypeScript 3.0+
|
|
107
|
+
- **Documentación**: https://www.typescriptlang.org/docs/handbook/project-references.html
|
|
108
|
+
- **Limitaciones**: Requiere `composite: true` y `declaration: true` en cada sub-proyecto
|
|
109
|
+
|
|
110
|
+
### 3.4 VSCode Extension con Workspaces
|
|
111
|
+
- **Descripción**: Las extensiones VSCode usan webpack/esbuild para bundling; npm workspaces puede coexistir
|
|
112
|
+
- **Estado**: No documentado oficialmente por VSCode
|
|
113
|
+
- **Documentación**: https://code.visualstudio.com/api/working-with-extensions/bundling-extension
|
|
114
|
+
- **Limitaciones**: El entry point (`main` en package.json root) debe seguir apuntando al bundle final
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 4. APIs relevantes
|
|
119
|
+
|
|
120
|
+
### npm CLI workspace commands
|
|
121
|
+
| Comando | Descripción |
|
|
122
|
+
|---------|-------------|
|
|
123
|
+
| `npm install` | Instala deps de todos los workspaces automáticamente |
|
|
124
|
+
| `npm run -w <name> <script>` | Ejecuta script en un workspace específico |
|
|
125
|
+
| `npm run --ws <script>` | Ejecuta script en todos los workspaces |
|
|
126
|
+
| `npm ls --ws` | Lista dependencias de workspaces |
|
|
127
|
+
|
|
128
|
+
### package.json `workspaces` field
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"workspaces": [
|
|
132
|
+
"src/extension/modules/app",
|
|
133
|
+
"src/extension/modules/core",
|
|
134
|
+
"src/cli"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 5. Compatibilidad
|
|
142
|
+
|
|
143
|
+
### Node.js / npm versions
|
|
144
|
+
| Feature | Mínimo requerido | Actual en proyecto |
|
|
145
|
+
|---------|:---:|:---:|
|
|
146
|
+
| npm workspaces | npm 7+ / Node 16+ | Node 20+ (by engines) |
|
|
147
|
+
| workspace: protocol | npm 9+ | Compatible |
|
|
148
|
+
| TypeScript project references | TS 3.0+ | TS 5.9.3 |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 6. Oportunidades detectadas
|
|
153
|
+
- TypeScript project references podrían acelerar compilación incremental en monorepos
|
|
154
|
+
- npm workspace symlinking automático elimina necesidad de `npm link` manual
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 7. Riesgos identificados
|
|
159
|
+
|
|
160
|
+
| Riesgo | Severidad | Fuente |
|
|
161
|
+
|--------|:---------:|--------|
|
|
162
|
+
| `cli` importa `infrastructure` y `runtime` con rutas relativas `../../` — no son workspaces | Alta | Análisis de imports |
|
|
163
|
+
| `extension.ts` importa `./modules/app/index.js` — ruta relativa que depende de la estructura de carpetas | Media | Código fuente |
|
|
164
|
+
| Unit tests en app importan core con rutas relativas `../../../core/` | Media | Código fuente |
|
|
165
|
+
| El `tsconfig.json` tiene `rootDir: ./src` — habrá que ajustar si cada package tiene su propio tsconfig | Alta | tsconfig.json |
|
|
166
|
+
| VSCode extension main apunta a `./dist/extension/extension.js` — la ruta de output debe mantenerse | Alta | package.json |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 8. Fuentes
|
|
171
|
+
- [npm Workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces)
|
|
172
|
+
- [npm workspace: protocol](https://docs.npmjs.com/cli/v10/configuring-npm/package-json)
|
|
173
|
+
- [TypeScript Project References](https://www.typescriptlang.org/docs/handbook/project-references.html)
|
|
174
|
+
- [VSCode Extension Bundling](https://code.visualstudio.com/api/working-with-extensions/bundling-extension)
|
|
175
|
+
- [Node.js Subpath Exports](https://nodejs.org/api/packages.html#subpath-exports)
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 9. Aprobacion del desarrollador (OBLIGATORIA)
|
|
180
|
+
```yaml
|
|
181
|
+
approval:
|
|
182
|
+
developer:
|
|
183
|
+
decision: SI
|
|
184
|
+
date: "2026-02-16T07:35:37+01:00"
|
|
185
|
+
comments: null
|
|
186
|
+
```
|