Update "Development-Workflow.-"

John McCardle 2026-02-07 23:01:27 +00:00
commit 79178d2c0d

@ -1,120 +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 |
--- | **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 |
## Workflow Steps | **WASM/Emscripten work** | (no wiki page yet) | Create wiki page if significant |
| **Headless mode / testing** | [[Headless-Mode]], [[Writing-Tests]] | Relevant page |
### 1. READ (Before Starting)
---
- Open relevant wiki page(s) from the table above
- Note current documented behavior and API ## Workflow Steps
- Check "Related Issues" section for context
- Understand existing patterns before inventing new ones ### 1. READ (Before Starting)
### 2. WORK (During Development) - Open relevant wiki page(s) from the table above
- Note current documented behavior and API
Keep mental or written notes on: - Check "Related Issues" section for context
- Discrepancies: "Wiki says X but code does Y" - Understand existing patterns before inventing new ones
- Gaps: "I needed to know Z but it wasn't documented"
- Discoveries: "This technique isn't in the patterns page" ### 2. WORK (During Development)
### 3. REFLECT (Before Commit) Keep mental or written notes on:
- Discrepancies: "Wiki says X but code does Y"
Ask yourself: - Gaps: "I needed to know Z but it wasn't documented"
- Does the wiki accurately describe the new/changed behavior? - Discoveries: "This technique isn't in the patterns page"
- Did I discover something that should be documented?
- Did I invalidate any documented information? ### 3. REFLECT (Before Commit)
- Are there new patterns worth capturing?
Ask yourself:
### 4. COMMIT (Push Code) - Does the wiki accurately describe the new/changed behavior?
- Did I discover something that should be documented?
- Reference issue numbers in commit messages (`closes #X`, `addresses #Y`) - Did I invalidate any documented information?
- Granular commits preferred (one concern per commit) - Are there new patterns worth capturing?
### 5. UPDATE (After Code Merged) ### 4. COMMIT (Push Code)
With appropriate permissions: - Reference issue numbers in commit messages (`closes #X`, `addresses #Y`)
- Fix any inaccuracies found during step 2 - Granular commits preferred (one concern per commit)
- Add new patterns/techniques discovered
- Update issue references (mark closed issues) ### 5. UPDATE (After Code Merged)
- Update "Last updated" date at bottom of page
With appropriate permissions:
--- - Fix any inaccuracies found during step 2
- Add new patterns/techniques discovered
## What Belongs Where - Update issue references (mark closed issues)
- Update "Last updated" date at bottom of page
| Content Type | Destination Page |
|--------------|------------------| ---
| 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]]) | ## What Belongs Where
| Event handler signatures and dispatch | [[Input-and-Events]] |
| Performance metrics and optimization | [[Performance-and-Profiling]] | | Content Type | Destination Page |
| Architecture and design decisions | Relevant system page | |--------------|------------------|
| Migration from old API | System page, in dedicated "Migration" section | | Class properties, methods, signatures | Component pages ([[UI-Component-Hierarchy]], [[Grid-System]], [[Entity-Management]]) |
| C++ implementation details | System page, with file references | | "How to build X" with code examples | Pattern pages ([[UI-Widget-Patterns]], [[Grid-Interaction-Patterns]]) |
| Event handler signatures and dispatch | [[Input-and-Events]] |
--- | Performance metrics and optimization | [[Performance-and-Profiling]] |
| Architecture and design decisions | Relevant system page |
## Page Structure Conventions | Migration from old API | System page, in dedicated "Migration" section |
| C++ implementation details | System page, with file references |
Each wiki page should include: | Procgen patterns and techniques | [[Procedural-Generation]] |
| Grid layer rendering pipeline | [[Grid-Rendering-Pipeline]] |
**Header sections:** | TCOD integration (FOV, pathfinding) | [[Grid-TCOD-Integration]] |
- Quick Reference (related issues, key files)
- Related Pages links ---
**Body:** ## Page Structure Conventions
- Conceptual overview first
- API reference tables Each wiki page should include:
- Code examples (focused snippets)
- Common patterns or techniques **Header sections:**
- Quick Reference (related issues, key files)
**Footer:** - Related Pages links
- Related Systems links
- Last updated date **Body:**
- Conceptual overview first
--- - API reference tables
- Code examples (focused snippets)
## For Claude Code Sessions - Common patterns or techniques
When working with Claude Code: **Footer:**
- Related Systems links
1. Claude should read relevant wiki pages before implementing features - Last updated date
2. Claude should note documentation gaps during work
3. After committing code, Claude should propose wiki updates ---
4. User approves wiki changes before Claude pushes them
## For Claude Code Sessions
This keeps documentation current without requiring separate documentation passes.
When working with Claude Code:
---
1. Claude should read relevant wiki pages before implementing features
## Related Pages 2. Claude should note documentation gaps during work
3. After committing code, Claude should propose wiki updates
- [[Home]] - Wiki index 4. User approves wiki changes before Claude pushes them
- [[Contributing]] - Code contribution guidelines
- [[Writing-Tests]] - Test-driven development workflow This keeps documentation current without requiring separate documentation passes.
--- ---
*Last updated: 2025-11-29* ## Related Pages
- [[Home]] - Wiki index
- [[Writing-Tests]] - Test-driven development workflow
For contribution guidelines, see `CLAUDE.md` in the repository root.
---
*Last updated: 2026-02-07*