name: x-autonomy-v2

description: Official X API v2 read/write autonomy for OpenClaw agents (safe inbox-first engagement)


X Autonomy v2 (Safe Mode)

Use official X API v2 only (OAuth2 PKCE). No browser posting. No cookie/private GraphQL writes.

Core policy

Allowed (default)

1. Inbox autonomy (mentions + replies to our own tweets)

2. Discovery drafting (search, score, draft)

3. Optional auto-quote with strict caps

Disallowed

Guardrails

Required env

Optional:

Required scopes

Tool contract

Every write action must accept `idempotency_key` and `dry_run`.

Every write action must append to audit log (`x_actions.ndjson`).

Tools to implement

Agent operating modes

Mode A: Inbox (default)

1. Poll mentions/replies since last_seen_id

2. Load thread context

3. Classify + draft

4. Auto-execute only if safe and confidence >= 0.75

5. Persist state + logs

Mode B: Discovery (controlled)

1. Search query packs

2. Relevance/risk scoring

3. Draft replies + quotes

4. Auto-quote optional

5. Replies to strangers require approval

Done criteria