docs: add strict commit strategy to CLAUDE.md and README.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2deea9e841
commit
db85d4b49e
2 changed files with 94 additions and 5 deletions
59
CLAUDE.md
59
CLAUDE.md
|
|
@ -41,9 +41,9 @@ Per task:
|
|||
2. Zoek de bijbehorende feature-spec in `scrum4me-functional-spec.md`
|
||||
3. Lees het relevante patroon in `docs/patterns/` en styling in `docs/scrum4me-styling.md` als dat van toepassing is
|
||||
4. Bouw — test — verifieer de "Done when"-criteria
|
||||
5. vraag of code juiste is
|
||||
6. Commit: `feat: ST-001 project scaffolding`
|
||||
7. vraag of volgende taak moet worden gedaan
|
||||
5. Vraag of de code correct is
|
||||
6. Commit (zie Commit Strategy hieronder)
|
||||
7. Vraag of de volgende taak gedaan moet worden
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ Prisma v7 + PostgreSQL (Neon)
|
|||
iron-session (auth cookies)
|
||||
bcryptjs + Zod + Sonner
|
||||
Sharp (avatarverwerking)
|
||||
Vercel Analytics (`@vercel/analytics/next`)
|
||||
Vercel Analytics (@vercel/analytics/next)
|
||||
```
|
||||
|
||||
> ⚠️ **Stylingregel:** Gebruik **nooit** `bg-blue-500` of willekeurige Tailwind-kleuren.
|
||||
|
|
@ -99,7 +99,6 @@ SESSION_SECRET="" # openssl rand -base64 32
|
|||
|
||||
## Conventies
|
||||
|
||||
- **Commits:** `feat: ST-XXX beschrijving` / `fix: ST-XXX beschrijving`
|
||||
- **Branches:** `feat/ST-001-scaffolding`
|
||||
- **Server Actions:** altijd in `actions/[domein].ts`, nooit inline in page.tsx
|
||||
- **Validatie:** altijd Zod, nooit handmatige checks
|
||||
|
|
@ -113,6 +112,56 @@ SESSION_SECRET="" # openssl rand -base64 32
|
|||
|
||||
---
|
||||
|
||||
## Commit Strategy (STRICT)
|
||||
|
||||
> **Core rule: één commit = één verantwoordelijkheid**
|
||||
|
||||
### Nooit doen
|
||||
|
||||
- Database + API + UI in één commit mengen
|
||||
- Feature + documentatie combineren
|
||||
- Grote "alles gewijzigd" commits
|
||||
- Vage berichten zoals "update stuff"
|
||||
|
||||
### Verplichte structuur
|
||||
|
||||
Splits werk op in logische lagen:
|
||||
|
||||
1. Database / Prisma
|
||||
2. API / server actions
|
||||
3. UI / components
|
||||
4. Config / infra
|
||||
5. Documentatie
|
||||
|
||||
### Commit-formaat
|
||||
|
||||
```
|
||||
feat(ST-XXX): korte beschrijving
|
||||
fix(ST-XXX): korte beschrijving
|
||||
chore(ST-XXX): korte beschrijving
|
||||
docs(ST-XXX): korte beschrijving
|
||||
```
|
||||
|
||||
### Voorbeeld (verplicht patroon)
|
||||
|
||||
In plaats van:
|
||||
|
||||
```bash
|
||||
feat: add profile system
|
||||
```
|
||||
|
||||
Splits altijd op in:
|
||||
|
||||
```bash
|
||||
feat(ST-XXX): add user profile fields to Prisma schema
|
||||
feat(ST-XXX): add avatar upload endpoint
|
||||
feat(ST-XXX): add profile editor component
|
||||
chore(ST-XXX): configure sharp for avatar processing
|
||||
docs(ST-XXX): document profile feature
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Scrum-terminologie
|
||||
|
||||
| Correct | Niet gebruiken |
|
||||
|
|
|
|||
40
README.md
40
README.md
|
|
@ -178,6 +178,46 @@ Zie [.env.example](.env.example).
|
|||
|
||||
Vercel Analytics gebruikt geen project-specifieke environment variabele in deze app; de component staat in `app/layout.tsx`.
|
||||
|
||||
## Commit Guidelines
|
||||
|
||||
We follow a strict commit structure to keep the project maintainable and reviewable.
|
||||
|
||||
### Rules
|
||||
|
||||
- 1 commit = 1 logical change
|
||||
- Do not mix:
|
||||
- features + docs
|
||||
- features + config
|
||||
- schema + UI
|
||||
- Keep commits small and focused
|
||||
- Prefer multiple small commits over one large commit
|
||||
|
||||
### Commit format
|
||||
|
||||
We use a simplified conventional commit style:
|
||||
|
||||
- feat: new feature
|
||||
- fix: bug fix
|
||||
- docs: documentation only
|
||||
- chore: config / tooling / cleanup
|
||||
- refactor: code improvement without behavior change
|
||||
|
||||
### Examples
|
||||
|
||||
Good:
|
||||
|
||||
```bash
|
||||
feat(db): add user profile fields
|
||||
feat(api): add avatar upload endpoint
|
||||
feat(ui): add profile editor
|
||||
docs: document profile feature
|
||||
```
|
||||
|
||||
Bad:
|
||||
```bash
|
||||
feat: add profile + update docs + fix config
|
||||
```
|
||||
|
||||
### API-overzicht
|
||||
|
||||
Alle API-endpoints vereisen:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue