1
0
Fork 0
polaris-task-force/src/lib/intelligence
Z8MB1E 2384c7f5a4 feat(intelligence): add the faction relation ledger collection and score math
Pairwise faction attitudes were hand-typed into a per-faction array, so the
two directions of one relationship lived in different documents and could
disagree with each other.

Add `faction-relation-entries`: one row per event that moved one faction's
attitude toward another, with the score computed on read instead of stored.
Entries are directed by default with a mutual flag for shared events; severity
tiers set the delta with a custom override; decaying entries halve per
half-life (new GameRules knob, 30 days default) while lasting shifts never
fade; voiding retires an entry with a stamped reason instead of deleting it;
hidden entries still move the score but never explain it to players.

`factionRelations.ts` holds the pure math (severity presets, decay, directed
and mutual scores, bands), and `factionRelationLedger.ts` is the single read
path so the voided, hidden and undiscovered-faction rules exist in one place.
Reads run as the caller, never with `overrideAccess`; GM notes are gated by
field read access, and hidden rows are censored by an `afterRead` hook.

Includes the permission group, the `admin:faction-relation-entries:manage`
page gate, the integration spec, and the migration that creates the table and
its enums.
2026-11-18 14:13:20 -05:00
..
AGENTS.md docs(agents): split domain guidance into nested AGENTS.md files 2026-10-09 15:46:36 -04:00
briefingSqf.ts feat(intelligence): export mission briefings to SQF 2026-10-20 14:22:17 -04:00
briefingText.ts feat(missions): lexical rich text editing, side-op narrative fields, briefing updates 2026-09-14 15:37:12 -04:00
factionDiscovery.ts feat(intelligence): add undiscovered faction state with read masking 2026-11-18 09:19:57 -05:00
factionRelationLedger.ts feat(intelligence): add the faction relation ledger collection and score math 2026-11-18 14:13:20 -05:00
factionRelations.ts feat(intelligence): add the faction relation ledger collection and score math 2026-11-18 14:13:20 -05:00
fridayOpsNotice.ts fix(bot): compute Friday ops slot window in Eastern time, not server clock 2026-10-08 14:01:07 -04:00
fridayTime.ts fix(missions): default new main ops to the upcoming Saturday 2026-10-10 14:54:06 -04:00
imminentReminders.ts feat(missions): auto-start and auto-complete ops, plus side-op scheduling 2026-10-03 03:29:35 -04:00
missionColors.ts feat(intelligence): refresh mission presentation 2026-08-20 19:56:41 -04:00
missionLifecycle.ts feat(missions): auto-start and auto-complete ops, plus side-op scheduling 2026-10-03 03:29:35 -04:00
missionMap.ts feat(contributions): add crowdsourced XP reward system 2026-10-09 16:30:05 -04:00
missionReminder.ts feat(mission-reminder): count chain supervisors as rateable leaders 2026-11-02 10:00:07 -05:00
missionTime.ts feat(missions): role sign-ups with FCFS waitlist and rich-text role descriptions 2026-09-30 14:50:26 -04:00
readyReminders.ts feat(missions): auto-start and auto-complete ops, plus side-op scheduling 2026-10-03 03:29:35 -04:00
roleSignups.ts feat(missions): role sign-ups with FCFS waitlist and rich-text role descriptions 2026-09-30 14:50:26 -04:00
rollCall.ts feat(bot): add /rollcall to force-send or refresh a mission roll-call 2026-10-11 15:26:17 -04:00