@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.
@@ -1,6 +1,9 @@
1
1
  # Tool contracts
2
2
 
3
- All tools are local, deterministic and read-only in v0.1.0.
3
+ All tools are local and deterministic. Unless a section says otherwise they are
4
+ read-only; `run_checks`, `verify_change` and `run_adapter` require
5
+ `allow_execute=true` for their explicit execution paths, and `scaffold_skill` /
6
+ `workflow_state` require `apply=true` before writing.
4
7
 
5
8
  ## repo_map
6
9
 
@@ -11,6 +14,155 @@ Input:
11
14
 
12
15
  Output: `root`, `modules`, `imports`, `entrypoints`, `truncated`.
13
16
 
17
+ Python imports include absolute, `from .X import Y`, `from . import X`,
18
+ `as` aliases, packages and multi-name forms. Temporary / agent-state
19
+ directories (`.workflow`, `.codex`, `.cursor`, `.claude`, `.agents`,
20
+ `scratch`, `_probe`, `probe`, `sandbox`, `debug`, `.tmp`) and probe/temp
21
+ file names are ignored by default.
22
+
23
+ ## system_model
24
+
25
+ Input:
26
+
27
+ - `path` (required): repository or source directory.
28
+ - `max_files` (optional, default 2000): source file limit.
29
+ - `contract_file` (optional): contract path relative to the repository root
30
+ (default `.yotta/architecture.json`).
31
+
32
+ Output: `status` (`PASS` / `FAIL` / `UNKNOWN`), `contract`, `model` (`modules`,
33
+ `layers`, `imports`, `entrypoints`, `tests`, `configs`, `data_stores`),
34
+ `unknowns`, `unknowns_truncated`, `unverified_claims`, `evidence`, `truncated`
35
+ and `model_digest`.
36
+
37
+ Contract schema, glob rules, finding codes and import kinds are documented in
38
+ `references/architecture-contract.md`.
39
+
40
+ ## architecture_review
41
+
42
+ Input:
43
+
44
+ - `path` (required): repository or source directory.
45
+ - `max_files` (optional, default 2000): source file limit.
46
+ - `contract_file` (optional): contract path relative to the repository root
47
+ (default `.yotta/architecture.json`).
48
+
49
+ Output: `status` (`PASS` / `FAIL` / `UNKNOWN`), `contract`, `checked`
50
+ (`rules` / `boundaries` / `data_stores` / `invariants`, each with a per-item
51
+ `status` of `PASS` / `WARN` / `FAIL` / `UNKNOWN`), `violations`, `blocking_findings`,
52
+ `advisory_findings`, `unknowns`, `unverified_claims`, `evidence`, `truncated` and
53
+ `model_digest`.
54
+
55
+ `critical` / `high` findings fail the review; `medium` / `low` stay advisory.
56
+ Anything the model cannot decide becomes `UNKNOWN`; declared invariants that this
57
+ tool cannot evaluate are listed in `unverified_claims` instead of being reported
58
+ as passing. Read-only.
59
+
60
+ ## impact_analysis
61
+
62
+ Input:
63
+
64
+ - `path` (required): repository or source directory.
65
+ - `changed_files` (optional): repository-relative changed files.
66
+ - `diff` (optional): unified diff text; changed files and line numbers are parsed
67
+ from it, deleted files keep their declared layer.
68
+ - `symbols` (optional): target symbols; their definition sites become the change.
69
+ - `depth` (optional, default 3, 1-10): reverse-dependency depth.
70
+ - `max_files` (optional, default 2000): source file limit.
71
+ - `contract_file` (optional): contract path relative to the repository root.
72
+
73
+ At least one of `changed_files`, `diff` or `symbols` is required.
74
+
75
+ Output: `status`, `inputs`, `changed`, `direct_consumers`, `cone` (`nodes` with
76
+ `depth` / `via` / `layer` / `is_test`, `max_depth`, `limit`, `truncated`),
77
+ `affected_layers`, `affected_boundaries`, `affected_data_stores`,
78
+ `affected_invariants`, `relevant_tests`, `architecture` (`status`,
79
+ `violations_total`, `violations_in_scope`, `unknowns`), `blast_radius`
80
+ (`level`, `score`, `capped`, `reasons`), `rollback_probes`, `unknowns`,
81
+ `unverified_claims`, `evidence`, `truncated` and `model_digest`.
82
+
83
+ `status` is `FAIL` when a blocking architecture violation sits inside the cone,
84
+ `UNKNOWN` while anything is undecided, otherwise `PASS`. Read-only; no command is
85
+ executed.
86
+
87
+ ## verify_change
88
+
89
+ Input:
90
+
91
+ - `path` (required): repository or source directory.
92
+ - `changed_files` / `diff` / `symbols` (at least one): the same change inputs as
93
+ `impact_analysis`.
94
+ - `depth` (optional, default 3, 1-10): reverse-dependency depth.
95
+ - `levels` (optional): additional execution levels `L2`, `L3`, `L4` or manual `L5`.
96
+ L0 and L1 always run.
97
+ - `allow_execute` (optional, default false): required before any L2-L4 check runs.
98
+ - `timeout` (optional, default 120, 1-600): upper bound for each policy check.
99
+ - `max_files` / `contract_file` (optional): model limit and contract override.
100
+ - `policy_file` (optional, default `.yotta/verification.json`): policy override.
101
+
102
+ Output: `status`, `inputs`, `required_levels`, `ledger`, `unverified_claims`,
103
+ `policy`, `evidence`, `ledger_digest`, `model_digest` and `impact_status`.
104
+
105
+ Every ledger entry has `id`, `level`, `claim`, `status` (`PASS` / `FAIL` / `UNKNOWN` /
106
+ `UNVERIFIED`), `severity`, `check`, `confidence`, `evidence`, `next_step` and
107
+ `command`. Static checks keep `command` as `null`; executed checks record the
108
+ whitelisted kind, relative cwd, exit code, timeout flag and `output_hash`.
109
+
110
+ The default ladder runs L0 (changed-file syntax, contract schema) and L1 (architecture
111
+ rules and boundaries inside the change cone). L2-L4 are skipped unless both a policy
112
+ check is declared and `allow_execute=true`; they never accept arbitrary commands.
113
+ L5 is always manual and stays in `unverified_claims`. The ledger intentionally has no
114
+ wall-clock timestamp: its digest and the command output hashes are the reproducible
115
+ evidence anchors.
116
+
117
+ ## self_test
118
+
119
+ Input:
120
+
121
+ - `path` (required): source checkout or installed skill directory.
122
+ - `mode` (optional, default `auto`): `auto`, `source` or `installed`.
123
+ - `allow_execute` (optional, default false): run the target test suite.
124
+ - `timeout` (optional, default 120, 1-600).
125
+
126
+ Source mode checks required files, version alignment across `package.json` /
127
+ `SKILL.md` / `CHANGELOG.md` / `server.json` / engine `VERSION`, protocol tool names
128
+ and `inputSchema.additionalProperties=false`, fail-closed defaults for every write or
129
+ execute gate, and counterexamples. Installed mode checks `SKILL.md` and the installed
130
+ asset payload, and records source-only checks as out of scope.
131
+
132
+ The counterexample suite is in-process and deterministic: a seeded forbidden
133
+ dependency must be `FAIL`, removing the rule must stop the failure, an invalid
134
+ contract must be `FAIL` or `UNKNOWN`, a missing contract must be `UNKNOWN`, a seeded
135
+ credential must be found, and a seeded version mismatch must fail readiness. These
136
+ probes prove the verifier is not a rubber stamp.
137
+
138
+ ## run_adapter
139
+
140
+ Input:
141
+
142
+ - `action` (required): `list` probes optional adapters without executing them;
143
+ `run` executes exactly one adapter.
144
+ - `path` (required): repository root.
145
+ - `adapter` (required when `action=run`): `import-linter`,
146
+ `dependency-cruiser` or `repomix`.
147
+ - `allow_execute` (optional, default false): required for `action=run`.
148
+ - `timeout` (optional, default 120, 1-600).
149
+ - `max_chars` (optional, default 120000, 1000-1000000): Repomix output cap.
150
+ - `token_budget` (optional): Repomix token budget; over-budget output fails.
151
+ - `target` (optional, default `.`): repository-relative adapter target.
152
+
153
+ `action=list` returns `status`, `adapters` with `available` / `ready` /
154
+ `executable` / `executable_source` / `config` / `reason`, plus `unknowns`.
155
+
156
+ `action=run` returns `status` (`PASS` / `FAIL` / `UNKNOWN`), the selected
157
+ `adapter` metadata, a fixed `command` record with `output_hash`, normalized
158
+ `findings`, Repomix `content` metadata when applicable, `next_step` and
159
+ `unknowns`. Missing tools, missing configs, invalid output and timeouts are
160
+ `UNKNOWN`, never silent passes.
161
+
162
+ Adapters are optional enhancements: no package is installed or downloaded, no
163
+ arbitrary argv is accepted, and adapter findings do not silently change the
164
+ status of the core architecture tools. See `references/adapters.md`.
165
+
14
166
  ## find_code
