claude-code-mux / rapidspec
AGENTS.md518 starsChanged 13 months agoMITArchived repositoryView on GitHub
Instructions for AI coding assistants using RapidSpec for spec-driven development. RapidSpec: Checkpoint-based spec-driven workflow with AI agents Creates comprehensive proposals with automatic verification and research. What it does: 1. Verifies actual code - Reads files, checks git history (prevents "imaginary code") 2. Researches best practices - WebSearch, reference repositories 3. Presents options - 2-3 approaches with pros/cons/costs 4. Waits for decision - User chooses option ("1", "2", "ㄱㄱ") 5. Generates files - Creates proposal.md, tasks.md, spec deltas 6. Validates strictly…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 380
Default to <100 lines of new code
- Distinctive: line 382
Avoid frameworks without clear justification
- Distinctive: line 386
Only add complexity with:
- Very specific: line 392
Use file.ext:42 format for code locations
- Very specific: line 397
Use verb-noun: user-auth, payment-capture
- Very specific: line 405
Ensure uniqueness (append -2, -3 if needed)
- Very specific: line 416
Use with @agent-name syntax (e.g., @agent-code-reviewer)
- Distinctive: line 436
Always show diffs (Before → After) for code changes
- Distinctive: line 437
Verify actual code (no "imaginary code")
- Distinctive: line 438
Wait for user approval at checkpoints
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RapidSpec Instructions
Instructions for AI coding assistants using RapidSpec for spec-driven development.
RapidSpec: Checkpoint-based spec-driven workflow with AI agents
Quick Start
# 1. Create proposal with research and verification
/rapid:proposal [feature-name]
# 2. Implement step-by-step with checkpoints
/rapid:apply [change-id]
# 3. Review with specialized agents (optional)
/rapid:review [change-id]
# 4. Update tasks and commit
/rapid:commit
# 5. Archive after deployment
/rapid:archive [change-id]
Core Workflow
/rapid:proposal - Create Change Proposal
Creates comprehensive proposals with automatic verification and research.
What it does:
- Verifies actual code - Reads files, checks git history (prevents "imaginary code")
- Researches best practices - WebSearch, reference repositories
- Presents options - 2-3 approaches with pros/cons/costs
- Waits for decision - User chooses option ("1", "2", "ㄱㄱ")
- Generates files - Creates proposal.md, tasks.md, spec deltas
- Validates strictly - Ensures correctness before completing
When to use:
- New features or capabilities
- Breaking changes
- Architecture changes
- Performance optimizations that change behavior
Example:
/rapid:proposal add-user-authentication/rapid:apply - Step-by-Step Implementation
Implements proposals with checkpoint-based workflow.
What it does:
- Reads proposal.md, tasks.md, design.md
- Implements tasks one by one (5-10 min each)
- Shows diff (Before → After) before each change
- Pauses at checkpoints for approval
- Handles direction changes mid-implementation
- Suggests review when complete
Checkpoint workflow:
- "ㄱㄱ" (go) - Continue to next task
- "잠깐" (wait) - Pause and revise current task
- "아니" (no) - Skip or change approach
- User can test at any checkpoint
Example:
/rapid:apply add-user-authentication/rapid:review - Comprehensive Agent Reviews
Runs quality review agents (optional).
What it does:
- Reads spec and git changes
- Runs specialized agents:
- Code verification (prevents imaginary code)
- Security audit (auth, permissions)
- Code quality review
- Architecture patterns
- Database safety
- Test coverage
Review severity:
- ❌ Critical: Must fix before commit
- ⚠️ Warning: Should fix (non-blocking)
- ℹ️ Info: Nice to have
When to use:
- After
/rapid:apply(optional) - Before commits
- Can skip for speed
Example:
/rapid:review add-user-authentication/rapid:commit - Task Update & Commit
Updates tasks.md and creates conventional commit.
What it does:
- Reviews git status and diff
- Matches changes to tasks
- Updates tasks.md with completed items
- Captures discovered work
- Generates conventional commit message
Commit format:
feat(scope): brief description
- Task 1.1: Description
- Task 1.2: Description
Discovered work:
- Additional task found
🤖 Generated with RapidSpec
Co-Authored-By: Claude <noreply@anthropic.com>Example:
/rapid:commit/rapid:archive - Archive Deployed Change
Archives completed changes after deployment.
What it does:
- Moves
changes/[id]/→changes/archive/YYYYMMDDhhmmss-[id]/ - Updates
specs/with merged changes - Validates archived structure
Example:
/rapid:archive add-user-authenticationDirectory Structure
rapidspec/
├── specs/ # Current truth - what IS built
│ └── [capability]/
│ └── spec.md # Requirements and scenarios
├── changes/ # Proposals - what SHOULD change
│ ├── [change-name]/
│ │ ├── proposal.md # Why, what, impact
│ │ ├── tasks.md # Implementation checklist
│ │ ├── investigation.md # Code analysis (optional)
│ │ ├── research.md # Best practices (optional)
│ │ └── specs/ # Delta changes
│ │ └── [capability]/
│ │ └── spec.md # ADDED/MODIFIED/REMOVED
│ └── archive/ # Completed changes (timestamped)Three-Stage Workflow
Stage 1: Creating Changes (Proposal)
When to create proposal:
- New features or capabilities
- Breaking changes (API, schema)
- Architecture changes
- Performance optimizations that change behavior
Skip proposal for:
- Bug fixes (restore intended behavior)
- Typos, formatting, comments
- Dependency updates (non-breaking)
- Tests for existing behavior
Workflow:
- Run
/rapid:proposal [change-id] - AI verifies actual code (prevents "imaginary code")
- AI researches best practices
- AI presents 2-3 options with pros/cons/costs
- User chooses option ("1", "2", "ㄱㄱ")
- AI generates and validates files
Files created:
proposal.md- Why, what, impacttasks.md- Step-by-step implementationspecs/[capability]/spec.md- Spec deltasinvestigation.md- Code analysis (optional)research.md- Best practices (optional)
Stage 2: Implementing Changes (Apply)
Workflow:
- Run
/rapid:apply [change-id] - AI reads spec files
- AI lists all tasks
- For each task:
- Shows current code
- Shows proposed changes
- Shows diff (Before → After)
- Waits for "ㄱㄱ" to proceed
- Implements
- Checkpoint: "ㄱㄱ" (continue) or "잠깐" (wait)
- Suggests
/rapid:reviewwhen complete
Checkpoint handling:
- User can test at any checkpoint
- Say "잠깐" (wait) to pause and revise
- Say "아니" (no) to skip or change approach
- AI updates tasks.md to reflect changes
Stage 3: Archiving Changes (Archive)
After deployment:
- Run
/rapid:archive [change-id] - AI moves to archive with timestamp
- AI updates specs with merged changes
- AI validates structure
Proposal File Format
proposal.md
# Change: [Brief Description]
## Why
[1-2 sentences: problem or opportunity]
## Code Verification
- [x] Read actual files: @path/to/file:line
- [x] Git history checked: [findings]
- [x] Existing patterns found: [patterns]
## What Changes
### Before (Verified Actual Code)
\`\`\`
// @src/path/file.ext:42
[actual current code]
\`\`\`
### After (Proposed)
\`\`\`
[new code]
\`\`\`
## Options
### Option 1: [Approach] ⭐ (Recommended)
**Pros:** [benefits]
**Cons:** [drawbacks]
**Cost:** Time: [X], Risk: [low/med/high], Complexity: [low/med/high]
### Option 2: [Alternative]
[same structure]
## Recommendation
Option 1 because: [evidence-based reasoning]
## Impact
- Affected specs: [list]
- Affected files: [list with line numbers]
- Breaking changes: [yes/no, details]tasks.md
## 1. Implementation
### 1.1 [Step Name] (X min) - Checkpoint ⏸
- [ ] [specific task]
- [ ] [specific task]
**Checkpoint:** User can test here
### 1.2 [Next Step] (Y min) - Checkpoint ⏸
- [ ] [specific task]
**Checkpoint:** User can test here
## 2. Validation
- [ ] Agent reviews passed
- [ ] Tests added
- [ ] Documentation updatedspecs/[capability]/spec.md (Delta)
## ADDED Requirements
### Requirement: [New Feature]
The system SHALL [requirement text]
#### Scenario: [Success case]
- **WHEN** [condition]
- **THEN** [expected result]
#### Scenario: [Error case]
- **WHEN** [error condition]
- **THEN** [error handling]
## MODIFIED Requirements
### Requirement: [Existing Feature]
[Complete modified requirement - paste full text]
#### Scenario: [Updated scenario]
- **WHEN** [condition]
- **THEN** [new expected result]
## REMOVED Requirements
### Requirement: [Deprecated Feature]
**Reason**: [why removing]
**Migration**: [how to migrate]Spec Format Rules
Critical: Scenario Formatting
CORRECT (use #### headers):
#### Scenario: User login success
- **WHEN** valid credentials provided
- **THEN** return success responseWRONG (don't use bullets or bold):
- **Scenario: User login** ❌
**Scenario**: User login ❌
### Scenario: User login ❌Every requirement MUST have at least one scenario.
Delta Operations
## ADDED Requirements- New capabilities## MODIFIED Requirements- Changed behavior (paste full requirement)## REMOVED Requirements- Deprecated features## RENAMED Requirements- Name changes only
When to use ADDED vs MODIFIED:
- ADDED: New capability that can stand alone
- MODIFIED: Changes existing requirement behavior
- MUST paste complete requirement from
specs/[capability]/spec.md - Include all scenarios (existing + new)
- Archiver replaces entire requirement
- MUST paste complete requirement from
RENAMED example:
## RENAMED Requirements
- FROM: `### Requirement: Login`
- TO: `### Requirement: User Authentication`Best Practices
Simplicity First
- Default to <100 lines of new code
- Single-file implementations until proven insufficient
- Avoid frameworks without clear justification
- Choose proven patterns
Complexity Triggers
Only add complexity with:
- Performance data showing need
- Concrete scale requirements
- Multiple proven use cases
Clear References
- Use
file.ext:42format for code locations - Reference specs as
specs/capability/spec.md - Link related changes and PRs
Capability Naming
- Use verb-noun:
user-auth,payment-capture - Single purpose per capability
- 10-minute understandability rule
- Split if description needs "AND"
Change ID Naming
- Use kebab-case:
add-two-factor-auth - Verb-led prefixes:
add-,update-,remove-,refactor- - Ensure uniqueness (append
-2,-3if needed)
AI Agents
RapidSpec includes specialized AI agents for code quality, security, and architecture reviews.
Usage:
- Installed via plugin:
npx claude-plugins install rapid-spec - Available in
agents/directory - Use with
@agent-namesyntax (e.g.,@agent-code-reviewer) - Automatically invoked during
/rapid:review - Can be called manually anytime
Agent types:
- Code verification and quality
- Security and permissions
- Architecture patterns
- Database safety
- Test coverage
- Performance analysis
See agents/ directory for full list and documentation.
User Communication Style
- User may use Korean/English mix
- Common responses: "ㄱㄱ" (go), "잠깐" (wait), "아니" (no)
- Always show diffs (Before → After) for code changes
- Verify actual code (no "imaginary code")
- Wait for user approval at checkpoints
Quick Reference
Stage Indicators
changes/- Proposed, not yet builtspecs/- Built and deployedarchive/- Completed changes
File Purposes
proposal.md- Why and whattasks.md- Implementation stepsdesign.md- Technical decisions (optional)spec.md- Requirements and behavior
Command Summary
/rapid:proposal <name> # Create proposal
/rapid:apply <name> # Implement with checkpoints
/rapid:review <name> # Run agent reviews
/rapid:commit # Update tasks and commit
/rapid:archive <name> # Archive after deploymentRemember: Verify → Research → Present Options → Wait for Decision → Implement with Checkpoints
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

