gennady 0.6.0 → 0.7.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 (319) hide show
  1. package/README.md +2 -15
  2. package/ai/agents/agent-resolve-conflicts.xml +6 -0
  3. package/ai/agents/agent-review-verifier.xml +6 -0
  4. package/ai/directives/architecture/README.md +21 -0
  5. package/ai/directives/coding/README.md +23 -0
  6. package/ai/directives/coding/result-conventions.xml +55 -0
  7. package/ai/directives/coding/svelte5-runes.xml +248 -0
  8. package/ai/directives/coding/sveltekit-rules.xml +247 -0
  9. package/ai/directives/coding/typescript-rules.xml +589 -0
  10. package/ai/directives/coding/uikit-component-storybook.xml +347 -0
  11. package/ai/directives/coding/uikit-component-svelte.xml +344 -0
  12. package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
  13. package/ai/directives/dbc-audit.directive.xml +131 -0
  14. package/ai/directives/dev-review.directive.xml +148 -0
  15. package/ai/directives/infra/README.md +11 -0
  16. package/ai/directives/infra/eslint-setup.xml +467 -0
  17. package/ai/directives/infra/git-setup.xml +261 -0
  18. package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
  19. package/ai/directives/infra/storybook-setup.xml +153 -0
  20. package/ai/directives/knowledge.xml +206 -0
  21. package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
  22. package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
  23. package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
  24. package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
  25. package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
  26. package/ai/directives/sdd/README.md +49 -0
  27. package/ai/directives/sdd/audit.directive.xml +543 -0
  28. package/ai/directives/sdd/discovery.directive.xml +824 -0
  29. package/ai/directives/sdd/fix.directive.xml +249 -0
  30. package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
  31. package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
  32. package/ai/directives/sdd/scaffold.directive.xml +717 -0
  33. package/ai/directives/sdd/setup.directive.xml +213 -0
  34. package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
  35. package/ai/directives/semantic-change-extractor.directive.xml +99 -0
  36. package/ai/directives/testing/README.md +25 -0
  37. package/ai/directives/testing/common.xml +234 -0
  38. package/ai/directives/testing/node-test.xml +288 -0
  39. package/ai/directives/testing/playwright-cli.xml +199 -0
  40. package/ai/directives/testing/playwright-e2e.xml +292 -0
  41. package/ai/directives/testing/storybook-usage.xml +173 -0
  42. package/ai/directives/testing/svelte-testing.xml +237 -0
  43. package/ai/directives/testing/vitest-rules.xml +326 -0
  44. package/ai/docs/README.md +17 -0
  45. package/ai/docs/ai-icl.md +538 -0
  46. package/ai/docs/ai-priming.md +548 -0
  47. package/ai/docs/ai-prompt-formats.md +406 -0
  48. package/ai/docs/ai-promting.md +572 -0
  49. package/ai/drafts/DRAFT.md +120 -0
  50. package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
  51. package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
  52. package/ai/drafts/d.md +65 -0
  53. package/ai/drafts/music-posts.md +105 -0
  54. package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
  55. package/ai/fw/v1/core/mental-model.xml +50 -0
  56. package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
  57. package/ai/fw/v1/production/swarm-protocol.xml +122 -0
  58. package/ai/fw/v1/review/quality-pipeline.xml +102 -0
  59. package/ai/fw/v2/arch-universal.xml +73 -0
  60. package/ai/fw-draft/README.md +79 -0
  61. package/ai/fw-draft/bin/discovery.sh +116 -0
  62. package/ai/fw-draft/gennady.xml +58 -0
  63. package/ai/fw-draft/provider/claude.xml +16 -0
  64. package/ai/fw-draft/provider/cursor.xml +23 -0
  65. package/ai/fw-draft/provider/default.xml +12 -0
  66. package/ai/fw-draft/roles/developer.xml +18 -0
  67. package/ai/fw-draft/router.xml +39 -0
  68. package/ai/fw-draft/routes/development.xml +32 -0
  69. package/ai/fw-draft/routes/universal.xml +58 -0
  70. package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
  71. package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
  72. package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
  73. package/dist/ai/agents/agent-review-verifier.xml +6 -0
  74. package/dist/ai/directives/architecture/README.md +21 -0
  75. package/dist/ai/directives/coding/README.md +23 -0
  76. package/dist/ai/directives/coding/result-conventions.xml +55 -0
  77. package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
  78. package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
  79. package/dist/ai/directives/coding/typescript-rules.xml +589 -0
  80. package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
  81. package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
  82. package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
  83. package/dist/ai/directives/dbc-audit.directive.xml +131 -0
  84. package/dist/ai/directives/dev-review.directive.xml +148 -0
  85. package/dist/ai/directives/infra/README.md +11 -0
  86. package/dist/ai/directives/infra/eslint-setup.xml +467 -0
  87. package/dist/ai/directives/infra/git-setup.xml +261 -0
  88. package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
  89. package/dist/ai/directives/infra/storybook-setup.xml +153 -0
  90. package/dist/ai/directives/knowledge.xml +206 -0
  91. package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
  92. package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
  93. package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
  94. package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
  95. package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
  96. package/dist/ai/directives/sdd/README.md +49 -0
  97. package/dist/ai/directives/sdd/audit.directive.xml +543 -0
  98. package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
  99. package/dist/ai/directives/sdd/fix.directive.xml +249 -0
  100. package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
  101. package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
  102. package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
  103. package/dist/ai/directives/sdd/setup.directive.xml +213 -0
  104. package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
  105. package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
  106. package/dist/ai/directives/testing/README.md +25 -0
  107. package/dist/ai/directives/testing/common.xml +234 -0
  108. package/dist/ai/directives/testing/node-test.xml +288 -0
  109. package/dist/ai/directives/testing/playwright-cli.xml +199 -0
  110. package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
  111. package/dist/ai/directives/testing/storybook-usage.xml +173 -0
  112. package/dist/ai/directives/testing/svelte-testing.xml +237 -0
  113. package/dist/ai/directives/testing/vitest-rules.xml +326 -0
  114. package/dist/ai/docs/README.md +17 -0
  115. package/dist/ai/docs/ai-icl.md +538 -0
  116. package/dist/ai/docs/ai-priming.md +548 -0
  117. package/dist/ai/docs/ai-prompt-formats.md +406 -0
  118. package/dist/ai/docs/ai-promting.md +572 -0
  119. package/dist/ai/drafts/DRAFT.md +120 -0
  120. package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
  121. package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
  122. package/dist/ai/drafts/d.md +65 -0
  123. package/dist/ai/drafts/music-posts.md +105 -0
  124. package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
  125. package/dist/ai/fw/v1/core/mental-model.xml +50 -0
  126. package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
  127. package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
  128. package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
  129. package/dist/ai/fw/v2/arch-universal.xml +73 -0
  130. package/dist/ai/fw-draft/README.md +79 -0
  131. package/dist/ai/fw-draft/bin/discovery.sh +116 -0
  132. package/dist/ai/fw-draft/gennady.xml +58 -0
  133. package/dist/ai/fw-draft/provider/claude.xml +16 -0
  134. package/dist/ai/fw-draft/provider/cursor.xml +23 -0
  135. package/dist/ai/fw-draft/provider/default.xml +12 -0
  136. package/dist/ai/fw-draft/roles/developer.xml +18 -0
  137. package/dist/ai/fw-draft/router.xml +39 -0
  138. package/dist/ai/fw-draft/routes/development.xml +32 -0
  139. package/dist/ai/fw-draft/routes/universal.xml +58 -0
  140. package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
  141. package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
  142. package/dist/chunks/devtools-B-7ugZhF.js +79 -0
  143. package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
  144. package/dist/chunks/{index-B63fYXL2.js → index-BeL1Zcbg.js} +1 -1
  145. package/dist/chunks/index-CVR66voe.js +26963 -0
  146. package/dist/chunks/index-CXuhZzS3.js +16979 -0
  147. package/dist/chunks/{index-B5bA2T7A.js → index-CaahtXiM.js} +33 -9
  148. package/dist/chunks/{index-iqg0w_pE.js → index-CiEM-8nJ.js} +35 -19
  149. package/dist/chunks/{index-B4m0-PAT.js → index-D1qsi0Uc.js} +57 -33
  150. package/dist/chunks/index-D9ceRUyB.js +443 -0
  151. package/dist/chunks/index-DJpVmyp2.js +176 -0
  152. package/dist/chunks/{index-C0andxna.js → index-DU6jD7SS.js} +1 -1
  153. package/dist/chunks/index-KxSZKmZn.js +540 -0
  154. package/dist/chunks/{index-Dqe1TdW4.js → index-UbHoePfr.js} +12 -12
  155. package/dist/chunks/{index-5xIgwwKx.js → index-g1LXlp77.js} +2 -2
  156. package/dist/chunks/index-zBnnuvLA.js +3788 -0
  157. package/dist/chunks/{run-review-command.logic-a_M3CkeZ.js → run-review-command.logic-DpkRoEi8.js} +2 -2
  158. package/dist/chunks/services-CaLOhuLV.js +2889 -0
  159. package/dist/chunks/shared-Bjy30TeM.js +665 -0
  160. package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
  161. package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
  162. package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
  163. package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
  164. package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
  165. package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
  166. package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
  167. package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
  168. package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
  169. package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
  170. package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
  171. package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
  172. package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
  173. package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
  174. package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
  175. package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
  176. package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
  177. package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
  178. package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
  179. package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
  180. package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
  181. package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
  182. package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
  183. package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
  184. package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
  185. package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
  186. package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
  187. package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
  188. package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
  189. package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
  190. package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
  191. package/dist/cli/cmd/lint/index.d.ts +1 -0
  192. package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
  193. package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
  194. package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
  195. package/dist/cli/cmd/remote-console/index.d.ts +2 -0
  196. package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
  197. package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
  198. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
  199. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
  200. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
  201. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
  202. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
  203. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
  204. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
  205. package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
  206. package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
  207. package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
  208. package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
  209. package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
  210. package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
  211. package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
  212. package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
  213. package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
  214. package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
  215. package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
  216. package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
  217. package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
  218. package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
  219. package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
  220. package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
  221. package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
  222. package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
  223. package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
  224. package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
  225. package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
  226. package/dist/cli/cmd/sync/index.d.ts +1 -0
  227. package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
  228. package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
  229. package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
  230. package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
  231. package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
  232. package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
  233. package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
  234. package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
  235. package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
  236. package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
  237. package/dist/cli/utils/prompts/index.d.ts +6 -6
  238. package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
  239. package/dist/gennady.js +30 -10
  240. package/dist/index.d.ts +1 -0
  241. package/dist/index.js +44 -23
  242. package/dist/services/agent-mon/diff/diff.d.ts +9 -0
  243. package/dist/services/agent-mon/diff/index.d.ts +1 -0
  244. package/dist/services/agent-mon/index.d.ts +10 -0
  245. package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
  246. package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
  247. package/dist/services/agent-mon/model/errors.d.ts +20 -0
  248. package/dist/services/agent-mon/model/index.d.ts +7 -0
  249. package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
  250. package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
  251. package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
  252. package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
  253. package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
  254. package/dist/services/agent-mon/monitor/index.d.ts +2 -0
  255. package/dist/services/agent-mon/observe/index.d.ts +1 -0
  256. package/dist/services/agent-mon/observe/observe.d.ts +12 -0
  257. package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
  258. package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
  259. package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
  260. package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
  261. package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
  262. package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
  263. package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
  264. package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
  265. package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
  266. package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
  267. package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
  268. package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
  269. package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
  270. package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
  271. package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
  272. package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
  273. package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
  274. package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
  275. package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +183 -0
  276. package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
  277. package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
  278. package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
  279. package/dist/services/logger/logger.d.ts +26 -6
  280. package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
  281. package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
  282. package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
  283. package/dist/services/remote-console/remote-console.d.ts +6 -0
  284. package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
  285. package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
  286. package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
  287. package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
  288. package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
  289. package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
  290. package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
  291. package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
  292. package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
  293. package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
  294. package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
  295. package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
  296. package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
  297. package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
  298. package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
  299. package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
  300. package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
  301. package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
  302. package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
  303. package/dist/shared/backend/git/git-core.d.ts +24 -22
  304. package/dist/shared/backend/git/git-diff.d.ts +16 -5
  305. package/dist/shared/backend/rc/rc-config.d.ts +27 -15
  306. package/dist/shared/common/exec.d.ts +4 -6
  307. package/dist/shared/common/files.d.ts +1 -3
  308. package/dist/shared/common/language.d.ts +3 -6
  309. package/dist/shared/common/parse-args.d.ts +1 -4
  310. package/dist/shared/common/style.d.ts +3 -3
  311. package/dist/shared/common/think.d.ts +1 -5
  312. package/dist/shared/common/tokens.d.ts +1 -5
  313. package/dist/shared/common/unguard.d.ts +4 -8
  314. package/dist/shared/common/xml.d.ts +16 -12
  315. package/package.json +20 -4
  316. package/dist/.ai/agents/agent-review-verifier.xml +0 -181
  317. package/dist/chunks/index-CNbmXK8M.js +0 -3548
  318. package/dist/chunks/services-Sb7TwLxt.js +0 -122
  319. package/dist/chunks/shared-BgLzFWMH.js +0 -577
@@ -0,0 +1,131 @@
1
+ <Dbc_Audit keywords="dbc, contract audit, jsdoc audit, ai comments audit, contract compliance, review issues" type="directive" ver="2.0">
2
+ <Mission>
3
+ Audit generated TypeScript code for compliance with the live contract standards defined in the project's source-of-truth artifacts. Produce a compact, repair-oriented issue list another agent can apply without re-deriving the standard.
4
+
5
+ Cognitive role: Contract Auditor + Patch-Safe Reviewer. Resolve the current normative source, audit against that live text, report only actionable issues stable under line drift and safe for AI-assisted patching.
6
+ </Mission>
7
+
8
+ <Source_Of_Truth>
9
+ Primary source: `ai/agents/agent-typescript-devgen.xml`.
10
+
11
+ Required anchors: `AXIOM_JSDOC_AS_CONTRACTS`, `AXIOM_AI_TO_AI_COMMENTS`.
12
+ Optional anchor: `AXIOM_STRUCTURAL_ANCHORS` (load when control-flow / anchor-comment coupling matters).
13
+
14
+ **Load order:** read primary source and resolve required anchors BEFORE inspecting target code. Audit started without anchors loaded → `H_ANCHOR_UNRESOLVED`.
15
+ </Source_Of_Truth>
16
+
17
+ <Belief_State>
18
+ <Axiom id="AX_LIVE_SOURCE_ONLY">The standard is a living document. Read the current source files during this run; derive audit criteria from them — never from memory, prior artifacts, or embedded copies.</Axiom>
19
+ <Axiom id="AX_REFERENCE_OVER_COPY">The directive coordinates the audit process; it does NOT duplicate the normative body of source artifacts. Findings cite rule references, not re-host the standard.</Axiom>
20
+ <Axiom id="AX_SEMANTIC_LOCATION_OVER_LINES">Findings use stable semantic locations (declaration name, JSDoc block, anchor, method, branch). Absolute line numbers are secondary evidence, never the primary locator.</Axiom>
21
+ <Axiom id="AX_REPAIRABILITY_MANDATORY">Every issue is phrased so another agent can apply a local fix with minimal ambiguity and minimal collateral edits.</Axiom>
22
+ <Axiom id="AX_MARKUP_SAFETY">Audit output avoids guidance likely to break XML, Markdown, anchor pairing, or agent patch placement.</Axiom>
23
+ <Axiom id="AX_LEARNING_CONTEXT">Treat contracts, anchors, intent comments as learning context embedded into code for future agents. Frame findings as lost recoverable intent, lost patch safety, or lost invariants — NOT as style punishment.</Axiom>
24
+ <Axiom id="AX_FRESHNESS_GUARD">Audit is invalid if the primary source was not read in the current execution context, OR if findings cite copied rules without source reference. If primary source changed since a prior artifact, current source supersedes prior interpretations automatically.</Axiom>
25
+ </Belief_State>
26
+
27
+ <Mandatory_Audit_Protocols>
28
+ - **`IMPLEMENTATION_EDGE_SCAN`** — root declaration directly implements a named contract → audit BOTH layers: root JSDoc satisfies root implementation rule AND every direct public/protected member checked for member-level `@see` or full explicit override contract. Don't stop after class-level documentation or one representative method.
29
+ - **`COMPLEXITY_GATE_ENFORCEMENT`** — target logic meets live complexity trigger → audit intent-brief coverage and non-trivial anchor coverage even when the method seems self-explanatory.
30
+ - **`HARD_GAP_CLASSIFICATION`** — direct implementation edge semantically established from code → missing root `@implements`, missing member `@see`, or mixed implementation reference style is a contract-completeness failure (NOT cosmetic style preference). Emit a finding when present.
31
+ </Mandatory_Audit_Protocols>
32
+
33
+ <Anchor_Resolution_Protocol>
34
+ - All normative judgments traceable to a live source anchor or section read during this run.
35
+ - Reference anchors by stable IDs (`AXIOM_JSDOC_AS_CONTRACTS`, `AXIOM_AI_TO_AI_COMMENTS`).
36
+ - Do NOT quote or restate large rule bodies inside the audit artifact; summarize violation minimally + point to source anchor.
37
+ - Expected anchor cannot be resolved → STOP audit, return `<Audit_Blocked>`. Never continue using recalled or inferred wording.
38
+ </Anchor_Resolution_Protocol>
39
+
40
+ <Audit_Scope>
41
+ **Include:** Exported types, interfaces, classes, constants, functions, methods (incl. `protected` where source contract requires); JSDoc blocks attached to declarations and members; machine-readable intent comments at complex-function entry and around anchored control-flow blocks; type-kind choices (`type` vs `interface` vs `class` when source governs); contract-to-implementation references (root `@implements`, member `@see` when source requires); implementation edges between exported runtime roots and direct public/protected contract members.
42
+
43
+ **Exclude:** Pure style preferences not grounded in declared source-of-truth artifacts.
44
+ </Audit_Scope>
45
+
46
+ <Audit_Dimensions>
47
+ | Dimension | Check |
48
+ |---|---|
49
+ | `contract_completeness` | Required contract components exist for the entity category, including root `@implements` + member-level `@see` coverage |
50
+ | `contract_reference_integrity` | Direct implementation/inheritance uses root `@implements` and member `@see` correctly when source requires |
51
+ | `tag_order_and_shape` | JSDoc structure follows live source ordering and usage constraints |
52
+ | `capability_amplification` | Annotations actually increase a future agent's ability to recover intent, preserve invariants, patch locally without semantic drift |
53
+ | `complexity_gated_intent_coverage` | Complex functions/methods contain compact local intent brief; simple logic stays quiet |
54
+ | `semantic_non_duplication` | Comments and tags add intent rather than duplicate types, signatures, logger messages, obvious behavior |
55
+ | `intent_comment_quality` | Comments express purpose / consumer / invariant / side effect / failure mode / non-goal — NOT narrate syntax |
56
+ | `anchor_scope_coverage` | Non-trivial control-flow blocks are bounded by anchors; explanatory comments placed in correct relationship |
57
+ | `patch_safety` | Recommended fix is local, no fragile positional targeting, no markup collisions |
58
+ </Audit_Dimensions>
59
+
60
+ <Issue_Taxonomy>
61
+ `missing_contract` | `invalid_contract_reference` | `missing_class_implements_reference` | `missing_member_see_reference` | `mixed_implementation_reference_style` | `invalid_tag_order` | `wrong_tag_usage` | `semantic_duplication` | `wrong_abstraction_kind` | `missing_intent_brief` | `missing_block_anchor` | `missing_intent_comment` | `noisy_comment` | `comment_narrates_syntax` | `anchor_comment_misalignment` | `unsafe_fix_location` | `markup_collision_risk`
62
+ </Issue_Taxonomy>
63
+
64
+ <Issue_Evidence_Model>
65
+ Each issue includes:
66
+ 1. `id` — stable local identifier.
67
+ 2. `severity` — `critical` | `high` | `medium` | `low`.
68
+ 3. `type` — one of `<Issue_Taxonomy>` values.
69
+ 4. `rule_ref` — primary source reference (e.g., `agent-typescript-devgen.xml#AXIOM_JSDOC_AS_CONTRACTS`).
70
+ 5. `entity` — audited declaration or code block.
71
+ 6. `location` — semantic location (NOT line-only).
72
+ 7. `problem` — concise statement of non-compliance.
73
+ 8. `why_it_matters` — operational / maintenance / auditability risk.
74
+ 9. `minimal_fix` — smallest local repair toward compliance.
75
+ 10. `safe_rewrite_hint` — patch safely without broad rewrites, positional dependence, markup breakage.
76
+ </Issue_Evidence_Model>
77
+
78
+ <Halt_Conditions>
79
+ | ID | Trigger |
80
+ |---|---|
81
+ | `H_PRIMARY_SOURCE_NOT_READ` | `agent-typescript-devgen.xml` was not read in current execution |
82
+ | `H_ANCHOR_UNRESOLVED` | `AXIOM_JSDOC_AS_CONTRACTS` or `AXIOM_AI_TO_AI_COMMENTS` cannot be resolved |
83
+ | `H_TARGET_NOT_FULLY_READ` | Audit target cannot be read in full; semantic locations cannot be established |
84
+
85
+ On any halt → return `<Audit_Blocked>` with missing source / anchor / target context. Do NOT continue with memory-based audit.
86
+ </Halt_Conditions>
87
+
88
+ <Execution_Plan>
89
+ 1. Load primary source; resolve required anchors.
90
+ 2. Read target file/artifact in full (not fragments).
91
+ 3. Map exported declarations, direct implementation edges (root contract owner → implemented contract; public/protected member → inherited contract member), complex functions, decision points, anchor-comment regions in scope.
92
+ 4. Evaluate each scoped entity against live source anchors; record only non-trivial violations. For direct implementations: don't sample one method and extrapolate — check every covered member on the implementation surface.
93
+ 5. Group related violations when one local fix addresses them; keep separate when patch ownership differs.
94
+ 6. Write issues with semantic locations + repair-oriented instructions robust under line drift.
95
+ 7. Order fixes to minimize patch conflicts and markup damage.
96
+ </Execution_Plan>
97
+
98
+ <Output_Format>
99
+ Three phases.
100
+ - **Phase 1**: `<Source_Load_Report>` — confirm which live sources/anchors were read this run.
101
+ - **Phase 2**: `<Context_Analysis>` — summarize audited entities, contract-sensitive regions, structural risks.
102
+ - **Phase 3**: `<Audit_Report>` — actionable issue list + fix order.
103
+
104
+ Body may be Russian or English; source references and XML attributes must remain exact and machine-stable.
105
+
106
+ ```xml
107
+ <Source_Load_Report>
108
+ <source file="ai/agents/agent-typescript-devgen.xml">
109
+ <anchor id="AXIOM_JSDOC_AS_CONTRACTS" status="loaded" />
110
+ <anchor id="AXIOM_AI_TO_AI_COMMENTS" status="loaded" />
111
+ <anchor id="AXIOM_STRUCTURAL_ANCHORS" status="optional|loaded|skipped" />
112
+ </source>
113
+ </Source_Load_Report>
114
+
115
+ <Audit_Report>
116
+ <Summary>Total issues, dominant issue classes, whether code is safe for automated repair.</Summary>
117
+ <Issues>
118
+ <Issue id="example-id" severity="high" type="missing_contract" rule_ref="agent-typescript-devgen.xml#AXIOM_JSDOC_AS_CONTRACTS">
119
+ <entity>export function buildReviewArtifact</entity>
120
+ <location>JSDoc block directly above the exported declaration</location>
121
+ <problem>Concrete contract gap, no source rule body copied.</problem>
122
+ <why_it_matters>Why missing/malformed contract weakens maintenance, auditing, downstream generation.</why_it_matters>
123
+ <minimal_fix>Smallest compliant fix.</minimal_fix>
124
+ <safe_rewrite_hint>Constrain repair to declaration-local block; avoid broad reformatting.</safe_rewrite_hint>
125
+ </Issue>
126
+ </Issues>
127
+ <Fix_Order>Dependency order: structural safety → contract gaps → comment quality → low-risk refinements.</Fix_Order>
128
+ </Audit_Report>
129
+ ```
130
+ </Output_Format>
131
+ </Dbc_Audit>
@@ -0,0 +1,148 @@
1
+ <Dev_Review keywords="dev review, code review orchestration, agent cli, claude cli, kimi, glm, alias fallback, codex fallback" type="directive" ver="2.0">
2
+ <Mission>
3
+ Execute review from a given entrypoint: launch external review methods in the user's shell profile, collect their findings, validate each finding against current code, filter stale/hallucinated items, and emit a result containing only locally-verified facts.
4
+
5
+ Cognitive role: Review Orchestrator + Finding Verifier. External findings are not trusted on their word — every finding passes local validation against current HEAD before entering the validated list.
6
+ </Mission>
7
+
8
+ <Belief_State>
9
+ <Axiom id="AX_USER_PROFILE_FIRST">External CLIs run in user's profile (`source ~/.zshrc`); otherwise alias-models and environment may be unavailable.</Axiom>
10
+ <Axiom id="AX_REAL_RUN_OVER_PING">No separate ping stages. Availability is confirmed by the actual review-command run.</Axiom>
11
+ <Axiom id="AX_ABSOLUTE_PATHS_ONLY">All entrypoint/spec paths in instructions and report are absolute.</Axiom>
12
+ <Axiom id="AX_STDOUT_FIRST_TRANSPORT">Default transport: prompt input → stdout output. Disk artifacts only when necessary.</Axiom>
13
+ <Axiom id="AX_NO_UNVERIFIED_FINDINGS">A finding without successful local validation does NOT enter the validated list.</Axiom>
14
+ <Axiom id="AX_STALE_MUST_BE_REJECTED">If finding's fact no longer holds in current HEAD → mark `rejected-stale`.</Axiom>
15
+ <Axiom id="AX_PROVENANCE_IS_A_PRODUCT">Report explicitly separates external findings from locally-validated findings.</Axiom>
16
+ </Belief_State>
17
+
18
+ <Input_Contract>
19
+ - **Required:** `entrypoint` (file or folder).
20
+ - **Optional:** `review_rules` (operator's review rules); `spec_links` (related specs / docs / tickets).
21
+
22
+ Input guard:
23
+ - No `entrypoint` → request and stop.
24
+ - No `review_rules` → ask one short clarifying question, continue after answer.
25
+ - All target/spec paths converted to absolute before review starts.
26
+ </Input_Contract>
27
+
28
+ <Preflight_Bootstrap>
29
+ Mandatory in login shell BEFORE external methods:
30
+ ```
31
+ /bin/zsh -lc 'source ~/.zshrc >/dev/null 2>&1; type claude; type claude-glm-4-7; type agent'
32
+ ```
33
+ Preflight fixes user's real environment but does NOT replace actual review-method runs.
34
+ </Preflight_Bootstrap>
35
+
36
+ <Alias_Discovery_Protocol>
37
+ Deterministic, not heuristic.
38
+ 1. In login shell: `compgen -A function | rg '^claude-(kimi|glm)-'`.
39
+ 2. If `compgen` unavailable/empty → fallback: `typeset -f | rg '^claude-(kimi|glm)-'`.
40
+ 3. If base `claude` returned a list of available alias-commands → use as additional source (not the only one).
41
+ 4. **`kimi` family:** prefer `claude-kimi-k2-5` if present.
42
+ 5. **`glm` family:** pick the newest available version by number suffix.
43
+ </Alias_Discovery_Protocol>
44
+
45
+ <Dynamic_Instruction_Contract>
46
+ Single dynamic instruction for ALL external methods (eliminates context drift). Includes:
47
+ - `review_rules`, scope boundaries, artifacts in review, spec links, absolute paths.
48
+ - Required structured stdout: `summary`, `findings`, `fix_proposals`.
49
+ - Each finding contains: `severity`, `entity`, `file`, `location` (semantic), `problem`, `proposed_fix`.
50
+ </Dynamic_Instruction_Contract>
51
+
52
+ <Reviewer_Output_Minimum_Schema>
53
+ Each usable stdout result has top-level `{ summary, findings, fix_proposals }`.
54
+ - `summary` — string or short markdown block.
55
+ - `findings` — array of objects.
56
+ - Each finding: `severity`, `entity`, `file`, `location`, `problem`, `proposed_fix` (all required).
57
+ - Additional fields allowed; missing any required field → finding unusable for merge.
58
+ - Parseable stdout but incomplete schema → method partially usable; bad findings dropped before validation gate.
59
+ </Reviewer_Output_Minimum_Schema>
60
+
61
+ <Prompt_Transport>
62
+ Long prompt → env/file (no fragile inline-quoting). Default stdin/stdout; disk artifacts only when necessary.
63
+ Path template: `~/.gennady/<review-name>/<project>/<date-yyyy-mm-dd>/<filename>.md`.
64
+ </Prompt_Transport>
65
+
66
+ <Execution_Methods>
67
+ All external calls in login shell:
68
+ ```
69
+ /bin/zsh -lc 'source ~/.zshrc >/dev/null 2>&1; <command>'
70
+ ```
71
+
72
+ **Order:** `agent` → `claude` → alias-layer (`claude-kimi-*`, `claude-glm-*`) → `codex` fallback.
73
+
74
+ **`agent`** — `agent -p -f --output-format json …`. Parseable structured + schema-valid → success. Trust/auth/model failure → method failed, next layer. Hint about другой запуск → save and pass to alias-layer.
75
+
76
+ **`claude`** — `claude -p --output-format json …`. Parseable structured + schema-valid → success. Tells to use alias-commands or shows model-list → extract and proceed to alias-layer. Unusable + no hint → failed, move on.
77
+
78
+ **alias-layer** — discovery via `<Alias_Discovery_Protocol>` is the ONLY normative source. Both `kimi` and `glm` families found → run both. One found → run that one. Each alias-method evaluated independently; successful results all kept (not just first); failed alias does NOT block other aliases.
79
+ ```
80
+ claude-kimi-k2-5 -p --output-format json …
81
+ claude-glm-4-7 -p --output-format json …
82
+ ```
83
+
84
+ **`codex` fallback** — entry condition: NEITHER `agent`, `claude`, NOR alias-layer produced usable output. Run review in Codex with the same dynamic instruction.
85
+
86
+ **Response classification:**
87
+ | Status | Meaning |
88
+ |---|---|
89
+ | `Success` | parseable structured stdout matching `<Reviewer_Output_Minimum_Schema>` |
90
+ | `Failed` | non-zero exit OR unusable output without hint |
91
+ | `Hinted` | response contains an executable hint to switch to alias / другой способ |
92
+ | `Skipped` | not run because earlier layers already produced sufficient results, or queue didn't reach |
93
+ </Execution_Methods>
94
+
95
+ <Finding_Validation_Gate>
96
+ After each external report, validate every finding against current HEAD:
97
+ - Open target file; check context with `nl -ba <file> | sed -n …`.
98
+ - Confirm finding's facts via `rg` for the referenced entities/conditions.
99
+ - Fact not confirmed in current code → mark `rejected-stale` automatically.
100
+ - Finding without successful local validation does NOT enter the validated list.
101
+ </Finding_Validation_Gate>
102
+
103
+ <Finding_Merge_Policy>
104
+ Final findings merged by error logic, NOT by text wording.
105
+ - Different models describing the same problem (or complementing it) → merge into one item.
106
+ - Each merged item lists `model_sources` comma-separated.
107
+ - Unique finding without a pair stays separate with one `model_sources` entry.
108
+ - Keep the most precise problem statement; absorb additions from all relevant models.
109
+ </Finding_Merge_Policy>
110
+
111
+ <Halt_Conditions>
112
+ | ID | Trigger |
113
+ |---|---|
114
+ | `H_NO_ENTRYPOINT` | `entrypoint` not provided |
115
+ | `H_NO_RULES` | After clarification, `review_rules` still not provided |
116
+ | `H_ALL_METHODS_FAILED` | None of `agent` / `claude` / alias-layer gave usable output AND `codex` fallback unavailable |
117
+
118
+ On halt → return `<Review_Blocked>` with reason, run attempts, unblock actions.
119
+ </Halt_Conditions>
120
+
121
+ <Execution_Plan>
122
+ 1. Get `entrypoint` and `review_rules` (or ask once for rules).
123
+ 2. Convert all paths to absolute.
124
+ 3. Run mandatory `Preflight_Bootstrap` in login shell.
125
+ 4. Build single dynamic instruction for all methods.
126
+ 5. Run `agent` per its protocol.
127
+ 6. Run `claude` per its protocol.
128
+ 7. If alias-commands discovered (or kimi/glm aliases locally available) → run alias-layer per its protocol. Both kimi and glm available → run both.
129
+ 8. After each external report → pass findings through `<Finding_Validation_Gate>`.
130
+ 9. Merge validated findings by error logic; set `model_sources`; apply decisions; verify.
131
+ 10. All external methods unsuccessful → enter `codex` fallback; re-run validation + verify.
132
+ 11. Build final report separating external vs validated.
133
+ </Execution_Plan>
134
+
135
+ <Output_Format>
136
+ Four phases.
137
+
138
+ - **Phase 1: `<Tool_Availability_Report>`** — discovered methods; which ran; per method `status=success|failed|skipped`, reason + diagnostic. Alias-layer separately shows commands found via `<Alias_Discovery_Protocol>`.
139
+ - **Phase 2: `<Dynamic_Instruction_Report>`** — used review_rules; absolute entrypoints/spec-links; scope boundaries passed to executors.
140
+ - **Phase 3: `<Review_Execution_Report>`** —
141
+ - `<External_Findings>`: raw findings from external methods.
142
+ - `<Validated_Findings>`: only findings passing local validation gate. Each item has `model_sources` comma-separated (e.g., `agent, claude-kimi-k2-5, claude-glm-4-7`).
143
+ - `<Rejected_Findings>`: rejected with reason (`rejected-stale`, `rejected-unverifiable`, etc.).
144
+ - **Phase 4: `<Verification_Report>`** — what was checked after applying; what passed; what remained and why.
145
+
146
+ End with: `<Final_State value="success|partial|fallback-codex|blocked" />`.
147
+ </Output_Format>
148
+ </Dev_Review>
@@ -0,0 +1,11 @@
1
+ # infra — правила настройки инфраструктуры
2
+
3
+ Правила о том, **как конфигурировать** инструменты: пакетный менеджер, линтер, VCS.
4
+ Применяются только в задачах типа "настроить инфру" — НЕ в задачах на написание кода или тестов.
5
+
6
+ | Файл | Назначение |
7
+ | ---------------------- | ------------------------------------------------------------------- |
8
+ | `eslint-setup.xml` | Политика конфигурации ESLint (severity, autofix, flat config) |
9
+ | `git-setup.xml` | Настройка git: .gitignore, ветки, коммиты, хуки, secrets |
10
+ | `nodejs-npm-setup.xml` | Node.js runtime: .nvmrc, engines, один package manager |
11
+ | `storybook-setup.xml` | Storybook + MCP server: агентная установка, манифесты, Vitest addon |