diff --git a/.agents/rules/changelog.md b/.agents/rules/changelog.md index f5099a0c98e..98707aaf0e2 100644 --- a/.agents/rules/changelog.md +++ b/.agents/rules/changelog.md @@ -6,3 +6,5 @@ globs: --- **RULE: Do not add new release entries to `CHANGELOG.md`.** For a user-visible change, add a fragment file under `.nextchanges/
/` (sections: `notable-changes`, `cli`, `air`, `bundles`, `dependency-updates`, `api-changes`). Each PR adds its own file, so entries never conflict. `CHANGELOG.md` is generated automatically from these fragments by the release process — never hand-edit it. See `.nextchanges/README.md`. + +**RULE: Add one entry for each user-visible change, not one for each PR.** When a feature lands across a stack of PRs, add a single fragment for the net result in the last PR of the stack, linking that PR. Steps of a feature that is not released yet, such as refactors, follow-up fixes and tests, get no entry of their own. diff --git a/.agents/rules/feature-gates.md b/.agents/rules/feature-gates.md new file mode 100644 index 00000000000..635cf260536 --- /dev/null +++ b/.agents/rules/feature-gates.md @@ -0,0 +1,23 @@ +--- +description: Mark unstable commands and fields in their help, not behind environment variables +globs: + - "cmd/**/*.go" + - "bundle/**/*.go" +paths: + - "cmd/**/*.go" + - "bundle/**/*.go" +--- + +**RULE: Do not gate a new command, flag or bundle field behind an environment variable.** An unstable feature still ships enabled. Mark it so that the Stability Policy in `README.md` applies: start its `Short` with `*Beta*` or `*Private Preview*` (see `cmd/sandbox/sandbox.go`), or register it under `databricks experimental`. When the service side is in preview, a workspace without it already rejects the call; return that error to the user. + +BAD: +```go +if env.Get(ctx, "DATABRICKS_CLI_FOO") != "true" { + return errors.New("foo is experimental, set DATABRICKS_CLI_FOO=true to enable it") +} +``` + +GOOD: +```go +Short: "*Beta* Run the tests of a pipeline", +``` diff --git a/.cursor/rules/feature-gates.mdc b/.cursor/rules/feature-gates.mdc new file mode 120000 index 00000000000..b8834651447 --- /dev/null +++ b/.cursor/rules/feature-gates.mdc @@ -0,0 +1 @@ +../../.agents/rules/feature-gates.md \ No newline at end of file