Update PROJECT_PLAN.json with completed task statuses

Completed tasks (10/32):
- CRIT-001: Core module structure
- CRIT-002: Enums module (with PokemonStage/PokemonVariant separation)
- CRIT-003: RulesConfig module (10 sub-configs)
- CRIT-004: RandomProvider module (SeededRandom + SecureRandom)
- TEST-001: Enum tests (28 tests)
- TEST-002: Config tests (31 tests)
- TEST-003: RNG tests (42 tests)
- HIGH-001: Card models (CardDefinition, CardInstance, Attack, Ability)
- HIGH-002: Action models (11 action types as discriminated union)
- TEST-004: Card tests (54 tests)
- TEST-005: Action tests (48 tests)

Week 1 complete, Week 2 in progress. 205 tests passing.
This commit is contained in:
Cal Corum 2026-01-24 22:37:38 -06:00
parent 32541af682
commit 91ad2cf0a5

View File

@ -2,13 +2,13 @@
"meta": {
"version": "1.0.0",
"created": "2026-01-24",
"lastUpdated": "2026-01-24",
"lastUpdated": "2026-01-25",
"planType": "feature",
"projectName": "Mantimon TCG - Backend Game Engine",
"description": "Core game engine scaffolding for a highly configurable Pokemon TCG-inspired card game. The engine must support campaign mode with fixed rules and free play mode with user-configurable rules.",
"totalEstimatedHours": 48,
"totalTasks": 32,
"completedTasks": 0
"completedTasks": 10
},
"categories": {
"critical": "Foundation components that block all other work",
@ -38,36 +38,38 @@
"description": "Set up the directory structure and __init__.py files for the core game engine module hierarchy",
"category": "critical",
"priority": 1,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": [],
"files": [
{"path": "app/core/__init__.py", "issue": "File does not exist"},
{"path": "app/core/models/__init__.py", "issue": "File does not exist"},
{"path": "app/core/effects/__init__.py", "issue": "File does not exist"},
{"path": "tests/core/__init__.py", "issue": "File does not exist"},
{"path": "tests/core/test_models/__init__.py", "issue": "File does not exist"},
{"path": "tests/core/test_effects/__init__.py", "issue": "File does not exist"}
{"path": "app/core/__init__.py", "status": "created"},
{"path": "app/core/models/__init__.py", "status": "created"},
{"path": "app/core/effects/__init__.py", "status": "created"},
{"path": "tests/core/__init__.py", "status": "created"},
{"path": "tests/core/test_models/__init__.py", "status": "created"},
{"path": "tests/core/test_effects/__init__.py", "status": "created"}
],
"suggestedFix": "Create all directories and empty __init__.py files with appropriate module docstrings",
"estimatedHours": 0.5,
"notes": "Foundation task - must be completed first"
"notes": "Foundation task - must be completed first",
"completedDate": "2026-01-24"
},
{
"id": "CRIT-002",
"name": "Create enums module",
"description": "Define all enumeration types used throughout the game engine: CardType, EnergyType, PokemonStage, TurnPhase, StatusCondition, TrainerType, ActionType",
"description": "Define all enumeration types used throughout the game engine: CardType, EnergyType, PokemonStage, PokemonVariant, TurnPhase, StatusCondition, TrainerType, ActionType, GameEndReason",
"category": "critical",
"priority": 2,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-001"],
"files": [
{"path": "app/core/models/enums.py", "issue": "File does not exist"}
{"path": "app/core/models/enums.py", "status": "created"}
],
"suggestedFix": "Create StrEnum classes for each enumeration type. Use StrEnum for JSON serialization compatibility.",
"estimatedHours": 1,
"notes": "All other modules depend on these enums. Consider future extensibility for custom energy types."
"notes": "PokemonStage (BASIC, STAGE_1, STAGE_2) separated from PokemonVariant (NORMAL, EX, GX, V, VMAX, VSTAR). Stage determines evolution mechanics, variant determines knockout points.",
"completedDate": "2026-01-24"
},
{
"id": "TEST-001",
@ -75,31 +77,33 @@
"description": "Test that all enums serialize correctly to JSON, have expected values, and can be used in Pydantic models",
"category": "high",
"priority": 3,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-002"],
"files": [
{"path": "tests/core/test_models/test_enums.py", "issue": "File does not exist"}
{"path": "tests/core/test_models/test_enums.py", "status": "created"}
],
"suggestedFix": "Test each enum: value consistency, JSON round-trip, membership checks",
"estimatedHours": 0.5,
"notes": "Simple tests but establish testing patterns for the project"
"notes": "28 tests covering all enums including PokemonStage/PokemonVariant separation",
"completedDate": "2026-01-24"
},
{
"id": "CRIT-003",
"name": "Create RulesConfig module",
"description": "Define the master configuration system for all game rules with sensible defaults. Includes: DeckConfig, BenchConfig, EnergyConfig, PrizeConfig, FirstTurnConfig, WinConditionsConfig, StatusConfig, TrainerConfig",
"description": "Define the master configuration system for all game rules with sensible defaults. Includes: DeckConfig, BenchConfig, EnergyConfig, PrizeConfig, FirstTurnConfig, WinConditionsConfig, StatusConfig, TrainerConfig, EvolutionConfig, RetreatConfig",
"category": "critical",
"priority": 4,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-002"],
"files": [
{"path": "app/core/config.py", "issue": "File does not exist"}
{"path": "app/core/config.py", "status": "created"}
],
"suggestedFix": "Create nested Pydantic BaseModel classes with Field defaults. Use Field(default_factory=...) for mutable defaults.",
"estimatedHours": 2,
"notes": "This is the heart of the configurability requirement. Defaults should approximate standard Pokemon TCG rules. Document each config option thoroughly."
"notes": "Defaults based on Mantimon TCG house rules (40-card deck, 20-card energy deck, 4 points to win). Includes standard_pokemon_tcg() class method for official rules preset. PrizeConfig uses PokemonVariant for knockout points.",
"completedDate": "2026-01-24"
},
{
"id": "TEST-002",
@ -107,15 +111,16 @@
"description": "Test that RulesConfig has sensible defaults, custom values override correctly, and serialization round-trips work",
"category": "high",
"priority": 5,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-003"],
"files": [
{"path": "tests/core/test_config.py", "issue": "File does not exist"}
{"path": "tests/core/test_config.py", "status": "created"}
],
"suggestedFix": "Test: default instantiation, partial overrides, full JSON round-trip, validation of invalid values",
"estimatedHours": 1,
"notes": "Important to verify all defaults match expected standard rules"
"notes": "31 tests covering all config classes, defaults, customization, and JSON serialization",
"completedDate": "2026-01-24"
},
{
"id": "CRIT-004",
@ -123,15 +128,16 @@
"description": "Implement the RandomProvider protocol with SeededRandom (for testing/replays) and SecureRandom (for production PvP) implementations",
"category": "critical",
"priority": 6,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-001"],
"files": [
{"path": "app/core/rng.py", "issue": "File does not exist"}
{"path": "app/core/rng.py", "status": "created"}
],
"suggestedFix": "Create Protocol class with random(), randint(), choice(), shuffle() methods. Implement SeededRandom using random.Random with seed, SecureRandom using secrets module.",
"estimatedHours": 1.5,
"notes": "Critical for testability. SeededRandom enables deterministic tests for coin flips and shuffles."
"notes": "Includes coin_flip() and sample() methods. create_rng() factory function for easy instantiation.",
"completedDate": "2026-01-24"
},
{
"id": "TEST-003",
@ -139,31 +145,33 @@
"description": "Test that SeededRandom produces deterministic results and SecureRandom produces varied results",
"category": "high",
"priority": 7,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-004"],
"files": [
{"path": "tests/core/test_rng.py", "issue": "File does not exist"}
{"path": "tests/core/test_rng.py", "status": "created"}
],
"suggestedFix": "Test: SeededRandom with same seed produces identical sequences, SecureRandom produces different values across calls (statistical test)",
"estimatedHours": 1,
"notes": "SeededRandom tests should be fully deterministic. SecureRandom tests should verify randomness."
"notes": "42 tests including protocol compliance, game use cases (deck shuffle, coin flip, prize selection)",
"completedDate": "2026-01-24"
},
{
"id": "HIGH-001",
"name": "Create CardDefinition and CardInstance models",
"description": "Define the card template (CardDefinition) and in-game card state (CardInstance) models. Includes Attack, Ability sub-models.",
"description": "Define the card template (CardDefinition) and in-game card state (CardInstance) models. Includes Attack, Ability, WeaknessResistance sub-models.",
"category": "high",
"priority": 8,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-002"],
"files": [
{"path": "app/core/models/card.py", "issue": "File does not exist"}
{"path": "app/core/models/card.py", "status": "created"}
],
"suggestedFix": "CardDefinition: immutable template with id, name, card_type, stage, hp, attacks, abilities, weakness, resistance, retreat_cost. CardInstance: mutable state with instance_id, definition_id, damage, attached_energy, status_conditions, turn_played.",
"suggestedFix": "CardDefinition: immutable template with id, name, card_type, stage, variant, hp, attacks, abilities, weakness, resistance, retreat_cost. CardInstance: mutable state with instance_id, definition_id, damage, attached_energy, status_conditions, turn_played.",
"estimatedHours": 2,
"notes": "CardInstance should only store mutable state. All static card data comes from CardDefinition lookup."
"notes": "CardDefinition has separate stage (evolution) and variant (knockout points) fields. Includes helper methods: is_basic_pokemon(), is_evolution(), requires_evolution_from_variant(), knockout_points(). CardInstance has status condition management with override rules.",
"completedDate": "2026-01-25"
},
{
"id": "TEST-004",
@ -171,31 +179,33 @@
"description": "Test CardDefinition and CardInstance creation, validation, and serialization",
"category": "high",
"priority": 9,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["HIGH-001"],
"files": [
{"path": "tests/core/test_models/test_card.py", "issue": "File does not exist"}
{"path": "tests/core/test_models/test_card.py", "status": "created"}
],
"suggestedFix": "Test: Pokemon card creation with attacks, Trainer card creation, Energy card creation, CardInstance damage tracking, energy attachment, status conditions",
"estimatedHours": 1.5,
"notes": "Create sample card fixtures for reuse in other tests"
"notes": "54 tests covering all card types, stage/variant combinations (Basic EX, Stage 2 GX, etc.), status condition override rules, evolution timing, energy attachment/detachment",
"completedDate": "2026-01-25"
},
{
"id": "HIGH-002",
"name": "Create Action union types",
"description": "Define all player action types as Pydantic models with Literal type discriminators: PlayPokemonAction, EvolvePokemonAction, AttachEnergyAction, PlayTrainerAction, UseAbilityAction, AttackAction, RetreatAction, PassAction",
"description": "Define all player action types as Pydantic models with Literal type discriminators: PlayPokemonAction, EvolvePokemonAction, AttachEnergyAction, PlayTrainerAction, UseAbilityAction, AttackAction, RetreatAction, PassAction, SelectPrizeAction, SelectActiveAction, ResignAction",
"category": "high",
"priority": 10,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["CRIT-002"],
"files": [
{"path": "app/core/models/actions.py", "issue": "File does not exist"}
{"path": "app/core/models/actions.py", "status": "created"}
],
"suggestedFix": "Each action model has a 'type' field with Literal value for discrimination. Create Action = Union[...] type alias for all actions.",
"estimatedHours": 1.5,
"notes": "Union type enables type-safe action handling. Each action should have all parameters needed for validation and execution."
"notes": "11 action types implemented. Includes parse_action() for JSON deserialization and VALID_PHASES_FOR_ACTION mapping for phase validation.",
"completedDate": "2026-01-25"
},
{
"id": "TEST-005",
@ -203,15 +213,16 @@
"description": "Test that action union types discriminate correctly and serialize/deserialize properly",
"category": "high",
"priority": 11,
"completed": false,
"tested": false,
"completed": true,
"tested": true,
"dependencies": ["HIGH-002"],
"files": [
{"path": "tests/core/test_models/test_actions.py", "issue": "File does not exist"}
{"path": "tests/core/test_models/test_actions.py", "status": "created"}
],
"suggestedFix": "Test: each action type creates correctly, JSON round-trip works, discriminated union parses correct type",
"estimatedHours": 1,
"notes": "Test that parsing JSON into Action union correctly identifies the specific action type"
"notes": "48 tests covering all 11 action types, parse_action discrimination, error handling, valid phases for each action type",
"completedDate": "2026-01-25"
},
{
"id": "HIGH-003",
@ -588,13 +599,17 @@
"theme": "Foundation & Models",
"tasks": ["CRIT-001", "CRIT-002", "TEST-001", "CRIT-003", "TEST-002", "CRIT-004", "TEST-003"],
"estimatedHours": 8,
"goals": ["Module structure complete", "Enums, config, and RNG working with tests"]
"goals": ["Module structure complete", "Enums, config, and RNG working with tests"],
"status": "COMPLETED",
"completedDate": "2026-01-24"
},
"week2": {
"theme": "Core Models",
"tasks": ["HIGH-001", "TEST-004", "HIGH-002", "TEST-005", "HIGH-003", "TEST-006", "HIGH-004"],
"estimatedHours": 12,
"goals": ["All data models complete", "Test fixtures established"]
"goals": ["All data models complete", "Test fixtures established"],
"status": "IN_PROGRESS",
"progress": "Card and Action models complete (4/7 tasks). GameState, fixtures remaining."
},
"week3": {
"theme": "Effects System",