@evolith/smart-cli 0.0.2-beta → 1.0.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 (432) hide show
  1. package/ARCHITECTURE.md +1 -1
  2. package/LICENSE +21 -0
  3. package/README.es.md +1024 -171
  4. package/README.md +1018 -166
  5. package/dist/.tsbuildinfo +1 -0
  6. package/dist/CoreApiClient.d.ts +5 -0
  7. package/dist/CoreApiClient.js +25 -0
  8. package/dist/CoreApiClient.js.map +1 -0
  9. package/dist/app.module.js +97 -12
  10. package/dist/app.module.js.map +1 -1
  11. package/dist/commands/adr/adr.command.d.ts +9 -3
  12. package/dist/commands/adr/adr.command.js +82 -88
  13. package/dist/commands/adr/adr.command.js.map +1 -1
  14. package/dist/commands/agents/agents.command.d.ts +27 -0
  15. package/dist/commands/agents/agents.command.js +373 -0
  16. package/dist/commands/agents/agents.command.js.map +1 -0
  17. package/dist/commands/agents/index.d.ts +1 -0
  18. package/dist/commands/agents/index.js +6 -0
  19. package/dist/commands/agents/index.js.map +1 -0
  20. package/dist/commands/alias/alias.command.d.ts +16 -0
  21. package/dist/commands/alias/alias.command.js +95 -0
  22. package/dist/commands/alias/alias.command.js.map +1 -0
  23. package/dist/commands/api/api.catalog.d.ts +38 -0
  24. package/dist/commands/api/api.catalog.js +167 -0
  25. package/dist/commands/api/api.catalog.js.map +1 -0
  26. package/dist/commands/api/api.command.d.ts +21 -0
  27. package/dist/commands/api/api.command.js +162 -0
  28. package/dist/commands/api/api.command.js.map +1 -0
  29. package/dist/commands/architecture/scaffold/index.d.ts +2 -0
  30. package/dist/commands/architecture/scaffold/index.js +6 -0
  31. package/dist/commands/architecture/scaffold/index.js.map +1 -0
  32. package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +15 -0
  33. package/dist/commands/architecture/scaffold/scaffold-strategy.js +20 -0
  34. package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +1 -0
  35. package/dist/commands/architecture/scaffold.command.d.ts +12 -3
  36. package/dist/commands/architecture/scaffold.command.js +222 -56
  37. package/dist/commands/architecture/scaffold.command.js.map +1 -1
  38. package/dist/commands/chat/chat.command.d.ts +7 -0
  39. package/dist/commands/chat/chat.command.js +64 -0
  40. package/dist/commands/chat/chat.command.js.map +1 -0
  41. package/dist/commands/completion/completion.command.d.ts +12 -4
  42. package/dist/commands/completion/completion.command.js +159 -53
  43. package/dist/commands/completion/completion.command.js.map +1 -1
  44. package/dist/commands/docs/docs.command.d.ts +6 -3
  45. package/dist/commands/docs/docs.command.js +75 -16
  46. package/dist/commands/docs/docs.command.js.map +1 -1
  47. package/dist/commands/drift/drift.command.d.ts +7 -3
  48. package/dist/commands/drift/drift.command.js +94 -52
  49. package/dist/commands/drift/drift.command.js.map +1 -1
  50. package/dist/commands/evaluate/evaluate.command.d.ts +28 -0
  51. package/dist/commands/evaluate/evaluate.command.js +197 -0
  52. package/dist/commands/evaluate/evaluate.command.js.map +1 -0
  53. package/dist/commands/fixtures/fixtures.command.d.ts +21 -0
  54. package/dist/commands/fixtures/fixtures.command.js +310 -0
  55. package/dist/commands/fixtures/fixtures.command.js.map +1 -0
  56. package/dist/commands/gate/gate.command.d.ts +29 -0
  57. package/dist/commands/gate/gate.command.js +193 -0
  58. package/dist/commands/gate/gate.command.js.map +1 -0
  59. package/dist/commands/history/history.command.d.ts +3 -3
  60. package/dist/commands/history/history.command.js +24 -55
  61. package/dist/commands/history/history.command.js.map +1 -1
  62. package/dist/commands/init/init.command.d.ts +9 -3
  63. package/dist/commands/init/init.command.js +39 -198
  64. package/dist/commands/init/init.command.js.map +1 -1
  65. package/dist/commands/init/init.wizard.d.ts +19 -0
  66. package/dist/commands/init/init.wizard.js +181 -0
  67. package/dist/commands/init/init.wizard.js.map +1 -0
  68. package/dist/commands/phase/phase-advance.command.d.ts +30 -0
  69. package/dist/commands/phase/phase-advance.command.js +206 -0
  70. package/dist/commands/phase/phase-advance.command.js.map +1 -0
  71. package/dist/commands/plan/index.d.ts +1 -0
  72. package/dist/commands/plan/index.js +133 -0
  73. package/dist/commands/plan/index.js.map +1 -0
  74. package/dist/commands/profile/profile.command.d.ts +18 -0
  75. package/dist/commands/profile/profile.command.js +198 -0
  76. package/dist/commands/profile/profile.command.js.map +1 -0
  77. package/dist/commands/satellite/index.d.ts +2 -0
  78. package/dist/commands/satellite/index.js +8 -0
  79. package/dist/commands/satellite/index.js.map +1 -0
  80. package/dist/commands/satellite/satellite-adopt.command.d.ts +21 -0
  81. package/dist/commands/satellite/satellite-adopt.command.js +193 -0
  82. package/dist/commands/satellite/satellite-adopt.command.js.map +1 -0
  83. package/dist/commands/satellite/satellite-create.command.d.ts +26 -0
  84. package/dist/commands/satellite/satellite-create.command.js +192 -0
  85. package/dist/commands/satellite/satellite-create.command.js.map +1 -0
  86. package/dist/commands/sdlc/gate-status.command.d.ts +8 -3
  87. package/dist/commands/sdlc/gate-status.command.js +114 -66
  88. package/dist/commands/sdlc/gate-status.command.js.map +1 -1
  89. package/dist/commands/sdlc/generate-domain.command.d.ts +6 -3
  90. package/dist/commands/sdlc/generate-domain.command.js +126 -16
  91. package/dist/commands/sdlc/generate-domain.command.js.map +1 -1
  92. package/dist/commands/sdlc/handoff.command.d.ts +9 -4
  93. package/dist/commands/sdlc/handoff.command.js +106 -104
  94. package/dist/commands/sdlc/handoff.command.js.map +1 -1
  95. package/dist/commands/sdlc/sdlc.command.d.ts +4 -3
  96. package/dist/commands/sdlc/sdlc.command.js +17 -9
  97. package/dist/commands/sdlc/sdlc.command.js.map +1 -1
  98. package/dist/commands/standards/standards.command.d.ts +6 -3
  99. package/dist/commands/standards/standards.command.js +52 -77
  100. package/dist/commands/standards/standards.command.js.map +1 -1
  101. package/dist/commands/topology/phase-artifacts.command.d.ts +23 -0
  102. package/dist/commands/topology/phase-artifacts.command.js +167 -0
  103. package/dist/commands/topology/phase-artifacts.command.js.map +1 -0
  104. package/dist/commands/topology/recommend.command.d.ts +36 -0
  105. package/dist/commands/topology/recommend.command.js +236 -0
  106. package/dist/commands/topology/recommend.command.js.map +1 -0
  107. package/dist/commands/topology/topology.command.d.ts +5 -0
  108. package/dist/commands/topology/topology.command.js +41 -0
  109. package/dist/commands/topology/topology.command.js.map +1 -0
  110. package/dist/commands/update/update.command.d.ts +21 -0
  111. package/dist/commands/update/update.command.js +214 -0
  112. package/dist/commands/update/update.command.js.map +1 -0
  113. package/dist/commands/upgrade/upgrade.command.d.ts +22 -0
  114. package/dist/commands/{init → upgrade}/upgrade.command.js +34 -66
  115. package/dist/commands/upgrade/upgrade.command.js.map +1 -0
  116. package/dist/commands/validate/validate.command.d.ts +24 -6
  117. package/dist/commands/validate/validate.command.js +301 -63
  118. package/dist/commands/validate/validate.command.js.map +1 -1
  119. package/dist/config/alias.service.d.ts +14 -0
  120. package/dist/{core/sync/sync.service.js → config/alias.service.js} +54 -32
  121. package/dist/config/alias.service.js.map +1 -0
  122. package/dist/contributions/contribution-validator.d.ts +16 -0
  123. package/dist/contributions/contribution-validator.js +34 -0
  124. package/dist/contributions/contribution-validator.js.map +1 -0
  125. package/dist/contributions/index.d.ts +1 -0
  126. package/dist/contributions/index.js +6 -0
  127. package/dist/contributions/index.js.map +1 -0
  128. package/dist/{domain/services → infrastructure/adapters}/agent-registry.service.d.ts +6 -2
  129. package/dist/{domain/services → infrastructure/adapters}/agent-registry.service.js +33 -10
  130. package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
  131. package/dist/infrastructure/agent/agent-runtime.factory.d.ts +9 -0
  132. package/dist/infrastructure/agent/agent-runtime.factory.js +47 -0
  133. package/dist/infrastructure/agent/agent-runtime.factory.js.map +1 -0
  134. package/dist/{core → infrastructure}/architecture/nx-workspace.strategy.d.ts +9 -1
  135. package/dist/infrastructure/architecture/nx-workspace.strategy.js +125 -0
  136. package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +1 -0
  137. package/dist/infrastructure/architecture/topology-catalog.d.ts +15 -0
  138. package/dist/infrastructure/architecture/topology-catalog.js +50 -0
  139. package/dist/infrastructure/architecture/topology-catalog.js.map +1 -0
  140. package/dist/infrastructure/catalog/catalog-loader.d.ts +1 -2
  141. package/dist/infrastructure/catalog/catalog-loader.js +14 -5
  142. package/dist/infrastructure/catalog/catalog-loader.js.map +1 -1
  143. package/dist/infrastructure/cli/base-command.d.ts +14 -0
  144. package/dist/infrastructure/cli/base-command.js +41 -0
  145. package/dist/infrastructure/cli/base-command.js.map +1 -0
  146. package/dist/infrastructure/cli/command-executor.d.ts +2 -1
  147. package/dist/infrastructure/cli/command-executor.js +20 -3
  148. package/dist/infrastructure/cli/command-executor.js.map +1 -1
  149. package/dist/infrastructure/cli/providers/index.js +32 -29
  150. package/dist/infrastructure/cli/providers/index.js.map +1 -1
  151. package/dist/infrastructure/config/config.service.d.ts +34 -0
  152. package/dist/infrastructure/config/config.service.js +126 -0
  153. package/dist/infrastructure/config/config.service.js.map +1 -0
  154. package/dist/infrastructure/filesystem/file-manager.service.d.ts +12 -0
  155. package/dist/{core → infrastructure}/filesystem/file-manager.service.js +8 -25
  156. package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
  157. package/dist/infrastructure/formatters/output-formatter.service.js +2 -1
  158. package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -1
  159. package/dist/{core → infrastructure}/observability/command-watcher.js +31 -0
  160. package/dist/infrastructure/observability/command-watcher.js.map +1 -0
  161. package/dist/{core → infrastructure}/observability/error-reporter.js +5 -5
  162. package/dist/infrastructure/observability/error-reporter.js.map +1 -0
  163. package/dist/infrastructure/observability/index.d.ts +11 -0
  164. package/dist/{core → infrastructure}/observability/index.js +8 -1
  165. package/dist/infrastructure/observability/index.js.map +1 -0
  166. package/dist/infrastructure/observability/otel-tracing.d.ts +4 -0
  167. package/dist/infrastructure/observability/otel-tracing.js +34 -0
  168. package/dist/infrastructure/observability/otel-tracing.js.map +1 -0
  169. package/dist/infrastructure/observability/structured-logger.js.map +1 -0
  170. package/dist/infrastructure/observability/timing.js.map +1 -0
  171. package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +1 -0
  172. package/dist/infrastructure/plugins/plugin-loader.d.ts +10 -0
  173. package/dist/infrastructure/plugins/plugin-loader.js +145 -0
  174. package/dist/infrastructure/plugins/plugin-loader.js.map +1 -0
  175. package/dist/infrastructure/plugins/plugin.module.d.ts +4 -0
  176. package/dist/infrastructure/plugins/plugin.module.js +28 -0
  177. package/dist/infrastructure/plugins/plugin.module.js.map +1 -0
  178. package/dist/infrastructure/prompts/init-prompt-group.d.ts +3 -0
  179. package/dist/infrastructure/prompts/init-prompt-group.js +115 -0
  180. package/dist/infrastructure/prompts/init-prompt-group.js.map +1 -0
  181. package/dist/infrastructure/prompts/init-prompt-options.d.ts +10 -0
  182. package/dist/infrastructure/prompts/init-prompt-options.js +40 -0
  183. package/dist/infrastructure/prompts/init-prompt-options.js.map +1 -0
  184. package/dist/infrastructure/prompts/progress.service.d.ts +24 -0
  185. package/dist/infrastructure/prompts/progress.service.js +180 -0
  186. package/dist/infrastructure/prompts/progress.service.js.map +1 -0
  187. package/dist/infrastructure/prompts/prompt.service.d.ts +42 -0
  188. package/dist/infrastructure/prompts/prompt.service.js +142 -0
  189. package/dist/infrastructure/prompts/prompt.service.js.map +1 -0
  190. package/dist/infrastructure/prompts/wizard.service.d.ts +27 -0
  191. package/dist/infrastructure/prompts/wizard.service.js +163 -0
  192. package/dist/infrastructure/prompts/wizard.service.js.map +1 -0
  193. package/dist/{core/abstractions → infrastructure}/providers/config-parser.provider.d.ts +1 -1
  194. package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
  195. package/dist/{core/abstractions → infrastructure}/providers/logger.provider.d.ts +1 -1
  196. package/dist/infrastructure/providers/logger.provider.js.map +1 -0
  197. package/dist/{core/abstractions → infrastructure}/providers/mock-filesystem.provider.d.ts +6 -2
  198. package/dist/{core/abstractions → infrastructure}/providers/mock-filesystem.provider.js +8 -1
  199. package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
  200. package/dist/{core/abstractions → infrastructure}/providers/node-filesystem.provider.d.ts +6 -2
  201. package/dist/{core/abstractions → infrastructure}/providers/node-filesystem.provider.js +13 -0
  202. package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
  203. package/dist/main.js +30 -2
  204. package/dist/main.js.map +1 -1
  205. package/dist/plugins/index.d.ts +1 -0
  206. package/dist/plugins/index.js +6 -0
  207. package/dist/plugins/index.js.map +1 -0
  208. package/dist/plugins/plugin-registry.d.ts +22 -0
  209. package/dist/plugins/plugin-registry.js +33 -0
  210. package/dist/plugins/plugin-registry.js.map +1 -0
  211. package/package.json +58 -27
  212. package/shell/hooks.bash +68 -0
  213. package/shell/hooks.fish +57 -0
  214. package/shell/hooks.zsh +68 -0
  215. package/dist/application/services/index.d.ts +0 -63
  216. package/dist/application/services/index.js +0 -345
  217. package/dist/application/services/index.js.map +0 -1
  218. package/dist/application/services/phase-transition.use-case.spec.d.ts +0 -1
  219. package/dist/application/services/phase-transition.use-case.spec.js +0 -297
  220. package/dist/application/services/phase-transition.use-case.spec.js.map +0 -1
  221. package/dist/application/services/services.test.d.ts +0 -1
  222. package/dist/application/services/services.test.js +0 -176
  223. package/dist/application/services/services.test.js.map +0 -1
  224. package/dist/application/use-cases/validate-satellite.use-case.d.ts +0 -18
  225. package/dist/application/use-cases/validate-satellite.use-case.js +0 -92
  226. package/dist/application/use-cases/validate-satellite.use-case.js.map +0 -1
  227. package/dist/application/use-cases/validate-satellite.use-case.spec.d.ts +0 -1
  228. package/dist/application/use-cases/validate-satellite.use-case.spec.js +0 -102
  229. package/dist/application/use-cases/validate-satellite.use-case.spec.js.map +0 -1
  230. package/dist/commands/commands.test.d.ts +0 -1
  231. package/dist/commands/commands.test.js +0 -131
  232. package/dist/commands/commands.test.js.map +0 -1
  233. package/dist/commands/init/agents.command.d.ts +0 -22
  234. package/dist/commands/init/agents.command.js +0 -502
  235. package/dist/commands/init/agents.command.js.map +0 -1
  236. package/dist/commands/init/agents.command.spec.d.ts +0 -1
  237. package/dist/commands/init/agents.command.spec.js +0 -152
  238. package/dist/commands/init/agents.command.spec.js.map +0 -1
  239. package/dist/commands/init/upgrade.command.d.ts +0 -19
  240. package/dist/commands/init/upgrade.command.js.map +0 -1
  241. package/dist/commands/mcp/mcp-serve.command.d.ts +0 -15
  242. package/dist/commands/mcp/mcp-serve.command.js +0 -106
  243. package/dist/commands/mcp/mcp-serve.command.js.map +0 -1
  244. package/dist/config/runtimes.json +0 -196
  245. package/dist/config/tool-catalog.json +0 -343
  246. package/dist/core/abstractions/index.d.ts +0 -6
  247. package/dist/core/abstractions/index.js +0 -23
  248. package/dist/core/abstractions/index.js.map +0 -1
  249. package/dist/core/abstractions/interfaces.d.ts +0 -60
  250. package/dist/core/abstractions/interfaces.js +0 -5
  251. package/dist/core/abstractions/interfaces.js.map +0 -1
  252. package/dist/core/abstractions/providers/config-parser.provider.js.map +0 -1
  253. package/dist/core/abstractions/providers/logger.provider.js.map +0 -1
  254. package/dist/core/abstractions/providers/mock-filesystem.provider.js.map +0 -1
  255. package/dist/core/abstractions/providers/node-filesystem.provider.js.map +0 -1
  256. package/dist/core/agents/agent-ruleset-builder.d.ts +0 -30
  257. package/dist/core/agents/agent-ruleset-builder.js +0 -75
  258. package/dist/core/agents/agent-ruleset-builder.js.map +0 -1
  259. package/dist/core/agents/agent-ruleset-builder.spec.d.ts +0 -1
  260. package/dist/core/agents/agent-ruleset-builder.spec.js +0 -135
  261. package/dist/core/agents/agent-ruleset-builder.spec.js.map +0 -1
  262. package/dist/core/architecture/nx-workspace.strategy.js +0 -107
  263. package/dist/core/architecture/nx-workspace.strategy.js.map +0 -1
  264. package/dist/core/architecture/workspace-manager.strategy.d.ts +0 -7
  265. package/dist/core/architecture/workspace-manager.strategy.js +0 -3
  266. package/dist/core/architecture/workspace-manager.strategy.js.map +0 -1
  267. package/dist/core/config/config.service.d.ts +0 -15
  268. package/dist/core/config/config.service.js +0 -55
  269. package/dist/core/config/config.service.js.map +0 -1
  270. package/dist/core/config/config.service.spec.d.ts +0 -1
  271. package/dist/core/config/config.service.spec.js +0 -43
  272. package/dist/core/config/config.service.spec.js.map +0 -1
  273. package/dist/core/di/container.d.ts +0 -25
  274. package/dist/core/di/container.js +0 -87
  275. package/dist/core/di/container.js.map +0 -1
  276. package/dist/core/di/container.spec.d.ts +0 -1
  277. package/dist/core/di/container.spec.js +0 -137
  278. package/dist/core/di/container.spec.js.map +0 -1
  279. package/dist/core/errors/index.d.ts +0 -26
  280. package/dist/core/errors/index.js +0 -67
  281. package/dist/core/errors/index.js.map +0 -1
  282. package/dist/core/filesystem/file-manager.service.d.ts +0 -4
  283. package/dist/core/filesystem/file-manager.service.js.map +0 -1
  284. package/dist/core/filesystem/file-manager.service.spec.d.ts +0 -1
  285. package/dist/core/filesystem/file-manager.service.spec.js +0 -103
  286. package/dist/core/filesystem/file-manager.service.spec.js.map +0 -1
  287. package/dist/core/mcp/mcp-server.service.d.ts +0 -7
  288. package/dist/core/mcp/mcp-server.service.js +0 -31
  289. package/dist/core/mcp/mcp-server.service.js.map +0 -1
  290. package/dist/core/mcp/metrics.service.d.ts +0 -37
  291. package/dist/core/mcp/metrics.service.js +0 -72
  292. package/dist/core/mcp/metrics.service.js.map +0 -1
  293. package/dist/core/mcp/prompts/index.d.ts +0 -22
  294. package/dist/core/mcp/prompts/index.js +0 -175
  295. package/dist/core/mcp/prompts/index.js.map +0 -1
  296. package/dist/core/mcp/resources/index.d.ts +0 -11
  297. package/dist/core/mcp/resources/index.js +0 -193
  298. package/dist/core/mcp/resources/index.js.map +0 -1
  299. package/dist/core/mcp/server.d.ts +0 -30
  300. package/dist/core/mcp/server.js +0 -468
  301. package/dist/core/mcp/server.js.map +0 -1
  302. package/dist/core/mcp/tools/agent.d.ts +0 -41
  303. package/dist/core/mcp/tools/agent.js +0 -195
  304. package/dist/core/mcp/tools/agent.js.map +0 -1
  305. package/dist/core/mcp/tools/architecture.d.ts +0 -27
  306. package/dist/core/mcp/tools/architecture.js +0 -166
  307. package/dist/core/mcp/tools/architecture.js.map +0 -1
  308. package/dist/core/mcp/tools/sdlc.d.ts +0 -32
  309. package/dist/core/mcp/tools/sdlc.js +0 -189
  310. package/dist/core/mcp/tools/sdlc.js.map +0 -1
  311. package/dist/core/mcp/tools/tool-utils.d.ts +0 -4
  312. package/dist/core/mcp/tools/tool-utils.js +0 -18
  313. package/dist/core/mcp/tools/tool-utils.js.map +0 -1
  314. package/dist/core/mcp/tools/validate.d.ts +0 -18
  315. package/dist/core/mcp/tools/validate.js +0 -56
  316. package/dist/core/mcp/tools/validate.js.map +0 -1
  317. package/dist/core/mcp/watcher.service.d.ts +0 -8
  318. package/dist/core/mcp/watcher.service.js +0 -82
  319. package/dist/core/mcp/watcher.service.js.map +0 -1
  320. package/dist/core/mcp/watcher.service.spec.d.ts +0 -1
  321. package/dist/core/mcp/watcher.service.spec.js +0 -70
  322. package/dist/core/mcp/watcher.service.spec.js.map +0 -1
  323. package/dist/core/observability/command-watcher.js.map +0 -1
  324. package/dist/core/observability/error-reporter.js.map +0 -1
  325. package/dist/core/observability/index.d.ts +0 -4
  326. package/dist/core/observability/index.js.map +0 -1
  327. package/dist/core/observability/observability.test.d.ts +0 -1
  328. package/dist/core/observability/observability.test.js +0 -224
  329. package/dist/core/observability/observability.test.js.map +0 -1
  330. package/dist/core/observability/structured-logger.js.map +0 -1
  331. package/dist/core/observability/timing.js.map +0 -1
  332. package/dist/core/services/command-executor.service.d.ts +0 -3
  333. package/dist/core/services/command-executor.service.js +0 -12
  334. package/dist/core/services/command-executor.service.js.map +0 -1
  335. package/dist/core/services/command-history.service.d.ts +0 -38
  336. package/dist/core/services/command-history.service.js +0 -146
  337. package/dist/core/services/command-history.service.js.map +0 -1
  338. package/dist/core/services/command-history.service.spec.d.ts +0 -1
  339. package/dist/core/services/command-history.service.spec.js +0 -166
  340. package/dist/core/services/command-history.service.spec.js.map +0 -1
  341. package/dist/core/services/command-providers.d.ts +0 -1
  342. package/dist/core/services/command-providers.js +0 -17
  343. package/dist/core/services/command-providers.js.map +0 -1
  344. package/dist/core/services/runtime-catalog.service.d.ts +0 -2
  345. package/dist/core/services/runtime-catalog.service.js +0 -7
  346. package/dist/core/services/runtime-catalog.service.js.map +0 -1
  347. package/dist/core/sync/sync.service.d.ts +0 -4
  348. package/dist/core/sync/sync.service.js.map +0 -1
  349. package/dist/core/sync/sync.service.spec.d.ts +0 -1
  350. package/dist/core/sync/sync.service.spec.js +0 -63
  351. package/dist/core/sync/sync.service.spec.js.map +0 -1
  352. package/dist/core/upgrade/satellite-upgrade.service.d.ts +0 -48
  353. package/dist/core/upgrade/satellite-upgrade.service.js +0 -358
  354. package/dist/core/upgrade/satellite-upgrade.service.js.map +0 -1
  355. package/dist/core/upgrade/satellite-upgrade.service.spec.d.ts +0 -1
  356. package/dist/core/upgrade/satellite-upgrade.service.spec.js +0 -143
  357. package/dist/core/upgrade/satellite-upgrade.service.spec.js.map +0 -1
  358. package/dist/core/validators/architecture-drift.service.d.ts +0 -68
  359. package/dist/core/validators/architecture-drift.service.js +0 -266
  360. package/dist/core/validators/architecture-drift.service.js.map +0 -1
  361. package/dist/core/validators/architecture-drift.service.spec.d.ts +0 -1
  362. package/dist/core/validators/architecture-drift.service.spec.js +0 -315
  363. package/dist/core/validators/architecture-drift.service.spec.js.map +0 -1
  364. package/dist/core/validators/phase-gate-validator.service.d.ts +0 -71
  365. package/dist/core/validators/phase-gate-validator.service.js +0 -271
  366. package/dist/core/validators/phase-gate-validator.service.js.map +0 -1
  367. package/dist/core/validators/phase-gate-validator.service.spec.d.ts +0 -1
  368. package/dist/core/validators/phase-gate-validator.service.spec.js +0 -326
  369. package/dist/core/validators/phase-gate-validator.service.spec.js.map +0 -1
  370. package/dist/core/validators/ruleset-validator-architecture.spec.d.ts +0 -1
  371. package/dist/core/validators/ruleset-validator-architecture.spec.js +0 -178
  372. package/dist/core/validators/ruleset-validator-architecture.spec.js.map +0 -1
  373. package/dist/core/validators/ruleset-validator.service.d.ts +0 -80
  374. package/dist/core/validators/ruleset-validator.service.js +0 -657
  375. package/dist/core/validators/ruleset-validator.service.js.map +0 -1
  376. package/dist/core/validators/ruleset-validator.service.spec.d.ts +0 -1
  377. package/dist/core/validators/ruleset-validator.service.spec.js +0 -122
  378. package/dist/core/validators/ruleset-validator.service.spec.js.map +0 -1
  379. package/dist/domain/entities/index.d.ts +0 -72
  380. package/dist/domain/entities/index.js +0 -119
  381. package/dist/domain/entities/index.js.map +0 -1
  382. package/dist/domain/interfaces.d.ts +0 -224
  383. package/dist/domain/interfaces.js +0 -3
  384. package/dist/domain/interfaces.js.map +0 -1
  385. package/dist/domain/services/adr.service.d.ts +0 -50
  386. package/dist/domain/services/adr.service.js +0 -125
  387. package/dist/domain/services/adr.service.js.map +0 -1
  388. package/dist/domain/services/adr.service.spec.d.ts +0 -1
  389. package/dist/domain/services/adr.service.spec.js +0 -141
  390. package/dist/domain/services/adr.service.spec.js.map +0 -1
  391. package/dist/domain/services/agent-registry.service.js.map +0 -1
  392. package/dist/domain/services/agent-registry.service.spec.d.ts +0 -1
  393. package/dist/domain/services/agent-registry.service.spec.js +0 -162
  394. package/dist/domain/services/agent-registry.service.spec.js.map +0 -1
  395. package/dist/domain/services/index.d.ts +0 -33
  396. package/dist/domain/services/index.js +0 -126
  397. package/dist/domain/services/index.js.map +0 -1
  398. package/dist/domain/services/services.test.d.ts +0 -1
  399. package/dist/domain/services/services.test.js +0 -236
  400. package/dist/domain/services/services.test.js.map +0 -1
  401. package/dist/domain/services/standards.service.d.ts +0 -47
  402. package/dist/domain/services/standards.service.js +0 -129
  403. package/dist/domain/services/standards.service.js.map +0 -1
  404. package/dist/domain/services/standards.service.spec.d.ts +0 -1
  405. package/dist/domain/services/standards.service.spec.js +0 -140
  406. package/dist/domain/services/standards.service.spec.js.map +0 -1
  407. package/dist/domain/services/tool-usage-telemetry.service.js.map +0 -1
  408. package/dist/domain/services/tool-usage-telemetry.service.spec.d.ts +0 -1
  409. package/dist/domain/services/tool-usage-telemetry.service.spec.js +0 -180
  410. package/dist/domain/services/tool-usage-telemetry.service.spec.js.map +0 -1
  411. package/dist/infrastructure/catalog/catalog-loader.test.d.ts +0 -1
  412. package/dist/infrastructure/catalog/catalog-loader.test.js +0 -184
  413. package/dist/infrastructure/catalog/catalog-loader.test.js.map +0 -1
  414. package/dist/infrastructure/cli/command-executor.test.d.ts +0 -1
  415. package/dist/infrastructure/cli/command-executor.test.js +0 -98
  416. package/dist/infrastructure/cli/command-executor.test.js.map +0 -1
  417. package/dist/infrastructure/formatters/output-formatter.service.spec.d.ts +0 -1
  418. package/dist/infrastructure/formatters/output-formatter.service.spec.js +0 -164
  419. package/dist/infrastructure/formatters/output-formatter.service.spec.js.map +0 -1
  420. package/dist/test/mocks/index.d.ts +0 -44
  421. package/dist/test/mocks/index.js +0 -135
  422. package/dist/test/mocks/index.js.map +0 -1
  423. /package/dist/{core → infrastructure}/observability/command-watcher.d.ts +0 -0
  424. /package/dist/{core → infrastructure}/observability/error-reporter.d.ts +0 -0
  425. /package/dist/{core → infrastructure}/observability/structured-logger.d.ts +0 -0
  426. /package/dist/{core → infrastructure}/observability/structured-logger.js +0 -0
  427. /package/dist/{core → infrastructure}/observability/timing.d.ts +0 -0
  428. /package/dist/{core → infrastructure}/observability/timing.js +0 -0
  429. /package/dist/{domain/services → infrastructure/observability}/tool-usage-telemetry.service.d.ts +0 -0
  430. /package/dist/{domain/services → infrastructure/observability}/tool-usage-telemetry.service.js +0 -0
  431. /package/dist/{core/abstractions → infrastructure}/providers/config-parser.provider.js +0 -0
  432. /package/dist/{core/abstractions → infrastructure}/providers/logger.provider.js +0 -0
