@yottameta/yotta-dev-mcp-plugin 0.1.1 → 0.2.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.
@@ -6,8 +6,8 @@ Protocol support is dual-era:
6
6
  * modern: MCP 2026-07-28, server/discover + per-request _meta
7
7
  * legacy: initialize handshake with protocolVersion 2025-11-25
8
8
 
9
- The six tools in this first slice are local, deterministic and read-only:
10
- repo_map / find_code / compress_output / review_code / review_diff / mcp_doctor.
9
+ Tools are local, deterministic and read-only unless a tool explicitly documents
10
+ an opt-in write or an explicit execution flag.
11
11
  """
12
12
 
13
13
  import json
@@ -55,7 +55,8 @@ def _tool(name, arguments):
55
55
 
56
56
  TOOL_HANDLERS = {
57
57
  name: (lambda arguments, tool_name=name: _tool(tool_name, arguments))
58
- for name in ("repo_map", "find_code", "compress_output",
58
+ for name in ("repo_map", "system_model", "architecture_review", "impact_analysis",
59
+ "verify_change", "self_test", "run_adapter", "find_code", "compress_output",
59
60
  "review_code", "review_diff", "mcp_doctor",
60
61
  "scan_secrets", "scan_dependencies", "check_publish_readiness",
61
62
  "run_checks", "scaffold_skill", "workflow_state")
@@ -82,6 +83,230 @@ def mcp_tools():
82
83
  "additionalProperties": False,
83
84
  },
84
85
  },
86
+ {
87
+ "name": "system_model",
88
+ "description": (
89
+ "Build a deterministic system model (modules, imports, entrypoints, "
90
+ "tests, configs, data stores) and attach layer data from the "
91
+ ".yotta/architecture.json contract. Returns PASS, FAIL or UNKNOWN "
92
+ "plus the unknowns that still need evidence. Read-only."
93
+ ),
94
+ "inputSchema": {
95
+ "type": "object",
96
+ "properties": {
97
+ "path": {"type": "string", "description": "Repository or source directory"},
98
+ "max_files": {"type": "integer", "minimum": 1,
99
+ "description": "Maximum source files to inspect (default 2000)"},
100
+ "contract_file": {
101
+ "type": "string",
102
+ "description": "Contract path relative to the repository root "
103
+ "(default .yotta/architecture.json)",
104
+ },
105
+ },
106
+ "required": ["path"],
107
+ "additionalProperties": False,
108
+ },
109
+ },
110
+ {
111
+ "name": "architecture_review",
112
+ "description": (
113
+ "Review a local repository against the .yotta/architecture.json contract: "
114
+ "dependency rules, boundary visibility and data ownership, each finding "
115
+ "with file, line and severity. critical/high findings fail the review; "
116
+ "medium/low are advisory; unverifiable items become UNKNOWN. Read-only."
117
+ ),
118
+ "inputSchema": {
119
+ "type": "object",
120
+ "properties": {
121
+ "path": {"type": "string", "description": "Repository or source directory"},
122
+ "max_files": {"type": "integer", "minimum": 1,
123
+ "description": "Maximum source files to inspect (default 2000)"},
124
+ "contract_file": {
125
+ "type": "string",
126
+ "description": "Contract path relative to the repository root "
127
+ "(default .yotta/architecture.json)",
128
+ },
129
+ },
130
+ "required": ["path"],
131
+ "additionalProperties": False,
132
+ },
133
+ },
134
+ {
135
+ "name": "impact_analysis",
136
+ "description": (
137
+ "Build the change impact cone for local changes: reverse-dependency "
138
+ "consumers, affected layers, boundaries, data stores and invariants, "
139
+ "mapped tests, an explainable blast radius and rollback probes. Accepts "
140
+ "changed_files, a unified diff or target symbols. Read-only."
141
+ ),
142
+ "inputSchema": {
143
+ "type": "object",
144
+ "properties": {
145
+ "path": {"type": "string", "description": "Repository or source directory"},
146
+ "changed_files": {
147
+ "type": "array", "items": {"type": "string"},
148
+ "description": "Repository-relative changed files",
149
+ },
150
+ "diff": {"type": "string",
151
+ "description": "Unified diff text to read changed files from"},
152
+ "symbols": {
153
+ "type": "array", "items": {"type": "string"},
154
+ "description": "Target symbols; their definition sites become the change",
155
+ },
156
+ "depth": {"type": "integer", "minimum": 1, "maximum": 10,
157
+ "description": "Reverse-dependency depth (default 3)"},
158
+ "max_files": {"type": "integer", "minimum": 1,
159
+ "description": "Maximum source files to inspect (default 2000)"},
160
+ "contract_file": {
161
+ "type": "string",
162
+ "description": "Contract path relative to the repository root "
163
+ "(default .yotta/architecture.json)",
164
+ },
165
+ },
166
+ "required": ["path"],
167
+ "additionalProperties": False,
168
+ },
169
+ },
170
+ {
171
+ "name": "verify_change",
172
+ "description": (
173
+ "Run the L0-L5 verification ladder for a local change and return "
174
+ "a deterministic evidence ledger. L0 syntax/contract and L1 "
175
+ "architecture checks run by default; L2-L4 require a whitelisted "
176
+ ".yotta/verification.json check plus allow_execute=true. L5 is "
177
+ "always recorded as manual work. Read-only unless execution is "
178
+ "explicitly enabled."
179
+ ),
180
+ "inputSchema": {
181
+ "type": "object",
182
+ "properties": {
183
+ "path": {"type": "string", "description": "Repository or source directory"},
184
+ "changed_files": {
185
+ "type": "array", "items": {"type": "string"},
186
+ "description": "Repository-relative changed files",
187
+ },
188
+ "diff": {"type": "string",
189
+ "description": "Unified diff text to read changed files from"},
190
+ "symbols": {
191
+ "type": "array", "items": {"type": "string"},
192
+ "description": "Target symbols; their definition sites become the change",
193
+ },
194
+ "depth": {"type": "integer", "minimum": 1, "maximum": 10,
195
+ "description": "Reverse-dependency depth (default 3)"},
196
+ "levels": {
197
+ "type": "array",
198
+ "items": {"enum": ["L0", "L1", "L2", "L3", "L4", "L5"]},
199
+ "description": "Additional verification levels; L2-L4 require "
200
+ "a policy and explicit execution",
201
+ },
202
+ "allow_execute": {
203
+ "type": "boolean",
204
+ "description": "Must be true to run whitelisted policy checks; default false",
205
+ },
206
+ "timeout": {"type": "integer", "minimum": 1, "maximum": 600,
207
+ "description": "Upper bound for each check in seconds (default 120)"},
208
+ "max_files": {"type": "integer", "minimum": 1,
209
+ "description": "Maximum source files to inspect (default 2000)"},
210
+ "contract_file": {
211
+ "type": "string",
212
+ "description": "Contract path relative to the repository root "
213
+ "(default .yotta/architecture.json)",
214
+ },
215
+ "policy_file": {
216
+ "type": "string",
217
+ "description": "Verification policy path relative to the repository root "
218
+ "(default .yotta/verification.json)",
219
+ },
220
+ },
221
+ "required": ["path"],
222
+ "additionalProperties": False,
223
+ },
224
+ },
225
+ {
226
+ "name": "self_test",
227
+ "description": (
228
+ "Run deterministic integrity checks on yotta-dev-mcp itself: "
229
+ "required files, version alignment, protocol/tool schema drift, "
230
+ "fail-closed write gates and seeded-defect counterexamples. Use "
231
+ "installed mode for a skill copy and source mode for the checkout. "
232
+ "Test-suite execution requires allow_execute=true; read-only by default."
233
+ ),
234
+ "inputSchema": {
235
+ "type": "object",
236
+ "properties": {
237
+ "path": {"type": "string",
238
+ "description": "Source checkout or installed skill directory"},
239
+ "mode": {
240
+ "type": "string",
241
+ "enum": ["auto", "source", "installed"],
242
+ "description": "auto detects source vs installed layout",
243
+ },
244
+ "allow_execute": {
245
+ "type": "boolean",
246
+ "description": "Run the project test suite; default false",
247
+ },
248
+ "timeout": {"type": "integer", "minimum": 1, "maximum": 600,
249
+ "description": "Test timeout in seconds (default 120)"},
250
+ },
251
+ "required": ["path"],
252
+ "additionalProperties": False,
253
+ },
254
+ },
255
+ {
256
+ "name": "run_adapter",
257
+ "description": (
258
+ "Probe or explicitly run an optional local architecture adapter. "
259
+ "action=list only inspects project-local node_modules/.bin, venv and "
260
+ "PATH for import-linter, dependency-cruiser and Repomix; action=run "
261
+ "requires allow_execute=true. The adapter never installs packages, "
262
+ "downloads files or accepts arbitrary argv. Missing tools or configs "
263
+ "return UNKNOWN with the next step."
264
+ ),
265
+ "inputSchema": {
266
+ "type": "object",
267
+ "properties": {
268
+ "action": {
269
+ "type": "string",
270
+ "enum": ["list", "run"],
271
+ "description": "list probes capability; run executes one adapter",
272
+ },
273
+ "path": {"type": "string", "description": "Repository root"},
274
+ "adapter": {
275
+ "type": "string",
276
+ "enum": ["import-linter", "dependency-cruiser", "repomix"],
277
+ "description": "Adapter id; required when action=run",
278
+ },
279
+ "allow_execute": {
280
+ "type": "boolean",
281
+ "description": "Must be true to run an adapter; default false",
282
+ },
283
+ "timeout": {
284
+ "type": "integer",
285
+ "minimum": 1,
286
+ "maximum": 600,
287
+ "description": "Adapter timeout in seconds (default 120)",
288
+ },
289
+ "max_chars": {
290
+ "type": "integer",
291
+ "minimum": 1000,
292
+ "maximum": 1000000,
293
+ "description": "Repomix output cap in characters (default 120000)",
294
+ },
295
+ "token_budget": {
296
+ "type": "integer",
297
+ "minimum": 1,
298
+ "maximum": 500000,
299
+ "description": "Optional Repomix token budget",
300
+ },
301
+ "target": {
302
+ "type": "string",
303
+ "description": "Repository-relative adapter target (default .)",
304
+ },
305
+ },
306
+ "required": ["action", "path"],
307
+ "additionalProperties": False,
308
+ },
309
+ },
85
310
  {
86
311
  "name": "find_code",
87
312
  "description": (
@@ -161,14 +386,24 @@ def mcp_tools():
161
386
  {
162
387
  "name": "mcp_doctor",
163
388
  "description": (
164
- "Inspect installed skills and MCP JSON configuration files for "
165
- "versions and obvious configuration issues. Read-only."
389
+ "Broad, read-only health check for installed skills and MCP client "
390
+ "configuration. Discovers Codex, Cursor, WorkBuddy, OpenCode, Claude "
391
+ "Code and other known hosts (plus project-level configs), parses JSON, "
392
+ "JSONC and a narrow TOML subset, and always returns a coverage report "
393
+ "with checked / missing / unsupported / unverified hosts. Only server "
394
+ "names are returned; commands, args and env values are never included. "
395
+ "A clean result applies only to the covered scope: read coverage and "
396
+ "coverage_confidence before treating it as all-clear."
166
397
  ),
167
398
  "inputSchema": {
168
399
  "type": "object",
169
400
  "properties": {
170
401
  "skills_dirs": {"type": "array", "items": {"type": "string"}},
171
402
  "config_paths": {"type": "array", "items": {"type": "string"}},
403
+ "include_defaults": {
404
+ "type": "boolean",
405
+ "description": "Also scan the built-in host registry when config_paths is supplied",
406
+ },
172
407
  },
173
408
  "additionalProperties": False,
174
409
  },
@@ -338,8 +573,12 @@ def handle_message(msg):
338
573
  "yotta-dev-mcp exposes deterministic local development tools. "
339
574
  "Prefer repo_map/find_code before editing, review_diff before PR, "
340
575
  "review_code for focused review, compress_output for long logs and "
341
- "mcp_doctor for local configuration checks. All six tools are offline "
342
- "and read-only."
576
+ "mcp_doctor for local configuration checks. Use system_model and "
577
+ "architecture_review for architecture contracts, impact_analysis and "
578
+ "verify_change for change-centered evidence, self_test for integrity "
579
+ "checks, and run_adapter to probe or explicitly run optional local "
580
+ "architecture adapters. Tools are offline and read-only unless an "
581
+ "explicit write or execute flag is set."
343
582
  ),
344
583
  }, (3600000, "public")),
345
584
  }
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.YottaMeta/yotta-dev-mcp",
4
- "description": "YuanKai (yotta-dev-mcp): deterministic local development tools over stdio MCP, covering code mapping, review, secret/dependency scanning, release checks, whitelisted checks, scaffolding and workflow state.",
4
+ "description": "YuanKai (yotta-dev-mcp): deterministic local development tools over stdio MCP, covering code mapping, architecture contract review, change impact cones, L0-L5 verification ledgers, integrity self-tests, optional explicit import-linter / dependency-cruiser / Repomix adapters, code review, secret/dependency scanning, release checks, whitelisted checks, scaffolding and workflow state.",
5
5
  "repository": {
6
6
  "url": "https://github.com/YottaMeta/yotta-dev-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.1",
9
+ "version": "0.2.1",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@yottameta/yotta-dev-mcp",
14
- "version": "0.1.1",
14
+ "version": "0.2.1",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }