Provider-neutral community intelligence for multiple Discord guilds or other community sources. It converts normalized, tenant-scoped events into per-source and cross-source recurring-question, pain/friction, response, moderation, stable-user journey, coaching, and weekly Kaizen projections.
The module is observation-only. Raw provider ingestion, credentials, storage, moderation actions, and LLM SDKs stay behind host-owned ports. Before optional external analysis, content is redacted and actors are pseudonymized. The analysis boundary accepts only EU-resident, training-disabled providers; an unavailable or non-compliant provider produces the deterministic local fallback.
Individual staff scorecards require community.staff-scorecards.read authority. Default projections are team-level and deliberately contain no leaderboard, rank, employment recommendation, or automated HR decision fields.
ts
import { CommunityIntelligenceService } from "@lssm-tech/module.community-intelligence";
const service = new CommunityIntelligenceService();
const projection = await service.analyze({
scope: {
tenantId: "tenant-1",
workspaceId: "workspace-1",
trustZone: "managed-community",
},
sources,
events,
identityLinks,
authority: { capabilities: [] },
window: { from: "2026-08-10T00:00:00.000Z", to: "2026-08-17T00:00:00.000Z" },
});
Hosts remain responsible for durable encrypted evidence, retention enforcement, row-level security, and resolving evidence references under authorization.
Discord analysis rules
@lssm-tech/module.community-intelligence/discord-analysis owns the pure Discord rules hosts apply to gateway payloads before persistence: actor-role classification (bot, then moderator, then staff role IDs), transient analysis drafts that keep only DefaultCommunityRedaction output, question and pain signals (COMMUNITY_PAIN_SIGNALS), and derived event kinds (staff.replied, moderation.action for auto-moderation and audit actions 20/22/24/72/73, moderation.reversed for action 23). The keyed actor pseudonymizer and its secret stay in the host.
@lssm-tech/module.community-intelligence/discord-intelligence-records builds the seven-day insight, staff-scorecard, portfolio-insight and Kaizen-digest records from redacted analysis events. All sources must share tenant, workspace and trust zone. Cross-source aggregates and the digest stay in the
staff zone only for staff sources; every other zone is downgraded to
portfolio. Hosts map the records to their own storage.
DefaultCommunityRedaction replaces mentions, URLs, emails, phone numbers, keyword-prefixed tokens and opaque 32+ character tokens.