Gift-Informed Community Health Agent — Design Spec
Date: 2026-04-04 Sub-project: B of 3
Overview
Extend the Community Health Agent with gift-economy community monitoring. Online communities are gift economies — members give attention, knowledge, support, and creative work. Healthy communities have high gift circulation. Unhealthy ones have stagnant pools or extractive patterns.
This builds on Sub-project A’s primitives (gratitude signals, generosity scoring, knowledge markers, circulation metrics) and the existing Community Health Agent prototype (Discord adapter, moderation + onboarding workflows, 3 agent templates).
What’s Being Added
1. Community Gift Flow Tracking
New workflow: Gift Flow Analysis — runs periodically to analyze community contribution patterns.
Nodes:
- scan_recent_messages — pull recent Discord message signals, categorize by contribution type (question, answer, resource share, discussion, off-topic)
- compute_gift_flow — for each member, compute: contributions given (messages that got replies/reactions), contributions received (replies to their messages), gift ratio (given/received)
- detect_patterns — identify: top contributors, lurkers (consume but don’t contribute), dominators (high volume, low reciprocation), healthy circulators (balanced give/receive)
- place_markers — place stigmergy markers for detected patterns: knowledge.pattern for community insights, quality.verified for healthy patterns, danger.untrusted for concerning patterns
- generate_report — produce a community gift flow health report
2. New Discord Signal Types
Extend the Discord adapter’s signal mappings to emit richer signals that capture gift-economy dimensions:
discord.help_given— when a message is a reply to a question (detected by context: original was a question, reply provides information)discord.resource_shared— when a message contains links, code blocks, or file attachmentsdiscord.gratitude_expressed— when a message contains thank-you patterns or gratitude reactions
These are derived signals — the adapter detects them from message_created events by analyzing content patterns.
3. Threshold Support for New Members
Extend the existing onboarding workflow with gift-economy awareness:
- After
welcome_message, add athreshold_giftnode that packages relevant community context for the new member (active topics, recent helpful threads, who to ask for what) - After
check_24h, if the member’s first message is a contribution (question or resource), emit acoord.gratitudesignal amplifying their entry into the gift cycle
4. Community Generosity Scoring
Track per-member generosity using stigmergy markers:
- When a member helps another (reply to question, resource share), place a
quality.highmarker with their user ID in payload - When a member only consumes (reads but never posts, or posts only self-promotional content), place a
quality.lowmarker - The Analyst agent aggregates these markers into a community-level gift health score
5. Hoarding Detection for Communities
New condition in the moderation workflow: detect members who dominate conversations (>30% of messages in a channel) without reciprocating (low reply-to-others ratio). This isn’t a ban-worthy offense — it’s a health signal that the community’s gift cycle is imbalanced.
- Emit
stress.context_hoardingat the community level when detected - Surface in the Loom dashboard via existing GiftEconomySummary component
Packages Touched
| Package | Changes |
|---|---|
| integrations | New derived Discord signal types, threshold gift node logic |
| core | New community gift signal type constants (optional, by convention) |
| integration tests | New gift-flow community health tests |
What’s NOT Changing
- No changes to the Stigmergy, Immune, Hypha, or Genesis packages — Sub-project A already provides the primitives
- No changes to the Discord adapter’s core architecture — just extending signal mappings
- No changes to the executor’s action types — gift flow is observational, not action-oriented
- The existing moderation and onboarding workflows remain unchanged — new workflow is additive
Testing Strategy
Extend the community health integration tests with: 1. Gift flow analysis workflow executes and produces markers 2. Threshold support sends context to new members 3. Help-given signal fires when reply pattern detected 4. Community-level hoarding detection fires on imbalanced participation