@evolith/smart-cli 1.1.0 → 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 (576) hide show
  1. package/ARCHITECTURE.md +1 -1
  2. package/LICENSE +21 -0
  3. package/README.es.md +31 -3
  4. package/README.md +906 -170
  5. package/dist/app.module.js +79 -6
  6. package/dist/app.module.js.map +1 -1
  7. package/dist/commands/adr/adr.command.d.ts +7 -3
  8. package/dist/commands/adr/adr.command.js +50 -78
  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 +11 -3
  32. package/dist/commands/architecture/scaffold.command.js +194 -57
  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 +9 -3
  47. package/dist/commands/gate/gate.command.js +36 -53
  48. package/dist/commands/gate/gate.command.js.map +1 -1
  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 +6 -3
  74. package/dist/commands/sdlc/gate-status.command.js +54 -81
  75. package/dist/commands/sdlc/gate-status.command.js.map +1 -1
  76. package/dist/commands/sdlc/generate-domain.command.d.ts +4 -3
  77. package/dist/commands/sdlc/generate-domain.command.js +35 -36
  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 -43
  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 +22 -4
  98. package/dist/commands/validate/validate.command.js +295 -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 +6 -1
  113. package/dist/{core → infrastructure}/architecture/nx-workspace.strategy.js +27 -38
  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 +6 -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 +5 -2
  171. package/dist/{core/abstractions → infrastructure}/providers/mock-filesystem.provider.js +4 -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 +5 -2
  174. package/dist/{core/abstractions → infrastructure}/providers/node-filesystem.provider.js +9 -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 +50 -41
  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/ports/webhook-notifier.port.d.ts +0 -4
  192. package/dist/application/ports/webhook-notifier.port.js +0 -3
  193. package/dist/application/ports/webhook-notifier.port.js.map +0 -1
  194. package/dist/application/services/index.d.ts +0 -64
  195. package/dist/application/services/index.js +0 -371
  196. package/dist/application/services/index.js.map +0 -1
  197. package/dist/application/services/initialize-project.spec.d.ts +0 -1
  198. package/dist/application/services/initialize-project.spec.js +0 -211
  199. package/dist/application/services/initialize-project.spec.js.map +0 -1
  200. package/dist/application/services/phase-transition.use-case.spec.d.ts +0 -1
  201. package/dist/application/services/phase-transition.use-case.spec.js +0 -297
  202. package/dist/application/services/phase-transition.use-case.spec.js.map +0 -1
  203. package/dist/application/services/services.test.d.ts +0 -1
  204. package/dist/application/services/services.test.js +0 -176
  205. package/dist/application/services/services.test.js.map +0 -1
  206. package/dist/application/use-cases/evaluate-gate.use-case.d.ts +0 -20
  207. package/dist/application/use-cases/evaluate-gate.use-case.js +0 -72
  208. package/dist/application/use-cases/evaluate-gate.use-case.js.map +0 -1
  209. package/dist/application/use-cases/validate-satellite.use-case.d.ts +0 -19
  210. package/dist/application/use-cases/validate-satellite.use-case.js +0 -96
  211. package/dist/application/use-cases/validate-satellite.use-case.js.map +0 -1
  212. package/dist/application/use-cases/validate-satellite.use-case.spec.d.ts +0 -1
  213. package/dist/application/use-cases/validate-satellite.use-case.spec.js +0 -102
  214. package/dist/application/use-cases/validate-satellite.use-case.spec.js.map +0 -1
  215. package/dist/commands/adr/adr.command.spec.d.ts +0 -1
  216. package/dist/commands/adr/adr.command.spec.js +0 -409
  217. package/dist/commands/adr/adr.command.spec.js.map +0 -1
  218. package/dist/commands/architecture/scaffold.command.spec.d.ts +0 -1
  219. package/dist/commands/architecture/scaffold.command.spec.js +0 -207
  220. package/dist/commands/architecture/scaffold.command.spec.js.map +0 -1
  221. package/dist/commands/commands.test.d.ts +0 -1
  222. package/dist/commands/commands.test.js +0 -131
  223. package/dist/commands/commands.test.js.map +0 -1
  224. package/dist/commands/completion/completion.command.spec.d.ts +0 -1
  225. package/dist/commands/completion/completion.command.spec.js +0 -240
  226. package/dist/commands/completion/completion.command.spec.js.map +0 -1
  227. package/dist/commands/docs/docs.command.spec.d.ts +0 -1
  228. package/dist/commands/docs/docs.command.spec.js +0 -87
  229. package/dist/commands/docs/docs.command.spec.js.map +0 -1
  230. package/dist/commands/drift/drift.command.spec.d.ts +0 -1
  231. package/dist/commands/drift/drift.command.spec.js +0 -327
  232. package/dist/commands/drift/drift.command.spec.js.map +0 -1
  233. package/dist/commands/history/history.command.spec.d.ts +0 -1
  234. package/dist/commands/history/history.command.spec.js +0 -392
  235. package/dist/commands/history/history.command.spec.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 -550
  238. package/dist/commands/init/agents.command.spec.js.map +0 -1
  239. package/dist/commands/init/init.command.spec.d.ts +0 -1
  240. package/dist/commands/init/init.command.spec.js +0 -272
  241. package/dist/commands/init/init.command.spec.js.map +0 -1
  242. package/dist/commands/init/upgrade.command.spec.d.ts +0 -1
  243. package/dist/commands/init/upgrade.command.spec.js +0 -378
  244. package/dist/commands/init/upgrade.command.spec.js.map +0 -1
  245. package/dist/commands/mcp/mcp-serve.command.spec.d.ts +0 -1
  246. package/dist/commands/mcp/mcp-serve.command.spec.js +0 -58
  247. package/dist/commands/mcp/mcp-serve.command.spec.js.map +0 -1
  248. package/dist/commands/sdlc/gate-status.command.spec.d.ts +0 -1
  249. package/dist/commands/sdlc/gate-status.command.spec.js +0 -302
  250. package/dist/commands/sdlc/gate-status.command.spec.js.map +0 -1
  251. package/dist/commands/sdlc/generate-domain.command.spec.d.ts +0 -1
  252. package/dist/commands/sdlc/generate-domain.command.spec.js +0 -121
  253. package/dist/commands/sdlc/generate-domain.command.spec.js.map +0 -1
  254. package/dist/commands/sdlc/handoff.command.spec.d.ts +0 -1
  255. package/dist/commands/sdlc/handoff.command.spec.js +0 -395
  256. package/dist/commands/sdlc/handoff.command.spec.js.map +0 -1
  257. package/dist/commands/sdlc/sdlc.command.spec.d.ts +0 -1
  258. package/dist/commands/sdlc/sdlc.command.spec.js +0 -79
  259. package/dist/commands/sdlc/sdlc.command.spec.js.map +0 -1
  260. package/dist/commands/standards/standards.command.spec.d.ts +0 -1
  261. package/dist/commands/standards/standards.command.spec.js +0 -311
  262. package/dist/commands/standards/standards.command.spec.js.map +0 -1
  263. package/dist/commands/validate/validate.command.spec.d.ts +0 -1
  264. package/dist/commands/validate/validate.command.spec.js +0 -368
  265. package/dist/commands/validate/validate.command.spec.js.map +0 -1
  266. package/dist/config/runtimes.json +0 -196
  267. package/dist/config/tool-catalog.json +0 -343
  268. package/dist/core/abstractions/index.d.ts +0 -6
  269. package/dist/core/abstractions/index.js +0 -23
  270. package/dist/core/abstractions/index.js.map +0 -1
  271. package/dist/core/abstractions/interfaces.d.ts +0 -61
  272. package/dist/core/abstractions/interfaces.js +0 -5
  273. package/dist/core/abstractions/interfaces.js.map +0 -1
  274. package/dist/core/abstractions/providers/config-parser.provider.js.map +0 -1
  275. package/dist/core/abstractions/providers/config-parser.provider.spec.d.ts +0 -1
  276. package/dist/core/abstractions/providers/config-parser.provider.spec.js +0 -18
  277. package/dist/core/abstractions/providers/config-parser.provider.spec.js.map +0 -1
  278. package/dist/core/abstractions/providers/logger.provider.js.map +0 -1
  279. package/dist/core/abstractions/providers/logger.provider.spec.d.ts +0 -1
  280. package/dist/core/abstractions/providers/logger.provider.spec.js +0 -212
  281. package/dist/core/abstractions/providers/logger.provider.spec.js.map +0 -1
  282. package/dist/core/abstractions/providers/mock-filesystem.provider.js.map +0 -1
  283. package/dist/core/abstractions/providers/mock-filesystem.provider.spec.d.ts +0 -1
  284. package/dist/core/abstractions/providers/mock-filesystem.provider.spec.js +0 -56
  285. package/dist/core/abstractions/providers/mock-filesystem.provider.spec.js.map +0 -1
  286. package/dist/core/abstractions/providers/node-filesystem.provider.js.map +0 -1
  287. package/dist/core/agents/agent-ruleset-builder.d.ts +0 -30
  288. package/dist/core/agents/agent-ruleset-builder.js +0 -75
  289. package/dist/core/agents/agent-ruleset-builder.js.map +0 -1
  290. package/dist/core/agents/agent-ruleset-builder.spec.d.ts +0 -1
  291. package/dist/core/agents/agent-ruleset-builder.spec.js +0 -135
  292. package/dist/core/agents/agent-ruleset-builder.spec.js.map +0 -1
  293. package/dist/core/architecture/nx-workspace.strategy.js.map +0 -1
  294. package/dist/core/architecture/nx-workspace.strategy.spec.d.ts +0 -1
  295. package/dist/core/architecture/nx-workspace.strategy.spec.js +0 -187
  296. package/dist/core/architecture/nx-workspace.strategy.spec.js.map +0 -1
  297. package/dist/core/architecture/workspace-manager.strategy.d.ts +0 -8
  298. package/dist/core/architecture/workspace-manager.strategy.js +0 -3
  299. package/dist/core/architecture/workspace-manager.strategy.js.map +0 -1
  300. package/dist/core/config/config.service.d.ts +0 -15
  301. package/dist/core/config/config.service.js +0 -55
  302. package/dist/core/config/config.service.js.map +0 -1
  303. package/dist/core/config/config.service.spec.d.ts +0 -1
  304. package/dist/core/config/config.service.spec.js +0 -43
  305. package/dist/core/config/config.service.spec.js.map +0 -1
  306. package/dist/core/di/container.d.ts +0 -25
  307. package/dist/core/di/container.js +0 -87
  308. package/dist/core/di/container.js.map +0 -1
  309. package/dist/core/di/container.spec.d.ts +0 -1
  310. package/dist/core/di/container.spec.js +0 -301
  311. package/dist/core/di/container.spec.js.map +0 -1
  312. package/dist/core/errors/index.d.ts +0 -26
  313. package/dist/core/errors/index.js +0 -67
  314. package/dist/core/errors/index.js.map +0 -1
  315. package/dist/core/filesystem/file-manager.service.d.ts +0 -4
  316. package/dist/core/filesystem/file-manager.service.js.map +0 -1
  317. package/dist/core/filesystem/file-manager.service.spec.d.ts +0 -1
  318. package/dist/core/filesystem/file-manager.service.spec.js +0 -103
  319. package/dist/core/filesystem/file-manager.service.spec.js.map +0 -1
  320. package/dist/core/generators/hexagonal-scaffolder.d.ts +0 -6
  321. package/dist/core/generators/hexagonal-scaffolder.js +0 -260
  322. package/dist/core/generators/hexagonal-scaffolder.js.map +0 -1
  323. package/dist/core/generators/hexagonal-scaffolder.spec.d.ts +0 -1
  324. package/dist/core/generators/hexagonal-scaffolder.spec.js +0 -164
  325. package/dist/core/generators/hexagonal-scaffolder.spec.js.map +0 -1
  326. package/dist/core/generators/mermaid-class-parser.d.ts +0 -38
  327. package/dist/core/generators/mermaid-class-parser.js +0 -183
  328. package/dist/core/generators/mermaid-class-parser.js.map +0 -1
  329. package/dist/core/generators/mermaid-class-parser.spec.d.ts +0 -1
  330. package/dist/core/generators/mermaid-class-parser.spec.js +0 -148
  331. package/dist/core/generators/mermaid-class-parser.spec.js.map +0 -1
  332. package/dist/core/mcp/mcp-server.service.d.ts +0 -7
  333. package/dist/core/mcp/mcp-server.service.js +0 -31
  334. package/dist/core/mcp/mcp-server.service.js.map +0 -1
  335. package/dist/core/mcp/metrics.service.d.ts +0 -37
  336. package/dist/core/mcp/metrics.service.js +0 -72
  337. package/dist/core/mcp/metrics.service.js.map +0 -1
  338. package/dist/core/mcp/metrics.service.spec.d.ts +0 -1
  339. package/dist/core/mcp/metrics.service.spec.js +0 -159
  340. package/dist/core/mcp/metrics.service.spec.js.map +0 -1
  341. package/dist/core/mcp/prompts/index.d.ts +0 -22
  342. package/dist/core/mcp/prompts/index.js +0 -211
  343. package/dist/core/mcp/prompts/index.js.map +0 -1
  344. package/dist/core/mcp/prompts/index.spec.d.ts +0 -1
  345. package/dist/core/mcp/prompts/index.spec.js +0 -150
  346. package/dist/core/mcp/prompts/index.spec.js.map +0 -1
  347. package/dist/core/mcp/resources/index.d.ts +0 -11
  348. package/dist/core/mcp/resources/index.js +0 -209
  349. package/dist/core/mcp/resources/index.js.map +0 -1
  350. package/dist/core/mcp/resources/index.spec.d.ts +0 -1
  351. package/dist/core/mcp/resources/index.spec.js +0 -212
  352. package/dist/core/mcp/resources/index.spec.js.map +0 -1
  353. package/dist/core/mcp/server.d.ts +0 -33
  354. package/dist/core/mcp/server.js +0 -693
  355. package/dist/core/mcp/server.js.map +0 -1
  356. package/dist/core/mcp/server.spec.d.ts +0 -1
  357. package/dist/core/mcp/server.spec.js +0 -579
  358. package/dist/core/mcp/server.spec.js.map +0 -1
  359. package/dist/core/mcp/tools/agent.d.ts +0 -41
  360. package/dist/core/mcp/tools/agent.js +0 -195
  361. package/dist/core/mcp/tools/agent.js.map +0 -1
  362. package/dist/core/mcp/tools/agent.spec.d.ts +0 -1
  363. package/dist/core/mcp/tools/agent.spec.js +0 -171
  364. package/dist/core/mcp/tools/agent.spec.js.map +0 -1
  365. package/dist/core/mcp/tools/architecture.d.ts +0 -29
  366. package/dist/core/mcp/tools/architecture.js +0 -234
  367. package/dist/core/mcp/tools/architecture.js.map +0 -1
  368. package/dist/core/mcp/tools/architecture.spec.d.ts +0 -1
  369. package/dist/core/mcp/tools/architecture.spec.js +0 -145
  370. package/dist/core/mcp/tools/architecture.spec.js.map +0 -1
  371. package/dist/core/mcp/tools/gate.d.ts +0 -1
  372. package/dist/core/mcp/tools/gate.js +0 -68
  373. package/dist/core/mcp/tools/gate.js.map +0 -1
  374. package/dist/core/mcp/tools/moscow.d.ts +0 -30
  375. package/dist/core/mcp/tools/moscow.js +0 -113
  376. package/dist/core/mcp/tools/moscow.js.map +0 -1
  377. package/dist/core/mcp/tools/moscow.spec.d.ts +0 -1
  378. package/dist/core/mcp/tools/moscow.spec.js +0 -209
  379. package/dist/core/mcp/tools/moscow.spec.js.map +0 -1
  380. package/dist/core/mcp/tools/sdlc.d.ts +0 -32
  381. package/dist/core/mcp/tools/sdlc.js +0 -190
  382. package/dist/core/mcp/tools/sdlc.js.map +0 -1
  383. package/dist/core/mcp/tools/sdlc.spec.d.ts +0 -1
  384. package/dist/core/mcp/tools/sdlc.spec.js +0 -170
  385. package/dist/core/mcp/tools/sdlc.spec.js.map +0 -1
  386. package/dist/core/mcp/tools/tool-utils.d.ts +0 -4
  387. package/dist/core/mcp/tools/tool-utils.js +0 -18
  388. package/dist/core/mcp/tools/tool-utils.js.map +0 -1
  389. package/dist/core/mcp/tools/validate.d.ts +0 -18
  390. package/dist/core/mcp/tools/validate.js +0 -56
  391. package/dist/core/mcp/tools/validate.js.map +0 -1
  392. package/dist/core/mcp/tools/validate.spec.d.ts +0 -1
  393. package/dist/core/mcp/tools/validate.spec.js +0 -130
  394. package/dist/core/mcp/tools/validate.spec.js.map +0 -1
  395. package/dist/core/mcp/watcher.service.d.ts +0 -8
  396. package/dist/core/mcp/watcher.service.js +0 -82
  397. package/dist/core/mcp/watcher.service.js.map +0 -1
  398. package/dist/core/mcp/watcher.service.spec.d.ts +0 -1
  399. package/dist/core/mcp/watcher.service.spec.js +0 -171
  400. package/dist/core/mcp/watcher.service.spec.js.map +0 -1
  401. package/dist/core/metrics/dora-calculator.d.ts +0 -18
  402. package/dist/core/metrics/dora-calculator.js +0 -146
  403. package/dist/core/metrics/dora-calculator.js.map +0 -1
  404. package/dist/core/metrics/dora-calculator.spec.d.ts +0 -1
  405. package/dist/core/metrics/dora-calculator.spec.js +0 -164
  406. package/dist/core/metrics/dora-calculator.spec.js.map +0 -1
  407. package/dist/core/metrics/git-log-reader.d.ts +0 -14
  408. package/dist/core/metrics/git-log-reader.js +0 -39
  409. package/dist/core/metrics/git-log-reader.js.map +0 -1
  410. package/dist/core/metrics/git-log-reader.spec.d.ts +0 -1
  411. package/dist/core/metrics/git-log-reader.spec.js +0 -108
  412. package/dist/core/metrics/git-log-reader.spec.js.map +0 -1
  413. package/dist/core/observability/command-watcher.js.map +0 -1
  414. package/dist/core/observability/command-watcher.spec.d.ts +0 -1
  415. package/dist/core/observability/command-watcher.spec.js +0 -123
  416. package/dist/core/observability/command-watcher.spec.js.map +0 -1
  417. package/dist/core/observability/error-reporter.js.map +0 -1
  418. package/dist/core/observability/error-reporter.spec.d.ts +0 -1
  419. package/dist/core/observability/error-reporter.spec.js +0 -291
  420. package/dist/core/observability/error-reporter.spec.js.map +0 -1
  421. package/dist/core/observability/index.d.ts +0 -5
  422. package/dist/core/observability/index.js.map +0 -1
  423. package/dist/core/observability/observability.test.d.ts +0 -1
  424. package/dist/core/observability/observability.test.js +0 -224
  425. package/dist/core/observability/observability.test.js.map +0 -1
  426. package/dist/core/observability/structured-logger.js.map +0 -1
  427. package/dist/core/observability/structured-logger.spec.d.ts +0 -1
  428. package/dist/core/observability/structured-logger.spec.js +0 -197
  429. package/dist/core/observability/structured-logger.spec.js.map +0 -1
  430. package/dist/core/observability/timing.js.map +0 -1
  431. package/dist/core/observability/timing.spec.d.ts +0 -1
  432. package/dist/core/observability/timing.spec.js +0 -216
  433. package/dist/core/observability/timing.spec.js.map +0 -1
  434. package/dist/core/observability/tool-usage-telemetry.service.js.map +0 -1
  435. package/dist/core/services/command-executor.service.d.ts +0 -3
  436. package/dist/core/services/command-executor.service.js +0 -12
  437. package/dist/core/services/command-executor.service.js.map +0 -1
  438. package/dist/core/services/command-history.service.d.ts +0 -39
  439. package/dist/core/services/command-history.service.js +0 -150
  440. package/dist/core/services/command-history.service.js.map +0 -1
  441. package/dist/core/services/command-history.service.spec.d.ts +0 -1
  442. package/dist/core/services/command-history.service.spec.js +0 -257
  443. package/dist/core/services/command-history.service.spec.js.map +0 -1
  444. package/dist/core/services/command-providers.d.ts +0 -1
  445. package/dist/core/services/command-providers.js +0 -17
  446. package/dist/core/services/command-providers.js.map +0 -1
  447. package/dist/core/services/runtime-catalog.service.d.ts +0 -2
  448. package/dist/core/services/runtime-catalog.service.js +0 -7
  449. package/dist/core/services/runtime-catalog.service.js.map +0 -1
  450. package/dist/core/sync/sync.service.d.ts +0 -4
  451. package/dist/core/sync/sync.service.js.map +0 -1
  452. package/dist/core/sync/sync.service.spec.d.ts +0 -1
  453. package/dist/core/sync/sync.service.spec.js +0 -63
  454. package/dist/core/sync/sync.service.spec.js.map +0 -1
  455. package/dist/core/upgrade/satellite-upgrade.service.d.ts +0 -48
  456. package/dist/core/upgrade/satellite-upgrade.service.js +0 -358
  457. package/dist/core/upgrade/satellite-upgrade.service.js.map +0 -1
  458. package/dist/core/upgrade/satellite-upgrade.service.spec.d.ts +0 -1
  459. package/dist/core/upgrade/satellite-upgrade.service.spec.js +0 -223
  460. package/dist/core/upgrade/satellite-upgrade.service.spec.js.map +0 -1
  461. package/dist/core/validators/architecture-drift.service.d.ts +0 -68
  462. package/dist/core/validators/architecture-drift.service.js +0 -266
  463. package/dist/core/validators/architecture-drift.service.js.map +0 -1
  464. package/dist/core/validators/architecture-drift.service.spec.d.ts +0 -1
  465. package/dist/core/validators/architecture-drift.service.spec.js +0 -315
  466. package/dist/core/validators/architecture-drift.service.spec.js.map +0 -1
  467. package/dist/core/validators/deep-architecture-analyzer.d.ts +0 -58
  468. package/dist/core/validators/deep-architecture-analyzer.js +0 -333
  469. package/dist/core/validators/deep-architecture-analyzer.js.map +0 -1
  470. package/dist/core/validators/deep-architecture-analyzer.spec.d.ts +0 -1
  471. package/dist/core/validators/deep-architecture-analyzer.spec.js +0 -186
  472. package/dist/core/validators/deep-architecture-analyzer.spec.js.map +0 -1
  473. package/dist/core/validators/evaluators/evaluator.interface.d.ts +0 -14
  474. package/dist/core/validators/evaluators/evaluator.interface.js +0 -3
  475. package/dist/core/validators/evaluators/evaluator.interface.js.map +0 -1
  476. package/dist/core/validators/evaluators/native-evaluator.d.ts +0 -31
  477. package/dist/core/validators/evaluators/native-evaluator.js +0 -461
  478. package/dist/core/validators/evaluators/native-evaluator.js.map +0 -1
  479. package/dist/core/validators/evaluators/opa-evaluator.d.ts +0 -20
  480. package/dist/core/validators/evaluators/opa-evaluator.js +0 -249
  481. package/dist/core/validators/evaluators/opa-evaluator.js.map +0 -1
  482. package/dist/core/validators/phase-gate-validator.service.d.ts +0 -75
  483. package/dist/core/validators/phase-gate-validator.service.js +0 -338
  484. package/dist/core/validators/phase-gate-validator.service.js.map +0 -1
  485. package/dist/core/validators/phase-gate-validator.service.spec.d.ts +0 -1
  486. package/dist/core/validators/phase-gate-validator.service.spec.js +0 -326
  487. package/dist/core/validators/phase-gate-validator.service.spec.js.map +0 -1
  488. package/dist/core/validators/rule-evaluation-engine.d.ts +0 -34
  489. package/dist/core/validators/rule-evaluation-engine.js +0 -187
  490. package/dist/core/validators/rule-evaluation-engine.js.map +0 -1
  491. package/dist/core/validators/rule-evaluation-engine.spec.d.ts +0 -1
  492. package/dist/core/validators/rule-evaluation-engine.spec.js +0 -243
  493. package/dist/core/validators/rule-evaluation-engine.spec.js.map +0 -1
  494. package/dist/core/validators/ruleset-validator-architecture.spec.d.ts +0 -1
  495. package/dist/core/validators/ruleset-validator-architecture.spec.js +0 -178
  496. package/dist/core/validators/ruleset-validator-architecture.spec.js.map +0 -1
  497. package/dist/core/validators/ruleset-validator.service.d.ts +0 -82
  498. package/dist/core/validators/ruleset-validator.service.js +0 -682
  499. package/dist/core/validators/ruleset-validator.service.js.map +0 -1
  500. package/dist/core/validators/ruleset-validator.service.spec.d.ts +0 -1
  501. package/dist/core/validators/ruleset-validator.service.spec.js +0 -469
  502. package/dist/core/validators/ruleset-validator.service.spec.js.map +0 -1
  503. package/dist/domain/entities/index.d.ts +0 -72
  504. package/dist/domain/entities/index.js +0 -119
  505. package/dist/domain/entities/index.js.map +0 -1
  506. package/dist/domain/gate-evidence.d.ts +0 -59
  507. package/dist/domain/gate-evidence.js +0 -38
  508. package/dist/domain/gate-evidence.js.map +0 -1
  509. package/dist/domain/interfaces.d.ts +0 -224
  510. package/dist/domain/interfaces.js +0 -3
  511. package/dist/domain/interfaces.js.map +0 -1
  512. package/dist/domain/services/adr.service.d.ts +0 -50
  513. package/dist/domain/services/adr.service.js +0 -129
  514. package/dist/domain/services/adr.service.js.map +0 -1
  515. package/dist/domain/services/adr.service.spec.d.ts +0 -1
  516. package/dist/domain/services/adr.service.spec.js +0 -141
  517. package/dist/domain/services/adr.service.spec.js.map +0 -1
  518. package/dist/domain/services/agent-registry.service.js.map +0 -1
  519. package/dist/domain/services/agent-registry.service.spec.d.ts +0 -1
  520. package/dist/domain/services/agent-registry.service.spec.js +0 -162
  521. package/dist/domain/services/agent-registry.service.spec.js.map +0 -1
  522. package/dist/domain/services/index.d.ts +0 -34
  523. package/dist/domain/services/index.js +0 -128
  524. package/dist/domain/services/index.js.map +0 -1
  525. package/dist/domain/services/moscow-prioritization.service.d.ts +0 -44
  526. package/dist/domain/services/moscow-prioritization.service.js +0 -213
  527. package/dist/domain/services/moscow-prioritization.service.js.map +0 -1
  528. package/dist/domain/services/moscow-prioritization.service.spec.d.ts +0 -1
  529. package/dist/domain/services/moscow-prioritization.service.spec.js +0 -285
  530. package/dist/domain/services/moscow-prioritization.service.spec.js.map +0 -1
  531. package/dist/domain/services/services.test.d.ts +0 -1
  532. package/dist/domain/services/services.test.js +0 -236
  533. package/dist/domain/services/services.test.js.map +0 -1
  534. package/dist/domain/services/standards.service.d.ts +0 -47
  535. package/dist/domain/services/standards.service.js +0 -129
  536. package/dist/domain/services/standards.service.js.map +0 -1
  537. package/dist/domain/services/standards.service.spec.d.ts +0 -1
  538. package/dist/domain/services/standards.service.spec.js +0 -600
  539. package/dist/domain/services/standards.service.spec.js.map +0 -1
  540. package/dist/domain/services/tool-usage-telemetry.service.d.ts +0 -46
  541. package/dist/domain/services/tool-usage-telemetry.service.js +0 -181
  542. package/dist/domain/services/tool-usage-telemetry.service.js.map +0 -1
  543. package/dist/domain/services/tool-usage-telemetry.service.spec.d.ts +0 -1
  544. package/dist/domain/services/tool-usage-telemetry.service.spec.js +0 -180
  545. package/dist/domain/services/tool-usage-telemetry.service.spec.js.map +0 -1
  546. package/dist/infrastructure/adapters/webhook.adapter.d.ts +0 -5
  547. package/dist/infrastructure/adapters/webhook.adapter.js +0 -19
  548. package/dist/infrastructure/adapters/webhook.adapter.js.map +0 -1
  549. package/dist/infrastructure/catalog/catalog-loader.test.d.ts +0 -1
  550. package/dist/infrastructure/catalog/catalog-loader.test.js +0 -184
  551. package/dist/infrastructure/catalog/catalog-loader.test.js.map +0 -1
  552. package/dist/infrastructure/cli/command-executor.spec.d.ts +0 -1
  553. package/dist/infrastructure/cli/command-executor.spec.js +0 -149
  554. package/dist/infrastructure/cli/command-executor.spec.js.map +0 -1
  555. package/dist/infrastructure/cli/command-executor.test.d.ts +0 -1
  556. package/dist/infrastructure/cli/command-executor.test.js +0 -98
  557. package/dist/infrastructure/cli/command-executor.test.js.map +0 -1
  558. package/dist/infrastructure/cli/providers/providers.spec.d.ts +0 -1
  559. package/dist/infrastructure/cli/providers/providers.spec.js +0 -251
  560. package/dist/infrastructure/cli/providers/providers.spec.js.map +0 -1
  561. package/dist/infrastructure/formatters/output-formatter.service.spec.d.ts +0 -1
  562. package/dist/infrastructure/formatters/output-formatter.service.spec.js +0 -164
  563. package/dist/infrastructure/formatters/output-formatter.service.spec.js.map +0 -1
  564. package/dist/test/mocks/index.d.ts +0 -44
  565. package/dist/test/mocks/index.js +0 -135
  566. package/dist/test/mocks/index.js.map +0 -1
  567. /package/dist/{core → infrastructure}/observability/command-watcher.d.ts +0 -0
  568. /package/dist/{core → infrastructure}/observability/error-reporter.d.ts +0 -0
  569. /package/dist/{core → infrastructure}/observability/structured-logger.d.ts +0 -0
  570. /package/dist/{core → infrastructure}/observability/structured-logger.js +0 -0
  571. /package/dist/{core → infrastructure}/observability/timing.d.ts +0 -0
  572. /package/dist/{core → infrastructure}/observability/timing.js +0 -0
  573. /package/dist/{core → infrastructure}/observability/tool-usage-telemetry.service.d.ts +0 -0
  574. /package/dist/{core → infrastructure}/observability/tool-usage-telemetry.service.js +0 -0
  575. /package/dist/{core/abstractions → infrastructure}/providers/config-parser.provider.js +0 -0
  576. /package/dist/{core/abstractions → infrastructure}/providers/logger.provider.js +0 -0
