Document the domain vault and first-slice design.
Build / build (push) Failing after 6m27s

Replace the empty flat docs with the Media Farm shelf layout: vision, philosophy, language, architecture (including packages, RecipeProvider, and Create Goal), player day, and prototype freezes. The NeoForge example code is still not the architecture.
This commit is contained in:
Stephen Fasciani
2026-09-08 01:47:06 -04:00
parent b904595114
commit a045281f76
31 changed files with 2727 additions and 0 deletions
@@ -0,0 +1,85 @@
# ▶️ Create Goal
First use case. Application layer. It does not contain domain rules; it uses [[🎯 Goal]] invariants.
Capture (hover → `+ Add to Crafting Goals`) is one caller. The use case does not know about inventory screens.
---
## Input
- `ItemId` (the item the player pointed at)
## Output
- The plan’s goals
- Refresh of missing materials (via [[📈 Progress Calculation]])
## Quantity
Always **1** on this path. New goal: quantity 1. Existing goal: quantity + 1.
---
## Flow
```text
CreateGoal(item)
↓
Goal exists for this ItemId?
yes → quantity += 1
no → add Goal(item, 1)
↓
RefreshProgress
remaining per goal = qty − available(item)
resolve remaining through RecipeProvider
aggregate
missing = required − available
```
Persistence: none in this slice. The list lives in memory.
---
## Sibling use cases (same slice)
Needed so Screen 2’s `[+]`, `[-]`, and Clear are not invented in the UI.
| Use case | Input | Result |
|----------|-------|--------|
| **Adjust Goal Quantity** | ItemId, delta +1 | Quantity + 1, then RefreshProgress |
| **Remove Goal** | ItemId | Goal gone, then RefreshProgress |
| **Clear Goals** | — | All goals gone, then RefreshProgress |
| **Refresh Progress** | — | Recompute missing list from current goals + inventory |
`[-]` on the overlay: if quantity > 1, Adjust −1; if quantity is 1, Remove Goal. The overlay does not keep a 0.
No confirm on Clear.
---
## First wiring
The three capture hosts are the experience target. The first adapter that can call `CreateGoal(ItemId)` is enough to prove the use case. Overlay on the **right** of the play screen.
Do not start EMI. Do not start a planner menu.
---
## Related Documents
[[🎯 Goal]]
[[📦 Packages]]
[[🔌 Recipe Provider]]
[[📈 Progress Calculation]]
[[🖥️ Experience]]
[[🖼️ Wireframes]]
[[📝 Decisions]]
[[🏛️ Architecture]]