# Pipeline — Directory Structure

## Agent Ownership

| Agent | Owns |
|-------|------|
| **Neo** | `backend/` — all Python/FastAPI code, models, services, API routes, migrations |
| **Scarlett** | `frontend/` — all React/Next.js/TypeScript code, components, pages, styles |
| **Private_Hudson** | Security review of all code before merge |
| **Bishop** | Build verification, docs, version bumps |

## Key Directories

```
Pipeline/
├── backend/
│   ├── app/
│   │   ├── api/          # FastAPI route handlers (Neo)
│   │   ├── core/         # Config, auth, security (Neo)
│   │   ├── db/           # DB session, CRUD, pagination (Neo)
│   │   ├── models/       # SQLModel/SQLAlchemy models (Neo)
│   │   ├── schemas/      # Pydantic schemas (Neo)
│   │   └── services/     # Business logic services (Neo)
│   │       └── forgejo/  # NEW — Forgejo API client (Neo)
│   └── migrations/       # Alembic migrations (Neo)
├── frontend/
│   ├── src/
│   │   ├── api/          # API client code (auto-generated + manual)
│   │   ├── app/          # Next.js App Router pages (Scarlett)
│   │   ├── components/   # React components (Scarlett)
│   │   └── lib/          # Utilities, hooks (Scarlett)
│   └── ...
├── compose.yml           # Docker Compose (shared)
├── PROJECT.md            # This project's manifest
├── FUTURE.md             # What's next
├── HISTORY.md            # What shipped
├── STRUCTURE.md          # This file
└── DEVELOPMENT_LOG.md    # Agent activity log
```

## Cross-Cutting Concerns
- **Forgejo API client** — `backend/app/services/forgejo/` handles all Forgejo communication
- **Issue-to-Task linking** — Task model gets `forgejo_issue_id` field, backend handles the join
- **Frontend issue pages** — New routes under `/issues/` in Next.js App Router