package/README.md CHANGED
@@ -1,191 +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.3-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
+ ---
41
90
 
42
- ### 2. Run First Validation
91
+ ## Commands
92
+
93
+ ### init
94
+
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)
76
- --engine <engine> Policy evaluation engine: native or opa (default: native)
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
77
184
  ```
78
185
 
79
- **Dual-Engine Policy Evaluation:**
80
- The CLI supports evaluating policies using either the built-in TypeScript engine (`native`) or Open Policy Agent WebAssembly modules (`opa`). See [Core ADR-0041](../../reference/architecture/adrs/core/0041-dual-engine-policy-evaluation.md) for details.
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
81
213
 
82
214
  **Examples:**
83
215
 
84
216
  ```bash
85
- # Basic validation
217
+ # Basic compliance check
86
218
  smart-cli validate
87
219
 
88
- # JSON output for automation
89
- smart-cli validate --format json
220
+ # JSON output for CI
221
+ smart-cli validate --format json --output report.json
90
222
 
91
- # Table output for humans
92
- 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
93
228
 
94
- # Validate specific ruleset
95
- 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
96
243
  ```
97
244
 
245
+ ---
246
+
98
247
  ### adr
99
248
 
100
- Manage Architecture Decision Records.
249
+ Manages Architecture Decision Records.
101
250
 
102
251
  ```bash
