behavior-contract

Solid

Bug condition/postcondition formalization as testable Behavior Contracts. Defines invariants that must be preserved across fixes.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
97
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# behavior-contract You are **behavior-contract** -- the bug formalization skill for Pilot Shell bugfix mode. ## Overview This skill formalizes bugs as Behavior Contracts -- precise, testable descriptions of what is wrong (Bug Condition), what should happen (Postcondition), and what must not change (Invariants). ## Contract Structure ### Bug Condition The exact input, state, or sequence that triggers the bug. Must be specific enough to write a failing test. **Example**: "When `processPayment()` receives an amount of exactly $0.00, it throws an unhandled TypeError instead of returning a zero-amount receipt." ### Postcondition The correct behavior that must hold after the fix is applied. **Example**: "When `processPayment()` receives $0.00, it returns a valid Receipt object with `amount: 0` and `status: 'completed'`." ### Invariants Existing correct behaviors that must be preserved by the fix. **Example**: - "Positive amounts still process correctly" - "Negative amounts still throw `InvalidAmountError`" - "Receipt format remains unchanged for all amount types" ## Contract Document Template ```markdown # Behavior Contract: [Bug Title] ## Bug Condition [Precise description of triggering conditions] ## Postcondition [Expected correct behavior after fix] ## Invariants - [ ] Invariant 1: [existing behavior to preserve] - [ ] Invariant 2: [existing behavior to preserve] ## Testable Assertions 1. `expect(processPayment(0)).toEqual({ amount: 0, status: 'completed' })` 2...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

smart-bug-fix

Intelligent bug fixing workflow combining root cause analysis, multi-model reasoning, Codex auto-fix, and comprehensive testing. Uses RCA agent, Codex iteration, and validation to systematically fix bugs.

335 Updated today
aiskillstore
Testing & QA Solid

test-first-bugs

This skill should be used when the user reports a bug, describes unexpected behavior, says something is "broken", "not working", "failing", mentions an "error", "issue", or "problem" in code, or asks to "fix" something. Enforces test-driven bug fixing workflow.

234 Updated yesterday
jamditis
Testing & QA Listed

test-first-bugfix

Test-driven bug fixing — reproduce before you fix. Use this skill whenever the user reports a bug, describes unexpected behavior, says something is broken, mentions a regression, or asks you to fix an error. This includes phrases like "this is broken", "X doesn't work", "there's a bug in", "getting an error when", "it used to work but now", "failing on", or any variation. Even if the user says "just fix it" or "quick fix", use this skill — the reproduce-first discipline catches regressions and proves the fix actually works. Do NOT skip this skill just because the bug seems obvious or simple.

1 Updated 2 days ago
The-Artificer-of-Ciphers-LLC
AI & Automation Listed

fix-bug

This skill should be used when the user asks to "fix bug", "resolve issue", "fix error", "troubleshoot", "debug", or reports a specific bug or error that needs investigation and fixing.

18 Updated today
Mr-DooSun
Web & Frontend Listed

fix-bug

Guide for fixing bugs in ClaudeBar following Chicago School TDD and rich domain design. Use this skill when: (1) User reports a bug or unexpected behavior (2) Fixing a defect in existing functionality (3) User asks "fix this bug" or "this doesn't work correctly" (4) Correcting behavior that violates the user's mental model

4 Updated today
kiminmonaco