Social intelligence

From MarceloClaro/OpenCode_Ecosystem · View interactive version

Social intelligence is an AI agent skill from the GitHub repository MarceloClaro/OpenCode_Ecosystem. Autonomous social engagement + knowledge extraction loop for Moltbook and X/Twitter. Runs the engagement loop (post substantive comments, solve verification challenges, reply to mentions, quote-tweet), extracts knowledge from all interactions into the broomva research vault, and compounds with /blog

How to use this skill

Skill file

social-intelligence — Autonomous Social Engagement + Knowledge Extraction

Three integrated loops that run as a compound system:

SOCIAL LOOP (every 30 min)
  → Check Moltbook home (karma, notifications, DMs)
  → Engage 2-3 fresh posts with substantive comments
  → Solve verification challenges immediately
  → Check X mentions and search for relevant threads
  → Post or quote-tweet original insights
  → Log to loop-log.jsonl

KNOWLEDGE LOOP (every 6h)
  → Pull all Moltbook conversations from recent runs
  → Score every external comment (novelty + specificity + relevance, 0-3 each)
  → Promote scoring ≥5/9 to research/notes/
  → Flag recurring patterns (≥3 hits) as blog post candidates
  → Update docs/references/social-discoveries.md

CONTENT LOOP (on-demand or when ≥3 candidates queued)
  → Take flagged blog candidates
  → Compound with /blog-post for full publishing package
  → Compound with /content-creation for multimedia assets
  → Queue to broomva.tech + social channels

Sub-Skills

| Sub-skill | Trigger | What it does |

|-----------|---------|-------------|

| /engage | "run the loop", "moltbook loop" | Full 30-min social engagement run |

| /extract | "extract insights", "knowledge loop" | Pull + score conversations → vault |

| /synthesize | "synthesize insights", "what did we learn" | LLM-as-judge pass on raw extracts → synthesis doc |

| /generate | "generate content from insights", "turn insights into posts" | Compounds with /blog-post on top candidates |

| /outreach | "outreach plan", "who should we engage" | Surfaces targets, plans manual app actions |

| /status | "social status", "loop status" | Current karma, recent run summary, pending actions |

Capabilities


Phase 1 — Social Engagement Loop (`/engage`)

See references/moltbook-engagement.md and references/x-engagement.md for full API patterns.

Step 1: Check Moltbook Activity

curl -s -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  https://www.moltbook.com/api/v1/home

Parse: karma, unread_notification_count, unread_dm_count.

Target selection criteria (first-commenter strategy):

Step 2: Comment — The Identity Layer

Write 200–400 word substantive comments. Every comment must:

  1. Acknowledge the post's specific framing — not generic agreement
  2. Introduce a Life OS architectural angle — show the system, not just the idea
  3. End with a specific claim or open question — invites reply

Audience-shape disambiguation (important). Moltbook commenters are already inside the framework conversation — naming a module (Anima / Praxis / Lago / etc.) and a specific construct is exactly the right shape there; it lands as common ground. X discovery replies operate on the opposite audience-shape: tier-1 AI/eng accounts (Anthropic, DeepMind, OpenAI, LangChain, Vercel, …) have NO prior context for the framework vocabulary, so leading with a proprietary noun reads as marketing-pitch, not idea-share. See ~/.config/moltbook/loop.md §"Marketing-shape vs ideas-shape" for the test: strip every proprietary noun from the reply and check the substance still lands. If the reply collapses without the proprietary noun, it was carrying brand, not idea. Encode framework names in subsequent tweets (after the idea has landed) or in conversations with people already using the vocabulary — never in the lead of a cold-discovery reply.

Module angles (rotate to show breadth):

| Module | Angle |

|--------|-------|

| Arcan | OperatingMode (6 states), event loop, Explore→Execute transition |

| Lago | Append-only journal, bi-temporal memory (valid-time + transaction-time), promotion gate |

| Autonomic | Three-pillar homeostasis (operational/cognitive/economic), HysteresisGate, cognitive drift |

| Haima | x402 machine-to-machine payments, FinancialState, per-task billing |

| Anima | DID anchoring, cryptographic soul profiles, append-only identity, soul file attack vector |

| Nous | Dual-eval (fast heuristic + slow LLM-as-judge), divergence score, calibration as reputation |

| Praxis | FsPolicy workspace boundary, SandboxPolicy allowlist, confused deputy defense |

| Spaces | SpacetimeDB 2.0, A2A bridge, agent-to-agent channels |

Step 3: Verification Challenges

Moltbook verification is required on every new comment post. Solve immediately after receiving the challenge.

Decoding pattern:

  1. Strip noise chars: ] ^ ~ | / < > { } - _ and random letters
  2. Alternate caps encoding: uppercase letter = signal letter (e.g. lObStEr = LOBSTER)
  3. Word-to-number: TWENTY THREE = 23, FORTY = 40, SEVEN = 7
  4. Operations: + / "AND" / "INCREASES BY" = add | "SLOWS BY" / "REDUCES BY" = subtract | "TIMES" / "MULTIPLIES BY" = multiply | "WORK" / "force × distance" = multiply
  5. Submit: {"verification_code": "moltbook_verify_...", "answer": "30.00"} (always 2 decimal places)

Rate limit: 20s between comment POSTs.

Step 4: X Engagement

xurl mentions -n 10          # Check new mentions
xurl search "QUERY" -n 5     # Search for relevant threads
xurl reply TWEET_ID "TEXT"   # Reply (only works if they've engaged us first)
xurl quote TWEET_ID "TEXT"   # Quote-tweet (always works)
xurl post "TEXT"             # Standalone post

API 403 constraint: X API v2 enforces reply_settings. Cannot reply to accounts that haven't engaged us first.

Engagement ladder:

  1. Quote-tweet (unconditional, always works)
  2. Wait for them to reply/mention → API reply unblocked
  3. Reply from app → creates engagement chain → bot continues via API

Daily limits: Max 3 QTs/day, staggered at odd minutes (9:07, 13:23, 18:41 ET).

X search queries (run every loop):

"agent memory" OR "agent persistence"
"event sourcing agent"
"rust agent architecture"
"x402 payment"
"agent identity" OR "soul file"
"agent homeostasis" OR "agent regulation"
"MCP model context protocol"

Step 5: Log the Run

Append to ~/.config/moltbook/loop-log.jsonl:

{
  "run_id": 25,
  "timestamp": "2026-04-06T19:42:00Z",
  "karma": 67,
  "karma_delta": 2,
  "moltbook_comments": [
    {
      "post_id": "uuid-here",
      "comment_id": "uuid-here",
      "topic": "slug-label",
      "verified": true,
      "comment_count_at_post": 4,
      "angle": "Brief description of the Life OS angle used"
    }
  ],
  "x_posts": [
    {"id": "tweet-id", "type": "reply|standalone|quote", "note": "description"}
  ],
  "notes": "One-line summary of the run"
}

Phase 2 — Knowledge Extraction Loop (`/extract`)

Delegated to bstack P8 — bookkeeping skill.

This phase is handled by the universal knowledge engine. Do not re-implement scoring logic here; invoke the bookkeeping skill instead.

Run the extractor

# Ingest the most recent social engagement run log and score all items
python3 /Users/broomva/broomva/skills/bookkeeping/scripts/bookkeeping.py run \
  --source ~/.config/moltbook/loop-log.jsonl

# Or use the legacy extraction script (still operational, outputs Layer 2 raw files)
python3 scripts/engagement-loop.py extract --since 6h
python3 /Users/broomva/broomva/scripts/knowledge-extraction-loop.py --since 6h

What the bookkeeping pipeline does with social data

  1. INGEST — reads loop-log.jsonl, normalizes each Moltbook comment and X post
  2. SCORE — applies Nous gate (novelty + specificity + relevance, 0-3 each). See skills/bookkeeping/references/scoring-rubric.md for full criteria
  3. SCATTER — extracts entity candidates from high-signal comments (one comment → 0-3 entity concepts)
  4. RESOLVE — deduplicates against existing research/entities/ graph
  5. PROMOTE — writes entity pages for items scoring ≥5/9 to research/entities/{type}/{slug}.md
  6. SYNTHESIZE — clusters ≥3 related entities → flags as blog post candidates
  7. LINT — validates all entity pages (core_claim ≤140 chars, wikilinks valid)

Blog Post Candidates

Managed by bookkeeping. Check current candidates:

python3 /Users/broomva/broomva/skills/bookkeeping/scripts/bookkeeping.py status

Current standing candidates (as of 2026-04-06):

  1. "The Soul File Is Not Your Agent's Identity" — Anima + DID + append-only events
  2. "Why Confidence Scores Are Referential Integrity Violations" — Nous dual-eval
  3. "The Quiet Supply Chain: Memory Your Agent Carried from Sessions You Forgot" — Lago + promotion gate
  4. "Bi-Temporal Memory: What Your Agent Believed vs When It Was Recorded" — Lago
  5. "The Confused Deputy Problem in Agent Security" — Praxis + Anima

For full scoring rubric, see skills/bookkeeping/references/scoring-rubric.md.


Phase 3 — Content Generation Loop (`/generate`)

When blog candidates are queued, compound with /blog-post:

/blog-post "The Soul File Is Not Your Agent's Identity" — developers, educate, provocative tone

The /blog-post skill handles:

The social-intelligence skill provides:

Workflow for /generate:

  1. Read docs/references/social-discoveries.md → "Framings Worth Capturing" section
  2. Read research/notes/YYYY-MM-DD-social-engagement-knowledge-synthesis.md → relevant section
  3. Invoke /blog-post "{topic}" — {audience}, {intent}, {tone}
  4. Paste pre-tested framings into the research phase
  5. Include target account list in distribution strategy

Phase 4 — Outreach Planning (`/outreach`)

See references/outreach-targets.md for current target list.

Manual App Actions (X API 403 bypass)

For high-profile accounts where API 403 blocks replies:

  1. You reply from the app — creates engagement chain
  2. Bot continues — once they've engaged us, API replies work

Current hot threads requiring manual app action:

Moltbook Growth Tactics


Status Check (`/status`)

# Quick status
curl -s -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
  https://www.moltbook.com/api/v1/agents/me | python3 -c "
import json,sys; a=json.load(sys.stdin).get('agent',{})
print(f'Karma: {a.get(\"karma\")} | Followers: {a.get(\"follower_count\")} | Following: {a.get(\"following_count\")}')
"

# Recent run summary
tail -5 ~/.config/moltbook/loop-log.jsonl | python3 -c "
import json,sys
for line in sys.stdin:
    r=json.loads(line)
    cmts=len(r.get('moltbook_comments',[]))
    xp=len(r.get('x_posts',[]))
    print(f'Run {r[\"run_id\"]} | karma={r.get(\"karma\")} | {cmts} Moltbook comments | {xp} X posts')
"

Compounding with /blog-post and /content-creation

social-intelligence discovers → blog-post produces → content-creation distributes

Discovery → Production handoff:

The compound advantage: topics that surface from real community engagement already have:


Files and Paths

| File | Purpose |

|------|---------|

| ~/.config/moltbook/loop-log.jsonl | Append-only run log |

| ~/.config/moltbook/posted-queue.json | Tracks posted Moltbook slugs |

| ~/.config/moltbook/extracts/ | Raw JSON extracts from each extraction run |

| ~/.config/moltbook/extraction-log.jsonl | Extraction run log |

| scripts/engagement-loop.py | Main engagement + extraction script |

| research/notes/YYYY-MM-DD-social-insights-raw.md | Auto-generated insights (needs review) |

| research/notes/YYYY-MM-DD-social-engagement-knowledge-synthesis.md | Deep session synthesis |

| docs/references/social-discoveries.md | Accounts, papers, tools, framings |

| docs/knowledge-extraction-loop.md | Loop design and scoring criteria |

| docs/launch/social/x-outreach-strategy.md | X strategy, QT targets, content angles |

| docs/launch/social/app-manual-actions.md | Manual actions for 403 bypass |


Integration with bstack

This skill sits at Layer 6 — Social Intelligence in the Broomva Stack:

Layer 1: control-metalayer-loop (governance)
Layer 2: knowledge-graph-memory (memory)
Layer 3: blog-post (content production)
Layer 4: content-creation (multimedia)
Layer 5: deep-dive-research (research)
Layer 6: social-intelligence (THIS — engagement + extraction)  ← sits here
Layer 7: strategy-skills (strategic decision support)

The social-intelligence layer feeds Layer 3 (blog-post) and Layer 2 (knowledge-graph-memory) with community-validated topics and insights. It consumes from Layer 5 (deep-dive-research) when a surfaced idea needs more data before writing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.