@backendkit-labs/agent-coding 0.28.5 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/dist/__tests__/context-hooks.test.d.ts +2 -0
  2. package/dist/__tests__/context-hooks.test.d.ts.map +1 -0
  3. package/dist/__tests__/context-hooks.test.js +21 -0
  4. package/dist/__tests__/context-hooks.test.js.map +1 -0
  5. package/dist/__tests__/sandbox.test.js +1 -1
  6. package/dist/__tests__/sandbox.test.js.map +1 -1
  7. package/dist/context-hooks.d.ts +11 -0
  8. package/dist/context-hooks.d.ts.map +1 -0
  9. package/dist/context-hooks.js +23 -0
  10. package/dist/context-hooks.js.map +1 -0
  11. package/dist/context-services.d.ts +12 -0
  12. package/dist/context-services.d.ts.map +1 -0
  13. package/dist/context-services.js +20 -0
  14. package/dist/context-services.js.map +1 -0
  15. package/dist/index.d.ts +5 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +21 -8
  18. package/dist/index.js.map +1 -1
  19. package/dist/orchestration/capability-matrix.d.ts +1 -1
  20. package/dist/orchestration/capability-matrix.d.ts.map +1 -1
  21. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts +2 -0
  22. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts.map +1 -0
  23. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js +42 -0
  24. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js.map +1 -0
  25. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts +2 -0
  26. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts.map +1 -0
  27. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js +64 -0
  28. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js.map +1 -0
  29. package/dist/pipeline/__tests__/engine-brief.test.d.ts +2 -0
  30. package/dist/pipeline/__tests__/engine-brief.test.d.ts.map +1 -0
  31. package/dist/pipeline/__tests__/engine-brief.test.js +159 -0
  32. package/dist/pipeline/__tests__/engine-brief.test.js.map +1 -0
  33. package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts +2 -0
  34. package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts.map +1 -0
  35. package/dist/pipeline/__tests__/qa-orchestrator.test.js +276 -0
  36. package/dist/pipeline/__tests__/qa-orchestrator.test.js.map +1 -0
  37. package/dist/pipeline/coding-pipeline-hooks.d.ts +28 -0
  38. package/dist/pipeline/coding-pipeline-hooks.d.ts.map +1 -0
  39. package/dist/pipeline/coding-pipeline-hooks.js +91 -0
  40. package/dist/pipeline/coding-pipeline-hooks.js.map +1 -0
  41. package/dist/pipeline/index.d.ts +13 -0
  42. package/dist/pipeline/index.d.ts.map +1 -0
  43. package/dist/pipeline/index.js +44 -0
  44. package/dist/pipeline/index.js.map +1 -0
  45. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts +11 -0
  46. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts.map +1 -0
  47. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js +105 -0
  48. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js.map +1 -0
  49. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts +2 -0
  50. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts.map +1 -0
  51. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js +21 -0
  52. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js.map +1 -0
  53. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts +9 -0
  54. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts.map +1 -0
  55. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js +101 -0
  56. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js.map +1 -0
  57. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts +2 -0
  58. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts.map +1 -0
  59. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js +54 -0
  60. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js.map +1 -0
  61. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts +2 -0
  62. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts.map +1 -0
  63. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js +57 -0
  64. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js.map +1 -0
  65. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts +9 -0
  66. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts.map +1 -0
  67. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js +43 -0
  68. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js.map +1 -0
  69. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts +10 -0
  70. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts.map +1 -0
  71. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js +264 -0
  72. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js.map +1 -0
  73. package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts +31 -0
  74. package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts.map +1 -0
  75. package/dist/pipeline/orchestration/audit/audit-ci-blocker.js +120 -0
  76. package/dist/pipeline/orchestration/audit/audit-ci-blocker.js.map +1 -0
  77. package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts +33 -0
  78. package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts.map +1 -0
  79. package/dist/pipeline/orchestration/audit/audit-finding-tracer.js +126 -0
  80. package/dist/pipeline/orchestration/audit/audit-finding-tracer.js.map +1 -0
  81. package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts +27 -0
  82. package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts.map +1 -0
  83. package/dist/pipeline/orchestration/audit/audit-lessons-learned.js +155 -0
  84. package/dist/pipeline/orchestration/audit/audit-lessons-learned.js.map +1 -0
  85. package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts +21 -0
  86. package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts.map +1 -0
  87. package/dist/pipeline/orchestration/audit/audit-pending-issues.js +110 -0
  88. package/dist/pipeline/orchestration/audit/audit-pending-issues.js.map +1 -0
  89. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts +39 -0
  90. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts.map +1 -0
  91. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js +65 -0
  92. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js.map +1 -0
  93. package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts +30 -0
  94. package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts.map +1 -0
  95. package/dist/pipeline/orchestration/audit/audit-report-renderer.js +249 -0
  96. package/dist/pipeline/orchestration/audit/audit-report-renderer.js.map +1 -0
  97. package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts +52 -0
  98. package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts.map +1 -0
  99. package/dist/pipeline/orchestration/audit/audit-report-version-manager.js +144 -0
  100. package/dist/pipeline/orchestration/audit/audit-report-version-manager.js.map +1 -0
  101. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts +37 -0
  102. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts.map +1 -0
  103. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js +129 -0
  104. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js.map +1 -0
  105. package/dist/pipeline/orchestration/audit/index.d.ts +17 -0
  106. package/dist/pipeline/orchestration/audit/index.d.ts.map +1 -0
  107. package/dist/pipeline/orchestration/audit/index.js +26 -0
  108. package/dist/pipeline/orchestration/audit/index.js.map +1 -0
  109. package/dist/pipeline/orchestration/audit/types.d.ts +79 -0
  110. package/dist/pipeline/orchestration/audit/types.d.ts.map +1 -0
  111. package/dist/pipeline/orchestration/audit/types.js +10 -0
  112. package/dist/pipeline/orchestration/audit/types.js.map +1 -0
  113. package/dist/pipeline/orchestration/audit-reporter.d.ts +133 -0
  114. package/dist/pipeline/orchestration/audit-reporter.d.ts.map +1 -0
  115. package/dist/pipeline/orchestration/audit-reporter.js +322 -0
  116. package/dist/pipeline/orchestration/audit-reporter.js.map +1 -0
  117. package/dist/pipeline/orchestration/config-loader.d.ts +51 -0
  118. package/dist/pipeline/orchestration/config-loader.d.ts.map +1 -0
  119. package/dist/pipeline/orchestration/config-loader.js +215 -0
  120. package/dist/pipeline/orchestration/config-loader.js.map +1 -0
  121. package/dist/pipeline/orchestration/domain-detector.d.ts +36 -0
  122. package/dist/pipeline/orchestration/domain-detector.d.ts.map +1 -0
  123. package/dist/pipeline/orchestration/domain-detector.js +157 -0
  124. package/dist/pipeline/orchestration/domain-detector.js.map +1 -0
  125. package/dist/pipeline/orchestration/fsm.d.ts +92 -0
  126. package/dist/pipeline/orchestration/fsm.d.ts.map +1 -0
  127. package/dist/pipeline/orchestration/fsm.js +243 -0
  128. package/dist/pipeline/orchestration/fsm.js.map +1 -0
  129. package/dist/pipeline/orchestration/gate-resolver.d.ts +52 -0
  130. package/dist/pipeline/orchestration/gate-resolver.d.ts.map +1 -0
  131. package/dist/pipeline/orchestration/gate-resolver.js +120 -0
  132. package/dist/pipeline/orchestration/gate-resolver.js.map +1 -0
  133. package/dist/pipeline/orchestration/index.d.ts +16 -0
  134. package/dist/pipeline/orchestration/index.d.ts.map +1 -0
  135. package/dist/pipeline/orchestration/index.js +32 -0
  136. package/dist/pipeline/orchestration/index.js.map +1 -0
  137. package/dist/pipeline/orchestration/intent-detector.d.ts +37 -0
  138. package/dist/pipeline/orchestration/intent-detector.d.ts.map +1 -0
  139. package/dist/pipeline/orchestration/intent-detector.js +248 -0
  140. package/dist/pipeline/orchestration/intent-detector.js.map +1 -0
  141. package/dist/pipeline/orchestration/keyword-match.d.ts +17 -0
  142. package/dist/pipeline/orchestration/keyword-match.d.ts.map +1 -0
  143. package/dist/pipeline/orchestration/keyword-match.js +26 -0
  144. package/dist/pipeline/orchestration/keyword-match.js.map +1 -0
  145. package/dist/pipeline/orchestration/orchestrator.d.ts +158 -0
  146. package/dist/pipeline/orchestration/orchestrator.d.ts.map +1 -0
  147. package/dist/pipeline/orchestration/orchestrator.js +414 -0
  148. package/dist/pipeline/orchestration/orchestrator.js.map +1 -0
  149. package/dist/pipeline/orchestration/policy-engine.d.ts +54 -0
  150. package/dist/pipeline/orchestration/policy-engine.d.ts.map +1 -0
  151. package/dist/pipeline/orchestration/policy-engine.js +278 -0
  152. package/dist/pipeline/orchestration/policy-engine.js.map +1 -0
  153. package/dist/pipeline/orchestration/risk-scorer.d.ts +38 -0
  154. package/dist/pipeline/orchestration/risk-scorer.d.ts.map +1 -0
  155. package/dist/pipeline/orchestration/risk-scorer.js +145 -0
  156. package/dist/pipeline/orchestration/risk-scorer.js.map +1 -0
  157. package/dist/pipeline/orchestration/task-context.d.ts +205 -0
  158. package/dist/pipeline/orchestration/task-context.d.ts.map +1 -0
  159. package/dist/pipeline/orchestration/task-context.js +162 -0
  160. package/dist/pipeline/orchestration/task-context.js.map +1 -0
  161. package/dist/pipeline/orchestration/types.d.ts +111 -0
  162. package/dist/pipeline/orchestration/types.d.ts.map +1 -0
  163. package/dist/pipeline/orchestration/types.js +37 -0
  164. package/dist/pipeline/orchestration/types.js.map +1 -0
  165. package/dist/pipeline/qa/__tests__/QAService.test.d.ts +2 -0
  166. package/dist/pipeline/qa/__tests__/QAService.test.d.ts.map +1 -0
  167. package/dist/pipeline/qa/__tests__/QAService.test.js +170 -0
  168. package/dist/pipeline/qa/__tests__/QAService.test.js.map +1 -0
  169. package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts +2 -0
  170. package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts.map +1 -0
  171. package/dist/pipeline/qa/__tests__/QAService.verdict.test.js +39 -0
  172. package/dist/pipeline/qa/__tests__/QAService.verdict.test.js.map +1 -0
  173. package/dist/pipeline/qa/index.d.ts +3 -0
  174. package/dist/pipeline/qa/index.d.ts.map +1 -0
  175. package/dist/pipeline/qa/index.js +6 -0
  176. package/dist/pipeline/qa/index.js.map +1 -0
  177. package/dist/pipeline/qa/qa-service.d.ts +33 -0
  178. package/dist/pipeline/qa/qa-service.d.ts.map +1 -0
  179. package/dist/pipeline/qa/qa-service.js +239 -0
  180. package/dist/pipeline/qa/qa-service.js.map +1 -0
  181. package/dist/pipeline/qa-orchestrator.d.ts +60 -0
  182. package/dist/pipeline/qa-orchestrator.d.ts.map +1 -0
  183. package/dist/pipeline/qa-orchestrator.js +177 -0
  184. package/dist/pipeline/qa-orchestrator.js.map +1 -0
  185. package/dist/pipeline/reflection/domains/agent-domain.d.ts +40 -0
  186. package/dist/pipeline/reflection/domains/agent-domain.d.ts.map +1 -0
  187. package/dist/pipeline/reflection/domains/agent-domain.js +161 -0
  188. package/dist/pipeline/reflection/domains/agent-domain.js.map +1 -0
  189. package/dist/pipeline/reflection/domains/audit-domain.d.ts +46 -0
  190. package/dist/pipeline/reflection/domains/audit-domain.d.ts.map +1 -0
  191. package/dist/pipeline/reflection/domains/audit-domain.js +241 -0
  192. package/dist/pipeline/reflection/domains/audit-domain.js.map +1 -0
  193. package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts +40 -0
  194. package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts.map +1 -0
  195. package/dist/pipeline/reflection/domains/bootstrap-domain.js +156 -0
  196. package/dist/pipeline/reflection/domains/bootstrap-domain.js.map +1 -0
  197. package/dist/pipeline/reflection/domains/commit-domain.d.ts +40 -0
  198. package/dist/pipeline/reflection/domains/commit-domain.d.ts.map +1 -0
  199. package/dist/pipeline/reflection/domains/commit-domain.js +174 -0
  200. package/dist/pipeline/reflection/domains/commit-domain.js.map +1 -0
  201. package/dist/pipeline/reflection/domains/test-domain.d.ts +40 -0
  202. package/dist/pipeline/reflection/domains/test-domain.d.ts.map +1 -0
  203. package/dist/pipeline/reflection/domains/test-domain.js +194 -0
  204. package/dist/pipeline/reflection/domains/test-domain.js.map +1 -0
  205. package/dist/pipeline/reflection/historical-loader.d.ts +105 -0
  206. package/dist/pipeline/reflection/historical-loader.d.ts.map +1 -0
  207. package/dist/pipeline/reflection/historical-loader.js +462 -0
  208. package/dist/pipeline/reflection/historical-loader.js.map +1 -0
  209. package/dist/pipeline/reflection/hooks/agent-hook.d.ts +72 -0
  210. package/dist/pipeline/reflection/hooks/agent-hook.d.ts.map +1 -0
  211. package/dist/pipeline/reflection/hooks/agent-hook.js +98 -0
  212. package/dist/pipeline/reflection/hooks/agent-hook.js.map +1 -0
  213. package/dist/pipeline/reflection/hooks/audit-hook.d.ts +72 -0
  214. package/dist/pipeline/reflection/hooks/audit-hook.d.ts.map +1 -0
  215. package/dist/pipeline/reflection/hooks/audit-hook.js +112 -0
  216. package/dist/pipeline/reflection/hooks/audit-hook.js.map +1 -0
  217. package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts +71 -0
  218. package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts.map +1 -0
  219. package/dist/pipeline/reflection/hooks/bootstrap-hook.js +97 -0
  220. package/dist/pipeline/reflection/hooks/bootstrap-hook.js.map +1 -0
  221. package/dist/pipeline/reflection/hooks/commit-hook.d.ts +63 -0
  222. package/dist/pipeline/reflection/hooks/commit-hook.d.ts.map +1 -0
  223. package/dist/pipeline/reflection/hooks/commit-hook.js +90 -0
  224. package/dist/pipeline/reflection/hooks/commit-hook.js.map +1 -0
  225. package/dist/pipeline/reflection/hooks/test-hook.d.ts +65 -0
  226. package/dist/pipeline/reflection/hooks/test-hook.d.ts.map +1 -0
  227. package/dist/pipeline/reflection/hooks/test-hook.js +99 -0
  228. package/dist/pipeline/reflection/hooks/test-hook.js.map +1 -0
  229. package/dist/pipeline/reflection/lessons-memo-generator.d.ts +60 -0
  230. package/dist/pipeline/reflection/lessons-memo-generator.d.ts.map +1 -0
  231. package/dist/pipeline/reflection/lessons-memo-generator.js +286 -0
  232. package/dist/pipeline/reflection/lessons-memo-generator.js.map +1 -0
  233. package/dist/store/ProjectStore.d.ts +1 -1
  234. package/dist/store/ProjectStore.d.ts.map +1 -1
  235. package/dist/store/types.d.ts +28 -0
  236. package/dist/store/types.d.ts.map +1 -0
  237. package/dist/store/types.js +3 -0
  238. package/dist/store/types.js.map +1 -0
  239. package/dist/tools/__tests__/command-parser.test.js +1 -1
  240. package/dist/tools/__tests__/command-parser.test.js.map +1 -1
  241. package/dist/tools/__tests__/declared-facts.test.d.ts +2 -0
  242. package/dist/tools/__tests__/declared-facts.test.d.ts.map +1 -0
  243. package/dist/tools/__tests__/declared-facts.test.js +21 -0
  244. package/dist/tools/__tests__/declared-facts.test.js.map +1 -0
  245. package/dist/tools/__tests__/package-install.test.d.ts +2 -0
  246. package/dist/tools/__tests__/package-install.test.d.ts.map +1 -0
  247. package/dist/tools/__tests__/package-install.test.js +56 -0
  248. package/dist/tools/__tests__/package-install.test.js.map +1 -0
  249. package/dist/tools/__tests__/save-tools.secrets.test.js +1 -1
  250. package/dist/tools/__tests__/save-tools.secrets.test.js.map +1 -1
  251. package/dist/tools/edit-file.d.ts.map +1 -1
  252. package/dist/tools/edit-file.js +1 -0
  253. package/dist/tools/edit-file.js.map +1 -1
  254. package/dist/tools/list-directory.d.ts.map +1 -1
  255. package/dist/tools/list-directory.js +1 -0
  256. package/dist/tools/list-directory.js.map +1 -1
  257. package/dist/tools/package-install.d.ts +11 -0
  258. package/dist/tools/package-install.d.ts.map +1 -0
  259. package/dist/tools/package-install.js +112 -0
  260. package/dist/tools/package-install.js.map +1 -0
  261. package/dist/tools/read-file.d.ts.map +1 -1
  262. package/dist/tools/read-file.js +1 -0
  263. package/dist/tools/read-file.js.map +1 -1
  264. package/dist/tools/run-command.d.ts.map +1 -1
  265. package/dist/tools/run-command.js +5 -1
  266. package/dist/tools/run-command.js.map +1 -1
  267. package/dist/tools/save-audit.d.ts.map +1 -1
  268. package/dist/tools/save-audit.js +7 -6
  269. package/dist/tools/save-audit.js.map +1 -1
  270. package/dist/tools/save-context.d.ts.map +1 -1
  271. package/dist/tools/save-context.js +3 -2
  272. package/dist/tools/save-context.js.map +1 -1
  273. package/dist/tools/save-learning.d.ts.map +1 -1
  274. package/dist/tools/save-learning.js +4 -3
  275. package/dist/tools/save-learning.js.map +1 -1
  276. package/dist/tools/save-user-preference.d.ts.map +1 -1
  277. package/dist/tools/save-user-preference.js +3 -2
  278. package/dist/tools/save-user-preference.js.map +1 -1
  279. package/dist/tools/search-files.d.ts.map +1 -1
  280. package/dist/tools/search-files.js +1 -0
  281. package/dist/tools/search-files.js.map +1 -1
  282. package/dist/tools/update-session.d.ts.map +1 -1
  283. package/dist/tools/update-session.js +3 -2
  284. package/dist/tools/update-session.js.map +1 -1
  285. package/dist/tools/write-file.d.ts.map +1 -1
  286. package/dist/tools/write-file.js +1 -0
  287. package/dist/tools/write-file.js.map +1 -1
  288. package/package.json +63 -44
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ /**
3
+ * @description AuditLessonsLearned — Analiza y genera lecciones aprendidas
4
+ * a partir de los gates de auditoría ejecutados.
5
+ *
6
+ * Responsabilidades:
7
+ * - Detectar patrones de severidad (críticos/altos)
8
+ * - Identificar dimensiones con más hallazgos
9
+ * - Encontrar keywords recurrentes en hallazgos
10
+ * - Calcular tasa de aprobación QA
11
+ * - Generar memo Markdown de lecciones aprendidas
12
+ */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.AuditLessonsLearned = void 0;
48
+ const path = __importStar(require("path"));
49
+ const fs = __importStar(require("fs/promises"));
50
+ // ── Helpers ──────────────────────────────────────────────────────────────────
51
+ function getFormattedDate() {
52
+ return new Date()
53
+ .toISOString()
54
+ .replace('T', ' ')
55
+ .replace(/\.\d{3}Z/, ' UTC');
56
+ }
57
+ // ── AuditLessonsLearned ──────────────────────────────────────────────────────
58
+ class AuditLessonsLearned {
59
+ docsDir;
60
+ constructor(docsDir) {
61
+ this.docsDir = docsDir;
62
+ }
63
+ /**
64
+ * @description Analiza los gates y extrae lecciones aprendidas.
65
+ * Retorna un array de strings con las lecciones detectadas.
66
+ */
67
+ analyze(gates) {
68
+ const lessons = [];
69
+ const qaGates = gates.filter(g => g.hallazgos.length > 0 && (g.gate === 'qa' || g.gate === 'security' || g.gate === 'architecture'));
70
+ if (qaGates.length === 0)
71
+ return [];
72
+ // Patrones de severidad
73
+ const criticalCount = qaGates.filter(g => g.hallazgos.some(h => h.severidad === 'critical' || h.severidad === 'high')).length;
74
+ if (criticalCount > 0) {
75
+ lessons.push(`⚠️ ${criticalCount} gate(s) with critical/high findings detected. Review before proceeding with new changes.`);
76
+ }
77
+ // Patrones por dimensión
78
+ const dimensiones = new Map();
79
+ for (const gate of qaGates) {
80
+ for (const h of gate.hallazgos) {
81
+ dimensiones.set(h.dimension, (dimensiones.get(h.dimension) || 0) + 1);
82
+ }
83
+ }
84
+ const topDimension = [...dimensiones.entries()].sort((a, b) => b[1] - a[1]).slice(0, 3);
85
+ if (topDimension.length > 0) {
86
+ lessons.push(`📊 Dimensions with most findings: ${topDimension.map(([d, c]) => `${d} (${c})`).join(', ')}`);
87
+ }
88
+ // Keywords recurrentes
89
+ const keywordCount = new Map();
90
+ const keywords = ['test', 'error', 'edge case', 'security', 'performance', 'perf',
91
+ 'documentation', 'validation', 'coverage', 'typing'];
92
+ for (const gate of qaGates) {
93
+ for (const h of gate.hallazgos) {
94
+ const lower = `${h.hallazgo} ${h.dimension} ${h.evidencia}`.toLowerCase();
95
+ for (const kw of keywords) {
96
+ if (lower.includes(kw))
97
+ keywordCount.set(kw, (keywordCount.get(kw) || 0) + 1);
98
+ }
99
+ }
100
+ }
101
+ const topKeywords = [...keywordCount.entries()]
102
+ .filter(([_, c]) => c >= 2).sort((a, b) => b[1] - a[1]).slice(0, 5);
103
+ if (topKeywords.length > 0) {
104
+ lessons.push(`🔄 Recurring patterns: ${topKeywords.map(([kw, c]) => `"${kw}" (${c})`).join(', ')}`);
105
+ }
106
+ // Tasa de aprobación
107
+ const goCount = qaGates.filter(g => g.veredicto === 'GO').length;
108
+ lessons.push(`📈 QA approval rate: ${Math.round((goCount / qaGates.length) * 100)}% (${goCount}/${qaGates.length})`);
109
+ return lessons;
110
+ }
111
+ /**
112
+ * @description Genera un memo Markdown de lecciones aprendidas y lo persiste.
113
+ * Retorna la ruta del archivo, o null si no hay lecciones.
114
+ */
115
+ async generateMemo(gates) {
116
+ const lessons = this.analyze(gates);
117
+ if (lessons.length === 0)
118
+ return null;
119
+ const content = [
120
+ '---',
121
+ 'tags: [audit, lessons-learned, memory]',
122
+ `date: ${getFormattedDate()}`,
123
+ `total_gates: ${gates.length}`,
124
+ `gates_with_findings: ${gates.filter(g => g.hallazgos.length > 0).length}`,
125
+ '---',
126
+ '',
127
+ `# 🧠 Lessons Learned — Audits`,
128
+ '',
129
+ `> Auto-generated by the audit pipeline`,
130
+ `> Date: ${getFormattedDate()}`,
131
+ '',
132
+ '---',
133
+ '',
134
+ ...lessons.map(l => `- ${l}`),
135
+ '',
136
+ '---',
137
+ '',
138
+ '## 📋 Reviewed Gates Detail',
139
+ '',
140
+ '| Gate | Auditor | Verdict | Findings |',
141
+ '|------|---------|---------|----------|',
142
+ ...gates.filter(g => g.hallazgos.length > 0).map(g => `| ${g.gate} | ${g.agente} | ${g.veredicto} | ${g.hallazgos.length} |`),
143
+ '',
144
+ '---',
145
+ '',
146
+ '*This memo is updated every time a final report is generated.*',
147
+ ].join('\n');
148
+ await fs.mkdir(this.docsDir, { recursive: true });
149
+ const filePath = path.join(this.docsDir, 'lessons-learned.md');
150
+ await fs.writeFile(filePath, content, 'utf-8');
151
+ return filePath;
152
+ }
153
+ }
154
+ exports.AuditLessonsLearned = AuditLessonsLearned;
155
+ //# sourceMappingURL=audit-lessons-learned.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-lessons-learned.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/audit-lessons-learned.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAC7B,gDAAkC;AAGlC,gFAAgF;AAEhF,SAAS,gBAAgB;IACvB,OAAO,IAAI,IAAI,EAAE;SACd,WAAW,EAAE;SACb,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SACjB,OA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@description AuditPendingIssues — Persiste issues pendientes (críticos/altos)
3
+ * cuando un sprint finaliza con veredicto NO-GO o NO-GO condicional.
4
+ *
5
+ * Estos issues deben resolverse antes de proceder con el deploy.
6
+ */
7
+ import { AuditFinding, SprintInfo, GateVeredict } from './types';
8
+ export declare class AuditPendingIssues {
9
+ private docsDir;
10
+ constructor(docsDir: string);
11
+ /**
12
+ * @description Filtra los hallazgos críticos o altos de una lista de gates.
13
+ */
14
+ extractCritical(issues: AuditFinding[]): AuditFinding[];
15
+ /**
16
+ * @description Persiste un archivo Markdown con los issues pendientes.
17
+ * Retorna la ruta del archivo generado.
18
+ */
19
+ persist(issues: AuditFinding[], sprint: SprintInfo, veredicto: GateVeredict): Promise<string>;
20
+ }
21
+ //# sourceMappingURL=audit-pending-issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-pending-issues.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/audit-pending-issues.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAcjE,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,MAAM;IAI3B;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE;IAIvD;;;OAGG;IACG,OAAO,CACX,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,MAAM,CAAC;CAyCnB"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /**
3
+ * @description AuditPendingIssues — Persiste issues pendientes (críticos/altos)
4
+ * cuando un sprint finaliza con veredicto NO-GO o NO-GO condicional.
5
+ *
6
+ * Estos issues deben resolverse antes de proceder con el deploy.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.AuditPendingIssues = void 0;
43
+ const path = __importStar(require("path"));
44
+ const fs = __importStar(require("fs/promises"));
45
+ const agent_core_1 = require("@backendkit-labs/agent-core");
46
+ // ── Helpers ──────────────────────────────────────────────────────────────────
47
+ function getFormattedDate() {
48
+ return new Date()
49
+ .toISOString()
50
+ .replace('T', ' ')
51
+ .replace(/\.\d{3}Z/, ' UTC');
52
+ }
53
+ // ── AuditPendingIssues ───────────────────────────────────────────────────────
54
+ class AuditPendingIssues {
55
+ docsDir;
56
+ constructor(docsDir) {
57
+ this.docsDir = docsDir;
58
+ }
59
+ /**
60
+ * @description Filtra los hallazgos críticos o altos de una lista de gates.
61
+ */
62
+ extractCritical(issues) {
63
+ return issues.filter(h => h.severidad === 'critical' || h.severidad === 'high');
64
+ }
65
+ /**
66
+ * @description Persiste un archivo Markdown con los issues pendientes.
67
+ * Retorna la ruta del archivo generado.
68
+ */
69
+ async persist(issues, sprint, veredicto) {
70
+ const criticalIssues = this.extractCritical(issues);
71
+ const fecha = getFormattedDate();
72
+ const content = [
73
+ '---',
74
+ 'tags: [audit, pending-issues, blockers]',
75
+ `date: ${fecha}`,
76
+ `sprint: ${sprint.name}`,
77
+ `verdict: ${veredicto}`,
78
+ `total_issues: ${criticalIssues.length}`,
79
+ '---',
80
+ '',
81
+ `# 🚫 Pending Issues — ${sprint.name}`,
82
+ '',
83
+ `> Sprint: ${sprint.name} v${sprint.version}`,
84
+ `> Verdict: ${veredicto}`,
85
+ `> Date: ${fecha}`,
86
+ '',
87
+ '---',
88
+ '',
89
+ '## Pending Issues (Critical/High)',
90
+ '',
91
+ '| ID | Dimension | Finding | Severity | Agent | Recommendation |',
92
+ '|----|-----------|---------|----------|-------|----------------|',
93
+ ...criticalIssues.map(h => `| ${h.id} | ${h.dimension} | ${h.hallazgo} | **${h.severidad}** | ${h.agenteResponsable} | ${h.recomendacion} |`),
94
+ '',
95
+ '---',
96
+ '',
97
+ '> These issues must be resolved before proceeding with the deploy.',
98
+ '> Use `audit check --block-on-critical` in CI to verify.',
99
+ '',
100
+ '*Auto-generated by the audit pipeline*',
101
+ ].join('\n');
102
+ await fs.mkdir(this.docsDir, { recursive: true });
103
+ const filename = `pending-issues-${(0, agent_core_1.sanitizeFilename)(sprint.name)}-${fecha.replace(/[:\s]/g, '-')}.md`;
104
+ const filePath = path.join(this.docsDir, filename);
105
+ await fs.writeFile(filePath, content, 'utf-8');
106
+ return filePath;
107
+ }
108
+ }
109
+ exports.AuditPendingIssues = AuditPendingIssues;
110
+ //# sourceMappingURL=audit-pending-issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-pending-issues.js","sourceRoot":"","sources":["../../../../src/pipeline/or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AE;YACF,kEAAkE;YAClE,kEAAkE;YAClE,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,CAAC,QAAQ,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,iBAAiB,MAAM,CAAC,CAAC,aAAa,IAAI,CAAC;YAC7I,EAAE;YACF,KAAK;YACL,EAAE;YACF,oEAAoE;YACpE,0DAA0D;YAC1D,EAAE;YACF,wCAAwC;SACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,MAAM,QAAQ,GAAG,kBAAkB,IAAA,6BAAgB,EAAC,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC;QACtG,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA/DD,gDA+DC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @description AuditReflectionBridge — Puente entre AuditReporter y ReflectionEngine.
3
+ *
4
+ * Permite conectar/desconectar el sistema de auditoría con el Reflection Engine
5
+ * para auto-aprendizaje. Cuando está conectado, los hallazgos de auditoría se
6
+ * reportan automáticamente al Reflection Engine, que detecta patrones y promueve
7
+ * reglas de policy.
8
+ *
9
+ * @see AuditHook para la implementación concreta del reporte.
10
+ */
11
+ import { ReflectionEngine } from '@backendkit-labs/agent-core';
12
+ import { GateRecord } from './types';
13
+ export declare class AuditReflectionBridge {
14
+ private hook;
15
+ private engine;
16
+ /**
17
+ * @description Conecta con el Reflection Engine.
18
+ */
19
+ connect(engine: ReflectionEngine): void;
20
+ /**
21
+ * @description Desconecta del Reflection Engine.
22
+ */
23
+ disconnect(): void;
24
+ /**
25
+ * @description Indica si está conectado.
26
+ */
27
+ get isConnected(): boolean;
28
+ /**
29
+ * @description Reporta los hallazgos al Reflection Engine, detecta patrones,
30
+ * promueve PolicyRules y actualiza lecciones-aprendidas.md.
31
+ *
32
+ * Pipeline completo (solo si hay findings con hallazgos):
33
+ * 1. AuditHook.reportFindings() → agrega FailureRecords al catálogo
34
+ * 2. engine.flushReflections() → detecta patrones y promueve a PolicyRules
35
+ * 3. LessonsMemoGenerator.persist() → actualiza lecciones-aprendidas.md
36
+ */
37
+ reportFindings(gates: GateRecord[]): Promise<void>;
38
+ }
39
+ //# sourceMappingURL=audit-reflection-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-reflection-bridge.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/audit-reflection-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,qBAAa,qBAAqB;IAChC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,MAAM,CAAiC;IAE/C;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAKvC;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;OAEG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;;;;;OAQG;IACG,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBzD"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * @description AuditReflectionBridge — Puente entre AuditReporter y ReflectionEngine.
4
+ *
5
+ * Permite conectar/desconectar el sistema de auditoría con el Reflection Engine
6
+ * para auto-aprendizaje. Cuando está conectado, los hallazgos de auditoría se
7
+ * reportan automáticamente al Reflection Engine, que detecta patrones y promueve
8
+ * reglas de policy.
9
+ *
10
+ * @see AuditHook para la implementación concreta del reporte.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.AuditReflectionBridge = void 0;
14
+ const audit_hook_1 = require("../../reflection/hooks/audit-hook");
15
+ const lessons_memo_generator_1 = require("../../reflection/lessons-memo-generator");
16
+ // ── AuditReflectionBridge ────────────────────────────────────────────────────
17
+ class AuditReflectionBridge {
18
+ hook = null;
19
+ engine = null;
20
+ /**
21
+ * @description Conecta con el Reflection Engine.
22
+ */
23
+ connect(engine) {
24
+ this.hook = new audit_hook_1.AuditHook(engine);
25
+ this.engine = engine;
26
+ }
27
+ /**
28
+ * @description Desconecta del Reflection Engine.
29
+ */
30
+ disconnect() {
31
+ this.hook = null;
32
+ this.engine = null;
33
+ }
34
+ /**
35
+ * @description Indica si está conectado.
36
+ */
37
+ get isConnected() {
38
+ return this.hook !== null;
39
+ }
40
+ /**
41
+ * @description Reporta los hallazgos al Reflection Engine, detecta patrones,
42
+ * promueve PolicyRules y actualiza lecciones-aprendidas.md.
43
+ *
44
+ * Pipeline completo (solo si hay findings con hallazgos):
45
+ * 1. AuditHook.reportFindings() → agrega FailureRecords al catálogo
46
+ * 2. engine.flushReflections() → detecta patrones y promueve a PolicyRules
47
+ * 3. LessonsMemoGenerator.persist() → actualiza lecciones-aprendidas.md
48
+ */
49
+ async reportFindings(gates) {
50
+ if (!this.hook || !this.engine)
51
+ return;
52
+ const gatesWithFindings = gates.filter(g => g.hallazgos.length > 0);
53
+ if (gatesWithFindings.length === 0)
54
+ return;
55
+ for (const gate of gatesWithFindings) {
56
+ await this.hook.reportFindings(gate.hallazgos, gate.gate, 'audit');
57
+ }
58
+ // Detectar patrones cross-sprint y auto-promover PolicyRules
59
+ await this.engine.flushReflections();
60
+ // Sobreescribir lecciones-aprendidas.md con datos históricos acumulados
61
+ await new lessons_memo_generator_1.LessonsMemoGenerator(this.engine).persist().catch(() => { });
62
+ }
63
+ }
64
+ exports.AuditReflectionBridge = AuditReflectionBridge;
65
+ //# sourceMappingURL=audit-reflection-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-reflection-bridge.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/audit-reflection-bridge.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAGH,kEAA8D;AAC9D,oFAA+E;AAG/E,gFAAgF;AAEhF,MAAa,qBAAqB;IACxB,IAAI,GAAqB,IAAI,CAAC;IAC9B,MAAM,GAA4B,IAAI,CAAC;IAE/C;;OAEG;IACH,OAAO,CAAC,MAAwB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,sBAAS,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;IAC5B,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAAC,KAAmB;QACtC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QAEvC,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpE,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAE3C,KAAK,MAAM,IAAI,IAAI,iBAAiB,EAAE,CAAC;YACrC,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;QAED,6DAA6D;QAC7D,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAErC,wEAAwE;QACxE,MAAM,IAAI,6CAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AApDD,sDAoDC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @description AuditReportRenderer — Renderiza informes Markdown de auditoría.
3
+ *
4
+ * Responsabilidades:
5
+ * - Renderizar informe de gate individual (renderGateReport)
6
+ * - Renderizar informe final multi-gate (renderFinalReport)
7
+ * - Construir resumen ejecutivo (buildExecutiveSummary)
8
+ * - Calcular hash SHA-256 de integridad
9
+ */
10
+ import { TaskContext } from '../task-context';
11
+ import { GateRecord, GateVeredict, SprintInfo, FinalReport } from './types';
12
+ export declare class AuditReportRenderer {
13
+ /**
14
+ * @description Renderiza un informe de gate individual en Markdown.
15
+ */
16
+ renderGateReport(record: GateRecord, version: string, fecha: string, task?: TaskContext): string;
17
+ /**
18
+ * @description Renderiza el informe final multi-gate en Markdown.
19
+ */
20
+ renderFinalReport(report: FinalReport, version: string, fecha: string): string;
21
+ /**
22
+ * @description Construye el resumen ejecutivo del sprint.
23
+ */
24
+ buildExecutiveSummary(sprint: SprintInfo, veredictoFinal: GateVeredict, gates: GateRecord[]): string;
25
+ /**
26
+ * @description Envuelve el contenido con hash SHA-256 y metadatos de integridad.
27
+ */
28
+ private wrapWithIntegrity;
29
+ }
30
+ //# sourceMappingURL=audit-report-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-report-renderer.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/audit-report-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,MAAM,SAAS,CAAC;AAUjB,qBAAa,mBAAmB;IAC9B;;OAEG;IACH,gBAAgB,CACd,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,WAAW,GACjB,MAAM;IA8CT;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IA+H9E;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM;IA6BpG;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAI1B"}