Context
Eclipse SCORE and many other automotive/safety-critical projects use sphinx-needs with its needs.json export format. There is no migration path from sphinx-needs to alternative tooling. SCORE has 50+ need types and hundreds of artifacts in this format.
Problem
Teams wanting to adopt Rivet from an existing sphinx-needs project have no import path. The needs.json format contains:
- All need objects with their types, attributes, and content
- Link information (incoming/outgoing with link types)
- Status, tags, and custom fields
- Metadata (docname, section, line number)
Proposed approach
New adapter needs-json that:
- Parses
needs.json (sphinx-needs export format)
- Maps sphinx-needs types to Rivet schema types (configurable mapping in rivet.yaml)
- Converts sphinx-needs links to Rivet link types
- Preserves custom fields and metadata as Rivet fields
- Handles ID format differences (sphinx-needs uses underscored IDs like
stkh_req__name)
# rivet.yaml
sources:
- path: imported/needs.json
format: needs-json
options:
type-mapping:
stkh_req: stakeholder-req
feat_req: feature
comp_req: sw-req
id-transform: underscores-to-dashes
Rivet artifacts
References
Context
Eclipse SCORE and many other automotive/safety-critical projects use sphinx-needs with its
needs.jsonexport format. There is no migration path from sphinx-needs to alternative tooling. SCORE has 50+ need types and hundreds of artifacts in this format.Problem
Teams wanting to adopt Rivet from an existing sphinx-needs project have no import path. The
needs.jsonformat contains:Proposed approach
New adapter
needs-jsonthat:needs.json(sphinx-needs export format)stkh_req__name)Rivet artifacts
References