kestra
AGENTS.md29k starsChanged 3 months agoApache-2.0View on GitHub
This document provides essential information for AI coding agents working on the Kestra codebase. IMPORTANT — READ FIRST The default is no comment. Small methods with accurate names need no explanation, and every comment is a second thing that has to be kept in sync with the code. Over-commenting is easy to slip into: the next line gets narrated, the method name gets restated above the method, and // Step 1 / // Step 2 scaffolding is left behind. None…
- Reads credentials
- Installs packages
Trending
More talk lately.about the whole repository
Who's talking about kestra-io/kestra
- A Hacker News story“Show HN: Kestra - Open-Source Airflow Alternative”Hacker News · Mar 24, 2022 · 142 points
- @kestra.io“16,000 GitHub stars! ⭐️ A year ago, we were celebrating 5,000. Now, 20k is in sight. Stars mean that Kestra …”Bluesky · Feb 24, 2025 · 11 likes
- @kestra.io“Kestra.io is now on Bluesky 👋 Give us a follow and keep up with our latest news ! github.com/kestra-io/ke...”Bluesky · Nov 1, 2024 · 11 likes
- mplushnikov/lombok-intellij-plugin“@SuperBuilder failed to generate builder method with latest IDEA EAP 2021.3”GitHub · Oct 11, 2021 · 11 reactions
- kestra-io/plugin-airtable“feat: Add comprehensive Airtable plugin for Kestra workflow orchestration”GitHub · Sep 18, 2025 · 8 reactions
The biggest 5 of 60 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 60
Talked about on GitHub, Bluesky and Hacker News (60 times).
On GitHub · 37
- Oct 11, 2021@SuperBuilder failed to generate builder method with latest IDEA EAP 2021.3 — mplushnikov/lombok-intellij-plugin11 reactions · 5 comments
- Sep 18, 2025feat: Add comprehensive Airtable plugin for Kestra workflow orchestration — kestra-io/plugin-airtable8 reactions · 4 comments
- Jul 29, 2026fix(plugins): upload working-dir files when Docker MOUNT strategy is used — RizwanAhamed13/kestra5 reactions · 2 comments
- Jul 11, 2026Test develop — Client-Co-ltd-Test/Kestra-io5 reactions · 1 comment
- Aug 19, 2025Add task for Apify common use cases. — kestra-io/plugin-apify4 reactions · 9 comments
32 more on GitHub
- Apr 28, 2026feat(topology): add animated prop to control edge animation — kestra-io/ui-libs2 reactions
- Mar 25, 2026Add an optional property to ignore organisation members — plbstl/first-contribution2 reactions · 11 comments
- Jan 3, 2026Added How-to-Guide for Using Pulumi's Terraform Provider to Integrate Kestra — kestra-io/docs2 reactions · 5 comments
- Oct 7, 2025fix: allow configuration via env — kestra-io/storage-minio2 reactions
- Jan 18, 2025feat(ui): Docs markdown alert styled based on alert level. — kestra-io/docs2 reactions · 3 comments
- Aug 18, 2024feat(python): add a logger — kestra-io/libs2 reactions
- Nov 18, 2026Proposal: add CISA KEV detection module for CVE-2026-49869 (Kestra auth bypass to RCE, CVSS 10.0) — OWASP/Nettacker1 reaction
- Nov 9, 2026docs: use Log in Outlook trigger examples — kestra-io/plugin-microsoft3651 reaction · 2 comments
- Nov 9, 2026docs: use Log in Prometheus trigger example — kestra-io/plugin-prometheus1 reaction · 1 comment
- Nov 9, 2026docs: use Log in Flux trigger example — kestra-io/plugin-influxdb1 reaction · 1 comment
- Nov 9, 2026docs: use Log in Sheets modification example — kestra-io/plugin-googleworkspace1 reaction · 1 comment
- Nov 9, 2026docs: use Log in SurrealDB trigger example — kestra-io/plugin-surrealdb1 reaction · 1 comment
- Nov 9, 2026docs: use Log in Cassandra trigger examples — kestra-io/plugin-cassandra1 reaction · 1 comment
- Nov 9, 2026docs: log function-call results in chat example — kestra-io/plugin-openai1 reaction · 1 comment
- Nov 9, 2026docs: use Log in MongoDB trigger example — kestra-io/plugin-mongodb1 reaction · 1 comment
- Nov 9, 2026docs: use Log in Couchbase trigger example — kestra-io/plugin-couchbase1 reaction · 1 comment
- Nov 9, 2026docs: log the Neo4j trigger result count — kestra-io/plugin-neo4j1 reaction · 1 comment
- Nov 9, 2026docs: use Log in S3 trigger examples — kestra-io/plugin-aws1 reaction · 1 comment
- Nov 9, 2026docs: use Log in JDBC examples — kestra-io/plugin-jdbc1 reaction · 1 comment
- Nov 9, 2026docs: use Log in GCS and BigQuery examples — kestra-io/plugin-gcp1 reaction · 1 comment
- Nov 9, 2026docs: use Log in Azure storage trigger examples — kestra-io/plugin-azure1 reaction · 1 comment
- Nov 9, 2026docs: use Log in MinIO trigger examples — kestra-io/plugin-minio1 reaction · 1 comment
- Nov 9, 2026docs: use Log in file trigger examples — kestra-io/plugin-fs1 reaction · 1 comment
- Oct 21, 2026review: execution-delay cutoff in every time-zone combination (mirror of kestra-io/kestra#19846) — Yash-2003P/kestra-issue_resol1 reaction · 2 comments
- Oct 20, 2026fix(blueprints): mark the country dashboard as Elasticsearch-only — kestra-io/blueprints1 reaction
- Sep 29, 2026docs(expressions): document isDateBetween() and use it for the DateTimeBetween migration — kestra-io/docs1 reaction · 3 comments
- Aug 11, 2026chore(ci): reword the contributor onboarding messages — kestra-io/docs1 reaction · 1 comment
- Apr 29, 2026feat(jdbc-postgres): add socketTimeout property to CopyIn and CopyOut — kestra-io/plugin-jdbc1 reaction · 1 comment
- Mar 2, 2026Broken links in k8s_universal_addons.json — Qbandev/kaddons1 reaction
- Feb 22, 2024Documentation for upcoming input type: SECRET feature — kestra-io/docs1 reaction · 1 comment
- Nov 2, 2023Package request: Kestra — NixOS/nixpkgs1 reaction · 1 comment
- May 24, 2026fix: use direct venv pip path instead of source activation (fixes #8540) — kestra-io/docs0 reactions · 1 comment
On Bluesky · 21
- Feb 24, 202516,000 GitHub stars! ⭐️ A year ago, we were celebrating 5,000. Now, 20k is in sight. Stars mean that Kestra is finding its place in open… — @kestra.io11 likes and reposts
- Nov 1, 2024Kestra.io is now on Bluesky 👋 Give us a follow and keep up with our latest news ! github.com/kestra-io/ke... — @kestra.io11 likes and reposts · 1 reply
- Apr 18, 2025🔗 Liens utiles Kestra : 👉 Le projet : github.com/kestra-io... 👉 En savoir plus : https://kestra.io/ 👉 La documentation :… — @bearstech.com6 likes and reposts
- Dec 31, 2024We are ending the year with an amazing news! Kestra just hit 15,000 stars on GitHub 🔥 github.com/kestra-io/ke... — @kestra.io6 likes and reposts
- Nov 1, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 kestra-io / kestra ⭐ 11,512 (+141) 🗒 Java ⚡ Workflow Automation Platform. Orchestrate & Schedule… — @github-trending.bsky.social6 likes and reposts · 1 reply
16 more on Bluesky
- Aug 14, 2025🔗 Liens utiles Kestra : 👉 Le projet : github.com/kestra-io... 👉 En savoir plus : https://kestra.io/ — @bearstech.com5 likes and reposts
- Oct 2, 2025📦 kestra-io / kestra ⭐ 21,407 (+17) 🗒 Java Orchestrate everything - from scripts to data, infra, AI, and business - as code, with UI and… — @github-trending.bsky.social4 likes and reposts
- Oct 2, 2025What a year for Kestra! 🎉 It deserved a brand-new product overview video. ⚡ 900+ plugins 🤖 AI copilots & workflow builders 🌍… — @kestra.io4 likes and reposts
- Nov 30, 2024kestra-io / kestra 173 stars today https://github.com//kestra-io/kestra ? Workflow Automation Platform. Orchestrate & Schedule code in any… — @codimis.bsky.social3 likes and reposts
- Oct 23, 2026We're only 48 stars away from 30k! If you haven't starred Kestra yet and want to sponsor us, star us! github.com/kestra-io/ke... — @loicmathieu.fr2 likes and reposts
- Sep 25, 2024Sorry it's Kestra ;) github.com/kestra-io/ke... — @loicmathieu.fr2 likes and reposts · 1 reply
- Sep 8, 2026The engine, the UI, the editor and all the plugins stay Apache 2.0. No limits, no phone-home, and the LTS image gets a year of fixes… — @kestra.io1 likes and repost
- Jun 14, 2025kestra-io / kestra 76 stars today https://github.com//kestra-io/kestra ? Workflow Automation Platform. Orchestrate & Schedule code in any… — @codimis.bsky.social1 likes and repost
- Dec 2, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 kestra-io / kestra ⭐ 13,710 (+147) 🗒 Java ⚡ Workflow Automation Platform. Orchestrate & Schedule… — @github-trending.bsky.social1 likes and repost · 1 reply
- Nov 1, 2024今日のGitHubトレンド kestra-io/kestra Kestraはイベント駆動型のワークフローオーケストレーションプラットフォームです。 YAMLでワークフローを定義し、Dockerなど様々な環境で実行できます。… — @dailygithubtrends.bsky.social1 likes and repost
- Oct 27, 2024kestra-io / kestra 97 stars today https://github.com//kestra-io/kestra ? Workflow Automation Platform. Orchestrate & Schedule code in any… — @codimis.bsky.social1 likes and repost
- Oct 15, 2024📦 kestra-io / kestra ⭐ 10,148 (+98) 🗒 Java ⚡ Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere,… — @github-trending.bsky.social1 likes and repost
- Sep 30, 2024🎉 Celebrating! 🎉 (500+ new stars) 📦 kestra-io / kestra ⭐ 9,135 (+672) 🗒 Java Orchestration and automation platform to execute millions… — @github-trending.bsky.social1 likes and repost · 1 reply
- Sep 25, 2024📦 kestra-io / kestra ⭐ 7,817 (+61) 🗒 Java Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to… — @github-trending.bsky.social1 likes and repost
- Sep 25, 2024kestra-io / kestra 61 stars today https://github.com//kestra-io/kestra Infinitely scalable, event-driven, language-agnostic orchestration… — @codimis.bsky.social1 likes and repost
- Jan 22, 2026You can analyse the project I'm working on, but it's not a small project: github.com/kestra-io/ke... — @loicmathieu.fr0 likes and reposts · 2 replies
On Hacker News · 2
- Mar 24, 2022Show HN: Kestra - Open-Source Airflow Alternative142 points · 69 comments
- Mar 14, 2022Kestra: Infinitely scalable open source orchestration and scheduling platform7 points · 2 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository2 other files it gives its agents.
- ui/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
68 rules. About 1 is common, 36 are distinctive, and 31 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈36
Distinctive · estimate
This author's own choices. Worth a look.
31
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
- Distinctive: line 10
Efficiency: Only challenge when it genuinely matters
- Distinctive: line 27
Write a comment only when a reviewer would otherwise have to ask why the code exists:
- Distinctive: line 33
Keep it to one sentence. When a paragraph seems necessary, make the code clearer instead.
- Distinctive: line 42
Existing comments: should be left alone unless the code they describe changed.
- Distinctive: line 60
DO: Use constructor injection with final fields.
- Very specific: line 74
DON'T: Use field injection (@Inject on fields directly).
- Very specific: line 95
Use @Builder for complex object creation
- Very specific: line 100
Use specific exception types — extend KestraException or KestraRuntimeException
- Very specific: line 101
Use Optional<T> for potentially absent returned values
- Distinctive: line 103
Use try-with-resources for resource management
- Very specific: line 105
Write exception messages as plain, complete sentences that state the fact and the actionable detail — build them with …
- Very specific: line 107
DON'T: Use generic Exception. Don't return null for collections.
- Distinctive: line 110
Use java records for simple data carriers
- Distinctive: line 113
Follow Java naming-convention best practices for Classes, Methods, Variables, Constants.
- Distinctive: line 117
Use 4-space indentation (configured in .editorconfig)
- Distinctive: line 123
Use static methods only
- Very specific: line 124
Use existing utility classes (e.g., ListUtils, MapUtils) instead of creating new ones (io.kestra.core.utils.*)
- Very specific: line 130
Use @JsonValue for custom serialization if needed
- Very specific: line 131
Use UNKNOWN enum value for unknown cases in deserialization
- Very specific: line 133
Use a static fromString method for case-insensitive lookups using Enums class.
- Distinctive: line 153
Keep it to the contract: what the caller has to know that the signature does not already say
- Very specific: line 154
Use @param, @return and @throws only where each adds something.
- Distinctive: line 156
Add a usage example only when the call site would otherwise be guessed wrong
- Distinctive: line 159
Put classes used by only controllers in the webserver module (not core)
- Distinctive: line 160
No business code/rule inside controllers - instead use a Service class
- Distinctive: line 161
All APIs must return a valid JSON object
- Distinctive: line 165
Import a class rather than writing its fully-qualified name, as soon as it is used more than once in the same file
- Distinctive: line 168
Use DTOs for requests/responses
- Very specific: line 170
Always validate input parameters with @Valid
- Very specific: line 171
Use @ExecuteOn(TaskExecutors.IO) for blocking operations
- Distinctive: line 175
Never depend on repositories for code called by the workers - instead use MetaStore/StateStore facades
- Very specific: line 178
Run the H2RunnerTest whenever you update part of the executor
- Distinctive: line 205
Place tests in same package structure as source code
- Very specific: line 208
Test method naming: should<ExpectedBehavior>When<ConditionOrAction> (also ...Given<Input>, ...For<Condition>, ...If<Condition>), e.g.
- Very specific: line 209
Use @MicronautTest for tests that require Micronaut beans
- Very specific: line 210
Use @KestraTest for tests that require running Kestra services (e.g., Executor, Scheduler) -
- Distinctive: line 230
DON'T: Use Nested classes for test organization.
- Very specific: line 233
Use AssertJ: assertThat().isEqualTo(), assertThat().isNotNull(), assertThatThrownBy(), assertThatObject()
- Distinctive: line 234
Prefer descriptive assertion methods
- Very specific: line 235
Use @MockBean for mocking dependencies
- Distinctive: line 246
Use JSdom environment for DOM testing
- Distinctive: line 248
Don't keep a Vitest test that only re-asserts what a story already covers.
- Distinctive: line 264
Use 2-space indentation for Vue, JSON, YAML, CSS
- Distinctive: line 265
Use 4-space indentation for JavaScript/TypeScript
- Distinctive: line 266
Follow Vue 3 Composition API patterns
- Distinctive: line 276
Use strict TypeScript configuration
- Very specific: line 277
Prefer type definitions over any
- Distinctive: line 278
Use interfaces for object shapes
- Distinctive: line 279
Use enums for fixed sets of values
- Very specific: line 402
When working in an OSS worktree (the working directory is under a worktrees/ directory):
- Distinctive: line 409
Use tenant isolation for multi-tenant features
- Distinctive: line 415
Use streaming for large file operations
- Very specific: line 421
A Gradle build fails with no visible cause: run ./gradlew clean and retry once.
- Very specific: line 423
The frontend build fails on dependency resolution: check the Node and npm versions against package.json engines before touching anything …
- Distinctive: line 462
One PR, one scope: When you cannot pick a single conventional-commit scope for the title, the PR is doing too much and should be split.
- Distinctive: line 464
Use types: chore, feat, fix, refactor, test, docs, build
- Common: line 465
Use scopes: apps, assets, core, dashboards, deps, design-system, executions, flows, iam, namespaces, plugins, secrets, storage, scheduler, …
- Very specific: line 466
Put the closing keyword on the first line of the description, as a full URL so that the link is not lost in a squash merge: Closes …
- Very specific: line 468
Run npm run lint in ui/ before pushing any frontend change.
- Very specific: line 470
Keep the branch rebased on develop rather than merged.
- Distinctive: line 472
Write the description as problem, fix and evidence, once each.
- Very specific: line 473
Never commit generated output by hand: the twelve non-English translation files, fingerprints.json, and the generated SDK are produced by …
- Very specific: line 478
Leave triage labels such as kind/cooldown to kestrabot.
- Very specific: line 488
Run the check script from the ui/ directory:
- Very specific: line 506
Prefer npm run translations:generate (needs GEMINI_API_KEY).
- Distinctive: line 508
If you must write a translation by hand:
- Very specific: line 511
Follow these translation rules (mirroring ui/scripts/translations/generateTranslations.ts, the generator shared by OSS and EE):
- Distinctive: line 539
When in doubt, follow the existing patterns in the codebase and stay consistent with them.
≈ “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.
Files
Coding Agent Guidelines for Kestra Open Source Edition
This document provides essential information for AI coding agents working on the Kestra codebase.
IMPORTANT — READ FIRST
- Act as a Senior Software Engineer and Software Architect. Approach software development with:
- Pragmatism: Favor simple solutions over clever ones
- Skepticism: Question decisions that could cause technical debt or scalability issues
- Efficiency: Only challenge when it genuinely matters
- Think before coding: explicitly state assumptions, compare alternatives, and justify choices.
- Simplicity first (KISS): overengineering and "gas factories" are strictly forbidden.
- Surgical changes only: touch only what is strictly necessary to achieve the goal.
- Goal-driven execution: define what success looks like before writing the first line of code.
- Reuse before writing: the pattern you need almost always exists already. Find the closest equivalent in the codebase and follow it instead of inventing a second way to do the same thing.
- No comments by default: see Comments. Over-commenting is one of the most common reasons a PR written by an agent has to be revised.
- How Kestra looks is decided by the design system: see UI Design System. No color, spacing, radius or component pattern may be invented in feature code.
- A test has to be able to fail for a reason a reviewer would care about: see When a test earns its place. More tests do not make a change safer.
- Build and test only what you touched rather than the whole repo: see What to run after a change.
Comments
The default is no comment. Small methods with accurate names need no explanation, and every comment is a second thing that has to be kept in sync with the code. Over-commenting is easy to slip into: the next line gets narrated, the method name gets restated above the method, and // Step 1 / // Step 2 scaffolding is left behind. None of that will be accepted in review.
The reader to write for is the developer opening the file in a month. They do not have time to read a paragraph, and most of what a paragraph would tell them is already in the code.
Write a comment only when a reviewer would otherwise have to ask why the code exists:
- a non-obvious constraint, or an upstream bug being worked around (link the issue)
- an ordering, locking or concurrency requirement that the code itself cannot express
- a deliberate omission, so that the next person does not "fix" it back
Keep it to one sentence. When a paragraph seems necessary, make the code clearer instead.
Never write:
- a restatement of the line below it (
// increment the counter,// return the result) - a narration of a self-explanatory getter, loop, or well-named call
- section banners (
// ---- helpers ----), changelog notes, or a// TODOwith no issue link - a comment on every entry of a list when the rule is already stated once above the list
Existing comments should be left alone unless the code they describe changed. When that code is deleted, delete the comment with it rather than rewording it around the gap. When the code changed, either correct the comment or remove it.
Javadoc describes the contract rather than the body. Add it on public API called from other modules or from plugins, and on anything whose behavior cannot be seen from the signature (nullability, thread-safety, side effects, units, ownership of a returned collection). Skip it on getters, setters, builders, an override that adds nothing (a bare {@inheritDoc} is noise), and any method whose name already says everything.
Project
Monorepo built with Java (backend) and Vue (frontend), using Gradle as the build system.
Tech Stack
- Backend: Java 25, Micronaut Framework, Lombok
- Frontend: Vue 3, TypeScript, Vite, Element Plus, Pinia
- Build: Gradle, multi-project. The version is pinned in
gradle/wrapper/gradle-wrapper.properties, andsettings.gradleis the list of modules - Testing: JUnit 5, Mockito, AssertJ, Vitest, Playwright
Critical Code Patterns
Dependency Injection
DO: Use constructor injection with final fields.
@Singleton
public class MyService {
private final SomeDependency dependency;
@Inject
public MyService(SomeDependency dependency) {
this.dependency = Objects.requireNonNull(dependency);
}
}DON'T: Use field injection (@Inject on fields directly). Always prefer constructor injection.
Class Structure
// 1. Package declaration and imports
// 2. Class-level annotations (@Slf4j, @Singleton, etc.)
// 3. Class declaration with Javadoc
// 4. Static constants (UPPER_SNAKE_CASE)
// 5. Injected fields (@Inject)
// 6. Constructors
// 7. Public methods
// 8. Protected methods
// 9. Private methods
// 10. Inner classes/recordsAnnotations
- Micronaut:
@Singleton,@Inject,@Controller,@Replaces,@Requires - Validation:
@Valid,@NotNull,@Nullable - Lombok:
@Slf4j,@Getter,@NoArgsConstructor,@AllArgsConstructor - Use
@Builderfor complex object creation
Error Handling
DO:
- Use specific exception types — extend
KestraExceptionorKestraRuntimeException - Use
Optional<T>for potentially absent returned values - Return empty collections (e.g.,
List.of(),Collections.emptyList()) for absent values - Use try-with-resources for resource management
- Log errors before re-throwing:
log.error("message", exception) - Write exception messages as plain, complete sentences that state the fact and the actionable detail — build them with
String.formatted()/String.format(), not string concatenation or em dashes, e.g."Cannot acquire lock on asset '%s': already locked by '%s' until %s.".formatted(id, owner, until)
DON'T: Use generic Exception. Don't return null for collections. Don't write terse or telegraphic exception messages (e.g. dropping articles/verbs) or string-concatenate message parts.
Java Language Features
- Use java records for simple data carriers
Naming Conventions
- Follow Java naming-convention best practices for Classes, Methods, Variables, Constants.
- Boolean methods: Start with
is,has,should,can(e.g.,isReadOnly()).
File Organization
- Use 4-space indentation (configured in .editorconfig)
- UTF-8 encoding with LF line endings
- No trailing whitespace
Utility Classes
- Mark utility classes as
finalwith a private constructor - Use static methods only
- Use existing utility classes (e.g.,
ListUtils,MapUtils) instead of creating new ones (io.kestra.core.utils.*)
MANDATORY — never hand-roll Pebble delimiter detection. Pebble has two block delimiter pairs — print blocks ({{ ... }}) and execute/statement blocks ({% ... %}) — and code that only checks for {{/}} silently misses {%/%} blocks. Use io.kestra.core.utils.PebbleUtil (containsOpeningBlockDelimiter, startsWithOpeningBlockDelimiter, endsWithClosingBlockDelimiter, openingBlockDelimiters()/closingBlockDelimiters()) instead of writing a new delimiter regex or literal — it derives the delimiter pairs from Pebble's own Syntax.Builder defaults, so it never drifts from what Pebble actually parses.
Enums
- Use enums for fixed sets of constants, including internal fields not exposed over the API — prefer a typed enum over a raw
String/intwhenever the value is drawn from a closed set of known cases, even if the set may only ever have a couple of members - Use
@JsonValuefor custom serialization if needed - Use
UNKNOWNenum value for unknown cases in deserialization - Compare Constants From The Left (a.k.a., Yoda conditions)
- Use a static
fromStringmethod for case-insensitive lookups usingEnumsclass.
e.g.:
public enum MyEnum {
VALUE_ONE,
VALUE_TWO,
UNKNOWN;
@JsonCreator
public static ResourceType fromString(final String value) {
return Enums.getForNameIgnoreCase(value, MyEnum.class, UNKNOWN);
}
}Documentation
See Comments for when a Javadoc block is worth writing at all. Once you have decided that it is:
- Keep it to the contract: what the caller has to know that the signature does not already say
- Use
@param,@returnand@throwsonly where each adds something.@param name the nameis noise - Skip a bare
{@inheritDoc}on an override that changes nothing - Add a usage example only when the call site would otherwise be guessed wrong
Webserver Constraints
- Put classes used by only controllers in the webserver module (not core)
- No business code/rule inside controllers - instead use a Service class
- All APIs must return a valid JSON object
- APIs should not return a response being a JSON array which cannot be evolved in a backwards-compatible way
- Any endpoint returning a collection should be paged through
PagedResultswithpageandsizeparameters, like the rest of the API - A DTO used by a single controller belongs as an inner record of that controller. Promote it to
io.kestra.webserver.models.apionly once a second caller exists, and name it with theApiprefix there (ApiExecution,ApiTriggerState,ApiPluginArtifact) - Import a class rather than writing its fully-qualified name, as soon as it is used more than once in the same file
- Unit tests must assert that a user can only access a given API if authorized to do so, and that access is denied otherwise
- APIs must be documented with OpenAPI annotations
- Use DTOs for requests/responses
- A dashboard chart export must use the chart's declared columns for its header, in declaration order, whether or not there are rows
- Always validate input parameters with
@Valid - Use
@ExecuteOn(TaskExecutors.IO)for blocking operations - Return meaningful error responses in controllers
Worker Constraints
- Never depend on repositories for code called by the workers - instead use MetaStore/StateStore facades
Executor Constraints
- Run the
H2RunnerTestwhenever you update part of the executor
Testing Guidelines
When a test earns its place
More tests do not make a change safer. Every test is code that has to be read, kept passing, and understood by whoever changes that behavior next, so a test is only worth its cost when it can fail for a reason a reviewer would care about.
Add a test when:
- new behavior is introduced, or a bug is fixed. The test should fail on the commit before yours; if it passes there, it is testing something else
- an edge case would be easy to get wrong later: an empty collection, a null, a boundary, a race, a permission check
- the change is in the executor, the scheduler, the queue, or an ACL path, where a regression is expensive and hard to notice
Don't add a test when:
- it only exercises getters, setters, builders, or a Lombok-generated method
- it asserts behavior that the framework already documents (Jackson serializing a field, Micronaut injecting a bean)
- it repeats an existing test with one property changed. One test per behavior, rather than one per property, since otherwise there would be hundreds of them
- the mocks would have to restate the implementation for the assertions to pass. Such a test is pinned to the current code rather than to the behavior, so it is broken by every legitimate refactor
- it exists only to move a coverage number
Delete tests too. Removing a feature should reduce the test count rather than raise it. When a test no longer describes behavior anyone relies on, or when it duplicates another one, delete it in the same PR and say so in the description. A redundant test that is always green is still maintenance cost.
Java Tests
DO:
- Place tests in same package structure as source code
- Simple unit test with mocks over complex integration tests when possible
- Structure the body as given / when / then. The three marker comments are optional and should be dropped when the test is only a few obvious lines
- Test method naming:
should<ExpectedBehavior>When<ConditionOrAction>(also...Given<Input>,...For<Condition>,...If<Condition>), e.g.shouldThrowExceptionWhenDividingByZero() - Use
@MicronautTestfor tests that require Micronaut beans - Use
@KestraTestfor tests that require running Kestra services (e.g., Executor, Scheduler)
@KestraTest
class ServiceTest {
@Inject
private ServiceClass service;
@Test
void shouldPerformActionWhenCondition() {
// Given (setup)
// When (action)
// Then (assertions)
assertThat(result).isNotNull();
}
}DON'T: Use Nested classes for test organization. Avoid complex test hierarchies.
Assertions:
- Use AssertJ:
assertThat().isEqualTo(),assertThat().isNotNull(),assertThatThrownBy(),assertThatObject() - Prefer descriptive assertion methods
- Use
@MockBeanfor mocking dependencies
Test Categories:
- Unit tests: Fast, isolated, no external dependencies
- Integration tests: Test component interaction, use
@Tag("integration") - Flaky tests: Use
@Tag("flaky")for unreliable tests
Frontend Tests
- Unit tests with Vitest and
@vue/test-utils - E2E tests with Playwright
- Storybook component tests
- Use JSdom environment for DOM testing
- Prefer Storybook component tests over Vitest unit tests whenever possible — components render through their real story setup (props, slots, design-system deps) instead of being stubbed out, catching regressions unit mocks miss. Fall back to a Vitest unit test only when the logic under test isn't component-rendering behavior (e.g. a pure helper/composable) or no story exists and adding one isn't practical.
- Don't keep a Vitest test that only re-asserts what a story already covers. Delete it when you add the story.
- Assert on
data-testattributes and rendered text. A test written against.el-*or.ks-*class names is broken by the next Element Plus or design-system upgrade, without any behavior having changed.
UI Design System
The design system at ui/packages/design-system/ is the single source of truth for every design decision in Kestra: colors, typography, spacing, radii, shadows, and the component vocabulary. Nothing rendered to a user may be styled outside it.
In practice that means no hex codes, no rgb(), no --el-* or --bs-* variables, no hardcoded pixel spacing, no :deep() into another component, and no locally built equivalent of a component that already exists. When the design you need cannot be expressed with the existing Ks* components and --ks-* tokens, that is a gap in the design system: raise it with design and add the token, the prop or the component upstream. Approximating it with custom CSS in a feature component is not an option, since the result will only be right in the one theme you checked it in.
The full rules, the component catalogue, the token reference and the frontend best practices live in ui/AGENTS.md, which is auto-loaded for work under ui/ in OSS and ui-ee/ in Enterprise Edition. Read it before any frontend change, and update it in the same PR whenever a component, a prop or a token is added.
@ui/AGENTS.md
Frontend Code Style (Vue 3)
File Organization:
- Use 2-space indentation for Vue, JSON, YAML, CSS
- Use 4-space indentation for JavaScript/TypeScript
- Follow Vue 3 Composition API patterns
- Organize imports: Vue/framework → third-party → local modules
Naming Conventions:
- Components:
PascalCasefiles (e.g.,MyComponent.vue) - Variables/functions:
camelCase - Constants:
UPPER_SNAKE_CASE - CSS classes: Follow Element Plus conventions
TypeScript:
- Use strict TypeScript configuration
- Prefer type definitions over
any - Use interfaces for object shapes
- Use enums for fixed sets of values
Build Commands
What to run after a change
A whole-repo ./gradlew build can take tens of minutes, and almost nothing about a three-line change can be learned from it. Start with the narrowest command that covers what you touched, and widen it only once that one passes.
| What changed | Run |
| One backend module | ./gradlew :<module>:test --tests "TheClassName", then ./gradlew :<module>:test |
| Anything in the executor | ./gradlew :jdbc-h2:test --tests "H2RunnerTest" (mandatory) |
| Something crossing module boundaries | ./gradlew build -x integrationTest |
| A Vue component or composable | cd ui && npm run check:types && npm run test:unit && npm run lint |
| A design-system component | the above, plus npm run test:storybook |
| An e2e spec or fixture | cd e2e && npm run check:types && npm run test:lint |
en.json, whether a key was added or a value edited | cd ui && npm run translations:generate && npm run translations:check |
| A controller or its DTOs | that module's tests, including the authorization tests for the route |
Java Backend
# Clean build
./gradlew clean
# Full build (includes tests)
./gradlew build
# Build without tests (faster)
./gradlew build -x test -x integrationTest -x testCodeCoverageReport --refresh-dependencies --no-daemon --parallelTest Commands
# Run all tests (excludes flaky tests)
./gradlew test
# Run only unit tests (fastest)
./gradlew unitTest
# Run integration tests
./gradlew integrationTest
# Run flaky tests (separate from build)
./gradlew flakyTest
# Run tests for specific module
./gradlew :core:test
# Run single test class
./gradlew :module-name:test --tests "ClassName"
# Run single test method
./gradlew :module-name:test --tests "ClassName.methodName"
# After running tests: generate a markdown summary of failures only
npx --yes @kestra-io/kestra-devtools generateTestReportSummary --only-errors $(pwd)Frontend (UI)
cd ui
# Install dependencies
npm install
# Development server
npm run dev
# Type checking
npm run check:types
# Build for production
npm run build
# Run tests
npm run test:all # All tests with coverage
npm run test:unit # Unit tests only
npm run test:storybook # Storybook tests
# Linting
npm run lint # Fix linting issues
npm run test:lint # Check linting only
# Storybook
npm run storybook # Development
npm run build-storybook # BuildEnd-to-end tests
The Playwright suite is its own npm package at e2e/, installed separately from ui/ so that
a spec change pulls in neither the frontend dependency tree nor the frontend CI jobs.
cd e2e
npm ci
npx playwright install chromium
npm run test:e2e # starts a Kestra docker image, runs the suite, stops it
npm run test:e2e-without-starting-backend # against an instance you already have running
npm run check:types && npm run test:lintDevelopment Workflow
Running Locally
- Start/stop backends:
# Start databases with Docker Compose
docker compose -f docker-compose-ci.yml up
# Stop databases with Docker Compose
docker compose -f docker-compose-ci.yml down- Access application: http://localhost:8080
Worktree setup
When working in an OSS worktree (the working directory is under a worktrees/ directory):
dev-tools/setup-worktree.sh ../worktrees/fooThis copies the gitignored cli/src/main/resources/application-*.yml files from the main checkout into the worktree. Without this step Kestra cannot boot in the worktree. The script is idempotent — safe to re-run.
Security Considerations
- Use tenant isolation for multi-tenant features
- Implement proper authorization with
@HasAnyPermission - Handle secrets securely (never log sensitive data)
Performance Best Practices
- Implement pagination for large datasets
- Use streaming for large file operations
- Cache frequently accessed data appropriately
- Initialize collections with the expected size to avoid resizing overhead
Troubleshooting
- A Gradle build fails with no visible cause: run
./gradlew cleanand retry once. When it repeats, read the actual error instead of retrying again. - Tests fail on connection errors: the databases are not running.
docker compose -f docker-compose-ci.yml up -d. - The frontend build fails on dependency resolution: check the Node and npm versions against
package.jsonengines before touching anything else. npm installfails withEBADENGINE: the UI workspaces require npm >= 11.7 and setengine-strict=true. Older npm mislabels thesass/sass-embeddedplatform binaries as peer dependencies and rewritespackage-lock.jsonon every install. Install the pinned npm (npm i -g npm@11.16.0) or use the Node release named inui/.nvmrc.- The UI builds but the app never mounts: module federation, so the cause is usually workspace resolution rather than the change itself. Verify against a running instance rather than against the dev server.
- Debug logging:
--logging.level.io.kestra=DEBUG.
Module Structure
Core Modules:
cli- Command Line Interfacecore- Core functionalitywebserver- Web serverui- Vue 3 frontend applicationexecutor- The component responsible for managing execution statescheduler- The component responsible for scheduling polling and schedule triggersworker- The component that executes tasks and manages worker instancesworker-controller- The component that manages worker instances and job distributionindexer- The component responsible for indexing executionsplatform- provides the Platform Bill of Materials (BOM) for dependency management
Queuing Layer:
queue- Core API for queue implementationsqueue-jdbc- JDBC-based queue implementation
Data Layer:
jdbc-*- Database implementations (H2, Postgres, MySQL)
Testing Modules:
e2e- Playwright end-to-end suite, run against a Kestra docker imagetests- Common test utilities and base classesjmh-benchmark- JMH benchmarks for performance testing
Key Patterns:
- Repository pattern for data access
- Service layer for business logic
- Controller layer for HTTP endpoints
- Builder pattern for object construction (often with Lombok
@Builder)
Pull request guidelines
- One PR, one scope. When you cannot pick a single conventional-commit scope for the title, the PR is doing too much and should be split.
- Title format
type(scope): lowercase description, following https://www.conventionalcommits.org/en/v1.0.0. Name the changed things rather than the actions taken on them:fix(cases): assignees header, missing Acknowledged status, auto-link toggle. - Use types: chore, feat, fix, refactor, test, docs, build
- Use scopes: apps, assets, core, dashboards, deps, design-system, executions, flows, iam, namespaces, plugins, secrets, storage, scheduler, system, tasks, tenants, tests, topology, triggers, variables, version, worker
- Put the closing keyword on the first line of the description, as a full URL so that the link is not lost in a squash merge:
Closes https://github.com/kestra-io/kestra/issues/<id>. - Cover new behavior with tests that could fail, following When a test earns its place. "Add tests" never means one test per changed line.
- Run
npm run lintinui/before pushing any frontend change. Otherwise one comment per violation is posted by reviewdog, and the human review is buried under trailing-comma suggestions. - Attach a screenshot or a short recording for every user-visible change, taken against a running instance.
- Keep the branch rebased on
developrather than merged. - Fill in
.github/pull_request_template.md, and delete the checklist section that does not apply instead of leaving it unticked. - Write the description as problem, fix and evidence, once each. No table restating the diff, and no checklist of tests that all passed.
- Never commit generated output by hand: the twelve non-English translation files,
fingerprints.json, and the generated SDK are produced by their scripts or by CI.
Issue guidelines
- Classify an issue with its GitHub issue type, not a
kind/*label. Thekind/buglabel is retired — do not add it. Set the type instead:gh issue create --title …followed bygh issue edit <number> --type Bug, orgh issue edit <number> --type Task|Feature|Epic. Available types areTask,Bug,FeatureandEpic(list them withgh api /orgs/kestra-io/issue-types). - Do add the
area/*labels —area/frontend,area/backend,area/devops,area/docs,area/plugin,area/qa,area/analytics— since those drive routing and are still in use. - Leave triage labels such as
kind/cooldowntokestrabot; it applies them automatically on new issues.
UI Translations
MANDATORY — never hardcode user-facing strings. Every label, button, tooltip, placeholder, dialog/section title, table-column header, and toast/confirm message rendered to the user MUST go through vue-i18n: t("key") (or :label/:tooltip bindings) in components. When the string embeds a component (router-link, KsId), take the text on each side of the placeholder with splitTranslation(t, key, slot); when it embeds static markup (e.g. a <code> fragment), pass the markup as a named argument and render it with v-html. <i18n-t> is not used, and ui/tests/unit/i18n/i18nGuard.spec.ts fails on it. Never write a literal user-facing string in a template, a :tooltip/:label attribute, or a toast.* call. Reuse existing generic keys (cancel, delete, edit, save, add, id, description, namespace, revision, …) instead of duplicating them; put feature-specific strings under one namespaced object (e.g. "reusableInputs": { … }). After adding keys to en.json, propagate them to every language (translation generation script) so the missing-keys check stays clean — a key present only in en.json fails the check.
Translation files live in ui/src/translations/. There is one JSON file per language code (e.g. de.json, fr.json) plus the source en.json.
Checking for missing translations
Run the check script from the ui/ directory:
cd ui && npm run translations:checkA clean run reports No missing keys., No extra keys. and No stale keys. for every language. Anything listed must be fixed before merging — the same check runs as a PR gate.
Enterprise Edition: EE-only keys live in
ui-ee/src/translations/ee_translations/en.json, and a tenant type's own keys inui-ee/src/tenantTypes/<type>/translations/, unprefixed and rooted undertenantTypes.<type>at runtime. Both are checked separately — runnpm run translations:checkinui-eeas well (seekestra-ee/AGENTS.md→ "Frontend i18n").
Editing English strings
Changing an existing English value is a translation change. Every key carries a fingerprint of the English text its translations were generated from, so editing en.json — even just the capitalisation — marks that key stale in all twelve languages and fails translations:check until it is regenerated. Run npm run translations:generate and commit the result alongside your change.
This is deliberate: before it existed, edited values were never propagated, and a rename of "SuperAdmin" to "Superadmin" sat un-translated in eleven locales for a year (kestra-io/kestra#10656).
Adding or regenerating translations
Prefer npm run translations:generate (needs GEMINI_API_KEY); it fills missing keys and re-translates stale ones on its own, with no flag to remember. Pass true to force a full re-translation of everything.
If you must write a translation by hand:
- Identify gaps by running
npm run translations:check. - Follow these translation rules (mirroring
ui/scripts/translations/generateTranslations.ts, the generator shared by OSS and EE):- Reserved English terms — never translate:
kv store,namespace,tenant,flow,subflow,task,log,blueprint,id,trigger,label,key,value,input,output,port,worker,backfill,healthcheck,min,max. - ALL-CAPS status labels stay in English:
WARNING,FAILED,SUCCESS,PAUSED,RUNNING, etc. - Preserve
{placeholder}variables exactly — vue-i18n uses a single pair of braces. Do not translate the name inside the braces, do not rename it, and never write{{placeholder}}: double braces are a compile error (Not allowed nest placeholder) and maket()throw at render time. Each translation must carry exactly the same placeholders as the English source — no invented ones, none dropped. - Use natural UI terminology — avoid false friends or overly literal translations (e.g. German: Execution → Ausführung, Theme → Modus, State → Zustand).
- Reserved English terms — never translate:
- Insert the translated keys into the correct position in the target language JSON, mirroring the key order of
en.json. - Re-run
npm run translations:checkto confirm everything is clean before committing.
The tooling itself lives in ui/scripts/translations/ and is shared with EE, which keeps only thin entry points. Rules live in .mjs so the dependency-free PR gate can apply them; file IO and orchestration stay in .ts.
Conflicts in fingerprints.json
Two branches that both touch en.json will both regenerate ui/scripts/translations/fingerprints.json, so it conflicts often. Never hand-merge the hashes and never pick a side — a hash says "this English text is what the twelve translations were generated from", so choosing the wrong one silently marks a drifted key as current and the drift becomes invisible again.
Resolve it the same way as a kestra-sdk conflict — regenerate:
git checkout --ours ui/src/translations/*.json ui/scripts/translations/fingerprints*.json
cd ui && npm run translations:generate # fills whatever the other branch added
npm run translations:check # must report no missing / extra / stale keysen.json itself normally merges cleanly, since branches usually add different keys; it is the generated files that collide.
Keeping this file up to date
When a review comment corrects something that is not written here, and the correction is a rule rather than a one-off, add it in the same PR: one or two lines, with the example next to the rule. Delete a rule once it no longer matches the codebase. A guideline that no longer matches the code is worse than no guideline, since it will be followed confidently.
When in doubt, follow the existing patterns in the codebase and stay consistent with them.
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
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.

