This file is the canonical instruction set for AI agents working in this repo. Follow it. The human is in charge; the agent assists. Prioritize small, reviewable changes and help users succeed with CI.
- Never commit directly to
developormain. - Never skip pre-commit hooks (
--no-verify) or force push. - Never commit secrets, credentials, or
.envfiles. - Never self-approve agent-generated code. Independent review is required.
- Never make sweeping refactors or introduce new patterns without prior human discussion in the issue.
Accountability: The person who submits the PR is 100% responsible for its contents. Responsibility never transfers to the agent.
Run these after editing. Replace <file> with the path(s) you changed.
# Style and format (run before commit)
pre-commit run --files <file>
# Or all files:
pre-commit run --all-files# Python lint (pre-commit uses --errors-only; for full output)
pylint <file># Python unit tests — targeted or full
pytest tests/unittests/<path>/ -v
# Or broader:
pytest tests/unittests/ -v# App tests
cd app && yarn test# E2E tests
cd e2e-pw && yarn e2eIf the environment is not set up:
- Python 3.9–3.12 (3.10+ recommended). Node and Yarn needed for App work.
- Run:
bash install.sh -d - Run:
pre-commit install - Verify:
pre-commit run --all-filesthen e.g.pytest tests/unittests/utils/ -v
- Prefer the smallest change that fixes the issue. Use
rgto locate files. - After editing: run
pre-commit run --files <changed_files>and the relevant test subset (see Commands / Testing). - Follow existing patterns; do not introduce new ones without human agreement.
- Give the agent access to this file and relevant FiftyOne Skills/MCP. Start in planning or read-only mode.
- Agent explores and proposes a plan. Human reviews the plan before any edits. Adjust scope early if needed.
- Edit only after the plan is approved. Keep changes small; human reviews as you go.
- Before the human opens a PR: apply code style (use fiftyone-code-style for Python, fiftyone-voodo-design for App UI; see Code style), add or update tests, run tests locally.
- Human opens the PR. In the description: state that an agent was used and how you tested.
| Change type | Edit → then run |
|---|---|
| Python | pre-commit run --files <file> → pytest tests/unittests/<relevant>/ -v |
| App | pre-commit run --files <file> → cd app && yarn test |
| Docs | Follow STYLE_GUIDE.md. No pre-commit on RST. Optionally build: bash docs/generate_docs.bash (see docs/README.md). |
| New feature | Same as above + add/update tests |
| Path | Purpose |
|---|---|
fiftyone/ |
Core Python SDK (data, datasets, model zoo, operators) |
fiftyone/server/ |
Backend server (GraphQL to App) |
app/ |
TypeScript/React App (modular packages) |
tests/ |
Python tests: unittests/, integration, isolated/, no_wrapper |
e2e-pw/ |
Playwright E2E tests |
docs/ |
Sphinx/RST documentation |
plugins/ |
Plugin ecosystem (sandbox; see below) |
- Always: Minimal diffs, follow existing patterns, targeted tests.
- Ask first: New dependencies, CI changes, public API changes, large
refactors. Discuss significant changes in the issue (e.g.
needs design). - Never: See Golden rules.
Follow the repo’s style standards. They are the source of truth.
- Python: STYLE_GUIDE.md — Google style, black, pylint, 79-char line, no type annotations. Use the fiftyone-code-style skill when writing or editing Python so the agent follows FiftyOne conventions.
- App: app/CODING_STANDARDS.md and STYLE_GUIDE.md — TypeScript, Prettier, ESLint, Biome, Jotai for new state. Use the fiftyone-voodo-design skill for UI/React components and VOODO design tokens.
- Docs: RST in
docs/, 79-char line; do not edit existing anchor links.
Do not guess style. When in doubt, read the files above or use the matching skill.
- Python: pytest; CI uses wrapper (see Testing).
- App: Vitest (
yarn test). Docs: Sphinx, RST. - API/usage:
https://docs.voxel51.com/llms.txt— do not guess APIs.
- Branch from
develop(default branch; notmain). - Branch prefixes:
feature/,bugfix/,release/,hotfix/. - Small, logical commits; explain “why” not “what”.
-
Targeted Python:
pytest tests/unittests/<module>/ -vorpytest tests/unittests/<module>/test_<name>.py -v(e.g.pytest tests/unittests/map/ -v). -
Full Python (wrapper): Same as CI. Run:
python tests/utils/pytest_wrapper.py tests/ --verbose \ --ignore tests/benchmarking/ --ignore tests/isolated/ --ignore tests/utils/ \ --ignore tests/intensive/ --ignore tests/no_wrapper
-
No-wrapper:
pytest tests/no_wrapper --verbose -
App:
cd app && yarn test(Vitest; see app/README). -
E2E:
cd e2e-pw && yarn e2e(Playwright).
CI also runs isolated tests separately (tests/isolated/ via wrapper, one
file at a time). Use the full wrapper + no_wrapper for local parity with CI.
New features require tests. Agent-generated code must have the same coverage as hand-written code.
- Create:
fiftyone plugins create <name>(e.g. under~/fiftyone/__plugins__/). - Move fast in plugins; be deliberate in core. Use
develop-pluginskill for guided workflows. - Nothing in the sandbox affects
fiftyone/orapp/without a full PR and review.
- Agents do not create or open PRs. The human opens the PR. The agent prepares changes, runs tests, and reports back; the human submits.
- When opening a PR (as the human): use
.github/pull_request_template.md, targetdevelop, state that an agent was used and how you tested. - Keep PRs small and focused. At least one human approval; all CI must pass.
Extra care in: auth, secrets/key management, infra/CI-CD, customer data/telemetry/logging. In these areas: small PRs, explicit human review, do not rely on the agent alone for security reasoning. When in doubt, discuss with the team first.
| Problem | Action |
|---|---|
| Pre-commit failed | Read hook output. Fix style/pylint; re-run pre-commit run --files <file>. |
| Pylint | Pre-commit uses --errors-only. Run pylint <file> for full output. Use # pylint: disable=rule sparingly. |
| Test failed | Run failing test with -v; confirm your change didn’t break behavior. |
| Import after install | Use editable install: bash install.sh -d. |
| CI tests failed | Run same subset locally (e.g. pytest tests/unittests/... or wrapper with same ignores). |
| App build/test failed | cd app && yarn install && yarn test; check Node/yarn version. |
Use this format: what you changed, what you ran, and that it passes.
Good: “Edited fiftyone/core/dataset.py, ran pre-commit run --files fiftyone/core/dataset.py, ran pytest tests/unittests/ -v for the relevant
module. All pass.”
Use FiftyOne Skills and FiftyOne MCP Server for official workflows and style. Code style: see Code style.
curl -sL skil.sh | sh -s -- voxel51/fiftyone-skillsRepo: fiftyone-skills. Key for this repo: fiftyone-code-style, fiftyone-voodo-design, fiftyone-develop-plugin; plus dataset import/export, duplicates, embeddings, inference, evaluation, issue triage.
Required for dataset/operator skills (import, export, duplicates, inference, etc.). Install:
pip install fiftyone-mcp-serverConfigure your AI tool with fiftyone-mcp (same Python env).
Repo: fiftyone-mcp-server
References: CONTRIBUTING.md, STYLE_GUIDE.md, app/CODING_STANDARDS.md, CODE_OF_CONDUCT.md, ISSUE_POLICY.md. Claude: ln -s AGENTS.md CLAUDE.md.