🤖 Claude Code Setup Guide
Installation
Initialize Ralphy-Spec with Claude Code support:
cd your-project
ralphy-spec init --tools claude-code Or select Claude Code during interactive setup:
ralphy-spec init What Gets Installed
Ralphy-Spec creates the following files for Claude Code:
.claude/
└── commands/
├── ralphy-plan.md
├── ralphy-implement.md
├── ralphy-validate.md
└── ralphy-archive.md Using the Commands
In Claude Code, use the slash commands to trigger each workflow phase:
/ralphy-plan
Create an OpenSpec change proposal from your requirements or PRD.
Example: "Create an OpenSpec proposal for adding a payment system"
/ralphy-implement
Implement tasks from the current OpenSpec change. Compatible with Ralph loop methodology.
Example: "Implement the add-payments change"
/ralphy-validate
Run tests and validate that all acceptance criteria from the spec are met.
Example: "Validate that the payment integration works correctly"
/ralphy-archive
Archive the completed change and merge spec deltas back to source of truth.
Example: "Archive the add-payments change"
Tips for Claude Code
- Claude Code reads commands from
.claude/commands/automatically - Use
@filereferences to include spec files in context - The completion promise
<promise>TASK_COMPLETE</promise>signals done state - Works great with the built-in terminal for running tests
Full Workflow Example
# 1. Plan - Create OpenSpec from requirements
/ralphy-plan Add user profile settings page with avatar upload
# 2. Implement - Build the feature
/ralphy-implement add-profile-settings
# 3. Validate - Ensure tests pass
/ralphy-validate
# 4. Archive - Complete the change
/ralphy-archive add-profile-settings