package/README.md CHANGED
@@ -1,187 +1,882 @@
1
- # Evolith CLI
1
+ # @evolith/smart-cli
2
2
 
3
- Command-line interface for Evolith governance, standards validation, and AI agent integration.
3
+ Command-line interface for Evolith governance, standards validation, architecture scaffolding, SDLC lifecycle management, and AI agent integration.
4
4
 
5
- ## Features
5
+ ## Overview
6
6
 
7
- - **Governance**: ADR management, standards tracking, agent installation
8
- - **Validation**: Repository compliance against Evolith standards
9
- - **AI Integration**: MCP server for AI agent tool calling
10
- - **Observability**: Structured logging, metrics, error reporting
7
+ SmartCLI is the primary entry point to the Evolith ecosystem. It connects three layers:
11
8
 
12
- ## Installation
9
+ ```
10
+ satellite repository
11
+
12
+
13
+ smart-cli ──────── evolith.yaml (configuration)
14
+
15
+ ├── Evolith Core (rulesets, ADRs, standards, gate evidence)
16
+
17
+ └── MCP Server ──── AI Agents (Cursor, Claude Desktop, custom)
18
+ ```
19
+
20
+ ## Supported Architectures
13
21
 
14
- ### npm (Recommended)
22
+ Evolith Core defines **8 architecture topologies** across complementary dimensions. Any command that accepts `--topology` references them by their canonical id:
23
+
24
+ | Topology (id) | Name | Dimension |
25
+ |---------------|------|-----------|
26
+ | `modular-monolith` | Modular Monolith | progressive-axis |
27
+ | `distributed-modules` | Distributed Modules | progressive-axis |
28
+ | `microservices` | Microservices | progressive-axis |
29
+ | `serverless` | Serverless | execution |
30
+ | `edge-computing` | Edge Computing | execution |
31
+ | `event-driven` | Event-Driven | integration |
32
+ | `data-mesh` | Data Mesh | data |
33
+ | `agentic-ai` | Agentic AI | ai |
34
+
35
+ The **progressive axis** (`modular-monolith → distributed-modules → microservices`) is a linear maturity progression managed by the `upgrade` command. The other dimensions (execution, integration, data, ai) are complementary and chosen per project needs. Use `--topology <id>` with the canonical ids above.
36
+
37
+ ## Installation
15
38
 
