Fix critical bug in patcher.py where patches failed to apply to staged files during pre-commit hooks. **Root Cause:** The apply_patch() function was unstaging files before applying patches: 1. File gets unstaged (git reset HEAD) 2. Patch tries to apply with --index flag 3. But patch was generated from STAGED content 4. Base state mismatch causes patch application to fail 5. Original changes get re-staged, AI changes are lost **The Fix:** Remove the unstaging logic entirely (lines 599-610, 639-641). - Patches are generated from staged content (git diff --cached) - The --index flag correctly applies to both working tree and index - No need to unstage first - that changes the base state **Changes:** - Deleted 19 lines of problematic unstaging code - Added clear comment explaining why unstaging is harmful - Simplified apply_patch() function **Impact:** - Patches now apply correctly during pre-commit hooks - Status changes (OPEN → READY_FOR_DESIGN) work properly - Gate creation (design_gate_writer) will trigger correctly - No behavior change for non-staged files **Testing:** - All 18 existing tests still pass - Bundle rebuilt and verified Discovered during end-to-end testing when AI-generated status promotion patches failed with "Failed to apply patch (strict and 3-way both failed)". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| assets | ||
| automation | ||
| config | ||
| docs | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| GEMINI.md | ||
| README.md | ||
| VERSION | ||
| pyproject.toml | ||
README.md
CascadingDev (CDev)
CDev — short for Cascading Development — is a Git-native AI–human collaboration framework that automates documentation, discussion summaries, and code review directly within your repository.
It lets you build self-documenting projects where AI assists in generating and maintaining feature discussions, design docs, and implementation plans — all version-controlled alongside your code.
✨ Key Features
- Git-Integrated Workflow — every discussion, decision, and artifact lives in Git.
- Multi-Provider AI System — automatic fallback chains (Claude → Codex → Gemini) with intelligent model selection (fast/quality).
- Cascading Rules System — nearest
.ai-rules.ymldefines how automation behaves. - Stage-Per-Discussion Model — separate files for feature, design, implementation, testing, and review.
- Pre-commit Hook — automatically maintains summaries, diagrams, and vote tallies.
- Ramble GUI — friendly PySide6/PyQt5 dialog for capturing structured feature requests.
- Deterministic Builds — a reproducible installer bundle you can unzip and run anywhere.
🚀 Quick Start (Developers)
# 1. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip wheel PySide6
# 2. Build the installer bundle
python tools/build_installer.py
# 3. Test-install into a temporary folder
python install/cascadingdev-*/setup_cascadingdev.py --target /tmp/myproject --no-ramble