103
- smart-cli adr <command>
252
+ smart-cli adr [options]
104
253
 
105
- Commands:
106
- create Create new ADR
107
- list List all ADRs
108
- get Show ADR details
109
- update Update existing ADR
110
- 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
111
263
  ```
112
264
 
113
265
  **Examples:**
114
266
 
115
267
  ```bash
116
- # Create new ADR
117
- smart-cli adr create
268
+ # Interactive creation
269
+ smart-cli adr --create
118
270
 
119
- # List all ADRs
120
- smart-cli adr list
271
+ # List all
272
+ smart-cli adr --list
121
273
 
122
- # Get specific ADR
123
- 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
124
282
  ```
125
283
 
284
+ ---
285
+
126
286
  ### standards
127
287
 
128
- Manage governance standards.
288
+ Manages Evolith governance standards (architecture, governance, operations).
129
289
 
130
290
  ```bash
131
- smart-cli standards <command>
291
+ smart-cli standards [options]
132
292
 
133
- Commands:
134
- init Initialize standards directory
135
- list List all standards
136
- get Show standard details
137
- validate Validate against standards
138
- 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
139
301
  ```
140
302
 
141
303
  **Examples:**
142
304
 
143
305
  ```bash
144
- # Initialize standards
145
- smart-cli standards init
306
+ # Initialize
307
+ smart-cli standards --init
308
+
309
+ # List all standards
310
+ smart-cli standards --list
146
311
 
