failure-patterns

Documents recurring debugging failure patterns and regression signals from a ZX Spectrum assembly project.

Updated Nov 29, 2024
One-click install
npx skills add https://github.com/SpeedRD/Arkanoid_Z80 --skill failure-patterns-speedrd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: failure-patterns
Source: https://github.com/SpeedRD/Arkanoid_Z80/tree/main/.claude/skills/failure-patterns
Command: npx skills add https://github.com/SpeedRD/Arkanoid_Z80 --skill failure-patterns-speedrd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging in this codebase is treacherous because git history is misleading (overwrites instead of reverts), dead code looks live, and most "new" bugs are actually known ones. This Skill prevents repeating documented mistakes and misdiagnosing hardware behavior. ## Core Features & Use Cases - Fourteen documented failure patterns: Each entry records what happened, why, the rule now, and how to notice you are repeating it — covering loop ownership, debug hooks, empty stub files, dead code, and tautological tests. - Diff review checklist: A concrete smell list to check in any diff, such as routines ending in self-jumps, whole-byte port comparisons, or tests whose expected values are copied from the implementation. - Use Case: Before adding a debug hook, concluding you found a new bug, or trusting git blame in this repository, consult this Skill to check whether the pattern is already documented and what the established rule is. ## Quick Start Read the failure-patterns skill before debugging this assembly project or concluding you have found a new bug.

Frequently Asked Questions about failure-patterns

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

FAQPage Schema
How do I avoid repeating known bugs in this assembly project?

Consult the failure-patterns documentation before debugging, since most apparent new bugs are documented known ones. Each entry lists what happened, the rule now in effect, and how to notice you are repeating the pattern.

Why is git blame misleading in this repository?

All changes were undone by overwriting files in place rather than reverts or merges, so git log --follow and blame lose abandoned approaches. Search diffs with git log -p instead of searching the tree to find removed code.

Why does the ZX Spectrum keyboard read as active-low?

The ZX Spectrum keyboard hardware reports bits 0-4 with 0 meaning pressed and 1 meaning released when reading a half-row via IN A,(C). Code must mask with and $1F and compare against $1F rather than comparing the whole byte against $FF.

What makes a test tautological instead of useful?

A test is tautological when its expected values are copied from the implementation, so any wrong-but-consistent code passes. Assert properties and invariants derived from the running machine, and verify the test fails when the bug is reintroduced.

When should a debug hook be removed from code?

A debug hook needs a removal plan the day it is added, such as a TODO at the hook or an issue. A temporary mechanism with no owner becomes permanent, as happened when an F-key level-skip survived twenty months.