routine-logic-bugfixer

Models tricky logic units, proves bugs with failing tests, and ships minimal root-cause fixes.

275|32|Updated Oct 2, 2020
One-click install
npx skills add https://github.com/bex-co/beancount-io --skill routine-logic-bugfixer-bex-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routine-logic-bugfixer
Source: https://github.com/bex-co/beancount-io/tree/main/.agents/skills/routine-logic-bugfixer
Command: npx skills add https://github.com/bex-co/beancount-io --skill routine-logic-bugfixer-bex-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Subtle logic bugs in state machines, date math, sign conventions, dedup windows, and pagination cursors often survive code review because nobody exhaustively modeled the edge cases. This Skill systematically finds and fixes those provable bugs before they reach production. ## Core Features & Use Cases - Exhaustive Logic Modeling: Enumerates every state, transition, and edge case (empty inputs, boundary dates, negative amounts, timezone/DST edges, off-by-one windows) for one tricky unit per run. - Proof-Driven Bug Fixing: A bug is only accepted when a failing test reproduces it AND documented intent (comments, docs, ADRs, git history) confirms the divergence, preventing opinion-based rewrites. - Minimal Root-Cause Fixes with Regression Tests: Ships one fix at a time via /ship, including the failing test as a permanent regression test and a caller sweep for dependencies on old behavior. - Use Case: Run it against a monorepo package containing balance computation logic; it models the sign conventions, derives a breaking input, proves the divergence from beancount semantics with a failing test, and ships the fix. ## Quick Start Invoke /routine-logic-bugfixer with an optional package or path argument to have it hunt for and fix one provable logic bug in that scope.

Frequently Asked Questions about routine-logic-bugfixer

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

FAQPage Schema
How do I find hidden logic bugs in a monorepo package?

Invoke /routine-logic-bugfixer with a package or path argument. It picks one tricky unit, models all states and edge cases, derives breaking inputs, and proves each bug with a failing test against documented intent before fixing it.

What kinds of logic bugs does this routine target?

It targets auth/session state machines, date and period arithmetic, amount sign conventions, dedup and fuzzy-match windows, pagination cursors, cache invalidation, and balance computation. It skips trivial or already exhaustively tested units.

When should I not use the logic bugfixer routine?

Skip it for intermittent or test-infrastructure failures, which belong to routine-flaky-test-fixer, and for convoluted-but-correct code, which belongs to routine-logic-simplifier. It only fixes behavior that provably diverges from documented intent.

What happens if the intended behavior is ambiguous?

If no documented intent exists to confirm the divergence, the routine stops for that finding and reports the ambiguity instead of shipping an opinion. It never weakens or deletes existing tests to make a fix pass.

Does the bugfixer verify nothing else breaks after a fix?

Yes. It requires the new regression test and the full owning-package gate to be green, plus a sweep of callers for anyone depending on the old wrong behavior. A conflicting caller is treated as intent ambiguity and stops the ship.