147
- # List standards
148
- 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
149
317
  ```
150
318
 
319
+ ---
320
+
151
321
  ### agents
152
322
 
153
- Install and manage Evolith agents.
323
+ Manages Evolith BMAD agents — installs, lists, and removes governance agents in the satellite repository.
154
324
 
155
325
  ```bash
156
- smart-cli agents <command>
326
+ smart-cli agents [options]
157
327
 
158
- Commands:
159
- install Install new agent
160
- list List installed agents
161
- remove Remove agent
162
- validate Validate agent ruleset
163
- 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
164
333
  ```
165
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
+
166
343
  **Examples:**
167
344
 
168
345
  ```bash
346
+ # List installed agents
347
+ smart-cli agents --list
348
+
169
349
  # Interactive install
170
- 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
393
+
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
510
+ ```
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
171
785
 
172
- # List agents
173
- smart-cli agents list
786
+ # Upgrade to F2
787
+ smart-cli upgrade --target F2
788
+
789
+ # Force upgrade ignoring eligibility checks
790
+ smart-cli upgrade --target F3 --force
174
791
  ```
175
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
+
176
823
  ### history
177
824
 
178
- View and manage command history.
825
+ Views and manages CLI command execution history.
179
826
 
180
827
  ```bash
181
828
  smart-cli history [options]
182
829
 
183
830
  Options:
184
- --list List recent commands
185
- --get <id> Show command details
186
- --search <query> Search commands
187
- --stats Show statistics
188
- --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
189
838
  ```
