structural-correctness

Review software designs and changes for boundary, invariant, and failure-mode correctness.

Updated May 27, 2026
One-click install
npx skills add https://github.com/ybaspinar/agent-work-skills --skill structural-correctness-ybaspinar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structural-correctness
Source: https://github.com/ybaspinar/agent-work-skills/tree/main/skills/structural-correctness
Command: npx skills add https://github.com/ybaspinar/agent-work-skills --skill structural-correctness-ybaspinar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Software correctness often depends on engineers remembering edge cases under pressure. This Skill pushes correctness into the structure of the system itself—boundaries, invariants, resource limits, idempotency, and rollout shape—so a tired engineer can make a correct change without holding everything in their head. ## Core Features & Use Cases - Structural review framework: Provides a default output template covering boundaries and invariants, time and resource safety, failure and observability, and change lifecycle, with explicit must-fix versus can-defer decisions. - Blast-radius tiebreaker: Decides between competing principles based on whether input is caller-, attacker-, dependency-, or environment-controlled and how wide the blast radius is. - Phase-specific subskills: Routes work to focused subskills for triage, planning, implementing, integrating, reviewing, verifying, operating, investigating, retrospectives, and retirement. - Use Case: When reviewing an urgent checkout double-charge fix, the Skill produces a structured analysis covering idempotency keys, atomic state transitions, ambiguous timeout handling, and red-before/green-after verification against the running system. ## Quick Start Ask the agent to review your design, PR, or incident plan using the structural-correctness skill and to separate must-fix items from can-defer items.

Frequently Asked Questions about structural-correctness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a code change for structural correctness?

Use the default output template covering structural objective, boundaries and invariants, time and resource safety, failure and observability, and change lifecycle. End with explicit must-fix, can-defer, and simplify-or-delete decisions rather than a flat list of comments.

What is the difference between structural-correctness and the phase subskills?

Structural-correctness is the umbrella lens for work spanning multiple phases or unclear scope. When the task sits inside one phase, load the smaller subskill such as structural-reviewing, structural-verifying, or structural-operating for focused checks.

How should I verify a bug fix beyond a passing unit test?

Watch the original reproduction fail before the fix and pass after, verify acceptance criteria rather than the diff, drive worst-case boundary input, and exercise degraded paths. A green check that was never red against the bug proves nothing.

When should I not apply every structural rule to a change?

Use the tiebreaker table: pay structural cost for caller-, attacker-, or environment-controlled input with wide blast radius, but keep self-controlled contained changes simple and defer with a written reason. Speculative abstraction for one caller is clutter.

How do I safely retire a public API endpoint?

Prove zero use from live telemetry over the real usage cycle, not just source search. Add a deprecation and sunset window, use a tombstone handler, clean up docs and specs together, and assign an owner and expiry to any route reservation.