Update Development Workflow

John McCardle 2026-02-07 23:48:13 +00:00
commit f44973d9fd

@ -1,129 +1,129 @@
# Development Workflow # Development Workflow
This page defines how to use the wiki during feature development, bug fixes, and demo creation. Following this workflow keeps documentation synchronized with the codebase. This page defines how to use the wiki during feature development, bug fixes, and demo creation. Following this workflow keeps documentation synchronized with the codebase.
--- ---
## Wiki Consultation Table ## Wiki Consultation Table
Before starting a task, consult the relevant wiki pages: Before starting a task, consult the relevant wiki pages:
| Task Type | Read First | Update After | | Task Type | Read First | Update After |
|-----------|------------|--------------| |-----------|------------|--------------|
| **UI widget work** (buttons, dialogs, HUD) | [[UI-Widget-Patterns]], [[UI-Component-Hierarchy]] | UI-Widget-Patterns if new pattern | | **UI widget work** (buttons, dialogs, HUD) | [[UI-Widget-Patterns]], [[UI-Component-Hierarchy]] | UI-Widget-Patterns if new pattern |
| **Grid/layer work** (rendering, layers, chunks) | [[Grid-System]], [[Grid-Rendering-Pipeline]] | Grid-Rendering-Pipeline if behavior changes | | **Grid/layer work** (rendering, layers, chunks) | [[Grid-System]], [[Grid-Rendering-Pipeline]] | Grid-Rendering-Pipeline if behavior changes |
| **Entity behavior** (AI, movement, pathfinding) | [[Entity-Management]], [[Grid-Interaction-Patterns]] | Entity-Management if API changes | | **Entity behavior** (AI, movement, pathfinding) | [[Entity-Management]], [[Grid-Interaction-Patterns]] | Entity-Management if API changes |
| **Mouse/keyboard interaction** | [[Input-and-Events]], then relevant pattern page | Input-and-Events if new event types | | **Mouse/keyboard interaction** | [[Input-and-Events]], then relevant pattern page | Input-and-Events if new event types |
| **Grid mouse interaction** (cell clicks, selection) | [[Grid-Interaction-Patterns]], [[Input-and-Events]] | Grid-Interaction-Patterns if new pattern | | **Grid mouse interaction** (cell clicks, selection) | [[Grid-Interaction-Patterns]], [[Input-and-Events]] | Grid-Interaction-Patterns if new pattern |
| **Performance work** (optimization, profiling) | [[Performance-and-Profiling]] | Performance-and-Profiling with results | | **Performance work** (optimization, profiling) | [[Performance-and-Profiling]] | Performance-and-Profiling with results |
| **Python binding changes** | [[UI-Component-Hierarchy]], [[Python-Binding-Layer]] | Both if signatures change | | **Python binding changes** | [[UI-Component-Hierarchy]], [[Python-Binding-Layer]] | Both if signatures change |
| **Animation work** | [[Animation-System]] | Animation-System if new easing/features | | **Animation work** | [[Animation-System]] | Animation-System if new easing/features |
| **Demo creation** | Relevant pattern page + component page | Pattern page if demo reveals new technique | | **Demo creation** | Relevant pattern page + component page | Pattern page if demo reveals new technique |
| **New UIDrawable type** | [[UI-Component-Hierarchy]], [[Adding-Python-Bindings]] | UI-Component-Hierarchy to add new type | | **New UIDrawable type** | [[UI-Component-Hierarchy]], [[Adding-Python-Bindings]] | UI-Component-Hierarchy to add new type |
| **Procedural generation** (BSP, heightmaps, noise) | [[Procedural-Generation]] | Procedural-Generation if new technique | | **Procedural generation** (BSP, heightmaps, noise) | [[Procedural-Generation]] | Procedural-Generation if new technique |
| **Tiled/LDtk import** (tileset, wang, rules) | [[Grid-Rendering-Pipeline]], [[Procedural-Generation]] | Relevant page if import pipeline changes | | **Tiled/LDtk import** (tileset, wang, rules) | [[Grid-Rendering-Pipeline]], [[Procedural-Generation]] | Relevant page if import pipeline changes |
| **3D/Voxel work** | (no wiki page yet) | Create wiki page if significant | | **3D/Voxel work** | (no wiki page yet) | Create wiki page if significant |
| **WASM/Emscripten work** | (no wiki page yet) | Create wiki page if significant | | **WASM/Emscripten work** | (no wiki page yet) | Create wiki page if significant |
| **Headless mode / testing** | [[Headless-Mode]], [[Writing-Tests]] | Relevant page | | **Headless mode / testing** | [[Headless-Mode]], [[Writing-Tests]] | Relevant page |
--- ---
## Workflow Steps ## Workflow Steps
### 1. READ (Before Starting) ### 1. READ (Before Starting)
- Open relevant wiki page(s) from the table above - Open relevant wiki page(s) from the table above
- Note current documented behavior and API - Note current documented behavior and API
- Check "Related Issues" section for context - Check "Related Issues" section for context
- Understand existing patterns before inventing new ones - Understand existing patterns before inventing new ones
### 2. WORK (During Development) ### 2. WORK (During Development)
Keep mental or written notes on: Keep mental or written notes on:
- Discrepancies: "Wiki says X but code does Y" - Discrepancies: "Wiki says X but code does Y"
- Gaps: "I needed to know Z but it wasn't documented" - Gaps: "I needed to know Z but it wasn't documented"
- Discoveries: "This technique isn't in the patterns page" - Discoveries: "This technique isn't in the patterns page"
### 3. REFLECT (Before Commit) ### 3. REFLECT (Before Commit)
Ask yourself: Ask yourself:
- Does the wiki accurately describe the new/changed behavior? - Does the wiki accurately describe the new/changed behavior?
- Did I discover something that should be documented? - Did I discover something that should be documented?
- Did I invalidate any documented information? - Did I invalidate any documented information?
- Are there new patterns worth capturing? - Are there new patterns worth capturing?
### 4. COMMIT (Push Code) ### 4. COMMIT (Push Code)
- Reference issue numbers in commit messages (`closes #X`, `addresses #Y`) - Reference issue numbers in commit messages (`closes #X`, `addresses #Y`)
- Granular commits preferred (one concern per commit) - Granular commits preferred (one concern per commit)
### 5. UPDATE (After Code Merged) ### 5. UPDATE (After Code Merged)
With appropriate permissions: With appropriate permissions:
- Fix any inaccuracies found during step 2 - Fix any inaccuracies found during step 2
- Add new patterns/techniques discovered - Add new patterns/techniques discovered
- Update issue references (mark closed issues) - Update issue references (mark closed issues)
- Update "Last updated" date at bottom of page - Update "Last updated" date at bottom of page
--- ---
## What Belongs Where ## What Belongs Where
| Content Type | Destination Page | | Content Type | Destination Page |
|--------------|------------------| |--------------|------------------|
| Class properties, methods, signatures | Component pages ([[UI-Component-Hierarchy]], [[Grid-System]], [[Entity-Management]]) | | Class properties, methods, signatures | Component pages ([[UI-Component-Hierarchy]], [[Grid-System]], [[Entity-Management]]) |
| "How to build X" with code examples | Pattern pages ([[UI-Widget-Patterns]], [[Grid-Interaction-Patterns]]) | | "How to build X" with code examples | Pattern pages ([[UI-Widget-Patterns]], [[Grid-Interaction-Patterns]]) |
| Event handler signatures and dispatch | [[Input-and-Events]] | | Event handler signatures and dispatch | [[Input-and-Events]] |
| Performance metrics and optimization | [[Performance-and-Profiling]] | | Performance metrics and optimization | [[Performance-and-Profiling]] |
| Architecture and design decisions | Relevant system page | | Architecture and design decisions | Relevant system page |
| Migration from old API | System page, in dedicated "Migration" section | | Migration from old API | System page, in dedicated "Migration" section |
| C++ implementation details | System page, with file references | | C++ implementation details | System page, with file references |
| Procgen patterns and techniques | [[Procedural-Generation]] | | Procgen patterns and techniques | [[Procedural-Generation]] |
| Grid layer rendering pipeline | [[Grid-Rendering-Pipeline]] | | Grid layer rendering pipeline | [[Grid-Rendering-Pipeline]] |
| TCOD integration (FOV, pathfinding) | [[Grid-TCOD-Integration]] | | TCOD integration (FOV, pathfinding) | [[Grid-TCOD-Integration]] |
--- ---
## Page Structure Conventions ## Page Structure Conventions
Each wiki page should include: Each wiki page should include:
**Header sections:** **Header sections:**
- Quick Reference (related issues, key files) - Quick Reference (related issues, key files)
- Related Pages links - Related Pages links
**Body:** **Body:**
- Conceptual overview first - Conceptual overview first
- API reference tables - API reference tables
- Code examples (focused snippets) - Code examples (focused snippets)
- Common patterns or techniques - Common patterns or techniques
**Footer:** **Footer:**
- Related Systems links - Related Systems links
- Last updated date - Last updated date
--- ---
## For Claude Code Sessions ## For Claude Code Sessions
When working with Claude Code: When working with Claude Code:
1. Claude should read relevant wiki pages before implementing features 1. Claude should read relevant wiki pages before implementing features
2. Claude should note documentation gaps during work 2. Claude should note documentation gaps during work
3. After committing code, Claude should propose wiki updates 3. After committing code, Claude should propose wiki updates
4. User approves wiki changes before Claude pushes them 4. User approves wiki changes before Claude pushes them
This keeps documentation current without requiring separate documentation passes. This keeps documentation current without requiring separate documentation passes.
--- ---
## Related Pages ## Related Pages
- [[Home]] - Wiki index - [[Home]] - Wiki index
- [[Writing-Tests]] - Test-driven development workflow - [[Writing-Tests]] - Test-driven development workflow
For contribution guidelines, see `CLAUDE.md` in the repository root. For contribution guidelines, see `CLAUDE.md` in the repository root.
--- ---
*Last updated: 2026-02-07* *Last updated: 2026-02-07*