Skip to content
/

reqtext

reqtext · fred-terzi/reqtext · ★ 0 · last commit 2025-05-28

Git-native requirements management CLI generating dual human+AI documentation from a flat JSON hierarchy with built-in test traceability.

Best whenRequirements should live in a structured JSON source-of-truth that generates both human-readable documentation and an AI-optimized context file with selectiv…
Skip ifEditing README.md directly instead of regenerating from .reqt.json, Manual file editing instead of using CLI commands
vs seeds
agent-osand claude-conductor (both generate structured markdown context) but inverted: ReqText generates AI-readable context fro…
Primitive shape 17 total
Commands 17
00

Summary

ReqText — Summary

ReqText is a Git-native, CLI-first requirements and documentation framework that stores requirements as a flat hierarchical JSON structure (.reqt.json) alongside generated human-readable markdown files, designed to bring requirements management directly into the developer workflow. It ships as an npm package (npm install -g reqtext) with two binary aliases (reqt and reqtext) and provides both a full CLI for structured requirements management and an interactive terminal tree editor for visual navigation. The framework generates two separate README files from requirements: README.md for human readers and README_AI.reqt.json for AI tools with exclude fields to filter out human-only content. Requirements items carry requirement, acceptance, details, readme, readme_ai, test_exists, test_passed, and status fields, making test traceability a native feature.

Compared to seeds: closest to agent-os (markdown scaffold for structuring work context) but more specialized — reqtext is a standalone requirements management CLI that generates documentation rather than an agent behavior framework. Unlike any seed, it separates human-facing and AI-facing documentation as first-class output formats.

01

Overview

ReqText — Overview

Origin

Created by Fred Terzi (fred-terzi); published as npm package reqtext v0.2.1. Original GitHub repo (fred-terzi/reqtext) has been removed but a fork (NoleHealth/reqtext-fork) preserves the content. npm package remains published at https://www.npmjs.com/package/reqtext.

Philosophy

"Reqtext is a Git-native, CLI first requirements and documentation framework meant to bring requirement management directly into your workflow. Human -and AI- readable."

"My workflow is to write all the details in common language, like a prompt, and have AI populate the rest." — Fred Terzi (README)

The framework treats requirements as source-of-truth data that generates documentation, not the other way around. The .reqt.json is the canonical store; markdown files are derived artifacts.

Design Principles

  • Git-native: .reqt.json is a flat JSON structure that diffs cleanly in version control
  • Human + AI dual output: two generated files — README.md for humans, README_AI.reqt.json for AI tools (with exclude field to filter sensitive/non-AI-useful content)
  • Test traceability: test_exists and test_passed fields on every requirement item
  • Markdown editing workflow: check out requirements to a .reqt.md file for bulk editing, then import back
  • AI-assisted authoring: write requirements in plain language, let AI populate fields, then clean up
02

Architecture

ReqText — Architecture

Distribution

npm package:

npm install -g reqtext
# or
npm install reqtext

Binaries: reqt (preferred shorthand) and reqtext

Install Complexity

One-liner (npm global install)

Required Runtime

  • Node.js (npm)

Directory Tree (after reqt init "My Project")

<project-root>/
└── .reqt/
    ├── config.reqt.json          # Project configuration
    ├── itemTemplate.reqt.json    # Template for new items (customizable)
    └── <project-name>.reqt.json  # Source of truth (flat hierarchical JSON)

Generated output files (in project root):

  • README.md — human-facing documentation with mermaid diagrams
  • README_AI.reqt.json — AI-facing version with excluded fields stripped

Item Data Model

{
  "reqt_ID": "2025-05-20T19:14:37.669Z-12b36284",
  "hier": 1,
  "outline": "5.3",
  "title": "Example Reqt",
  "requirement": "...",
  "acceptance": "...",
  "details": "...",
  "readme": "...",
  "readme_ai": "exclude",
  "test_exists": "true",
  "test_passed": "false",
  "status": "IN DEV"
}

Config Files

  • .reqt/config.reqt.json — project name, item template reference
  • .reqt/itemTemplate.reqt.json — template for new items, editable at any time

Target AI Tools

Any AI tool that can read JSON files; specifically README_AI.reqt.json is designed for AI context injection.

03

Components

ReqText — Components

CLI Binary: reqt / reqtext

General Commands

Command Purpose
reqt init <project name> Initialize project; creates .reqt/ directory
reqt editor Launch interactive terminal tree editor
reqt clean Ensure all items have valid reqt_id
reqt version Show version
reqt help Show help

Item Management Commands

