@technicallycorrect/requires
v0.8.3
Published
Claude Code /command for requirements-driven development
Downloads
15
Readme
requires
Claude Code /command for requirements-driven development.
Overview
Requires is a CLI tool that sets up a structured requirements-driven development workflow in your projects. It creates organized directories for requirements and design documents, and provides Claude Code slash commands for generating requirements, planning implementations, and generating code.
Usage
Run the init command in your project directory:
npx @technicallycorrect/requires init [options]Options:
-g, --global- Install commands globally in~/.claude/commands/instead of project-local.claude/commands/-f, --force- Overwrite existing files without prompting
Note: If the requires.md command already exists, you'll be prompted to overwrite unless using --force.
This will create the following structure:
your-project/
├── requires/
│ ├── requirements/ # Structured requirement markdown files
│ └── designs/ # Implementation design plans and analysis
└── .claude/
└── commands/
└── requires.md # Claude Code slash commandsClaude Code Commands
After initialization, you can use these slash commands in Claude Code:
Generate Requirements
/requires "your feature description"Creates structured requirements from natural language descriptions. Requirements are saved as markdown files with hierarchical IDs.
Plan Implementation
/requires design REQUIREMENT-IDAnalyzes a requirement and creates an implementation plan. Design documents are saved in the requires/designs/ directory.
Generate Code
/requires implement REQUIREMENT-IDGenerates code implementation based on the requirement and its design plan.
Update Requirements
/requires update REQUIREMENT-ID "new requirement text"Updates an existing requirement with new text and analyzes impact on all related requirements (parent, child, sibling, and dependent). Validates that all relationships remain consistent and identifies which requirements need updates.
Example Workflow
Initialize the project:
npx @technicallycorrect/requires initGenerate requirements:
/requires "Add user authentication with email and password"This creates files like:
requires/requirements/USER-AUTH.md- Main featurerequires/requirements/USER-AUTH-1.md- User registrationrequires/requirements/USER-AUTH-2.md- User loginrequires/requirements/USER-AUTH-2-1.md- Credential validation
Plan implementation:
/requires design USER-AUTH-1Creates
requires/designs/USER-AUTH-1-design.mdwith implementation approach.Generate code:
/requires implement USER-AUTH-1Generates the actual code implementation.
Update requirements (if needed):
/requires update USER-AUTH-1 "User registration with email, password, and optional profile picture"Updates the requirement and validates that parent, child, sibling, and dependent requirements are still consistent. Reports which requirements need updates due to the change.
License
MIT
