From 9242594457eb928f57280579c61c5836ea383b82 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Thu, 24 Sep 2026 02:03:14 -0700 Subject: [PATCH] =?UTF-8?q?mcp=5Fanalysis.md:=20census=20round=204=20on=20?= =?UTF-8?q?the=20lean=20catalogue=20(6/6=20correct;=20a=20=E2=88=921=20%,?= =?UTF-8?q?=20d=20parity,=20b/c=20+9=E2=80=A6+10=20%);=200.58.0=20notes=20?= =?UTF-8?q?dated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 6 ++- docs/mcp/census-runs.txt | 8 ++++ editors/vscode/CHANGELOG.md | 2 +- editors/vscode/README.md | 15 +++++-- mcp_analysis.md | 79 ++++++++++++++++++++++++++++++++++++- 5 files changed, 104 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5289e6..89c7e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to lucisv are recorded here. Versions follow [semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes (see `README.md`) are the only frozen contract. -## 0.58.0 — unreleased +## 0.58.0 — 2026-09-24 ### The lean MCP catalogue: nine tools, short answers, trusted writes @@ -38,6 +38,10 @@ accuracy over breadth. (`docs/features/mcp-lean-catalogue`.) the M4 verifier unchanged; `delete` has no `force` any more), **`format`** (a path, directory or glob; `fix` applies the safe lint fixes first; a file the formatter refuses is named, the rest written). +- **Census round 4** (`mcp_analysis.md`): on the same four OpenTitan tasks + the lean server answered every run correctly, at parity with plain file + tools on the whole-design questions (task a −1 %, task d −0.4 % over two + runs) and +9…+10 % on the two small edits (was +15…+25 % in round 1). - **Gone from the wire:** `dry_run`, `limit`, `offset`, `in`, `template`, `overrides`, `force`, and the tools `project_overview`, `list_units`, `unit_interface`, `read_item`, `search_symbols`, `defines`, `definition`, diff --git a/docs/mcp/census-runs.txt b/docs/mcp/census-runs.txt index 317626c..7ce1975 100644 --- a/docs/mcp/census-runs.txt +++ b/docs/mcp/census-runs.txt @@ -17,3 +17,11 @@ r3 c base OPUS: tokens=61092 tool_calls=7 wall_s=44 outcome=correct 8/8 r3 c mcp OPUS: tokens=69849 tool_calls=8 wall_s=62 outcome=correct 8/8 r3b d mcp (final binary): tokens=96416 tool_calls=10 wall_s=231 outcome=correct (71/20, all counts); -10% vs r3, -6% vs base r3b a mcp (final binary): tokens=111444 tool_calls=12 wall_s=169 outcome=correct 47/47 — did not pass overrides:true, read overrides from files + grep-verified + +# Round 4 — server bfa8e98 (M7 lean catalogue, bin/lucisv-mcp-r5, shim mcpc5, prompt_mcp_r4.txt) +r4 a mcp sonnet tokens=89804 calls=10 wall=112s outcome=correct 47/47, all Width/Depth values match (used find refs + reads, not hierarchy up/peek) +r4 b mcp sonnet tokens=66055 calls=21 wall=104s outcome=correct, identical 3-line diff; port add propagated TODO connections into aes_cipher_core_tb.sv and csrng_block_encrypt.sv (design-wide by design), agent reverted them and hand-edited aes_core.sv +r4 d mcp sonnet tokens=104897 calls=22 wall=278s outcome=correct 71/20, all counts; +2% vs base (r3b on r4 binary was 96k: run-to-run noise ≈ 10k on this task) +r4 c mcp sonnet tokens=101137 calls=45 wall=403s outcome=correct 8/8 sites in 4 files (rename wrote 2 files + listed the macro arg, chip_if path and the DV string path as unresolved; agent fixed those by hand); +16% vs r1 base, +9% vs r2 base rerun; agent lost time waiting on its own background rename (interim stop, nudged) +r4 d mcp sonnet (re-run) tokens=99525 calls=24 wall=302s outcome=correct 71/20, all counts; mean of the two r4 runs 102 211 vs base 102 579 +r4 c mcp OPUS: tokens=68948 tool_calls=10 wall_s=214 outcome=correct 8/8 in 4 files (−1% vs r3 Opus mcp, +13% vs r3 Opus base) diff --git a/editors/vscode/CHANGELOG.md b/editors/vscode/CHANGELOG.md index c2a2fc5..de6da8c 100644 --- a/editors/vscode/CHANGELOG.md +++ b/editors/vscode/CHANGELOG.md @@ -5,7 +5,7 @@ for you. The extension and its bundled language server share one version number; the full engineering notes live in the [project changelog](https://git.luci.ooo/lucio/lucisv/src/branch/master/CHANGELOG.md). -## Unreleased (0.58.0) +## 0.58.0 — 2026-09-24 - `lucisv-mcp`, the agent server, now offers nine tools instead of 26 — `hierarchy`, `find`, `outline`, `read`, `check`, `rename`, `port`, diff --git a/editors/vscode/README.md b/editors/vscode/README.md index bf0ac11..633afd1 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -30,9 +30,9 @@ Install **lucisv — Verilog/SystemVerilog** from the VS Code Extensions view, then open a Verilog or SystemVerilog file. There is no separate server or CLI setup. -The current release is **0.57.0**. Its platform packages include -`lucisv-server` and the `lucisv` command-line tool (and, from the next -release, `lucisv-mcp` — see [Agents (MCP)](#agents-mcp)): +The current release is **0.58.0**. Its platform packages include +`lucisv-server`, the `lucisv` command-line tool and `lucisv-mcp` (see +[Agents (MCP)](#agents-mcp)): | Package target | Machines | |---|---| @@ -402,6 +402,15 @@ Every nesting color is a proper VS Code theme color: } ``` +## Release 0.58.0 highlights + +Version 0.58.0 slims `lucisv-mcp` to nine tools whose whole catalogue is +under 3.5 kB: the hierarchy as `file:line` with a peek at the source, +every declaration and use of a name, a file or unit outline, one item's +source, diagnostics, and four verified bulk edits (rename, port, item, +format) with no dry run. Measured against OpenTitan it is as cheap as +plain file reads on whole-design questions and correct on every run. + ## Release 0.57.0 highlights Version 0.57.0 bundles `lucisv-mcp` in every platform package and diff --git a/mcp_analysis.md b/mcp_analysis.md index 4a94c82..5cf57fa 100644 --- a/mcp_analysis.md +++ b/mcp_analysis.md @@ -239,6 +239,70 @@ visible — the flag is in the tool's argument list, which a native client shows the model and the shim's `--list` only summarises — so this trade-off is best re-measured once the server is driven natively. +## Round 4 — server at bfa8e98 (M7, the lean catalogue) + +The owner's ruling after round 3: accuracy over breadth, the hierarchy as +`file:line` with a peek, a catalogue under 1 000 tokens, shorter answers, +no dry runs. The server now offers nine tools (`hierarchy, find, outline, +read, check, rename, port, edit_item, format`); the model-visible +catalogue is 3 440 bytes (was 17 909), the instructions 398 bytes, and +every answer is one line per fact with a fixed cap. The mcp-arm prompt +mirrors the server's own instructions (`prompt_mcp_r4.txt`); the base +arms are the earlier rounds' (a 91 094, b 59 922, c 87 546 / 92 625 re-run, +d 102 579). + +| task | arm | model | tokens | tool calls | wall | outcome | +|---|---|---|---|---|---|---| +| a | mcp | Sonnet 5 | 89 804 | 10 | 112 s | correct, 47/47, every Width/Depth value | +| b | mcp | Sonnet 5 | 66 055 | 21 | 104 s | correct, identical 3-line diff | +| c | mcp | Sonnet 5 | 101 137 | 45 | 403 s | correct, 8/8 sites in 4 files | +| d | mcp | Sonnet 5 | 104 897 | 22 | 278 s | correct, 71/20, all counts | +| d | mcp (re-run) | Sonnet 5 | 99 525 | 24 | 302 s | correct, 71/20, all counts | +| c | mcp | Opus 5.5 | 68 948 | 10 | 214 s | correct, 8/8 sites in 4 files | + +### Observations + +**Five correct answers out of five, and the whole-design tasks at parity +with plain file tools.** Task a is 1 % under the base arm (89.8 k vs +91.1 k); task d averages 102.2 k over two runs against the base arm's +102.6 k. The lean catalogue removed the fixed tax that round 1 identified +(the shim's `--list` is now 2.1 kB, ≈ 550 tokens, was 11.6 kB), which is +what closed the gap on a and d; their remaining cost is the answer itself +(a 47-row table, a 71-row list plus 20 port counts), which both arms pay. + +- **a** used `find … refs: true` and then `read` on the instantiations + rather than `hierarchy up` with `peek`; either path answers in one call + plus reads. Against round 3b (111 k, where the agent never discovered + the `overrides` opt-in), the flag is gone and the cost fell 19 %. +- **b** (+10 % vs base, −6 % vs round 3): `port add dbg_i` did what it + promises — connected the port in every instantiation — which the task + forbade for two of them (a pre-DV testbench and `csrng_block_encrypt`); + the agent reverted those two files and edited `aes_core.sv` by hand. A + design-wide bulk edit is the wrong tool for an edit scoped to two files, + and the agent's calls went to undoing it. The answer diff is identical + to the base arm's. +- **c** (+9 % vs the base re-run, +16 % vs the round-1 base; −8 % vs + round 3): `rename` wrote the two RTL files and listed the three + unresolved mentions (the macro argument, the macro-rooted path in + `chip_if.sv`, the string-built force path in `entropy_src_path_if.sv`); + the agent fixed all three by hand, 8/8 again. Its 45 calls include a + detour where it backgrounded the rename and waited on it; the shim's + per-call re-index (~2 s) makes a 14 s rename look slow to an agent. +- **c with Opus 5.5** (68.9 k, 10 calls): 1 % under round 3's Opus mcp arm + (69.8 k) and 13 % over its base arm (61.1 k); same three hand fixes from + the `unresolved:` list, 8/8. A stronger agent needs the server less and + still pays the same relative overhead — unchanged from round 3. +- **d** (parity): two runs 5 k apart with identical content; the answer + text dominates both arms. The template-free `outline unit:` answers are + the difference from round 3's 107 k. + +**What the round says about the ruling.** Accuracy held: no wrong row, no +wrong site, no stray edit survived. Tokens: the lean catalogue costs +nothing where the old one cost 15–25 %; the small edit tasks now sit at ++9…+10 %, which is the agent's own `check` calls and hand fixes, not the +server's answers. The remaining gap is bounded by how the agent works, not +by what the server sends. + ## Verdict, and what to do next **Helpful, not a toy — for the questions an engine answers better than @@ -258,7 +322,20 @@ unresolved-mentions section; `hierarchy`/`references` routing and a 40 % smaller catalogue; the count line first; default limit 500; the `in` path filter; positioned `add_port`; post-edit check hints. -**Still to do** (feedback-3 and after): the instantiation template opt-in +**After round 4 (the lean catalogue, 0.58.0).** The owner's ruling +replaced the compound-tool plan: nine tools, a 3 440-byte catalogue, one +line per fact, no dry runs. Measured on the same four tasks: still no +wrong answer (six runs, one of them Opus), the whole-design tasks at parity with file tools +(a −1 %, d −0.4 % over two runs), the small edits at +9…+10 % where they +were +15…+25 % in round 1. The server's cost is no longer in what it +sends; it is in how much the agent verifies on its own. The next lever, if +one is wanted, is the agent's habits (the instructions already say "trust +them as file writes"), not the server. For scoped edits (b) a design-wide +`port add` is the wrong tool and the agent should edit the two files; for +renames (c) the `unresolved:` list is what makes 8/8 repeatable. + +**Superseded by the ruling above — kept for the record.** (feedback-3 and +after, as planned before round 4): the instantiation template opt-in on `unit_interface`; a terser `hierarchy` line (overrides only on request); then re-measure d. Beyond rendering, the token win will come from letting the agent ask compound questions — one call for "instances of X under