skills/close-the-loop/SKILL.md
Automated verification loop that ensures work is done — tests pass, UI works, screenshots match designs. Use when you want to verify stories, check everything works, close the loop, run acceptance checks, or match a UI to a reference design component-by-component.
npx skillsauth add RonanCodes/ronan-skills close-the-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verification loop that checks your work is actually done — not just "compiles", but tested, functional, and visually correct. Three workflows:
.ralph/prd.json stories, run tests + browser check + visual-diff regression.This skill is the gatekeeper between in-progress and closed in the canonical label system (the plugin's canon/labels.md). Before allowing an orchestrator (ralph / planner-worker / matt-pocock) to drop the in-progress label and let the issue auto-close on PR merge, this skill asserts the verification matrix is complete (canon: factory #98 / #104):
If any row of the matrix is incomplete, block the close: comment on the issue with the specific missing rows, do NOT drop the in-progress label. The orchestrator surfaces this as a HITL escalation (label → needs-human) or returns the slice to ready-for-agent for another pass, per its own escalation policy.
/close-the-loop # Verify all incomplete stories
/close-the-loop --story US-003 # Verify a single story
/close-the-loop --url http://localhost:3000/settings # Verify a specific page
/close-the-loop --all # Verify everything, including already-passed stories
# Design-match: iterate until the live app matches a reference
/close-the-loop --design-match .visual-diff/design-match.json
/close-the-loop --design-match ./nyt-reference.png --url http://localhost:3000 # ad-hoc whole-page
.ralph/prd.json if it exists, otherwise ask the user what to verifydev/start/serveFor each story (or the provided --url):
npm run dev, etc.)/playwright-check to navigate to the relevant page.visual-diff/baselines//visual-diff to compare current screenshot against baselinePurpose: take a live app and iterate on it until it matches a reference design — per component, not just per page. This is the "does my NYT theme actually look like NYT Connections?" loop.
A design-match plan lives at .visual-diff/design-match.json (one per project). Example:
{
"name": "NYT Connections theme match",
"url": "http://localhost:3000",
"threshold": 85,
"max_iterations": 3,
"components": [
{
"id": "page",
"selector": null,
"reference": "./references/nyt-full-page.png",
"notes": "Overall page layout and typography"
},
{
"id": "word-card",
"selector": "[data-slot=\"card\"]",
"reference": "./references/nyt-tile.png",
"notes": "Tile bg #efefe6, 8px radius, bold uppercase"
},
{
"id": "primary-button",
"selector": "button[data-variant=\"default\"]",
"reference": "./references/nyt-button.png"
},
{
"id": "dialog",
"selector": "[role=\"dialog\"]",
"reference": { "page": "https://nytimes.com/games/connections", "selector": ".modal" }
}
]
}
Each component can reference:
{ page, selector } for playwright capture on both sidesFor each component in the plan:
/playwright-check navigates to url, screenshots the component (selector crop if defined)./visual-diff runs pixel + Claude vision. Threshold from plan (default 85%).The key property: component iteration is independent. Getting .word-card right doesn't re-run the .primary-button diff. This keeps context focused and avoids thrashing.
/close-the-loop --design-match ./ref.png --url http://localhost:3000 skips the JSON plan, does a single whole-page diff, and iterates up to 3 times.
## Verification Report
| Story | Tests | Browser | Visual | Status |
|-------|-------|---------|--------|--------|
| US-001 | Pass | Pass | Pass | Verified |
| US-002 | Pass | Pass | 92% (below 95%) | FAIL |
| US-003 | Fail (TypeError) | Skipped | Skipped | FAIL |
### Issues Found
- US-002: Button color differs from baseline (#3B82F6 vs #2563EB)
- US-003: TypeError in search handler — fixed on attempt 2, now passing
### Summary
Verified: 2/3 | Failed: 1/3
## Design-Match Report — NYT Connections theme
| Component | Selector | Match | Iterations | Status |
|-----------|----------|-------|------------|--------|
| page | — | 88% | 1 | Matched |
| word-card | [data-slot="card"] | 91% | 2 | Matched (fixed bg #efefe6, radius 8px) |
| primary-button | button[data-variant="default"] | 79% | 3 | Flagged — pill radius present but font-weight 600 vs 700 |
| dialog | [role="dialog"] | 86% | 1 | Matched |
### Fixes Applied
- word-card iter 1 → iter 2: set `--card: #efefe6`, `border-radius: 0.5rem`
- primary-button iter 1 → 2 → 3: added `border-radius: 9999px`, adjusted padding. Still failing on font-weight.
### Flagged for Human
- primary-button — Claude vision says font-weight mismatch, but the relevant CSS var is already set. Might be a font-loading issue (Franklin not loaded). Check network tab.
.ralph/prd.json, updates passes field on verification.visual-diff/tmp/ with descriptive names so the user can inspect the ones that failed.testing
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".