# CLAUDE.md - EndiorBot

## Overview

EndiorBot project managed with EndiorBot SDLC Framework.

**Tier:** STANDARD
**Framework:** SDLC 6.1.1

---

<!-- ENDIORBOT:MANAGED:START -->
## 4 Non-Negotiable Invariants

```
1. THIN CLIENT PATTERN
   Claude Code commands = wrappers that call ./endiorbot.mjs
   NO business logic in .md files
   Gate checks, vibecoding, multi-model → all in EndiorBot core

2. STDIN JSON FOR HOOKS
   Hooks receive JSON via stdin, NOT positional arguments
   Always parse with jq: cat /dev/stdin | jq -r '.tool_name'
   Test: echo '{"tool_name":"Edit","file_path":"test.ts"}' | ./hook.sh

3. ENDIORBOT SOUL = GOVERNANCE, CLAUDE CODE = EXECUTION
   EndiorBot SOUL decides WHAT to build (PM, requirements, gates)
   Claude Code executes HOW to build (Architect, Coder, Reviewer)
   No PM agent in Claude Code (prevents orchestration conflict)

4. DEFAULT MODEL = SONNET
   Opus only for explicit architecture decisions
   Commands use model: sonnet unless specified
   Budget guard: track /cost regularly
```
<!-- ENDIORBOT:MANAGED:END -->

---

## Configuration Files

| File | Purpose |
|------|---------|
| `.sdlc-config.json` | SDLC framework configuration |
| `IDENTITY.md` | Project identity and capabilities |
| `AGENTS.md` | AI agent guidelines |
| `CLAUDE.md` | Claude-specific integration (this file) |

---

## Tier: STANDARD

**Features:**
- 5+ AI agents (assistant, pm, pjm, coder, reviewer)
- 7 lifecycle stages
- Sprint gates (G-Sprint, G-Sprint-Close)
- Team collaboration support
- Soft enforcement mode

---

## Commands

### Development
```bash
pnpm install        # Install dependencies
pnpm build          # Build TypeScript
pnpm dev            # Watch mode
pnpm test           # Run tests
pnpm lint           # Check code style
```

### EndiorBot CLI
```bash
./endiorbot.mjs --help           # Show help
./endiorbot.mjs start <project>  # Start project
./endiorbot.mjs switch <project> # Switch context
./endiorbot.mjs gate status      # Show gate status
./endiorbot.mjs consult <query>  # Multi-model query
```

### Claude Code Integration
```bash
# Thin client pattern - CLI wrappers call EndiorBot core
./endiorbot.mjs gate check G3
./endiorbot.mjs consult "Redis vs PostgreSQL for sessions?"
./endiorbot.mjs vibecoding check
```

---

## Code Style

### TypeScript
- Use strict mode
- Explicit types (no `any`)
- Prefer `const` over `let`
- Use template literals
- Document public APIs with JSDoc

### Commit Messages

Follow conventional commits:
```
feat(scope): add feature description
fix(scope): fix bug description
docs(scope): update documentation
refactor(scope): refactor code
test(scope): add tests
```

---

## SDLC Integration

### Gate Awareness
Before major changes, check gate requirements:
```bash
./endiorbot.mjs gate status
./endiorbot.mjs gate recommend G2
```

### Quality Assurance
Monitor vibecoding index to maintain code quality:
```bash
./endiorbot.mjs vibecoding check
```

Target: Vibecoding Index < 40 (Green zone)

---

*CLAUDE.md generated by EndiorBot*
*SDLC Framework v6.1.1*
