agentleFS
themoahthemoah/klag/.cursor/rules/config-and-mcp.mdc

klag / rules

Cursor rule88 starsChanged 47 days agoApache-2.0View on GitHub

Any KAFKAXY_Z env maps to kafka.x.y.z for AdminClient. Precedence: classpath props < external file < env. Feature toggles: HOTPARTITION*, TIMELAG*, COMMITFRESHNESS*, ISRENABLED, DATASKEWENABLED (default false), METRICSASSIGNEDTOPICSONLY (default false), CONSUMERMEMBERLABELS_ENABLED. HTTP only (port 4318). OTEL* vars or Klag overrides (OTLPENDPOINT, OTLP_HEADERS, etc.). See CLAUDE.md for full list.

We split this config-and-mcp.mdc into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only; serves in-memory snapshot — never queries Kafka directly

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule 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
config-and-mcp.mdc
---
globs:
  - "src/**/config/**"
  - "src/**/mcp/**"
  - "charts/klag/**"
  - "src/main/resources/**"
alwaysApply: false
---

# Configuration

## Common env vars

| Variable | Default | Notes |
|----------|---------|-------|
| `KAFKA_BOOTSTRAP_SERVERS` | `localhost:9092` | |
| `HTTP_PORT` | `8888` | |
| `METRICS_REPORTER` | `none` | `prometheus`, `datadog`, `otlp` |
| `METRICS_INTERVAL_MS` | `60000` | |
| `METRICS_GROUP_FILTER` | `*` | glob include |
| `METRICS_GROUP_EXCLUDE` | _(empty)_ | glob exclude |
| `KLAG_CONFIG_FILE` | — | external `application.properties` |

Any `KAFKA_X_Y_Z` env maps to `kafka.x.y.z` for AdminClient. Precedence: classpath props < external file < env.

Feature toggles: `HOT_PARTITION_*`, `TIME_LAG_*`, `COMMIT_FRESHNESS_*`, `ISR_ENABLED`, `DATA_SKEW_ENABLED` (default false), `METRICS_ASSIGNED_TOPICS_ONLY` (default false), `CONSUMER_MEMBER_LABELS_ENABLED`.

## MCP (opt-in)

- `MCP_ENABLED=false` by default; requires `METRICS_REPORTER` set (snapshot from metrics cycle)
- Read-only; serves in-memory snapshot — never queries Kafka directly
- Tools: `list_consumer_groups`, `get_consumer_group_lag`, `find_lagging_groups`, `diagnose`
- Auth: `MCP_AUTH_TOKEN` → `Authorization: Bearer <token>`

## OTLP

HTTP only (port 4318). `OTEL_*` vars or Klag overrides (`OTLP_ENDPOINT`, `OTLP_HEADERS`, etc.). See `CLAUDE.md` for full list.

Download now (ZIP)

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

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.