agentleFS
apacheapache/echarts/AGENTS.md

echarts

AGENTS.md67k starsChanged 4 years agoApache-2.0View on GitHub

Apache ECharts is a TypeScript-first charting library. Most runtime code lives in src/, while build scripts, test utilities, and packaging logic live alongside it in dedicated top-level folders. One thing worth knowing early is that this repo is assembled through explicit registration and curated entry files. New runtime code often needs to be connected not only in its local module, but also through public exports or bundle entry files before it becomes part of a user-facing build. When a task…

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

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a task touches contribution workflow, prefer the repo's own contributor-facing documents over this summary:

    line 11
  2. Distinctive:

    Follow the repo's PR template when opening or updating a pull request.

    line 25
  3. Very specific:

    If you need to work on linked zrender code, the dev-environment wiki recommends using an absolute symlink at node_modules/zrender instead …

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

AGENTS.md

Overview

Apache ECharts is a TypeScript-first charting library. Most runtime code lives in src/, while build scripts, test utilities, and packaging logic live alongside it in dedicated top-level folders.

One thing worth knowing early is that this repo is assembled through explicit registration and curated entry files. New runtime code often needs to be connected not only in its local module, but also through public exports or bundle entry files before it becomes part of a user-facing build.

Contributor Docs

When a task touches contribution workflow, prefer the repo's own contributor-facing documents over this summary:

  • CONTRIBUTING.md for general contribution guidance
  • https://github.com/apache/echarts/wiki/How-to-make-a-pull-request for PR workflow, test expectations, and git message conventions
  • https://github.com/apache/echarts/wiki/How-to-setup-the-dev-environment for local setup and zrender-linked development
  • https://github.com/apache/echarts/wiki/Security-Checklist-for-Code-Contributors for security-sensitive API and API-design checks
  • .github/pull_request_template.md for PR structure
  • .github/workflows/ for CI expectations

This file is only a short orientation note. If there is any conflict, the repo's dedicated contributor docs should win.

A few stable rules from the PR wiki are especially worth keeping in mind:

  • In non-release PRs, avoid committing dist/, i18n/, and ssr/client/dist/.
  • Follow the repo's PR template when opening or updating a pull request.
  • Git messages follow the repo convention: <type>(<scope>): <subject>. close #<issue_id>, with the issue-closing suffix omitted when there is no related issue.
  • If you need to work on linked zrender code, the dev-environment wiki recommends using an absolute symlink at node_modules/zrender instead of npm link, because the watch flow depends on that setup.
  • Be cautious with security-sensitive web APIs such as innerHTML, arbitrary DOM selectors, eval-like execution, raw style injection, and navigation-related APIs. If a feature must allow that kind of behavior, the security checklist expects clear documentation warnings.

Project Layout

  • src/: built-in charts, components, coordinate systems, models, renderers, features, themes, and i18n source
  • src/export/*.ts: public modular export surfaces
  • src/echarts.all.ts, src/echarts.common.ts, src/echarts.simple.ts, src/echarts.ts: main bundle entry files
  • extension-src/: separately packaged extensions
  • ssr/client/src/: SSR client source
  • build/: build, packaging, prepublish, and generation scripts
  • test/ut/spec/: Jest unit tests
  • test/*.html: browser-based rendering and interaction cases

Source And Generated Files

In general, src/ is the main source of truth for built-in library behavior.

Some top-level files and folders are generated or packaging-oriented:

  • i18n/*.js and i18n/*-obj.js are generated from src/i18n/*.ts
  • lib/, types/, extension/, ssr/client/lib/, ssr/client/types/, and root index*.js are produced by the build/prepublish flow
  • dist/ contains build output

The top-level theme/*.js files are packaged theme sources rather than normal src/theme/ runtime modules, so they are best treated separately from the generated locale/build artifacts above.

Exports And Entry Files

This repo exposes functionality at a few different layers:

  • local runtime modules under src/
  • modular public exports under src/export/*.ts
  • bundled entry files under src/echarts*.ts

Because of that structure, changes to charts, components, renderers, or features sometimes need corresponding updates in exports or entry files to show up in the expected public build.

Testing

The repository uses two main testing styles:

  • Jest tests in test/ut/spec/ for logic-heavy behavior such as models, utilities, data transforms, and API behavior
  • HTML cases in test/ for rendering, layout, interaction, and visual regressions

For local development, npm run dev starts the watch build and opens the test/ directory. New HTML cases can be scaffolded with npm run mktest.

Common Checks

  • npm run checktype
  • npm run lint
  • npm test
  • npm run test:dts:fast
  • npm run dev

Style Notes

This repository consistently keeps ASF license headers in source and test files, and the codebase style is stable: single quotes, semicolons, and 4-space indentation are the norm. Small changes that follow nearby patterns tend to fit best here.

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 0 mentionsMay 2026: 2 mentionsJun 2026: 2 mentionsJul 2026: 11 mentionsAug 2026: 2 mentionsSep 2026: 2 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the apache/echarts repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about apache/echarts

The biggest 5 of 75 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 75

Talked about on GitHub, Stack Overflow, Bluesky, YouTube and Hacker News (75 times).

On GitHub · 42

37 more on GitHub

On Stack Overflow · 20

15 more on Stack Overflow

On Bluesky · 8

3 more on Bluesky

On YouTube · 4

  • 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 28,693 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.

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.