| name | piggy-compare |
| description | Show the lazy piggy version and the verbose from-scratch version of the same code side by side, so the tradeoff is visible instead of taken on faith. Use when the user says "compare versions", "show me both ways", "piggy compare", "/piggy-compare", or "what would this look like without piggy".
|
Piggy Compare
Produce both implementations of the same request — the piggy (lazy, ladder-
enforced) version and the verbose (from-scratch, no ladder) version — so the
reader can see exactly what the ladder skipped and judge the tradeoff
themselves.
Format
## Lazy (piggy)
<the shortest version that works, ladder-enforced>
## Verbose (no piggy)
<the version piggy would replace: hand-rolled, no stdlib/native shortcuts>
## Diff
lines: <lazy line count> vs <verbose line count>
skips: <what the verbose version adds that the lazy one doesn't need — extensibility hooks, config surface, edge cases the ticket didn't ask for>
ceiling: <what would force the lazy version to grow toward the verbose one>
Both versions must actually work — this isn't a strawman verbose version
built to lose, it's what a careful engineer would ship without the ladder.
Example — email validation
## Lazy (piggy)
const isValidEmail = (s) => /\S+@\S+\.\S+/.test(s);
## Verbose (no piggy)
class EmailValidator {
constructor(opts = {}) { this.strict = opts.strict ?? false; }
validate(s) {
if (!s || typeof s !== 'string') return false;
const parts = s.split('@');
if (parts.length !== 2) return false;
const [local, domain] = parts;
if (!local.length || !domain.includes('.')) return false;
if (this.strict) { /* RFC 5322 checks */ }
return true;
}
}
## Diff
lines: 1 vs 12
skips: a strict RFC 5322 mode nobody asked for, a class for one method
ceiling: real deliverability still needs a confirmation email either way
Boundaries
Shows both, applies neither — the user decides which to keep. For why the
lazy one was picked, point to /piggy-explain. Read-only.
"stop piggy-compare" or "normal mode" to revert.