Skip to main content

Requirements Traceability Matrix toolkit for GenAI-driven development

Project description

RTMX

Requirements Traceability Matrix toolkit for GenAI-driven development.

CI codecov PyPI version Python versions License Downloads

Overview

RTMX provides tools for managing requirements traceability in software projects, with focus on:

  • GenAI Integration: Token-efficient data model for AI-driven development
  • Compliance Frameworks: Support for CMMC, FedRAMP, and other compliance standards
  • Pytest Integration: Link tests to requirements with markers
  • Dependency Analysis: Cycle detection, critical path analysis

Installation

pip install rtmx

For development:

pip install rtmx[dev]

Quick Start

Initialize RTM in your project

rtmx init

This creates:

  • docs/rtm_database.csv - Requirements database
  • docs/requirements/ - Requirement specification files
  • rtmx.yaml - Configuration file

Check status

rtmx status           # Summary
rtmx status -v        # Category breakdown
rtmx status -vv       # Subcategory breakdown
rtmx status -vvv      # All requirements

View backlog

rtmx backlog              # All incomplete
rtmx backlog --phase 1    # Phase 1 only
rtmx backlog --critical   # Critical path only

Check for issues

rtmx cycles               # Detect circular dependencies
rtmx reconcile            # Check dependency reciprocity
rtmx reconcile --execute  # Fix reciprocity issues

Python API

from rtmx import RTMDatabase, Status

# Load database
db = RTMDatabase.load("docs/rtm_database.csv")

# Query requirements
req = db.get("REQ-SW-001")
incomplete = db.filter(status=Status.MISSING)
phase1 = db.filter(phase=1)

# Graph operations
cycles = db.find_cycles()
blockers = db.critical_path()

# Validation
errors = db.validate()
violations = db.check_reciprocity()

# Modify and save
db.update("REQ-SW-001", status=Status.COMPLETE)
db.save()

Pytest Integration

RTMX provides pytest markers for requirement traceability:

import pytest

@pytest.mark.req("REQ-SW-001")
@pytest.mark.scope_unit
@pytest.mark.technique_nominal
@pytest.mark.env_simulation
def test_feature_x():
    """Test that validates REQ-SW-001."""
    assert feature_x() == expected

Available markers:

  • req(id) - Link test to requirement
  • Scope: scope_unit, scope_integration, scope_system
  • Technique: technique_nominal, technique_parametric, technique_monte_carlo, technique_stress
  • Environment: env_simulation, env_hil, env_anechoic, env_static_field, env_dynamic_field

Configuration

Create rtmx.yaml in your project root:

rtmx:
  database: docs/rtm_database.csv
  requirements_dir: docs/requirements
  schema: core  # or "phoenix" for extended schema
  pytest:
    marker_prefix: "req"
    register_markers: true

RTM Schema

Core Schema (20 columns)

Column Type Required Description
req_id string Yes Unique identifier (e.g., REQ-SW-001)
category string Yes High-level grouping
subcategory string No Detailed classification
requirement_text string Yes Human-readable description
target_value string No Quantitative criteria
test_module string No Test file path
test_function string No Test function name
validation_method string No Testing approach
status string Yes COMPLETE/PARTIAL/MISSING
priority string No P0/HIGH/MEDIUM/LOW
phase integer No Development phase
notes string No Additional context
effort_weeks float No Estimated effort
dependencies list No Pipe-separated req IDs
blocks list No Pipe-separated req IDs
assignee string No Owner
sprint string No Target version
started_date date No YYYY-MM-DD
completed_date date No YYYY-MM-DD
requirement_file string No Path to spec file

Phoenix Extension

The Phoenix schema adds validation taxonomy columns:

  • Scope: scope_unit, scope_integration, scope_system
  • Technique: technique_nominal, technique_parametric, etc.
  • Environment: env_simulation, env_hil, env_anechoic, etc.
  • Metrics: baseline_metric, current_metric, target_metric

Makefile Integration

Add to your Makefile:

.PHONY: rtm rtm-v rtm-vv rtm-vvv backlog

rtm:
	rtmx status

rtm-v:
	rtmx status -v

rtm-vv:
	rtmx status -vv

rtm-vvv:
	rtmx status -vvv

backlog:
	rtmx backlog

Jetstream Integration

RTMX is designed as a foundation for the Jetstream digital engineering platform:

  • CMMC Level 2 compliance mapping
  • FedRAMP High authorization support
  • Prometheus metrics export (planned)
  • Multi-project federation (planned)

Development

# Clone and install
git clone https://github.com/iotactical/rtmx.git
cd rtm
make dev

# Run tests
make test

# Run linter
make lint

# Format code
make format

License

MIT License - see LICENSE for details.

Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtmx-0.0.1.tar.gz (79.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtmx-0.0.1-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file rtmx-0.0.1.tar.gz.

File metadata

  • Download URL: rtmx-0.0.1.tar.gz
  • Upload date:
  • Size: 79.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rtmx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c6d30bc812823ad045f8858c452aa3838a74fda28aee66e4fdaf5130fd46eeab
MD5 bf958a9559d2fb6cf8e9292af6791994
BLAKE2b-256 93312de459df98ac85565fe8ce63d79a372adb7641ed6b8a6b926acef9de594a

See more details on using hashes here.

File details

Details for the file rtmx-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rtmx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 67.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rtmx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f61fa9b7d7395da0ee54c0c1f590449af8551035e20b8028612df6e279eecc89
MD5 97d67c4ebc4458b947400475afa5f6a1
BLAKE2b-256 59b7b52ae57fd7fcbf19a4a0792f615f48c27f39df67fce4ed52a09976e9ed13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page