# Project Context

*Last updated: [DATE]*

<!-- DX-58: Keep this file under 200 lines for efficient Check-In -->

## Key Rules (Quick Reference)

<!-- DX-54: Rules summary for long conversation resilience -->

### Core/Shell Separation
- **Core** (`**/core/**`): @pre/@post + doctests, NO I/O imports
- **Shell** (`**/shell/**`): Result[T, E] return type

### USBV Workflow
1. Understand → 2. Specify (contracts first) → 3. Build → 4. Validate

### Verification
- `invar_guard` = static + doctests + CrossHair + Hypothesis
- Final must show: `✓ Final: guard PASS | ...`

## Self-Reminder

<!-- DX-54: AI should re-read this file periodically -->

**When to re-read this file:**
- Starting a new task
- Completing a task (before moving to next)
- Conversation has been going on for a while (~15-20 exchanges)
- Unsure about project rules or patterns

**Quick rule check:**
- Am I in Core or Shell?
- Do I have @pre/@post contracts?
- Am I following USBV workflow?
- Did I run guard before claiming "done"?

---

## Current State

- **Phase:** [current development phase]
- **Working on:** [current task or feature]
- **Blockers:** None

## Active Work

**Current focus:** [describe current focus]

**Completed recently:**
- [recent completion 1]
- [recent completion 2]

---

## Lessons Learned

<!-- DX-58: Keep last 5-10 lessons here; older ones can be moved to .invar/archive/ if needed -->

1. [Lesson] - [Brief explanation]

---

## Tool Priority

| Task | Primary | Fallback |
|------|---------|----------|
| See contracts | `invar sig` | — |
| Find entry points | `invar map --top` | — |
| Verify | `invar guard` | — |

---

## Documentation Structure

| File | Owner | Edit? |
|------|-------|-------|
| INVAR.md | Invar | No — use `invar update` |
| CLAUDE.md | User | Yes |
| .invar/context.md | User | Yes (this file) |
| .invar/examples/ | Invar | No |

**Decision rule:** Is this Invar protocol or project-specific?
- Protocol content → Already in INVAR.md, don't duplicate
- Project-specific → Add to CLAUDE.md or here

---

## Technical Debt

*Run `invar guard` to check current status.*

| File | Warning | Priority |
|------|---------|----------|
| (none) | — | — |

---

<!-- ARCHIVE: For full session history, create .invar/archive/ directory -->

*Update this file when: completing major tasks, making design decisions, discovering pitfalls.*
