Skip to content

Instantly share code, notes, and snippets.

View chutch3's full-sized avatar

Cody Hutchens chutch3

View GitHub Profile
@chutch3
chutch3 / strict_TDD_workflow_prompt.md
Created August 11, 2025 12:08
Strict TDD Workflow Enforcement for AI Agents

This document defines a machine-readable, state-tracked workflow for AI-driven code refactoring using the Test-Driven Development (TDD) Red → Green → Refactor cycle.

It enforces:

  • One branch / one PR per issue
  • Strict RED/GREEN/REFACTOR phases with mandatory relevant test passing at each step
  • Automatic detection and correction of violations (root-cause fixes only, no shortcuts)
  • Explicitly forbidden shortcuts that mask failing tests
  • Iterative cycles within a single work stream, with cycle numbers tracked
  • State logging of every action, commit, test result, and violation for auditability
  • PR descriptions containing a full cycle trace and state log link
@chutch3
chutch3 / helpful-subagent-prompts.md
Created August 7, 2025 16:10
Helpful subagents prompts
---
name: simplicity-reviewer
description: Use this agent when you need to review code changes for unnecessary complexity, over-engineering, or violations of the YAGNI (You Aren't Gonna Need It) principle. This agent should be called after code has been written or modified to ensure it maintains simplicity and clarity. Examples: <example>Context: The user has just implemented a new feature with configuration classes and abstraction layers. user: 'I've added a new configuration system for handling different client types with a factory pattern and multiple inheritance levels' assistant: 'Let me use the simplicity-reviewer agent to check if this implementation might be over-engineered for the current requirements' <commentary>Since the user has implemented what sounds like potentially complex architecture, use the simplicity-reviewer agent to evaluate if the complexity is justified.</commentary></example> <example>Context: The user has written a function with multiple layers of indirection. user: 'Here's my 
@chutch3
chutch3 / setup-hammerspoon-shiftit.sh
Last active July 17, 2025 13:18
Complete Hammerspoon ShiftIt setup script for macOS - Automates installation and configuration of keyboard-driven window management
#!/bin/bash
# Hammerspoon ShiftIt Setup Script for macOS
# This script automates the installation and configuration of Hammerspoon with ShiftIt
set -e # Exit on any error
echo "🔨 Hammerspoon ShiftIt Setup Script"
echo "===================================="
echo ""
@chutch3
chutch3 / device_refresher.groovy
Last active June 29, 2025 14:37
A Hubitat app that automatically refreshes the status of selected Z-Wave devices on a user-defined schedule. Ideal for users who want to keep device states up-to-date and avoid stale readings. Supports both simple interval selection and advanced cron expressions.
definition(
name: "Device Refresher",
namespace: "chutchens",
author: "Cody Hutchens",
description: "Refresh Z-Wave Devices on a schedule",
category: "Convenience",
iconUrl: "https://cdn-icons-png.flaticon.com/512/1828/1828817.png",
iconX2Url: "https://cdn-icons-png.flaticon.com/512/1828/1828817.png"
)