Skip to content

feat(assurance): versioned assurance thread (KR-A01..A05 done; A06-A08 in progress) - #89

Merged
elasticdotventures merged 3 commits into
mainfrom
feat/assurance-thread
Oct 3, 2026
Merged

elasticdotventures merged 3 commits into
mainfrom
feat/assurance-thread

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Draft: first working slice of the versioned assurance thread
source obligation -> requirement -> system element -> enforcing control -> verification case -> evidence,
using kr0ki's own requirements (docs/assurance/) as the example. Depends on PromptExecution/ufo-types#31 (this branch pins its commit db8e22f; bump to the merge commit after it lands).

Done and verified

Req What Evidence
KR-A01 ReqIF export carries typed attributes; reqif_roundtrip compares semantic content and reports unsupported content baseline round-trips lossless: 36 nodes, 147 attributes, 48 relations. Before: every attribute was silently dropped
KR-A02 assurance_trace resolves links against a named model revision dangling refs reported with revision + reason; scanner cross-checked against sysml-v2-parser
KR-A03 assurance_view: satisfaction assertions (dashed) vs verification results (evidence nodes with result + freshness) live Kroki render of the diagram passes
KR-A04 verification_runner + evidence_store: results bound to model/implementation/configuration revisions; stale on any change ran VC-A01 for real (nested cargo test); zero-tests-run is an error, not a pass
KR-A05 change_service: expected-base-revision commit; stale base rejected, never rebased in-memory server + live run against the OMG pilot

Also: audit_log (hash-chained, 7 tests), AssuranceService + kr0ki-assurance CLI + just assurance-*, 10 MCP tools in McpTool, mcp_surface (resource templates + prompts), skills/requirements-authoring (Agent Skills format) + SKILLS.md.

Checks run: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test -p kr0ki-core -p kr0ki-server (core lib 306, server http 96, all assurance suites pass).

Findings worth a look

  • The OMG pilot server accepts a commit with a stale previousCommit (observed live; recorded on every run of tests/assurance_a05_live.rs). The service's own check is the only guard and only covers writers going through it.
  • SysMD 4.3.0 treats all currencies as interchangeable (100 USD + 100 EUR = 200 EUR); handled in ufo-types, patches prepared for SysMD separately (not sent).
  • reqif_export is round-trip-grade, not shown to be ReqIF-XSD-valid (noted in the baseline obligation).

TODO (not in this PR)

  • KR-A06 gateway: crates/kr0ki-server/src/gateway.rs is written (per-route grants, deny by default, audit write before the handler) but not compiled or wired into app.rs. It is committed as a marked draft and is not in the module tree.
  • KR-A08 audit: audit_log is built and tested (hash-chained), but not yet called from the gateway.
  • KR-A07 sandbox: not started. Enforcement belongs in the deployment component; kr0ki displays its relationships and evidence.
  • Assurance routes (assurance.rs): not written. gateway.rs expects them and its route-consistency test will fail until they exist.
  • MCP resources/prompts: mcp_surface.rs is written with tests; the bridge, AppState and main.rs are not wired.
  • Other loose ends: Playb00k UI untouched; no evidence recorded for the final tree, which should be generated on the committed tree (just assurance-verify).
  • Confirm modelling choices: ToolGateway::AuditRecorder sub-part (the brief's "audit service" isn't among the seven parts) and owner = kr0ki-maintainers placeholder.
  • Bump the ufo-types pin to the merge commit once feat(playbook): add a k8s-topology example, testable from the Gallery #31 lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X

elasticdotventures and others added 3 commits October 2, 2026 09:20
…cripts/delegate-qwen38.sh)

The planner and drawing agent can load the MBSE skills (confidence label preserved). Errands are delegated to the local
Qwen3.8 via pi: read-only by default, </dev/null, preflight, timeout; pattern documented, AGENTS.md section 8b.
The unit tests for mbse_skill() were drafted by Qwen3.8 and triaged: one mutant survived, test strengthened.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
…runs on Qwen3.8 via pi

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
… service, CLI, MCP tools (partial)

Baseline (docs/assurance) of the brief's own 8 requirements and its source obligations,
system elements, controls and cases; typed profile from ufo-types (PromptExecution/ufo-types#31).

- KR-A01 ReqIF export now carries typed attributes (enumerations for the profile
  vocabularies, strings otherwise); reqif_roundtrip compares semantic content and reports
  unsupported content explicitly. Previously every attribute was silently dropped.
- KR-A02 assurance_trace: links resolved against a named model revision; dangling reported.
- KR-A03 assurance_view: satisfaction assertions vs verification results drawn apart.
- KR-A04 verification_runner + evidence_store: results bound to model/implementation/
  configuration revisions; zero tests run is an error; allowlisted argv, no shell.
- KR-A05 change_service: propose/validate/commit with an expected base revision; a stale
  base is rejected, never rebased. Live finding: the OMG pilot server does not enforce
  previousCommit, so this service is the only guard.
- audit_log (KR-A08 building block): hash-chained, append-only.
- assurance_service + kr0ki-assurance CLI + just recipes; 10 MCP tools; mcp_surface
  (resources/prompts); skills/requirements-authoring (Agent Skills format) and SKILLS.md.

Not finished (see PR): gateway wiring (KR-A06), audit calls, sandbox (KR-A07), /assurance
routes, bridge resources/prompts, Playb00k.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
@elasticdotventures
elasticdotventures marked this pull request as ready for review October 3, 2026 11:56
@elasticdotventures
elasticdotventures merged commit f8b32e0 into main Oct 3, 2026
2 checks passed
@elasticdotventures
elasticdotventures deleted the feat/assurance-thread branch October 3, 2026 11:56
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.

1 participant