---
name: algorithm-cultivation
description: Trains an X/Twitter account's algorithmic feed to surface niche-relevant content and positions the account as a thought leader. Includes browser scripts for manual operation and architecture for 24/7 LLM-powered autonomous agents. Use when a user wants to build up their algorithm, cultivate their feed for a niche, grow a fresh account, become a thought leader, or run automated engagement with AI-generated content.
license: MIT
metadata:
  author: nichxbt
  version: "1.0"
---

# Algorithm Cultivation & Thought Leadership

Train your X/Twitter algorithm for a specific niche. Two approaches: browser script (manual) or headless agent (24/7 autonomous with LLM).

## Quick reference

| Goal | Solution |
|------|----------|
| Train algorithm via browser console (standalone) | `scripts/thoughtLeaderCultivator.js` |
| Train algorithm via browser console (with core.js) | `src/automation/algorithmTrainer.js` |
| Understand how algorithm training works | `docs/research/algorithm-cultivation.md` |
| Run 24/7 with LLM intelligence | `docs/research/llm-powered-thought-leader.md` |
| Build prompts for the full agent system | `prompts/09-algorithm-cultivation-system.md` |

## Browser scripts

### Standalone: `scripts/thoughtLeaderCultivator.js`

Zero dependencies. Paste directly into DevTools console on x.com.

**Configure:**
- `YOUR_NICHE.searchTerms` — keywords for your target niche
- `YOUR_NICHE.comments` — reply templates (picked randomly)
- `YOUR_NICHE.influencers` — handles to prioritize engaging with
- `YOUR_PERSONA.mode` — `gentle` | `normal` | `active` | `grind`
- `TARGETS` — per-session and daily limits

**Controls:**
- `stopCultivator()` — stop after current action
- `cultivatorStatus()` — print current stats
- `cultivatorReset()` — clear all tracking data

### With core.js: `src/automation/algorithmTrainer.js`

Requires pasting `src/automation/core.js` first. More features: multi-niche rotation, intensity presets, cycle-based architecture, richer state tracking.

**Configure:**
- `NICHES.topics[]` — array of niches with search terms, comments, influencers
- `PERSONA.INTENSITY` — `chill` | `normal` | `active`
- `BEHAVIOR` — cycle duration, limits, timing, engagement probabilities

**Controls:**
- `stopTrainer()` — stop
- `trainerStatus()` — status report
- `trainerReset()` — clear data

## Training phases

Both scripts cycle through these phases with randomized order:

1. **Search Top** — search a niche term, scroll top results, engage
2. **Search Latest** — same term, latest tab (catch fresh content)
3. **Search People** — follow qualifying accounts in the niche
4. **Home Feed** — scroll and engage to reinforce algorithm learning
5. **Influencer Visit** — visit niche leaders' profiles with boosted engagement
6. **Own Profile** — visit own profile (active user signal)
7. **Explore** — browse trending topics (normalization behavior)
8. **Idle** — dwell period simulating human rest

## Algorithm signals (by weight)

| Signal | Weight | Generated by |
|--------|--------|-------------|
| Extended dwell (>2 min on thread) | 11.0x | Scroll + read pause |
| Profile click | 4.0x | Influencer / own profile visits |
| Reply / comment | 1.0-27.0x | Comment on posts |
| Bookmark | ~1.0x | Bookmark quality content |
| Like | 0.5x | Like niche posts |
| Follow | High (graph) | Follow niche accounts |
| Search | High (intent) | Search niche keywords |

## Phase model (fresh account → thought leader)

| Phase | Days | Focus |
|-------|------|-------|
| Seeding | 1-7 | Pure consumption. Search + scroll + like + follow. |
| Engagement | 8-30 | Replies, quote tweets, early engagement on viral posts. |
| Authority | 31-90 | Original threads, community building, Spaces. |
| Maintenance | 90+ | Consistency, content creation, community stewardship. |

## 24/7 LLM-powered operation

For autonomous 24/7 operation, see `docs/research/llm-powered-thought-leader.md`. Architecture:

- **Headless browser** (Puppeteer + stealth) for X.com interaction
- **LLM Brain** (tiered models) for content scoring, reply generation, original content creation
- **Circadian scheduler** with human-like variance (sleep hours, activity fluctuation)
- **Persistent database** for action logging, metrics, deduplication
- **Persona manager** ensuring consistent voice across all generated content

Estimated cost: $8-15/month (VPS + LLM API).

Build prompts: `prompts/09-algorithm-cultivation-system.md` — 14 detailed prompts covering all components.

## Research paper

Full technical deep dive: `docs/research/algorithm-cultivation.md`

Covers:
- X's recommendation algorithm internals (SimClusters, TwHIN, scoring formula)
- Signal taxonomy (4 tiers of trainable signals)
- Human behavior simulation techniques
- Detection avoidance strategies
- Metrics and measurement framework
- Ethical considerations