190
839
 
191
840
  **Examples:**
@@ -194,61 +843,103 @@ Options:
194
843
  # Show last 20 commands
195
844
  smart-cli history
196
845
 
846
+ # Show last 50
847
+ smart-cli history --limit 50
848
+
849
+ # Search for validate runs
850
+ smart-cli history --search validate
851
+
197
852
  # Show statistics
198
853
  smart-cli history --stats
199
854
 
200
- # Search commands
201
- smart-cli history --search validate
855
+ # Clear history
856
+ smart-cli history --clear
202
857
  ```
203
858
 
859
+ ---
860
+
204
861
  ### completion
205
862
 
206
- Generate shell completion scripts.
863
+ Generates and installs shell completion scripts. Also provides shell hook functions for context and status display.
207
864
 
208
865
  ```bash
209
- smart-cli completion --install <shell>
866
+ smart-cli completion [options]
210
867
 
211
- 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
212
872
  ```
213
873
 
214
874
  **Examples:**
215
875
 
216
876
  ```bash
877
+ # Install zsh completion
878
+ smart-cli completion --install zsh
879
+
217
880
  # Install bash completion
218
881
  smart-cli completion --install bash
219
882
 
220
- # Install zsh completion
221
- 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
222
891
  ```
223
892
 
224
- ## 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
+ ---
225
901
 
226
- The Evolith CLI includes an MCP server for AI agent integration.
902
+ ## MCP Server
227
903
 
228
- ### Starting the MCP Server
904
+ The Evolith CLI includes a production-ready MCP server for AI agent integration.
905
+
906
+ ### Starting the Server
229
907
 
230
908
  ```bash
