Files
satistaskory/docs/03-Architecture/📝 Decisions.md
T
Stephen Fasciani 3beaa12706
Build / build (push) Failing after 30s
Step goal quantity by one recipe's output, not always 1.
Capture, +, and - use RecipeProvider.outputCount. Planks move by 4. Gather stays 1. Minus at or below one yield removes the goal.
2026-09-09 01:40:16 -04:00

14 KiB
Raw Blame History

📝 Architectural Decision Log


ADR-001 — Domain first; recipes, UI, storage, and integrations are infrastructure

Date: 2026-09-07

Decision: Goals are the domain. EMI, JEI, REI, NeoForge, UI, and save formats are infrastructure.

Reason:

Satistaskory exists to remember what the player is building and what is still missing. Centering a recipe mod or a GUI would make the tool the domain.

Status: ✅ Accepted


ADR-002 — Layered DDD; domain does not depend on infrastructure

Date: 2026-09-07

Decision: UI and Application depend on Domain. Infrastructure implements domain ports and depends inward.

Reason:

The domain model must survive infrastructure changes. A downward Domain → Infrastructure dependency would make adapters the source of truth.

Status: ✅ Accepted


ADR-003 — RecipeProvider port

Date: 2026-09-07

Decision: Recipe lookup goes through a RecipeProvider interface.

Implementations: EMI, JEI, REI. Future: vanilla.

The rest of the system does not care which provider is active.

Reason:

If a recipe mod disappears, only an adapter should change.

Recipe viewing is out of scope. The port exists for 🧾 Recipe Resolution, not for browsing recipes.

Status: ✅ Accepted


ADR-004 — Persistence is replaceable

Date: 2026-09-07

Decision: The domain does not know where data is stored.

Possible implementations: world save, server save, future cloud sync.

Status: ✅ Accepted


ADR-005 — Inventory is infrastructure; domain consumes quantities

Date: 2026-09-07

Decision: 🎒 Inventory State is available quantities. Scanning inventories is infrastructure.

Reason:

Player inventory, ender chest, and later storage integrations are collection strategies. The domain formula is Missing = Required - Available.

Status: ✅ Accepted


ADR-006 — UI is replaceable infrastructure

Date: 2026-09-07

Decision: Sidebar, full-screen planner, HUD, and future integrations are consumers of domain information. They do not contain domain logic.

Reason:

Progressive disclosure is a UI concern guided by the domain. Default: missing materials.

Status: ✅ Accepted


ADR-007 — Three domain services, not one recipe-aggregation blob

Date: 2026-09-07

Decision: Domain services are 🧾 Recipe Resolution, ➕ Material Aggregation, and 📈 Progress Calculation.

Reason:

Resolution converts one goal into requirements. Aggregation combines active goals. Progress compares requirements to inventory. Those are different questions.

Status: ✅ Accepted


ADR-008 — Ready To Craft is not completion

Date: 2026-09-07

Decision: 🛠️ Ready To Craft means materials are available. ✅ Completed Goal follows a configurable completion strategy (manual, inventory detection, future implementations).

Reason:

Having the diamonds is not the same as considering the work finished.

Status: ✅ Accepted. Opt-in inventory detection: ADR-020.


ADR-009 — Projects are organizational only

Date: 2026-09-07

Decision: 📁 Project groups 🎯 Goal for the player. Material calculations aggregate across projects, from active goals.

Status: ✅ Accepted


ADR-010 — Play overlay is the living surface; capture is in-place

Date: 2026-09-07

Decision: The daily consumer is a play overlay (HUD / sidebar family) showing 📉 Missing Material while the player walks.

A 🎯 Goal is named in place: hover an item in inventory, the crafting bench craft pane, or the craft book, then + Add to Crafting Goals.

Satistaskory does not own those host views. It does not use a pause menu or planner pane as the daily desk.

Reason:

The product is a cognitive prosthetic during play. A dedicated menu would make the tool the desk. Capture should happen where the player already noticed the item.

Player copy "Crafting Goals" means 🎯 Goal. Code and docs say Goal.

Status: ✅ Accepted


ADR-011 — Play overlay has two regions: Goals and Missing Materials

Date: 2026-09-07

Decision: The living overlay (player concept art, 🖼️ Wireframes Screen 2) has two regions:

  1. Active 🎯 Goal with Target Quantity, adjusted by [+] / [-]
  2. Aggregated materials still needed — one row per material, with a count (Missing = Required - Available)

