@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.
Files changed (215) hide show
  1. package/README.es.md +13 -57
  2. package/README.md +14 -56
  3. package/bin/cli.js +22 -29
  4. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/acceptance.md +0 -6
  5. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-scores.md +0 -6
  6. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/1-dev-agent-scaffold.md +0 -6
  7. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/2-dev-agent-manifest-command.md +0 -6
  8. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/3-dev-agent-marketplace-evidence.md +0 -6
  9. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/agent-tasks/4-qa-agent-verify-build.md +0 -6
  10. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/analysis.md +0 -6
  11. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/architect/review.md +0 -6
  12. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/metrics.md +0 -6
  13. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/plan.md +0 -6
  14. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/researcher/research.md +0 -6
  15. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/results-acceptance.md +0 -6
  16. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/task.md +0 -6
  17. package/dist/agent/artifacts/1-scaffold-extension-vscode-agentinc/verification.md +0 -6
  18. package/dist/agent/artifacts/11-refinement-capas-constitution/analysis.md +24 -0
  19. package/dist/agent/artifacts/11-refinement-capas-constitution/roadmap-audit.md +34 -0
  20. package/dist/agent/artifacts/11-refinement-capas-constitution/task.md +58 -0
  21. package/dist/agent/artifacts/12-npm-workspaces/acceptance.md +78 -0
  22. package/dist/agent/artifacts/12-npm-workspaces/analysis.md +179 -0
  23. package/dist/agent/artifacts/12-npm-workspaces/plan.md +237 -0
  24. package/dist/agent/artifacts/12-npm-workspaces/researcher/research.md +186 -0
  25. package/dist/agent/artifacts/12-npm-workspaces/task.md +126 -0
  26. package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/acceptance.md +75 -0
  27. package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/researcher/research.md +121 -0
  28. package/dist/agent/artifacts/13-implement-custom-chat-with-a2ui/task.md +104 -0
  29. package/dist/agent/artifacts/14-re-implement-setup-config-d1/acceptance.md +75 -0
  30. package/dist/agent/artifacts/14-re-implement-setup-config-d1/architect/analysis.md +90 -0
  31. package/dist/agent/artifacts/14-re-implement-setup-config-d1/planner/implementation_plan.md +44 -0
  32. package/dist/agent/artifacts/14-re-implement-setup-config-d1/researcher/research.md +113 -0
  33. package/dist/agent/artifacts/14-re-implement-setup-config-d1/task.md +107 -0
  34. package/dist/agent/artifacts/14-re-implement-setup-config-d1/verification/walkthrough.md +37 -0
  35. package/dist/agent/artifacts/14-re-implement-setup-config-d1/verifier/walkthrough.md +0 -0
  36. package/dist/agent/artifacts/2-scaffold-vscode-chat-ai-panel/acceptance.md +0 -6
  37. package/dist/agent/artifacts/2-scaffold-vscode-chat-ai-panel/task.md +0 -6
  38. package/dist/agent/artifacts/3-new-vscode-agentic-activitybar-chat/acceptance.md +0 -6
  39. package/dist/agent/artifacts/3-new-vscode-agentic-activitybar-chat/task.md +0 -6
  40. package/dist/agent/artifacts/4-copiar-estructura-agentic-cliente/acceptance.md +0 -6
  41. package/dist/agent/artifacts/4-copiar-estructura-agentic-cliente/architect/implementation.md +0 -6
  42. package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/acceptance.md +0 -6
  43. package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/agent-tasks/1-dev-agent-reestructurar-carpetas.md +1 -1
  44. package/dist/agent/artifacts/5-reestructurar-src-para-extension-vscode/task.md +0 -6
  45. package/dist/agent/artifacts/6-release-beta-11/task.md +0 -6
  46. package/dist/agent/artifacts/7-extension-vscode-webview/acceptance.md +70 -0
  47. package/dist/agent/artifacts/7-extension-vscode-webview/agent-scores.md +24 -0
  48. package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/1-vscode-specialist-scaffold-extension.md +99 -0
  49. package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/2-vscode-specialist-update-manifest.md +101 -0
  50. package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/3-vscode-specialist-webview-provider.md +96 -0
  51. package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/4-vscode-specialist-activitybar-icon.md +95 -0
  52. package/dist/agent/artifacts/7-extension-vscode-webview/agent-tasks/5-qa-agent-manual-verify.md +97 -0
  53. package/dist/agent/artifacts/7-extension-vscode-webview/analysis.md +195 -0
  54. package/dist/agent/artifacts/7-extension-vscode-webview/architect/review.md +124 -0
  55. package/dist/agent/artifacts/7-extension-vscode-webview/changelog.md +9 -0
  56. package/dist/agent/artifacts/7-extension-vscode-webview/metrics.md +43 -0
  57. package/dist/agent/artifacts/7-extension-vscode-webview/plan.md +181 -0
  58. package/dist/agent/artifacts/7-extension-vscode-webview/researcher/research.md +118 -0
  59. package/dist/agent/artifacts/7-extension-vscode-webview/results-acceptance.md +146 -0
  60. package/dist/agent/artifacts/7-extension-vscode-webview/task.md +119 -0
  61. package/dist/agent/artifacts/7-extension-vscode-webview/verification.md +81 -0
  62. package/dist/agent/artifacts/8-create-agentic-runtime-cli-first-as-the-single-execution-engine/task.md +126 -0
  63. package/dist/agent/artifacts/candidate/acceptance.md +23 -0
  64. package/dist/agent/artifacts/candidate/brief.md +39 -0
  65. package/dist/agent/artifacts/candidate/init.md +3 -9
  66. package/dist/agent/artifacts/candidate/task.md +4 -71
  67. package/dist/agent/artifacts/task-20260128-reorganize-structure/acceptance.md +0 -6
  68. package/dist/agent/artifacts/task-20260128-reorganize-structure/brief.md +1 -1
  69. package/dist/agent/artifacts/task-20260128-reorganize-structure/closure.md +3 -3
  70. package/dist/agent/artifacts/task-20260128-reorganize-structure/implementation.md +2 -2
  71. package/dist/agent/artifacts/task-20260128-reorganize-structure/task.md +0 -6
  72. package/dist/agent/artifacts/task-20260130-chatkit-mainview/acceptance.md +65 -0
  73. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-scores.md +26 -0
  74. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/1-neo-agent-deps-chatkit.md +108 -0
  75. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/15-vscode-specialist-views-router.md +89 -0
  76. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/1b-vscode-specialist-review-deps.md +106 -0
  77. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/2-neo-agent-local-server.md +111 -0
  78. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/22-vscode-specialist-external-js.md +84 -0
  79. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/23-qa-agent-coverage-tests.md +85 -0
  80. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/24-vscode-specialist-class-refactor.md +84 -0
  81. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/25-vscode-specialist-external-html.md +88 -0
  82. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/26-vscode-specialist-template-js-html.md +110 -0
  83. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/27-vscode-specialist-fix-loading-setup.md +110 -0
  84. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/28-vscode-specialist-webview-debug-setup.md +107 -0
  85. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/29-vscode-specialist-webview-logging.md +109 -0
  86. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/3-neo-agent-webview-ui.md +107 -0
  87. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/30-vscode-specialist-csp-source.md +88 -0
  88. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/31-vscode-specialist-logging-prefix.md +83 -0
  89. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/32-vscode-specialist-logging-visibility.md +85 -0
  90. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/33-vscode-specialist-lit-setup.md +85 -0
  91. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/34-vscode-specialist-core-lit-base.md +89 -0
  92. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/35-vscode-specialist-lit-decorators-ts.md +88 -0
  93. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/36-vscode-specialist-lit-module-start.md +85 -0
  94. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/37-vscode-specialist-lit-ready-state.md +86 -0
  95. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/4-qa-agent-verification.md +106 -0
  96. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/5-vscode-specialist-api-key-ui.md +107 -0
  97. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/6-vscode-specialist-refactor-protocol.md +108 -0
  98. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/7-qa-agent-unit-tests.md +104 -0
  99. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-10-vscode-specialist-api-key-handshake.md +84 -0
  100. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-11-vscode-specialist-api-key-button-style.md +83 -0
  101. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-12-vscode-specialist-key-gate-view.md +84 -0
  102. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-13-vscode-specialist-status-timeout.md +83 -0
  103. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-14-vscode-specialist-init-flow.md +84 -0
  104. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-16-vscode-specialist-view-context.md +87 -0
  105. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-17-vscode-specialist-clear-key-command.md +85 -0
  106. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-18-vscode-specialist-context-sync.md +84 -0
  107. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-19-vscode-specialist-setup-visible.md +88 -0
  108. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-20-vscode-specialist-loading-state.md +83 -0
  109. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-21-vscode-specialist-loading-label.md +84 -0
  110. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-8-vscode-specialist-api-key-detect.md +89 -0
  111. package/dist/agent/artifacts/task-20260130-chatkit-mainview/agent-tasks/fix-9-vscode-specialist-api-key-state.md +84 -0
  112. package/dist/agent/artifacts/task-20260130-chatkit-mainview/analysis.md +156 -0
  113. package/dist/agent/artifacts/task-20260130-chatkit-mainview/architect/review.md +141 -0
  114. package/dist/agent/artifacts/task-20260130-chatkit-mainview/changelog.md +30 -0
  115. package/dist/agent/artifacts/task-20260130-chatkit-mainview/metrics.md +43 -0
  116. package/dist/agent/artifacts/task-20260130-chatkit-mainview/plan.md +151 -0
  117. package/dist/agent/artifacts/task-20260130-chatkit-mainview/research.md +115 -0
  118. package/dist/agent/artifacts/task-20260130-chatkit-mainview/results-acceptance.md +171 -0
  119. package/dist/agent/artifacts/task-20260130-chatkit-mainview/verification.md +87 -0
  120. package/dist/agent/artifacts/task-20260130-fix-mainview-provider/acceptance.md +64 -0
  121. package/dist/agent/artifacts/task-20260130-fix-mainview-provider/architect/implementation.md +30 -0
  122. package/dist/agent/artifacts/task-20260130-fix-mainview-provider/brief.md +102 -0
  123. package/dist/agent/artifacts/task-20260130-fix-mainview-provider/closure.md +95 -0
  124. package/dist/agent/artifacts/task-20260130-rol-vscode/acceptance.md +68 -0
  125. package/dist/agent/artifacts/task-20260130-rol-vscode/architect/implementation.md +33 -0
  126. package/dist/agent/artifacts/task-20260130-rol-vscode/brief.md +104 -0
  127. package/dist/agent/artifacts/task-20260130-rol-vscode/closure.md +100 -0
  128. package/dist/agent/artifacts/task-beta-release/acceptance.md +23 -0
  129. package/dist/agent/artifacts/task-beta-release/brief.md +39 -0
  130. package/dist/agent/artifacts/task-beta-release/closure.md +29 -0
  131. package/dist/agent/artifacts/task-beta-release/init.md +26 -0
  132. package/dist/agent/artifacts/task-beta-release/task.md +64 -0
  133. package/dist/agent/index.md +69 -30
  134. package/dist/agent/rules/constitution/agents-behavior.md +110 -100
  135. package/dist/agent/rules/constitution/backend.md +27 -0
  136. package/dist/agent/rules/constitution/background.md +30 -0
  137. package/dist/agent/rules/constitution/clean-code.md +5 -6
  138. package/dist/agent/rules/constitution/modular-architecture.md +66 -0
  139. package/dist/agent/rules/constitution/view.md +41 -0
  140. package/dist/agent/rules/constitution/vscode-extensions.md +32 -0
  141. package/dist/agent/rules/roles/architect.md +1 -2
  142. package/dist/agent/rules/roles/backend.md +21 -0
  143. package/dist/agent/rules/roles/background.md +20 -0
  144. package/dist/agent/rules/roles/devops.md +20 -0
  145. package/dist/agent/rules/roles/engine.md +26 -0
  146. package/dist/agent/rules/roles/neo.md +12 -13
  147. package/dist/agent/rules/roles/researcher.md +2 -2
  148. package/dist/agent/rules/roles/view.md +22 -0
  149. package/dist/agent/rules/roles/vscode-specialist.md +24 -0
  150. package/dist/agent/templates/acceptance.md +19 -25
  151. package/dist/agent/templates/agent-task.md +39 -39
  152. package/dist/agent/templates/analysis.md +92 -92
  153. package/dist/agent/templates/brief.md +43 -43
  154. package/dist/agent/templates/changelog.md +8 -8
  155. package/dist/agent/templates/closure.md +29 -29
  156. package/dist/agent/templates/coding/coding-integration-report.md +102 -0
  157. package/dist/agent/templates/coding/coding-layer-report.md +78 -0
  158. package/dist/agent/templates/init.md +0 -6
  159. package/dist/agent/templates/planning.md +73 -73
  160. package/dist/agent/templates/research.md +43 -43
  161. package/dist/agent/templates/results-acceptance.md +94 -94
  162. package/dist/agent/templates/review.md +59 -59
  163. package/dist/agent/templates/subtask-implementation.md +29 -29
  164. package/dist/agent/templates/supplemental-report.md +0 -6
  165. package/dist/agent/templates/task-metrics.md +14 -14
  166. package/dist/agent/templates/task.md +15 -15
  167. package/dist/agent/templates/todo-item.md +23 -23
  168. package/dist/agent/workflows/coding/coding-backend.md +147 -0
  169. package/dist/agent/workflows/coding/coding-background.md +149 -0
  170. package/dist/agent/workflows/coding/coding-integration.md +174 -0
  171. package/dist/agent/workflows/coding/coding-view.md +151 -0
  172. package/dist/agent/workflows/init.md +83 -90
  173. package/dist/agent/workflows/scaffold-module.md +38 -0
  174. package/dist/agent/workflows/tasklifecycle-long/phase-0-acceptance-criteria.md +124 -134
  175. package/dist/agent/workflows/tasklifecycle-long/phase-1-research.md +103 -97
  176. package/dist/agent/workflows/tasklifecycle-long/phase-2-analysis.md +107 -102
  177. package/dist/agent/workflows/tasklifecycle-long/phase-3-planning.md +125 -120
  178. package/dist/agent/workflows/tasklifecycle-long/phase-4-implementation.md +118 -118
  179. package/dist/agent/workflows/tasklifecycle-long/phase-5-verification.md +105 -101
  180. package/dist/agent/workflows/tasklifecycle-long/phase-6-results-acceptance.md +82 -78
  181. package/dist/agent/workflows/tasklifecycle-long/phase-7-evaluation.md +84 -75
  182. package/dist/agent/workflows/tasklifecycle-long/phase-8-commit-push.md +94 -89
  183. package/dist/agent/workflows/tasklifecycle-short/short-phase-1-brief.md +78 -71
  184. package/dist/agent/workflows/tasklifecycle-short/short-phase-2-implementation.md +79 -71
  185. package/dist/agent/workflows/tasklifecycle-short/short-phase-3-closure.md +73 -66
  186. package/dist/cli/commands/create.js +4 -29
  187. package/dist/cli/commands/create.js.map +1 -1
  188. package/dist/cli/commands/mcp.js +0 -6
  189. package/dist/cli/commands/mcp.js.map +1 -1
  190. package/dist/runtime/engine/engine.js +29 -57
  191. package/dist/runtime/engine/engine.js.map +1 -1
  192. package/dist/runtime/engine/service.js +1 -38
  193. package/dist/runtime/engine/service.js.map +1 -1
  194. package/dist/runtime/engine/task-loader.js +1 -1
  195. package/dist/runtime/engine/task-loader.js.map +1 -1
  196. package/dist/runtime/engine/workflow-loader.js +17 -25
  197. package/dist/runtime/engine/workflow-loader.js.map +1 -1
  198. package/dist/runtime/mcp/server.js +38 -277
  199. package/dist/runtime/mcp/server.js.map +1 -1
  200. package/package.json +69 -7
  201. package/dist/agent/artifacts/index.md +0 -25
  202. package/dist/agent/rules/constitution/index.md +0 -26
  203. package/dist/agent/rules/constitution/runtime-integration.md +0 -101
  204. package/dist/agent/rules/index.md +0 -70
  205. package/dist/agent/rules/roles/index.md +0 -44
  206. package/dist/agent/templates/index.md +0 -42
  207. package/dist/agent/workflows/index.md +0 -30
  208. package/dist/agent/workflows/tasklifecycle-long/index.md +0 -172
  209. package/dist/agent/workflows/tasklifecycle-short/index.md +0 -70
  210. package/dist/cli/commands/register-mcp.js +0 -116
  211. package/dist/cli/commands/register-mcp.js.map +0 -1
  212. package/dist/runtime/engine/logger.js +0 -74
  213. package/dist/runtime/engine/logger.js.map +0 -1
  214. package/dist/runtime/mcp/check-tools.js +0 -66
  215. package/dist/runtime/mcp/check-tools.js.map +0 -1
