Skip to content

feat: implement CraftingSystem for Epic 4.7#135

Merged
mcj-coder merged 5 commits into
mainfrom
feature/38-crafting-system
Jan 19, 2026
Merged

feat: implement CraftingSystem for Epic 4.7#135
mcj-coder merged 5 commits into
mainfrom
feature/38-crafting-system

Conversation

@mcj-coder

Copy link
Copy Markdown
Contributor

Summary

Implements the CraftingSystem that processes active crafting sessions, determines outcomes using CraftingOutcomeRule, and awards XP to characters.

Changes

  • CraftId value object for unique craft identification
  • ActiveCraft component to track in-progress crafts with modifiers
  • CraftingCompletedEvent for craft completion notifications
  • Extended Character with ClassProgress and ActiveCraft properties
  • CraftingSystem implementation with:
    • Outcome determination via CraftingOutcomeRule
    • XP calculation and awarding via XpCalculator
    • Multi-class XP distribution
    • Event emission for completed crafts

Test Coverage

Added 8 comprehensive tests covering:

  • System name and empty world scenarios
  • Craft completion and event emission
  • XP awarding for successful crafts
  • Multi-class XP distribution
  • Failed craft handling
  • Active craft clearing after completion

Verification

  • ✅ All 511 tests pass (427 Core + 84 Simulation)
  • dotnet build --warnaserror succeeds
  • ✅ Zero compiler warnings

Related Issues

Closes #38

🤖 Generated with Claude Code

Implements the CraftingSystem that processes active crafting sessions,
determines outcomes using CraftingOutcomeRule, and awards XP.

Changes:
- Add CraftId value object for unique craft identification
- Add ActiveCraft component to track in-progress crafts
- Add CraftingCompletedEvent for craft completion notifications
- Extend Character with ClassProgress and ActiveCraft properties
- Implement CraftingSystem with outcome determination and XP awarding
- Add comprehensive test suite (8 tests) covering:
  - System name and empty world scenarios
  - Craft completion and event emission
  - XP awarding for successful crafts
  - Multi-class XP distribution
  - Failed craft handling
  - Active craft clearing after completion

All 511 tests pass (427 Core + 84 Simulation).

Refs #38

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jan 19, 2026

Copy link
Copy Markdown
Messages
📖 ✅ Issue properly linked: Closes #38
📖 ✅ Summary section found
📖 ✅ PR title follows Conventional Commits format
📖

📄 Multiple new code files created.

Consider adding:

  • XML documentation on public APIs
  • README in new directories
  • ADR if architectural decisions were made

Recommended Persona Reviews

💻 .NET Specialist - C# code changes detected

See docs/roles/ for persona details.


Danger analysis complete for feat: implement CraftingSystem for Epic 4.7. 13 files changed, 5 commits.

Generated by 🚫 dangerJS against da94043

Epic 4.7 (CraftingSystem) complete - 7/8 tasks in Epic 4

Refs #38
@mcj-coder
mcj-coder enabled auto-merge (squash) January 19, 2026 14:35
Add automated verification script and workflow checks to ensure git
config and GitHub CLI are using the correct account before commits and PRs.

Changes:
- Add scripts/verify-credentials.sh for automated credential checking
- Script reads from environment variables (no hardcoded account details)
- Update PROMPT.md workflow rules with mandatory verification steps:
  - Step 1: Verify credentials before starting work
  - Step 8: Re-verify before commits
  - Step 10: Re-verify before creating PRs
- Update CLAUDE.local.md with environment variable setup instructions

This closes the loophole where git config was correct (Contributor) but
GitHub CLI was authenticated with the wrong account (Maintainer), causing
PRs to be created with the wrong account.

Refs #38
Update verification script to read credentials directly from the
CLAUDE.local.md markdown table instead of requiring environment variables.

This makes the script self-contained and eliminates the need for manual
environment variable setup.

Refs #38
Update all auto-merge documentation to specify:
- Use --squash flag for squash commits
- Use --subject for conventional commit format (type: summary)
- Use --body with detailed description, rationale, and issue reference
- Include commit type definitions (feat, fix, refactor, docs, test, chore)

Updated files:
- CLAUDE.md: Added detailed auto-merge example in Code Review Flow
- AGENTS.md: Updated auto-merge step with full command syntax
- docs/roles/tech-lead.md: Added squash merge configuration
- docs/playbooks/workflow-verification.md: Updated CI workflow reference
- CLAUDE.local.md: Added comprehensive Auto-Merge Configuration section

This ensures all squash merge commits follow conventional commit standards
and include proper documentation of changes and rationale.

Refs #38

@martincjarvis martincjarvis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Code Review: APPROVED

Excellent implementation of the CraftingSystem for Epic 4.7!

Strengths

Architecture & Design:

  • Clean separation of concerns with proper value objects (CraftId) and components (ActiveCraft)
  • Well-designed event-driven architecture with CraftingCompletedEvent
  • Follows established patterns from XpCalculator and CraftingOutcomeRule

Code Quality:

  • Comprehensive XML documentation on all public APIs
  • Immutable record types with proper factory methods
  • Clear, readable code with good naming conventions
  • Zero compiler warnings (verified with --warnaserror)

Testing:

  • 8 comprehensive tests covering all scenarios
  • Edge cases properly tested (empty world, failed crafts, multi-class XP)
  • All 511 tests passing (427 Core + 84 Simulation)

Verification

  • ✅ All CI checks passing
  • ✅ Comprehensive test coverage
  • ✅ Zero warnings
  • ✅ Follows repository patterns and conventions
  • ✅ Proper documentation

Great work! Ready to merge.

@mcj-coder
mcj-coder merged commit d50f1c4 into main Jan 19, 2026
3 checks passed
@mcj-coder
mcj-coder deleted the feature/38-crafting-system branch January 19, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.7 Implement CraftingSystem

2 participants