The concept art’s lower region was unfinished (a material name, no counts). The finished drawing is ➕ Material Aggregation plus 📈 Progress Calculation, not a recipe tree.

X Clear Items is on this overlay.

The overlay remains on the play screen. It is not a pause menu. No row selection is drawn: aggregation stays across active goals. Same material from two goals is one row.

Initial quantity at capture is not decided.

Reason:

The vision asks two questions. The concept art is the chrome. Philosophy Rule #3 still forbids recipe breakdowns as the first drawing of the materials region.

Status: ✅ Accepted

Refines: ADR-010 (the overlay is not missing-materials-only)


ADR-012 — Goal identity and quantity

Date: 2026-09-08

Decision:

  • One 🎯 Goal per Target Item (ItemId) in the plan
  • Target Quantity ≥ 1 always
  • ▶️ Create Goal uses quantity 1 (new) or +1 (already present)
  • [-] at quantity 1 removes the goal
  • ItemId is namespace:path, not a Minecraft Item class

Reason:

Hover-add has no picker. Two rows for the same furnace would split aggregation for no gain. Quantity 0 is not a goal.

Status: ✅ Accepted

Settles: the open quantity questions left by ADR-011


ADR-013 — First slice freezes

Date: 2026-09-08

Decision: The first code slice is Create Goal → stub recipes → player inventory → play overlay. Frozen for that slice only:

Topic Freeze
Persistence In-memory. ADR-004 still holds
Inventory Player inventory only
Recipes StubRecipeProvider. Not EMI/JEI/REI
Overlay placement Right side of the play screen
Clear No confirm
Projects Not packaged
Completion Not in the slice
Capture hosts Experience still names three; first wiring may be one caller of Create Goal

Reason:

A prototype that starts with EMI or a save format is an adapter project. This slice proves the domain chain.

Status: ✅ Accepted


ADR-014 — RecipeProvider shape; stub first

Date: 2026-09-08

Decision: See 🔌 Recipe Provider.

resolve(ItemId, quantity) → list of MaterialRequirement

One crafting level. No recipe → (target, quantity) (gather). quantity < 1 → empty. Provider picks one recipe and returns concrete items.

First impl: StubRecipeProvider. Production EMI/JEI/REI adapters come after the port is proven.

Status: ✅ Accepted

Refines: ADR-003 (named the port; this is the shape and the first impl)


ADR-015 — Capture is tooltip + key; overlay is a HUD

Date: 2026-09-08

Decision: Capture is a tooltip line plus a rebindable KeyMapping (default =, Controls → Satistaskory). The mouse stays on the item. There is no clickable chip beside the slot.

The play overlay stays a HUD layer, not a Screen. [+] / [-] / Clear use vanilla widget/button sprites and UI_BUTTON_CLICK. A cursor is required (chat). Walking does not unlock the mouse.

Reason:

A button next to the slot vanishes when the cursor leaves the item. A Screen rewrite would replace a working HUD. Vanilla Button widgets belong on screens we do not own.

Status: ✅ Accepted

Refines: ADR-010 (in-place capture; the control is a key, not a click-off button). Supersedes ADR-013’s “first wiring may be one caller” — inventory, craft pane, and craft book all call ▶️ Create Goal.


ADR-016 — Vanilla RecipeManager is the recipe source

Date: 2026-09-08

Decision: Satistaskory does not depend on EMI, JEI, or REI.

Recipe lookup for 🔌 Recipe Provider is Minecraft’s RecipeManager (vanilla + every mod that registers recipes through that API). Scan by output across all recipe types, not only minecraft:crafting. Implementation: VanillaRecipeProvider. StubRecipeProvider remains for unit tests.

Examples that must work without EMI: CC:Tweaked turtle, AE2 crafting and inscriber items.

EMI / JEI / REI are recipe viewers. They are not a lookup dependency. An adapter to a viewer is only justified if a real recipe exists only in that viewer and never in RecipeManager. That has not been observed.

Reason:

The domain question is ingredients, not “what does EMI draw.” Most modded crafting, smelting, and machine recipes on NeoForge 1.21 are RecipeType + JSON/serializer in RecipeManager. ADR-003 named EMI/JEI/REI first without a domain reason.

The port remains. The order was wrong.

Status: ✅ Accepted

Supersedes: ADR-003’s implementation list (EMI/JEI/REI first, vanilla later)


