tdd-red-green-refactor
Test-Driven Development: Red-Green-Refactor
Core Principle
Tests verify behavior through public interfaces, not implementation details. A test that breaks when you refactor internals -- but behavior is unchanged -- is testing implementation, not behavior. Good tests survive refactors.
When fixing a bug: prove it exists with a failing test before touching production code. The test is evidence. The fix is the response to that evidence.
Workflow Overview
RED -> Write a test that fails (proves the bug or defines missing behavior)
GREEN -> Write the minimum code to make the test pass
REFACTOR -> Improve structure, naming, duplication -- tests stay green
More from kaynetik/skills
ultimate-nixos
Comprehensive Nix ecosystem guidance covering NixOS system configuration, nixpkgs packaging and maintainer workflow, nix-darwin macOS management, Home Manager, flakes, derivations, NixOS module design, security hardening, and community processes. Use when writing Nix expressions, packaging software for nixpkgs, configuring NixOS or nix-darwin systems, designing NixOS modules, reviewing or merging nixpkgs PRs, managing secrets, hardening systems, working with flakes and overlays, or when the user mentions Nix, NixOS, nixpkgs, nix-darwin, Home Manager, flake, derivation, overlay, OfBorg, nixpkgs-review, or darwin-rebuild.
14lua-projects
>-
11c-cpp-compilers
C and C++ compiler toolchain skill covering GCC, Clang/LLVM, build modes, warnings, sanitizers, static analysis, LTO, PGO, C++20/23/26 features, and debugging. Use when writing or reviewing C/C++ code, choosing compiler flags, interpreting errors or warnings, enabling sanitizers, running clang-tidy or cppcheck, optimizing builds, working with C++20 modules or C23 features, or troubleshooting linker issues.
9argocd
ArgoCD GitOps operations -- Application and AppProject authoring, multi-source apps, ApplicationSet generators (Go templates, progressive sync), sync strategies, RBAC, SSO, health checks, CLI commands, and troubleshooting. Use when writing ArgoCD manifests, managing deployments, configuring sync policies, debugging sync/health status, or when the user mentions ArgoCD, GitOps, ApplicationSet, AppProject, argocd CLI, sync wave, or self-heal.
8practical-haskell
Guides efficient Haskell aligned with GHC practice -- laziness and strictness, purity, fusion, newtypes, pragmas, Core reading, and space-leak avoidance. Use when writing or reviewing Haskell, optimizing or profiling, debugging strictness or memory, or when the user mentions GHC, thunks, foldl vs foldl', list fusion, SPECIALIZE, or UNPACK.
7meta-cognition-parallel
EXPERIMENTAL: Three-layer parallel meta-cognition analysis. Triggers on: /meta-parallel, parallel analysis
7