Reddit Engagement
Execute Reddit actions by intent and semantics, not static selectors.
⚠️ Content Policy — Read Before Writing Anything
- Read
PERSONA.md (workspace root) before composing any comment or post.
- Never fabricate personal stories — no invented family members, relationships, health events, or "I personally experienced..." narratives unless the fact is recorded in
PERSONA.md.
- Use only: documented personal facts from
PERSONA.md, opinion-based responses, or general observations that don't claim specific personal experience.
- After posting, log it in the "已使用的故事/内容记录" table in
PERSONA.md to prevent contradictions across posts.
Core Operating Rules
- Use accessibility snapshots (
snapshot with refs="aria") before every critical step.
- Target elements by role+label+context, never by fixed DOM id/class/XPath.
- Re-snapshot after each navigation, modal open/close, submit, or failure.
- Validate page state before action (logged-in, subreddit resolved, composer visible, button enabled).
- Require confirmation text for destructive/high-visibility actions when user did not explicitly pre-authorize immediate send.
Resource Index
| Resource |
Location |
Purpose |
| Post Strategy |
references/post-strategy.md |
Content angles, anti-AI rules, subreddit cultures, engagement triggers |
| Comment Strategy |
references/comment-strategy.md |
(Reserved) Reply patterns, comment-specific tactics |
| Interaction Patterns |
references/interaction-patterns.md |
UI automation playbooks (how to click/type/verify) |
| Sub Archives |
references/sub-archives.md |
Core info for all subreddits (one file) |
| Persona Facts |
PERSONA.md (workspace root) |
Authentic personal facts to use in content |
Subreddit Name Index
Pre-defined Archives (in post-strategy.md)
These subreddits have curated cultural profiles:
| Subreddit |
Focus |
Posting Bar |
r/Startup_Ideas |
Idea validation, feedback |
Medium — show research |
r/SaaS |
SaaS building, metrics, growth |
Medium-High — data expected |
r/TheFounders |
Founder experiences, support |
Medium — authenticity valued |
r/openclaw |
OpenClaw tool discussions |
Low-Medium — technical |
Dynamic Archive System
For subreddits NOT listed above:
- Check for existing archive: Read
references/sub-archives.md, find the sub section
- If not found: Execute
interaction-patterns.md §0 (Dynamic Subreddit Analysis Framework)
- Append to file: Add new sub info to
references/sub-archives.md using the template at bottom
- Use for content generation: Treat like pre-defined profile
Supported Subreddit Categories
| Category |
Example Subs |
Strategy |
| Startup/Business |
r/Entrepreneur, r/smallbusiness, r/marketing |
Use r/Startup_Ideas baseline |
| Technology |
r/technology, r/programming, r/webdev |
Use r/openclaw baseline |
| AI/ML |
r/artificial, r/MachineLearning, r/LocalLLaMA |
Technical + data-driven tone |
| Productivity |
r/productivity, r/Notion, r/Obsidian |
Workflow-focused, practical |
| General Discussion |
r/CasualConversation, r/AskReddit |
Casual, low bar |
Rule: If no archive exists in sub-archives.md and category match is unclear → always run dynamic analysis (§0) before posting.
Workflow Router
Create Post
Trigger: user asks to publish in a subreddit.
Content Generation Flow:
Determine Input Type
- If user provides full content (title + body) → use as-is, skip strategy
- If user provides fuzzy request (e.g., "post about OpenClaw") → execute strategy flow below
Strategy Flow (for fuzzy requests)
a. Identify Target Subreddit — extract from user request or ask
b. Load Sub Profile — read references/post-strategy.md §1 for subreddit rules/tone
c. Select Content Angle — read references/post-strategy.md §3 for angle matching intent
d. Load Persona Facts — read workspace PERSONA.md for authentic personal facts
e. Apply Anti-AI Rules — read references/post-strategy.md §2 to avoid AI-sounding language
f. Draft Content — combine sub profile + angle + persona facts + anti-AI rules
g. Add Engagement Hook — read references/post-strategy.md §4 for comment triggers
h. Craft Title — read references/post-strategy.md §1 for subreddit-specific title patterns
Confirmation
- Echo generated content to user for approval (unless user pre-authorized immediate send)
Publish
- Execute
references/interaction-patterns.md §1 (Create Post workflow)
Log Usage
- Update
PERSONA.md "已使用内容登记" table to prevent future contradictions
Flow Reference: references/interaction-patterns.md §1
Create Comment
Trigger: user asks to reply to a post or comment.
Content Generation Flow:
Determine Input Type
- If user provides full comment text → use as-is
- If user provides fuzzy request (e.g., "comment on this post") → execute strategy flow below
Strategy Flow (for fuzzy requests)
a. Read Target Post/Comment — understand context and existing discussion
b. Check Subreddit Info
- Read
references/sub-archives.md for this sub
- If NOT found: Execute
interaction-patterns.md §0 (Dynamic Subreddit Analysis Framework), then append sub info to references/sub-archives.md
- If found: Use existing info (tone, rules, restrictions)
c. Load Comment Strategy — read
references/comment-strategy.md (when available) or apply post-strategy.md Human-First rules
d. Load Persona Facts — read workspace PERSONA.md for authentic personal facts
e. Apply Anti-AI Rules — read references/post-strategy.md (Word Razor, Two-Beat Flow, etc.)
f. Draft Comment — ensure information increment, not just "+1"; match sub tone from step b
Confirmation
- Echo generated comment to user for approval (unless pre-authorized)
Publish
- Execute
references/interaction-patterns.md §2 (Create Comment workflow)
Log Usage
- Update
PERSONA.md "已使用内容登记" table if persona facts were used
Flow Reference: references/interaction-patterns.md §2
Upvote
Trigger: user asks to like/upvote a post or comment.
Flow: Execute references/interaction-patterns.md §3 (Upvote workflow)
No content generation needed.
Universal Reliability Loop
For each action step:
- Snapshot current tab with aria refs.
- Resolve target candidates by semantic cues (role, accessible name, nearby headings/text).
- Score candidates (exact intent match > synonym match > position-based guess).
- Execute one action.
- Verify outcome with independent evidence (state change, toast, button state, new content visible).
- If verification fails, rollback one step (or refresh context) and retry with next candidate.
Stop after 3 failed attempts and return a clear diagnostic with:
- last confirmed state
- failing intent
- top 2 alternate hypotheses
Semantic Targeting Standard
Prefer these signals (highest to lowest confidence):
- Accessible role + accessible name exact match (e.g., button "Post", "Comment", "Upvote").
- Accessible name synonym match (e.g., "Submit", "Reply", "Send").
- Relative context anchor (inside composer region; under post action row; near subreddit title).
- Visibility and enabled state checks.
Never rely on:
- hardcoded CSS selectors
- hardcoded DOM ids/classes
- absolute XPath
- static child index paths
Submission Safety Gates
Before clicking final submit:
- Echo target summary: subreddit/post URL/action/content preview.
- Ensure required fields are non-empty and within Reddit limits.
- Confirm account/session is authenticated.
- Confirm no blocking validation/errors are visible.
If explicit user request already includes immediate-send intent, submit directly.
Otherwise ask one short confirmation.
Output Contract
After completion, return:
- Action performed
- Target (subreddit/post/comment)
- Result (
success | partial | failed)
- Evidence (what changed in UI)
- If failed: next best recovery step
Fast Troubleshooting
- Login wall/captcha: pause and ask user to complete challenge, then resume from latest snapshot.
- Button exists but disabled: inspect missing required fields or rate limits.
- Multiple matching buttons: choose candidate within nearest semantic container (composer/action row).
- UI redesign: rely on role/name/context fallback chain from
references/interaction-patterns.md.
1---2name: reddit-engagement3description: Create and execute robust Reddit engagement workflows (create post, add comment, upvote) using browser accessibility-tree semantics instead of brittle DOM ids/CSS selectors. Use when asked to automate Reddit actions with high success rate across UI changes, A/B tests, and localization differences; especially when reliability and intent-based element targeting are required.4---56# Reddit Engagement78Execute Reddit actions by intent and semantics, not static selectors.910## ⚠️ Content Policy — Read Before Writing Anything11121. **Read `PERSONA.md`** (workspace root) before composing any comment or post.132. **Never fabricate personal stories** — no invented family members, relationships, health events, or "I personally experienced..." narratives unless the fact is recorded in `PERSONA.md`.143. Use only: documented personal facts from `PERSONA.md`, opinion-based responses, or general observations that don't claim specific personal experience.154. After posting, **log it** in the "已使用的故事/内容记录" table in `PERSONA.md` to prevent contradictions across posts.1617---1819## Core Operating Rules20211. Use accessibility snapshots (`snapshot` with `refs="aria"`) before every critical step.222. Target elements by role+label+context, never by fixed DOM id/class/XPath.233. Re-snapshot after each navigation, modal open/close, submit, or failure.244. Validate page state before action (logged-in, subreddit resolved, composer visible, button enabled).255. Require confirmation text for destructive/high-visibility actions when user did not explicitly pre-authorize immediate send.2627## Resource Index2829| Resource | Location | Purpose |30|----------|----------|---------|31| **Post Strategy** | `references/post-strategy.md` | Content angles, anti-AI rules, subreddit cultures, engagement triggers |32| **Comment Strategy** | `references/comment-strategy.md` | (Reserved) Reply patterns, comment-specific tactics |33| **Interaction Patterns** | `references/interaction-patterns.md` | UI automation playbooks (how to click/type/verify) |34| **Sub Archives** | `references/sub-archives.md` | Core info for all subreddits (one file) |35| **Persona Facts** | `PERSONA.md` (workspace root) | Authentic personal facts to use in content |3637---3839## Subreddit Name Index4041### Pre-defined Archives (in `post-strategy.md`)4243These subreddits have curated cultural profiles:4445| Subreddit | Focus | Posting Bar |46|-----------|-------|-------------|47| `r/Startup_Ideas` | Idea validation, feedback | Medium — show research |48| `r/SaaS` | SaaS building, metrics, growth | Medium-High — data expected |49| `r/TheFounders` | Founder experiences, support | Medium — authenticity valued |50| `r/openclaw` | OpenClaw tool discussions | Low-Medium — technical |5152### Dynamic Archive System5354For subreddits NOT listed above:55561. **Check for existing archive:** Read `references/sub-archives.md`, find the sub section572. **If not found:** Execute `interaction-patterns.md` §0 (Dynamic Subreddit Analysis Framework)583. **Append to file:** Add new sub info to `references/sub-archives.md` using the template at bottom594. **Use for content generation:** Treat like pre-defined profile6061### Supported Subreddit Categories6263| Category | Example Subs | Strategy |64|----------|--------------|----------|65| **Startup/Business** | r/Entrepreneur, r/smallbusiness, r/marketing | Use r/Startup_Ideas baseline |66| **Technology** | r/technology, r/programming, r/webdev | Use r/openclaw baseline |67| **AI/ML** | r/artificial, r/MachineLearning, r/LocalLLaMA | Technical + data-driven tone |68| **Productivity** | r/productivity, r/Notion, r/Obsidian | Workflow-focused, practical |69| **General Discussion** | r/CasualConversation, r/AskReddit | Casual, low bar |7071**Rule:** If no archive exists in `sub-archives.md` and category match is unclear → always run dynamic analysis (§0) before posting.7273---7475## Workflow Router7677### Create Post7879**Trigger:** user asks to publish in a subreddit.8081**Content Generation Flow:**82831. **Determine Input Type**84 - If user provides full content (title + body) → use as-is, skip strategy85 - If user provides fuzzy request (e.g., "post about OpenClaw") → execute strategy flow below86872. **Strategy Flow** (for fuzzy requests)88 a. **Identify Target Subreddit** — extract from user request or ask89 b. **Load Sub Profile** — read `references/post-strategy.md` §1 for subreddit rules/tone90 c. **Select Content Angle** — read `references/post-strategy.md` §3 for angle matching intent91 d. **Load Persona Facts** — read workspace `PERSONA.md` for authentic personal facts92 e. **Apply Anti-AI Rules** — read `references/post-strategy.md` §2 to avoid AI-sounding language93 f. **Draft Content** — combine sub profile + angle + persona facts + anti-AI rules94 g. **Add Engagement Hook** — read `references/post-strategy.md` §4 for comment triggers95 h. **Craft Title** — read `references/post-strategy.md` §1 for subreddit-specific title patterns96973. **Confirmation**98 - Echo generated content to user for approval (unless user pre-authorized immediate send)991004. **Publish**101 - Execute `references/interaction-patterns.md` §1 (Create Post workflow)1021035. **Log Usage**104 - Update `PERSONA.md` "已使用内容登记" table to prevent future contradictions105106**Flow Reference:** `references/interaction-patterns.md` §1107108---109110### Create Comment111112**Trigger:** user asks to reply to a post or comment.113114**Content Generation Flow:**1151161. **Determine Input Type**117 - If user provides full comment text → use as-is118 - If user provides fuzzy request (e.g., "comment on this post") → execute strategy flow below1191202. **Strategy Flow** (for fuzzy requests)121 a. **Read Target Post/Comment** — understand context and existing discussion122 b. **Check Subreddit Info**123 - Read `references/sub-archives.md` for this sub124 - **If NOT found:** Execute `interaction-patterns.md` §0 (Dynamic Subreddit Analysis Framework), then append sub info to `references/sub-archives.md`125 - **If found:** Use existing info (tone, rules, restrictions)126 c. **Load Comment Strategy** — read `references/comment-strategy.md` (when available) or apply `post-strategy.md` Human-First rules127 d. **Load Persona Facts** — read workspace `PERSONA.md` for authentic personal facts128 e. **Apply Anti-AI Rules** — read `references/post-strategy.md` (Word Razor, Two-Beat Flow, etc.)129 f. **Draft Comment** — ensure information increment, not just "+1"; match sub tone from step b1301313. **Confirmation**132 - Echo generated comment to user for approval (unless pre-authorized)1331344. **Publish**135 - Execute `references/interaction-patterns.md` §2 (Create Comment workflow)1361375. **Log Usage**138 - Update `PERSONA.md` "已使用内容登记" table if persona facts were used139140**Flow Reference:** `references/interaction-patterns.md` §2141142---143144### Upvote145146**Trigger:** user asks to like/upvote a post or comment.147148**Flow:** Execute `references/interaction-patterns.md` §3 (Upvote workflow)149150**No content generation needed.**151152## Universal Reliability Loop153154For each action step:1551561. Snapshot current tab with aria refs.1572. Resolve target candidates by semantic cues (role, accessible name, nearby headings/text).1583. Score candidates (exact intent match > synonym match > position-based guess).1594. Execute one action.1605. Verify outcome with independent evidence (state change, toast, button state, new content visible).1616. If verification fails, rollback one step (or refresh context) and retry with next candidate.162163Stop after 3 failed attempts and return a clear diagnostic with:164- last confirmed state165- failing intent166- top 2 alternate hypotheses167168## Semantic Targeting Standard169170Prefer these signals (highest to lowest confidence):1711721. Accessible role + accessible name exact match (e.g., button "Post", "Comment", "Upvote").1732. Accessible name synonym match (e.g., "Submit", "Reply", "Send").1743. Relative context anchor (inside composer region; under post action row; near subreddit title).1754. Visibility and enabled state checks.176177Never rely on:178- hardcoded CSS selectors179- hardcoded DOM ids/classes180- absolute XPath181- static child index paths182183184185## Submission Safety Gates186187Before clicking final submit:1881891. Echo target summary: subreddit/post URL/action/content preview.1902. Ensure required fields are non-empty and within Reddit limits.1913. Confirm account/session is authenticated.1924. Confirm no blocking validation/errors are visible.193194If explicit user request already includes immediate-send intent, submit directly.195Otherwise ask one short confirmation.196197## Output Contract198199After completion, return:200201- Action performed202- Target (subreddit/post/comment)203- Result (`success` | `partial` | `failed`)204- Evidence (what changed in UI)205- If failed: next best recovery step206207## Fast Troubleshooting208209- Login wall/captcha: pause and ask user to complete challenge, then resume from latest snapshot.210- Button exists but disabled: inspect missing required fields or rate limits.211- Multiple matching buttons: choose candidate within nearest semantic container (composer/action row).212- UI redesign: rely on role/name/context fallback chain from `references/interaction-patterns.md`.