| name | windsurf-reliability-patterns |
| description | Implement reliable Cascade workflows with checkpoints, rollback, and incremental editing.
Use when building fault-tolerant AI coding workflows, preventing Cascade from breaking builds,
or establishing safe practices for multi-file AI edits.
Trigger with phrases like "windsurf reliability", "cascade safety",
"windsurf rollback", "cascade checkpoint", "safe cascade workflow".
|
| allowed-tools | Read, Write, Edit, Bash(git:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","windsurf","reliability","safety","git-workflow"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Windsurf Reliability Patterns
Overview
Reliability patterns for safe Cascade usage: Git checkpointing, incremental task scoping, validation gates, and rollback strategies. Cascade's multi-file editing is powerful but requires discipline to avoid breaking your codebase.
Prerequisites
- Windsurf with Cascade enabled
- Git repository initialized
- Test suite available
- Understanding of Cascade Write mode
Instructions
Step 1: Always Commit Before Cascade
The most important reliability pattern: create a clean Git checkpoint before every Cascade session.
git add -A && git commit -m "checkpoint: before cascade session"
git diff
npm test && npm run typecheck
git add -A && git commit -m "[cascade] add notification service"
git checkout -- .
git checkout -- src/problem-file.ts
Step 2: Use Feature Branches for Cascade Work
git checkout -b cascade/add-notification-service
git checkout main && git merge cascade/add-notification-service
git checkout main && git branch -D cascade/add-notification-service
Step 3: Scope Tasks Incrementally
Large tasks cause Cascade to make sweeping changes that are hard to review. Break into steps.
BAD (too broad):
"Refactor the authentication system to use JWT instead of sessions"
→ Cascade may modify 30+ files, hard to review, likely has bugs
GOOD (incremental):
Step 1: "Create src/services/jwt.ts with functions: generateToken,
validateToken, refreshToken. Use the jose library."
Step 2: "Create tests/services/jwt.test.ts with tests for all three functions"
Step 3: "Run the tests and fix any failures"
Step 4: "Update src/middleware/auth.ts to use jwt.ts instead of
express-session. Keep the old code commented out."
Step 5: "Run the full test suite and fix any failures"
Step 6: "Remove commented-out session code from auth.ts"
Each step: review diff → test → commit → next step