VChart AGENTS.md

A set of engineering and documentation rules for VisActor/VChart, a charting library for building data visualizations.

In plain words
What is it for?
Use it when changing VChart rendering, updating, interaction, animation, release, public API, performance, tests, or documentation.
Why use it?
It provides project-specific guidance for keeping chart rendering correct, efficient, predictable, and easy to use. It also explains when to avoid extra fallback code and unnecessary work in performance-sensitive paths.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/visactor/vchart/agents-md
Clone the repo
git clone --depth 1 https://github.com/VisActor/VChart

Made for: Codex, OpenCode.

Per session 574 This file is loaded in full into every session.
When invoked 574 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00574 $0.00574
Opus 5 $0.00287 $0.00287
Sonnet 5 $0.00115 $0.00115
Haiku 4.5 $0.00057 $0.00057

Measured yesterday against content hash 55c7d43dc009, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

VChart AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 27 lines

What it actually says

VChart 工程基准

VChart 是高性能可视化渲染库。工程取舍应优先面向正确、文档化的调用方式:快速的 render/update/release 路径、稳定可预期的 API,以及可用、易用的图表行为。

编码习惯

  • 不要在热路径中加入大量宽泛的防御式兜底,除非它保护的是明确记录的公共 API 契约,或有真实兼容性需求支撑。
  • 优先使用清晰契约,而不是静默归一化。内部非法状态应通过测试或边界校验暴露,不应被每个图元运行时 guard 隐藏。
  • per-graphic 的 render/update/state 代码应尽量少分配、少分支。避免不必要的数组创建、对象重建、深比较、resolver 失效、状态清理或重复生命周期工作。
  • 按 VRender API 的预期契约调用。除非存在明确的跨版本兼容理由,不要在 VChart 侧包一层本地兜底逻辑。
  • 当项目已有标准工具、公共 API 或统一封装能表达同一行为时,必须优先收敛到标准写法;如果标准写法无法满足需求,应修正标准工具或上游契约,而不是在调用点维护多套等价或异化实现。暴露并修复标准路径问题,优先于用局部特例掩盖问题。
  • 公共 API 边界要保持易用性,但内部路径不需要长期容忍非标准调用方。
  • 性能是大数据与多图 dashboard 场景下的正确性维度。修改 render、update、state、animation、release 路径时,需要考虑 10k 图元和多 chart 页面。
  • 测试应锁定有效用法下的预期行为。不要把偶然用法或不支持用法固化成兼容承诺,除非该行为已经被明确纳入 API。

文档规范

  • 当前项目文档优先使用中文编写。
  • 面向外部生态或已有多语言体系的文档,可按现有文档结构补充对应语言版本,但中文说明应优先完整、准确。

优先级

  1. 有效 spec 和文档化 API 下的正确渲染。
  2. render、update、interaction、animation、release 的高性能。
  3. 稳定且易用的公共调用方式。
  4. 最小化兼容性兜底,只在真实 API 承诺需要时引入。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 27 lines · 574 tokens per session scan A 55c7d43dc009

Subscribe to this mod's changes

VChart AGENTS.md is an instructions file published in the GitHub repository VisActor/VChart (1,834 stars, last pushed 7d ago), licensed MIT. It adds 574 tokens to every session, about $0.0029 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.