Bible for Claude Code

Repository-level operational guidelines and safety checklist for making code changes—rules, triggers, workflow, standards, and drift-recovery to prevent unsafe file operations, leaks, or regressions.

ggghh
·Jan 18, 2026·1 views
# CLAUDE.md

> **Re-read this before any file creation, deletion, or architectural decision.**

---

## 🔴 Critical Rules

```
┌─────────────────────────────────────────────────────────────────┐
│  1. Never delete/overwrite files without explicit approval      │
│  2. Never commit directly to main/master                        │
│  3. Never expose secrets, keys, or credentials                  │
│  4. Never bypass tests to "make things work"                    │
│  5. Always preserve existing functionality when adding new      │
└─────────────────────────────────────────────────────────────────┘
```

If about to violate: **STOP → State the rule → Ask for guidance**

---

## 🟠 Re-read Triggers

Re-read relevant sections when:
- Starting a new task
- Creating or deleting files
- Stuck or trying something unusual
- User changes direction
- Every ~10 tool calls

---

## Stack

- Language: 
- Framework: 
- Database: 
- Testing: 

## Structure

```
project/
├── src/
├── tests/
├── docs/
└── config/
```

---

## Patterns

### Follow
| Pattern | Why |
|---------|-----|
|         |     |

### Avoid
| Anti-Pattern | Do Instead |
|--------------|------------|
|              |            |

---

## Standards

- Public functions need docstrings
- Complex logic needs "why" comments  
- Test coverage minimum: ___%

---

## Workflow

**Before**: Understand scope → Check existing patterns → State plan  
**During**: Incremental changes → Test after each → Stop if scope creeps  
**After**: Run tests → Self-review against this doc → Summarize changes

---

## Key Context (Don't Forget)

- 
- 
- 

---

## Drift Recovery

**Signs**: Making changes "just to try" · Ignoring failures · Deviating from patterns · Forgetting constraints

**Protocol**: STOP → STATE what's wrong → RE-READ this → CONFIRM fix before continuing

---

## Pre-Action Check

```
□ Aligned with critical rules?
□ Following established patterns?
□ Checked existing code first?
□ Preserving existing functionality?
```

---

*When in doubt, this document wins. When uncertain, ask.*

Comments

No comments yet

Be the first to share your thoughts!