Skip to content
Rex

Rex

PRD management with hierarchical epics, features, tasks, and subtasks. LLM-powered analysis turns codebase findings into structured work items.

Data Model

Epic
  └── Feature
        └── Task
              └── Subtask

Each item has: id, title, status, priority, description, acceptanceCriteria, tags, blockedBy, timestamps.

Status: pending | in-progress | completed | failed

Priority: critical | high | medium | low

CLI

sh
rex init .                           # initialize .rex/
rex status .                         # PRD tree with completion stats
rex next .                           # next actionable task
rex add "description" .              # smart add via LLM
rex add --file=ideas.txt .           # import from file
rex update <id> --status=completed . # update item
rex move <id> --parent=<parent-id> . # reparent item
rex remove <id> .                    # remove item and descendants
rex reshape .                        # LLM-powered PRD restructuring
rex prune .                          # remove completed subtrees
rex validate .                       # check PRD integrity
rex fix .                            # auto-fix common PRD issues
rex sync .                           # sync with remote adapter
rex usage .                          # token usage analytics
rex report .                         # JSON health report for CI
rex verify .                         # run acceptance criteria tests
rex analyze .                        # scan project, generate proposals
rex recommend .                      # show SourceVision recommendations
rex recommend --accept .             # add recommendations to PRD
rex reorganize .                     # detect and fix structural issues
rex health .                         # PRD structure health score
rex adapter list .                   # manage store adapters
rex mcp .                            # start MCP server (stdio)

Smart Add

rex add uses an LLM to decompose natural language descriptions into structured proposals:

sh
rex add "Add SSO support with Google and Okta, admin config UI, audit logs" .

Produces structured epic/feature/task proposals with duplicate detection. When duplicates are found:

  • Cancel — write nothing
  • Merge — update matched items, add only non-duplicates
  • Proceed — create duplicates with override markers

Recommend

sh
rex recommend .                      # show findings
rex recommend --accept .             # add all to PRD
rex recommend --actionable-only .    # anti-patterns, suggestions, move-files only
rex recommend --acknowledge=1,2 .    # skip specific findings
rex recommend --acknowledge-completed .  # acknowledge completed tasks' findings

Baseline Detection

When scanning an existing codebase for the first time (empty PRD), Rex detects this as a baseline scan. The LLM marks:

  • Completed — functionality already implemented in the code
  • Pending — gaps and improvements to build

This prevents existing code from appearing as a wall of pending tasks.

Files

FilePurpose
.rex/prd.jsonPRD tree (epics → features → tasks → subtasks)
.rex/config.jsonProject configuration
.rex/execution-log.jsonlExecution history (append-only, auto-rotated at 1 MB)
.rex/workflow.mdHuman-readable workflow state
.rex/acknowledged-findings.jsonAcknowledged SourceVision findings
.rex/pending-proposals.jsonProposals awaiting acceptance
.rex/archive.jsonPruned/reshaped item archive

MCP Tools

Available via rex mcp . (stdio) or ndx start . (HTTP). Claude Code prefixes these as mcp__rex__{tool}; Codex uses bare names.

ToolDescription
get_prd_statusPRD title, overall stats, and per-epic stats
get_next_taskNext actionable task based on priority and dependencies
update_task_statusUpdate item status
add_itemAdd epic/feature/task/subtask
edit_itemEdit item content (title, description, priority, tags)
get_itemFull item details with parent chain
move_itemReparent an item in the PRD tree
merge_itemsConsolidate duplicate sibling items
get_recommendationsSourceVision-based recommendations
verify_criteriaMap acceptance criteria to test files
reorganizeDetect and fix structural issues
healthPRD structure health score
facetsList configured facets with distribution
append_logWrite structured log entry
sync_with_remoteSync with remote adapter (e.g. Notion)
get_capabilitiesServer capabilities and configuration

Released under the Elastic License 2.0.