16
39
  ```bash
17
40
  npm install -g @evolith/smart-cli
18
41
  ```
19
42
 
20
- ### Manual
43
+ ```bash
44
+ pnpm add -g @evolith/smart-cli
45
+ ```
46
+
47
+ ```bash
48
+ yarn global add @evolith/smart-cli
49
+ ```
21
50
 
22
- Download the latest binary from [GitHub Releases](https://github.com/beyondnetcode/evolith_arch32/releases) and add to your PATH.
51
+ Or download the binary from [GitHub Releases](https://github.com/beyondnetcode/evolith_arch32/releases) and add it to your PATH.
23
52
 
24
- ### Verify Installation
53
+ ### Verify
25
54
 
26
55
  ```bash
27
56
  smart-cli --version
28
- # smart-cli version 0.0.1-beta
57
+ # 0.0.1
29
58
  ```
30
59
 
31
- ## Quickstart
60
+ ### Troubleshooting
32
61
 
33
- ### 1. Initialize a Repository
62
+ **EACCES on macOS/Linux:**
63
+ ```bash
64
+ sudo npm install -g @evolith/smart-cli --unsafe-perm
65
+ ```
34
66
 
67
+ **nvm — binary not found after install:**
35
68
  ```bash
36
- cd your-project
37
- smart-cli init
69
+ export PATH=$(npm config get prefix)/bin:$PATH
38
70
  ```
39
71
 
40
- This creates an `evolith.yaml` file with default configuration.
72
+ **`WORKSPACE_ROOT` (optional):** the CLI ships a built-in default SDLC workflow, so it runs without any environment setup. Set `WORKSPACE_ROOT` to a checkout root only when you want to override the workflow/rulesets from disk (`$WORKSPACE_ROOT/rulesets/sdlc/default-workflow.yaml`).
41
73
 
42
- ### 2. Run First Validation
74
+ ### Environment variables
75
+
76
+ The CLI runs with zero configuration. The following variables are optional overrides. Those marked *(MCP)* are read by the standalone `@evolith/mcp-server` (the `evolith-mcp serve` binary).
77
+
78
+ | Variable | Read by | Purpose |
79
+ |---|---|---|
80
+ | `EVOLITH_PROFILE` | CLI | Selects the active named profile (per-environment defaults) instead of `default`. |
81
+ | `EVOLITH_API_KEY` | CLI / MCP | API key for the MCP HTTP transport (equivalent to `--api-key`); required in production HTTP mode. |
82
+ | `PORT` | CLI / MCP | Default HTTP port for `evolith-mcp serve --transport http` when `--port` is omitted (default `3000`). |
83
+ | `OTEL_ENABLED` | CLI | When `true`, enables OpenTelemetry tracing export from the CLI. |
84
+ | `WORKSPACE_ROOT` | Core | Checkout root for overriding the bundled workflow/rulesets from disk (see above). |
85
+ | `MCP_HTTP_HOST` *(MCP)* | MCP | Bind host for the HTTP transport (default `0.0.0.0`; set `127.0.0.1` for local-only). |
86
+ | `JWT_SECRET` *(MCP)* | MCP | HS256 secret enabling optional JWT bearer auth on the HTTP transport. |
87
+ | `LOG_LEVEL` *(MCP)* | MCP | Log verbosity for the MCP server (default `info`). |
88
+ | `NODE_ENV` *(MCP)* | MCP | `production` forces fail-closed auth/policy behavior in the MCP server. |
89
+
90
+ ## Quickstart
43
91
 
44
92
  ```bash
93
+ # 1. Seed a demo project to explore the CLI
94
+ smart-cli fixtures --type demo
95
+
96
+ # 2. Initialize a real repository
97
+ smart-cli init
98
+
99
+ # 3. Scaffold base documentation
100
+ smart-cli docs
101
+
102
+ # 4. Validate compliance
45
103
  smart-cli validate
104
+
105
+ # 5. Scaffold architecture
106
+ smart-cli scaffold --phase 1
107
+
108
+ # 6. Connect an AI agent (standalone MCP server)
109
+ evolith-mcp serve
46
110
  ```
47
111
 
48
- Output:
112
+ ---
113
+
114
+ ## Commands
115
+
116
+ ### init
117
+
118
+ Initializes a satellite repository with interactive tool selection. Creates `evolith.yaml` and the project structure.
119
+
120
+ ```bash
121
+ smart-cli init [options]
122
+
123
+ Options:
124
+ -d, --dry-run Run without writing files
125
+ -c, --config <path> Path to evolith.setup.json for batch mode
126
+ -r, --runtime <id> Runtime: nodejs, dotnet, python
127
+ -m, --monorepo <id> Monorepo strategy: none, nx, npm-workspaces, rush
128
+ -a, --arch <id> Architecture pattern: clean, hexagonal, ddd
129
+ --db <id> Database: postgresql, mongodb, sqlserver
49
130
  ```
50
- ✓ Validating repository...
51
- ✓ Repository is compliant with Evolith standards
131
+
132
+ **Examples:**
133
+
134
+ ```bash
135
+ # Interactive wizard
136
+ smart-cli init
137
+
138
+ # Batch mode (non-interactive)
139
+ smart-cli init --config evolith.setup.json
140
+
141
+ # Preview without writing
142
+ smart-cli init --dry-run
52
143
  ```
53
144
 
54
- ### 3. Install an Agent
145
+ After `init` completes, the CLI prints suggested next steps including `validate`, `agents --install`, and `sdlc handoff`.
146
+
147
+ ---
148
+
149
+ ### init-wizard
150
+
151
+ A fully guided, step-by-step alternative to `init` that walks through project name, runtime, monorepo strategy, and architecture pattern with interactive prompts. Use it for a first-time, hand-held setup; use `init` (with flags or `--config`) for scripted or non-interactive runs.
55
152
 
56
153
  ```bash
57
- smart-cli agents install
58
- # Select "standard" template when prompted
154
+ smart-cli init-wizard [options]
155
+
156
+ Options:
157
+ --no-wizard Fall back to the standard init flow instead of the wizard
158
+ --no-interactive Run in non-interactive mode (CI/automation)
59
159
  ```
60
160
 
61
- ## Commands
161
+ ---
162
+
163
+ ### docs
164
+
165
+ Scaffolds the base documentation files required by Evolith in the current directory.
166
+
167
+ Files created by default:
168
+ - `README.md` — project overview template
169
+ - `AGENTS.md` — AI agent configuration and rules
170
+ - `MASTER_INDEX.md` — documentation index
171
+ - `.evolith/evolith.yaml` — Evolith configuration
172
+
173
+ ```bash
174
+ smart-cli docs [options]
175
+
176
+ Options:
177
+ -d, --dry-run Preview files without writing
178
+ -f, --force Overwrite existing files
179
+ -t, --template <type> Template type: default (all 4 files), minimal (README + AGENTS only)
180
+ --format <format> Output format: json (ADR-0073 envelope) or human (default)
181
+ ```
182
+
183
+ **Examples:**
184
+
185
+ ```bash
186
+ # Scaffold all documentation
187
+ smart-cli docs
188
+
189
+ # Preview what would be created
190
+ smart-cli docs --dry-run
191
+
192
+ # Minimal scaffold
193
+ smart-cli docs --template minimal
194
+
195
+ # Force overwrite and emit JSON envelope
196
+ smart-cli docs --force --format json
197
+ ```
198
+
199
+ ---
62
200
 
63
201
  ### validate
64
202
 
65
- Validate repository compliance against Evolith standards.
203
+ Validates repository compliance against Evolith standards. Supports multiple engines, rulesets, topologies, and SDLC phases.
66
204
 
67
205
  ```bash
68
206
  smart-cli validate [options]
69
207
 
70
208
  Options:
71
- --satellite <path> Path to satellite repository (default: cwd)
72
- --core <path> Path to Evolith Core
73
- --format <format> Output format: json, table, yaml, markdown
74
- --output <file> Write output to file
75
- --ruleset <id> Validate specific ruleset (acl, open-core, inheritance)
209
+ -s, --satellite <path> Satellite repository path (default: cwd)
210
+ -c, --core <path> Evolith Core path (default: auto-detect)
211
+ -f, --format <format> Output format: json, table, yaml, markdown (default: markdown)
212
+ -o, --output <file> Write output to file
213
+ -r, --ruleset <id> Validate a specific ruleset (see table below)
214
+ -e, --engine <engine> Validation engine: native (default) or opa
215
+ -t, --topology <id> Topology to validate by canonical id, e.g. modular-monolith,
216
+ microservices, serverless, event-driven, agentic-ai (repeatable).
217
+ -m, --manifest <path> SatelliteManifest JSON for end-to-end evaluation (GT-281 pipeline)
218
+ -p, --phase <phase> SDLC phase to evaluate: discovery, design, construction, qa, release (activates GT-281 pipeline)
219
+ --adr <id> Validate against a specific ADR rule set
220
+ --file <path> Validate a single file (ad-hoc mode)
221
+ --composable Use the composable GT-312 engine with intelligent mode resolution
76
222
  ```
77
223
 
224
+ **Available rulesets (`--ruleset`):**
225
+
226
+ | ID | Validates |
227
+ |----|-----------|
228
+ | `acl` | Access control layer rules |
229
+ | `open-core` | Open-core module boundaries |
230
+ | `inheritance` | Inheritance and extension contracts |
231
+ | `cli-release` | CLI release readiness |
232
+ | `cli-parity` | CLI command parity between versions |
233
+ | `evidence` | Gate evidence artifact completeness |
234
+ | `mcp` | MCP server contract compliance |
235
+ | `observability` | Logging, metrics, and tracing coverage |
236
+ | `adr-0002` | ADR-0002 specific rules |
237
+
238
+ The `rulesets` enum in `reference/config/evolith.config.schema.json` additionally recognizes: `satellite-contracts`, `executive-scorecards`, `compliance-baseline`, `definition-of-done`, `engineering-manifesto`, `repository-taxonomy`, `phase-gates`, `quality-thresholds`, and `dependency-pinning`. These are valid configuration values even though the common `--ruleset` shortcuts above cover the day-to-day set.
239
+
240
+ **Available ADR rules (`--adr`):** `adr-0002`, `adr-0005`, `adr-0010`, `adr-0018`, `adr-0032`, `adr-0040`, `adr-0050`
241
+
242
+ **Validation engines:**
243
+ - `native` — built-in TypeScript engine (default, no external dependencies)
244
+ - `opa` — Open Policy Agent WebAssembly modules
245
+
246
+ **Composable engine (GT-312):**
247
+ When `--composable` is set, the CLI auto-resolves which validation modes to activate based on the provided context:
248
+ - `SdlcValidationMode` — activated when `--phase` is present
249
+ - `ArchitectureValidationMode` — activated when `--topology` is present
250
+ - `RulesetValidationMode` — activated when `--ruleset` is present
251
+ - `AdrValidationMode` — activated when `--adr` is present
252
+ - `AdhocValidationMode` — activated when `--file` is present
253
+
254
+ **Exit codes:** `validate` exits `0` when the repository passes (including `warning` status) and `1` when the result status is `failed`. The `gate`, `phase advance`, and `scaffold` commands likewise exit `1` on failure, and any unhandled error during CLI startup exits `1`. This makes the CLI safe to gate CI pipelines on. In `--format json`, the failure detail is carried in the ADR-0073 envelope rather than printed as prose.
255
+
78
256
  **Examples:**
79
257
 
80
258
  ```bash
81
- # Basic validation
259
+ # Basic compliance check
82
260
  smart-cli validate
83
261
 
84
- # JSON output for automation
85
- smart-cli validate --format json
262
+ # JSON output for CI
263
+ smart-cli validate --format json --output report.json
86
264
 
87
- # Table output for humans
88
- smart-cli validate --format table
265
+ # Validate a single topology
266
+ smart-cli validate --topology microservices
267
+
268
+ # Validate multiple topologies
269
+ smart-cli validate --topology modular-monolith --topology event-driven
270
+
271
+ # Validate a specific ruleset
272
+ smart-cli validate --ruleset evidence
89
273
 
90
- # Validate specific ruleset
91
- smart-cli validate --ruleset acl
274
+ # Full SDLC phase evaluation (GT-281 pipeline)
275
+ smart-cli validate --phase discovery
276
+
277
+ # Validate with a SatelliteManifest
278
+ smart-cli validate --manifest ./satellite-manifest.json --phase design
279
+
280
+ # Ad-hoc file validation
281
+ smart-cli validate --file src/domain/user.entity.ts --composable
282
+
283
+ # OPA engine
284
+ smart-cli validate --engine opa --ruleset acl
92
285
  ```
93
286
 
287
+ ---
288
+
94
289
  ### adr
95
290
 
96
- Manage Architecture Decision Records.
291
+ Manages Architecture Decision Records.
97
292
 
98
293
  ```bash
99
- smart-cli adr <command>
294
+ smart-cli adr [options]
100
295
 
101
- Commands:
102
- create Create new ADR
103
- list List all ADRs
104
- get Show ADR details
105
- update Update existing ADR
106
- matrix Show ADR matrix
296
+ Options:
297
+ -c, --create Create a new ADR (interactive)
298
+ -l, --list List all ADRs
299
+ -g, --get <id> Show a specific ADR
300
+ -u, --update <id> Update ADR status
301
+ -s, --status <status> New status: Accepted, Deprecated, Superseded, Amended
302
+ -r, --reason <text> Reason for status change
303
+ -m, --matrix Show ADR matrix summary
304
+ -d, --dry-run Preview without writing files
107
305
  ```
108
306
 
109
307
  **Examples:**
110
308
 
111
309
  ```bash
112
- # Create new ADR
113
- smart-cli adr create
310
+ # Interactive creation
311
+ smart-cli adr --create
312
+
313
+ # List all
314
+ smart-cli adr --list
315
+
316
+ # Show specific ADR
317
+ smart-cli adr --get ADR-0002
114
318
 
115
- # List all ADRs
116
- smart-cli adr list
319
+ # Update status
320
+ smart-cli adr --update ADR-0005 --status Accepted --reason "Approved in design review"
117
321
 
118
- # Get specific ADR
119
- smart-cli adr get ADR-0002
322
+ # Show matrix
323
+ smart-cli adr --matrix
120
324
  ```
121
325
 
326
+ ---
327
+
122
328
  ### standards
123
329
 
124
- Manage governance standards.
330
+ Manages Evolith governance standards (architecture, governance, operations).
125
331
 
126
332
  ```bash
127
- smart-cli standards <command>
333
+ smart-cli standards [options]
128
334
 
129
- Commands:
130
- init Initialize standards directory
131
- list List all standards
132
- get Show standard details
133
- validate Validate against standards
134
- export Export standard to markdown/json
335
+ Options:
336
+ --init Initialize standards directory structure
337
+ -l, --list List all standards
338
+ -g, --get <id> Show a specific standard
339
+ -v, --validate <code> Validate code against standards
340
+ -e, --export <id> Export a standard
341
+ -f, --format <format> Export format: markdown, json
342
+ -c, --category <id> Filter by category
135
343
  ```
136
344
 
137
345
  **Examples:**
138
346
 
139
347
  ```bash
140
- # Initialize standards
141
- smart-cli standards init
348
+ # Initialize
349
+ smart-cli standards --init
350
+
351
+ # List all standards
352
+ smart-cli standards --list
142
353
 
143
- # List standards
144
- smart-cli standards list
354
+ # Filter by category
355
+ smart-cli standards --list --category governance
356
+
357
+ # Export as markdown
358
+ smart-cli standards --export STD-001 --format markdown
145
359
  ```
146
360
 
361
+ ---
362
+
147
363
  ### agents
148
364
 
149
- Install and manage Evolith agents.
365
+ Manages Evolith BMAD agents — installs, lists, and removes governance agents in the satellite repository.
150
366
 
151
367
  ```bash
152
- smart-cli agents <command>
368
+ smart-cli agents [options]
153
369
 
154
- Commands:
155
- install Install new agent
156
- list List installed agents
157
- remove Remove agent
158
- validate Validate agent ruleset
159
- upgrade Upgrade agent
370
+ Options:
371
+ -l, --list List installed agents
372
+ -i, --install [name] Install a named agent (interactive if name omitted)
373
+ -r, --remove [name] Remove an installed agent
374
+ -d, --dry-run Preview without making changes
160
375
  ```
161
376
 
377
+ **Available agent templates:**
378
+
379
+ | Template | Description |
380
+ |---|---|
381
+ | `standard` | Default agent with basic governance rules (ACL-01 through ACL-06) |
382
+ | `minimal` | Lightweight agent with essential rules only |
383
+ | `full-compliance` | Full compliance agent with audit trail and approval chains |
384
+
162
385
  **Examples:**
163
386
 
164
387
  ```bash
388
+ # List installed agents
389
+ smart-cli agents --list
390
+
165
391
  # Interactive install
166
- smart-cli agents install
392
+ smart-cli agents --install
393
+
394
+ # Install a specific template
395
+ smart-cli agents --install standard
396
+ smart-cli agents --install full-compliance
397
+
398
+ # Preview install without writing
399
+ smart-cli agents --install standard --dry-run
400
+
401
+ # Remove an agent
402
+ smart-cli agents --remove minimal
403
+ ```
404
+
405
+ ---
406
+
407
+ ### scaffold
408
+
409
+ Scaffolds the Evolith architecture in the current workspace **along the progressive axis** — phase 1 (`modular-monolith`), phase 2 (`distributed-modules`) and phase 3 (`microservices`). Phases 2–3 are generated as a Module Federation host + remotes (microfrontends), with configurable frontend frameworks, ORMs, and domain names. (`F1/F2/F3` remain accepted as legacy aliases for phases 1/2/3.)
410
+
411
+ ```bash
412
+ smart-cli scaffold [options]
413
+
414
+ Options:
415
+ --frontend <framework> Frontend framework: react, angular
416
+ --orm <orm> ORM: prisma, typeorm
417
+ -d, --dry-run Preview without writing files
418
+ -f, --format <format> Output format: json (ADR-0073 envelope) or human (default)
419
+ --phase <phase> Architecture phase: 1 (F1), 2 (F2), 3 (F3) — required with --format json
420
+ --api-name <name> Backend API app name (default: tracker-api)
421
+ --web-app-name <name> Web app name for phase 1 (default: tracker-web)
422
+ --host-name <name> Host app name for phase 2/3 (default: tracker-host)
423
+ --remotes <names> Comma-separated remote names for phase 2/3
424
+ --domains <names> Comma-separated domain names to generate
425
+ ```
426
+
427
+ **Examples:**
428
+
429
+ ```bash
430
+ # Scaffold F1 (Monolithic Modular) interactively
431
+ smart-cli scaffold
432
+
433
+ # Scaffold F1 with React + Prisma, dry run
434
+ smart-cli scaffold --phase 1 --frontend react --orm prisma --dry-run
435
+
436
+ # Scaffold F2 (Microfrontend) with custom names
437
+ smart-cli scaffold --phase 2 --host-name shell-app --remotes catalog,checkout
438
+
439
+ # Scaffold F3 with custom domains and JSON output
440
+ smart-cli scaffold --phase 3 --domains orders,payments,users --format json
441
+
442
+ # Generate specific domains only
443
+ smart-cli scaffold --domains auth,notifications
444
+ ```
445
+
446
+ ---
447
+
448
+ ### drift
449
+
450
+ Detects architecture drift between the declared topology level and the actual codebase structure. Stores history for trend analysis.
451
+
452
+ ```bash
453
+ smart-cli drift [options]
454
+
455
+ Options:
456
+ -p, --path <path> Project path to analyze (default: cwd)
457
+ -l, --level <level> Declared architecture level: F1, F2, F3
458
+ --json Output as raw JSON
459
+ --history Show drift scan history (last 10 scans)
460
+ --trend Show drift trend analysis (improving / stable / degrading)
461
+ -f, --format <fmt> Output format: json (ADR-0073 envelope) or human (default)
462
+ ```
463
+
464
+ The drift report includes:
465
+ - **Declared level** vs **detected level**
466
+ - **Overall score** (0–100%)
467
+ - **Drift severity**: critical, high, medium, low, none
468
+ - **New violations** — introduced since last scan
469
+ - **Persistent violations** — unresolved across multiple scans
470
+ - **Resolved violations** — fixed since last scan
471
+
472
+ **Examples:**
473
+
474
+ ```bash
475
+ # Detect drift (auto-detects declared level from evolith.yaml)
476
+ smart-cli drift
477
+
478
+ # Specify declared level explicitly
479
+ smart-cli drift --level F2
480
+
481
+ # Analyze a different project path
482
+ smart-cli drift --path ../my-satellite
483
+
484
+ # Show historical scans
485
+ smart-cli drift --history
486
+
487
+ # Show trend (requires at least 2 prior scans)
488
+ smart-cli drift --trend
489
+
490
+ # JSON output for CI
491
+ smart-cli drift --format json
492
+ ```
493
+
494
+ ---
495
+
496
+ ### gate
497
+
498
+ Evaluates SDLC phase gates and emits ADR-0073 `GateEvidence` artifacts. Supports webhook delivery and multi-actor contexts.
499
+
500
+ ```bash
501
+ smart-cli gate <action> [options]
502
+
503
+ Actions:
504
+ evaluate Evaluate gates for the specified phase
505
+
506
+ Options:
507
+ -p, --phase <phase> SDLC phase: discovery, design, construction, qa, release
508
+ --project <path> Satellite project path (default: cwd)
509
+ -c, --core <path> Evolith Core path (default: auto-detect)
510
+ -f, --format <format> Output format: json (ADR-0073 envelope) or human (default)
511
+ --evaluated-by <actor> Actor class: human (default), agent, ci
512
+ --initiative <id> Initiative context — echoed in meta.context
513
+ --tenant <id> Tenant context — echoed in meta.context
514
+ --webhook-url <url> POST gate evidence to this URL upon completion
515
+ ```
516
+
517
+ **Examples:**
518
+
519
+ ```bash
520
+ # Evaluate design phase gates
521
+ smart-cli gate evaluate --phase design
522
+
523
+ # CI evaluation with JSON output
524
+ smart-cli gate evaluate --phase construction --evaluated-by ci --format json
525
+
526
+ # Agent-driven evaluation with webhook delivery
527
+ smart-cli gate evaluate --phase qa --evaluated-by agent --webhook-url https://ci.example.com/hooks/evolith
528
+
529
+ # Multi-tenant context
530
+ smart-cli gate evaluate --phase release --tenant acme --initiative Q3-launch
531
+ ```
532
+
533
+ ---
534
+
535
+ ### phase
536
+
537
+ Proposes a phase transition between SDLC phases. Emits a transition proposal artifact.
538
+
539
+ ```bash
540
+ smart-cli phase advance [options]
541
+
542
+ Options:
543
+ --from <phase> Current SDLC phase
544
+ --to <phase> Target SDLC phase
545
+ --project <path> Satellite project path (default: cwd)
546
+ -c, --core <path> Evolith Core path (default: auto-detect)
547
+ -f, --format <format> Output format: json (ADR-0073 envelope) or human (default)
548
+ --evaluated-by <actor> Actor class: human, agent (default), ci
549
+ --initiative <id> Initiative context — echoed in meta.context
550
+ --tenant <id> Tenant context — echoed in meta.context
551
+ --webhook-url <url> POST the transition proposal to this URL
552
+ ```
553
+
554
+ **Examples:**
555
+
556
+ ```bash
557
+ # Propose advancing from design to construction
558
+ smart-cli phase advance --from design --to construction
559
+
560
+ # Agent-driven with JSON output
561
+ smart-cli phase advance --from construction --to qa --evaluated-by agent --format json
562
+
563
+ # With webhook and tenant context
564
+ smart-cli phase advance --from qa --to release --webhook-url https://ci.example.com/hooks/evolith --tenant acme
565
+ ```
566
+
567
+ ---
568
+
569
+ ### sdlc
570
+
571
+ Parent command that orchestrates SDLC artifacts and lifecycle transitions. Run without a subcommand to see available subcommands.
572
+
573
+ ```bash
574
+ smart-cli sdlc <subcommand>
575
+
576
+ Subcommands:
577
+ handoff Transition artifacts between phases with interactive guided flow
578
+ generate Generate Hexagonal Architecture scaffold from a DDD model file
579
+ gate-status Display phase gate validation status and DORA metrics
580
+ ```
581
+
582
+ #### sdlc handoff
583
+
584
+ Guides an interactive phase transition, validates gates, and generates evidence artifacts.
585
+
586
+ ```bash
587
+ smart-cli sdlc handoff [options]
588
+
589
+ Options:
590
+ -f, --from <phase> Source phase (phase-0, phase-1, etc.)
591
+ -t, --to <phase> Target phase (phase-0, phase-1, etc.)
592
+ -a, --artifacts Generate evidence artifacts
593
+ --validate Validate phase gates before handoff
594
+ --force Force handoff even if gates fail
595
+ ```
596
+
597
+ **Examples:**
598
+
599
+ ```bash
600
+ # Interactive handoff wizard
601
+ smart-cli sdlc handoff
602
+
603
+ # Handoff from phase-0 to phase-1 with gate validation
604
+ smart-cli sdlc handoff --from phase-0 --to phase-1 --validate
605
+
606
+ # Generate artifacts and force even if gates fail
607
+ smart-cli sdlc handoff --from phase-1 --to phase-2 --artifacts --force
608
+ ```
609
+
610
+ #### sdlc generate
611
+
612
+ Generates a complete Hexagonal Architecture scaffold by reading a Mermaid `classDiagram` from a Markdown DDD model file.
613
+
614
+ ```bash
615
+ smart-cli sdlc generate [options]
616
+
617
+ Options:
618
+ -f, --from <path> Path to the Markdown file containing the Mermaid classDiagram
619
+ -o, --output <dir> Target directory for generated files (default: cwd)
620
+ --dry-run Print what would be generated without writing files
621
+ ```
622
+
623
+ **Examples:**
624
+
625
+ ```bash
626
+ # Generate from a DDD model file
627
+ smart-cli sdlc generate --from docs/domain-model.md
628
+
629
+ # Preview without writing
630
+ smart-cli sdlc generate --from docs/domain-model.md --dry-run
631
+
632
+ # Output to a specific directory
633
+ smart-cli sdlc generate --from docs/domain-model.md --output src/domain
634
+ ```
635
+
636
+ The input file must contain a fenced Mermaid block with a `classDiagram`. The generator creates entities, value objects, repositories, use cases, and ports following hexagonal architecture conventions.
637
+
638
+ #### sdlc gate-status
639
+
640
+ Displays the current SDLC phase gate validation status along with DORA metrics calculated from git history.
167
641
 
168
- # List agents
169
- smart-cli agents list
642
+ ```bash
643
+ smart-cli sdlc gate-status [options]
644
+
645
+ Options:
646
+ --since <days> Days of git history to analyze for DORA metrics (default: 90)
647
+ ```
648
+
649
+ DORA metrics reported:
650
+ - **Deployment Frequency** — how often the team deploys to production
651
+ - **Lead Time for Changes** — time from commit to production
652
+ - **Change Failure Rate** — percentage of deployments causing failures
653
+ - **Time to Restore** — time to recover from a production failure
654
+
655
+ **Examples:**
656
+
657
+ ```bash
658
+ # Current gate status with 90-day DORA window
659
+ smart-cli sdlc gate-status
660
+
661
+ # Analyze last 30 days only
662
+ smart-cli sdlc gate-status --since 30
663
+ ```
664
+
665
+ ---
666
+
667
+ ### profile
668
+
669
+ Manages named CLI profiles. Each profile stores a set of defaults (satellite path, core path, tenant, initiative) that are applied automatically to subsequent commands.
670
+
671
+ ```bash
672
+ smart-cli profile <action> [options]
673
+
674
+ Actions:
675
+ current Show the active profile
676
+ list List all profiles
677
+ create Create a new profile
678
+ switch Switch to a named profile
679
+ delete Delete a profile
680
+
681
+ Options:
682
+ -n, --name <name> Profile name (used with create and switch)
683
+ ```
684
+
685
+ **Examples:**
686
+
687
+ ```bash
688
+ # Show current profile
689
+ smart-cli profile current
690
+
691
+ # List all profiles
692
+ smart-cli profile list
693
+
694
+ # Create a profile interactively
695
+ smart-cli profile create
696
+
697
+ # Create with a name
698
+ smart-cli profile create --name staging
699
+
700
+ # Switch profile
701
+ smart-cli profile switch --name staging
702
+
703
+ # Delete a profile
704
+ smart-cli profile delete --name staging
705
+ ```
706
+
707
+ ---
708
+
709
+ ### fixtures
710
+
711
+ Seeds reproducible fixture files for demos, tests, and onboarding. The first step recommended in any new environment.
712
+
713
+ ```bash
714
+ smart-cli fixtures [type] [options]
715
+
716
+ Arguments:
717
+ type Fixture type (default: demo)
718
+
719
+ Options:
720
+ -d, --dir <directory> Target directory (default: cwd)
721
+ -n, --dry-run Preview files without writing
722
+ -t, --type <type> Fixture type: demo, adr, ruleset, evolith, full
723
+ ```
724
+
725
+ **Fixture types:**
726
+
727
+ | Type | Contents |
728
+ |------|----------|
729
+ | `demo` | Sample project with evolith.yaml and demo structure |
730
+ | `adr` | Pre-populated ADR entries |
731
+ | `ruleset` | Example rulesets (domain, naming, file conventions) |
732
+ | `evolith` | Full Evolith configuration files |
733
+ | `full` | All of the above combined |
734
+
735
+ **Examples:**
736
+
737
+ ```bash
738
+ # Seed a demo project (fastest way to explore the CLI)
739
+ smart-cli fixtures --type demo
740
+
741
+ # Preview what would be created
742
+ smart-cli fixtures --type full --dry-run
743
+
744
+ # Seed ADR fixtures into a specific directory
745
+ smart-cli fixtures --type adr --dir ./reference/core/architecture/adrs
746
+ ```
747
+
748
+ ---
749
+
750
+ ### api
751
+
752
+ Browses and inspects the Evolith API surface: MCP tools, resources, schemas, and CLI commands.
753
+
754
+ ```bash
755
+ smart-cli api [options]
756
+
757
+ Options:
758
+ -l, --list List all available API operations
759
+ -i, --inspect <name> Inspect a specific operation, resource, or command
760
+ -c, --category <category> Filter by category: tools, resources, schemas, commands
761
+ ```
762
+
763
+ **Examples:**
764
+
765
+ ```bash
766
+ # List everything
767
+ smart-cli api --list
768
+
769
+ # Filter MCP tools only
770
+ smart-cli api --list --category tools
771
+
772
+ # Inspect a specific tool
773
+ smart-cli api --inspect evolith-validate
774
+
775
+ # Inspect a CLI command schema
776
+ smart-cli api --inspect validate --category commands
777
+ ```
778
+
779
+ ---
780
+
781
+ ### update
782
+
783
+ Checks for and applies CLI updates.
784
+
785
+ ```bash
786
+ smart-cli update [options]
787
+
788
+ Options:
789
+ -c, --current Show the current installed CLI version
790
+ --check Check for available updates without installing
791
+ -i, --install Install the latest available version
792
+ ```
793
+
794
+ **Examples:**
795
+
796
+ ```bash
797
+ # Show current version
798
+ smart-cli update --current
799
+
800
+ # Check for updates
801
+ smart-cli update --check
802
+
803
+ # Install latest
804
+ smart-cli update --install
805
+ ```
806
+
807
+ ---
808
+
809
+ ### upgrade
810
+
811
+ Upgrades a satellite repository to the next progressive-axis topology or governance version.
812
+
813
+ ```bash
814
+ smart-cli upgrade [options]
815
+
816
+ Options:
817
+ --dry-run Simulate the upgrade without making changes
818
+ --target <target> Target governance version or topology (e.g., F2, 1.1.0)
819
+ --force Skip eligibility checks
820
+ ```
821
+
822
+ **Examples:**
823
+
824
+ ```bash
825
+ # Preview upgrade to the next topology
826
+ smart-cli upgrade --dry-run
827
+
828
+ # Upgrade to F2
829
+ smart-cli upgrade --target F2
830
+
831
+ # Force upgrade ignoring eligibility checks
832
+ smart-cli upgrade --target F3 --force
833
+ ```
834
+
835
+ ---
836
+
837
+ ### alias
838
+
839
+ Manages shorthand aliases for CLI commands.
840
+
841
+ ```bash
842
+ smart-cli alias [options]
843
+
844
+ Options:
845
+ --add <alias=command> Add a new alias (format: name=command)
846
+ --remove <alias> Remove an alias
847
+ --list List all aliases
170
848
  ```
171
849
 
850
+ **Examples:**
851
+
852
+ ```bash
853
+ # Add an alias
854
+ smart-cli alias --add "v=validate --format table"
855
+
856
+ # List aliases
857
+ smart-cli alias --list
858
+
859
+ # Remove an alias
860
+ smart-cli alias --remove v
861
+ ```
862
+
863
+ ---
864
+
172
865
  ### history
173
866
 
174
- View and manage command history.
867
+ Views and manages CLI command execution history.
175
868
 
176
869
  ```bash
177
870
  smart-cli history [options]
178
871
 
179
872
  Options:
180
- --list List recent commands
181
- --get <id> Show command details
182
- --search <query> Search commands
183
- --stats Show statistics
184
- --clear Clear history
873
+ -l, --list List recent commands
874
+ -g, --get <id> Show command details by ID
875
+ -s, --search <query> Search history
876
+ --stats Show history statistics
877
+ --clear Clear all history
878
+ -n, --limit <number> Number of entries to show (default: 20)
879
+ --replay <id> Show the command string for a given history entry
185
880
  ```
186
881
 
187
882
  **Examples:**
@@ -190,59 +885,156 @@ Options:
190
885
  # Show last 20 commands
191
886
  smart-cli history
192
887
 
888
+ # Show last 50
889
+ smart-cli history --limit 50
890
+
891
+ # Search for validate runs
892
+ smart-cli history --search validate
893
+
193
894
  # Show statistics
194
895
  smart-cli history --stats
195
896
 
196
- # Search commands
197
- smart-cli history --search validate
897
+ # Clear history
898
+ smart-cli history --clear
198
899
  ```
199
900
 
901
+ ---
902
+
200
903
  ### completion
201
904
 
202
- Generate shell completion scripts.
905
+ Generates and installs shell completion scripts. Also provides shell hook functions for context and status display.
203
906
 
204
907
  ```bash
205
- smart-cli completion --install <shell>
908
+ smart-cli completion [options]
206
909
 
207
- Supported shells: bash, zsh, fish
910
+ Options:
911
+ --install <shell> Install completion for specified shell: bash, zsh, fish
912
+ --shell <shell> Generate completion script for specified shell (prints to stdout)
913
+ --hooks Generate shell hook functions for context/status display
208
914
  ```
209
915
 
210
916
  **Examples:**
211
917
 
212
918
  ```bash
919
+ # Install zsh completion
920
+ smart-cli completion --install zsh
921
+
213
922
  # Install bash completion
214
923
  smart-cli completion --install bash
215
924
 
216
- # Install zsh completion
217
- smart-cli completion --install zsh
925
+ # Install fish completion
926
+ smart-cli completion --install fish
927
+
928
+ # Print completion script to stdout (for manual setup)
929
+ smart-cli completion --shell zsh
930
+
931
+ # Generate hook functions
932
+ smart-cli completion --hooks
218
933
  ```
219
934
 
220
- ## MCP Server (AI Agent Integration)
935
+ Pre-built scripts are also included in the package under `shell/`:
936
+ - `shell/completion.bash`
937
+ - `shell/completion.zsh`
938
+ - `shell/completion.fish`
939
+ - `shell/hooks.bash`
940
+ - `shell/hooks.zsh`
941
+
942
+ ---
943
+
944
+ ## MCP Server
221
945
 
222
- The Evolith CLI includes an MCP server for AI agent integration.
946
+ Evolith ships a standalone MCP server, `@evolith/mcp-server`, for AI agent integration. Run it with the `evolith-mcp` binary (or `npx @evolith/mcp-server serve`).
223
947
 
224
- ### Starting the MCP Server
948
+ ### Starting the Server
225
949
 
226
950
  ```bash
227
- smart-cli mcp serve
951
+ # stdio transport (default — for Cursor, Claude Desktop)
952
+ evolith-mcp serve
953
+
954
+ # HTTP transport (for remote or containerized deployments)
955
+ evolith-mcp serve --transport http --port 3000
956
+
957
+ # HTTP with API key authentication
958
+ evolith-mcp serve --transport http --port 3000 --api-key <secret>
228
959
  ```
229
960
 
230
- The server communicates via stdio JSON-RPC.
961
+ ```bash
962
+ evolith-mcp [action] [options]
963
+
964
+ Actions:
965
+ serve Start the MCP server (default)
966
+ version Print the MCP server version banner
967
+
968
+ Options:
969
+ -t, --transport <stdio|http> Transport: stdio (default) or http
970
+ -p, --port <number> HTTP server port (default: 3000, or $PORT)
971
+ --api-key <key> API key for HTTP transport authentication (or $EVOLITH_API_KEY)
972
+ --no-confirm Skip confirmation prompts
973
+ ```
974
+
975
+ ### Smoke Test
976
+
977
+ ```bash
978
+ npm run mcp:smoke
979
+ ```
980
+
981
+ Verifies `initialize`, `tools/list`, `resources/list`, `prompts/list`, and a real `tools/call` end-to-end through the built CLI.
231
982
 
232
983
  ### Available MCP Tools
233
984
 
985
+ The bundled server registers **27 tools**. The live, authoritative set is always browsable with `smart-cli api --list --category tools`; the table below mirrors the current `@evolith/mcp-server` registry.
986
+
987
+ **Validation & architecture**
988
+
234
989
  | Tool | Description |
235
990
  |------|-------------|
236
- | `evolith-validate` | Validate repository compliance |
237
- | `evolith-agent-install` | Install new agent |
991
+ | `evolith-validate` | Validate a satellite repository against Evolith rules (end-to-end pipeline via manifest) |
992
+ | `evolith-composable-validate` | Validate with the composable engine (GT-312): SDLC, Architecture, Ruleset, ADR, Ad-hoc modes (combinable) |
993
+ | `evolith-architecture-validate` | Validate architecture against the declared topology with optional deep analysis |
994
+ | `evolith-drift-detect` | Detect architecture drift in a repository |
995
+ | `evolith-auto-fix` | Apply automatic fixes to architectural violations reported by Core rule evaluators |
996
+ | `evolith-topology-list` | List all available architecture topologies in Evolith Core |
997
+ | `evolith-topology-get` | Get a specific architecture topology by id |
998
+
999
+ **SDLC, gates & metrics**
1000
+
1001
+ | Tool | Description |
1002
+ |------|-------------|
1003
+ | `evolith-gate-evaluate` | Evaluate a specific SDLC phase gate |
1004
+ | `evolith-phase-advance` | Propose an SDLC phase transition by evaluating exit criteria |
1005
+ | `evolith-sdlc-handoff` | Perform a phase gate handoff (e.g. phase-0 → phase-1) |
1006
+ | `evolith-sdlc-status` | Get the current SDLC phase status |
1007
+ | `evolith-dora-metrics` | Calculate DORA metric approximations from git log history |
1008
+ | `evolith-metrics` | Get MCP server metrics (per-tool call counts, latency, failures) |
1009
+
1010
+ **Agents**
1011
+
1012
+ | Tool | Description |
1013
+ |------|-------------|
1014
+ | `evolith-agent-install` | Install a new BMAD agent |
238
1015
  | `evolith-agent-list` | List installed agents |
239
- | `evolith-agent-validate` | Validate agent ruleset |
240
- | `evolith-architecture-validate` | Validate architecture |
241
- | `evolith-sdlc-handoff` | Generate phase handoff |
242
- | `evolith-sdlc-status` | Show SDLC phase status |
243
- | `evolith-config-get` | Get configuration value |
244
- | `evolith-config-set` | Set configuration value |
245
- | `evolith-metrics` | Get MCP server metrics |
1016
+ | `evolith-agent-validate` | Validate an agent ruleset |
1017
+ | `evolith-agent-upgrade` | Upgrade an existing agent |
1018
+ | `evolith-agent-remove` | Remove an agent |
1019
+
1020
+ **Configuration**
1021
+
1022
+ | Tool | Description |
1023
+ |------|-------------|
1024
+ | `evolith-config-get` | Get an Evolith configuration value |
1025
+ | `evolith-config-set` | Set an Evolith configuration value |
1026
+
1027
+ **MoSCoW prioritization**
1028
+
1029
+ | Tool | Description |
1030
+ |------|-------------|
1031
+ | `evolith-moscow-create` | Create a new MoSCoW prioritization analysis |
1032
+ | `evolith-moscow-load` | Load an existing MoSCoW analysis |
1033
+ | `evolith-moscow-update` | Update an item in a MoSCoW analysis |
1034
+ | `evolith-moscow-remove` | Remove an item from a MoSCoW analysis |
1035
+ | `evolith-moscow-list` | List all MoSCoW analyses for a repository |
1036
+ | `evolith-moscow-validate` | Validate a MoSCoW analysis for correctness |
1037
+ | `evolith-moscow-report` | Generate a markdown report from a MoSCoW analysis |
246
1038
 
247
1039
  ### Cursor AI Configuration
248
1040
 
@@ -252,8 +1044,8 @@ Add to `~/.cursor/mcp.json`:
252
1044
  {
253
1045
  "mcpServers": {
254
1046
  "evolith": {
255
- "command": "smart-cli",
256
- "args": ["mcp", "serve"]
1047
+ "command": "evolith-mcp",
1048
+ "args": ["serve"]
257
1049
  }
258
1050
  }
259
1051
  }
@@ -267,49 +1059,75 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
267
1059
  {
268
1060
  "mcpServers": {
269
1061
  "evolith": {
270
- "command": "smart-cli",
271
- "args": ["mcp", "serve"]
1062
+ "command": "evolith-mcp",
1063
+ "args": ["serve"]
272
1064
  }
273
1065
  }
274
1066
  }
275
1067
  ```
276
1068
 
277
- ## AI Agent Workflow Example
278
-
279
- When integrated with an AI agent, you can have conversations like:
1069
+ ### HTTP Transport (remote deployment)
280
1070
 
1071
+ ```json
1072
+ {
1073
+ "mcpServers": {
1074
+ "evolith": {
1075
+ "url": "http://localhost:3000",
1076
+ "headers": { "x-api-key": "<secret>" }
1077
+ }
1078
+ }
1079
+ }
281
1080
  ```
282
- You: Validate my repository
283
- Agent: Let me run the validation...
284
1081
 
285
- await mcp.callTool('evolith-validate', {
286
- path: '/user/project',
287
- format: 'summary'
288
- })
1082
+ ---
289
1083
 
290
- Result: Repository is compliant with Evolith standards
291
- Rules checked: 12
292
- All gates passed
1084
+ ## CI/CD Integration
293
1085
 
294
- You: Show me the ADRs
295
- Agent: Let me fetch the ADR list...
1086
+ ### SDLC Phase Validation (GT-281 Pipeline)
296
1087
 
297
- await mcp.callTool('evolith-adr-list', {})
1088
+ ```bash
1089
+ # Validate a specific SDLC phase with full gate evaluation
1090
+ smart-cli validate --phase design --format json --output gate-evidence.json
298
1091
 
299
- Result: Found 5 ADRs:
300
- - ADR-0001: Architecture Decision Record Template
301
- - ADR-0002: Hexagonal Architecture (accepted)
302
- - ADR-0003: Testing Pyramid (accepted)
1092
+ # With explicit SatelliteManifest
1093
+ smart-cli validate --manifest ./satellite-manifest.json --phase construction --format json
303
1094
  ```
304
1095
 
1096
+ ### Gate Evaluation in CI
1097
+
1098
+ ```bash
1099
+ # Evaluate construction gates from CI
1100
+ smart-cli gate evaluate \
1101
+ --phase construction \
1102
+ --evaluated-by ci \
1103
+ --format json \
1104
+ --webhook-url $WEBHOOK_URL
1105
+ ```
1106
+
1107
+ ### GitHub Actions Example
1108
+
1109
+ ```yaml
1110
+ - name: Evolith Gate Evaluation
1111
+ run: |
1112
+ smart-cli gate evaluate \
1113
+ --phase ${{ env.SDLC_PHASE }} \
1114
+ --evaluated-by ci \
1115
+ --format json \
1116
+ --output gate-evidence.json
1117
+ env:
1118
+ SDLC_PHASE: construction
1119
+ ```
1120
+
1121
+ ---
1122
+
305
1123
  ## Configuration
306
1124
 
307
- Evolith uses an `evolith.yaml` file in the repository root:
1125
+ Evolith uses `evolith.yaml` in `.evolith/` or the repository root:
308
1126
 
309
1127
  ```yaml
310
1128
  coreRef:
311
1129
  version: "1.0.0"
312
- path: "../evolith"
1130
+ path: "../../evolith"
313
1131
 
314
1132
  governance:
315
1133
  version: "1.0"
@@ -323,67 +1141,86 @@ product:
323
1141
  runtime: "typescript"
324
1142
  ```
325
1143
 
1144
+ ### Multi-Environment Profiles
1145
+
1146
+ ```bash
1147
+ # Create a profile per environment
1148
+ smart-cli profile create --name local
1149
+ smart-cli profile create --name staging
1150
+ smart-cli profile create --name ci
1151
+
1152
+ # Switch before running commands
1153
+ smart-cli profile switch --name staging
1154
+ smart-cli validate
1155
+ ```
1156
+
1157
+ ---
1158
+
326
1159
  ## Output Formats
327
1160
 
328
- All commands support multiple output formats:
1161
+ Most commands accept `--format`:
329
1162
 
330
1163
  ```bash
331
- # JSON (default for automation)
332
- smart-cli validate --format json
1164
+ # Human-readable (default for most commands)
1165
+ smart-cli validate
333
1166
 
334
- # Table (human-readable)
1167
+ # Markdown
1168
+ smart-cli validate --format markdown
1169
+
1170
+ # Table
335
1171
  smart-cli validate --format table
336
1172
 
337
- # YAML (pipeline integration)
1173
+ # YAML
338
1174
  smart-cli validate --format yaml
339
1175
 
340
- # Markdown (documentation)
341
- smart-cli validate --format markdown
1176
+ # JSON (ADR-0073 envelope — for automation and CI)
1177
+ smart-cli validate --format json
342
1178
  ```
343
1179
 
344
- ## Troubleshooting
345
-
346
- ### Command not found
1180
+ ---
347
1181
 
348
- If `evolith` is not found after installation, ensure npm's global bin is in your PATH:
1182
+ ## Troubleshooting
349
1183
 
1184
+ **Command not found after install:**
350
1185
  ```bash
351
- # Add to ~/.bashrc or ~/.zshrc
352
1186
  export PATH="$(npm config get prefix)/bin:$PATH"
353
1187
  ```
354
1188
 
355
- ### MCP server not responding
356
-
357
- Ensure the MCP server is running:
358
-
1189
+ **Validation fails with no evolith.yaml:**
359
1190
  ```bash
360
- smart-cli mcp serve &
1191
+ smart-cli docs # scaffold evolith.yaml and base docs
1192
+ smart-cli validate
361
1193
  ```
362
1194
 
363
- ### Validation fails
364
-
365
- Check your `evolith.yaml` exists and is valid:
366
-
1195
+ **MCP server not responding:**
367
1196
  ```bash
368
- cat evolith.yaml
369
- smart-cli validate --verbose
1197
+ evolith-mcp serve --no-confirm
370
1198
  ```
371
1199
 
1200
+ **Unknown topology in scaffold or drift:**
1201
+ Ensure your `evolith.yaml` has a valid `product.topology` field using a canonical topology id — `modular-monolith`, `distributed-modules`, `microservices`, `serverless`, `edge-computing`, `event-driven`, `data-mesh` or `agentic-ai` (per `reference/config/evolith.config.schema.json`).
1202
+
1203
+ ---
1204
+
372
1205
  ## Development
373
1206
 
374
- ### Building from Source
1207
+ ### Build from Source
375
1208
 
376
1209
  ```bash
377
1210
  cd sdk/cli
378
1211
  npm install
379
1212
  npm run build
380
- npm link # Link globally for testing
1213
+ npm link
381
1214
  ```
382
1215
 
383
- ### Running Tests
1216
+ ### Tests
384
1217
 
385
1218
  ```bash
386
- npm test
1219
+ npm test # unit + e2e
1220
+ npm run test:unit # unit only
1221
+ npm run test:e2e # e2e only
1222
+ npm run test:cov # coverage report
1223
+ npm run mcp:smoke # MCP protocol smoke test
387
1224
  ```
388
1225
 
389
1226
  ### Project Structure
@@ -391,29 +1228,44 @@ npm test
391
1228
  ```
392
1229
  sdk/cli/
393
1230
  ├── src/
394
- │ ├── commands/ # CLI commands (adr, validate, agents, etc.)
395
- │ ├── application/ # Use cases
396
- │ ├── domain/ # Business logic (services, entities)
397
- │ ├── infrastructure/# External integrations (catalog, CLI)
398
- │ └── core/ # Shared (DI, observability, errors, MCP)
399
- ├── shell/ # Shell completion scripts
400
- ├── templates/ # Configuration templates
401
- └── docs/ # Documentation
1231
+ │ ├── commands/ # CLI commands (one directory per command)
1232
+ │ ├── config/ # Runtimes catalog, CLI commands matrix, aliases
1233
+ │ ├── contributions/ # Contribution validation
1234
+ │ ├── infrastructure/ # Config, filesystem, formatters, prompts, plugins
1235
+ │ └── plugins/ # Plugin registry and module
1236
+ ├── shell/ # Bash, Zsh, Fish completion and hooks
1237
+ ├── templates/ # Configuration templates
1238
+ ├── test/ # E2E test suite
1239
+ └── docs/ # Extended documentation
402
1240
  ```
403
1241
 
1242
+ ### Extended Documentation
1243
+
1244
+ - [Demo Guide](docs/SMART-CLI-DEMO.md) — end-to-end walkthrough of all commands and SDLC flows
1245
+ - [Vision](docs/VISION.md) — CLI vision and roadmap
1246
+ - [Data Models](docs/data-models.md) — domain data model reference
1247
+ - [MCP Integration](docs/MCP-INTEGRATION.md) — MCP server protocol details
1248
+ - [Handoff Protocol](docs/HANDOFF-PROTOCOL.md) — SDLC handoff artifact specification
1249
+
1250
+ ---
1251
+
404
1252
  ## Contributing
405
1253
 
1254
+ See the repository-root [CONTRIBUTING.md](../../CONTRIBUTING.md) for the full workflow, branch/commit conventions, and authoring standards.
1255
+
406
1256
  1. Fork the repository
407
1257
  2. Create a feature branch
408
1258
  3. Make changes with tests
409
1259
  4. Submit a pull request
410
1260
 
1261
+ ---
1262
+
411
1263
  ## License
412
1264
 
413
- ISC
1265
+ MIT
414
1266
 
415
1267
  ## Support
416
1268
 
417
- - [Documentation](https://github.com/beyondnetcode/evolith_arch32#readme)
418
1269
  - [Issue Tracker](https://github.com/beyondnetcode/evolith_arch32/issues)
419
- - [Discussions](https://github.com/beyondnetcode/evolith_arch32/discussions)
1270
+ - [Discussions](https://github.com/beyondnetcode/evolith_arch32/discussions)
1271
+ - [Documentation](https://github.com/beyondnetcode/evolith_arch32#readme)