ADR-017 — First persistence is the player in this world

Date: 2026-09-08

Decision: Active goals persist as a NeoForge player attachment in the current world's save.

  • Per player, not one list for the whole world
  • Copy on death: dying does not wipe the plan
  • Load on join, write after each change, unload RAM on leave so worlds do not leak
  • Singleplayer and LAN host. A remote dedicated server has no integrated world save on the client; that session stays RAM-only until a server adapter exists

Reason:

The first slice is a prosthetic the player can quit and resume. ADR-004 named world save, server save, and cloud. World save is the one they play.

Status: ⚠️ Superseded by ADR-018

Refines: ADR-004. Supersedes ADR-013’s “Persistence: in-memory” freeze for this slice.


ADR-018 — Client-only; the host does not need this mod

Date: 2026-09-08

Decision: Satistaskory is a client mod. A dedicated server, LAN host, or singleplayer integrated server does not need it installed for the prosthetic to work.

Persistence is a file this client owns:

  • Singleplayer: <world>/satistaskory.dat (travels with the world backup)
  • Remote / LAN guest: satistaskory/remote/<name-and-motd>.dat under the game directory (server list name + description, not IP)

displayTest="IGNORE_ALL_VERSION". No player attachment. No server packet. No server jar.

The overlay, capture, inventory snapshot, and RecipeManager lookup already run on the client. ADR-017’s player attachment was the only thing that required the mod on the host. That was the wrong persistence for this product.

Reason:

The player carries the plan. The server is not a Satistaskory collaborator. Requiring the jar on a friend’s server, a modpack host, or a dedicated box would make the prosthetic a pack dependency instead of a personal tool.

Remote identity is the multiplayer list name plus MOTD, not the IP. Hostnames move. The name is what the player already set. The cost: renaming that list entry is a new plan. That cost must stay visible in player docs. Silent loss of the queue is worse than an ugly filename.

Status: ✅ Accepted

Supersedes: ADR-017 (player attachment in the world save)


ADR-019 — Interchangeable ingredients are any-of, not the first tag member

Date: 2026-09-08

Decision: When a recipe ingredient matches several items (a tag, a custom ingredient), 🧱 Material Requirement is one row with all of those ItemIds. Available is the sum. The overlay shows the option the player holds most of; if they hold none, a generic path label (Planks), not oak-by-default.

Not a tag type in the domain. Not biome-based wood. Not a recipe browser.

Reason:

A chest crafts from any #minecraft:planks. Picking getItems()[0] made spruce in a spruce biome invisible, and mixed stacks look short. The walk failed.

Status: ✅ Accepted

Refines: ADR-014 (concrete items; this is how several concretes count)


ADR-020 — Opt-in: picking up the goal item can complete it

Date: 2026-09-08

Decision: Inventory-detection completion is a player toggle: /satistaskory auto-remove [on|off]. Default off.

When on, a new stack of the goal item in player inventory counts that many toward the goal. Quantity drops. At 0 the goal is removed. Items that left the inventory (dropped or stored) and come back are not new. Enabling the toggle, or joining a world, baselines current holdings so already-held stacks do not wipe the list.

Manual [−] / Clear remain. Ready is still not complete.

Reason:

The walk: finished items stayed on the overlay until a click. For a prosthetic that is extra working memory. Auto-removing whenever held >= target would also delete a new goal the moment they add it while carrying any of that item. Counting gains avoids that.

Status: ✅ Accepted

Refines: ADR-008 (completion is configurable; this is the inventory-detection option)


ADR-021 — Quantity steps by recipe output

Date: 2026-09-08

Decision: Capture, [+], and [-] move Target Quantity by one recipe’s output count, not always 1. Oak planks +4. A furnace +1. No recipe → 1. [-] at or below one yield removes the goal.

The same recipe VanillaRecipeProvider already picked for ingredients. Ingredient math stays aligned with crafts.

Reason:

The walk: items that craft in stacks of 4 still ticked by 1, so the overlay was counting pieces instead of crafts.

Status: ✅ Accepted

Supersedes: ADR-012’s “Create = 1 / +1” freeze for quantity steps.


🏛️ Architecture

🌟 Project Vision

🧠 Philosophy

🎯 Goal

🖥️ Experience

🚶 Day in the Life

🖼️ Wireframes

▶️ Create Goal

🔌 Recipe Provider

📦 Packages

➕ Material Aggregation