@yottameta/yotta-dev-mcp 0.1.1 → 0.2.0

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,149 @@ Input:
11
14
 
12
15
  Output: `root`, `modules`, `imports`, `entrypoints`, `truncated`.
13
16
 
17
+ ## system_model
18
+
19
+ Input:
20
+
21
+ - `path` (required): repository or source directory.
22
+ - `max_files` (optional, default 2000): source file limit.
23
+ - `contract_file` (optional): contract path relative to the repository root
24
+ (default `.yotta/architecture.json`).
25
+
26
+ Output: `status` (`PASS` / `FAIL` / `UNKNOWN`), `contract`, `model` (`modules`,
27
+ `layers`, `imports`, `entrypoints`, `tests`, `configs`, `data_stores`),
28
+ `unknowns`, `unknowns_truncated`, `unverified_claims`, `evidence`, `truncated`
29
+ and `model_digest`.
30
+
31
+ Contract schema, glob rules, finding codes and import kinds are documented in
32
+ `references/architecture-contract.md`.
33
+
34
+ ## architecture_review
35
+
36
+ Input:
37
+
38
+ - `path` (required): repository or source directory.
39
+ - `max_files` (optional, default 2000): source file limit.
40
+ - `contract_file` (optional): contract path relative to the repository root
41
+ (default `.yotta/architecture.json`).
42
+
43
+ Output: `status` (`PASS` / `FAIL` / `UNKNOWN`), `contract`, `checked`
44
+ (`rules` / `boundaries` / `data_stores` / `invariants`, each with a per-item
45
+ `status` of `PASS` / `WARN` / `FAIL` / `UNKNOWN`), `violations`, `blocking_findings`,
46
+ `advisory_findings`, `unknowns`, `unverified_claims`, `evidence`, `truncated` and
47
+ `model_digest`.
48
+
49
+ `critical` / `high` findings fail the review; `medium` / `low` stay advisory.
50
+ Anything the model cannot decide becomes `UNKNOWN`; declared invariants that this
51
+ tool cannot evaluate are listed in `unverified_claims` instead of being reported
52
+ as passing. Read-only.
53
+
54
+ ## impact_analysis
55
+
56
+ Input:
57
+
58
+ - `path` (required): repository or source directory.
59
+ - `changed_files` (optional): repository-relative changed files.
60
+ - `diff` (optional): unified diff text; changed files and line numbers are parsed
61
+ from it, deleted files keep their declared layer.
62
+ - `symbols` (optional): target symbols; their definition sites become the change.
63
+ - `depth` (optional, default 3, 1-10): reverse-dependency depth.
64
+ - `max_files` (optional, default 2000): source file limit.
65
+ - `contract_file` (optional): contract path relative to the repository root.
66
+
67
+ At least one of `changed_files`, `diff` or `symbols` is required.
68
+
69
+ Output: `status`, `inputs`, `changed`, `direct_consumers`, `cone` (`nodes` with
70
+ `depth` / `via` / `layer` / `is_test`, `max_depth`, `limit`, `truncated`),
71
+ `affected_layers`, `affected_boundaries`, `affected_data_stores`,
72
+ `affected_invariants`, `relevant_tests`, `architecture` (`status`,
73
+ `violations_total`, `violations_in_scope`, `unknowns`), `blast_radius`
74
+ (`level`, `score`, `capped`, `reasons`), `rollback_probes`, `unknowns`,
75
+ `unverified_claims`, `evidence`, `truncated` and `model_digest`.
76
+
77
+ `status` is `FAIL` when a blocking architecture violation sits inside the cone,
78
+ `UNKNOWN` while anything is undecided, otherwise `PASS`. Read-only; no command is
79
+ executed.
80
+
81
+ ## verify_change
82
+
83
+ Input:
84
+
85
+ - `path` (required): repository or source directory.
86
+ - `changed_files` / `diff` / `symbols` (at least one): the same change inputs as
87
+ `impact_analysis`.
88
+ - `depth` (optional, default 3, 1-10): reverse-dependency depth.
89
+ - `levels` (optional): additional execution levels `L2`, `L3`, `L4` or manual `L5`.
90
+ L0 and L1 always run.
91
+ - `allow_execute` (optional, default false): required before any L2-L4 check runs.
92
+ - `timeout` (optional, default 120, 1-600): upper bound for each policy check.
93
+ - `max_files` / `contract_file` (optional): model limit and contract override.
94
+ - `policy_file` (optional, default `.yotta/verification.json`): policy override.
95
+
96
+ Output: `status`, `inputs`, `required_levels`, `ledger`, `unverified_claims`,
97
+ `policy`, `evidence`, `ledger_digest`, `model_digest` and `impact_status`.
98
+
99
+ Every ledger entry has `id`, `level`, `claim`, `status` (`PASS` / `FAIL` / `UNKNOWN` /
100
+ `UNVERIFIED`), `severity`, `check`, `confidence`, `evidence`, `next_step` and
101
+ `command`. Static checks keep `command` as `null`; executed checks record the
102
+ whitelisted kind, relative cwd, exit code, timeout flag and `output_hash`.
103
+
104
+ The default ladder runs L0 (changed-file syntax, contract schema) and L1 (architecture
105
+ rules and boundaries inside the change cone). L2-L4 are skipped unless both a policy
106
+ check is declared and `allow_execute=true`; they never accept arbitrary commands.
107
+ L5 is always manual and stays in `unverified_claims`. The ledger intentionally has no
108
+ wall-clock timestamp: its digest and the command output hashes are the reproducible
109
+ evidence anchors.
110
+
111
+ ## self_test
112
+
113
+ Input:
114
+
115
+ - `path` (required): source checkout or installed skill directory.
116
+ - `mode` (optional, default `auto`): `auto`, `source` or `installed`.
117
+ - `allow_execute` (optional, default false): run the target test suite.
118
+ - `timeout` (optional, default 120, 1-600).
119
+
120
+ Source mode checks required files, version alignment across `package.json` /
121
+ `SKILL.md` / `CHANGELOG.md` / `server.json` / engine `VERSION`, protocol tool names
122
+ and `inputSchema.additionalProperties=false`, fail-closed defaults for every write or
123
+ execute gate, and counterexamples. Installed mode checks `SKILL.md` and the installed
124
+ asset payload, and records source-only checks as out of scope.
125
+
126
+ The counterexample suite is in-process and deterministic: a seeded forbidden
127
+ dependency must be `FAIL`, removing the rule must stop the failure, an invalid
128
+ contract must be `FAIL` or `UNKNOWN`, a missing contract must be `UNKNOWN`, a seeded
129
+ credential must be found, and a seeded version mismatch must fail readiness. These
130
+ probes prove the verifier is not a rubber stamp.
131
+
132
+ ## run_adapter
133
+
134
+ Input:
135
+
136
+ - `action` (required): `list` probes optional adapters without executing them;
137
+ `run` executes exactly one adapter.
138
+ - `path` (required): repository root.
139
+ - `adapter` (required when `action=run`): `import-linter`,
140
+ `dependency-cruiser` or `repomix`.
141
+ - `allow_execute` (optional, default false): required for `action=run`.
142
+ - `timeout` (optional, default 120, 1-600).
143
+ - `max_chars` (optional, default 120000, 1000-1000000): Repomix output cap.
144
+ - `token_budget` (optional): Repomix token budget; over-budget output fails.
145
+ - `target` (optional, default `.`): repository-relative adapter target.
146
+
147
+ `action=list` returns `status`, `adapters` with `available` / `ready` /
148
+ `executable` / `executable_source` / `config` / `reason`, plus `unknowns`.
149
+
150
+ `action=run` returns `status` (`PASS` / `FAIL` / `UNKNOWN`), the selected
151
+ `adapter` metadata, a fixed `command` record with `output_hash`, normalized
152
+ `findings`, Repomix `content` metadata when applicable, `next_step` and
153
+ `unknowns`. Missing tools, missing configs, invalid output and timeouts are
154
+ `UNKNOWN`, never silent passes.
155
+
156
+ Adapters are optional enhancements: no package is installed or downloaded, no
157
+ arbitrary argv is accepted, and adapter findings do not silently change the
158
+ status of the core architecture tools. See `references/adapters.md`.
159
+
14
160
  ## find_code
15
161
 
16
162
  Input: