Skip to content

feat: PRD-7 Phase 0 synergies, datum intelligence modules, generic McpProvider, b00t-iface expansion#61

Merged
elasticdotventures merged 11 commits into
mainfrom
feat/prd7-datum-mcp-providers
May 2, 2026
Merged

feat: PRD-7 Phase 0 synergies, datum intelligence modules, generic McpProvider, b00t-iface expansion#61
elasticdotventures merged 11 commits into
mainfrom
feat/prd7-datum-mcp-providers

Conversation

@promptexecutionerr
Copy link
Copy Markdown
Collaborator

Summary

  • PRD-7 Phase 0: Wire the three previously-siloed verifiers (Kasuari constraints, Z3 legal solver, typed pipeline) into a unified signal chain — ConstraintEvaluation → Issue + MetaFlag, Z3Result → Issue, CommitGate, verify_legal(), check_constraints(), evaluate_commit_gate(). 12 new tests, all passing.
  • PRD-6-FUTURE: Define #[attested] proc-macro lint concept — types claiming formal properties must provide dual-solver (Z3 + Kasuari) assertions backed by Kani proofs, recorded in an append-only _invariants workbook ledger.
  • datum crate: AST linter, logic gate algebra (NAND/NOR/ADD/WAIT/TX/RX + flux capacitor meta-state), protocol constraint system (Z3/Kasuari-style O = P XOR B), and .tomllmd compiler (verbatim/executive/epigram summary levels, entanglement refs, compounding). 58 standalone tests.
  • McpProvider trait: Generic stdio MCP transport (StdioMcpProvider) + McpProviderRegistry + concrete B00tProvider, JustProvider, Ir0ntologyProvider. Invariant interface for all external tool surfaces.
  • b00t-iface: SARIF enhancements, ralph stub, extended surface lifecycle.
  • CI: libz3-dev apt step, cargo test -p datum, legal_z3_integration --features legal-z3.
  • README + AGENTS.md: Future Ambitions section (PRD-7/8/6-FUTURE), operational notes for datum/McpProvider.

Backlog issues opened

Test plan

  • cargo test -p ledger-core — 12 new tests green, all existing tests pass
  • cargo test -p datum — 58 standalone tests (ast/logic/protocol/tomllmd), no external deps
  • cargo test --workspace --exclude b00t-iface — pre-existing contract_codegen snapshot failure unrelated to this branch
  • cargo test -p ledger-core --test legal_z3_integration --features legal-z3 — requires libz3-dev on host

🤖 Generated with Claude Code

Claude Sonnet (coordinator) and others added 9 commits May 2, 2026 18:32
…add type attestation concept

- constraints.rs: `ConstraintEvaluation::to_issues()`, `to_meta_flag()`, `InvoiceVerification`, `InvoiceConstraintSolver::verify()`
- validation.rs: `CommitGate` enum (Approved / PendingOperator / Blocked)
- legal.rs: `From<Z3Result> for Vec<Issue>`, `LegalSolver::verify_all()`, `Jurisdiction::legal_ruleset()`, FBAR/FEIE/AU-FBT/AU-GST-s40-5 rules
- pipeline.rs: `PipelineState<Ingested>::check_constraints()`, `PipelineState<Validated>::verify_legal()`, `evaluate_commit_gate()`
- PRD-6-FUTURE.md: concept definition for #[attested] proc-macro lint + dual-solver invariant ledger
- README.md: capability table updated; Future Ambitions section added (PRD-7/8/6-FUTURE)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ev and datum CI steps

- crates/ledger-core/tests/legal_z3_integration.rs: Z3-native verify_all() integration test
  gated behind --features legal-z3; validates SatResult→Z3Result mapping on au-gst-38-190
- .github/workflows/ci.yml: add libz3-dev apt install, cargo test -p datum step,
  and legal_z3_integration --features legal-z3 step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tomllmd compiler

- ast.rs: DatumAst section hierarchy, LintSeverity (Error/Warning/Info), lint_ast(),
  parse_datum(), validate_datum_structure() — 15 tests, CI-gateable
