depwire-cli 0.9.20 → 0.9.21

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/README.md CHANGED
@@ -144,31 +144,48 @@ Settings → Features → Experimental → Enable MCP → Add Server:
144
144
  | `get_health_score` | Get 0-100 dependency health score with recommendations |
145
145
  | `find_dead_code` | Find dead code — symbols defined but never referenced |
146
146
  | `get_temporal_graph` | Show how the graph evolved over git history |
147
- | `simulate_change` | Simulate architectural changes before touching code |
147
+ | `simulate_change` | Simulate a move/delete/rename/split/merge before touching code. Returns health score delta, broken imports, and affected nodes. Zero file I/O. |
148
148
 
149
- ## What If Simulation
149
+ ## SDK
150
150
 
151
- Simulate architectural changes before touching a single line of code.
151
+ depwire-cli exposes a public SDK for programmatic use:
152
152
 
153
153
  ```bash
154
- # What breaks if I delete this file?
155
- depwire whatif . --simulate delete --target src/services/auth.ts
156
-
157
- # What happens if I move this file?
158
- depwire whatif . --simulate move --target src/utils/helpers.ts --destination src/core/helpers.ts
154
+ npm install depwire-cli
155
+ ```
159
156
 
160
- # What happens if I rename this file?
161
- depwire whatif . --simulate rename --target src/router.ts --new-name routes.ts
157
+ ```typescript
158
+ import {
159
+ parseProject,
160
+ buildGraph,
161
+ calculateHealthScore,
162
+ analyzeDeadCode,
163
+ generateDocs,
164
+ SimulationEngine,
165
+ searchSymbols,
166
+ getImpact,
167
+ getArchitectureSummary,
168
+ DepwireSDKVersion
169
+ } from 'depwire-cli/sdk';
162
170
  ```
163
171
 
164
- Each simulation returns:
165
- - **Health score delta**does this change improve or degrade your architecture?
166
- - **Broken imports** — exactly which files would break and why
167
- - **Affected nodes** — full blast radius of the change
168
- - **Circular deps introduced or resolved**
169
- - **Edge changes** added and removed dependency connections
172
+ The SDK is the stable public API surface. All cloud and tooling integrations
173
+ should import from `depwire-cli/sdk`never from internal paths.
174
+
175
+ ## What If Simulation
176
+
177
+ Simulate architectural changes before touching any code:
178
+
179
+ ```bash
180
+ depwire whatif . --simulate delete --target src/utils/encode.ts
181
+ depwire whatif . --simulate move --target src/utils/encode.ts --destination src/core/encode.ts
182
+ depwire whatif . --simulate rename --target src/utils/encode.ts --destination src/utils/encoder.ts
183
+ depwire whatif . --simulate split --target src/services/auth.ts --symbols "validateToken,refreshToken"
184
+ depwire whatif . --simulate merge --target src/utils/helpers.ts --merge-target src/utils/formatters.ts
185
+ ```
170
186
 
171
- Supported actions: `move`, `delete`, `rename`, `split`, `merge`
187
+ Returns: health score delta, broken imports, affected nodes, circular deps introduced/resolved.
188
+ Also available as MCP tool `simulate_change` for AI coding assistants.
172
189
 
173
190
  ## Why Depwire
174
191