Reddit Engagement
Execute Reddit actions by intent and semantics, not static selectors.
⚠️ Content Policy — Read Before Writing Anything
- 1. 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
- 1. 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 | INLINECODE6 | 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 |
|---|
| INLINECODE12 | Idea validation, feedback | Medium — show research |
| INLINECODE13 |
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:
- 1. 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:
- 1. 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
- 2. 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
- 3. Confirmation
- Echo generated content to user for approval (unless user pre-authorized immediate send)
- 4. Publish
- Execute
references/interaction-patterns.md §1 (Create Post workflow)
- 5. 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:
- 1. 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
- 2. 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
- 3. Confirmation
- Echo generated comment to user for approval (unless pre-authorized)
- 4. Publish
- Execute
references/interaction-patterns.md §2 (Create Comment workflow)
- 5. 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:
- 1. 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):
- 1. 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:
- 1. 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.
Reddit 互动
通过意图和语义执行 Reddit 操作,而非静态选择器。
⚠️ 内容政策 — 撰写任何内容前请阅读
- 1. 在撰写任何评论或帖子前,请先阅读 PERSONA.md(工作区根目录)。
- 切勿编造个人故事 — 除非事实记录在 PERSONA.md 中,否则不得虚构家庭成员、人际关系、健康事件或我个人经历过……的叙述。
- 仅可使用:PERSONA.md 中记录的个人事实、基于观点的回应,或不声称特定个人经历的一般性观察。
- 发布后,记录到 PERSONA.md 的已使用的故事/内容记录表格中,以防止跨帖子出现矛盾。
核心操作规则
- 1. 在每个关键步骤前使用无障碍快照(带 refs=aria 的 snapshot)。
- 通过角色+标签+上下文定位元素,绝不使用固定的 DOM id/class/XPath。
- 每次导航、模态框打开/关闭、提交或失败后重新快照。
- 在操作前验证页面状态(已登录、子版块已解析、编辑器可见、按钮已启用)。
- 对于破坏性/高可见性操作,若用户未明确预先授权立即发送,需要求确认文本。
资源索引
| 资源 | 位置 | 用途 |
|---|
| 发帖策略 | references/post-strategy.md | 内容角度、反AI规则、子版块文化、互动触发点 |
| 评论策略 |
references/comment-strategy.md | (预留)回复模式、评论特定策略 |
|
交互模式 | references/interaction-patterns.md | UI自动化操作手册(如何点击/输入/验证) |
|
子版块档案 | references/sub-archives.md | 所有子版块的核心信息(单一文件) |
|
角色事实 | PERSONA.md(工作区根目录) | 用于内容的真实个人事实 |
子版块名称索引
预定义档案(位于 post-strategy.md 中)
以下子版块拥有策划好的文化档案:
| 子版块 | 重点 | 发帖门槛 |
|---|
| r/Startup_Ideas | 创意验证、反馈 | 中等 — 需展示研究 |
| r/SaaS |
SaaS构建、指标、增长 | 中高 — 期望数据 |
| r/TheFounders | 创始人经验、支持 | 中等 — 重视真实性 |
| r/openclaw | OpenClaw工具讨论 | 低中 — 技术性 |
动态档案系统
对于上述未列出的子版块:
- 1. 检查现有档案: 读取 references/sub-archives.md,找到对应子版块部分
- 若未找到: 执行 interaction-patterns.md §0(动态子版块分析框架)
- 追加到文件: 使用底部模板将新子版块信息添加到 references/sub-archives.md
- 用于内容生成: 视同预定义档案处理
支持的子版块类别
| 类别 | 示例子版块 | 策略 |
|---|
| 创业/商业 | r/Entrepreneur, r/smallbusiness, r/marketing | 使用 r/Startup_Ideas 基线 |
| 技术 |
r/technology, r/programming, r/webdev | 使用 r/openclaw 基线 |
|
AI/机器学习 | r/artificial, r/MachineLearning, r/LocalLLaMA | 技术性+数据驱动语气 |
|
生产力 | r/productivity, r/Notion, r/Obsidian | 聚焦工作流,实用 |
|
一般讨论 | r/CasualConversation, r/AskReddit | 随意,低门槛 |
规则: 若 sub-archives.md 中无现有档案且类别匹配不明确 → 在发帖前始终运行动态分析(§0)。
工作流路由
创建帖子
触发条件: 用户要求在某子版块发布。
内容生成流程:
- 1. 确定输入类型
- 若用户提供完整内容(标题+正文)→ 直接使用,跳过策略
- 若用户提供模糊请求(如发一篇关于OpenClaw的帖子)→ 执行下方策略流程
- 2. 策略流程(针对模糊请求)
a.
识别目标子版块 — 从用户请求中提取或询问
b.
加载子版块档案 — 读取 references/post-strategy.md §1 了解子版块规则/语气
c.
选择内容角度 — 读取 references/post-strategy.md §3 匹配意图的角度
d.
加载角色事实 — 读取工作区 PERSONA.md 获取真实个人事实
e.
应用反AI规则 — 读取 references/post-strategy.md §2 避免AI式语言
f.
起草内容 — 结合子版块档案+角度+角色事实+反AI规则
g.
添加互动钩子 — 读取 references/post-strategy.md §4 获取评论触发点
h.
构思标题 — 读取 references/post-strategy.md §1 获取子版块特定标题模式
- 3. 确认
- 将生成的内容回显给用户批准(除非用户预先授权立即发送)
- 4. 发布
- 执行 references/interaction-patterns.md §1(创建帖子工作流)
- 5. 记录使用
- 更新 PERSONA.md 的已使用内容登记表格,防止未来出现矛盾
流程参考: references/interaction-patterns.md §1
创建评论
触发条件: 用户要求回复帖子或评论。
内容生成流程:
- 1. 确定输入类型
- 若用户提供完整评论文本 → 直接使用
- 若用户提供模糊请求(如评论这篇帖子)→ 执行下方策略流程
- 2. 策略流程(针对模糊请求)
a.
阅读目标帖子/评论 — 理解上下文和现有讨论
b.
检查子版块信息
- 读取 references/sub-archives.md 中该子版块的信息
-
若未找到: 执行 interaction-patterns.md §0(动态子版块分析框架),然后将子版块信息追加到 references/sub-archives.md
-
若找到: 使用现有信息(语气、规则、限制)
c.
加载评论策略 — 读取 references/comment-strategy.md(若可用)或应用 post-strategy.md 的人性优先规则
d.
加载角色事实 — 读取工作区 PERSONA.md 获取真实个人事实
e.
应用反AI规则 — 读取 references/post-strategy.md(词语精简、双拍节奏等)
f.
起草评论 — 确保信息增量,而非简单+1;匹配步骤b中的子版块语气
- 3. 确认
- 将生成的评论回显给用户批准(除非预先授权)
- 4. 发布
- 执行 references/interaction-patterns.md §2(创建评论工作流)
- 5. 记录使用
- 若使用了角色事实,更新 PERSONA.md 的已使用内容登记表格
流程参考: references/interaction-patterns.md §2
点赞
触发条件: 用户要求点赞/顶帖或评论。
流程: 执行 references/interaction-patterns.md §3(点赞工作流)
无需生成内容。
通用可靠性循环
对于每个操作步骤:
- 1. 使用aria引用快照当前标签页。
- 通过语义线索(角色、无障碍名称、附近标题/文本)解析目标候选。
- 对候选进行评分(精确意图匹配 > 同义词匹配 > 基于位置的猜测)。
- 执行一个操作。
- 通过独立证据(状态变化、提示信息、按钮状态、新内容可见)验证结果。
- 若验证失败,回退一步(或刷新上下文)并使用下一个候选重试。
连续3次失败后停止,并返回清晰的诊断信息,包括:
语义定位标准
优先使用以下信号(从高到低置信度):
- 1. 无障碍角色+无障碍名称精确匹配(如按钮发布、评论、点赞)。
- 无障碍名称同义词匹配(如提交、回复、发送)。
3.