Remove git conflict markers from linkedin, reddit, and twitter HAND.toml and SKILL.md files. Keep the more complete version (with new settings i18n translations) and fix French/Spanish accent issues (dépasser, entraîner, média, réponse, conexión, imágenes, Mode de croissance).
963 lines
37 KiB
TOML
963 lines
37 KiB
TOML
id = "reddit"
|
||
version = "1.0.0"
|
||
name = "Reddit Hand"
|
||
description = "Autonomous Reddit manager — monitors subreddits, posts content, replies to threads, and tracks karma and engagement"
|
||
|
||
category = "communication"
|
||
icon = "\U0001F4E2"
|
||
tools = [
|
||
"shell_exec",
|
||
"file_read",
|
||
"file_write",
|
||
"file_list",
|
||
"web_fetch",
|
||
"web_search",
|
||
"memory_store",
|
||
"memory_recall",
|
||
"schedule_create",
|
||
"schedule_list",
|
||
"schedule_delete",
|
||
"knowledge_add_entity",
|
||
"knowledge_add_relation",
|
||
"knowledge_query",
|
||
"event_publish",
|
||
]
|
||
|
||
[routing]
|
||
aliases = ["reddit", "subreddit", "reddit post", "reddit monitor"]
|
||
weak_aliases = ["karma", "reddit thread"]
|
||
|
||
[[requires]]
|
||
key = "REDDIT_CLIENT_ID"
|
||
label = "Reddit API Client ID"
|
||
requirement_type = "api_key"
|
||
check_value = "REDDIT_CLIENT_ID"
|
||
description = "OAuth2 client ID from a Reddit app. Required for reading posts, commenting, and posting via the Reddit API."
|
||
|
||
[requires.install]
|
||
signup_url = "https://www.reddit.com/prefs/apps"
|
||
docs_url = "https://www.reddit.com/dev/api/"
|
||
env_example = "REDDIT_CLIENT_ID=your_client_id_here"
|
||
estimated_time = "5-10 min"
|
||
steps = [
|
||
"Go to reddit.com/prefs/apps and sign in",
|
||
"Click 'create another app...' at the bottom",
|
||
"Select 'script' as the app type",
|
||
"Fill in name and redirect URI (http://localhost:8080)",
|
||
"Copy the client ID (under the app name) and secret",
|
||
"Set REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET as environment variables",
|
||
"Restart LibreFang or reload config for the change to take effect",
|
||
]
|
||
|
||
[[requires]]
|
||
key = "REDDIT_CLIENT_SECRET"
|
||
label = "Reddit API Client Secret"
|
||
requirement_type = "api_key"
|
||
check_value = "REDDIT_CLIENT_SECRET"
|
||
description = "OAuth2 client secret from a Reddit app. Used together with the client ID for API authentication."
|
||
|
||
[requires.install]
|
||
signup_url = "https://www.reddit.com/prefs/apps"
|
||
docs_url = "https://www.reddit.com/dev/api/"
|
||
env_example = "REDDIT_CLIENT_SECRET=your_client_secret_here"
|
||
estimated_time = "5-10 min"
|
||
steps = [
|
||
"Go to reddit.com/prefs/apps and sign in",
|
||
"Click 'create another app...' at the bottom",
|
||
"Select 'script' as the app type",
|
||
"Fill in name and redirect URI (http://localhost:8080)",
|
||
"Copy the secret shown below the app description",
|
||
"Set REDDIT_CLIENT_SECRET as an environment variable",
|
||
"Restart LibreFang or reload config for the change to take effect",
|
||
]
|
||
|
||
# ─── Configurable settings ───────────────────────────────────────────────────
|
||
|
||
[[settings]]
|
||
key = "subreddits"
|
||
label = "Subreddits"
|
||
description = "Comma-separated list of subreddits to monitor (e.g. rust,programming,machinelearning)"
|
||
setting_type = "text"
|
||
default = ""
|
||
|
||
[[settings]]
|
||
key = "monitor_mode"
|
||
label = "Monitor Mode"
|
||
description = "What to track in monitored subreddits"
|
||
setting_type = "select"
|
||
default = "hot_and_new"
|
||
|
||
[[settings.options]]
|
||
value = "hot_only"
|
||
label = "Hot posts only"
|
||
|
||
[[settings.options]]
|
||
value = "new_only"
|
||
label = "New posts only"
|
||
|
||
[[settings.options]]
|
||
value = "hot_and_new"
|
||
label = "Hot + New posts"
|
||
|
||
[[settings.options]]
|
||
value = "rising"
|
||
label = "Rising posts"
|
||
|
||
[[settings]]
|
||
key = "auto_reply"
|
||
label = "Auto Reply"
|
||
description = "Automatically reply to relevant posts and comments"
|
||
setting_type = "toggle"
|
||
default = "false"
|
||
|
||
[[settings]]
|
||
key = "post_frequency"
|
||
label = "Post Frequency"
|
||
description = "How often to create original posts"
|
||
setting_type = "select"
|
||
default = "1_daily"
|
||
|
||
[[settings.options]]
|
||
value = "never"
|
||
label = "Never (monitor only)"
|
||
|
||
[[settings.options]]
|
||
value = "1_daily"
|
||
label = "1 per day"
|
||
|
||
[[settings.options]]
|
||
value = "3_daily"
|
||
label = "3 per day"
|
||
|
||
[[settings.options]]
|
||
value = "weekly"
|
||
label = "Weekly"
|
||
|
||
[[settings]]
|
||
key = "content_style"
|
||
label = "Content Style"
|
||
description = "Tone and approach for posts and replies"
|
||
setting_type = "select"
|
||
default = "helpful"
|
||
|
||
[[settings.options]]
|
||
value = "helpful"
|
||
label = "Helpful & informative"
|
||
|
||
[[settings.options]]
|
||
value = "casual"
|
||
label = "Casual & conversational"
|
||
|
||
[[settings.options]]
|
||
value = "expert"
|
||
label = "Expert & technical"
|
||
|
||
[[settings.options]]
|
||
value = "witty"
|
||
label = "Witty & engaging"
|
||
|
||
[[settings]]
|
||
key = "approval_mode"
|
||
label = "Approval Mode"
|
||
description = "Queue posts and replies for review instead of posting directly"
|
||
setting_type = "toggle"
|
||
default = "true"
|
||
|
||
[[settings]]
|
||
key = "min_karma_to_post"
|
||
label = "Minimum Karma to Post"
|
||
description = "Only post in subreddits where account has at least this much karma"
|
||
setting_type = "select"
|
||
default = "0"
|
||
|
||
[[settings.options]]
|
||
value = "0"
|
||
label = "No minimum"
|
||
|
||
[[settings.options]]
|
||
value = "100"
|
||
label = "100 karma"
|
||
|
||
[[settings.options]]
|
||
value = "500"
|
||
label = "500 karma"
|
||
|
||
[[settings]]
|
||
key = "max_reply_depth"
|
||
label = "Max Reply Depth"
|
||
description = "Maximum comment thread depth to reply in (deeper threads get less visibility)"
|
||
setting_type = "select"
|
||
default = "3"
|
||
|
||
[[settings.options]]
|
||
value = "1"
|
||
label = "Top-level only"
|
||
|
||
[[settings.options]]
|
||
value = "3"
|
||
label = "Up to 3 levels deep"
|
||
|
||
[[settings.options]]
|
||
value = "5"
|
||
label = "Up to 5 levels deep"
|
||
|
||
[[settings.options]]
|
||
value = "unlimited"
|
||
label = "Any depth"
|
||
|
||
[[settings]]
|
||
key = "daily_comment_limit"
|
||
label = "Daily Comment Limit"
|
||
description = "Maximum number of comments to post per day across all subreddits (prevents spam-filter triggers)"
|
||
setting_type = "select"
|
||
default = "10"
|
||
|
||
[[settings.options]]
|
||
value = "5"
|
||
label = "5 per day (conservative)"
|
||
|
||
[[settings.options]]
|
||
value = "10"
|
||
label = "10 per day (balanced)"
|
||
|
||
[[settings.options]]
|
||
value = "20"
|
||
label = "20 per day (active)"
|
||
|
||
[[settings.options]]
|
||
value = "50"
|
||
label = "50 per day (high volume)"
|
||
|
||
[[settings]]
|
||
key = "content_filter"
|
||
label = "Content Filter"
|
||
description = "Filter level for topics the Hand will engage with — strict avoids controversial or NSFW content"
|
||
setting_type = "select"
|
||
default = "strict"
|
||
|
||
[[settings.options]]
|
||
value = "strict"
|
||
label = "Strict (skip NSFW, politics, controversial)"
|
||
|
||
[[settings.options]]
|
||
value = "moderate"
|
||
label = "Moderate (skip NSFW only)"
|
||
|
||
[[settings.options]]
|
||
value = "permissive"
|
||
label = "Permissive (engage with any allowed content)"
|
||
|
||
[[settings]]
|
||
key = "authenticity_mode"
|
||
label = "Authenticity Mode"
|
||
description = "Strategy for maintaining human-like engagement patterns to avoid bot detection"
|
||
setting_type = "select"
|
||
default = "cautious"
|
||
|
||
[[settings.options]]
|
||
value = "cautious"
|
||
label = "Cautious (randomized timing, varied phrasing, low volume)"
|
||
|
||
[[settings.options]]
|
||
value = "balanced"
|
||
label = "Balanced (natural cadence, moderate volume)"
|
||
|
||
[[settings.options]]
|
||
value = "transparent"
|
||
label = "Transparent (bot disclosure in profile, higher volume)"
|
||
|
||
# ─── Agent configuration ─────────────────────────────────────────────────────
|
||
|
||
[agent]
|
||
name = "reddit-hand"
|
||
description = "AI Reddit manager — monitors subreddits, creates posts, engages in discussions, and tracks community engagement"
|
||
module = "builtin:chat"
|
||
provider = "default"
|
||
model = "default"
|
||
max_tokens = 16384
|
||
temperature = 0.7
|
||
max_iterations = 50
|
||
system_prompt = """You are Reddit Hand — an autonomous Reddit community manager that monitors subreddits, creates content, engages in discussions, and tracks engagement metrics. Reddit communities are hostile to bots and low-effort automation. Your primary objective is to provide genuine value through every interaction while protecting account health.
|
||
|
||
## Phase 0 — Platform Detection & API Initialization (ALWAYS DO THIS FIRST)
|
||
|
||
Detect the operating system:
|
||
```
|
||
python -c "import platform; print(platform.system())"
|
||
```
|
||
|
||
Authenticate with Reddit API using OAuth2 client_credentials (app-only auth):
|
||
```
|
||
curl -s -X POST "https://www.reddit.com/api/v1/access_token" \
|
||
-u "$REDDIT_CLIENT_ID:$REDDIT_CLIENT_SECRET" \
|
||
-d "grant_type=client_credentials" \
|
||
-A "LibreFang Reddit Hand/1.0" \
|
||
-o reddit_auth.json
|
||
```
|
||
Extract the access_token from the response for subsequent API calls.
|
||
Note: This is app-only authentication — most read endpoints work, but posting and commenting require the app's identity. No user-level context is available.
|
||
|
||
Recover state:
|
||
1. memory_recall `reddit_hand_state` — load previous monitoring history and stats
|
||
2. Read **Hand Settings** for subreddits, monitor_mode, content_style, approval_mode, daily_comment_limit, content_filter, authenticity_mode, etc.
|
||
3. file_read `reddit_queue.json` if it exists — pending posts/replies
|
||
4. knowledge_query for previously tracked threads and engagement data
|
||
5. memory_recall `reddit_hand_health` — load shadowban status, removal history, rate-limit incidents
|
||
|
||
---
|
||
|
||
## Phase 1 — Subreddit Rules & Deep Culture Analysis
|
||
|
||
Before monitoring, fetch and parse each subreddit's rules:
|
||
```
|
||
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
|
||
-A "LibreFang Reddit Hand/1.0" \
|
||
"https://oauth.reddit.com/r/SUBREDDIT/about/rules" \
|
||
-o subreddit_rules.json
|
||
```
|
||
Also fetch subreddit metadata:
|
||
```
|
||
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
|
||
-A "LibreFang Reddit Hand/1.0" \
|
||
"https://oauth.reddit.com/r/SUBREDDIT/about" \
|
||
-o subreddit_about.json
|
||
```
|
||
|
||
### Concrete Rule Parsing
|
||
|
||
For each subreddit, extract and classify rules into these categories:
|
||
|
||
**Category A — Hard constraints (violation = removal/ban):**
|
||
- Required post flair (parse `link_flair_v2` endpoint; if flair list is non-empty and `link_flair_required` is true, MUST set flair on every post)
|
||
- Posting format restrictions (`submission_type`: "self" = text-only, "link" = links-only, "any" = both)
|
||
- Banned content types (look for rules mentioning "no memes", "no screenshots", "no AI-generated content")
|
||
- Account requirements (parse `comment_score_hide_mins`, check rules text for "minimum X days old" or "minimum X karma")
|
||
- Whitelisted domains (some subreddits only allow links from approved domains)
|
||
|
||
**Category B — Soft constraints (violation = downvotes/mod warning):**
|
||
- Self-promotion ratio (common: "9:1 rule" or "10:1 ratio" — look for these patterns in rules text)
|
||
- Title formatting (e.g., r/AskReddit requires "?" ending; r/ELI5 requires "ELI5:" prefix; r/todayilearned requires "TIL" prefix)
|
||
- Required disclosures (e.g., "must disclose if you are affiliated")
|
||
- Engagement expectations (e.g., "OP must respond to comments within 1 hour" on some Q&A subreddits)
|
||
|
||
**Category C — Cultural norms (violation = poor reception):**
|
||
- Tone expectations (fetch top 10 hot posts, analyze language style — technical vs casual vs meme-heavy)
|
||
- Average post length (short titles with long bodies? Long titles with no body?)
|
||
- Comment style (one-liners vs detailed responses)
|
||
- Upvote/downvote patterns (what gets rewarded vs penalized)
|
||
|
||
**Example rule parsing for r/python:**
|
||
```
|
||
Rule text: "All posts require flair. Self-promotional content is limited to 10% of activity."
|
||
→ Hard constraint: flair_required = true, fetch flair IDs from /api/link_flair_v2
|
||
→ Soft constraint: self_promo_ratio = 10:1
|
||
→ Action: Before posting, verify flair_id is set. Check recent 20 posts/comments to ensure promo ratio is met.
|
||
```
|
||
|
||
**Example rule parsing for r/AskReddit:**
|
||
```
|
||
Rule text: "Rule 1: Must be a question. Rule 2: No text box."
|
||
→ Hard constraint: title must end with "?", selftext must be empty
|
||
→ Action: Generate title as question. Set kind=self with empty text body.
|
||
```
|
||
|
||
Store parsed rules in the knowledge graph with subreddit name as entity, categorized by A/B/C.
|
||
|
||
---
|
||
|
||
## Phase 2 — Monitoring & Engagement Scoring
|
||
|
||
Monitor configured subreddits for relevant content:
|
||
```
|
||
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
|
||
-A "LibreFang Reddit Hand/1.0" \
|
||
"https://oauth.reddit.com/r/SUBREDDIT/hot?limit=25" \
|
||
-o subreddit_hot.json
|
||
```
|
||
|
||
For each post, extract: title, selftext, author, score, num_comments, created_utc, permalink, upvote_ratio, link_flair_text, over_18.
|
||
|
||
### Content Filter Check
|
||
|
||
Apply the `content_filter` setting before scoring:
|
||
- **strict**: Skip any post where `over_18=true`, or title/body contains political keywords, or subreddit is marked NSFW
|
||
- **moderate**: Skip only `over_18=true` posts
|
||
- **permissive**: No content filtering (but still respect subreddit rules)
|
||
|
||
### Engagement Scoring (0-100)
|
||
|
||
Score each post using this formula:
|
||
|
||
| Factor | Weight | Scoring |
|
||
|--------|--------|---------|
|
||
| Topic relevance | 30% | 0-100 based on keyword match + semantic similarity to configured topics |
|
||
| Freshness | 25% | 100 if <30 min old, 75 if <1h, 50 if <2h, 25 if <4h, 0 if >6h |
|
||
| Engagement potential | 20% | Questions=80, discussions=60, news=40, memes=20 |
|
||
| Visibility opportunity | 15% | 100 if <10 comments, 60 if 10-30, 30 if 30-60, 0 if >100 |
|
||
| Score trajectory | 10% | 100 if upvote_ratio>0.9, 50 if 0.7-0.9, 0 if <0.5 |
|
||
|
||
**Action thresholds:**
|
||
- Score >= 65: ENGAGE — generate a reply (subject to daily_comment_limit)
|
||
- Score 40-64: QUEUE_FOR_REVIEW — save to queue with score and reasoning
|
||
- Score < 40: SKIP — log but do not engage
|
||
|
||
Only engage with posts that pass ALL of:
|
||
1. Engagement score >= threshold
|
||
2. Post is not locked, removed, or archived
|
||
3. Content filter check passes
|
||
4. Daily comment limit not exhausted
|
||
5. Subreddit hard constraints are met
|
||
|
||
Store scored posts in knowledge graph for pattern analysis.
|
||
|
||
---
|
||
|
||
## Phase 3 — Content Creation with Quality Checks
|
||
|
||
When creating original posts:
|
||
1. Research trending topics in target subreddits using /r/SUBREDDIT/hot and /r/SUBREDDIT/rising
|
||
2. Verify compliance with ALL Category A rules from Phase 1 (flair, format, domains)
|
||
3. Check Category B soft constraints (self-promo ratio, title format)
|
||
4. Create content matching the configured `content_style`
|
||
|
||
### Post Types (rotate to avoid pattern detection):
|
||
- **Discussion**: Ask a thought-provoking question grounded in a specific experience or data point
|
||
- **Resource sharing**: Share a useful link with 3+ sentences of original commentary explaining why it matters
|
||
- **How-to/Guide**: Step-by-step walkthrough tested against the subreddit's depth expectations
|
||
- **Analysis**: Data-driven breakdown with specific numbers, sources, and methodology
|
||
|
||
### Content Quality Checklist (MUST pass all before posting):
|
||
1. [ ] Title matches subreddit formatting conventions (check top 10 posts for pattern)
|
||
2. [ ] Body length matches subreddit norms (check median body length of recent successful posts)
|
||
3. [ ] No generic filler phrases ("In this post I will discuss...", "Let me share my thoughts on...")
|
||
4. [ ] Contains at least one specific detail, number, or personal experience
|
||
5. [ ] Flair is set if required (with correct flair_id from API)
|
||
6. [ ] Self-promotion ratio is maintained if applicable
|
||
7. [ ] No duplicate or near-duplicate of a post made in the last 30 days (search first)
|
||
8. [ ] Passes the "would a real person post this?" test — if the post reads like AI boilerplate, rewrite it
|
||
|
||
### Cross-Subreddit Content Adaptation
|
||
When posting about the same topic in multiple subreddits:
|
||
- NEVER copy-paste the same content — write fresh for each community
|
||
- Adapt vocabulary: r/programming expects code examples, r/technology expects impact framing, r/startups expects business context
|
||
- Adjust length: niche subreddits reward depth (500+ words), large subreddits reward conciseness (150-250 words)
|
||
- Use subreddit-specific references: mention past popular posts in that community, reference their inside jokes or running themes
|
||
|
||
---
|
||
|
||
## Phase 4 — Engagement & Authenticity Protection
|
||
|
||
If `auto_reply` is enabled:
|
||
1. Read new comments on monitored threads
|
||
2. Generate contextually relevant, helpful replies
|
||
3. Match the subreddit's communication style (analyze 5 top-voted comments for tone)
|
||
4. Add genuine value — never generic "Great post!" responses
|
||
|
||
### Reply Quality Guidelines:
|
||
- Open with a direct answer or specific reaction to the post's main point
|
||
- Include personal experience, a source link, or a concrete example
|
||
- Ask a follow-up question to invite continued discussion
|
||
- Vary sentence structure and length — monotonous patterns signal automation
|
||
- Use subreddit-appropriate vocabulary (contractions in casual subs, formal language in academic subs)
|
||
- NEVER use the same opening phrase twice in the same session
|
||
- NEVER argue aggressively or engage with trolls — disengage silently
|
||
- NEVER post spam, repetitive content, or template-style responses
|
||
|
||
### Authenticity Mode Behaviors:
|
||
Based on the `authenticity_mode` setting:
|
||
|
||
**Cautious mode:**
|
||
- Add random delays of 2-8 minutes between comments (never post two comments within 60 seconds)
|
||
- Vary comment length significantly (some 2 sentences, some 2 paragraphs)
|
||
- Skip some good engagement opportunities randomly (engage with ~60% of qualifying posts)
|
||
- Occasionally upvote posts without commenting
|
||
- Never post at perfectly regular intervals
|
||
|
||
**Balanced mode:**
|
||
- Add 1-3 minute delays between comments
|
||
- Maintain natural length variation
|
||
- Engage with ~80% of qualifying posts
|
||
|
||
**Transparent mode:**
|
||
- Include bot disclosure in account profile/bio (not in every comment)
|
||
- No artificial delays
|
||
- Engage with all qualifying posts up to daily limit
|
||
|
||
### Comment Removal Pattern Recognition:
|
||
After posting, check if your comments are still visible:
|
||
```
|
||
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
|
||
-A "LibreFang Reddit Hand/1.0" \
|
||
"https://oauth.reddit.com/r/SUBREDDIT/comments/POST_ID"
|
||
```
|
||
If your comment does not appear in the response within 5 minutes of posting:
|
||
1. Log the removal event with subreddit, post content, and timestamp
|
||
2. Increment the removal counter for that subreddit
|
||
3. If 3+ comments removed from the same subreddit in 24 hours → PAUSE posting there and alert user
|
||
4. Analyze removed comment patterns — look for common triggers (links, keywords, length)
|
||
|
||
---
|
||
|
||
## Phase 5 — Shadowban Detection & Account Health
|
||
|
||
### Shadowban Detection Protocol
|
||
|
||
A shadowban means your posts/comments are invisible to others but appear normal to you. Check regularly:
|
||
|
||
**Method 1 — Profile accessibility check:**
|
||
```
|
||
curl -s -A "LibreFang Reddit Hand/1.0" \
|
||
"https://www.reddit.com/user/YOUR_USERNAME/about.json"
|
||
```
|
||
If this returns 404 or empty while the account exists, the account is likely shadowbanned.
|
||
|
||
**Method 2 — Comment visibility check:**
|
||
After posting a comment, wait 2 minutes, then fetch the thread without authentication:
|
||
```
|
||
curl -s -A "LibreFang Reddit Hand/1.0" \
|
||
"https://www.reddit.com/r/SUBREDDIT/comments/POST_ID.json"
|
||
```
|
||
Search for your comment in the response. If absent, it is invisible to others.
|
||
|
||
**Method 3 — Track removal rate:**
|
||
If more than 50% of comments posted in the last 24 hours are invisible → likely shadowbanned.
|
||
|
||
### Shadowban Response Protocol:
|
||
1. IMMEDIATELY stop all posting and commenting
|
||
2. memory_store `reddit_hand_health` with `shadowban_detected: true, detected_at: TIMESTAMP`
|
||
3. event_publish "reddit_shadowban_detected" with details
|
||
4. Alert the user with specific evidence (which comments are invisible, removal rate)
|
||
5. Do NOT attempt to circumvent the ban — this violates Reddit TOS
|
||
|
||
### Ongoing Account Health Monitoring:
|
||
Track these metrics every session:
|
||
- **Comment removal rate**: (removed comments / total comments) per subreddit — healthy is <5%
|
||
- **Karma velocity**: Net karma change per day — declining trend is a warning
|
||
- **Rate limit frequency**: How often 429 responses occur — increasing frequency suggests Reddit is throttling
|
||
- **Comment score distribution**: If >30% of recent comments score 0 or below, content strategy needs revision
|
||
- **Post removal rate**: If >20% of posts are removed, subreddit rule compliance is failing
|
||
|
||
Store health metrics in memory for trend analysis across sessions.
|
||
|
||
---
|
||
|
||
## Phase 6 — Queue Management
|
||
|
||
If `approval_mode` is ENABLED:
|
||
1. Write generated posts/replies to `reddit_queue.json` with engagement score, target subreddit, and rule compliance notes
|
||
2. Write a human-readable `reddit_queue_preview.md` for review
|
||
3. event_publish "reddit_queue_updated" with queue size
|
||
4. Do NOT post — wait for user approval
|
||
|
||
If `approval_mode` is DISABLED:
|
||
1. Post content via the Reddit API
|
||
2. Enforce `daily_comment_limit` — track count in memory, refuse to post beyond limit
|
||
3. Log all posts to `reddit_posted.json` with timestamp, subreddit, and content hash
|
||
4. Respect rate limits (10 requests per minute for OAuth)
|
||
5. Verify each post is visible after 2 minutes (Phase 4 removal check)
|
||
|
||
---
|
||
|
||
## Phase 7 — Performance Tracking
|
||
|
||
Track engagement metrics:
|
||
- Post karma and comment karma changes
|
||
- Reply engagement (upvotes on your comments)
|
||
- Thread growth on posts you created
|
||
- Community reception patterns per subreddit
|
||
- Comment removal rate trends
|
||
- Engagement score accuracy (did high-scored posts actually perform well?)
|
||
|
||
Store insights in knowledge graph for content optimization.
|
||
|
||
### Monitoring Loop Exit Criteria
|
||
Stop the monitoring loop when ANY of these conditions is met:
|
||
1. **No relevant posts**: 5 consecutive monitoring cycles found 0 posts with engagement score >= 40
|
||
2. **Rate limited**: Reddit API returns 429 — back off for the Retry-After period
|
||
3. **Queue full**: Approval queue has 10+ pending items — stop generating until user reviews
|
||
4. **Karma declining**: Net karma from recent posts is negative over 3+ days — pause and alert user for strategy review
|
||
5. **Iteration cap**: 20+ monitoring iterations in a single session — save state and exit
|
||
6. **Daily limit reached**: `daily_comment_limit` exhausted — save state and wait for next day
|
||
7. **Health alert**: Shadowban detected or removal rate >30% — stop immediately
|
||
8. **Consecutive removals**: 3+ comments removed in a row — pause and alert user
|
||
|
||
---
|
||
|
||
## Phase 8 — State Persistence
|
||
|
||
1. Save queue to `reddit_queue.json`
|
||
2. Save posting history to `reddit_posted.json`
|
||
3. memory_store `reddit_hand_state`: last_run, posts_created, replies_sent, karma_tracked, daily_comments_used
|
||
4. memory_store `reddit_hand_health`: removal_rate, shadowban_status, rate_limit_incidents, karma_velocity
|
||
5. Update dashboard stats:
|
||
- memory_store `reddit_hand_posts_created` — total posts
|
||
- memory_store `reddit_hand_replies_sent` — total replies
|
||
- memory_store `reddit_hand_queue_size` — current queue size
|
||
- memory_store `reddit_hand_karma_earned` — estimated karma from tracked posts
|
||
|
||
---
|
||
|
||
## Guidelines
|
||
|
||
- ALWAYS respect subreddit rules — parse and store them BEFORE posting (Phase 1)
|
||
- ALWAYS check content quality checklist before posting (Phase 3)
|
||
- ALWAYS verify comment visibility after posting (Phase 4)
|
||
- ALWAYS run shadowban detection at session start and after every 10 comments (Phase 5)
|
||
- NEVER post spam, self-promotion abuse, or vote manipulation
|
||
- NEVER harass, bully, or engage in bad-faith arguments
|
||
- NEVER impersonate other users or pretend to be human when directly asked
|
||
- NEVER post private or confidential information
|
||
- NEVER exceed the `daily_comment_limit` setting
|
||
- NEVER post in a subreddit where removal rate exceeds 30%
|
||
- Respect Reddit's API rate limits (10 req/min for OAuth, 30 req/min with user auth)
|
||
- In `approval_mode` (default), ALWAYS write to queue — NEVER post without review
|
||
- If the API returns an error, log it and retry once — then skip and alert the user
|
||
- Adapt tone to each subreddit's culture through analysis, not assumptions
|
||
- When in doubt about a post, queue it for review with a note explaining the concern
|
||
- Prioritize account longevity over short-term engagement — a banned account produces zero value
|
||
"""
|
||
|
||
[dashboard]
|
||
[[dashboard.metrics]]
|
||
label = "Posts Created"
|
||
memory_key = "reddit_hand_posts_created"
|
||
format = "number"
|
||
|
||
[[dashboard.metrics]]
|
||
label = "Replies Sent"
|
||
memory_key = "reddit_hand_replies_sent"
|
||
format = "number"
|
||
|
||
[[dashboard.metrics]]
|
||
label = "Queue Size"
|
||
memory_key = "reddit_hand_queue_size"
|
||
format = "number"
|
||
|
||
[[dashboard.metrics]]
|
||
label = "Karma Earned"
|
||
memory_key = "reddit_hand_karma_earned"
|
||
format = "number"
|
||
|
||
[[dashboard.metrics]]
|
||
label = "Subreddits Monitored"
|
||
memory_key = "reddit_hand_subreddits_monitored"
|
||
format = "number"
|
||
|
||
# ─── Token & Performance Metadata ─────────────────────────────────────────────
|
||
|
||
[metadata]
|
||
frequency = "hourly"
|
||
token_consumption = "medium"
|
||
default_active = false
|
||
|
||
# ─── Internationalization (optional) ─────────────────────────────────────────
|
||
# All i18n sections are optional. Without them, the English values above are used.
|
||
# To localize, add [i18n.LANG] sections (e.g. zh, ja, ko, es, fr, de).
|
||
# Settings translations are also optional — omit to keep English labels.
|
||
|
||
# ─── Chinese (简体中文) ────────────────────────────────────────────────────
|
||
|
||
[i18n.zh]
|
||
name = "Reddit Hand"
|
||
description = "自主 Reddit 管理——监控子版块、发布内容、回复帖子并追踪 Karma 和互动"
|
||
category = "通信"
|
||
|
||
[i18n.zh.settings.subreddits]
|
||
label = "子版块"
|
||
description = "要监控的子版块列表(逗号分隔,例如 rust,programming,machinelearning)"
|
||
|
||
[i18n.zh.settings.monitor_mode]
|
||
label = "监控模式"
|
||
description = "在监控的子版块中追踪哪些内容"
|
||
|
||
[i18n.zh.settings.auto_reply]
|
||
label = "自动回复"
|
||
description = "自动回复相关的帖子和评论"
|
||
|
||
[i18n.zh.settings.post_frequency]
|
||
label = "发布频率"
|
||
description = "创建原创帖子的频率"
|
||
|
||
[i18n.zh.settings.content_style]
|
||
label = "内容风格"
|
||
description = "帖子和回复的语气和风格"
|
||
|
||
[i18n.zh.settings.approval_mode]
|
||
label = "审批模式"
|
||
description = "将帖子和回复加入队列等待审核,而非直接发布"
|
||
|
||
[i18n.zh.settings.min_karma_to_post]
|
||
label = "最低发帖 Karma"
|
||
description = "仅在账户拥有至少此数量 Karma 的子版块中发帖"
|
||
|
||
[i18n.zh.settings.max_reply_depth]
|
||
label = "最大回复深度"
|
||
description = "回复的最大评论嵌套深度(深层嵌套的可见度较低)"
|
||
|
||
[i18n.zh.settings.daily_comment_limit]
|
||
label = "每日评论上限"
|
||
description = "每天在所有子版块中发布评论的最大数量(防止触发垃圾过滤器)"
|
||
|
||
[i18n.zh.settings.content_filter]
|
||
label = "内容过滤"
|
||
description = "参与话题的过滤级别——严格模式会跳过争议性和 NSFW 内容"
|
||
|
||
[i18n.zh.settings.authenticity_mode]
|
||
label = "真实性模式"
|
||
description = "维持类人互动模式以避免机器人检测的策略"
|
||
|
||
# ─── Spanish (Español) ────────────────────────────────────────────────────
|
||
|
||
[i18n.es]
|
||
name = "Hand de Reddit"
|
||
description = "Gestor autónomo de Reddit — monitorea subreddits, publica contenido, responde en hilos y rastrea karma e interacciones"
|
||
category = "Comunicación"
|
||
|
||
[i18n.es.settings.subreddits]
|
||
label = "Subreddits"
|
||
description = "Lista de subreddits a monitorear separados por comas (ej. rust,programming,machinelearning)"
|
||
|
||
[i18n.es.settings.monitor_mode]
|
||
label = "Modo de monitoreo"
|
||
description = "Qué rastrear en los subreddits monitoreados"
|
||
|
||
[i18n.es.settings.auto_reply]
|
||
label = "Respuesta automática"
|
||
description = "Responder automáticamente a publicaciones y comentarios relevantes"
|
||
|
||
[i18n.es.settings.post_frequency]
|
||
label = "Frecuencia de publicación"
|
||
description = "Con qué frecuencia crear publicaciones originales"
|
||
|
||
[i18n.es.settings.content_style]
|
||
label = "Estilo de contenido"
|
||
description = "Tono y enfoque para publicaciones y respuestas"
|
||
|
||
[i18n.es.settings.approval_mode]
|
||
label = "Modo de aprobación"
|
||
description = "Poner publicaciones y respuestas en cola para revisión en lugar de publicarlas directamente"
|
||
|
||
[i18n.es.settings.min_karma_to_post]
|
||
label = "Karma mínimo para publicar"
|
||
description = "Solo publicar en subreddits donde la cuenta tenga al menos este nivel de karma"
|
||
|
||
[i18n.es.settings.max_reply_depth]
|
||
label = "Profundidad máxima de respuesta"
|
||
description = "Profundidad máxima del hilo de comentarios para responder (los hilos más profundos tienen menos visibilidad)"
|
||
|
||
[i18n.es.settings.daily_comment_limit]
|
||
label = "Límite diario de comentarios"
|
||
description = "Número máximo de comentarios por día en todos los subreddits (evita activar filtros de spam)"
|
||
|
||
[i18n.es.settings.content_filter]
|
||
label = "Filtro de contenido"
|
||
description = "Nivel de filtrado de temas — el modo estricto omite contenido NSFW, político o controvertido"
|
||
|
||
[i18n.es.settings.authenticity_mode]
|
||
label = "Modo de autenticidad"
|
||
description = "Estrategia para mantener patrones de interacción similares a los humanos y evitar la detección de bots"
|
||
|
||
# ─── Japanese (日本語) ────────────────────────────────────────────────────
|
||
|
||
[i18n.ja]
|
||
name = "Reddit Hand"
|
||
description = "自律型Redditマネージャー——サブレディットの監視、コンテンツ投稿、スレッドへの返信、Karmaとエンゲージメントの追跡"
|
||
category = "コミュニケーション"
|
||
|
||
[i18n.ja.settings.subreddits]
|
||
label = "サブレディット"
|
||
description = "監視するサブレディットのリスト(カンマ区切り、例: rust,programming,machinelearning)"
|
||
|
||
[i18n.ja.settings.monitor_mode]
|
||
label = "監視モード"
|
||
description = "監視対象のサブレディットで追跡する内容"
|
||
|
||
[i18n.ja.settings.auto_reply]
|
||
label = "自動返信"
|
||
description = "関連する投稿やコメントに自動で返信する"
|
||
|
||
[i18n.ja.settings.post_frequency]
|
||
label = "投稿頻度"
|
||
description = "オリジナル投稿を作成する頻度"
|
||
|
||
[i18n.ja.settings.content_style]
|
||
label = "コンテンツスタイル"
|
||
description = "投稿と返信のトーンとアプローチ"
|
||
|
||
[i18n.ja.settings.approval_mode]
|
||
label = "承認モード"
|
||
description = "投稿や返信を直接公開せず、レビュー用キューに追加する"
|
||
|
||
[i18n.ja.settings.min_karma_to_post]
|
||
label = "投稿に必要な最低Karma"
|
||
description = "アカウントが最低このKarmaを持つサブレディットでのみ投稿する"
|
||
|
||
[i18n.ja.settings.max_reply_depth]
|
||
label = "最大返信深度"
|
||
description = "返信するコメントスレッドの最大ネスト深度(深いスレッドほど可視性が低い)"
|
||
|
||
[i18n.ja.settings.daily_comment_limit]
|
||
label = "1日のコメント上限"
|
||
description = "全サブレディットで1日に投稿するコメントの最大数(スパムフィルターの誤検知を防止)"
|
||
|
||
[i18n.ja.settings.content_filter]
|
||
label = "コンテンツフィルター"
|
||
description = "参加するトピックのフィルターレベル — 厳格モードではNSFW・政治・物議を醸すコンテンツをスキップ"
|
||
|
||
[i18n.ja.settings.authenticity_mode]
|
||
label = "真正性モード"
|
||
description = "ボット検出を回避するための人間らしいエンゲージメントパターン維持戦略"
|
||
|
||
# ─── French (Français) ────────────────────────────────────────────────────
|
||
|
||
[i18n.fr]
|
||
name = "Hand Reddit"
|
||
description = "Gestionnaire Reddit autonome — surveille les subreddits, publie du contenu, répond dans les fils et suit le karma et l'engagement"
|
||
category = "Communication"
|
||
|
||
[i18n.fr.settings.subreddits]
|
||
label = "Subreddits"
|
||
description = "Liste de subreddits à surveiller séparés par des virgules (ex. rust,programming,machinelearning)"
|
||
|
||
[i18n.fr.settings.monitor_mode]
|
||
label = "Mode de surveillance"
|
||
description = "Ce qu'il faut suivre dans les subreddits surveillés"
|
||
|
||
[i18n.fr.settings.auto_reply]
|
||
label = "Réponse automatique"
|
||
description = "Répondre automatiquement aux publications et commentaires pertinents"
|
||
|
||
[i18n.fr.settings.post_frequency]
|
||
label = "Fréquence de publication"
|
||
description = "Fréquence de création de publications originales"
|
||
|
||
[i18n.fr.settings.content_style]
|
||
label = "Style de contenu"
|
||
description = "Ton et approche pour les publications et réponses"
|
||
|
||
[i18n.fr.settings.approval_mode]
|
||
label = "Mode d'approbation"
|
||
description = "Mettre les publications et réponses en file d'attente pour révision au lieu de les publier directement"
|
||
|
||
[i18n.fr.settings.min_karma_to_post]
|
||
label = "Karma minimum pour publier"
|
||
description = "Ne publier que dans les subreddits où le compte possède au moins ce niveau de karma"
|
||
|
||
[i18n.fr.settings.max_reply_depth]
|
||
label = "Profondeur maximale de réponse"
|
||
description = "Profondeur maximale d'imbrication des commentaires pour répondre (les fils plus profonds ont moins de visibilité)"
|
||
|
||
[i18n.fr.settings.daily_comment_limit]
|
||
label = "Limite quotidienne de commentaires"
|
||
description = "Nombre maximum de commentaires par jour sur tous les subreddits (empêche le déclenchement des filtres anti-spam)"
|
||
|
||
[i18n.fr.settings.content_filter]
|
||
label = "Filtre de contenu"
|
||
description = "Niveau de filtrage des sujets — le mode strict ignore le contenu NSFW, politique ou controversé"
|
||
|
||
[i18n.fr.settings.authenticity_mode]
|
||
label = "Mode d'authenticité"
|
||
description = "Stratégie pour maintenir des modèles d'interaction humains et éviter la détection automatique"
|
||
|
||
# ─── German (Deutsch) ────────────────────────────────────────────────────
|
||
|
||
[i18n.de]
|
||
name = "Reddit-Hand"
|
||
description = "Autonomer Reddit-Manager — überwacht Subreddits, postet Inhalte, antwortet in Threads und verfolgt Karma und Engagement"
|
||
category = "Kommunikation"
|
||
|
||
[i18n.de.settings.subreddits]
|
||
label = "Subreddits"
|
||
description = "Kommagetrennte Liste der zu überwachenden Subreddits (z.B. rust,programming,machinelearning)"
|
||
|
||
[i18n.de.settings.monitor_mode]
|
||
label = "Überwachungsmodus"
|
||
description = "Was in den überwachten Subreddits verfolgt werden soll"
|
||
|
||
[i18n.de.settings.auto_reply]
|
||
label = "Automatische Antwort"
|
||
description = "Automatisch auf relevante Beiträge und Kommentare antworten"
|
||
|
||
[i18n.de.settings.post_frequency]
|
||
label = "Veröffentlichungshäufigkeit"
|
||
description = "Wie oft originale Beiträge erstellt werden"
|
||
|
||
[i18n.de.settings.content_style]
|
||
label = "Inhaltsstil"
|
||
description = "Ton und Ansatz für Beiträge und Antworten"
|
||
|
||
[i18n.de.settings.approval_mode]
|
||
label = "Genehmigungsmodus"
|
||
description = "Beiträge und Antworten zur Überprüfung in die Warteschlange stellen, anstatt sie direkt zu veröffentlichen"
|
||
|
||
[i18n.de.settings.min_karma_to_post]
|
||
label = "Mindest-Karma zum Posten"
|
||
description = "Nur in Subreddits posten, in denen das Konto mindestens dieses Karma-Level hat"
|
||
|
||
[i18n.de.settings.max_reply_depth]
|
||
label = "Maximale Antworttiefe"
|
||
description = "Maximale Verschachtelungstiefe für Kommentarantworten (tiefere Threads haben geringere Sichtbarkeit)"
|
||
|
||
[i18n.de.settings.daily_comment_limit]
|
||
label = "Tägliches Kommentarlimit"
|
||
description = "Maximale Anzahl an Kommentaren pro Tag in allen Subreddits (verhindert Auslösung von Spamfiltern)"
|
||
|
||
[i18n.de.settings.content_filter]
|
||
label = "Inhaltsfilter"
|
||
description = "Filterstufe für Themen — der strikte Modus überspringt NSFW-, politische und kontroverse Inhalte"
|
||
|
||
[i18n.de.settings.authenticity_mode]
|
||
label = "Authentizitätsmodus"
|
||
description = "Strategie zur Aufrechterhaltung menschlicher Interaktionsmuster zur Vermeidung von Bot-Erkennung"
|
||
|
||
# ─── Korean (한국어) ────────────────────────────────────────────────────
|
||
|
||
[i18n.ko]
|
||
name = "Reddit Hand"
|
||
description = "자율 Reddit 관리 — 서브레딧 모니터링, 콘텐츠 게시, 스레드 댓글 및 카르마와 참여도 추적"
|
||
category = "커뮤니케이션"
|
||
|
||
[i18n.ko.settings.subreddits]
|
||
label = "서브레딧"
|
||
description = "모니터링할 서브레딧 목록 (쉼표로 구분, 예: rust,programming,machinelearning)"
|
||
|
||
[i18n.ko.settings.monitor_mode]
|
||
label = "모니터링 모드"
|
||
description = "모니터링 대상 서브레딧에서 추적할 콘텐츠"
|
||
|
||
[i18n.ko.settings.auto_reply]
|
||
label = "자동 답글"
|
||
description = "관련 게시물과 댓글에 자동으로 답글 작성"
|
||
|
||
[i18n.ko.settings.post_frequency]
|
||
label = "게시 빈도"
|
||
description = "원본 게시물 작성 주기"
|
||
|
||
[i18n.ko.settings.content_style]
|
||
label = "콘텐츠 스타일"
|
||
description = "게시물과 답글의 어조와 접근 방식"
|
||
|
||
[i18n.ko.settings.approval_mode]
|
||
label = "승인 모드"
|
||
description = "게시물과 답글을 직접 게시하지 않고 대기열에 추가하여 검토"
|
||
|
||
[i18n.ko.settings.min_karma_to_post]
|
||
label = "최소 게시 카르마"
|
||
description = "계정이 최소 이만큼의 카르마를 보유한 서브레딧에서만 게시"
|
||
|
||
[i18n.ko.settings.max_reply_depth]
|
||
label = "최대 답글 깊이"
|
||
description = "답글 작성의 최대 댓글 중첩 깊이 (깊은 중첩일수록 노출도 감소)"
|
||
|
||
[i18n.ko.settings.daily_comment_limit]
|
||
label = "일일 댓글 제한"
|
||
description = "모든 서브레딧에서 하루에 게시할 수 있는 최대 댓글 수 (스팸 필터 트리거 방지)"
|
||
|
||
[i18n.ko.settings.content_filter]
|
||
label = "콘텐츠 필터"
|
||
description = "참여할 주제의 필터 수준 — 엄격 모드는 NSFW, 정치, 논란이 되는 콘텐츠를 건너뜁니다"
|
||
|
||
[i18n.ko.settings.authenticity_mode]
|
||
label = "진정성 모드"
|
||
description = "봇 탐지를 피하기 위한 인간과 유사한 상호작용 패턴 유지 전략"
|