Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .faim/axioms.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
51dc4dfd2916d1c7714d21f9325a1e85b6838c1411d1c2a668b3512413aaf05e
0cc75494ae7622332fe1f66cccbb1a3f5f845af7a98b10f78ea8683ce54c4a27
57 changes: 57 additions & 0 deletions .faim/axioms/decisions.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,60 @@
prop(project, orm, prisma).
prop(project, runtime, node24).
prop(project, realtime, sse).
prop(project, summary, 'Team Lunch coordinates office lunch decisions: poll menus, pick a winner, collect food orders, and improve recommendations from history.').
prop(project, primary_goal, 'Help authenticated office users decide and order lunch with retained history for analytics and recommendation learning.').

% --- product blueprint ---
entity(admin_user, actor).
prop(admin_user, summary, 'Approves users and manages local accounts, access, menus, and operational setup.').

entity(approved_user, actor).
prop(approved_user, summary, 'Authenticated team member who votes in polls, places food orders, sets preferences, and receives recommendations.').

entity(auth_system, actor).
prop(auth_system, summary, 'Backend session and access-control boundary for local and Entra-authenticated users.').

entity(polls, domain).
prop(polls, summary, 'Menu voting phase that determines the restaurant/menu winner or a tie needing resolution.').

entity(menus, domain).
prop(menus, summary, 'Imported or manually managed restaurant menus and menu items.').

entity(food_selections, domain).
prop(food_selections, summary, 'Post-poll ordering phase where users submit line-item lunch orders for the winning menu.').

entity(recommendations, domain).
prop(recommendations, summary, 'Meal ranking and explanation layer using preferences, allergies, ratings, order history, and optional AI wording.').

entity(auth_access, domain).
prop(auth_access, summary, 'Authentication, approval, session versioning, roles, and audit history.').

entity(lunch_decision_flow, workflow).
prop(lunch_decision_flow, summary, 'Poll menus, finish or resolve tie, open food selection, collect orders, then retain outcomes for future recommendations.').
prop(lunch_decision_flow, stateful, true).

entity(menu_polling, workflow).
prop(menu_polling, summary, 'Users vote on available menus until one wins or the poll ties.').
prop(menu_polling, stateful, true).

entity(food_ordering, workflow).
prop(food_ordering, summary, 'Users order line items from the winning menu before the food-selection timer closes.').
prop(food_ordering, stateful, true).

entity(meal_recommendation, workflow).
prop(meal_recommendation, summary, 'System scores current menu items for a user and persists recommendation impressions for learning/audit.').
prop(meal_recommendation, stateful, true).

rel(lunch_decision_flow, uses, polls).
rel(lunch_decision_flow, uses, menus).
rel(lunch_decision_flow, uses, food_selections).
rel(lunch_decision_flow, uses, recommendations).
rel(lunch_decision_flow, uses, auth_access).
rel(menu_polling, precedes, food_ordering).
rel(food_ordering, precedes, meal_recommendation).
rel(admin_user, owns, auth_access).
rel(admin_user, owns, menus).
rel(approved_user, participates_in, menu_polling).
rel(approved_user, participates_in, food_ordering).
rel(approved_user, participates_in, meal_recommendation).
rel(auth_system, participates_in, lunch_decision_flow).
14 changes: 14 additions & 0 deletions .faim/axioms/schema.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
kind(module). % other source module (db singleton, shared lib, util)
kind(event). % an SSE event name broadcast through src/server/sse.ts
kind(type). % a shared request/response/domain type in src/lib
kind(domain). % durable product/business area
kind(actor). % user/system role participating in the product
kind(workflow). % core product flow or phase

% --- attributes ---
attr(project, language, atom).
Expand All @@ -21,6 +24,8 @@
attr(project, orm, atom).
attr(project, runtime, atom).
attr(project, realtime, atom).
attr(project, summary, string).
attr(project, primary_goal, string).

attr(endpoint, method, atom).
attr(endpoint, path, string).
Expand All @@ -31,12 +36,21 @@

attr(event, scoped_by, atom). % e.g. office_location (multi-office isolation)

attr(domain, summary, string).
attr(actor, summary, string).
attr(workflow, summary, string).
attr(workflow, stateful, boolean).

% --- relationship types ---
reltype(depends_on, any, any).
reltype(emits, one_of([service, route]), event).
reltype(consumes, any, event).
reltype(exposes, route, endpoint).
reltype(declares, one_of([service, module, route]), type).
reltype(uses, any, any).
reltype(owns, actor, domain).
reltype(precedes, workflow, workflow).
reltype(participates_in, actor, workflow).

% --- temporal event types (for requirement triggers) ---
event_type(deployment).
Loading
Loading