Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .agents/skills/adversarial-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ finding.
`github-config-property` skill lists them. One forgotten home is the most common bug.
5. **Does every existing configuration still validate and give the same plan?** A changed default, a renamed key or
a new required key is a breaking change, whose migration path goes in the description of the pull request (see
the `pr-description` skill). The code must run on Python 3.11 to 3.14.
the `pr-description` skill) and in its changelog entry. The code must run on Python 3.11 to 3.14.
6. **What happens when it fails?** Expected failures are reported with context and a non-zero exit code, without a
traceback. An unexpected status, such as an undocumented 422, fails explicitly, on reads and writes alike, instead
of becoming `UNSET` or a silent success. Check whether one failing resource or organization stops the others when
Expand All @@ -109,7 +109,9 @@ finding.
exactly why in the report.
Check also that the tests cover the cases above, not only the expected path, and never access GitHub.

9. **Does the documentation describe the code as it is now?** Examples, reference tables and validation rules.
9. **Does the documentation describe the code as it is now?** Examples, reference tables and validation rules. A
change visible to users has its entry under `## [Unreleased]` of `CHANGELOG.md`, describing the final state, and
an internal change has none (see "Changelog" in `AGENTS.md`).
10. **Does the branch hold only this change?** No unrelated changes, debug leftovers, generated files edited by
hand, or local files that must never be committed (`otterdog.json`, `.env`, `*.pem`, `values*.yaml`, `orgs/`).

Expand Down
3 changes: 2 additions & 1 deletion .agents/skills/github-config-property/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ In `otterdog/models/<resource>.py`:
depends on another one.
- Changing an existing default changes the next `plan`/`apply` of every organization that uses the template. The
pull request template counts it as a breaking change, and its migration path goes in the description of the pull
request (see the `pr-description` skill).
request (see the `pr-description` skill) and in its changelog entry.

## 5. Tests

Expand Down Expand Up @@ -218,6 +218,7 @@ In `otterdog/models/<resource>.py`:
- Remove the setting from `docs/userguide/unsupported.md` if it is listed there. Update the guide in
`docs/userguide/guides/` that covers the topic; its Jsonnet examples must remain complete organizations.
- Run `make playground-examples` after changing a reference table or a guide example.
- Add the entry of the change under `## [Unreleased]` of `CHANGELOG.md` (see "Changelog" in `AGENTS.md`).

## 7. Checks

Expand Down
1 change: 1 addition & 0 deletions .agents/skills/github-resource-type/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ needs no stop.
| `show-default` | `otterdog/operations/show_default.py` |
| Docs | `docs/reference/organization/variable.md`, its nav entry in `zensical.toml`, then `make playground-examples` |
| Tests | `tests/models/test_org_variable.py`, `tests/providers/github/integration/test_org_variables.py` |
| Changelog | an entry under `## [Unreleased]` of `CHANGELOG.md` (see "Changelog" in `AGENTS.md`), marked `**Breaking**` with its migration path when existing configurations plan removals |

- Load the full live collection under the right parent, with pagination and detail requests where needed. A
confirmed empty collection is valid. A failed or incomplete inventory must raise before any patch is computed or
Expand Down
1 change: 1 addition & 0 deletions .agents/skills/otterdog-operation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ given. See `ApplyOperation.handle_finish` in `apply.py` and `check_config_file_o
- List the command in the output block of `docs/reference/operations/index.md`.
- A user-facing command with options deserves its own page in `docs/reference/operations/` (see `apply.md`), with a
nav entry under "CLI Operations" in `zensical.toml`.
- Add the entry of the change under `## [Unreleased]` of `CHANGELOG.md` (see "Changelog" in `AGENTS.md`).

## 7. Checks

Expand Down
10 changes: 8 additions & 2 deletions .agents/skills/pr-description/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ gh pr diff <number> -R <owner>/<repo>

Keep the headings of the template, in its order. The HTML comments of the template can be removed.

- **Title**: a conventional commit subject that describes the change, e.g. `fix(rest): only retry idempotent
requests`, not the name of the branch. The notes of the GitHub release list the merged pull requests by their
titles (see "Changelog" in `AGENTS.md`).

