

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Agents Guide for Prometheus23This document captures patterns and preferences observed from maintainer reviews4of recently merged pull requests. Use it to align your contributions with what5maintainers expect.67---89## PR Title Format1011Titles must follow `area: short description`, using a prefix that identifies the12subsystem. Examples from merged PRs:1314```15tsdb/wlog: optimize WAL watcher reads16fix(PromQL): do not skip histogram buckets when trimming17feat(agent): fix ST append; add compliance RW sender test18chore: fix emptyStringTest issues from gocritic19ci: add statuses write permission to prombench workflow20docs: clarify that `lookback_delta` query parameter takes either a duration or number of seconds21```2223Common area prefixes: `tsdb`, `tsdb/wlog`, `promql`, `discovery/<name>`, `agent`,24`alerting`, `textparse`, `ui`, `build`, `ci`, `docs`, `chore`.2526For performance work, append `[PERF]` to the area segment or use the `perf(area):`27convention.2829---3031## Commits3233- Each commit must compile and pass tests independently, except when one commit adds a test to expose a bug and then the next commit fixes the bug.34- Keep commits small and focused. Do not bundle unrelated changes in one commit.35- Sign off every commit with `git commit -s` to satisfy the DCO requirement.36- Do not include unrelated local changes in the PR.3738---3940## Release Notes Block4142Every PR must include a `release-notes` fenced code block in the description.43If there is no user-facing change, write `NONE`:4445```46```release-notes47NONE48```49```5051Otherwise use one of these prefixes, matching the CHANGELOG style:5253```54[FEATURE] new capability55[ENHANCEMENT] improvement to existing behaviour56[PERF] performance improvement57[BUGFIX] bug fix58[SECURITY] security fix59[CHANGE] breaking or behavioural change60```6162Example:63```64```release-notes65[BUGFIX] PromQL: Do not skip histogram buckets in queries where histogram trimming is used.66```67```6869---7071## Tests7273- Bug fixes require a test that reproduces the bug.74- New behaviour or exported API changes require unit or e2e tests.75- Tests should attempt to mirror realistic data and/or behaviour.76- Use only exported APIs in tests where possible — this keeps tests closer to77 real library usage and simplifies review.78- Prefer adding cases to existing table-driven tests over writing new test79 functions, even if the existing test needs minor adjustments to fit the new80 case. Where it helps, convert an existing test into a table-driven test81 rather than duplicating it.8283---8485## Performance Work8687Maintainers take performance seriously. For any PERF PR:8889- Performance improvements require a benchmark that demonstrates the improvement.90- Run benchmarks before and after the change using `go test -count=6 -benchmem -bench <directory changed in PR>`91- Provide benchmark numbers in the PR body using `benchstat` output.92- If a subset of benchmark results show a regression, address this or explain why the case is not important.93- Reuse allocations in hot paths where possible (slices, buffers).94- When reusing buffers passed to interfaces, document that callers must copy95 the contents and must not retain references.96- Link to supporting analysis (Google Doc, issue, etc.) for complex changes.9798---99100## Code Style101102- Follow [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)103 and the formatting/style section of104 [Go: Best Practices for Production Environments](https://peter.bourgon.org/go-in-production/#formatting-and-style).105- State your assumptions.106- Interface contracts: when ownership or lifetime semantics (e.g. buffer reuse) are important,107 document it at the interface definition, not just in the implementation.108- All exposed objects must have a doc comment.109- All comments must start with a capital letter and end with a full stop.110- Run `make lint` before submitting. The project uses `golangci-lint` including111 `gocritic` rules such as `emptyStringTest` — fix linter findings rather than112 suppressing them with `//nolint` unless there is a clear false-positive.113- Use `//nolint:linter1[,linter2,...]` sparingly; prefer fixing the code.114115---116117## Linking Issues118119Use GitHub closing keywords in the PR body so the linked issue closes120automatically on merge:121122```123Fixes #18243124```125126---127128## Scope Discipline129130- Do not include unrelated changes in a PR; make a separate PR instead.131- If a refactor is necessary to make a change, do those in separate commits.132- If a PR is large, split it into preparatory and follow-up PRs and reference133 them with "Part of #NNNN" or "Depends on #NNNN".134135---136137## Documentation Changes138139- Docs PRs are welcome for clarifying ambiguous parameter descriptions,140 fixing Markdown formatting, and keeping the OpenAPI spec consistent with141 the implementation.142- When changing documented behaviour, update any relevant text in the docs/ directory.143 Check whether the OpenAPI spec also needs updating.144145---146147## CI / Workflow Changes148149- Workflow files need the correct GitHub token permissions declared explicitly.150 Missing permissions (e.g. `statuses: write`) cause silent 403 failures.151152---153154```
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ethereum/go-ethereumAGENTS.md · 51k | AGENTS.md | buildtestlint-formatgit+1 | 100/100 | 14 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/prometheus-prometheus-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.