Skip to content

Commit 7268248

Browse files
Merge pull request #28 from PromptExecution/codex-issue-22-codegen-contract
feat: generate MCP contract artifacts from Rust
2 parents 2c5ade7 + 9165d81 commit 7268248

14 files changed

Lines changed: 1343 additions & 366 deletions

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.

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ RUN cargo chef cook --release --recipe-path recipe.json
1919
COPY Cargo.toml Cargo.lock ./
2020
COPY crates ./crates
2121
COPY xtask ./xtask
22+
COPY docs ./docs
23+
COPY scripts ./scripts
2224

2325
RUN cargo test --workspace --all-features
2426
RUN cargo build -p ledgerr-mcp --release --bin ledgerr-mcp-server

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)