@@ -0,0 +1,149 @@
1
+ ---
2
+ id: workflow.coding.background
3
+ description: On-demand coding workflow for the Background/Orchestration layer. Invoked by architect-agent during Phase 4 implementation.
4
+ owner: background
5
+ version: 1.0.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["coding-background"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: coding.background
13
+
14
+ ## Input (REQUIRED)
15
+ - Agent task file assigned by architect:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/agent-tasks/<N>-background-<taskName>.md`
17
+ - Constitution loaded:
18
+ - `constitution.background` (MANDATORY)
19
+ - `constitution.clean_code` (MANDATORY)
20
+ - Role activated:
21
+ - `roles.background`
22
+
23
+ > [!IMPORTANT]
24
+ > **This is an on-demand workflow.** It is invoked by `architect-agent` during Phase 4 as part of the implementation plan. The architect defines the execution order of coding workflows.
25
+
26
+ ## Output (REQUIRED)
27
+ - Implementation report using `templates.coding.layer_report`:
28
+ - Embedded in the agent task file under "Implementation Report"
29
+ - All code changes passing compilation
30
+
31
+ ---
32
+
33
+ ## Objective (ONLY)
34
+ - Implement the **background/orchestration layer** of the assigned task following `constitution.background`.
35
+ - Generate a detailed implementation report.
36
+ - Present to developer for Gate approval.
37
+
38
+ > This workflow **ONLY** implements orchestration logic.
39
+ > This workflow is the **ONLY** layer authorized to import `vscode`.
40
+ > This workflow manages the **Backend ↔ View bridge** via Messaging.
41
+
42
+ ---
43
+
44
+ ## Mandatory Steps
45
+
46
+ ### 0. Activate role
47
+ - Activate `roles.background` and use mandatory agent prefix in all messages.
48
+
49
+ ### 1. Verify inputs
50
+ - Agent task file exists and has Input section completed by architect.
51
+ - Constitution `constitution.background` loaded.
52
+ - Constitution `constitution.clean_code` loaded.
53
+ - If missing → **FAIL**.
54
+
55
+ ### 2. Analyze the task
56
+ - Read the agent task Input (objective, scope, dependencies).
57
+ - Complete the "Reasoning" section of the agent task:
58
+ - Analyze objective
59
+ - Consider options
60
+ - Document decision and justification
61
+
62
+ ### 3. Implement
63
+ - Write code following `constitution.background`:
64
+ - **Orchestration**: Manage flow between VS Code, Backend, and View.
65
+ - **Registration**: All modules register via `App.register(id, provider)`.
66
+ - **Messaging**: Use `core/messaging` for View communication (MANDATORY).
67
+ - **Type safety**: Use shared `Message` interface from `core/types`.
68
+ - **Lifecycle**: Respect VS Code activation/deactivation.
69
+ - **Dependency injection**: Inject services into providers.
70
+ - Write code following `constitution.clean_code`.
71
+
72
+ ### 4. Self-validate
73
+ - Verify all constitution rules are satisfied:
74
+ - [ ] Modules registered via `App.register()`
75
+ - [ ] View communication via `core/messaging` only
76
+ - [ ] Typed `Message` payloads
77
+ - [ ] VS Code lifecycle respected
78
+ - [ ] Gateway role: only layer with `vscode` side-effects
79
+ - [ ] Clean code principles applied
80
+ - Run compilation: `npm run compile`
81
+ - If compilation fails → fix before proceeding.
82
+
83
+ ### 5. Generate implementation report
84
+ - Complete the "Implementation Report" section using `templates.coding.layer_report`:
85
+ - **Who**: Agent identity and role
86
+ - **How**: Technical details, specifications, diagrams if needed
87
+ - **Why**: Justification and reasoning
88
+ - **Results**: What was achieved, compilation status
89
+ - **E2E Test Indications**: Scenarios for e2e testing
90
+
91
+ ### 6. Present to developer (Gate)
92
+ - Present completed task with report to developer.
93
+ - Request approval: **SI / NO**
94
+
95
+ ### 7. Register Gate
96
+ ```yaml
97
+ approval:
98
+ developer:
99
+ decision: SI | NO
100
+ date: <ISO-8601>
101
+ comments: <optional>
102
+ ```
103
+
104
+ ### 8. Evaluate Gate
105
+ - If `decision == SI` → go to **Step 9 (PASS)**.
106
+ - If `decision == NO`:
107
+ - Mark task as `failed`.
108
+ - Define corrective actions.
109
+ - **Do NOT advance** until resolved.
110
+ - Go to **Step 10 (FAIL)**.
111
+
112
+ ### 9. PASS (only if Gate approved)
113
+ - Mark agent task as `completed`.
114
+ - Update agent task file:
115
+ ```yaml
116
+ execution:
117
+ status: completed
118
+ completed_at: <ISO-8601>
119
+ ```
120
+ - Update the coding layer report with final status.
121
+ - Return control to `architect-agent` for next workflow in the sequence.
122
+
123
+ ---
124
+
125
+ ## FAIL (MANDATORY)
126
+
127
+ ### 10. Declare workflow as NOT completed
128
+ Cases:
129
+ - Missing inputs or constitution.
130
+ - Compilation failure not resolved.
131
+ - Constitution violation detected.
132
+ - Gate = NO without resolution.
133
+
134
+ Actions:
135
+ - Identify the failure point.
136
+ - Define corrective actions.
137
+ - Iterate until Gate PASS.
138
+
139
+ ---
140
+
141
+ ## Gate (REQUIRED)
142
+
143
+ Requirements (all mandatory):
144
+ 1. Code compiles without errors.
145
+ 2. All `constitution.background` rules are satisfied.
146
+ 3. All `constitution.clean_code` rules are satisfied.
147
+ 4. Implementation report is complete (all 5 sections).
148
+ 5. Developer Gate PASS (`decision == SI`).
149
+ 6. Agent task file starts with background agent prefix.
@@ -0,0 +1,174 @@
1
+ ---
2
+ id: workflow.coding.integration
3
+ description: On-demand coding workflow for integrating the 3 layers of a module (Backend, Background, View). Invoked by architect-agent during Phase 4 after layer-specific workflows.
4
+ owner: architect-agent
5
+ version: 1.0.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["coding-integration"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: coding.integration
13
+
14
+ ## Input (REQUIRED)
15
+ - Agent task file assigned by architect:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/agent-tasks/<N>-architect-integration-<taskName>.md`
17
+ - All applicable layer coding workflows completed and approved:
18
+ - `coding-backend` report (if applicable)
19
+ - `coding-background` report (if applicable)
20
+ - `coding-view` report (if applicable)
21
+ - Constitutions loaded (ALL):
22
+ - `constitution.backend` (MANDATORY)
23
+ - `constitution.background` (MANDATORY)
24
+ - `constitution.view` (MANDATORY)
25
+ - `constitution.clean_code` (MANDATORY)
26
+
27
+ > [!IMPORTANT]
28
+ > **This workflow runs AFTER all layer-specific coding workflows.** It validates that the 3 layers communicate correctly and comply with all constitutions. The architect is the owner.
29
+
30
+ ## Output (REQUIRED)
31
+ - Integration report using `templates.coding.integration_report`:
32
+ - Embedded in the agent task file under "Implementation Report"
33
+ - All layers passing compilation and integration validation
34
+
35
+ ---
36
+
37
+ ## Objective (ONLY)
38
+ - Validate and ensure **optimal communication** between the 3 layers of the module.
39
+ - Verify **constitution compliance** across all layers.
40
+ - Generate a detailed **integration report**.
41
+ - Present to developer for Gate approval.
42
+
43
+ > This workflow validates **inter-layer contracts**.
44
+ > This workflow ensures **no constitution violations** exist across boundaries.
45
+ > This workflow is the **final validation** before Phase 4 closure.
46
+
47
+ ---
48
+
49
+ ## Mandatory Steps
50
+
51
+ ### 0. Activate role
52
+ - Activate `architect-agent` and use mandatory prefix in all messages.
53
+
54
+ ### 1. Verify inputs
55
+ - All applicable layer coding workflows have Gate PASS.
56
+ - All layer reports exist and are complete.
57
+ - All 4 constitutions loaded.
58
+ - If missing → **FAIL**.
59
+
60
+ ### 2. Review layer reports
61
+ - Read each layer's implementation report.
62
+ - Identify:
63
+ - Communication touchpoints between layers.
64
+ - Shared contracts (Message types, API interfaces).
65
+ - Potential constitution violations at boundaries.
66
+
67
+ ### 3. Validate communication paths
68
+ - **View → Background**: Via `core/messaging` Event Bus only.
69
+ - [ ] No direct `vscode.postMessage` from View.
70
+ - [ ] Typed `Message` payloads.
71
+ - **Background → Backend**: Via abstract transport or direct invocation.
72
+ - [ ] No `vscode` leaking into Backend.
73
+ - [ ] Structured error responses from Backend.
74
+ - **Background → View**: Via `core/messaging` response path.
75
+ - [ ] Reactive UI updates on state change.
76
+ - **View → Backend**: FORBIDDEN.
77
+ - [ ] No direct imports or calls between View and Backend.
78
+
79
+ ### 4. Validate constitution compliance
80
+ For each constitution, verify cross-layer boundaries:
81
+
82
+ #### Backend (`constitution.backend`)
83
+ - [ ] Extends `AbstractServer` (if applicable)
84
+ - [ ] No `vscode` or `dom` imports
85
+ - [ ] Transport agnostic
86
+ - [ ] No direct View communication
87
+
88
+ #### Background (`constitution.background`)
89
+ - [ ] Modules registered via `App.register()`
90
+ - [ ] Uses `core/messaging` for View communication
91
+ - [ ] Manages lifecycle correctly
92
+ - [ ] Gateway role maintained (only layer with `vscode` side-effects)
93
+
94
+ #### View (`constitution.view`)
95
+ - [ ] Lit components with `@customElement`
96
+ - [ ] Triad structure (index/html/styles)
97
+ - [ ] No business logic
98
+ - [ ] Communication via Messaging wrapper only
99
+
100
+ ### 5. Integration validation
101
+ - Run full compilation: `npm run compile`
102
+ - Verify no type errors at layer boundaries.
103
+ - If issues found → create corrective sub-task.
104
+
105
+ ### 6. Generate integration report
106
+ - Complete the "Implementation Report" section using `templates.coding.integration_report`:
107
+ - **Communication validation matrix**: Results of Step 3
108
+ - **Constitution compliance**: Results of Step 4
109
+ - **Cross-layer sequence diagrams**: Key interaction flows (mermaid)
110
+ - **E2E Test Indications**: Integration test scenarios
111
+ - **Issues found and resolutions**: If any
112
+
113
+ ### 7. Present to developer (Gate)
114
+ - Present integration report with all evidence to developer.
115
+ - Request approval: **SI / NO**
116
+
117
+ ### 8. Register Gate
118
+ ```yaml
119
+ approval:
120
+ developer:
121
+ decision: SI | NO
122
+ date: <ISO-8601>
123
+ comments: <optional>
124
+ ```
125
+
126
+ ### 9. Evaluate Gate
127
+ - If `decision == SI` → go to **Step 10 (PASS)**.
128
+ - If `decision == NO`:
129
+ - Identify failing layer(s).
130
+ - Create corrective sub-task for specific layer workflow.
131
+ - Re-run integration after correction.
132
+ - Go to **Step 11 (FAIL)**.
133
+
134
+ ### 10. PASS (only if Gate approved)
135
+ - Mark integration task as `completed`.
136
+ - Update agent task file:
137
+ ```yaml
138
+ execution:
139
+ status: completed
140
+ completed_at: <ISO-8601>
141
+ ```
142
+ - Update the integration report with final assessment: `PASS`.
143
+ - Return control to `architect-agent` for **Phase 4 closure** (Gate final de Phase 4).
144
+
145
+ ---
146
+
147
+ ## FAIL (MANDATORY)
148
+
149
+ ### 10. Declare workflow as NOT completed
150
+ Cases:
151
+ - Layer workflows not completed or not approved.
152
+ - Constitution violation at layer boundaries.
153
+ - Compilation failure.
154
+ - Direct View→Backend communication detected.
155
+ - Gate = NO without resolution.
156
+
157
+ Actions:
158
+ - Identify the exact layer and violation.
159
+ - Delegate corrective action to the appropriate layer workflow.
160
+ - Re-run integration validation after fix.
161
+ - Iterate until Gate PASS.
162
+
163
+ ---
164
+
165
+ ## Gate (REQUIRED)
166
+
167
+ Requirements (all mandatory):
168
+ 1. All layer coding workflows have Gate PASS.
169
+ 2. All communication paths validated (Step 3 checklist).
170
+ 3. All constitutions satisfied at cross-layer boundaries (Step 4 checklist).
171
+ 4. Full compilation passes without errors.
172
+ 5. Integration report is complete (all sections).
173
+ 6. Developer Gate PASS (`decision == SI`).
174
+ 7. No direct View→Backend communication exists.
@@ -0,0 +1,151 @@
1
+ ---
2
+ id: workflow.coding.view
3
+ description: On-demand coding workflow for the View/UI layer. Invoked by architect-agent during Phase 4 implementation.
4
+ owner: view
5
+ version: 1.0.0
6
+ severity: PERMANENT
7
+ trigger:
8
+ commands: ["coding-view"]
9
+ blocking: true
10
+ ---
11
+
12
+ # WORKFLOW: coding.view
13
+
14
+ ## Input (REQUIRED)
15
+ - Agent task file assigned by architect:
16
+ - `.agent/artifacts/<taskId>-<taskTitle>/agent-tasks/<N>-view-<taskName>.md`
17
+ - Constitution loaded:
18
+ - `constitution.view` (MANDATORY)
19
+ - `constitution.clean_code` (MANDATORY)
20
+ - Role activated:
21
+ - `roles.view`
22
+
23
+ > [!IMPORTANT]
24
+ > **This is an on-demand workflow.** It is invoked by `architect-agent` during Phase 4 as part of the implementation plan. The architect defines the execution order of coding workflows.
25
+
26
+ ## Output (REQUIRED)
27
+ - Implementation report using `templates.coding.layer_report`:
28
+ - Embedded in the agent task file under "Implementation Report"
29
+ - All code changes passing compilation
30
+
31
+ ---
32
+
33
+ ## Objective (ONLY)
34
+ - Implement the **view/UI layer** of the assigned task following `constitution.view`.
35
+ - Generate a detailed implementation report.
36
+ - Present to developer for Gate approval.
37
+
38
+ > This workflow **ONLY** implements UI components.
39
+ > This workflow **NEVER** contains business logic.
40
+ > This workflow **NEVER** uses Node.js APIs (fs, path, etc).
41
+ > This workflow **NEVER** uses `vscode.postMessage` directly (use Messaging wrapper).
42
+
43
+ ---
44
+
45
+ ## Mandatory Steps
46
+
47
+ ### 0. Activate role
48
+ - Activate `roles.view` and use mandatory agent prefix in all messages.
49
+
50
+ ### 1. Verify inputs
51
+ - Agent task file exists and has Input section completed by architect.
52
+ - Constitution `constitution.view` loaded.
53
+ - Constitution `constitution.clean_code` loaded.
54
+ - If missing → **FAIL**.
55
+
56
+ ### 2. Analyze the task
57
+ - Read the agent task Input (objective, scope, dependencies).
58
+ - Complete the "Reasoning" section of the agent task:
59
+ - Analyze objective
60
+ - Consider options
61
+ - Document decision and justification
62
+
63
+ ### 3. Implement
64
+ - Write code following `constitution.view`:
65
+ - **Framework**: Lit is mandatory. Use `@customElement`.
66
+ - **Structure**: Triad required: `index.ts` (logic), `html.ts` (template), `styles.ts` (css).
67
+ - **Styling**: Vanilla CSS in `styles.ts`. No external preprocessors.
68
+ - **Dumb components**: Rendering and interaction only, NO business logic.
69
+ - **Reactive**: Immediate UI updates on state change.
70
+ - **Communication**: Event Bus via `p2p`/`bus`, use `Messaging` wrapper.
71
+ - Write code following `constitution.clean_code`.
72
+
73
+ ### 4. Self-validate
74
+ - Verify all constitution rules are satisfied:
75
+ - [ ] Uses Lit with `@customElement`
76
+ - [ ] Triad structure: `index.ts`, `html.ts`, `styles.ts`
77
+ - [ ] No business logic in components
78
+ - [ ] No Node.js API usage
79
+ - [ ] No direct `vscode.postMessage`
80
+ - [ ] Communication via Messaging wrapper
81
+ - [ ] Clean code principles applied
82
+ - Run compilation: `npm run compile`
83
+ - If compilation fails → fix before proceeding.
84
+
85
+ ### 5. Generate implementation report
86
+ - Complete the "Implementation Report" section using `templates.coding.layer_report`:
87
+ - **Who**: Agent identity and role
88
+ - **How**: Technical details, specifications, diagrams if needed
89
+ - **Why**: Justification and reasoning
90
+ - **Results**: What was achieved, compilation status
91
+ - **E2E Test Indications**: Scenarios for e2e testing
92
+
93
+ ### 6. Present to developer (Gate)
94
+ - Present completed task with report to developer.
95
+ - Request approval: **SI / NO**
96
+
97
+ ### 7. Register Gate
98
+ ```yaml
99
+ approval:
100
+ developer:
101
+ decision: SI | NO
102
+ date: <ISO-8601>
103
+ comments: <optional>
104
+ ```
105
+
106
+ ### 8. Evaluate Gate
107
+ - If `decision == SI` → go to **Step 9 (PASS)**.
108
+ - If `decision == NO`:
109
+ - Mark task as `failed`.
110
+ - Define corrective actions.
111
+ - **Do NOT advance** until resolved.
112
+ - Go to **Step 10 (FAIL)**.
113
+
114
+ ### 9. PASS (only if Gate approved)
115
+ - Mark agent task as `completed`.
116
+ - Update agent task file:
117
+ ```yaml
118
+ execution:
119
+ status: completed
120
+ completed_at: <ISO-8601>
121
+ ```
122
+ - Update the coding layer report with final status.
123
+ - Return control to `architect-agent` for next workflow in the sequence.
124
+
125
+ ---
126
+
127
+ ## FAIL (MANDATORY)
128
+
129
+ ### 10. Declare workflow as NOT completed
130
+ Cases:
131
+ - Missing inputs or constitution.
132
+ - Compilation failure not resolved.
133
+ - Constitution violation detected.
134
+ - Gate = NO without resolution.
135
+
136
+ Actions:
137
+ - Identify the failure point.
138
+ - Define corrective actions.
139
+ - Iterate until Gate PASS.
140
+
141
+ ---
142
+
143
+ ## Gate (REQUIRED)
144
+
145
+ Requirements (all mandatory):
146
+ 1. Code compiles without errors.
147
+ 2. All `constitution.view` rules are satisfied.
148
+ 3. All `constitution.clean_code` rules are satisfied.
149
+ 4. Implementation report is complete (all 5 sections).
150
+ 5. Developer Gate PASS (`decision == SI`).
151
+ 6. Agent task file starts with view agent prefix.