Command Purpose
reqt add-item "New Item" Add item to end of project
reqt add-after 1.2 "New Subitem" Add item after specific outline ID
reqt delete 1.3 Delete item by outline number
reqt make-children 1.2 Demote item (and children) — increases indentation
reqt make-sibling 1.2 Promote item (and children) — decreases indentation
reqt edit-title 1.2 "Updated Title" Edit title by outline ID
reqt set-status 1.2 NEW Set status of item
reqt test-exists 1.2 true Mark test as existing
reqt test-passed 1.2 true Mark test as passed

Markdown Workflow Commands

Command Purpose
reqt out-md Export requirements to .reqt.md for editing
reqt in-md [--keep] Import changes from .reqt.md back into .reqt.json
reqt diff Show differences between .reqt.json and markdown file

Generation Commands

Command Purpose
reqt generate-readme Generate README.md from .reqt.json
reqt generate-readme_ai Generate README_AI.reqt.json for AI tools

Interactive Terminal Editor

reqt editor — tree view with keyboard navigation:

  • Arrow keys: navigate
  • k/j: move item up/down
  • /: demote/promote
  • a: add new item after current
  • d: delete selected
  • e: edit title
  • r: reload
  • q/Ctrl+C: quit
05

Prompts

ReqText — Prompt Files

ReqText does not ship prompt files for AI agents in the traditional sense — it is a requirements management CLI, not an agent framework. The closest analog is the README_AI.reqt.json output file which is specifically designed for injection into AI context.

Verbatim Excerpt 1: Example requirement item (README)

Prompting technique: Schema documentation — structured JSON with all fields explained inline

{
  "reqt_ID": "2025-05-20T19:14:37.669Z-12b36284",
  "hier": 1,
  "outline": "5.3",
  "title": "Example Reqt",
  "requirement": "An example must exist for the README generation. It must follow these steps:\n
    - Create the example in the Tree Editor\n
    - Write the text in the .reqt.md workflow\n
    - checked in to the .reqt.json\n
    - Generated to the README.md and excluded from the README_AI.reqt.json",
  "acceptance": "The example must be clear and helpful. The example must be approved by Fred.",
  "details": "For the README there will be a section to show an example...",
  "readme": "This example demonstrates how a requirement is represented...",
  "readme_ai": "exclude",
  "test_exists": "true",
  "test_passed": "false",
  "status": "IN DEV"
}

Verbatim Excerpt 2: Author workflow philosophy (README)

Prompting technique: Persona-injected workflow guidance (author speaking directly to reader)

> **A Note from Fred** My workflow is to write all the details in common language, like a prompt,
> and have AI populate the rest. Then I clean up or change the README section. I did it for this
> example!

Verbatim Excerpt 3: Markdown checkout format (.reqt.md output format)

Prompting technique: Structured markdown template with ID comment lines for round-trip parsing

-- ReqText ID Comment line - start --

### 5.3: Example Reqt

-- ReqText Table Comment Line--

| Field | Value |
|---|---|
| status | IN DEV |
| test_exists | true |
| test_passed | false |

-- Make Content "exclude" to exclude from README AI generation --

-- ReqText ID Comment Line --end--
09

Uniqueness

ReqText — Uniqueness & Positioning

Differs from Seeds

ReqText doesn't closely match any seed framework — it occupies a different niche. It is a requirements management tool, not an agent behavior framework. The closest seeds are agent-os and claude-conductor (both generate structured markdown context for agents) but those are CLAUDE.md/AGENTS.md scaffolds rather than standalone requirements databases. ReqText's .reqt.jsonREADME_AI.reqt.json generation pipeline is the opposite direction from Kiro's spec format (Kiro generates tasks from requirements; ReqText generates documentation from requirements). Unlike taskmaster-ai (task execution tracker), ReqText is pre-execution — it manages formal requirements with acceptance criteria and test traceability before any tasks are created. The dual-output system (human README.md vs AI README_AI.reqt.json with selective exclusion) is not found in any seed.

Distinctive Positioning

  • Only tool in this batch focused on formal requirements management (not task/issue tracking)
  • Dual-output generation: README.md (human) + README_AI.reqt.json (AI) with field-level exclude control
  • Test traceability baked into the data model (test_exists, test_passed per requirement)
  • Interactive terminal tree editor for hierarchical requirements management
  • Flat JSON with outline IDs (1.2.3) for deterministic hierarchy without nested objects

Observable Failure Modes

  • Original GitHub repo removed; only available via npm and a fork — maintainability unclear
  • No integration with task trackers (Jira, GitHub Issues, backlog-md) — requirements live separately from tasks
  • No agent-executable instructions — AI tools use the output as context but ReqText doesn't tell agents what to do with requirements
  • Limited adoption (original repo gone, fork has 0 stars) — community feedback absent
  • No version control for individual requirements beyond git history of .reqt.json
04

Workflow

ReqText — Workflow

Requirements Authoring Loop

Step 1 — Initialize

reqt init "My Project"

