Implement the 004-edit-combatant feature that adds the possibility to change a combatants name
This commit is contained in:
41
specs/004-edit-combatant/quickstart.md
Normal file
41
specs/004-edit-combatant/quickstart.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Quickstart: Edit Combatant
|
||||
|
||||
**Feature**: 004-edit-combatant
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
pnpm install # Install dependencies (if needed)
|
||||
pnpm check # Verify everything passes before starting
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
pnpm --filter web dev # Start dev server at localhost:5173
|
||||
pnpm test:watch # Run tests in watch mode
|
||||
```
|
||||
|
||||
## Implementation Order
|
||||
|
||||
1. **Domain event** — Add `CombatantUpdated` to `events.ts`
|
||||
2. **Domain function** — Create `edit-combatant.ts` with pure `editCombatant` function
|
||||
3. **Domain tests** — Create `edit-combatant.test.ts` with acceptance scenarios + invariants
|
||||
4. **Domain exports** — Re-export from `index.ts`
|
||||
5. **Application use case** — Create `edit-combatant-use-case.ts`
|
||||
6. **Application exports** — Re-export from `index.ts`
|
||||
7. **Hook** — Add `editCombatant` action to `useEncounter` hook
|
||||
8. **UI** — Add inline name editing to `App.tsx`
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
pnpm check # Must pass — format + lint + typecheck + test
|
||||
```
|
||||
|
||||
## Key Files to Reference
|
||||
|
||||
- `packages/domain/src/add-combatant.ts` — Pattern to follow for domain function
|
||||
- `packages/domain/src/remove-combatant.ts` — Pattern for "not found" error handling
|
||||
- `packages/application/src/add-combatant-use-case.ts` — Pattern for use case
|
||||
- `apps/web/src/hooks/use-encounter.ts` — Pattern for hook wiring
|
||||
Reference in New Issue
Block a user