Skip to content
Agentmart
Submit a tool

AGENTS.md · apache/echarts

AGENTS.md from apache/echarts: 83 lines covering Overview, Contributor Docs, Project Layout, Source And Generated Files and more.

Template by apache

IndexedApache-2.0★ 67,585
Write a review

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/apache/echarts/master/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that apache/echarts (67,584 stars) keeps for coding agents. It has 83 lines in 8 sections: Overview; Contributor Docs; Project Layout; Source And Generated Files; Exports And Entry Files; Testing; Common Checks; Style Notes. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
83 lines
File
AGENTS.md

Sections

  1. Overview
  2. Contributor Docs
  3. Project Layout
  4. Source And Generated Files
  5. Exports And Entry Files
  6. Testing
  7. Common Checks
  8. Style Notes

First lines (shown under the repo's Apache-2.0 license)

# 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.

Signals

Stars
67,585
Forks
19,827
Open issues
1,272
Last commit (this folder)
Apr 16, 2026 (6 months ago)
Last release
May 19, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from apache

Cite this page

AGENTS.md · apache/echarts. Agent Mart. https://agentmart.dev/templates/apache-echarts-agents-md (last updated 2026-10-24)