agentleFS
Sayhi-bzbSayhi-bzb/Agent-HTML/agent-html/AGENTS.md

Agent-HTML / agent-html

AGENTS.md539 starsChanged 6 months agoApache-2.0View on GitHub

For cold start, read agent-html/README.md first, then this file. This file owns hard operating rules and strong defaults. - Keep agent-html as a portable source workspace. - Treat canvases/.layout/** as generated geometry; inspect it only through an explicit spatial query. - Do not add node_modules, lockfiles, generated bundles, .vite, dist, build, vendored dependency folders, full graphs, declaration rollups, or tool dumps inside agent-html. - Keep AGENTS.md, components.json, and tsconfig.json at the workspace root for agent, shadcn, TypeScript, and editor discovery.…

  • 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 repository8 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

33 rules. About 0 are common, 9 are distinctive, and 24 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 24

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Keep agent-html as a portable source workspace.

    line 7
  2. Very specific:

    Treat canvases/.layout/ as generated geometry.

    line 8
  3. Very specific:

    Do not add node_modules, lockfiles, generated bundles, .vite, dist, build, vendored dependency folders, full graphs, declaration rollups, …

    line 9
  4. Very specific:

    Keep AGENTS.md, components.json, and tsconfig.json at the workspace root for agent, shadcn, TypeScript, and editor discovery.

    line 10
  5. Very specific:

    Use index/* only as generated decision context.

    line 11
  6. Very specific:

    Use GOVERNANCE.md before changing workspace conventions, route files, generated indexes, artifact or data patterns, or copyable examples.

    line 15
  7. Very specific:

    Put artifact entries in artifacts/*.artifact.tsx.

    line 19
  8. Very specific:

    Import defineArtifact from @agent-html/react.

    line 20
  9. Very specific:

    Default export defineArtifact({ title, blocks }) from artifact entries.

    line 21
  10. Distinctive:

    Use artifact entries only for artifact title and block order.

    line 22
  11. Very specific:

    Put split block implementations in artifacts/<artifact>/<block-id>.block.tsx.

    line 23
  12. Very specific:

    Default export the block component from each *.block.tsx file.

    line 24
  13. Distinctive:

    Use stable, unique, readable, kebab-case block ids.

    line 25
  14. Very specific:

    Use { id, title } only when the visible block title cannot be inferred from the id.

    line 26
  15. Distinctive:

    Do not render host block prompt actions or block hover chrome from artifact source.

    line 27
  16. Very specific:

    Do not use old AHTML <Cell> DSL for React Canvas artifacts.

    line 28
  17. Very specific:

    Put common visual primitives in components/ui.

    line 32
  18. Very specific:

    Put rich reusable components in components/<name>.tsx or components/<name>/.

    line 33
  19. Very specific:

    Put reusable React behavior in hooks, pure helpers in lib, shared contracts in types or schema, and Canvas CSS in styles.

    line 34
  20. Distinctive:

    Keep artifact data artifact-local unless multiple artifacts consume it and a route names the shared owner.

    line 35
  21. Distinctive:

    Keep generated or raw data separate from authored interpretation.

    line 36
  22. Very specific:

    Put bundle-time imports in assets, artifact-owned URL files in artifacts/<artifact>/public, and shared URL files in public.

    line 37
  23. Very specific:

    Do not import from ../public or ./public.

    line 39
  24. Very specific:

    Check index/api-surface.md before adding, duplicating, or changing a local primitive, hook, helper, schema, or shared component.

    line 43
  25. Very specific:

    Check index/style-surface.md before adding or changing artifact-facing Canvas classes.

    line 44
  26. Very specific:

    Use styles/layouts/index.css L2 composition classes when they fit ordinary artifact content styling.

    line 45
  27. Distinctive:

    Do not use raw palette classes, arbitrary value classes, or inline visual styles in artifacts.

    line 46
  28. Distinctive:

    Do not recreate root reading width, block hover highlighting, toolbar placement, sidebar chrome, or theme editor chrome in artifact source.

    line 47
  29. Very specific:

    Treat every agent-html validate diagnostic as blocking.

    line 48
  30. Very specific:

    Use TASTE.md before changing artifact visual composition, media-heavy blocks, layout density, component choice, source placement, or …

    line 50
  31. Distinctive:

    Do not call Codex app-server, the filesystem, shell commands, MCP servers, or privileged host APIs from artifact code.

    line 54
  32. Very specific:

    Do not import @/app/*, apps/agent-html-app, @/agent-html/runtime/ui, renderAgentHtml, or renderInteractiveAgentHtml.

    line 55
  33. Distinctive:

    Do not import Canvas host internals from artifact source.

    line 56

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AgentHTML React Canvas

For cold start, read agent-html/README.md first, then this file. This file owns hard operating rules and strong defaults.

Workspace Boundaries

  • Keep agent-html as a portable source workspace.
  • Treat canvases/.layout/** as generated geometry; inspect it only through an explicit spatial query.
  • Do not add node_modules, lockfiles, generated bundles, .vite, dist, build, vendored dependency folders, full graphs, declaration rollups, or tool dumps inside agent-html.
  • Keep AGENTS.md, components.json, and tsconfig.json at the workspace root for agent, shadcn, TypeScript, and editor discovery.
  • Use index/* only as generated decision context. Do not edit generated index files by hand.
  • package.json is generated source dependency metadata. Change the Kernel runtime catalog, then run npm run canvas:catalog:sync; do not edit dependency versions here by hand.
  • Use GOVERNANCE.md before changing workspace conventions, route files, generated indexes, artifact or data patterns, or copyable examples.

Artifact Protocol

  • Put artifact entries in artifacts/*.artifact.tsx.
  • Import defineArtifact from @agent-html/react.
  • Default export defineArtifact({ title, blocks }) from artifact entries.
  • Use artifact entries only for artifact title and block order.
  • Put split block implementations in artifacts/<artifact>/<block-id>.block.tsx.
  • Default export the block component from each *.block.tsx file.
  • Use stable, unique, readable, kebab-case block ids.
  • Use { id, title } only when the visible block title cannot be inferred from the id.
  • Do not render host block prompt actions or block hover chrome from artifact source.
  • Do not use old AHTML <Cell> DSL for React Canvas artifacts.

Source Ownership

  • Put common visual primitives in components/ui.
  • Put rich reusable components in components/<name>.tsx or components/<name>/.
  • Put reusable React behavior in hooks, pure helpers in lib, shared contracts in types or schema, and Canvas CSS in styles.
  • Keep artifact data artifact-local unless multiple artifacts consume it and a route names the shared owner.
  • Keep generated or raw data separate from authored interpretation.
  • Put bundle-time imports in assets, artifact-owned URL files in artifacts/<artifact>/public, and shared URL files in public.
  • Reference artifact URL files with artifactPublicUrlFactory and shared URL files with sharedPublicUrl.
  • Do not import from ../public or ./public.

API And Style Safeguards

  • Check index/api-surface.md before adding, duplicating, or changing a local primitive, hook, helper, schema, or shared component.
  • Check index/style-surface.md before adding or changing artifact-facing Canvas classes.
  • Use styles/layouts/index.css L2 composition classes when they fit ordinary artifact content styling.
  • Do not use raw palette classes, arbitrary value classes, or inline visual styles in artifacts.
  • Do not recreate root reading width, block hover highlighting, toolbar placement, sidebar chrome, or theme editor chrome in artifact source.
  • Treat every agent-html validate diagnostic as blocking. Kernel rules cannot be disabled or suppressed from workspace source.
  • Use TASTE.md before changing artifact visual composition, media-heavy blocks, layout density, component choice, source placement, or narrative UI.

Forbidden Imports And Actions

  • Do not call Codex app-server, the filesystem, shell commands, MCP servers, or privileged host APIs from artifact code.
  • Do not import @/app/*, apps/agent-html-app, @/agent-html/runtime/ui, renderAgentHtml, or renderInteractiveAgentHtml.
  • Do not import Canvas host internals from artifact source.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.