# CEPI LMS - Agentic Coding Setup Playbook

This document is the CEPI-specific artifact to share with Claude coworker sessions so new collaborators can understand the repository quickly and work safely.

## How this setup works
Two repository artifacts keep Claude aligned:
1. `CLAUDE.md` at repo root (lean, always loaded).
2. `docs/*.md` deep references for architecture, data model, API contracts, design, and operations.

Keep `CLAUDE.md` short and push details into docs files.

## One-time onboarding flow
1. Clone repository and install dependencies.
2. Confirm environment values for database and Bunny.net keys.
3. Run migrations/seeders as needed.
4. Launch Claude Code from repo root.
5. Use the bootstrap prompt below once per fresh machine/clone.

## Bootstrap prompt for Claude coworker

```text
You are onboarding onto the CEPI LMS codebase. First inspect the real repository and verify all claims from code, not assumptions.

PHASE 1 - EXPLORE
- Confirm stack from composer.json/package.json and runtime config.
- Read routes/web.php + routes/auth.php to map public, student, instructor, admin flows.
- Inspect controllers/models/services for enrollment checks, lesson progress, Bunny DRM playback, payments, and role middleware.
- Inspect Blade layouts/components and html/ prototypes.

PHASE 2 - USE PROJECT DOCS
Use and maintain these docs as source of truth:
- docs/ARCHITECTURE.md
- docs/FRONTEND.md
- docs/DESIGN_SYSTEM.md
- docs/BACKEND.md
- docs/API_CONTRACTS.md
- docs/DATABASE_SCHEMA.md
- docs/SECURITY.md
- docs/QA.md
- docs/MOBILE_APP.md
- docs/DEVOPS.md
- docs/GLOSSARY.md

PHASE 3 - IMPLEMENT SAFELY
- Preserve Laravel + Blade architecture.
- Enforce strict Course -> Module -> Lesson hierarchy.
- Do not break Bunny DRM, device-binding security, or enrollment authorization checks.
- Keep UI aligned with html/ prototype references.
- Update relevant docs in the same change.

OUTPUT FORMAT FOR EACH TASK
1) What was verified from existing code
2) What changed
3) Files touched
4) Commands run
5) Risks/assumptions
6) Next steps
```
