Unified Board Item and Player Contract Model¶
Purpose¶
This file defines one canonical board-item contract for both system-generated expedition offers and player-posted contracts.
Town boards, event boards, guild boards, and caravan boards should not need separate UI and storage models for NPC work versus player work. They should render one unified item shape with different origin refs and permission rules.
Core Rule¶
Every board-visible entry should be a board_item.
Creation path can differ:
- generator writes
generated_offer - player command writes
player_contract
Display, expiry, claim state, filtering, permissions, and acceptance should all read from same board-item projection.
Why Unify¶
Without shared board item model, project gets duplicate logic for:
- board ordering
- urgency tags
- reason tags
- expiry and stale cleanup
- permission checks
- claim or acceptance state
- browser read models
One board item contract keeps town, event, guild, and player work on same rails.
Canonical Board Item Contract¶
Each board_item should contain at least:
board_item_iditem_kind:generated_offerorplayer_contractboard_source:town_board,guild_board,event_board,regional_caravan_board, orfaction_boardboard_source_refboard_lane:emergency,system,player_contract,guild_civic, oropportunityvisibility_scope:public,guild,party,faction, orcontract-limitedregion_idarea_idif location-boundtarget_typetarget_refurgency_bandurgency_scorereward_classreason_tagsexpires_atcapacity_mode:single_claim,multi_claim, ornonexclusivestate:active,claimed,expired,completed,cancelledorigin_refseedif generator-authored
Optional but useful fields:
issuer_actor_reffor player contractsissuer_guild_refif guild-postedevent_instance_refcontrol_window_reftown_condition_snapshot_refrecommended_group_sizerequired_knowledge_tagssuggested_loadout_tags
Source-Specific Attachments¶
Generated Offer¶
generated_offer board items should resolve back to:
expedition_offerexpedition_generation_runexpedition_board_context_snapshot
They inherit urgency, reason tags, and event or control refs from generator output.
Player Contract¶
player_contract board items should resolve back to:
contract_postcontract_escrowcontract_templatecompletion_rule_set
Player contracts should never bypass board-item projection. Posting contract creates contract rows first, then one or more board items that reference those rows.
Board Lanes and Coexistence Rules¶
System-generated civic work should not be crowded out by player contracts.
Use explicit board lanes:
emergency: crisis or high-severity system worksystem: normal generated town, event, or route workplayer_contract: player-posted contractsguild_civic: guild-issued civic or control-window workopportunity: lower-priority surplus or prosperity work
Recommended public board behavior:
- town boards keep reserved space for
emergencyandsystemlanes first - player contracts render in dedicated lane or reserved share, not in unrestricted competition with famine or plague response work
- event boards should usually show system-generated event-response work only, unless the design later allows explicit event-targeted player postings
- guild boards can mix
guild_civic,system, and guild-visibleplayer_contractitems
Player Contract Integration Rule¶
Player job board should reuse same target and completion vocabulary as expedition offers.
Allowed launch contract shapes:
- hunt target family or named target
- gather quota from valid source family or area
- delivery quota to town, project, or civic reserve
- escort shipment, NPC, or convoy leg
- survey route, tile cluster, or site verification target
That means player contracts should use same target_type families already defined for expedition generation where possible.
Posting Flow¶
- player issues
post_player_contractcommand - server validates posting rights from skill, renown, and board permissions
- server validates template, target scope, reward funding, expiry, and anti-abuse limits
- server writes
contract_postandcontract_escrow - board coordinator writes one or more
board_itemrows referencing that contract - board read model exposes same projection shape used by generated offers
Claim and Acceptance Modes¶
Board items should distinguish between visibility and claim behavior.
generated_offerusually leads to expedition acceptanceplayer_contractcan lead to expedition acceptance, delivery claim, or survey claim depending on template
Recommended field:
claim_mode:accept_expedition,reserve_delivery,claim_contract, ordirect_turn_in
This keeps one board item shape while allowing different post-click flows.
Unified Board Projection¶
Client should read board_item_projection, not raw source tables.
Recommended projection fields:
board_item_iditem_kindboard_sourceboard_lanetitledestination_labelurgency_bandreward_classprimary_reason_tagissuer_summarywhere relevanttime_remainingclaim_statevisibility_scope
This keeps browser UI fast and lets filters work on one shared schema.
Ordering Rule¶
Ordering should happen in two stages:
- lane priority
- score inside lane
Recommended lane priority:
emergencyguild_civicsystemplayer_contractopportunity
Then use urgency, expiry pressure, and source score inside lane.
Expiry and Cleanup¶
All board items should expire through one cleanup path.
- generated offers expire from urgency and generator cadence
- player contracts expire from contract deadline and funding state
- claimed items may hide from public projection without deleting source records
Expiry should change board_item.state; it should not immediately destroy source rows needed for audit.
Permissions¶
Board access should be separate from item validity.
Examples:
- public town board visible to all, but some player contracts may still require renown or skill competence to claim
- guild board visible only to guild members above configured rank
- faction board visible by affiliation and standing
- contract-limited items visible only to named recipients or party
Technical Records¶
Store:
board_itemboard_item_projectionboard_item_reason_tagboard_item_visibility_grantboard_item_claimboard_item_expiry_log
Reuse existing source records:
expedition_offercontract_postcontract_escrowevent_instancetown_control_window
Commands¶
Support commands such as:
generate_system_offerpost_player_contractrefresh_board_projectionclaim_board_itemaccept_board_itemcancel_player_contractexpire_board_item
Coordinator Model¶
Use board coordinators as read-model composers, not as alternate source-of-truth systems.
- town board coordinator merges generated civic work with eligible public contracts
- guild board coordinator merges governance work with guild-visible contracts
- caravan board coordinator merges shipment and route work with delivery or escort contracts
Source systems keep authority. Board coordinators only project and order.
Example Items¶
Generated Emergency Item¶
item_kind:generated_offerboard_source:town_boardboard_lane:emergencytarget_type:resource_siteurgency_band:criticalprimary_reason_tag:shortage:medicine
Player Delivery Contract¶
item_kind:player_contractboard_source:regional_caravan_boardboard_lane:player_contracttarget_type:shipmenturgency_band:activeprimary_reason_tag:player:delivery_contract
Related Systems¶
- expedition generation model
- expedition acceptance and settlement model
- market, contracts, and logistics
- social, trade, and governance systems
- town simulation and supply