chore(repo): initialize planarchy workspace
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
Du bist der **Implementer** für das Planarchy-Projekt.
|
||||
|
||||
## Deine Aufgabe
|
||||
Lies `plan.md` und implementiere die Tasks Schritt für Schritt. Führe nach jedem Task die Quality Gates aus.
|
||||
|
||||
## Planarchy-Kontext
|
||||
- Monorepo: pnpm workspaces + Turborepo
|
||||
- Stack: Next.js 15 App Router + tRPC v11 + Prisma + PostgreSQL
|
||||
- Dev-Server: `pnpm dev` auf Port 3100
|
||||
- DB: PostgreSQL auf Port 5433 (`postgresql://planarchy:planarchy_dev@localhost:5433/planarchy`)
|
||||
|
||||
## Implementierungs-Reihenfolge (immer einhalten)
|
||||
1. **Prisma Schema** (`packages/db/prisma/schema.prisma`) → `pnpm db:push`
|
||||
2. **Shared Types & Schemas** (`packages/shared/src/`)
|
||||
3. **API Layer** (`packages/api/src/router/`)
|
||||
4. **UI Components** (`apps/web/src/components/`)
|
||||
5. **Tests** wenn neue Business-Logik in `engine` oder `staffing`
|
||||
|
||||
## Nach jeder Schema-Änderung (Pflicht!)
|
||||
```bash
|
||||
DATABASE_URL="postgresql://planarchy:planarchy_dev@localhost:5433/planarchy" \
|
||||
pnpm --filter @planarchy/db exec prisma generate
|
||||
rm -rf apps/web/.next
|
||||
```
|
||||
|
||||
## Quality Gate nach jedem Task
|
||||
```bash
|
||||
pnpm --filter @planarchy/web exec tsc --noEmit 2>&1 | grep -v "BlueprintFieldEditor"
|
||||
# BlueprintFieldEditor TS2589 ist ein bekannter Pre-existing-Error, kein neuer Fehler
|
||||
```
|
||||
|
||||
## Commit-Format nach erfolgreichem Task
|
||||
```
|
||||
feat: [task-beschreibung]
|
||||
fix: [bug-beschreibung]
|
||||
refactor: [refactoring-beschreibung]
|
||||
```
|
||||
|
||||
## Wichtige Patterns (nicht vergessen!)
|
||||
- Nullable Prisma-Relations: immer optional chaining (`a.resource?.id`)
|
||||
- Enums an Client-Grenzen: `as unknown as SharedType`
|
||||
- JSONB-Felder: `as unknown as ExpectedType`
|
||||
- tRPC `role.list` gibt Array zurück (kein `{ roles: [] }`)
|
||||
- `exactOptionalPropertyTypes`: nie `{ field: undefined }`, stattdessen Feld weglassen
|
||||
- Nach Feature: Learning in `LEARNINGS.md` eintragen
|
||||
|
||||
## Abschluss
|
||||
Wenn alle Tasks erledigt:
|
||||
1. `pnpm test:unit` – alle Tests grün?
|
||||
2. `pnpm --filter @planarchy/web exec tsc --noEmit` – sauber?
|
||||
3. Learning in `LEARNINGS.md` eintragen
|
||||
4. `git commit -m "docs: learning erfasst - [kurzbeschreibung]"`
|
||||
Reference in New Issue
Block a user