Simple, effective constraints that help AWS Kiro deliver production-ready software. Now enhanced with Kiro's Specification-Driven Development for maximum precision.
Kiro Rails is a minimal framework that prevents common AI assistant pitfalls through:
- Time-based gates that ensure real progress
- Scope limits that prevent overwhelming changes
- DRS scoring that measures actual deployability (now includes integration testing)
- Evidence requirements that prove functionality
- Architecture preservation that prevents breaking existing interfaces
- Contract validation that detects risky changes to APIs and schemas
- Specification compliance that ensures alignment with requirements, design, and tasks (Kiro-specific)
# Clone or download Kiro Rails to your project
cp -r /path/to/kiro-rails ./kiro-rails
# Make scripts executable
chmod +x kiro-rails/scripts/*.sh
# Initialize your project
bash kiro-rails/scripts/init.shWhen starting a session with AWS Kiro, simply say:
I'm using Kiro Rails. Please read KIRO.md first.
Also review the specifications in .kiro/specs/PROJECT_NAME/
That's it! Kiro will now follow the framework automatically.
# Check your deployment readiness (DRS score)
bash kiro-rails/scripts/check-drs.sh
# Verify specification compliance (Kiro-specific)
bash kiro-rails/scripts/check-specification.sh
# Verify you're following the rules
bash kiro-rails/scripts/verify.sh
# Capture proof of functionality
bash kiro-rails/scripts/capture-evidence.sh api "Login endpoint working"- First 30 minutes: Setup and exploration allowed
- After 30 minutes: MUST use real APIs/databases
- No permanent mocks in production code
- Maximum 5 files changed per session
- Maximum 200 lines of code added
- One feature at a time
| Time | Requirement |
|---|---|
| 30min | Real services connected |
| 60min | One feature working |
| 90min | Error handling complete |
| 120min | DRS ≥ 85 (deployable) |
- Capture API responses
- Save test results
- Document what's working
- Kiro might create elaborate mocks that never get replaced
- Changes might span 20+ files making review impossible
- "Looks good" code that doesn't actually work
- No clear definition of "done"
- Accidentally breaks working interfaces and contracts
- Changes APIs without considering downstream impacts
- Deviates from the original requirements and design
- Adds unnecessary features not in the specification
- Real integrations from the start
- Manageable, reviewable changes
- Proven functionality with evidence
- Clear deployment criteria (DRS ≥ 85)
- Protects existing architecture from unintended changes
- Requires confidence declarations for risky modifications
- Enforces integration testing for interface changes
- Specification-driven: Stays aligned with .kiro/specs/PROJECT/requirements.md, design.md, tasks.md
- Contract preservation: Validates changes against documented interfaces
your-project/
├── KIRO.md # Rules for Kiro (auto-created)
├── .kiro/ # Kiro native directory
│ └── specs/ # Project specifications
│ └── PROJECT_NAME/ # Your project specs
│ ├── requirements.md
│ ├── design.md
│ └── tasks.md
├── .kiro-active # Active project marker (optional)
├── kiro-rails/
│ ├── README.md # This file
│ ├── KIRO.md # Template rules
│ └── scripts/
│ ├── init.sh # Project setup
│ ├── check-drs.sh # Deployment readiness score
│ ├── verify.sh # Compliance check
│ ├── capture-evidence.sh # Proof capture
│ ├── ready-to-deploy.sh # Final deployment check
│ └── diagnose.sh # Problem diagnosis
├── evidence/ # Captured proofs (auto-created)
└── .kiro-rails/ # Session tracking (auto-created)
Initializes a project with Kiro Rails. Creates necessary directories and files.
Calculates your Deployment Readiness Score (0-100):
- 85+ = Ready to deploy
- 70-84 = Close, fix remaining issues
- <70 = Significant work needed
Now includes:
- Actual test execution verification (not just existence)
- Integration test requirements for interface changes
- Stricter scoring for production readiness
Quick compliance check:
- Mock timeout enforcement
- Scope limits
- Evidence freshness
- Time gate status
- Confidence declaration tracking
- Contract integrity validation
Captures proof of functionality:
api- API responsesdb- Database connectionstest- Test resultsintegration- Integration test resultsperf- Performance metricserror- Error handlingfeature- Feature completion
Comprehensive deployment check:
- Runs all validations
- Ensures DRS ≥ 85
- Verifies no critical issues
Detects risky interface changes:
- Identifies modified API/schema files
- Tracks function signature changes
- Validates database schema modifications
- Ensures contract changes are documented
- Checks for integration test coverage
Validates alignment with Kiro's specification files:
- Ensures changes match .kiro/specs/PROJECT/requirements.md
- Validates architecture against .kiro/specs/PROJECT/design.md
- Tracks progress in .kiro/specs/PROJECT/tasks.md
- Prevents scope creep and contract violations
- Calculates specification compliance score
Identifies what's blocking progress:
- Finds mocks in code
- Checks test status
- Reviews scope compliance
- Suggests quick fixes
Kiro Rails enhances AWS Kiro by:
- Providing Clear Constraints - Kiro knows exactly what's allowed
- Enforcing Quality Gates - Can't proceed without meeting standards
- Tracking Real Progress - DRS score shows actual deployability
- Preventing Scope Creep - Hard limits on changes
- Requiring Proof - Evidence captures prevent "theoretical" code
- Specification Alignment - Ensures Kiro follows .kiro/specs/PROJECT/ specifications
- Contract Preservation - Prevents breaking changes to interfaces
When Kiro's specification-driven development meets Kiro Rails:
- Specifications define WHAT and HOW
- Rails ensure it's built CORRECTLY and DEPLOYABLY
- Together they prevent ALL major AI coding pitfalls
# 1. Initialize session
bash kiro-rails/scripts/init.sh
# 2. Tell Kiro
"I need to add user authentication. Using Kiro Rails."
# 3. Kiro reads KIRO.md and follows rules automatically
# 4. Check progress periodically
bash kiro-rails/scripts/verify.sh# 1. Check current state
bash kiro-rails/scripts/check-drs.sh
# 2. Tell Kiro
"Fix the login bug. Remember Kiro Rails rules - max 5 files."
# 3. Capture evidence when fixed
bash kiro-rails/scripts/capture-evidence.sh feature "Login bug fixed"# 1. Full check
bash kiro-rails/scripts/ready-to-deploy.sh
# 2. If not ready, diagnose
bash kiro-rails/scripts/diagnose.sh
# 3. Fix issues, then recheckQ: Do I need to modify my project?
A: No, Kiro Rails only adds a KIRO.md file and creates evidence/ and .kiro-rails/ directories.
Q: What if I'm not using git? A: Some features (scope tracking) work best with git, but the framework still functions without it.
Q: Can I customize the rules?
A: Yes, edit KIRO.md after initialization to adjust limits and requirements.
Q: What if scripts don't work on my system? A: The scripts are bash-based. On Windows, use Git Bash or WSL. Alternatively, follow the rules manually.
Q: Does this slow down development? A: No, it prevents the rework that comes from shipping broken code. The constraints actually speed up delivery of working software.
chmod +x kiro-rails/scripts/*.shMake sure to include the path:
bash kiro-rails/scripts/check-drs.sh
# not just: check-drs.shRun init first:
bash kiro-rails/scripts/init.shFor issues or suggestions, please open an issue on the GitHub repository.
MIT - Use freely in your projects.
Remember: Kiro Rails helps you ship working code, not perfect code. Focus on getting to DRS ≥ 85 and deploy with confidence!