ai-atelie
AGENTS.md9 starsChanged 6 months agoMITView on GitHub
Project orientation for any agent working on this repo (Claude Code, OpenCode, Codex, or other AGENTS.md-aware CLIs). AI Atelie — a local-first, MIT-licensed design atelier. Designs live as sandboxed folders of HTML/JSX/CSS that the user and an agent CLI shape together. The repo wires into whichever coding-agent CLI is on PATH (Claude Code, Kimi, Codex, etc.) rather than bundling a proprietary agent. Bun workspaces: api, web, mcp (see package.json). Dev-time contributor skills live at .claude/skills/<name>/SKILL.md. They are loaded by Claude…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 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 repository20 other files it gives its agents.
- canvas-syncSkill
- cuj-guardianSkill
- frontend-designSkill
- grill-meSkill
- pr-evidenceSkill
- semantic-commitSkill
- ship-taskSkill
- verify-with-playwrightSkill
- animated-videoSkill
- create-design-systemSkill
- design-aesthetic-presetsSkill
- design-critiqueSkill
- design-md-authorSkill
- exportSkill
- frontend-designSkill
- handoff-to-claude-codeSkill
- interactive-prototypeSkill
- make-tweakableSkill
- save-as-standalone-htmlSkill
- send-to-canvaSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Comments: default to none. Only annotate non-obvious *why* — hidden constraints, surprising invariants, workarounds for specific bugs.
- Very specific: line 76
Use it for: trivia graders, AI-powered tutors, "rewrite this" buttons, in-artifact chatbots — anything that needs an LLM at runtime, not …
- Very specific: line 90
If you add MCP servers, note that OpenCode and Claude Code use different formats: Claude reads .mcp.json with mcpServers.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
AGENTS.md
Project orientation for any agent working on this repo (Claude Code, OpenCode, Codex, or other AGENTS.md-aware CLIs).
What this is
AI Atelie — a local-first, MIT-licensed design atelier. Designs live as sandboxed folders of HTML/JSX/CSS that the user and an agent CLI shape together. The repo wires into whichever coding-agent CLI is on PATH (Claude Code, Kimi, Codex, etc.) rather than bundling a proprietary agent.
Workspaces
api/ Bun + Hono SSE server bridging the web UI to the local agent CLI
web/ React + Vite editor; each design at web/projects/<id>/ as raw HTML/JSX/CSS
mcp/ ask-user, starters, capability surface — including DesignCanvas protocol
skills/ end-user product skills loaded into adapter-spawned editor sessions
.claude/skills/ contributor (dev-time) skills loaded when working ON this repo
atelier/ canonical craft rulebook (typography, color, anti-slop, accessibility, …)
docs/ contributor-facing docs and architecture notesBun workspaces: api, web, mcp (see package.json).
Common commands
bun install # install workspace deps
bun run dev # start api + web together (concurrently)
bun run build # production build of web
bun run test:e2e # Playwright e2e (excludes journeys)
bun run test:journeys # Playwright journey suite (CUJ + per-feature)
bun run journeys # journeys + inline PR-evidence pipelineConventions
- Commits: Conventional Commits 1.0.0 with the closed scope set
api | web | mcp | skills | repo | deps. Imperative subject. CHANGELOG is auto-generated by changelogen + bumpp — write commit bodies that read well in the changelog. - Branching / PRs: one branch with multiple semantic commits, one PR. Don't split a logical change across multiple PRs.
- Comments: default to none. Only annotate non-obvious why — hidden constraints, surprising invariants, workarounds for specific bugs.
- Tests:
web/tests/e2e/cuj.spec.tsis the load-bearing Critical User Journey. Any change that plausibly affects routes, onboarding, canvas, or chat must keep it green.
Skills
Dev-time contributor skills live at .claude/skills/<name>/SKILL.md. They are loaded by Claude Code natively; OpenCode also auto-discovers them from .claude/skills/ (alongside its own .opencode/skills/). Skill frontmatter follows the standard name + description schema — no harness-specific fields.
Notable skills:
ship-task/— task → understand → implement → verify → semantic commit → PR with evidencecuj-guardian/— gate and triage the CUJ on every PRverify-with-playwright/— drive a real browser, capture screenshots/video for PR evidencepr-evidence/— inject the inline-evidence block into a PR's bodysemantic-commit/— draft Conventional Commits messages tuned to the scope setfrontend-design/— aesthetic + convention guide for the host app's chromecanvas-sync/— keep DesignCanvas coherent across canonical / mirror / host wiring
Architecture notes
Each project at web/projects/<id>/ is served raw to an iframe canvas — no build step inside a project, pages run with CDN React + Babel-Standalone. The canvas surface (mcp/starters/DesignCanvas.jsx) has a byte-identical mirror at web/projects/demo/design-canvas.jsx; the protocol is documented in mcp/CANVAS_PROTOCOL.md. The canvas-sync skill enforces parity.
The agent CLI is launched as a subprocess by the api server; SSE streams responses back to the editor. Skills inside an editor session come from ENV.SKILLS_DIR (the product skills/ directory), not from .claude/skills/ — that's contributor-only.
Runtime AI in artifacts (window.ai.complete)
Generated artifacts (HTML files in the sandboxed preview iframe) can make one-shot AI calls at runtime — no API key in the artifact, no SDK to import, provider-neutral:
const reply = await window.ai.complete("grade this answer: ...");
// or: await window.ai.complete({ messages: [{ role: "user", content: "..." }] })How it works:
- A bridge script is auto-injected into every HTML response from
/p/:id/*(seeapi/src/routes/projects.ts→AI_COMPLETE_BRIDGE). Defineswindow.ai.complete(andwindow.claude.completeas a legacy alias). - The artifact
postMessages__ai_completeto its parent. The host listener inweb/src/lib/tweakBridge.tsforwards toPOST /api/artifacts/complete, tagging the request with the active model fromloadModelId(). - The route (
api/src/routes/artifacts.ts) callspickAdapter(modelId).complete()— the same dispatch the agent path uses. EachAgentAdapterimplementscomplete()(agents/{claude,kimi,opencode}/complete.ts). OpenCode fans out further to whatever provider/model the user configured. - Rate-limit (10 req/min per IP+UA) and daily token cap are provider-agnostic.
Use it for: trivia graders, AI-powered tutors, "rewrite this" buttons, in-artifact chatbots — anything that needs an LLM at runtime, not just at generation time. Demo at web/projects/demo/claude-complete-demo.html. The agent's prompt (api/src/services/promptBuilder.ts) already teaches this surface so it can author artifacts that use it.
Local dev quirks
- Vite binds
localhostand IPv6, not127.0.0.1. ccr-live-previewauto-restarts on:5173/:5174if killed — don't fight it.
OpenCode compatibility
This repo is configured for both Claude Code and OpenCode out of the box:
.claude/skills/— read by both nativelyAGENTS.md(this file) — read by bothopencode.json— points OpenCode at this file viainstructions
If you add MCP servers, note that OpenCode and Claude Code use different formats: Claude reads .mcp.json with mcpServers; OpenCode reads mcp in opencode.json with type + array-form command. There's no fallback between them — you'll need to maintain both.
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.