Creates .reqt/ directory with config and item template.

Step 2 — Add Requirements

Via CLI: reqt add-item "User must be able to log in" Via editor: reqt editor — interactive tree navigation

Step 3 — Enrich with AI (optional)

Export to markdown for AI-assisted authoring:

reqt out-md    # Creates .reqt.md

Give .reqt.md to an AI tool to populate requirement, acceptance, details fields.

reqt in-md     # Import changes back

Step 4 — Track Test Status

reqt test-exists 1.2 true    # Mark that a test exists
reqt test-passed 1.2 true    # Mark test as passing

Step 5 — Generate Documentation

reqt generate-readme          # README.md for humans
reqt generate-readme_ai       # README_AI.reqt.json for AI tools

Artifacts per Phase

Phase Artifact
Initialization .reqt/config.reqt.json, <project>.reqt.json
Requirements .reqt.json entries with hierarchy
Markdown edit .reqt.md (temporary)
Generation README.md, README_AI.reqt.json

Approval Gates

None. ReqText is a data management tool; no approval gates built in.

06

Memory Context

ReqText — Memory & Context

State Storage

  • Primary: .reqt/<project>.reqt.json — flat hierarchical JSON, source of truth
  • Config: .reqt/config.reqt.json
  • Generated: README.md, README_AI.reqt.json (derived, regenerated on demand)
  • Temporary: .reqt.md (checked-out markdown for editing, deleted after reqt in-md)

Persistence

  • Scope: Project-scoped
  • Git integration: .reqt.json files are git-tracked; differences visible in standard git diff

AI Context Injection

README_AI.reqt.json is specifically designed to be given to AI tools as context. Items with readme_ai: "exclude" are stripped from this output. This dual-output pattern allows requirements authors to have human documentation with context that isn't appropriate for AI injection (e.g., private implementation notes).

Test Traceability

test_exists and test_passed fields on each requirement item provide requirements-to-test traceability in the data model.

Compaction

No explicit compaction. Requirements accumulate; reqt archive not mentioned — items are deleted or status-changed.

07

Orchestration

ReqText — Orchestration

ReqText is a requirements management tool, not an agent orchestration framework. It has no multi-agent features, no orchestration patterns, and no execution modes beyond the CLI invocation.

Multi-Agent Support

No.

Orchestration Pattern

None.

Isolation Mechanism

None.

Execution Mode

One-shot per command.

Multi-Model

No.

Intended Integration

ReqText sits upstream of AI agent workflows — it generates README_AI.reqt.json which can be consumed by an agent as context for understanding project requirements before implementing tasks. The orchestration of agents that use that context is outside ReqText's scope.

08

Ui Cli Surface

ReqText — UI & CLI Surface

CLI Binary

Binary names: reqt (preferred), reqtext Installation: npm install -g reqtext Version: 0.2.1

Subcommands: init, editor, clean, add-item, add-after, delete, make-children, make-sibling, edit-title, set-status, test-exists, test-passed, out-md, in-md, diff, generate-readme, generate-readme_ai

Terminal TUI

reqt editor — interactive tree editor with keyboard navigation. Provides visual tree view of requirement hierarchy with inline editing.

Sample output:

0: ReqText_Demo - In Dev
├── 0.1: Design Level Reqts - DESIGN
├── 0.2: Instructs Level - INSTRUCT
├── 1: Feature 1 - In Dev
│   ├── 1.1: Requirement 1 - In Dev
│   └── 1.2: Requirement 2 - ACCEPT
│       └── 1.2.1: Design Detail - DESIGN
└── 2: Feature 2 - NEW

Local Web Dashboard

None.

IDE Integration

None. Works as a standalone CLI.

Observability

  • Requirements have status field with custom values (NEW, IN DEV, ACCEPT, DESIGN, etc.)
  • Test traceability: test_exists and test_passed fields
  • reqt diff — shows pending changes between .reqt.json and .reqt.md

Related frameworks

same archetype · same primary tool · same memory type

claude-mem (thedotmack) ★ 78k

Background worker service captures every tool call as an observation, AI-compresses sessions, and auto-injects relevant past…

pi (badlogic/earendil) ★ 55k

A minimal, hackable, multi-provider terminal coding agent that adapts to your workflows via npm-installable TypeScript Extensions…

Agent Skills (Addy Osmani) ★ 46k

Encodes senior-engineer software development lifecycle as 23 auto-routed skills and 7 slash commands for any AI coding agent.

wshobson/agents Plugin Marketplace ★ 36k

Single Markdown source for 83 domain-specialized plugins that auto-generates idiomatic artifacts for five AI coding harnesses.

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…

Compound Engineering ★ 17k

Make each unit of engineering work compound into easier future work via brainstorm→plan→execute→review→learn cycles.