anti-slop
Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language,…
Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation. Use when refactoring existing code, optimizing architecture, or consolidating technical debt through
Claude Code
$ npx -y skills add rand/cc-polymath --skill typed-holes-refactor --agent claude-code
Codex
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a codex -y
Cursor
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a cursor -y
Gemini CLI
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a gemini-cli -y
GitHub Copilot
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a github-copilot -y
OpenCode
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a opencode -y
Windsurf
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a windsurf -y
name: typed-holes-refactor description: Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation. Use when refactoring existing code, optimizing architecture, or consolidating technical debt through systematic hole-driven development.
Systematically refactor codebases using the Design by Typed Holes meta-framework: treat architectural unknowns as typed holes, resolve them iteratively with test-driven validation, and propagate constraints through dependency graphs.
**1. Create safe working branch:**
git checkout -b refactor/typed-holes-v1 # CRITICAL: Never work in main, never touch .beads/ in main
**2. Analyze current state and identify holes:**
python scripts/discover_holes.py # Creates REFACTOR_IR.md with hole catalog
The Refactor IR documents:
**3. Write baseline characterization tests:**
Create `tests/characterization/` to capture exact current behavior:
# tests/characterization/test_current_behavior.py
def test_api_contracts():
"""All public APIs must behave identically post-refactor"""
for endpoint in discover_public_apis():
old_result = run_current(endpoint, test_inputs)
save_baseline(endpoint, old_result)
def test_performance_baselines():
"""Record current performance - don't regress"""
baselines = measure_all_operations()
save_json("baselines.json", baselines)Run tests on main branch - they should all pass. These are your safety net.
For each hole (in dependency order):
**1. Select next ready hole:**
python scripts/next_hole.py # Shows holes whose dependencies are resolved
**2. Write validation tests FIRST (test-driven):**
# tests/refactor/test_h{N}_resolution.py
def test_h{N}_resolved():
"""Define what 'resolved correctly' means"""
# This should FAIL initially
assert desired_state_achieved()
def test_h{N}_equivalence():
"""Ensure no behavioral regressions"""
old_behavior = load_baseline()
new_behavior = run_refactored()
assert old_behavior == new_behavior**3. Implement resolution:**
**4. Validate resolution:**
python scripts/validate_resolution.py H{N}
# Checks: tests pass, constraints satisfied, main untouched**5. Propagate constraints:**
python scripts/propagate.py H{N}
# Updates dependent holes based on resolution**6. Document and commit:**
git add .
git commit -m "Resolve H{N}: {description}
- Tests: tests/refactor/test_h{N}_*.py pass
- Constraints: {constraints satisfied}
- Propagates to: {dependent holes}"**Generate comprehensive delta report:**
python scripts/generate_report.py > REFACTOR_REPORT.md
Report includes:
Every commit must validate:
Design complete when:
Every hole must be:
Size holes using these categories:
| Size | Duration | Characteristics | Examples | |------|----------|-----------------|----------| | **Nano** | 1-2 hours | Simple, mechanical changes | Rename files, update imports | | **Small** | 4-8 hours | Single module refactor | Extract class, consolidate functions | | **Medium** | 1-3 days | Cross-module changes | Define interfaces, reorganize packages | | **Large** | 4-7 days | Architecture changes | Layer extraction, pattern implementation | | **Epic** | >7 days | **SPLIT THIS HOLE** | Too large, break into smaller holes |
**Estimation Red Flags**:
Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language,…
Automatically discover agentic workflow skills when building AI agents, implementing tool use patterns, managing context windows,…
Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate…
Automatically discover CI/CD and automation skills when working with GitHub Actions, Jenkins, GitLab CI, pipelines, continuous…
Automatically discover cryptography skills when working with encryption, TLS, certificates, PKI, and security
Automatically discover data pipeline and ETL skills when working with ETL, data pipelines, streaming, batch processing, data…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…