Skip to content

Commit 764b3c9

Browse files
author
Claude Sonnet (coordinator)
committed
feat: generate mcp contract artifacts from rust
1 parent 5472ead commit 764b3c9

13 files changed

Lines changed: 1341 additions & 366 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ Treat this as a standing operational gate, not a one-time migration task.
241241
- 2026-04-17: reduced the default MCP catalog to 7 top-level `ledgerr_*` tools and relocated plugin info under `ledgerr_workflow`.
242242
- Keep docs/examples aligned to the reduced surface; `tools/list` is now intended to be a trustworthy small catalog for agents.
243243
- Legacy `l3dg3rr_*` and proxy tool names remain compatibility aliases only and should not be reintroduced into the advertised catalog.
244+
- 2026-04-17: issue `#22` established a code-first MCP contract path.
245+
- The published MCP surface now lives in `crates/ledgerr-mcp/src/contract.rs`; treat it as the only source of truth for parser shapes, generated JSON Schema, and checked-in operator docs/examples.
246+
- Regenerate `docs/mcp-capability-contract.md`, `docs/agent-mcp-runbook.md`, and `scripts/mcp_cli_demo.sh` via `cargo run -p xtask-mcpb -- generate-mcp-artifacts` after changing the published MCP surface.
247+
- Drift between `contract.rs` and those generated artifacts is a test failure, not a documentation chore.
244248

245249

246250

Cargo.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ledgerr-mcp/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ blake3 = "1.8.3"
99
ledger-core = { version = "=1.3.7", path = "../ledger-core" }
1010
rust_decimal = "1.41.0"
1111
rust_xlsxwriter = { workspace = true }
12+
schemars = { version = "0.8", features = ["derive"] }
1213
serde = { version = "1", features = ["derive"] }
1314
serde_json = "1"
1415
thiserror = "2"

0 commit comments

Comments
 (0)