Skip to content

Crafting Teaching Demos

This folder contains teaching panels for the Crafting system.

Unlike the panels in HostileConsumers, these demos are designed to demonstrate optional runtime seams and behaviours in a controlled environment.

Some panels here may temporarily attach teaching-only helpers or modify service configuration to illustrate specific scenarios.

These panels are not lesser, and they are not throwaway. They obey the same two enforced rules as every panel under Teaching/: no reflection, and no .Internal namespace access. Both are checked by Teachables: No Reflection and Teachables: No Internal Namespace Usage, which scan the whole Teaching tree rather than only the hostile-consumer folders. Every panel here is real code calling the real public API against real runtime state.

What separates the two folders is narrower than it sounds, and it is about what a panel can prove rather than how well it is written. A hostile-consumer panel touches nothing it does not own, so if it compiles and runs, the public surface was sufficient on its own — that is the claim it exists to support. A panel in this folder changes something: it attaches a helper, configures a service, or wires up a seam. That is a legitimate thing for a real consumer to do, and it is exactly why the panel cannot also stand as proof that no such change was needed.


What These Panels Are Allowed To Do

Panels in this folder may:

  • Attach teachables-only helper components
  • Temporarily configure runtime seams (for example routing or policy behaviour)
  • Demonstrate behaviour that normally requires additional runtime wiring
  • Simulate scenarios for learning or debugging

That is the whole of the difference: because they change something, they cannot serve as proof that the public API was sufficient without it.


Why They Are Not Classified As Hostile Consumers

Not because of how they are written — because of what they touch.

The reason is that some demos temporarily attach teachables-only helper components (for example TeachingOutputRouter) or adjust runtime configuration to demonstrate optional seams such as routing or policy behaviour.

These helpers are used only to keep demo scenes self-contained and easy to experiment with.

The panel restores the original runtime configuration when disabled so that the scene is not left in a modified state.


Public API Usage

Even though these panels are not classified as hostile consumers, they still follow the same design discipline:

  • Crafting operations use public CraftingService APIs
  • Recipes are resolved through RecipeResolve
  • Job state is read through public job APIs
  • Preflight results come from CanCraftDetailed
  • Inventory and currency interactions go through adapters

The panels do not:

  • access .Internal namespaces
  • use reflection
  • call private framework methods
  • bypass runtime adapters or crafting rules

The only difference from hostile-consumer panels is the temporary use of teaching helpers to simulate optional runtime wiring.


Examples of Demo Behaviour

Panels in this folder may demonstrate:

  • Output routing via ICraftingOutputRouter
  • Different CraftChanceSpacePolicy configurations
  • Real adapter behaviour using inventory and currency systems
  • Runtime configuration of crafting policies for testing

To keep demo scenes self-contained, some panels attach teachables-only helper components such as:

TeachingOutputRouter

These helpers are not part of the runtime framework and are never required in production projects.


Relationship to Hostile Consumer Panels

RevFramework includes two categories of teaching panels.

HostileConsumers

Panels that:

  • use only public APIs
  • rely on documented runtime types
  • do not modify runtime wiring
  • verify that the public API surface is correct

These panels act as API verification tools.

Demos

Panels in this folder:

  • may temporarily configure runtime seams
  • may attach teaching helpers
  • exist purely to demonstrate behaviour or scenarios

They are not part of the hostile-consumer guarantee.


When to Use These Panels

Use demo panels when you want to:

  • explore crafting behaviour interactively
  • debug routing, space checks, or adapter wiring
  • experiment with crafting configuration in isolation
  • understand how optional seams affect crafting

Production projects should implement their own runtime wiring rather than relying on demo helpers.


Summary

The panels in this folder are sandbox teaching tools.

They help illustrate how different parts of the Crafting system behave together, but they are not intended to verify the public API surface.

For API verification panels, see the HostileConsumers folder.