con un clic
ratchet-score
View quality metrics and trends per pair
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
View quality metrics and trends per pair
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Run agent pairs through phase-gated debates — guided by epic roadmap and current focus
Analyze project and generate tailored agent pairs through codebase analysis and human interview
Tighten the ratchet — analyze all improvement signals and sharpen the system
View or continue an ongoing debate
Manage guards — list, add, run, and override deterministic checks at phase boundaries
Add a new agent pair to an existing Ratchet configuration
| name | ratchet:score |
| description | View quality metrics and trends per pair |
View quality metrics and trends across all pairs or a specific pair.
/ratchet:score # Show all pairs' metrics
/ratchet:score [pair-name] # Show metrics for a specific pair
Read debate artifacts directly from source of truth — no derived score files needed.
Workspace scoping: In multi-workspace setup, /ratchet:score with no arguments shows scores for current workspace. Use /ratchet:score --all to aggregate across all workspaces, or /ratchet:score [workspace] for specific workspace.
Error handling for debate metadata: When reading meta.json files, skip any malformed:
for f in .ratchet/debates/*/meta.json; do
jq empty "$f" 2>/dev/null || { echo "Warning: Skipping malformed $f" >&2; continue; }
# process valid file
done
Debate metadata: Read all .ratchet/debates/*/meta.json files. Each contains:
{
"id": "debate-id",
"pair": "pair-name",
"phase": "review",
"milestone": "milestone-id or null",
"issue": "issue-ref or null",
"files": ["file1", "file2"],
"status": "consensus|resolved|escalated",
"rounds": 3,
"max_rounds": 3,
"started": "ISO timestamp",
"resolved": "ISO timestamp",
"verdict": "ACCEPT|CONDITIONAL_ACCEPT|TRIVIAL_ACCEPT|REJECT|REGRESS",
"fast_path": false
}
Review data: Read all .ratchet/reviews/<pair-name>/review-*.json files. Each contains effectiveness scores and missed issues from both agents.
If no debate directories exist, inform user: "No debates found. Run /ratchet:run to start your first debate." Then AskUserQuestion with options: "Start a debate (/ratchet:run) (Recommended)", "Done for now".
Per pair, calculate from meta.json files:
rounds field (excluding escalated)fast_path: true (TRIVIAL_ACCEPT)Trend: — (insufficient data for last-5-vs-previous-5) and describe trajectory narratively.From review files:
After computing metrics, update .ratchet/scores.yaml with exponential moving average (EMA). Ensures pair metrics survive debate archival across epics.
EMA formula: new_ema = α × current_value + (1 - α) × old_ema where α = 0.3 (recent debates weighted ~30%, history ~70%).
Schema (.ratchet/scores.yaml):
pairs:
<pair-name>:
total_debates: <int> # cumulative lifetime count
consensus_rate: <float> # EMA, 0-1
avg_rounds: <float> # EMA
fast_path_rate: <float> # EMA, 0-1
effectiveness_gen: <float> # EMA
effectiveness_adv: <float> # EMA
last_updated: <ISO timestamp>
last_epic: <epic name>
Update logic:
.ratchet/scores.yaml (create if missing)last_updated: compute current-epoch metrics from debate artifacts (Step 2); apply EMA against stored values (use current values directly if no stored values exist — first epoch); increment total_debates by count of new debates; set last_updated to now, last_epic to current epic name.ratchet/scores.yamlFallback: When no debate artifacts exist (archived), Step 2 metrics unavailable. Use .ratchet/scores.yaml directly for display, noting "(from historical average — debate artifacts archived)" in output.
Ratchet Quality Scores
═══════════════════════
Pair: [pair-name]
Debates: [N] | Consensus rate: [N]% | Avg rounds: [N.N]
Verdicts: [N] ACCEPT, [N] CONDITIONAL_ACCEPT, [N] TRIVIAL_ACCEPT
Fast-path rate: [N]% | Trend: [↑ improving | → stable | ↓ degrading | — insufficient data]
Effectiveness: gen [N.N] / adv [N.N]
[...repeat for each pair...]
Overall:
Total debates: [N] | Overall consensus: [N]%
Avg rounds: [N.N] | Fast-path rate: [N]%
Quality trajectory: [↑ improving | → stable | ↓ degrading]
If specific pair requested, show more detail: recent debate summaries (last 5), top missed issues from reviews, suggestions from reviews.
After presenting metrics, AskUserQuestion to guide user: