@evolith/smart-cli 0.0.3-beta → 1.1.1

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