dev-standard

Development standards for Apache Superset, a data-visualization application with Python, Flask, React, and TypeScript parts.

In plain words
What is it for?
Use them when changing Superset code, especially TypeScript or React components, Python typing, tests, or imports for interface components.
Why use it?
They prevent deprecated patterns and keep frontend, backend, typing, and testing changes aligned with the project's current direction.

Cursor rule for Cursor

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 rules/apache/superset/dev-standard
Clone the repo
git clone --depth 1 https://github.com/apache/superset

Made for: Cursor.

Per session 1,147 This file is loaded in full into every session.
When invoked 1,147 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.01147 $0.01147
Opus 5 $0.00574 $0.00574
Sonnet 5 $0.00229 $0.00229
Haiku 4.5 $0.00115 $0.00115

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

Security

Grade A, and why

dev-standard 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.

.cursor/rules/dev-standard.mdc · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apache Superset Development Standards for Cursor IDE

Apache Superset is a data visualization platform with Flask/Python backend and React/TypeScript frontend.

⚠️ CRITICAL: Ongoing Refactors (What NOT to Do)

These migrations are actively happening - avoid deprecated patterns:

Frontend Modernization

  • NO any types - Use proper TypeScript types
  • NO JavaScript files - Convert to TypeScript (.ts/.tsx)
  • NO Enzyme - Use React Testing Library/Jest (Enzyme fully removed)
  • Use @superset-ui/core - Don't import Ant Design directly

Testing Strategy Migration

  • Prefer unit tests over integration tests
  • Prefer integration tests over Cypress end-to-end tests
  • Cypress is last resort - Actively moving away from Cypress
  • Use Jest + React Testing Library for component testing

Backend Type Safety

  • Add type hints - All new Python code needs proper typing
  • MyPy compliance - Run pre-commit run mypy to validate
  • SQLAlchemy typing - Use proper model annotations

Code Standards

TypeScript Frontend

  • NO any types - Use proper TypeScript
  • Functional components with hooks
  • @superset-ui/core for UI components (not direct antd)
  • Jest for testing (NO Enzyme)
  • Redux for global state, hooks for local

Python Backend

  • Type hints required for all new code
  • MyPy compliant - run pre-commit run mypy
  • SQLAlchemy models with proper typing
  • pytest for testing

Apache License Headers

  • New files require ASF license headers - When creating new code files, include the standard Apache Software Foundation license header
  • LLM instruction files are excluded - Files like LLMS.md, CLAUDE.md, etc. are in .rat-excludes to avoid header token overhead

Key Directory Structure

superset/
├── superset/                    # Python backend (Flask, SQLAlchemy)
│   ├── views/api/              # REST API endpoints
│   ├── models/                 # Database models
│   └── connectors/             # Database connections
├── superset-frontend/src/       # React TypeScript frontend
│   ├── components/             # Reusable components
│   ├── explore/                # Chart builder
│   ├── dashboard/              # Dashboard interface
│   └── SqlLab/                 # SQL editor
├── superset-frontend/packages/
│   └── superset-ui-core/       # UI component library (USE THIS)
├── tests/                      # Python/integration tests
├── docs/                       # Documentation (UPDATE FOR CHANGES)
└── UPDATING.md                 # Breaking changes log

Read the full file on GitHub · 126 lines

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 · 126 lines · 1,147 tokens per session scan A 8efab98cf389

Subscribe to this mod's changes

dev-standard is a cursor rule published in the GitHub repository apache/superset (74,542 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,147 tokens to every session, about $0.0057 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.