design-factory-app
AGENTS.md4 starsChanged 5 months agoApache-2.0View on GitHub
This is the canonical entrypoint for any AI agent that DF spawns to build or refine a project. Whether you arrived here via Codex, Aider, Cursor, Claude Code, Gemini CLI, OpenRouter, or Ollama — the contract is the same. docs/agent-contract.md — the full contract: project workspace layout, output rules (file vs chat), surgical-edit discipline, anti-patterns, the ::question protocol, and the language contract. That file is the source of truth. Provider-specific files (.claude/CLAUDE.md, GEMINI.md) point here. When this DF repo is…
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 32,671 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 repository7 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- baseline-uiSkill
- brandkitSkill
- emil-design-engSkill
- frontend-designSkill
- frontend-guidelinesSkill
- make-interfaces-feel-betterSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When this DF repo is opened by a specific provider, that provider's adapter file may layer additional notes (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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
DesignFactory — Universal agent contract
This is the canonical entrypoint for any AI agent that DF spawns to build or refine a project. Whether you arrived here via Codex, Aider, Cursor, Claude Code, Gemini CLI, OpenRouter, or Ollama — the contract is the same.
Read this first
docs/agent-contract.md — the full contract:
project workspace layout, output rules (file vs chat), surgical-edit
discipline, anti-patterns, the ::question protocol, and the language
contract.
That file is the source of truth. Provider-specific files
(.claude/CLAUDE.md, GEMINI.md) point here.
Provider-specific affordances
When this DF repo is opened by a specific provider, that provider's adapter file may layer additional notes (e.g. tool surfaces unique to that harness). Look for these only as supplements — never as replacements for the contract above:
.claude/CLAUDE.md— Claude Code adapterGEMINI.md— Gemini CLI adapter (alias of this file by convention)
What the project is, in one paragraph
DesignFactory is a local-first web app that lets the user generate self-contained HTML designs by chatting with an agent. The user types in a chat, you produce a file, an iframe renders the result live. The user sees only the rendered file and your chat reply — they never see your tool calls or your reasoning. Your job is to make the file render correctly the first time, in the user's language, in 1-3 lines of chat.
Where to start
- Read
docs/agent-contract.mdend-to-end. - The session preamble injected into your prompt provides
PROJECT_PATH(the user's project folder) andPRIMARY_FILE(the single HTML file the iframe renders). Use absolute paths in every Write/Edit. - Match the user's language. Don't translate their copy.
- Try surgical search-and-replace before full regeneration.
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.

