socai
AGENTS.md230 starsChanged 2 months agoApache-2.0View on GitHub
The repo has a Rust core (core/), a Rust CLI (cli/), and a Tauri 2 desktop app (app/). The Rust core is the active shared implementation for CLI/TUI/Tauri. Install, commands, browser setup, local development, and the reference-docs index live in docs/guide.md. Keep usage and development documentation in that guide, with developer workflows under Local development. The README is the user-facing product pitch. - Do NOT add new tests to Rust code unless the user explicitly asks. This applies even when…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- clean-targetsSkill
- socai-model-syncSkill
- socai-releaseSkill
- socai-site-deploymentSkill
- rsiSkill
- socai-cliSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When adding a capability or supporting another site, follow that skill's instructions.
- Very specific: line 41
Keep browser/session ownership inside core/src/runtime/ and core/src/cdp/.
- Distinctive: line 43
Keep JS extractors in a small JSON-returning contract.
- Very specific: line 71
Design system is monochrome: Use tokens from app/src/styles.css (--ink-0..9, --canvas, --fg, --line, etc.).
- Very specific: line 128
Keep the expert's product category at 05-MarketingGrowth.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
socai agent notes
The repo has a Rust core (core/), a Rust CLI (cli/), and a Tauri 2 desktop
app (app/). The Rust core is the active shared implementation for
CLI/TUI/Tauri.
Install, commands, browser setup, local development, and the reference-docs index live in docs/guide.md. Keep usage and development documentation in that guide, with developer workflows under Local development. The README is the user-facing product pitch.
Engineering rules
- Do NOT add new tests to Rust code unless the user explicitly asks. This
applies even when you add a new function or change behavior — ship the change
without a test. It is fine (and expected) to update an existing test when you
change an API it already covers, but do not create new
#[test]functions or growmod testson your own initiative. - Add new features and new platforms by following rsi. When adding a capability or supporting another site, follow that skill's instructions.
Rust core — core/
core/src/agent/: generic agent loop, LLM providers, run state, tool trait.core/src/cdp/: CDP endpoint discovery, connection lifecycle, tab sessions, and page factories.core/src/media/: optional media enrichment helpers.core/src/runtime/: shared in-process runtime handle used by each entrypoint.core/src/sites/xhs/: Xiaohongshu entities, JS extractors, page runtime, and site tools.
Rust CLI — cli/
Entry point package for the socai binary. It depends
on socai-core; keep CLI daemon/socket plumbing thin and keep browser/session
ownership inside the core runtime.
Rules:
- Keep browser/session ownership inside
core/src/runtime/andcore/src/cdp/; CLI daemon/socket plumbing should stay thin. - Keep JS extractors in a small JSON-returning contract; Rust injects, calls, and validates results.
- Tool subcommands wrap existing
XhsPageRuntime/ site tools — don't duplicate XHS logic in the daemon. Any cleanups to the public data shape go incore/src/sites/xhs/entities.rsandcore/src/sites/xhs/tools.rs, not in the daemon layer.
Desktop app — app/
Stack: Tauri 2.11 (Rust shell) + Vite 6 + vanilla TypeScript (no UI framework).
Bundle identifier com.socai.app.
Layout:
app/src/: frontend —main.ts,styles.css,assets/.app/src-tauri/: Rust shell —lib.rs,tauri.conf.json,capabilities/,icons/.app/branding/: icon source-of-truth —app-icon.svg+ rasterizedapp-icon.png.
Dev and build (run from app/):
pnpm install # one-time
pnpm exec tauri dev # daily dev loop (Vite HMR + Rust hot recompile)
pnpm exec tauri build --bundles app # → target/release/bundle/macos/socai.appRules:
- Design system is monochrome. Use tokens from
app/src/styles.css(--ink-0..9,--canvas,--fg,--line, etc.). No accent colors. Status is filled vs hollow, never hue. - Hairlines, not shadows.
--line(#e5e5e5) carries all structural separation.--shadow-popis reserved for popovers only. - Use the type-scale classes —
.t-display,.t-h1,.t-h2,.t-h3,.t-lede,.t-body,.t-small,.t-eyebrow(mono uppercase),.t-mono. Don't reinvent. tauri(Rust) and@tauri-apps/api(npm) must share major/minor. Bumping one requires bumping the other in the same commit; Tauri CLI hard- fails on minor drift.
Regenerating the app icon — edit branding/app-icon.svg, then from app/:
rsvg-convert branding/app-icon.svg -w 1024 -h 1024 -o branding/app-icon.png
pnpm exec tauri icon branding/app-icon.pngBoth steps are deterministic. Commit the changed files in src-tauri/icons/.
The mobile / Microsoft Store fan-out emitted by tauri icon is gitignored —
regenerate on demand if a mobile target is ever added.
Gotchas:
- macOS LaunchServices caches icons aggressively. After a rebuild that changes
the icon, run
killall Dock; killall Finderto flush. If the bundle identifier or productName changed, also run/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user. - Fonts (General Sans, Geist Mono) load via Fontshare / Google Fonts CDNs at
runtime. For offline-capable production builds, bundle
.woff2and replace the two@importrules at the top ofapp/src/styles.css. - The Vite dev server ignores
src-tauri/**(seevite.config.ts) so Rust file changes don't cause spurious frontend reloads. Rust edits trigger a full Tauri shell restart instead.
WorkBuddy ecosystem packages — plugins/workbuddy/
Skill and expert packages published to the WorkBuddy / CodeBuddy marketplace.
Layout, packaging, and upload paths are documented in
plugins/workbuddy/README.md.
Rules:
- The Xiaohongshu skill source of truth is
plugins/workbuddy/xiaohongshu-socai/.xiaohongshu-research-expert/skills/is a build artifact injected bybuild.sh— never edit it by hand. The multi-platform WorkBuddy skill has its own source atplugins/workbuddy/socai-social-research/. - Run
plugins/workbuddy/build.shafter any skill change. It validates frontmatter /plugin.jsonagainst the open-platform spec before zipping, so a spec violation fails the build instead of failing upload. Three zips are produced: the Xiaohongshu skill, the multi-platform skill, and the expert (with the Xiaohongshu skill inlined). - Expert display copy has hard constraints the validator enforces:
displayDescription.zhmust be 40–50 characters,tagsandquickPromptsmust each have exactly 3 entries,defaultInitPromptmust equalquickPrompts[0], and the avatar must be ≤500KB. - Keep the expert's product category at
05-MarketingGrowth. Do not move it to02-Engineering— WorkBuddy's audience is office knowledge workers, and that category gets no traffic.
WeChat group QR maintenance
The WeChat group QR lives in two places that must stay in sync:
docs/assets/wechat-group-qr.jpg (shown in the README) and
site/public/wechat-group-qr.jpg (served on the site's /contact page). They
are byte-identical copies. WeChat group QR codes expire after 7 days and can't
be fetched via any API — the user must re-export it manually from WeChat on
their phone.
A sessionStart hook in .cursor/hooks.json (and the Claude Code
SessionStart hook in .claude/settings.json) checks the file's last git
commit date and, if ≥6 days old, injects a [wechat-qr-reminder]. On seeing it,
remind the user at the start of your reply.
To update: ask the user for the freshly exported image, overwrite both
docs/assets/wechat-group-qr.jpg and site/public/wechat-group-qr.jpg (same
names/paths — README and /contact page need no change), then commit
(docs: refresh wechat group QR) and push to main.
This QR refresh is the only case where committing and pushing to main is
pre-authorized without per-time confirmation; everything else still follows the
default commit/push-only-when-asked rule.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

