agentleFS
GreptimeTeamGreptimeTeam/greptimedb/AGENTS.md

greptimedb

AGENTS.md6.7k starsChanged 4 months agoApache-2.0View on GitHub

Guidance for coding agents (Claude Code, Codex, ...) and contributors working in this repository. CLAUDE.md is a symlink to this file. If .local/AGENTS.md or .local/CLAUDE.md is present, you MUST read it as well — it holds personal or machine-local overrides (gitignored, not shared). To record a personal or machine-local override, write it to .local/AGENTS.md (create .local/ and the file if absent), not to this shared file. GreptimeDB is an open-source, cloud-native observability database for unified collection and analysis of metrics,…

  • Installs packages

Trending

Quiet since September.about the whole repository

Dec 2025: 2 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 2 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 3 mentionsAug 2026: 6 mentionsSep 2026: 8 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the GreptimeTeam/greptimedb repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about GreptimeTeam/greptimedb

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

See all 56

Talked about on GitHub, Bluesky and Hacker News (56 times).

On GitHub · 36

31 more on GitHub

On Bluesky · 14

9 more on Bluesky

The file

Show its rules and text

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

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Before editing a path, read every AGENTS.md from the repository root down to that path.

    line 47
  2. Very specific:

    Follow docs/style-guide.md for Rust style, module design, naming, and reuse guidance.

    line 75
  3. Distinctive:

    Check git status --short before editing.

    line 99
  4. Distinctive:

    Do not rewrite history, force-push, or remove files in bulk unless the user explicitly requests it.

    line 101
  5. Very specific:

    Update generated artifacts only through the generators documented in .agents/generated-files.md.

    line 103
  6. Distinctive:

    Use the narrowest command that covers the change, then expand only when its blast radius requires it.

    line 108
  7. Very specific:

    If you added a .rs, .py, or .ts file, apply and verify its license header with hawkeye format followed by hawkeye check.

    line 127
  8. Distinctive:

    If you added or changed a public configuration option, update the applicable example TOMLs, configuration-loading and serialized-config …

    line 134
  9. Very specific:

    If you changed a persisted or wire format, add a compatibility test case (see .agents/architecture-invariants.md).

    line 138
  10. Very specific:

    If you added or gated an enterprise-only file, give it the enterprise license header, list it in licenserc-enterprise.toml (includes) and …

    line 140
  11. Distinctive:

    Use a conventional-commit title, sign off commits (git commit -s), and sign the CLA.

    line 143
  12. Very specific:

    When creating or updating a pull request, follow .github/pull_request_template.md: include the CLA statement, fill the change-intention …

    line 145
  13. Very specific:

    If the change must also land on release branches, add the matching backport-<target> labels (e.g.

    line 154

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

Guidance for coding agents (Claude Code, Codex, ...) and contributors working in this repository. CLAUDE.md is a symlink to this file. If .local/AGENTS.md or .local/CLAUDE.md is present, you MUST read it as well — it holds personal or machine-local overrides (gitignored, not shared). To record a personal or machine-local override, write it to .local/AGENTS.md (create .local/ and the file if absent), not to this shared file.

GreptimeDB is an open-source, cloud-native observability database for unified collection and analysis of metrics, logs, and traces. It is written in Rust and provides sub-second querying at PB scale with high cost efficiency.

Core commands

TaskCommand
Build (debug)make build
Build (release)make build RELEASE=true
Run standalonecargo run -- standalone start
Targeted Rust testscargo nextest run -p <package> (preferred over cargo test)
Full local Rust suitemake test
SQL testscargo sqlness bare (single case: cargo sqlness bare -t <name>)
Formatmake fmt (and make fmt-toml for TOML)
Lintmake clippy (= cargo clippy --workspace --all-targets --all-features -- -D warnings)
Type checkmake check

Toolchain: Rust (stable, pinned by rust-toolchain.toml), Protobuf compiler (>= 3.15), C/C++ build essentials. Install the test runner with cargo install cargo-nextest --locked.

Repo map

GreptimeDB is a Cargo workspace rooted at the repository; most crates live under src/ (plus tests-fuzz, tests-integration, tests/runner). Key areas:

  • Frontend / protocol: src/frontend/ (request orchestration), src/servers/ (wire protocols), src/sql/ (SQL parsing)
  • Storage engines: src/mito2/ (main time-series engine), src/metric-engine/ (metrics), src/file-engine/
  • Coordination: src/meta-srv/ (metadata & cluster control), src/meta-client/
  • Execution / statements: src/operator/ (DDL/DML, request conversion, procedures)
  • Stream / transform: src/flow/ (continuous aggregation), src/pipeline/
  • Query / index: src/query/, src/promql/, src/index/
  • Shared: src/common/, src/datatypes/, src/store-api/ (engine contract), src/catalog/, src/table/

Before editing a path, read every AGENTS.md from the repository root down to that path. The root guide always applies; a nested guide adds or overrides rules for its subtree. Changes spanning multiple subtrees must follow every applicable guide.

AGENTS.md files are maps, not manuals. Keep them short and stable: record where code lives, important boundaries or change-coupling, high-cost gotchas, and the validation entry point. Implementation details belong in code. Do not copy exhaustive test lists or workflow logic; link to the source of truth.

High-change areas and specialized test suites carry their own AGENTS.md with a module map, read/write paths, change-coupling points, and gotchas:

  • src/common/meta/AGENTS.md
  • src/query/AGENTS.md
  • src/servers/AGENTS.md
  • src/operator/AGENTS.md
  • src/mito2/AGENTS.md
  • src/metric-engine/AGENTS.md
  • src/flow/AGENTS.md
  • src/frontend/AGENTS.md
  • src/meta-srv/AGENTS.md
  • tests-integration/AGENTS.md
  • tests/compatibility/AGENTS.md
  • tests/perf/AGENTS.md

Rust style

Follow docs/style-guide.md for Rust style, module design, naming, and reuse guidance.

Read before changing code

  • .agents/architecture-invariants.md — repo-wide rules that are easy to violate and expensive to get wrong (persisted/ wire format compatibility, crate layering, async runtimes, error handling, feature gating, the DataFusion fork).
  • .agents/generated-files.md — tool-generated artifacts that must not be hand-edited (sqlness .result, config/config.md, Grafana dashboards, proto).
  • docs/style-guide.md — code style.
  • CONTRIBUTING.md — contribution flow and CLA.

High-signal entry points

  • Main binary: src/cmd/src/bin/greptime.rs
  • Configuration: src/common/config/, example TOMLs in config/
  • Error handling: src/common/error/ (ErrorExt, StatusCode)
  • Protocol implementations: src/servers/src/

Worktree safety

  • Check git status --short before editing. Preserve unrelated tracked changes and untracked files; re-read files changed by another process.
  • Do not rewrite history, force-push, or remove files in bulk unless the user explicitly requests it.
  • Update generated artifacts only through the generators documented in .agents/generated-files.md.

Validation by change type

Use the narrowest command that covers the change, then expand only when its blast radius requires it.

ChangeMinimum validation
One Rust cratecargo nextest run -p <package>
Cross-workspace Rust behaviormake test; inspect .github/workflows/rust.yml when CI parity matters
SQL parsing, planning, execution, or outputcargo sqlness bare -t <case>; inspect regenerated .result files
Persisted metadata or wire formatAdd/run a case under tests/compatibility/; follow its README.md and AGENTS.md
Public configurationUpdate example TOMLs, loading/serialization snapshots, and docs; run make config-docs
Query regression harness or DSLFollow tests/perf/AGENTS.md
Enterprise-gated codeBuild/test with --features enterprise where applicable and run make check-enterprise-license

For import/export, COPY, or snapshot-storage changes, follow the Windows portability and validation guidance in tests-integration/AGENTS.md.

Before opening a PR

  1. If you added a .rs, .py, or .ts file, apply and verify its license header with hawkeye format followed by hawkeye check. Use the inception year from licenserc.toml, not the current year.
  2. make fmt
  3. make clippy
  4. make test
  5. make check-udeps (run make fix-udeps if it reports unused dependencies).
  6. If you added or changed a public configuration option, update the applicable example TOMLs, configuration-loading and serialized-config snapshot tests, and related user-facing documentation. Run make config-docs (needs Docker) and commit the regenerated config/config.md.
  7. If you changed a persisted or wire format, add a compatibility test case (see .agents/architecture-invariants.md).
  8. If you added or gated an enterprise-only file, give it the enterprise license header, list it in licenserc-enterprise.toml (includes) and licenserc.toml (excludes), and run make check-enterprise-license.
  9. Use a conventional-commit title, sign off commits (git commit -s), and sign the CLA.
  10. When creating or updating a pull request, follow .github/pull_request_template.md: include the CLA statement, fill the change-intention section with enough detail, and update checklist items accurately. "This PR requires documentation updates" refers to the official docs site repository (GreptimeTeam/docs), not to rustdoc or comments in this repo. Check it only when that site would be wrong or incomplete without a matching change; a change users cannot observe does not need it.
  11. If the change must also land on release branches, add the matching backport-<target> labels (e.g. backport-v1.3 targets release/v1.3). The Backport workflow (.github/workflows/backport.yml) cherry-picks a merged PR onto each target branch and opens a backport PR automatically; on conflicts it aborts and files an issue for a manual backport.

More

  • Agent skills and resources: .agents/ (see .agents/README.md)
  • Architecture decisions: docs/rfcs/
  • How-to guides: docs/how-to/

Download now (ZIP)

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.