Skip to content

Commit b0e7df2

Browse files
feat: implement basic income and expense tracking foundation for Epic 5.3
Implements foundational components for the economy system to enable daily expense tracking for NPCs. Components implemented: - Wallet component (sealed record) for currency management with Add/Remove operations and CanAfford validation - ExpenseDefinition (sealed record) with static Food (2-10 copper) and Housing (5-50 copper) definitions - ExpenseType enum for type-safe expense categories (Food, Housing) - ExpensePaidEvent (sealed record) implementing IGameEvent for transaction tracking - DailyExpenses component (readonly record struct) for character expense quality preferences (0-100 scale) - Full Character entity integration with both Wallet and DailyExpenses Test Coverage: 29 new tests (8 Wallet + 8 ExpenseDefinition + 3 ExpensePaidEvent + 8 DailyExpenses + 4 Character integration) All 573 tests passing (485 Core + 88 Simulation) Zero warnings with --warnaserror All CI checks passing This completes Epic 5.3 by providing the foundation for NPC economic pressure through daily expenses. Future epics will add income sources (5.5) and system execution (5.6). Closes #42
1 parent caf95a8 commit b0e7df2

13 files changed

Lines changed: 1345 additions & 16 deletions

File tree

PROMPT.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
> - Run `git config user.email` AND `gh auth status` to verify correct account
1111
> - Contributor (martincjarvis) opens PRs and commits code
1212
> - Maintainer (mcj-coder) reviews and merges PRs
13+
> - **CRITICAL: Use `gh auth switch --user <username>` to change accounts** - NEVER use `gh auth login` (requires manual interaction)
1314
> - See CLAUDE.local.md "CRITICAL: Verify Both Git and GitHub CLI Credentials" section
1415
> - All changes need to be done via feature branch and merged via PR
1516
> - Work as `Contributor` implementing code changes and raising PR's. Do not review PR's unless explicitly prompted by the user - just monitor active PR and Issues for comment feedback.
@@ -122,18 +123,27 @@ See **[docs/plans/rules-engine-design.md](docs/plans/rules-engine-design.md)** f
122123
### Workflow Rules (CRITICAL)
123124

124125
1. **FIRST: Verify credentials** - Run `./scripts/verify-credentials.sh contributor` before any work
126+
- If account switch needed, use `gh auth switch --user <username>` (NEVER `gh auth login`)
125127
2. Work as Contributor
126128
3. **BLOCKING: Check for open PR feedback** - Run `gh pr list --author martincjarvis --state open` and check for review comments
127129
4. **If PR has feedback**: Implement requested changes immediately (skip to new tasks only after all feedback resolved)
128130
5. Check for GitHub issue before any work
129131
6. Create feature branch: `feature/<issue>-<description>`
130-
7. Write failing tests first
131-
8. Implement to pass tests
132-
9. Run `dotnet build --warnaserror && dotnet test`
133-
10. **BEFORE COMMIT: Re-verify credentials** - Run `./scripts/verify-credentials.sh contributor`
134-
11. Commit with: `<type>: <description>
135-
136-
Refs #<issue>`12. **BEFORE PR: Re-verify credentials** - Run`./scripts/verify-credentials.sh contributor` 13. Create PR and request review 14. **AFTER PR: Monitor for feedback** - Check PR regularly for review comments and respond immediately
132+
7. **AUTONOMOUS EXECUTION: Use `/subagent-driven-development` or `/executing-plans` for multi-step tasks**
133+
- Plans MUST be executed via subagents for quality and consistency
134+
- DO NOT manually implement plans step-by-step
135+
8. Write failing tests first (via TDD subagents)
136+
9. Implement to pass tests (via implementation subagents)
137+
10. Run `dotnet build --warnaserror && dotnet test`
138+
11. **BEFORE COMMIT: Re-verify credentials** - Run `./scripts/verify-credentials.sh contributor`
139+
12. Commit with: `<type>: <description>
140+
141+
Refs #<issue>`
142+
143+
13. **MANDATORY: Push feature branch and create PR** - Do NOT merge locally
144+
- Run: `git push -u origin <feature-branch>`
145+
- Run: `gh pr create --title "<title>" --body "<description>\n\nRefs #<issue>"`
146+
14. **AFTER PR: Monitor for feedback** - Check PR regularly for review comments and respond immediately
137147

138148
### Commit Types
139149

0 commit comments

Comments
 (0)