claude-code-antiregression-setup

mcp
Security Audit
Pass
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 11 GitHub stars
Code Pass
  • Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This tool provides a collection of ready-to-use templates, subagent configurations, and hooks designed to prevent AI coding assistants (specifically Claude Code) from introducing regressions into your projects during long sessions.

Security Assessment
The repository acts primarily as a static resource of Markdown templates and configuration files rather than an executable software package. The light code scan found zero dangerous patterns, no hardcoded secrets, and no requests for dangerous permissions. While the provided hook templates do suggest setting up automated test gates that execute shell commands (like running `pytest`), you have full control over customizing these commands before executing them. The tool does not access sensitive data or make external network requests on its own. Overall risk rating: Low.

Quality Assessment
The project is in active development, with its most recent push happening today. It is licensed under the permissive and standard MIT license. While the community footprint is relatively small with 11 GitHub stars, the documentation is exceptionally clear and well-structured, demonstrating a thoughtful approach to solving a well-known problem (context window exhaustion).

Verdict
Safe to use.
SUMMARY

Stop Claude Code from breaking your projects. Ready-to-use CLAUDE.md templates, subagents, hooks, and anti-regression configs.

README.md

Claude Code Anti-Regression Setup

Stop Claude Code from breaking your projects. Ready-to-use configs, agents, hooks, and templates.

The Problem

Claude Code progressively breaks projects during long sessions due to context window exhaustion (~200K tokens). At 90% utilization, it forgets earlier decisions and introduces regressions. 80% of context gets consumed by file reads and tool results — not your conversation.

The community calls this "context drift" and it's the #1 source of AI-introduced regressions.

The Solution

This repo provides a battle-tested anti-regression setup through four layers:

  1. CLAUDE.md — Persistent project rules that survive context compaction
  2. Subagents — Isolated AI specialists (planner, tester, reviewer) with separate context windows
  3. Hooks — Automated test gates that block broken commits
  4. Rules — Modular, glob-scoped coding standards

What's Inside

├── CLAUDE.md.template              # Project constitution — fill in your details
├── .claude/
│   ├── settings.json                # Hooks: auto-test reminders, commit blocking
│   ├── agents/
│   │   ├── planner.md               # Research and planning (never writes code)
│   │   ├── tester.md                # Full test suite runner + regression checker
│   │   └── code-reviewer.md         # Quality, security and regression reviewer
│   └── rules/
│       ├── python-backend.md        # Python-specific rules (glob-scoped)
│       └── frontend.md              # Frontend-specific rules (glob-scoped)
├── plans/
│   └── .gitkeep                     # Planner agent saves implementation plans here
└── docs/
    ├── WORKFLOW.md                  # Daily anti-regression workflow guide
    └── MCP-SETUP.md                 # MCP server installation instructions

Quick Start (15 minutes)

1. Copy configs to your project

git clone https://github.com/CreatmanCEO/claude-code-antiregression-setup.git
cp -r claude-code-antiregression-setup/.claude /path/to/your/project/
cp claude-code-antiregression-setup/CLAUDE.md.template /path/to/your/project/CLAUDE.md
mkdir -p /path/to/your/project/plans

2. Fill in CLAUDE.md

Open CLAUDE.md in your project root and replace all [placeholders] with your project's actual data.

3. Start Claude Code

claude

Claude reads CLAUDE.md automatically. Try:

> Use the planner agent to analyze our codebase and create a plan for [your task]

4. Adapt hooks

Edit .claude/settings.json — replace python -m pytest tests/ with your project's test command.

How It Works

CLAUDE.md — The Most Important File

Claude reads this at the start of every session. It survives compaction. Your CRITICAL RULES live here.

Key stat: 60% of Claude Code support tickets come from the "ghost context" anti-pattern — working without CLAUDE.md. A simple CLAUDE.md resolves 90% of cases.

Subagents — Isolated Context Windows

Agent Purpose Why Isolated?
planner Research codebase, create plans Research reads many files — would bloat main context
tester Run full test suite, catch regressions Test output is verbose — stays out of working memory
code-reviewer Review for quality, security, patterns Fresh perspective without implementation bias

Hooks — Automated Safety Nets

Commit-blocking hook prevents Claude from committing code that breaks tests. Zero exceptions.

Rules — Scoped Standards

Files in .claude/rules/ load only when Claude works with matching file patterns — saves context.

Recommended Workflow

See docs/WORKFLOW.md for the complete daily workflow.

  1. Plan first: Use planner agent → review → approve
  2. Small diffs: One step → tests → next step
  3. Monitor context: /compact at 60-70%
  4. Checkpoint: git commit before risky changes
  5. Review: Use code-reviewer before final commit
  6. Rewind if broken: Esc + Esc → restore code only

Recommended Stack

Component Tool Cost
IDE Google Antigravity Free
AI Coding Agent Claude Code (Max subscription) $100/mo
UI Testing Gemini 3 Pro (built into Antigravity) Free
Browser Automation Playwright MCP Free

See docs/MCP-SETUP.md for MCP server installation.

Contributing

PRs welcome! Priority: language-specific rules, framework-specific agents, additional hooks.

Resources

Author

Nick — Python developer and digital architect at CREATMAN

License

MIT

Reviews (0)

No results found