- **Description**: what the change does and why, for a reviewer who has not seen the conversation. Start with the
effect users see (CLI, configuration, webapp, bot), then the internals. Describe the final state of the branch,
not how you got there.
Expand All @@ -70,8 +74,8 @@ Keep the headings of the template, in its order. The HTML comments of the templa
- a changed command, option, output format or exit code that scripts may rely on;
- a change that webapp deployments must act on (configuration, database, permissions of the GitHub App).
- **Breaking change details**: what breaks, who is affected (CLI users, webapp deployments, existing
configurations), and the migration path. Remove the section for a change that is not breaking. Committers update
`CHANGELOG.md` at release time (`AGENTS.md`): edit it only if the user asks.
configurations), and the migration path, which the changelog entry of the change also gives (see "Changelog" in
`AGENTS.md`). Remove the section for a change that is not breaking.
- **Tests**: keep this section in every case.
- Tick "Unit tests added / updated" and list the test files, or tick "No test added" and say why (documentation
only, agent instructions).
Expand All @@ -92,6 +96,8 @@ Keep the headings of the template, in its order. The HTML comments of the templa
schema change (a new or changed default). Tick it when the template and examples were updated as the change
needs, and say which; leave it unticked with "not applicable" when neither the schema nor the defaults
changed.
- "`CHANGELOG.md` entry added": tick it when the diff adds or updates the entry under `## [Unreleased]`; leave it
unticked with "not applicable" for an internal change (see "Changelog" in `AGENTS.md`).
- **Notes for reviewers**: the verdict of `adversarial-review`, the commit it covers and its reason, the open
hypotheses that matter for the decision, the risky areas, the behaviour that depends on the GitHub plan (Free,
Team, Enterprise Cloud), what was not tested, and a suggested review order for a large change.
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ messages/checks on PRs. Remove otherwise. -->

- [ ] Documentation updated (`docs/`, reference docs for new/changed settings, `make docs` builds)
- [ ] Default template / examples updated if the config schema changed (`otterdog/resources/defaults/otterdog-defaults.libsonnet`)
- [ ] `CHANGELOG.md` entry added under `## [Unreleased]` (not needed for internal changes: tests, CI, refactoring, docs only)

## Notes for reviewers