909
+ # stdio transport (default — for Cursor, Claude Desktop)
231
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>
232
917
  ```
233
918
 
234
- The server communicates via stdio JSON-RPC.
919
+ ```bash
920
+ smart-cli mcp serve [options]
235
921
 
236
- ### MCP Smoke Test
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
+ ```
237
928
 
238
- Use the smoke test before releases or MCP protocol changes:
929
+ ### Smoke Test
239
930
 
240
931
  ```bash
241
932
  npm run mcp:smoke
242
933
  ```
243
934
 
244
- The smoke verifies `initialize`, `tools/list`, `resources/list`, `prompts/list`, and a real `tools/call` through the built CLI.
935
+ Verifies `initialize`, `tools/list`, `resources/list`, `prompts/list`, and a real `tools/call` end-to-end through the built CLI.
245
936
 
246
937
  ### Available MCP Tools
247
938
 
248
939
  | Tool | Description |
249
940
  |------|-------------|
250
941
  | `evolith-validate` | Validate repository compliance |
251
- | `evolith-agent-install` | Install new agent |
942
+ | `evolith-agent-install` | Install a new BMAD agent |
252
943
  | `evolith-agent-list` | List installed agents |
253
944
  | `evolith-agent-validate` | Validate agent ruleset |
254
945
  | `evolith-agent-upgrade` | Upgrade an existing agent |
@@ -256,8 +947,8 @@ The smoke verifies `initialize`, `tools/list`, `resources/list`, `prompts/list`,
256
947
  | `evolith-architecture-validate` | Validate architecture (F1/F2/F3) with optional deep analysis |
257
948
  | `evolith-sdlc-handoff` | Generate phase handoff artifact manifest |
258
949
  | `evolith-sdlc-status` | Show SDLC phase gate status |
259
- | `evolith-config-get` | Get configuration value from `evolith.yaml` |
260
- | `evolith-config-set` | Set configuration value in `evolith.yaml` |
950
+ | `evolith-config-get` | Get a configuration value from `evolith.yaml` |
951
+ | `evolith-config-set` | Set a configuration value in `evolith.yaml` |
261
952
  | `evolith-metrics` | Get MCP server metrics |
262
953
  | `evolith-moscow-create` | Create a new MoSCoW prioritization analysis |
263
954
  | `evolith-moscow-load` | Load an existing MoSCoW analysis |
@@ -297,37 +988,63 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
297
988
  }
298
989
  ```
