ratchet
Brownian Ratchet progress gates for RPI workflow. Check, record, verify. Triggers: "check gate", "verify progress", "ratchet status".
Best use case
ratchet is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Brownian Ratchet progress gates for RPI workflow. Check, record, verify. Triggers: "check gate", "verify progress", "ratchet status".
Teams using ratchet should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ratchet/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ratchet Compares
| Feature / Agent | ratchet | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Brownian Ratchet progress gates for RPI workflow. Check, record, verify. Triggers: "check gate", "verify progress", "ratchet status".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Ratchet Skill
Track progress through the RPI workflow with permanent gates.
**Note:** `$ratchet` tracks and locks progress. It does not “run the loop” by itself—pair it with `$crank` (epic loop) or `$swarm` (Ralph loop) to actually execute work.
## The Brownian Ratchet
```
Progress = Chaos × Filter → Ratchet
```
| Phase | What Happens |
|-------|--------------|
| **Chaos** | Multiple attempts (exploration, implementation) |
| **Filter** | Validation gates (tests, $vibe, review) |
| **Ratchet** | Lock progress permanently (merged, closed, stored) |
**Key insight:** Progress is permanent. You can't un-ratchet.
## Execution Steps
Given `$ratchet [command]`:
### status - Check Current State
```bash
ao ratchet status 2>/dev/null
```
Or check the chain manually:
```bash
cat .agents/ao/chain.jsonl 2>/dev/null | tail -10
```
### check [step] - Verify Gate
```bash
ao ratchet check <step> 2>/dev/null
```
Steps: `research`, `plan`, `implement`, `vibe`, `post-mortem`
### record [step] - Record Completion
```bash
ao ratchet record <step> --output "<artifact-path>" 2>/dev/null
```
Or record manually by writing to chain:
```bash
echo '{"step":"<step>","status":"completed","output":"<path>","time":"<ISO-timestamp>"}' >> .agents/ao/chain.jsonl
```
### skip [step] - Skip Intentionally
```bash
ao ratchet skip <step> --reason "<why>" 2>/dev/null
```
## Workflow Steps
| Step | Gate | Output |
|------|------|--------|
| `research` | Research artifact exists | `.agents/research/*.md` |
| `plan` | Plan artifact exists | `.agents/plans/*.md` |
| `implement` | Code + tests pass | Source files |
| `vibe` | $vibe passes | `.agents/vibe/*.md` |
| `post-mortem` | Learnings extracted | `.agents/learnings/*.md` |
## Chain Storage
Progress stored in `.agents/ao/chain.jsonl`:
```json
{"step":"research","status":"completed","output":".agents/research/auth.md","time":"2026-01-25T10:00:00Z"}
{"step":"plan","status":"completed","output":".agents/plans/auth-plan.md","time":"2026-01-25T11:00:00Z"}
{"step":"implement","status":"in_progress","time":"2026-01-25T12:00:00Z"}
```
## Key Rules
- **Progress is permanent** - can't un-ratchet
- **Gates must pass** - validate before proceeding
- **Record everything** - maintain the chain
- **Skip explicitly** - document why if skipping a step
## Examples
### Check RPI Progress
**User says:** `$ratchet status`
**What happens:**
1. Agent calls `ao ratchet status 2>/dev/null` to check current state
2. CLI reads `.agents/ao/chain.jsonl` and parses progress
3. Agent reports which steps are completed, in-progress, or pending
4. Agent shows output artifact paths for completed steps
5. Agent identifies next gate to pass
**Result:** Single-screen view of RPI workflow progress, showing which gates passed and what's next.
### Record Step Completion
**Skill says:** After `$research` completes
**What happens:**
1. Agent calls `ao ratchet record research --output ".agents/research/auth.md"`
2. CLI appends completion entry to `.agents/ao/chain.jsonl`
3. Agent locks research step as permanently completed
4. Agent proceeds to plan phase knowing research gate passed
**Result:** Progress permanently recorded, gate locked, workflow advances without backsliding.
## Troubleshooting
| Problem | Cause | Solution |
|---------|-------|----------|
| ao ratchet status fails | ao CLI not available or chain.jsonl missing | Manually check `.agents/ao/chain.jsonl` or create empty file |
| Step already completed error | Attempting to re-ratchet locked step | Use `ao ratchet status` to check state; skip if already done |
| chain.jsonl corrupted | Malformed JSON entries | Manually edit to fix JSON; validate each line with `jq -c '.' <file>` |
| Out-of-order steps | Implementing before planning | Follow RPI order strictly; use `--skip` only with explicit reason |
## Local Resources
### scripts/
- `scripts/validate.sh`Related Skills
vibe
Comprehensive code validation. Runs complexity analysis then multi-model council. Answer: Is this code ready to ship? Triggers: "vibe", "validate code", "check code", "review code", "code quality", "is this ready".
validation
Full validation phase orchestrator. Vibe + post-mortem + retro + forge. Reviews implementation quality, extracts learnings, feeds the knowledge flywheel. Triggers: "validation", "validate", "validate work", "review and learn", "validation phase", "post-implementation review".
update
Reinstall all AgentOps skills globally from the latest source. Triggers: "update skills", "reinstall skills", "sync skills".
trace
Trace design decisions and concepts through session history, handoffs, and git. Triggers: "trace decision", "how did we decide", "where did this come from", "design provenance", "decision history".
test
Test generation, coverage analysis, and TDD workflow. Triggers: "test", "generate tests", "test coverage", "write tests", "tdd", "add tests", "test strategy", "missing tests", "coverage gaps".
status
Single-screen dashboard showing current work, recent validations, flywheel health, and suggested next action. Triggers: "status", "dashboard", "what am I working on", "where was I".
standards
Language-specific coding standards and validation rules. Provides Python, Go, Rust, TypeScript, Shell, YAML, JSON, and Markdown standards. Auto-loaded by $vibe, $implement, $doc, $bug-hunt, $complexity based on file types.
shared
Shared reference documents for multi-agent skills (not directly invocable)
security
Continuous repository security scanning and release gating. Triggers: "security scan", "security audit", "pre-release security", "run scanners", "check vulnerabilities".
security-suite
Composable security suite for binary and prompt-surface assurance, static analysis, dynamic tracing, repo-native redteam scans, contract capture, baseline drift, and policy gating. Triggers: "binary security", "reverse engineer binary", "black-box binary test", "behavioral trace", "baseline diff", "prompt redteam", "security suite".
scenario
Author and manage holdout scenarios for behavioral validation. Scenarios are stored in .agents/holdout/ where implementing agents cannot see them. Triggers: "$scenario", "holdout", "behavioral scenario", "create scenario", "list scenarios".
scaffold
Project scaffolding, component generation, and boilerplate setup. Triggers: "scaffold", "new project", "init project", "create project", "generate component", "setup project", "starter", "boilerplate".