AI Took Over This Open-Source Project: One Sentence In, a Tested PR Out
I've handed my open-source project over to AI: one sentence to request a feature, AI develops, tests, and submits a PR on its own
Author: 还好还好不是吗
Tags: Electron
MatrixMedia is an open-source multi-platform video matrix publishing tool, written in Electron, that one-click syncs videos/images to 8 platforms including Douyin, Kuaishou, Bilibili, Toutiao, Video Account (WeChat Channels), Xiaohongshu, Tomato, etc. It has been open-source on GitHub for 7 months, with 1171 stars and 168 forks.
After v0.14.0, the project entered an "AI fully managed" state: you make a request in one sentence, and the AI modifies code, runs unit tests, verifies against real platforms, fixes bugs, and finally submits a PR with complete test evidence. The whole process requires no human to write a single line of code or click a mouse.
This article documents how this model works and what results it actually produces.
Background: AI writing code is nothing new, but AI testing is still manual
Anyone who has written code with Cursor / Claude Code / WorkBuddy in the past six months knows that AI-generated code is already smooth. But one step has remained unchanged: testing.
After the code is written, you have to run it yourself to see if it's correct. Click a button, fill a form, wait for the page to redirect, confirm the feature works. If it doesn't work, tell the AI what's wrong, have it fix, and test again.
MatrixMedia handles automated publishing to social media platforms, so this pain point is even more obvious. For example, if I want to add a "product tagging" feature (video with product links), the AI can write the Puppeteer script, but whether the "product tagging" button was clicked successfully, whether the product was actually attached, the AI doesn't know on its own—it can only tell you "the code is written, you try it."
v0.14.0 solves this problem: letting the AI verify on real platforms itself.
Core of v0.14.0: AI-automated e2e development mode
This version adds a .agent/ directory containing an "automated development testing workflow" for AI coding agents (Claude Code, Cursor, WorkBuddy, OpenClaw, etc.).
The workflow has only four steps, but each step has hard constraints:
Modify code → Unit tests (yarn test:*) → e2e real platform verification → Read evidence → Fix → Re-run → Until PASS
The key is step three: e2e real platform verification.
After the AI modifies the code, it doesn't just run a mock test and call it done. It actually logs into Douyin/Video Account/Xiaohongshu, actually uploads a video, actually clicks "Save as draft," and then checks the backend draft box to see whether the draft actually appeared.
The verification command is one line:
node e2e/run.js -p dy --yes
-p specifies the platform, --yes is the AI non-interactive mode. The e2e automatically builds, publishes, collects evidence (screenshots, logs, receipt JSON), and generates a report.
The AI reads the report; if the result is NEEDS_ATTENTION or FAIL, it analyzes the cause, fixes the code, and re-runs by itself. Until draftVerified=true and exit code 0.
Real case: 10 rounds of e2e, AI fixed the Video Account "declaration of originality" issue by itself
.agent/case-2026-10-31-video-draft-e2e.md records a complete case: fixing the issue where the "declaration of originality" checkbox fails on Video Account.
The task instruction was only one sentence: "Video Account originality statement, you e2e and fix it yourself."
Then the AI ran 10 rounds of real platform e2e on its own, abandoned two "assumed" approaches in the middle, and finally converged with the "saved" toast as the criterion, passing two consecutive rounds.
The iteration process for each round is roughly:
| Round | Phenomenon | Evidence | AI's action |
|---|---|---|---|
| 1 | All five platforms exit code 2 | stderr: missing --phone | Automatically fills in logged-in accounts from cli accounts --json |
| 2 | Video Account flow interrupted | Node is either not clickable |
Discovered that wujie shadow tree re-rendering invalidates ElementHandle, switched to evaluate real-time query |
| 3 | Save draft not confirmed | readPageText returns empty |
Discovered that text signals are completely blind in shadow root, recursively penetrates shadow DOM |
| 4 | Still "please select first" | Page shows validation prompt | Discovered that after checking originality, an annotation must be selected, added --cs parameter |
| 5 | Still "please select first" | Screenshot: shooting location required dialog | Switched to ai_generated annotation type |
| 6 | Still fails | Context evidence contradicts screenshot | Discovered hidden template pollution, added visibility triple filter |
| 7 | False positive | List page marker matches but dialog still covering | Discovered that the verification method itself created false evidence, abandoned navigation verification approach |
| 8 | Error "Save draft rejected by platform" | Screenshot: green "saved" toast | Discovered save was always successful, fixed false reporting |
| 9 | switchedDraftTab is not defined |
stderr | Cleaned up dead code references |
| 10 | Not confirmed | List page only shows published videos | Final solution: poll for "saved" toast within 6 seconds |
| ✅ | Two consecutive PASS | draftVerified=true |
Converged, submitted |
The entire process had no human involvement. The AI read screenshots, analyzed logs, rejected its own approaches, and changed its mind. Finally, commit 7711e65 was merged.
The complete record of this case (screenshots, diagnostic lines, decision basis for each round) is in .agent/case-2026-10-31-video-draft-e2e.md, recommended for deep reading—it may be the most complete "AI autonomous iteration" real-world record in open-source projects.
For people without programming background: one sentence can develop a new feature
The biggest value of this model is enabling people without programming background to submit requirements and add features to MatrixMedia.
Before, adding a platform support (e.g., "product tagging") required knowing Electron, Puppeteer, the target platform's page structure, adjusting selectors, handling popups, and writing tests.
Now you only need to:
- Open WorkBuddy (or Cursor / Claude Code), throw the MatrixMedia repo at it
- Say one sentence: "Add product tagging for Douyin, first log in with an account that has tagging permission"
- Wait for the AI to finish: it analyzes the page structure, writes code, runs unit tests, verifies on real platforms, fixes bugs, and finally gives you a PR
The only prerequisites are two:
- AI model supports image recognition: AI needs screenshots to compare requirements (e.g., "what does the product tagging button look like")
- Account already logged in: if it's media platform content development (like product tagging, originality declaration), you need to log in with an account that has the corresponding permission (e2e automatically skips platforms not logged in)
WorkBuddy is ByteDance's AI coding tool, available in China directly, supports MCP. MatrixMedia's MCP Server is in mcp/ directory, WorkBuddy can directly connect. After connecting, WorkBuddy can not only help you write code, but also directly call MatrixMedia's publishing capability—after writing the product tagging feature, it can publish the video right away.
This is not "low-code", this is "no-code"
Someone might say: isn't this just a low-code platform?
No. Low-code platforms give you a visual interface to drag and drop components. MatrixMedia's AI managed mode is you directly speak the requirement, and the AI writes real, maintainable, test-covered code.
The generated code is real JavaScript, goes through real Git flow, has real unit tests and e2e tests. You can review, modify, merge. The AI doesn't replace developers; it replaces the "development + testing" step.
And this model is open-source. The rules in .agent/README.md, e2e/run.js, AGENTS.md are all public. You can fork this workflow into your own projects.
Project current state: maintenance mode + AI managed
MatrixMedia is currently in maintenance mode: only bug fixes and platform anti-scraping adaptation, no new features. But the "AI-automated e2e development mode" is an exception—it's the infrastructure of maintenance mode, allowing the AI to fix bugs and do anti-scraping adaptation by itself.
From v0.14.0 onward, all PRs to the main publishing pipeline (whether human or AI submitted) must pass e2e verification. AGENTS.md states clearly:
Changes to the main publishing pipeline must be verified by AI (or human) through e2e real platform verification, convergence criterion is target platform
draftVerified=true/ exit code 0.
This means MatrixMedia's quality bar hasn't been lowered due to AI involvement; it has been raised—previously human PRs might only run unit tests, now AI-written PRs must pass real platform verification.
Ending
MatrixMedia GitHub repository: https://github.com/hanliang97/MatrixMedia
If you're doing self-media matrix, or interested in "AI autonomous development", welcome to Star, Fork, and submit Issues. The pinned Issue #35 "Everyone finds bugs" is long-term open, with the same rules for humans and AI.
If you also want to add an AI-automated e2e mode to your own open-source project, all documents and code in .agent/ and e2e/ directories can be referenced directly.
This is the 15th and final article in the MatrixMedia series. The project has entered AI managed state; subsequent feature iterations, bug fixes, and anti-scraping adaptation will be completed autonomously by AI. Humans only need to provide accounts and one-sentence requirements.