299
990
 
300
- ## AI Agent Workflow Example
301
-
302
- When integrated with an AI agent, you can have conversations like:
991
+ ### HTTP Transport (remote deployment)
303
992
 
993
+ ```json
994
+ {
995
+ "mcpServers": {
996
+ "evolith": {
997
+ "url": "http://localhost:3000",
998
+ "headers": { "x-api-key": "<secret>" }
999
+ }
1000
+ }
1001
+ }
304
1002
  ```
305
- You: Validate my repository
306
- Agent: Let me run the validation...
307
1003
 
308
- await mcp.callTool('evolith-validate', {
309
- path: '/user/project',
310
- format: 'summary'
311
- })
1004
+ ---
312
1005
 
313
- Result: Repository is compliant with Evolith standards
314
- Rules checked: 12
315
- All gates passed
1006
+ ## CI/CD Integration
316
1007
 
317
- You: Show me the SDLC status
318
- Agent: Let me check the phase gate status...
1008
+ ### SDLC Phase Validation (GT-281 Pipeline)
319
1009
 
320
- await mcp.callTool('evolith-sdlc-status', {
321
- path: '/user/project'
322
- })
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
+ ```
323
1017
 
324
- Result: Phase 1 3 gates passed, 0 failed
325
- All evidence artifacts present
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
326
1027
  ```
