Skip to content

feat: map reqrs ReqIfBundle onto ufo_types RequirementGraph (#40) - #143

Closed
elasticdotventures wants to merge 3 commits into
mainfrom
feat/vendor-reqif-opa-mcp
Closed

elasticdotventures wants to merge 3 commits into
mainfrom
feat/vendor-reqif-opa-mcp

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Branch feat/vendor-reqif-opa-mcp — 54 commit(s) ahead of main. Auto-opened for review triage.

🤖 Generated with Claude Code

elasticdotventures and others added 3 commits September 20, 2026 01:27
Adds vendor/reqif-opa-mcp (PromptExecution/reqif-opa-mcp, pinned to
main) as a git submodule, matching the existing vendor/kroki-mcp and
vendor/kubediagrams pattern.

Uplifted it first (PromptExecution/reqif-opa-mcp#25, open, not yet
merged): it declared reqif>=0.0.48 (StrictDoc, Apache-2.0) as a
dependency but never imported it, parsing/emitting ReqIF XML by hand
via xml.etree.ElementTree instead. Fixed to genuinely use StrictDoc,
which surfaced (and required fixing in every fixture/sample) three
latent ReqIF 1.2 structural gaps the hand-rolled parser's permissive
XPath had been silently accepting. Full details in that PR and in
docs/TODO.md.

This is the foundation for the StrictDoc ReqIF/ReqIFz adapter
(docs/TODO.md), not the adapter itself: kr0ki-core doesn't call into
this submodule yet. Bump the pin once #25 merges upstream.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJ5M1bGQJB1VS8Epr7AGLa
Decision, per #39: use the reqrs crate
(Apache-2.0, a direct Rust port of the same StrictDoc reqif package
already mandated) as a normal kr0ki-core dependency for ReqIF/ReqIFz
parsing, superseding the original "small Python sidecar/HTTP/MCP
boundary" plan in the handoff doc's deliberate-boundaries section.

Verified hands-on before deciding (see the issue): parses a real
fixture correctly, rejects a structurally-invalid one with a clearer
error than reqif-opa-mcp's Python reqif dependency gave for the
identical case, round-trips byte-identically on consistently-formatted
input. Caveats carried into both docs: reqrs is young (pre-1.0, single
maintainer) and its behavior on the reqif 0.0.48 no-namespace bug
(reqif-opa-mcp#25) is unverified — check before depending on it for
namespace-optional input.

vendor/reqif-opa-mcp (this same branch/PR) stays useful as a
fixture/test-harness source and for its own separate artifact -> OPA
-> SARIF pipeline; it's no longer positioned as this adapter's parsing
sidecar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJ5M1bGQJB1VS8Epr7AGLa
* feat: map reqrs ReqIfBundle onto ufo_types RequirementGraph

Adds `reqrs` as a kr0ki-core dependency and `kr0ki_core::reqif_adapter`,
the mapping from a parsed ReqIF document to the shared requirements
semantic model, per the reqrs-over-sidecar decision (docs/TODO.md,
docs/HANDOFF-2026-09-19-reqif-flexo.md, kr0ki#39). Attribute values are
keyed by normalized LONG-NAME, mirroring the attrs_map convention
already used once in Python for reqif-opa-mcp (PR #25), so title/text/
relation-kind recovery follows the same name/title/key/text/description
fallback chain rather than inventing a second convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJ5M1bGQJB1VS8Epr7AGLa

* fix: preserve ReqIF type and enum semantics

* chore: ignore Claude workspace artifacts

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@elasticdotventures

Copy link
Copy Markdown
Member Author

Superseded by merged #41 and #43: ReqIfBundle mapping to RequirementGraph is on main and the adapter was moved to ufo_types::reqif. This old vendor branch conflicts with that migration.

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