Skip to main content

Requirements Traceability Matrix toolkit for GenAI-driven development

Project description

RTMX

Requirements Traceability Matrix toolkit for AI-driven development.

CI Coverage Status PyPI version Python versions License


RTMX brings requirements traceability to modern software development. Track what you're building, why you're building it, and prove it works—all from your terminal.

rtmx status

Why RTMX?

For AI-assisted development, RTMX provides the context AI agents need:

  • Token-efficient CSV format that fits in context windows
  • Clear requirement IDs for precise references (REQ-AUTH-001)
  • Dependency graphs that show what to build next

For teams, RTMX brings clarity:

  • One command to see project progress: make rtm
  • Prioritized backlog with blocking dependencies
  • Tests linked directly to requirements

For compliance, RTMX provides traceability:

  • Every requirement linked to its test
  • Audit-ready CSV database (version-controlled, diff-friendly)
  • Validation that catches gaps before reviewers do

Installation

pip install rtmx

Quick Start

1. Set up RTMX in your project

rtmx setup

This creates everything you need:

  • rtmx.yaml — Configuration file
  • docs/rtm_database.csv — Requirements database
  • docs/requirements/ — Requirement specification files
  • Makefile targets (make rtm, make backlog)
  • AI agent configs (CLAUDE.md, .cursorrules)

For existing projects, use --branch to review changes before merging:

rtmx setup --branch    # Creates a git branch for review
rtmx setup --pr        # Creates branch + opens PR

2. Check your status

rtmx status -v    # Verbose output with category breakdown
rtmx status -vv   # Very verbose with requirement details
rtmx status -vvv  # Maximum detail

3. See what to work on next

rtmx backlog

4. Run health checks

rtmx health

Pytest Integration

Link your tests directly to requirements:

import pytest

@pytest.mark.req("REQ-AUTH-001")
@pytest.mark.scope_unit
def test_oauth_login():
    """Validates REQ-AUTH-001: OAuth 2.0 authentication."""
    assert authenticate_user(token) == expected_user

RTMX automatically tracks which requirements have tests and which don't.

Available markers:

Marker Purpose
@pytest.mark.req("REQ-XXX-NNN") Links test to requirement
@pytest.mark.scope_unit Unit test scope
@pytest.mark.scope_integration Integration test scope
@pytest.mark.scope_system System/E2E test scope

Commands

Core Commands

Command Description
rtmx setup Complete RTMX setup (config, RTM, agents, Makefile)
rtmx init Minimal setup (config and RTM database only)
rtmx status Show completion progress (-v, -vv, -vvv for detail)
rtmx backlog Show prioritized incomplete requirements
rtmx health Run integration health checks
rtmx config Show or validate configuration

Analysis Commands

Command Description
rtmx deps Show dependency graph
rtmx cycles Detect circular dependencies
rtmx reconcile Check/fix dependency reciprocity
rtmx analyze Discover requirements from project artifacts
rtmx diff Compare RTM versions (for PRs)

Integration Commands

Command Description
rtmx from-tests Scan tests for requirement markers
rtmx bootstrap Generate RTM from tests, GitHub, or Jira
rtmx sync Synchronize with GitHub Issues or Jira
rtmx install Install prompts into AI agent configs
rtmx makefile Generate Makefile targets
rtmx mcp-server Start MCP server for AI agent integration

Makefile Integration

After rtmx setup, you get these Makefile targets:

make rtm       # Quick status check
make backlog   # See what's next
make health    # Run health checks

Python API

from rtmx import RTMDatabase, Status

# Load and query
db = RTMDatabase.load("docs/rtm_database.csv")
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()

Configuration

rtmx.yaml:

rtmx:
  database: docs/rtm_database.csv
  requirements_dir: docs/requirements
  schema: core
  pytest:
    marker_prefix: "req"
    register_markers: true

RTM Schema

The CSV database includes these columns:

Column Required Description
req_id Yes Unique identifier (e.g., REQ-AUTH-001)
category Yes High-level grouping
requirement_text Yes Human-readable description
status Yes COMPLETE, PARTIAL, MISSING, NOT_STARTED
priority No P0, HIGH, MEDIUM, LOW
phase No Development phase number
dependencies No Pipe-separated req IDs this depends on
blocks No Pipe-separated req IDs this blocks
test_module No Test file path
test_function No Test function name

See the schema documentation for the complete 20-column schema.

CI/CD Integration

RTMX provides GitHub Actions workflows:

Health check on every push:

- run: pip install rtmx
- run: rtmx health --format ci

RTM diff on pull requests:

- run: |
    git show origin/main:docs/rtm_database.csv > base.csv
    rtmx diff base.csv docs/rtm_database.csv --format markdown

Development

git clone https://github.com/iotactical/rtmx.git
cd rtmx
make dev      # Install with dev dependencies
make test     # Run tests
make lint     # Run linter

License

Apache License 2.0 — see LICENSE for details.

Contributing

Contributions welcome! Please read our contributing guidelines before submitting PRs.


Built by ioTACTICAL
Engineering teams building what matters.

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.4.tar.gz (445.3 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.4-py3-none-any.whl (132.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rtmx-0.0.4.tar.gz
  • Upload date:
  • Size: 445.3 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.4.tar.gz
Algorithm Hash digest
SHA256 fa96b9a8572ea829e7798fdf193d883ba47731043f42f8fc950aa0efb8c0ebc5
MD5 6099d7a1c6c8dc34bc479182540a4483
BLAKE2b-256 28ca20376b07246ff56b913795e3fa83455e519b0242fd35e39e3fd504cbbf96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rtmx-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 132.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cb9ce96baa5c8a711fe0550e40eb651a75249d75bfe72e8bbda09b93e233c03d
MD5 ab0fb46a20d8b451f6a34be77cef964e
BLAKE2b-256 55464b6d0aba2f01071b2ea413a0aad404737b9106ce84d97d85aedcedc783a4

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