Skip to content

KunanonJ/superstacks / plugins/superstacks/skills/mistake-to-constraint

mistake-to-constraint

Verified

Use when a mistake repeats. Encode it as the strongest guard — type or runtime, lint, test, directory convention, then a rules line — and log it in CONSTRAINTS.md.

templates/runtime-guard.py

View on GitHub
"""Runtime guard template. Copy into the consuming repo. Stdlib only."""

from __future__ import annotations


class ConstraintError(ValueError):
    """Raised when a CONSTRAINTS.md guard is violated."""


def forbid_banned_state(value: str) -> str:
    if value == "BANNED":
        raise ConstraintError("BANNED is constrained. See CONSTRAINTS.md.")
    return value
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall