Skip to content

feat(explorer): v0.8.5 Explorer relationship navigation — traverse, impact, lineage - #56

Merged
tcballard merged 4 commits into
mainfrom
claude/v0.8.5-explorer-relationship-navigation
Jun 10, 2026
Merged

feat(explorer): v0.8.5 Explorer relationship navigation — traverse, impact, lineage#56
tcballard merged 4 commits into
mainfrom
claude/v0.8.5-explorer-relationship-navigation

Conversation

@tcballard

@tcballard tcballard commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md.

Adds:

  • A relationship view (g from a context view, or /relationships <ref>): an artifact's outgoing relationships, its impact ("what depends on this?"), and its lineage (Supersedes / Superseded By)
  • Graph traversal — connected artifacts are selectable, opening their context view, from which g reopens relationships; Esc unwinds
  • All rendered from the loaded repository model; Explorer infers nothing (ADR-016)

Roadmap / ADR Trace

Roadmap: rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md (contract pinned in the first commit)

Relevant ADRs and designs:

  • ADR-015 — relationship intelligence stays in Core
  • ADR-016 — relationships are authored in artifacts; Explorer reads, never edits or infers
  • ADR-020 — the requirement → implements/constrains/expresses traceability graph
  • DESIGN-knowledge-graph

Scope

Included

  • rac.explorer.state.RelationshipLink / RelationshipsView; ExplorerAdapter.relationships_view(path) built from the model's Relationship objects
  • RelationshipScreen — Relationships / Impact / Lineage sections plus a selectable list of connected (resolved) artifacts; g binding on the context view; /relationships <ref> routing (resolves the ref, then opens the view)

Excluded (deliberately)

  • Manual relationship editing or inference (ADR-016, ADR-015)
  • Created/Updated lineage timestamps — not modelled by Core; lineage covers Supersedes / Superseded By only
  • Any graphical canvas or web-style graph editor (Initiative 5) — terminal-readable text only
  • No Core/service changes; no JSON contract movement

Product / Architecture Decisions

  • The view is derived entirely from repository.relationships: outgoing edges are relationships whose source is this artifact (resolved to a title, or marked ✗ unresolved); impact is relationships whose resolved target is this artifact (the dependents); lineage filters supersedes in both directions. A test asserts the impact set equals the model's incoming-resolved references.
  • Traceability (ADR-020) needs no separate engine — it is the same outgoing/incoming traversal followed from a requirement.
  • The connected-artifact list is keyed by option index (a path can appear via several edges; OptionList ids must be unique), reusing the pattern from health/recommendations.
  • g (context) and /relationships <ref> both open the same screen; the command resolves the ref with rac resolve semantics first, surfacing not-found / duplicate like /open.

User-Facing Contract

CLI / Keys

rac explorer
# context view:  g → relationships;  Enter on a connected artifact → its context → g → …
# /relationships adr-015

Human Output (interactive)

ADR-015: Consumers before Interfaces

Relationships
  none declared

Impact (what depends on this)
  ← Explorer Command Surface (Related Decisions)
  ← Explorer Health (Related Decisions)

Lineage
  no recorded supersession

JSON Output

No changes; no new contracts.

Exit Codes

Unchanged: 0 session quit · 2 not a directory or missing explorer extra.

Verification

Ran

python -m pytest                      # 758 passed
python -m ruff check src/ tests/
python -m ruff format --check src/ tests/
python -m mypy src/
rac validate rac/                     # exit 0
rac relationships rac/ --validate     # exit 0
rac review rac/                       # no priority 1–2 findings

Covered

  • Adapter: outgoing resolves to the target artifact path; impact is the set of dependents (asserted equal to the model's incoming-resolved references for every artifact); unresolved targets are non-navigable and marked ; None before a load
  • Screens: g opens the relationship view (Relationships/Impact/Lineage sections), selecting a connected artifact opens its context view and Esc returns — traversal both ways; /relationships <ref> opens it for a resolved ref
  • Registry: relationships discoverable; /help lists all 10 entries

Review Path

  1. rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md — the pinned contract
  2. src/rac/explorer/adapter.pyrelationships_view (outgoing / impact / lineage derivation)
  3. src/rac/explorer/screens/relationships.py — the screen and traversal
  4. src/rac/explorer/screens/context.py, commands.py, screens/command.pyg binding and /relationships
  5. tests/ — adapter, app, commands
  6. docs/cli.md, CHANGELOG.md

Notes For Reviewer

Implementation Process

Implemented with AI assistance under the roadmap contract.

Final scope, review, and acceptance decisions were made by the maintainer.

Implements rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md.

Pins the relationship screen with outgoing/impact/lineage sections,
traversal via g and /relationships, Supersedes-based lineage, and the
presentation-only scope.
Implements rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md.

The relationship screen renders an artifact's outgoing relationships,
its impact (what depends on it), and its lineage (Supersedes /
Superseded By) from the loaded model. Connected artifacts are
selectable, opening their context view from which g reopens
relationships — traversal continues across the graph. Reachable with g
from context and via /relationships <ref>.
Implements rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md.
Implements rac/roadmaps/v0.8.x-explorer/v0.8.5-explorer-relationship-navigation.md.
@tcballard
tcballard force-pushed the claude/v0.8.5-explorer-relationship-navigation branch from 271db4b to 5501d18 Compare June 10, 2026 19:59
@tcballard
tcballard merged commit 9d7fc41 into main Jun 10, 2026
2 checks passed
@tcballard
tcballard deleted the claude/v0.8.5-explorer-relationship-navigation branch June 11, 2026 20:10
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