docs(legibility): write CONTRIBUTING.md with three walkthroughs and Testing section (DOC-4) #435
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #394 (Epic 2 — Documentation). Rubric checks: C5.1 (Major), C5.2 (Major), C5.3 (Major). Per Markus, this is the highest-leverage doc in the epic — three walkthroughs are the mental-model compression that lets Anja understand the system in an afternoon.
Problem
Newcomers need a single document that compresses "how to add things." Without it, every contribution starts with grep-archeology. The implementation rules currently live in CLAUDE.md files (LLM-targeted). They need a human-readable home, and the three walkthroughs (per #394 Decision Queue D4) are: add a domain, add an endpoint, add a SvelteKit route.
Scope
Create
/CONTRIBUTING.mdat the repo root.Required H2 sections (each linkable from the Gitea TOC):
## Walkthrough: Add a new domain— full vertical slice, worked exampleTag:backend/src/main/resources/db/migration/V{n}__add_tag.sql)@Entity,@Table,@Data/@Builder/@AllArgsConstructor/@NoArgsConstructor,@Schema(requiredMode = REQUIRED)on every always-populated field)@Repository, extendsJpaRepository)@Service,@RequiredArgsConstructor,@Transactionalon writes only, never on reads)@RestController,@RequirePermission,DomainExceptionstatic factories)cd frontend && npm run generate:api## Walkthrough: Add an API endpoint to an existing domain— smaller scope, worked exampleTagrename:@RequirePermission@WebMvcTestcontroller test +@ExtendWith(MockitoExtension.class)service test## Walkthrough: Add a new SvelteKit route(per Felix) — worked example: a tag detail page:+page.server.tsloadfunctioncreateApiClient(fetch)typed callif (!result.response.ok)guard withgetErrorMessage(code)fromerrors.ts+page.svelteconsumes via$props(), neverfetch('/api/...')inonMountuse:enhancefor form actions## Testing(per Sara — gap not covered by other DOC-* tasks):@WebMvcTestslices · Testcontainers integration · Playwright E2E./mvnw test·npm run test·npm run test:e2e·./mvnw test -Dtest=ClassNamefrontend/e2e/.auth/user.json(runnpm run test:e2e -- --headedonce)## Code style— link todocs/STYLEGUIDE.mdandCODESTYLE.md. Cover, with one-line each:@Transactional: write-only, never on a classDomainExceptionstatic factories withErrorCodeenum$derivednot$effect,SvelteMap/SvelteSetfor reactive collections, keyed{#each}!result.response.ok+getErrorMessage(code)## Commit conventions and branching— link toCOLLABORATING.md(Conventional Commits, atomic commits, feature-branch + PR workflow).After CONTRIBUTING.md is written, DOC-7 replaces the migrated CLAUDE.md sections with pointer comments.
References
CLAUDE.md(root),backend/CLAUDE.md,frontend/CLAUDE.md,frontend/e2e/CLAUDE.md,.devcontainer/CLAUDE.md,import/CLAUDE.mddocs/STYLEGUIDE.md,CODESTYLE.md,COLLABORATING.mdtag/(small, complete, full stack — backendtag/package + frontendlib/tag/)Acceptance criteria
CONTRIBUTING.mdexists at the repo root.mainproduces a passing test for a new domain in ≤2 hours.Definition of Done
CONTRIBUTING.md is on
main. Walkthrough 1 verified executable end-to-end. Rubric C5.1, C5.2, C5.3 PASS.marcel referenced this issue2026-05-05 21:10:58 +02:00
Duplicate of #398. I created this in error before noticing #398 already existed. #398 carries the persona reviews and per-child Decision Queue; closing this in favor of the existing issue.