- Home
- Skills
- Workflow Automation
- rei-spec-driven-development
Works with the AI Agents you already use
Rei Spec Driven Development
Agents often rush to write code before the requirements are clear, leading to expensive refactors and scope creep.
Free
rei-spec-driven-development
Example session with this skill installed
I need to add a new JWT authentication middleware to our Express API. Use spec-driven development.
- Read your context and instructions
- Compiled the rei-spec-driven-development
I have initialized a new Feature work item for the JWT authentication middleware. I will now generate the requirements, design, and task list for your approval.
Work Item: 2024-05-20_14-30__jwt-auth-middleware
Type: Feature
Status: Ready (Awaiting Validation/Approval)
Requirements (requirements.md)
| ID | Requirement | Pattern |
|---|---|---|
| R1 | The system SHALL verify the RS256 signature of the incoming 'Authorization' header. | Ubiquitous |
| R2 | WHEN a token is expired, the system SHALL return a 401 Unauthorized response. | Event |
| R3 | The system SHALL inject the decoded payload into req.user. | Ubiquitous |
| R4 | IF the header is missing THEN the system SHALL return a 403 Forbidden response. | Error |
Design Summary (design.md)
- Affected Files:
src/middleware/auth.ts,src/routes/index.ts,src/types/express.d.ts - Decisions: Use
jsonwebtokenlibrary. Store public key in environment variables. - Discarded: Shared secret (HS256) was discarded in favor of asymmetric RS256 for better security.
Tasks (tasks.md)
- Install
jsonwebtokenand@types/jsonwebtoken. (Ref: R1) - Create
auth.tsmiddleware with signature validation logic. (Ref: R1, R2, R4) - Extend Express
Requesttype to includeuserproperty. (Ref: R3) - Apply middleware to protected routes in
index.ts. (Ref: R1) - Verify implementation with unit tests for expired and missing tokens. (Ref: R2, R4)
Next steps
- Review the requirements and design above.
- Run
rei view 2024-05-20_14-30__jwt-auth-middleware --openif you have the CLI installed. - Provide explicit approval to begin implementation.
Connects securely to your tools. The creator never sees your data.
About this skill
Agents often rush to write code before the requirements are clear, leading to expensive refactors and scope creep. This skill enforces a hard gate between planning and implementation, ensuring you approve a complete specification before a single line of code is changed.
What it does
- Spec Authoring generates structured
requirements.md,design.md, andtasks.mdusing EARS syntax to define verifiable system behavior. - Workflow Enforcement manages a state machine (Ready, In Progress, Review, Done) that prevents illegal transitions like coding without approval.
- Role Separation distinguishes between the Spec Author, Implementer, and Reviewer to maintain objective quality standards.
- Dual Mode Operation works in Portable mode using canonical file structures or Enforced mode via the
reiCLI for strict validation. - Traceability Matrix maps every implementation task back to a specific requirement ID to ensure zero-waste development.
How it works
- Frame the work as either a Feature (architecture/behavior change) or a Task (localized/documentation) to set the documentation depth.
- Plan the work item by generating specifications within strict line-count budgets to keep designs lean and readable.
- Approve the plan via a hard gate where the agent presents risks and decisions, then waits for explicit human consent.
- Implement the approved tasks in order, marking progress in the spec files without deviating from the agreed design.
- Review the final diff against the original requirements to confirm the "contract" was met before closing the work item.
Frameworks & tools
This skill utilizes the REI Harness (rei) CLI for state tracking and validation. It produces standard Markdown and JSON files under a .rei/ directory, making it compatible with any language or IDE.
Why this beats prompting it yourself
Standard prompts often fail to maintain state across long sessions or "forget" to wait for approval. This skill treats the plan as a binding contract on disk, preventing the agent from improvising design decisions during the coding phase.
Use cases
- Drafting complex features where architectural alignment is required before coding.
- Enforcing discipline in multi-agent workflows to prevent autonomous code sprawl.
- Creating audit trails for changes in regulated or high-stakes codebases.
- Refactoring legacy modules where side effects must be mapped before execution.
Known limitations
Requires a specific directory structure under .rei/. Only supports one active Work Item at a time. Validation features require the rei Go binary to be installed in the environment path.
Optional: make it enforced
REI Harness (rei) is a free, open
source Go CLI that turns these conventions into enforced ones: validated
documents, a state machine that refuses illegal transitions, one active Work
Item at a time, and a read-only viewer for the human reviewer. Install it and
run rei init. Without it, the skill writes the same on-disk format, so you can
adopt the CLI later without redoing anything.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.
It requires a .rei/ directory structure. Only one active Work Item is permitted at a time. Validation via the command-line interface (CLI) requires the rei binary to be installed if you wish to take full advantage of the skill's capabilities and functionality.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 14 days ago
- Free with an Agensi account