Expand Down
14 changes: 14 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Groups the release notes that GitHub generates for the GitHub release (generate_release_notes in
# workflows/publish.yml). They follow the notes of the version from CHANGELOG.md and list every merged pull request
# with its author, by its title. Dependabot labels its pull requests with "dependencies".
changelog:
categories:
- title: Pull requests
labels:
- "*"
exclude:
labels:
- dependencies
- title: Dependency updates
labels:
- dependencies
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ jobs:
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
generate_release_notes: false
# appended to the notes from CHANGELOG.md: every pull request with its author, grouped by .github/release.yml
generate_release_notes: true
make_latest: true
files: dist/*

Expand Down
51 changes: 46 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ rule here conflicts with an explicit request from the user, ask before overridin
fails without the fix, for the expected reason, in an isolated environment that leaves the shared checkout
untouched (the `adversarial-review` skill shows how with a temporary worktree). If that check is not practicable,
say exactly why in the report.
- **A behaviour change updates its documentation in the same pull request**: reference pages, guides, examples.
A mismatch between the code and the documentation is a defect on whichever side drifted.
- **A behaviour change updates its documentation and the changelog in the same pull request**: reference pages,
guides, examples, and its entry in `CHANGELOG.md` (see "Changelog"). A mismatch between the code and the
documentation is a defect on whichever side drifted.
- **Review the branch adversarially before a pull request.** See "Before opening a pull request".

## Load-bearing rules
Expand Down Expand Up @@ -83,7 +84,7 @@ Read `docs/developing_otterdog/architecture.md` before changing the plan/apply p
- Ask before removing functionality or code that looks intentional.
- Keep existing configurations working. A changed default or a renamed or removed key changes the next `plan` of
every organization, so it is a breaking change: describe its migration path in the "Breaking change details" of
the pull request (see the `pr-description` skill).
the pull request (see the `pr-description` skill) and in its changelog entry.
- When you respond to feedback or to an analysis, say whether you agree or disagree before describing what you
changed.

Expand Down Expand Up @@ -119,8 +120,42 @@ Read `docs/developing_otterdog/architecture.md` before changing the plan/apply p
- `.github/workflows/*.lock.yml` are compiled from the `.md` file next to them with `gh aw compile`.
- `otterdog/webapp/home/playground-examples.json` and `playground-reference.json` are regenerated with
`make playground-examples`.
- Committers update `CHANGELOG.md` when they prepare a release (`docs/developing_otterdog/release_process.md`).
Breaking changes are listed under `## [Unreleased]` with their migration path.

## Changelog

`CHANGELOG.md` follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. Each pull request adds
its own entry, and no pull request collects the entries at release time: a change visible to users is incomplete
without its entry. Users are those of the CLI and of the configuration (Jsonnet, default template, schemas), and the
operators of the webapp and its GitHub App.

- New entries go under `## [Unreleased]`, in `### Security`, `### Added`, `### Changed`, `### Deprecated`,
`### Removed` or `### Fixed`, in that order. Read the whole section first and append to an existing subsection; add
one only if it is missing. After updating a branch from `main`, check that its entry is still under
`## [Unreleased]`: git can leave it under a version released in the meantime, without any conflict.
- **One line per change**: the conventional prefix of the change (`feat(cli):`, `fix(rest):`), what changed and why
it matters to users, then links to the issue and the pull request, e.g.
`([#945](https://github.com/eclipse-csi/otterdog/issues/945), [#946](https://github.com/eclipse-csi/otterdog/pull/946))`.
Link the details instead of writing them out. The number of the pull request is known once it is open: add the
link then.
- A breaking change starts with `**Breaking**:` instead of the prefix, and gives its migration path on the next lines,
indented under the entry: what users must change, and what happens if they do not.
- **Never describe a change against something that is itself unreleased.** If your change modifies a behaviour
introduced by an entry under `[Unreleased]`, edit that entry to describe the final state instead of adding a second
one: readers of the release never saw the intermediate version. A new behaviour still gets its own entry, phrased
as the end state.
- Internal changes get no entry: tests, CI, refactorings without a change of behaviour, documentation only, agent
instructions, development tooling. Dependency updates get none either, unless users are affected, e.g. a
vulnerability fixed in a runtime dependency or a new minimum version of Python.
- The GitHub release adds, after the notes of the version, the list that GitHub generates of every merged pull
request with its author, dependency updates apart (`.github/release.yml`). So an entry names no author, and the
title of a pull request is a conventional commit subject that describes the change (`fix(rest): ...`, not the
branch name): the list shows it as is.
- The exception is a `### Security` entry for an advisory: its fix is merged from the private fork of the advisory,
without a pull request in that list, so the entry links the advisory and credits the reporter and the authors of
the fix (see the entry of GHSA-886p-g538-rcmp in 1.8.0).
- A release renames `## [Unreleased]` to `## [X.Y.Z] - DD/MM/YYYY` and opens a new empty `[Unreleased]` in a pull
request of its own, made by `make release-pr` (`docs/developing_otterdog/release_process.md`): never do that in
another change. Do not edit released sections unless the user asks: they are the notes of a published release.

## Commands

Expand All @@ -136,6 +171,7 @@ Read `docs/developing_otterdog/architecture.md` before changing the plan/apply p
| Build the documentation (strict) | `make docs` |
| Serve the documentation locally | `make docs-serve` |
| Regenerate the Playground catalogs from the docs | `make playground-examples` |
| Release, committers only: open its pull request, then tag its merged commit (both push to GitHub) | `make release-pr VERSION=X.Y.Z`, `make release-tag VERSION=X.Y.Z` |

CI (`.github/workflows/build.yml`) runs pytest on Python 3.11 to 3.14 (`pytest -ra -n auto --dist worksteal tests`),
with the Playground end-to-end tests in Firefox on 3.14 only. It also builds the webapp assets and runs `npm test`,
Expand All @@ -156,6 +192,8 @@ ran and which did not (the pull request template asks for it).
first run `make playground-examples`, then `tests/test_docs_examples.py` and `tests/test_docs_playground.py`.
- **Webapp front-end** (`otterdog/webapp/static/src/`): run `npm test` and `npm run build`. The end-to-end tests
(`poetry run pytest tests/webapp/playground`) are skipped unless the assets are built and Firefox is installed.
- **Release tooling** (`release.py`, the `release-*` targets of the `Makefile`): run
`poetry run pytest tests/test_release.py`, which runs git on local repositories only.
- **Workflows** (`.github/workflows/`): pin every `uses:` to a full commit SHA with a trailing `# vX.Y.Z` comment
(Dependabot maintains both; the exceptions are policies in `.github/zizmor.yml`), set `persist-credentials: false`
on every `actions/checkout`, and pass `${{ }}` expressions to `run:` through `env:`, never inline. Then run
Expand Down Expand Up @@ -234,6 +272,9 @@ or `--delete-resources` unless the request names them too.
(`dev/scripts/remove-ts-machines.sh`).
- `make init` sets the global Poetry option `virtualenvs.in-project` and overwrites the link
`~/.local/bin/otterdog`.
- **Releases**: `make release-pr` pushes a branch to `eclipse-csi/otterdog` and opens a pull request, and
`make release-tag` pushes a tag, which publishes the release to PyPI and to the container registry at once. Never
run them unless the user asks for that release.
- Do not push, open or update pull requests, or post comments or reviews on GitHub without an explicit request.

## Skills
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

The changes that matter to users of otterdog. The [GitHub releases](https://github.com/eclipse-csi/otterdog/releases)
also list every pull request with its author, dependency updates included.

## [Unreleased]

## [1.9.0] - 30/11/2026

### Added
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: init test check clean build-image init-minikube check-kube-context dev-webapp dev-webapp-ts dev-webapp-tunnel dev-webapp-tunnel-local dev-webapp-ngrok dev-webapp-ngrok-local clean-ingress-finalizers clean-tailscale-proxies clean-webapp docs docs-serve docs-serve-dev docs-serve-tunnel docs-serve-ngrok playground-examples help
.PHONY: init test check clean build-image init-minikube check-kube-context dev-webapp dev-webapp-ts dev-webapp-tunnel dev-webapp-tunnel-local dev-webapp-ngrok dev-webapp-ngrok-local clean-ingress-finalizers clean-tailscale-proxies clean-webapp docs docs-serve docs-serve-dev docs-serve-tunnel docs-serve-ngrok playground-examples release-pr release-tag help

PIPX := $(shell command -v pipx --version 2> /dev/null)
POETRY := $(shell command -v poetry 2> /dev/null)
Expand Down Expand Up @@ -149,5 +149,14 @@ docs-serve-ngrok: ## Serve the documentation, Playground links target the webap
playground-examples: ## Update the examples listed by the Playground from the configuration guides
poetry run python docs_playground.py

# a release (docs/developing_otterdog/release_process.md): VERSION must be given, it defaults to the version of poetry
release-pr: ## Open the pull request of the release: make release-pr VERSION=X.Y.Z [REMOTE=<remote>]
@if [ "$(origin VERSION)" != "command line" ]; then echo 'Error: give the version, make release-pr VERSION=X.Y.Z'; exit 1; fi
poetry run python release.py pr "$(VERSION)" $(if $(REMOTE),--remote "$(REMOTE)")

release-tag: ## Once that pull request is merged, push the tag of the release: make release-tag VERSION=X.Y.Z [REMOTE=<remote>]
@if [ "$(origin VERSION)" != "command line" ]; then echo 'Error: give the version, make release-tag VERSION=X.Y.Z'; exit 1; fi
poetry run python release.py tag "$(VERSION)" $(if $(REMOTE),--remote "$(REMOTE)")

help: ## Show this help
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
10 changes: 5 additions & 5 deletions docs/developing_otterdog/ai_agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ CLAUDE.md # Claude Code adapter, only imports AGENT
```

- [`AGENTS.md`](https://github.com/eclipse-csi/otterdog/blob/main/AGENTS.md) starts with the rules that are never
negotiable, then describes the project, its conventions, the commands, how to choose the checks for a change, the
adversarial review required before a pull request, the git rules for sessions that share a checkout, and the
precautions for commands that read or change real GitHub organizations. It summarises this documentation: when a
technical description diverges from it, update `AGENTS.md`; when the documentation contradicts one of its rules
(safety, git, contribution), report the gap instead of weakening the rule.
negotiable, then describes the project, its conventions, how to write a changelog entry, the commands, how to choose
the checks for a change, the adversarial review required before a pull request, the git rules for sessions that
share a checkout, and the precautions for commands that read or change real GitHub organizations. It summarises
this documentation: when a technical description diverges from it, update `AGENTS.md`; when the documentation
contradicts one of its rules (safety, git, contribution), report the gap instead of weakening the rule.
- A skill is a procedure for one kind of task, written in the open
[Agent Skills](https://agentskills.io) format: a folder with a `SKILL.md` file that starts with a YAML frontmatter
holding `name` and `description`. `AGENTS.md` lists the available skills and when to use each one.
Expand Down
Loading
Loading