# CLAUDE.md — Sanitized Template
# Source: brainfile.io / Entry Point Trading
# This is the skeleton structure from a real multi-company Claude Code OS.
# Algo-secret sections, personal data, and business-specific rules removed.
# Drop this in your project root and customize for your stack.

---

## SESSION STARTUP (MANDATORY)

On every session start, read `brain/session_startup.md` for full context.
It tells you what to work on, what decisions are locked, and what NOT to re-ask.

---

## Critical Laws (MUST follow — these apply to ALL work)

### Law #1: Think Before Act
Before writing ANY code, making ANY edit, or taking ANY action:
1. **CLARIFY** — What exactly is being asked?
2. **MAP** — Where does this belong? Which file, which module?
3. **CHECK** — What's the current state? Read the file first.
4. **PLAN** — What files change? What breaks downstream?
5. **BUILD** — Now write the code.
6. **VERIFY** — Confirm the work matches the request. Check side effects.

### Law #2: Challenge & Verify
Do not blindly execute instructions. If a claim can be verified, verify it.
If you disagree with a direction, state your concern with evidence first.
This applies to verifiable claims (data, architecture, thresholds).
Subjective preferences (naming, style) → follow the human's direction.

### Law #3: Spec Before Build
Never build a feature without a written spec (even 3 lines).
- New feature: spec in `brain/specs/` first
- Dashboard change: update `brain/dashboard_spec.json` first
- No spec = no code.

### Law #4: Recursive Quality
Every bug found → fix it → add an automated check that catches this class of bug.
Never rely on memory to prevent recurrence. Encode it in code.

### Law #5: Proactive Gap Detection
Don't wait for the human to find problems. Detect and flag them first.
After any build: verify against spec, not just "does it compile."

### Law #6: Regression Prevention
After any fix: verify the fix didn't break something else.
After any feature: verify existing features still work.

---

## Project-Specific Rules

### [Add your domain rules here]
Example: "All API keys in .env, never in source code."
Example: "Dashboard tabs always in this order: Overview → Signals → History."
Example: "Never edit generated files directly — edit the generator."

---

## Data Sources

- `[your primary data file]` — describe what it contains
- `[your config file]` — describe what it controls
- `brain/` — persistent context, specs, decisions

---

## Common Commands

```bash
# Add your frequently-run commands here so Claude executes them correctly
# python3 code/run_pipeline.py
# python3 code/validate.py
# python3 code/deploy.py
```

---

## Quality Process

- Run validator after every generator run
- Verify rendered output before claiming done
- Check spec compliance on session start

---

## Preferences

- [Your communication preferences: terse? detailed? with/without summaries?]
- [Your approval process: auto-approve what? always ask about what?]
- [Your output format preferences]

---

## Notes

This skeleton is from brainfile.io — the fully operationalized version includes:
- Pre-built agent library (Revenue, Marketing, Quality, Strategy, Tech, Finance)
- brain/ memory structure pre-populated for your profession
- LaunchAgent schedules for autonomous loops
- Session handoff system (no context loss across sessions)

See https://brainfile.io for the complete OS.