15
167
 
16
168
  Input:
@@ -55,14 +207,36 @@ Input:
55
207
 
56
208
  Only added lines are reviewed. Output: `files`, `findings`, `truncated`.
57
209
 
210
+ `review_code` uses the same default ignore set as `repo_map`: agent state
211
+ directories, scratch / probe / sandbox / debug directories and probe/temp
212
+ file names do not flood the result. `review_diff` only reviews added lines,
213
+ so it is unaffected by directory traversal.
214
+
58
215
  ## mcp_doctor
59
216
 
60
217
  Input:
61
218
 
62
219
  - `skills_dirs` (optional array).
63
220
  - `config_paths` (optional array).
64
-
65
- Output: `skills`, `mcp_configs`, `issues`, `checked_skills`, `checked_configs`.
221
+ - `include_defaults` (optional boolean): when `config_paths` is supplied, also
222
+ scan the built-in host registry instead of explicit-only scope.
223
+
224
+ Output: `skills`, `mcp_configs`, `coverage`, `skills_coverage`, `issues`,
225
+ `coverage_gaps`, `unknown_hosts`, `summary`, `scope`, `checked_skills`,
226
+ `checked_configs`, `checked_hosts`.
227
+
228
+ Discovery is tiered and environment-aware: verified hosts include Codex
229
+ (`$CODEX_HOME/config.toml`, JSON fallbacks), Cursor, WorkBuddy
230
+ (`~/.workbuddy/mcp.json` plus `connectors/*/mcp.json`), OpenCode
231
+ (`$XDG_CONFIG_HOME/opencode/opencode.jsonc|json`), Claude Code, Windsurf,
232
+ Continue, Gemini, Qwen, Trae, Comate, CodeBuddy, Kimi, Kiro, VS Code and Zed;
233
+ additional hosts are best-effort candidates and are reported as
234
+ `unverified` when absent. JSON, JSONC and a narrow TOML `[mcp_servers.*]`
235
+ subset are parsed; YAML is reported as `unsupported`, never silently skipped.
236
+ Only server names are returned; commands, args and env values are never
237
+ included. `summary.all_clear` is true only for a fully covered, issue-free
238
+ default scan; always read `coverage_confidence` before treating it as
239
+ all-clear.
66
240
 
67
241
  ## scan_secrets
68
242
 
@@ -72,6 +246,11 @@ Input: `path` or `text`, optional `max_findings`, optional `include_git_history`
72
246
  Output: `findings` with `path`, `line`, `rule`, `severity`, redacted `evidence`,
73
247
  `suggestion`; `truncated`.
74
248
 
249
+ High-entropy findings apply a narrow noise filter for absolute paths,
250
+ URL / `file://` percent-encoded paths, common binary/source/document
251
+ suffixes and hash-context hex values (SHA-1/256/512, MD5, checksum, digest,
252
+ integrity). Credential-name, AWS-key and private-key rules are not relaxed.
253
+
75
254
  ## scan_dependencies
76
255
 
77
256
  Input: `path`.