- logic.rs: NAND/NOR/ADD/WAIT/TX/RX gate types, flux capacitor meta-state,
  shorthand tokenizer (&&/||/!/→/←) — 19 tests
- protocol.rs: Z3/Kasuari-style constraint system for protocol encoding optimality
  (O = P XOR B), evaluate_protocol(), has_unrecoverable_violations(),
  classify_violations(), KASUARI_SHORTHAND dialect table — 11 tests
- tomllmd.rs: .tomllmd compiler with SectionLevels (verbatim/executive/epigram),
  EntanglementRef with type validation {{ name.type }}, compounding metadata,
  command interpolation via {{ cmd: ... }} — 11 tests
- Cargo.toml: feature flag real_datums for external _b00t_ repo tests; 58 total
  standalone tests with no external deps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…b00t, just, ir0ntology

- provider.rs: McpProvider trait (initialize, call_tool, list_tools, shutdown),
  StdioMcpProvider (subprocess stdio MCP transport), McpProviderRegistry
  (discovery/routing, initialize_all(), call_tool() by name)
- providers/definitions.rs: B00tProvider, JustProvider, Ir0ntologyProvider —
  each wrapping StdioMcpProvider with typed constructors and B00T_HOME resolution
- providers/mod.rs: module exports
- lib.rs: re-export provider and providers modules
- mcp_adapter.rs: wiring stubs for external tool dispatch
- ledgerr-mcp-server.rs: McpProviderRegistry initialization path
- Cargo.toml: serde_json, thiserror deps for provider transport layer
- Not yet wired into tool dispatch; requires McpProviderRegistry injection at
  server startup — see AGENTS.md 2026-05-02 entry for wiring plan

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- sarif/mod.rs: extended SARIF output helpers for clippy-to-sarif pipeline,
  additional rule severity mappings, and result suppression annotations
- ralph.rs: stub for ralph integration surface (placeholder, not yet wired)
- lib.rs: expose ralph module

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…iant, datum AST linter

- .tomllmd: pipeline autoresearch→tomllmd, three summary levels, command interpolation,
  entanglement invariant typing, compounding via sm0l/ch0nky LLM merge
- McpProvider: trait as the invariant MCP interface; StdioMcpProvider + registry;
  B00t/Just/Ir0ntology providers; Cloudflare Code Mode as next evolution target;
  wiring plan into mcp_adapter.rs dispatcher
- Datum AST linter: DatumAst, lint_ast(), 58 standalone tests, real_datums feature gate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .gitignore: app4dog* — external project datum files not tracked in this repo
- Cargo.lock: dependency resolution update for datum and ledgerr-mcp additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rgs, no recursion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elasticdotventures
Copy link
Copy Markdown
Member

@copilot review this code

Copilot AI and others added 2 commits May 2, 2026 09:55
…ts with tempdir/real_datums

Agent-Logs-Url: https://github.com/PromptExecution/l3dg3rr/sessions/e9f325f4-ebc0-459e-9c58-56cd122e8058

Co-authored-by: elasticdotventures <35611074+elasticdotventures@users.noreply.github.com>
… in tests

Agent-Logs-Url: https://github.com/PromptExecution/l3dg3rr/sessions/e9f325f4-ebc0-459e-9c58-56cd122e8058

Co-authored-by: elasticdotventures <35611074+elasticdotventures@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

@copilot review this code

Code review identified two CI failures in b00t-iface, both now fixed (commit bc89f33):

  1. Clippy approx_constant error (metric/mod.rs:277): 3.14 replaced with std::f64::consts::PI.

  2. 5 failing tests that assumed the external _b00t_/datums directory exists (only present in dev, not CI):

    • collect_datum_files — gated behind #[cfg(feature = "real_datums")] since it asserts specific file names from the external repo
    • datum_watcher_init_and_operate, datum_watcher_maintain, harness_runs_datum_watcher_lifecycle, harness_tracks_machine_state, governance_violation_captured — updated to use tempfile::tempdir() so they run self-contained without the external repo
    • Added real_datums = [] feature to b00t-iface/Cargo.toml, consistent with the same pattern in the datum crate

All 48 tests now pass locally with clippy clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants