Lead
Hi, I’m Pomarano.
Under the Introspection Tech brand, I wanted to post one short piece each day on X (@syouwanotaisyou) — a Buddhist teaching plus a small practice for everyday life.
Researching and writing every morning is hard to sustain. On the other hand, fully automated posting to X felt risky for quality and platform rules.
So I built a semi-automatic setup: an AI agent handles research and copy; I review and post.
GitHub Actions runs the job, Gmail delivers notifications, and the agent runs through the Cursor SDK. Each morning I get the draft by email, check it, then post to @syouwanotaisyou.
This post covers why I chose semi-automation, how the system is wired, what broke along the way, and how to reproduce the essentials.
- Japanese version: X投稿の下書きをAIエージェントで半自動化した話
What the agent does vs what I do
| Role | Work |
|---|---|
| Agent | Topic research, post copy, saving draft files |
| Me (Pomarano) | Review, edit if needed, copy-paste to X (@syouwanotaisyou) |
I deliberately did not wire up the X API for auto-posting. Three reasons:
- Quality — Buddhist “quotes” often lack real sources; a human check is needed
- Policy & risk — automated posting is not zero-risk for account enforcement
- Tone & length — Japanese posts on X are capped at 140 characters. I want the final trim in my hands
Semi-automation balances posting every day with not shipping sloppy content.
Theme and format for each post
Posts follow the Introspection Tech brand:
- One teaching — a Buddhist idea or concept (phrased as “it is said that…,” never fake “the Buddha said…”)
- One step for today — a small practice for work, social media, chores, etc.
- Length — within 140 Japanese characters (hashtags and line breaks count)
The tone matches the CBT/ACT-style introspection in Attachment Isn’t Just a Bad Habit. A spec file locks that in.
Topics rotate by weekday (awareness, impermanence, compassion, etc.). The agent also avoids repeating the same concept within the last 30 drafts.
End-to-end flow
flowchart LR
subgraph cloud [GitHub Actions daily 7am JST]
A[Cursor SDK] --> B[Create draft .md]
B --> C[Commit to repo]
B --> D[Gmail notify]
end
E[Pomarano] --> F[Review email]
F --> G[Post to X]
D --> F
C --> F
In plain steps:
- Every day at 7:00 JST — GitHub Actions runs
- Cursor SDK — reads the spec and prompt in the repo; the agent generates one post
social/x-drafts/YYYY-MM-DD.md— stores post body and source notes- Gmail — sends the post body by email (when configured)
- Me — review via email or GitHub → paste to @syouwanotaisyou
Source code: pomarano/x_auto_writing
Tech stack
| Piece | Choice | Why |
|---|---|---|
| Agent runtime | Cursor SDK (@cursor/sdk) | Research + file writes in one job |
| Scheduling | GitHub Actions | No dependency on my PC being awake |
| Notification | Gmail SMTP | Easy for personal use |
| Posting | Manual | Matches the semi-auto policy |
I used GitHub Actions from the start — no local cron on my Mac.
Instructions passed to the agent
The prompt requires:
- Follow
x-shuuchaku-agent-spec.md - No unsourced “words of the Buddha”
- Post body within 140 Japanese characters (count before saving)
- Skip if today’s file already exists (no duplicate generation)
As I wrote in Measuring AI Harness Engineering, AI work goes better with rules and checks, not vague asks. Character limits and duplicate avoidance are a lightweight harness here.
What went wrong (honest notes)
Email never arrived
The workflow showed green, but nothing in the inbox. The receiver was blocking it. Adding the sender to an allowlist fixed delivery.
Manual run skipped email
At first, email sent only when a new draft was created. If today’s file already existed, manual Run workflow skipped mail. I changed the condition so manual runs send email even for an existing draft (useful for testing).
Node.js 20 deprecation warning
Old versions of checkout, setup-node, and action-send-mail triggered warnings. Updated to v6 / v17 (Node 24–compatible).
Japanese X character limit
I initially assumed 280 characters. Japanese posts cap at 140. I updated the spec and prompt.
Setup overview (for reproduction)
Details live in automation/x-daily/README.md in the repo. Skeleton only:
GitHub Secrets
| Name | Purpose |
|---|---|
CURSOR_API_KEY | Cursor SDK (Dashboard → API Keys) |
NOTIFY_EMAIL | Notification recipient |
MAIL_USERNAME | Sender Gmail address |
MAIL_APP_PASSWORD | Gmail app password |
GitHub Variables
| Name | Value |
|---|---|
X_DAILY_EMAIL_ENABLED | true |
Smoke test
Actions tab → run X Daily Draft manually → post body arrives by email → confirm you can paste to @syouwanotaisyou.
What worked and what’s next
What worked
- A steady rhythm: researched copy in my inbox every morning
- One post per day on @syouwanotaisyou under Introspection Tech
- Lower “keep going” friction; X fits the same world as blog posts and a planned attachment app
What’s next
- Separate English X drafts if I add an English account later
- When the attachment app ships, maybe one blog link per week
- Easier tracking of
status: postedon drafts
Summary
- Semi-auto: AI for research and copy; human for review and posting
- GitHub Actions + Cursor SDK + Gmail for a daily run that does not depend on my Mac sleeping
- Posts go to X @syouwanotaisyou. 140 Japanese characters and careful sourcing for Buddhist themes — encoded in spec and prompt
- Gotchas (email blocking, character limit, Actions warnings) were fixed with logs and workflow conditions
This continues my agent posts: from harness theory to build it and run it. Starting small with semi-automation fits a personal blog well.

コメント