Skip to content

No reverse-link view from get/list: verifying 'is this requirement implemented?' needs req→satisfying-tests→run-commands, only reachable via raw YAML #358

@avrabe

Description

@avrabe

Follow-up to #353 (same task class — bulk planned/draftimplemented — but on spar, rivet 0.13.3 (b55a9c6f release/v0.14.0)). #353 covers modify/validate ergonomics; this is one distinct gap not covered there: you can't see an artifact's incoming links from the per-artifact commands, which makes evidence-gated status promotion harder than it should be.

The task that exposed it

To promote a requirement to implemented with evidence (not just because a link exists), I wanted, per requirement: the tests that satisfies it → their run commands → run them → promote only if green. Walking that chain from the CLI turned out to be the hard part.

What was hard

In this schema the satisfies edges live on the verification/feature artifacts and point at the requirement. So from the requirement's own view there's nothing to see:

  • rivet get REQ-MIGRATION-001 --format json"links": []. The links array is outbound-only; there is no incoming/reverse view. Inspecting the requirement tells you nothing about what verifies it.
  • rivet list --type requirement --format json → collapses links to an integer count ("links": 3), not the link objects — so it's not usable to inspect the graph programmatically either.

Net: the single most common traceability question — "what verifies X?" — is unanswerable from the two commands an agent naturally reaches for when inspecting X.

What finally helped

rivet matrix with --direction backward has the reverse edges:

rivet matrix --from requirement --to feature --link satisfies --direction backward --format json
# rows: [{ "source_id": "REQ-MODEL-002", "targets": ["TEST-WORKSPACE","TEST-HIR-DEF"] }, ...]

This is the right primitive, but (a) it wasn't discoverable from get/list, and (b) it returns only target IDs — to get the executable evidence I still had to load verification.yaml and read each test's fields.steps[].run myself. So the end-to-end walk req → tests → commands still required hand-parsing the source YAML; matrix got me one hop, not the payload.

Asks (agent ergonomics)

  1. Show incoming links in rivet get <ID> (text + --format json), e.g. an incoming_links: [{type, source}] array, or a --reverse/--incoming flag. Inspecting one artifact should reveal both what it links to and what links to it.
  2. rivet list --format json should emit the real links array, not a count (matches a point implied in Friction marking requirements implemented in a real project (rivet 0.13.3): silent file-skip, validate baseline noise, loop-modify no-op #353's agent-ergonomics asks).
  3. (nice-to-have) let matrix/get optionally inline the target's fields (or at least method + run steps) so an agent can reach the runnable evidence without re-parsing source YAML.

Outcome on spar (for context)

Used the matrix-reverse + YAML-parse workaround to map 30 non-implemented requirements to their satisfying tests, ran the suites (cargo test across 9 crates, --no-fail-fast, exit 0 / all green), and promoted 25 plannedimplemented (held back 3 with only Kani/Lean verification I couldn't run locally + 2 deliberately-partial). rivet validate held at FAIL (190 errors, 160 warnings, **0 broken cross-refs**) before and after — no structural regression.

Happy to share the spar reverse-mapping script if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions