@evolith/smart-cli 0.0.1-beta
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.
- package/ARCHITECTURE.md +121 -0
- package/README.es.md +425 -0
- package/README.md +419 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +59 -0
- package/dist/app.module.js.map +1 -0
- package/dist/application/services/index.d.ts +54 -0
- package/dist/application/services/index.js +307 -0
- package/dist/application/services/index.js.map +1 -0
- package/dist/application/services/services.test.d.ts +1 -0
- package/dist/application/services/services.test.js +176 -0
- package/dist/application/services/services.test.js.map +1 -0
- package/dist/application/use-cases/validate-satellite.use-case.d.ts +18 -0
- package/dist/application/use-cases/validate-satellite.use-case.js +92 -0
- package/dist/application/use-cases/validate-satellite.use-case.js.map +1 -0
- package/dist/application/use-cases/validate-satellite.use-case.spec.d.ts +1 -0
- package/dist/application/use-cases/validate-satellite.use-case.spec.js +102 -0
- package/dist/application/use-cases/validate-satellite.use-case.spec.js.map +1 -0
- package/dist/commands/adr/adr.command.d.ts +28 -0
- package/dist/commands/adr/adr.command.js +357 -0
- package/dist/commands/adr/adr.command.js.map +1 -0
- package/dist/commands/architecture/scaffold.command.d.ts +7 -0
- package/dist/commands/architecture/scaffold.command.js +162 -0
- package/dist/commands/architecture/scaffold.command.js.map +1 -0
- package/dist/commands/commands.test.d.ts +1 -0
- package/dist/commands/commands.test.js +131 -0
- package/dist/commands/commands.test.js.map +1 -0
- package/dist/commands/completion/completion.command.d.ts +20 -0
- package/dist/commands/completion/completion.command.js +215 -0
- package/dist/commands/completion/completion.command.js.map +1 -0
- package/dist/commands/docs/docs.command.d.ts +9 -0
- package/dist/commands/docs/docs.command.js +77 -0
- package/dist/commands/docs/docs.command.js.map +1 -0
- package/dist/commands/history/history.command.d.ts +29 -0
- package/dist/commands/history/history.command.js +268 -0
- package/dist/commands/history/history.command.js.map +1 -0
- package/dist/commands/init/agents.command.d.ts +22 -0
- package/dist/commands/init/agents.command.js +502 -0
- package/dist/commands/init/agents.command.js.map +1 -0
- package/dist/commands/init/init.command.d.ts +20 -0
- package/dist/commands/init/init.command.js +329 -0
- package/dist/commands/init/init.command.js.map +1 -0
- package/dist/commands/init/upgrade.command.d.ts +9 -0
- package/dist/commands/init/upgrade.command.js +77 -0
- package/dist/commands/init/upgrade.command.js.map +1 -0
- package/dist/commands/mcp/mcp-serve.command.d.ts +15 -0
- package/dist/commands/mcp/mcp-serve.command.js +106 -0
- package/dist/commands/mcp/mcp-serve.command.js.map +1 -0
- package/dist/commands/sdlc/generate-domain.command.d.ts +5 -0
- package/dist/commands/sdlc/generate-domain.command.js +55 -0
- package/dist/commands/sdlc/generate-domain.command.js.map +1 -0
- package/dist/commands/sdlc/handoff.command.d.ts +22 -0
- package/dist/commands/sdlc/handoff.command.js +273 -0
- package/dist/commands/sdlc/handoff.command.js.map +1 -0
- package/dist/commands/sdlc/sdlc.command.d.ts +4 -0
- package/dist/commands/sdlc/sdlc.command.js +34 -0
- package/dist/commands/sdlc/sdlc.command.js.map +1 -0
- package/dist/commands/standards/standards.command.d.ts +27 -0
- package/dist/commands/standards/standards.command.js +308 -0
- package/dist/commands/standards/standards.command.js.map +1 -0
- package/dist/commands/validate/validate.command.d.ts +19 -0
- package/dist/commands/validate/validate.command.js +231 -0
- package/dist/commands/validate/validate.command.js.map +1 -0
- package/dist/config/runtimes.json +196 -0
- package/dist/config/tool-catalog.json +343 -0
- package/dist/core/abstractions/index.d.ts +6 -0
- package/dist/core/abstractions/index.js +23 -0
- package/dist/core/abstractions/index.js.map +1 -0
- package/dist/core/abstractions/interfaces.d.ts +60 -0
- package/dist/core/abstractions/interfaces.js +5 -0
- package/dist/core/abstractions/interfaces.js.map +1 -0
- package/dist/core/abstractions/providers/config-parser.provider.d.ts +15 -0
- package/dist/core/abstractions/providers/config-parser.provider.js +68 -0
- package/dist/core/abstractions/providers/config-parser.provider.js.map +1 -0
- package/dist/core/abstractions/providers/logger.provider.d.ts +10 -0
- package/dist/core/abstractions/providers/logger.provider.js +84 -0
- package/dist/core/abstractions/providers/logger.provider.js.map +1 -0
- package/dist/core/abstractions/providers/mock-filesystem.provider.d.ts +30 -0
- package/dist/core/abstractions/providers/mock-filesystem.provider.js +122 -0
- package/dist/core/abstractions/providers/mock-filesystem.provider.js.map +1 -0
- package/dist/core/abstractions/providers/node-filesystem.provider.d.ts +19 -0
- package/dist/core/abstractions/providers/node-filesystem.provider.js +104 -0
- package/dist/core/abstractions/providers/node-filesystem.provider.js.map +1 -0
- package/dist/core/architecture/nx-workspace.strategy.d.ts +11 -0
- package/dist/core/architecture/nx-workspace.strategy.js +107 -0
- package/dist/core/architecture/nx-workspace.strategy.js.map +1 -0
- package/dist/core/architecture/workspace-manager.strategy.d.ts +7 -0
- package/dist/core/architecture/workspace-manager.strategy.js +3 -0
- package/dist/core/architecture/workspace-manager.strategy.js.map +1 -0
- package/dist/core/config/config.service.d.ts +15 -0
- package/dist/core/config/config.service.js +55 -0
- package/dist/core/config/config.service.js.map +1 -0
- package/dist/core/config/config.service.spec.d.ts +1 -0
- package/dist/core/config/config.service.spec.js +43 -0
- package/dist/core/config/config.service.spec.js.map +1 -0
- package/dist/core/di/container.d.ts +25 -0
- package/dist/core/di/container.js +87 -0
- package/dist/core/di/container.js.map +1 -0
- package/dist/core/di/container.spec.d.ts +1 -0
- package/dist/core/di/container.spec.js +137 -0
- package/dist/core/di/container.spec.js.map +1 -0
- package/dist/core/errors/index.d.ts +26 -0
- package/dist/core/errors/index.js +67 -0
- package/dist/core/errors/index.js.map +1 -0
- package/dist/core/filesystem/file-manager.service.d.ts +4 -0
- package/dist/core/filesystem/file-manager.service.js +96 -0
- package/dist/core/filesystem/file-manager.service.js.map +1 -0
- package/dist/core/filesystem/file-manager.service.spec.d.ts +1 -0
- package/dist/core/filesystem/file-manager.service.spec.js +103 -0
- package/dist/core/filesystem/file-manager.service.spec.js.map +1 -0
- package/dist/core/mcp/mcp-server.service.d.ts +7 -0
- package/dist/core/mcp/mcp-server.service.js +31 -0
- package/dist/core/mcp/mcp-server.service.js.map +1 -0
- package/dist/core/mcp/metrics.service.d.ts +37 -0
- package/dist/core/mcp/metrics.service.js +72 -0
- package/dist/core/mcp/metrics.service.js.map +1 -0
- package/dist/core/mcp/prompts/index.d.ts +22 -0
- package/dist/core/mcp/prompts/index.js +175 -0
- package/dist/core/mcp/prompts/index.js.map +1 -0
- package/dist/core/mcp/resources/index.d.ts +11 -0
- package/dist/core/mcp/resources/index.js +193 -0
- package/dist/core/mcp/resources/index.js.map +1 -0
- package/dist/core/mcp/server.d.ts +25 -0
- package/dist/core/mcp/server.js +413 -0
- package/dist/core/mcp/server.js.map +1 -0
- package/dist/core/mcp/tools/agent.d.ts +41 -0
- package/dist/core/mcp/tools/agent.js +195 -0
- package/dist/core/mcp/tools/agent.js.map +1 -0
- package/dist/core/mcp/tools/architecture.d.ts +27 -0
- package/dist/core/mcp/tools/architecture.js +166 -0
- package/dist/core/mcp/tools/architecture.js.map +1 -0
- package/dist/core/mcp/tools/sdlc.d.ts +32 -0
- package/dist/core/mcp/tools/sdlc.js +189 -0
- package/dist/core/mcp/tools/sdlc.js.map +1 -0
- package/dist/core/mcp/tools/tool-utils.d.ts +4 -0
- package/dist/core/mcp/tools/tool-utils.js +18 -0
- package/dist/core/mcp/tools/tool-utils.js.map +1 -0
- package/dist/core/mcp/tools/validate.d.ts +18 -0
- package/dist/core/mcp/tools/validate.js +56 -0
- package/dist/core/mcp/tools/validate.js.map +1 -0
- package/dist/core/mcp/watcher.service.d.ts +8 -0
- package/dist/core/mcp/watcher.service.js +82 -0
- package/dist/core/mcp/watcher.service.js.map +1 -0
- package/dist/core/mcp/watcher.service.spec.d.ts +1 -0
- package/dist/core/mcp/watcher.service.spec.js +70 -0
- package/dist/core/mcp/watcher.service.spec.js.map +1 -0
- package/dist/core/observability/command-watcher.d.ts +45 -0
- package/dist/core/observability/command-watcher.js +168 -0
- package/dist/core/observability/command-watcher.js.map +1 -0
- package/dist/core/observability/error-reporter.d.ts +47 -0
- package/dist/core/observability/error-reporter.js +163 -0
- package/dist/core/observability/error-reporter.js.map +1 -0
- package/dist/core/observability/index.d.ts +4 -0
- package/dist/core/observability/index.js +24 -0
- package/dist/core/observability/index.js.map +1 -0
- package/dist/core/observability/observability.test.d.ts +1 -0
- package/dist/core/observability/observability.test.js +224 -0
- package/dist/core/observability/observability.test.js.map +1 -0
- package/dist/core/observability/structured-logger.d.ts +53 -0
- package/dist/core/observability/structured-logger.js +123 -0
- package/dist/core/observability/structured-logger.js.map +1 -0
- package/dist/core/observability/timing.d.ts +23 -0
- package/dist/core/observability/timing.js +140 -0
- package/dist/core/observability/timing.js.map +1 -0
- package/dist/core/services/command-executor.service.d.ts +3 -0
- package/dist/core/services/command-executor.service.js +12 -0
- package/dist/core/services/command-executor.service.js.map +1 -0
- package/dist/core/services/command-history.service.d.ts +38 -0
- package/dist/core/services/command-history.service.js +146 -0
- package/dist/core/services/command-history.service.js.map +1 -0
- package/dist/core/services/command-providers.d.ts +1 -0
- package/dist/core/services/command-providers.js +17 -0
- package/dist/core/services/command-providers.js.map +1 -0
- package/dist/core/services/runtime-catalog.service.d.ts +2 -0
- package/dist/core/services/runtime-catalog.service.js +7 -0
- package/dist/core/services/runtime-catalog.service.js.map +1 -0
- package/dist/core/sync/sync.service.d.ts +4 -0
- package/dist/core/sync/sync.service.js +81 -0
- package/dist/core/sync/sync.service.js.map +1 -0
- package/dist/core/sync/sync.service.spec.d.ts +1 -0
- package/dist/core/sync/sync.service.spec.js +63 -0
- package/dist/core/sync/sync.service.spec.js.map +1 -0
- package/dist/core/validators/ruleset-validator.service.d.ts +56 -0
- package/dist/core/validators/ruleset-validator.service.js +263 -0
- package/dist/core/validators/ruleset-validator.service.js.map +1 -0
- package/dist/core/validators/ruleset-validator.service.spec.d.ts +1 -0
- package/dist/core/validators/ruleset-validator.service.spec.js +121 -0
- package/dist/core/validators/ruleset-validator.service.spec.js.map +1 -0
- package/dist/domain/entities/index.d.ts +72 -0
- package/dist/domain/entities/index.js +119 -0
- package/dist/domain/entities/index.js.map +1 -0
- package/dist/domain/interfaces.d.ts +224 -0
- package/dist/domain/interfaces.js +3 -0
- package/dist/domain/interfaces.js.map +1 -0
- package/dist/domain/services/adr.service.d.ts +50 -0
- package/dist/domain/services/adr.service.js +125 -0
- package/dist/domain/services/adr.service.js.map +1 -0
- package/dist/domain/services/agent-registry.service.d.ts +26 -0
- package/dist/domain/services/agent-registry.service.js +152 -0
- package/dist/domain/services/agent-registry.service.js.map +1 -0
- package/dist/domain/services/index.d.ts +33 -0
- package/dist/domain/services/index.js +126 -0
- package/dist/domain/services/index.js.map +1 -0
- package/dist/domain/services/services.test.d.ts +1 -0
- package/dist/domain/services/services.test.js +236 -0
- package/dist/domain/services/services.test.js.map +1 -0
- package/dist/domain/services/standards.service.d.ts +47 -0
- package/dist/domain/services/standards.service.js +129 -0
- package/dist/domain/services/standards.service.js.map +1 -0
- package/dist/domain/services/tool-usage-telemetry.service.d.ts +46 -0
- package/dist/domain/services/tool-usage-telemetry.service.js +181 -0
- package/dist/domain/services/tool-usage-telemetry.service.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.d.ts +22 -0
- package/dist/infrastructure/catalog/catalog-loader.js +135 -0
- package/dist/infrastructure/catalog/catalog-loader.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.test.d.ts +1 -0
- package/dist/infrastructure/catalog/catalog-loader.test.js +184 -0
- package/dist/infrastructure/catalog/catalog-loader.test.js.map +1 -0
- package/dist/infrastructure/cli/command-executor.d.ts +20 -0
- package/dist/infrastructure/cli/command-executor.js +109 -0
- package/dist/infrastructure/cli/command-executor.js.map +1 -0
- package/dist/infrastructure/cli/command-executor.test.d.ts +1 -0
- package/dist/infrastructure/cli/command-executor.test.js +98 -0
- package/dist/infrastructure/cli/command-executor.test.js.map +1 -0
- package/dist/infrastructure/cli/providers/index.d.ts +52 -0
- package/dist/infrastructure/cli/providers/index.js +175 -0
- package/dist/infrastructure/cli/providers/index.js.map +1 -0
- package/dist/infrastructure/formatters/output-formatter.service.d.ts +28 -0
- package/dist/infrastructure/formatters/output-formatter.service.js +198 -0
- package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +10 -0
- package/dist/main.js.map +1 -0
- package/dist/test/mocks/index.d.ts +44 -0
- package/dist/test/mocks/index.js +135 -0
- package/dist/test/mocks/index.js.map +1 -0
- package/package.json +80 -0
- package/shell/completion.bash +85 -0
- package/shell/completion.fish +72 -0
- package/shell/completion.zsh +83 -0
- package/templates/evolith.yaml.example +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
# Evolith CLI
|
|
2
|
+
|
|
3
|
+
Command-line interface for Evolith governance, standards validation, and AI agent integration.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
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
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### npm (Recommended)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @evolith/smart-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Manual
|
|
21
|
+
|
|
22
|
+
Download the latest binary from [GitHub Releases](https://github.com/beyondnetcode/evolith_arch32/releases) and add to your PATH.
|
|
23
|
+
|
|
24
|
+
### Verify Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
smart-cli --version
|
|
28
|
+
# smart-cli version 0.0.1-beta
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quickstart
|
|
32
|
+
|
|
33
|
+
### 1. Initialize a Repository
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd your-project
|
|
37
|
+
smart-cli init
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This creates an `evolith.yaml` file with default configuration.
|
|
41
|
+
|
|
42
|
+
### 2. Run First Validation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
smart-cli validate
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Output:
|
|
49
|
+
```
|
|
50
|
+
✓ Validating repository...
|
|
51
|
+
✓ Repository is compliant with Evolith standards
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Install an Agent
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
smart-cli agents install
|
|
58
|
+
# Select "standard" template when prompted
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
### validate
|
|
64
|
+
|
|
65
|
+
Validate repository compliance against Evolith standards.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
smart-cli validate [options]
|
|
69
|
+
|
|
70
|
+
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
|
+
```
|
|
77
|
+
|
|
78
|
+
**Examples:**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Basic validation
|
|
82
|
+
smart-cli validate
|
|
83
|
+
|
|
84
|
+
# JSON output for automation
|
|
85
|
+
smart-cli validate --format json
|
|
86
|
+
|
|
87
|
+
# Table output for humans
|
|
88
|
+
smart-cli validate --format table
|
|
89
|
+
|
|
90
|
+
# Validate specific ruleset
|
|
91
|
+
smart-cli validate --ruleset acl
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### adr
|
|
95
|
+
|
|
96
|
+
Manage Architecture Decision Records.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
smart-cli adr <command>
|
|
100
|
+
|
|
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
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Examples:**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Create new ADR
|
|
113
|
+
smart-cli adr create
|
|
114
|
+
|
|
115
|
+
# List all ADRs
|
|
116
|
+
smart-cli adr list
|
|
117
|
+
|
|
118
|
+
# Get specific ADR
|
|
119
|
+
smart-cli adr get ADR-0002
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### standards
|
|
123
|
+
|
|
124
|
+
Manage governance standards.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
smart-cli standards <command>
|
|
128
|
+
|
|
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
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Examples:**
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Initialize standards
|
|
141
|
+
smart-cli standards init
|
|
142
|
+
|
|
143
|
+
# List standards
|
|
144
|
+
smart-cli standards list
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### agents
|
|
148
|
+
|
|
149
|
+
Install and manage Evolith agents.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
smart-cli agents <command>
|
|
153
|
+
|
|
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
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Examples:**
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Interactive install
|
|
166
|
+
smart-cli agents install
|
|
167
|
+
|
|
168
|
+
# List agents
|
|
169
|
+
smart-cli agents list
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### history
|
|
173
|
+
|
|
174
|
+
View and manage command history.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
smart-cli history [options]
|
|
178
|
+
|
|
179
|
+
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
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Examples:**
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Show last 20 commands
|
|
191
|
+
smart-cli history
|
|
192
|
+
|
|
193
|
+
# Show statistics
|
|
194
|
+
smart-cli history --stats
|
|
195
|
+
|
|
196
|
+
# Search commands
|
|
197
|
+
smart-cli history --search validate
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### completion
|
|
201
|
+
|
|
202
|
+
Generate shell completion scripts.
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
smart-cli completion --install <shell>
|
|
206
|
+
|
|
207
|
+
Supported shells: bash, zsh, fish
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Examples:**
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Install bash completion
|
|
214
|
+
smart-cli completion --install bash
|
|
215
|
+
|
|
216
|
+
# Install zsh completion
|
|
217
|
+
smart-cli completion --install zsh
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## MCP Server (AI Agent Integration)
|
|
221
|
+
|
|
222
|
+
The Evolith CLI includes an MCP server for AI agent integration.
|
|
223
|
+
|
|
224
|
+
### Starting the MCP Server
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
smart-cli mcp serve
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
The server communicates via stdio JSON-RPC.
|
|
231
|
+
|
|
232
|
+
### Available MCP Tools
|
|
233
|
+
|
|
234
|
+
| Tool | Description |
|
|
235
|
+
|------|-------------|
|
|
236
|
+
| `evolith-validate` | Validate repository compliance |
|
|
237
|
+
| `evolith-agent-install` | Install new agent |
|
|
238
|
+
| `evolith-agent-list` | List installed agents |
|
|
239
|
+
| `evolith-agent-validate` | Validate agent ruleset |
|
|
240
|
+
| `evolith-architecture-validate` | Validate architecture |
|
|
241
|
+
| `evolith-sdlc-handoff` | Generate phase handoff |
|
|
242
|
+
| `evolith-sdlc-status` | Show SDLC phase status |
|
|
243
|
+
| `evolith-config-get` | Get configuration value |
|
|
244
|
+
| `evolith-config-set` | Set configuration value |
|
|
245
|
+
| `evolith-metrics` | Get MCP server metrics |
|
|
246
|
+
|
|
247
|
+
### Cursor AI Configuration
|
|
248
|
+
|
|
249
|
+
Add to `~/.cursor/mcp.json`:
|
|
250
|
+
|
|
251
|
+
```json
|
|
252
|
+
{
|
|
253
|
+
"mcpServers": {
|
|
254
|
+
"evolith": {
|
|
255
|
+
"command": "smart-cli",
|
|
256
|
+
"args": ["mcp", "serve"]
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Claude Desktop Configuration
|
|
263
|
+
|
|
264
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"mcpServers": {
|
|
269
|
+
"evolith": {
|
|
270
|
+
"command": "smart-cli",
|
|
271
|
+
"args": ["mcp", "serve"]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## AI Agent Workflow Example
|
|
278
|
+
|
|
279
|
+
When integrated with an AI agent, you can have conversations like:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
You: Validate my repository
|
|
283
|
+
Agent: Let me run the validation...
|
|
284
|
+
|
|
285
|
+
await mcp.callTool('evolith-validate', {
|
|
286
|
+
path: '/user/project',
|
|
287
|
+
format: 'summary'
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
Result: ✓ Repository is compliant with Evolith standards
|
|
291
|
+
Rules checked: 12
|
|
292
|
+
All gates passed
|
|
293
|
+
|
|
294
|
+
You: Show me the ADRs
|
|
295
|
+
Agent: Let me fetch the ADR list...
|
|
296
|
+
|
|
297
|
+
await mcp.callTool('evolith-adr-list', {})
|
|
298
|
+
|
|
299
|
+
Result: Found 5 ADRs:
|
|
300
|
+
- ADR-0001: Architecture Decision Record Template
|
|
301
|
+
- ADR-0002: Hexagonal Architecture (accepted)
|
|
302
|
+
- ADR-0003: Testing Pyramid (accepted)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Configuration
|
|
306
|
+
|
|
307
|
+
Evolith uses an `evolith.yaml` file in the repository root:
|
|
308
|
+
|
|
309
|
+
```yaml
|
|
310
|
+
coreRef:
|
|
311
|
+
version: "1.0.0"
|
|
312
|
+
path: "../evolith"
|
|
313
|
+
|
|
314
|
+
governance:
|
|
315
|
+
version: "1.0"
|
|
316
|
+
adrRegistry:
|
|
317
|
+
- id: "ADR-0001"
|
|
318
|
+
status: "accepted"
|
|
319
|
+
|
|
320
|
+
product:
|
|
321
|
+
name: "my-project"
|
|
322
|
+
type: "library"
|
|
323
|
+
runtime: "typescript"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Output Formats
|
|
327
|
+
|
|
328
|
+
All commands support multiple output formats:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# JSON (default for automation)
|
|
332
|
+
smart-cli validate --format json
|
|
333
|
+
|
|
334
|
+
# Table (human-readable)
|
|
335
|
+
smart-cli validate --format table
|
|
336
|
+
|
|
337
|
+
# YAML (pipeline integration)
|
|
338
|
+
smart-cli validate --format yaml
|
|
339
|
+
|
|
340
|
+
# Markdown (documentation)
|
|
341
|
+
smart-cli validate --format markdown
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## Troubleshooting
|
|
345
|
+
|
|
346
|
+
### Command not found
|
|
347
|
+
|
|
348
|
+
If `evolith` is not found after installation, ensure npm's global bin is in your PATH:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
# Add to ~/.bashrc or ~/.zshrc
|
|
352
|
+
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### MCP server not responding
|
|
356
|
+
|
|
357
|
+
Ensure the MCP server is running:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
smart-cli mcp serve &
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Validation fails
|
|
364
|
+
|
|
365
|
+
Check your `evolith.yaml` exists and is valid:
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
cat evolith.yaml
|
|
369
|
+
smart-cli validate --verbose
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Development
|
|
373
|
+
|
|
374
|
+
### Building from Source
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
cd sdk/cli
|
|
378
|
+
npm install
|
|
379
|
+
npm run build
|
|
380
|
+
npm link # Link globally for testing
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Running Tests
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npm test
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Project Structure
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
sdk/cli/
|
|
393
|
+
├── 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
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
## Contributing
|
|
405
|
+
|
|
406
|
+
1. Fork the repository
|
|
407
|
+
2. Create a feature branch
|
|
408
|
+
3. Make changes with tests
|
|
409
|
+
4. Submit a pull request
|
|
410
|
+
|
|
411
|
+
## License
|
|
412
|
+
|
|
413
|
+
ISC
|
|
414
|
+
|
|
415
|
+
## Support
|
|
416
|
+
|
|
417
|
+
- [Documentation](https://github.com/beyondnetcode/evolith_arch32#readme)
|
|
418
|
+
- [Issue Tracker](https://github.com/beyondnetcode/evolith_arch32/issues)
|
|
419
|
+
- [Discussions](https://github.com/beyondnetcode/evolith_arch32/discussions)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AppModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const init_command_1 = require("./commands/init/init.command");
|
|
12
|
+
const agents_command_1 = require("./commands/init/agents.command");
|
|
13
|
+
const validate_command_1 = require("./commands/validate/validate.command");
|
|
14
|
+
const docs_command_1 = require("./commands/docs/docs.command");
|
|
15
|
+
const upgrade_command_1 = require("./commands/init/upgrade.command");
|
|
16
|
+
const mcp_serve_command_1 = require("./commands/mcp/mcp-serve.command");
|
|
17
|
+
const config_service_1 = require("./core/config/config.service");
|
|
18
|
+
const file_manager_service_1 = require("./core/filesystem/file-manager.service");
|
|
19
|
+
const sync_service_1 = require("./core/sync/sync.service");
|
|
20
|
+
const watcher_service_1 = require("./core/mcp/watcher.service");
|
|
21
|
+
const mcp_server_service_1 = require("./core/mcp/mcp-server.service");
|
|
22
|
+
const sdlc_command_1 = require("./commands/sdlc/sdlc.command");
|
|
23
|
+
const handoff_command_1 = require("./commands/sdlc/handoff.command");
|
|
24
|
+
const generate_domain_command_1 = require("./commands/sdlc/generate-domain.command");
|
|
25
|
+
const scaffold_command_1 = require("./commands/architecture/scaffold.command");
|
|
26
|
+
const adr_command_1 = require("./commands/adr/adr.command");
|
|
27
|
+
const standards_command_1 = require("./commands/standards/standards.command");
|
|
28
|
+
const completion_command_1 = require("./commands/completion/completion.command");
|
|
29
|
+
const history_command_1 = require("./commands/history/history.command");
|
|
30
|
+
let AppModule = class AppModule {
|
|
31
|
+
};
|
|
32
|
+
exports.AppModule = AppModule;
|
|
33
|
+
exports.AppModule = AppModule = __decorate([
|
|
34
|
+
(0, common_1.Module)({
|
|
35
|
+
imports: [],
|
|
36
|
+
providers: [
|
|
37
|
+
init_command_1.InitCommand,
|
|
38
|
+
agents_command_1.AgentsCommand,
|
|
39
|
+
validate_command_1.ValidateCommand,
|
|
40
|
+
docs_command_1.DocsCommand,
|
|
41
|
+
upgrade_command_1.UpgradeCommand,
|
|
42
|
+
mcp_serve_command_1.McpServeCommand,
|
|
43
|
+
config_service_1.ConfigService,
|
|
44
|
+
file_manager_service_1.FileManagerService,
|
|
45
|
+
sync_service_1.SyncService,
|
|
46
|
+
watcher_service_1.WatcherService,
|
|
47
|
+
mcp_server_service_1.McpServerService,
|
|
48
|
+
sdlc_command_1.SdlcCommand,
|
|
49
|
+
handoff_command_1.HandoffCommand,
|
|
50
|
+
generate_domain_command_1.GenerateDomainCommand,
|
|
51
|
+
scaffold_command_1.ScaffoldCommand,
|
|
52
|
+
adr_command_1.ADRCommand,
|
|
53
|
+
standards_command_1.StandardsCommand,
|
|
54
|
+
completion_command_1.CompletionCommand,
|
|
55
|
+
history_command_1.HistoryCommand,
|
|
56
|
+
],
|
|
57
|
+
})
|
|
58
|
+
], AppModule);
|
|
59
|
+
//# sourceMappingURL=app.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+DAA2D;AAC3D,mEAA+D;AAC/D,2EAAuE;AACvE,+DAA2D;AAC3D,qEAAiE;AACjE,wEAAmE;AACnE,iEAA6D;AAC7D,iFAA4E;AAC5E,2DAAuD;AACvD,gEAA4D;AAC5D,sEAAiE;AACjE,+DAA2D;AAC3D,qEAAiE;AACjE,qFAAgF;AAChF,+EAA2E;AAC3E,4DAAwD;AACxD,8EAA0E;AAC1E,iFAA6E;AAC7E,wEAAoE;AA0B7D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAxBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,SAAS,EAAE;YACT,0BAAW;YACX,8BAAa;YACb,kCAAe;YACf,0BAAW;YACX,gCAAc;YACd,mCAAe;YACf,8BAAa;YACb,yCAAkB;YAClB,0BAAW;YACX,gCAAc;YACd,qCAAgB;YAChB,0BAAW;YACX,gCAAc;YACd,+CAAqB;YACrB,kCAAe;YACf,wBAAU;YACV,oCAAgB;YAChB,sCAAiB;YACjB,gCAAc;SACf;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface InitProjectInput {
|
|
2
|
+
name: string;
|
|
3
|
+
runtime: string;
|
|
4
|
+
monorepo: string;
|
|
5
|
+
architecture: string;
|
|
6
|
+
database: string;
|
|
7
|
+
apiProtocol: string;
|
|
8
|
+
ciCd: string;
|
|
9
|
+
observability: string;
|
|
10
|
+
features: string[];
|
|
11
|
+
agents: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface InitProjectResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
artifacts: string[];
|
|
16
|
+
warnings: string[];
|
|
17
|
+
errors: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare class InitializeProjectUseCase {
|
|
20
|
+
private readonly fs;
|
|
21
|
+
private readonly phaseService;
|
|
22
|
+
constructor(fs: any);
|
|
23
|
+
execute(input: InitProjectInput, cwd: string): Promise<InitProjectResult>;
|
|
24
|
+
private scaffoldEvolithYaml;
|
|
25
|
+
private scaffoldReadme;
|
|
26
|
+
private scaffoldByRuntime;
|
|
27
|
+
private scaffoldNodeJs;
|
|
28
|
+
private scaffoldDotnet;
|
|
29
|
+
private scaffoldPython;
|
|
30
|
+
private checkRuntimePlatform;
|
|
31
|
+
}
|
|
32
|
+
export declare class PhaseTransitionUseCase {
|
|
33
|
+
private readonly fs;
|
|
34
|
+
private readonly phaseService;
|
|
35
|
+
constructor(fs: any);
|
|
36
|
+
execute(from: string, to: string, tools: string[], cwd: string): Promise<PhaseTransitionResult>;
|
|
37
|
+
private validateGates;
|
|
38
|
+
}
|
|
39
|
+
interface GateResult {
|
|
40
|
+
id: string;
|
|
41
|
+
passed: boolean;
|
|
42
|
+
description: string;
|
|
43
|
+
required: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface PhaseTransitionResult {
|
|
46
|
+
success: boolean;
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
gateResults: GateResult[];
|
|
50
|
+
executedTools: string[];
|
|
51
|
+
warnings: string[];
|
|
52
|
+
errors: string[];
|
|
53
|
+
}
|
|
54
|
+
export {};
|