327
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
+
328
1045
  ## Configuration
329
1046
 
330
- Evolith uses an `evolith.yaml` file in the repository root:
1047
+ Evolith uses `evolith.yaml` in `.evolith/` or the repository root:
331
1048
 
332
1049
  ```yaml
333
1050
  coreRef:
@@ -346,96 +1063,113 @@ product:
346
1063
  runtime: "typescript"
347
1064
  ```
348
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
+
349
1081
  ## Output Formats
350
1082
 
351
- All commands support multiple output formats:
1083
+ Most commands accept `--format`:
352
1084
 
353
1085
  ```bash
354
- # JSON (default for automation)
355
- 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
356
1091
 
357
- # Table (human-readable)
1092
+ # Table
358
1093
  smart-cli validate --format table
359
1094
 
360
- # YAML (pipeline integration)
1095
+ # YAML
361
1096
  smart-cli validate --format yaml
362
1097
 
363
- # Markdown (documentation)
364
- smart-cli validate --format markdown
1098
+ # JSON (ADR-0073 envelope — for automation and CI)
1099
+ smart-cli validate --format json
365
1100
  ```
366
1101
 
367
- ## Troubleshooting
368
-
369
- ### Command not found
1102
+ ---
370
1103
 
371
- If `evolith` is not found after installation, ensure npm's global bin is in your PATH:
1104
+ ## Troubleshooting
372
1105
 
1106
+ **Command not found after install:**
373
1107
  ```bash
374
- # Add to ~/.bashrc or ~/.zshrc
375
1108
  export PATH="$(npm config get prefix)/bin:$PATH"
376
1109
  ```
377
1110
 
378
- ### MCP server not responding
379
-
380
- Ensure the MCP server is running:
381
-
1111
+ **Validation fails with no evolith.yaml:**
382
1112
  ```bash
383
- smart-cli mcp serve &
1113
+ smart-cli docs # scaffold evolith.yaml and base docs
1114
+ smart-cli validate
384
1115
  ```
385
1116
 
386
- ### Validation fails
387
-
388
- Check your `evolith.yaml` exists and is valid:
389
-
1117
+ **MCP server not responding:**
390
1118
  ```bash
391
- cat evolith.yaml
392
- smart-cli validate --verbose
1119
+ smart-cli mcp serve --no-confirm
393
1120
  ```
394
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
+
395
1127
  ## Development
396
1128
 
397
- ### Building from Source
1129
+ ### Build from Source
398
1130
 
399
1131
  ```bash
400
1132
  cd sdk/cli
401
1133
  npm install
402
1134
  npm run build
403
- npm link # Link globally for testing
1135
+ npm link
404
1136
  ```
405
1137
 
406
- ### Running Tests
1138
+ ### Tests
407
1139
 
408
1140
  ```bash
409
- # Run all tests
410
- npm test
411
-
412
- # Run with coverage report
413
- npm run test:cov
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
414
1146
  ```
415
1147
 
416
- **Coverage (as of v0.0.3-beta):** 88.7% statements · 89.8% lines · 77.0% branches · 83.6% functions · 1 369 tests
417
-
418
1148
  ### Project Structure
419
1149
 
420
1150
  ```
421
1151
  sdk/cli/
422
1152
  ├── src/
423
- │ ├── commands/ # CLI commands (adr, validate, agents, etc.)
424
- │ ├── application/ # Use cases
425
- │ ├── domain/ # Business logic (services, entities)
426
- │ ├── infrastructure/# External integrations (catalog, CLI)
427
- │ └── core/ # Shared (DI, observability, errors, MCP)
428
- ├── shell/ # Shell completion scripts
429
- ├── templates/ # Configuration templates
430
- └── 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
431
1162
  ```
432
1163
 
433
- ## Documentation
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
434
1171
 
435
- - [SMART CLI Demo Guide](docs/SMART-CLI-DEMO.md) - Comprehensive guide covering all commands, SDLC flow, product types, MCP integration, and architecture validation
436
- - [Vision](docs/VISION.md) - CLI vision and roadmap
437
- - [Data Models](docs/data-models.md) - Domain data models
438
- - [MCP Integration](docs/MCP-INTEGRATION.md) - MCP server integration details
1172
+ ---
439
1173
 
440
1174
  ## Contributing
441
1175
 
@@ -444,12 +1178,14 @@ sdk/cli/
444
1178
  3. Make changes with tests
445
1179
  4. Submit a pull request
446
1180
 
1181
+ ---
1182
+
447
1183
  ## License
448
1184
 
449
- ISC
1185
+ MIT
450
1186
 
451
1187
  ## Support
452
1188
 
453
- - [Documentation](https://github.com/beyondnetcode/evolith_arch32#readme)
454
1189
  - [Issue Tracker](https://github.com/beyondnetcode/evolith_arch32/issues)
455
1190
  - [Discussions](https://github.com/beyondnetcode/evolith_arch32/discussions)
1191
+ - [Documentation](https://github.com/beyondnetcode/evolith_arch32#readme)