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
44 changes: 44 additions & 0 deletions .github/workflows/validate-content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Validate content

# Deliberately no `paths:` filter. This workflow is meant to become a required status
# check on main, and a required check that gets skipped by a paths filter leaves the pull
# request waiting on a run that will never report. It is fast enough to run every time.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
validate-content:
name: validate-content
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
# Full history so the version-bump gate can diff against the base branch
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install PyYAML
run: pip install --disable-pip-version-check pyyaml

- name: Validate assessment content
env:
BASE_REF: ${{ github.base_ref }}
run: |
if [ -n "$BASE_REF" ]; then
git fetch --no-tags origin "$BASE_REF"
python3 scripts/validate_content.py --base "origin/$BASE_REF"
else
python3 scripts/validate_content.py
fi
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Python: scripts/validate_content.py generates bytecode when imported
__pycache__/
*.py[cod]
.venv/
venv/

# Node: not used by the site itself, but contributors may install local tooling
node_modules/
npm-debug.log*

# Editors
.vscode/
.idea/
*.swp
*~

# OS
.DS_Store
Thumbs.db

# Local scratch: notes and drafts that are not part of the project
.backlog/
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Changelog

All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

This project tracks two version numbers, explained in [VERSIONING.md](VERSIONING.md): the **release version** below, applied as a git tag, and the **content version** of the assessment question set, recorded in `data/questions-*.yaml`. Each release notes the content version it ships.

## [Unreleased]

## [0.9.0] - 2026-08-06

First tagged release. Ships `content_version` **0.9.0**, tracking CNCF Platform Engineering Maturity Model **v1.0**.

### Added

- Version metadata (`content_version`, `model_version`, `model_url`) in every content file.
- Version stamp on shareable result URLs, so a link records which question set produced it.
- Detection of links built against an older question set.
- Page footer showing the assessment version and a link to the maturity model whitepaper.
- Content validation in CI.
- [VERSIONING.md](VERSIONING.md) describing the versioning scheme and release process.
- This changelog.

### Changed

- Whitepaper links point at the versioned `/v1/` URL, localised per language where available.
- Whitepaper links carry campaign parameters.

### Fixed

- Answers were lost when switching language after arriving from a URL that already contained them.
- Switching language reset the assessment to the first page.
- The browser back button did not step between assessment pages.
- `README.md` listed the wrong option scale and language set.

## Prior to 0.9.0

Unversioned changes are summarised here so the first release has a baseline.

- Assessment of 20 questions across five categories (Investment, Adoption, Interfaces, Operations, Measurement)
- All content moved out of hand-written HTML into per-language YAML files.
- Translations added for Chinese, Brazilian Portuguese and Japanese.
- Multi-page wizard flow, one category per page.
- Results shown as a spider chart, heat-map matrix and per-category scores.
- Assessment state held entirely in the URL, making results shareable.
- CNCF styling and branding applied to the assessment.
- Docker Compose development environment mirroring the GitHub Pages layout.
- Spanish and German translations were added, then quarantined as incomplete.
- An automatic language-discovery mechanism was added, then replaced by a fixed list of links.

[Unreleased]: https://github.com/Cloud-Native-Platform-Engineering/pemm-assessment/compare/v0.9.0...HEAD
[0.9.0]: https://github.com/Cloud-Native-Platform-Engineering/pemm-assessment/releases/tag/v0.9.0
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ This repo contains the Platform Maturity Model Assessment.

On answering the questions you get a spider diagram and a matrix to indicate where you are on a map right now.

You can copy the URL to share the form in its current state, for example [this pre-filled form](https://cloud-native-platform-engineering.github.io/pemm-assessment/?investment_1=1&investment_2=1&investment_3=2&investment_4=1&adoption_1=1&adoption_2=2&adoption_3=2&adoption_4=2&interfaces_1=2&interfaces_2=3&interfaces_3=3&interfaces_4=4&operations_1=3&operations_2=3&operations_3=2&operations_4=1&measurement_1=3&measurement_2=4&measurement_3=4&measurement_4=4)
You can copy the URL to share the assessment in whatever state it is in. For example:

- [a completed assessment, opened on its results](https://cloud-native-platform-engineering.github.io/pemm-assessment/?investment_1=1&investment_2=1&investment_3=2&investment_4=1&adoption_1=1&adoption_2=2&adoption_3=2&adoption_4=2&interfaces_1=2&interfaces_2=3&interfaces_3=3&interfaces_4=4&operations_1=3&operations_2=3&operations_3=2&operations_4=1&measurement_1=3&measurement_2=4&measurement_3=4&measurement_4=4&v=0.9.0&view=results)
- [a partly answered assessment, reopened on page 2](https://cloud-native-platform-engineering.github.io/pemm-assessment/?investment_1=2&investment_2=3&adoption_1=4&v=0.9.0&page=2)

Alongside the answers, `v` records which version of the question set they were given against, `page` records which page was open, and `view=results` opens straight to the results.

When [giving feedback](https://docs.google.com/forms/d/1SW8NE-7E2zjhoun4jklRPmH5sYgJ_3rTw2D_FoOwViA/viewform) please use these shareable URLs to help folks see what you see.

Expand All @@ -14,30 +19,47 @@ Note: If you switch the language while viewing the results, the app will keep yo

<img width="1076" height="1201" alt="A screenshot showing the assessment results, a spider chart, heatmap matrix, and list of scores" src="https://github.com/user-attachments/assets/18d4b7db-1f52-4458-8970-acfbdf20c987" />

## Versioning

The assessment question set carries its own version, separate from the repository's release tags, because the `field_name` keys and option values in shareable links are a public contract: renaming or renumbering a question silently changes what previously shared links mean.

Shareable links therefore include a `v` parameter recording the question set they were built against, and the footer shows the current assessment version alongside the CNCF Platform Engineering Maturity Model release it is based on.

Before changing anything under `data/`, read [VERSIONING.md](VERSIONING.md), which has the bump rules and the release process. You can check your changes locally with:

```sh
python3 scripts/validate_content.py
```

See [CHANGELOG.md](CHANGELOG.md) for release history.

## Discussion

Please join the [Cloud Native Computing Foundation on Slack](https://communityinviter.com/apps/cloud-native/cncf) and use the [platform-engineering](https://cloud-native.slack.com/archives/C020RHD43BP) channel.

## Content Management and Translations

The assessment content is now managed through YAML files in the `/data/` directory for easy updates and translations:
The assessment content is managed through YAML files in the `/data/` directory for easy updates and translations:

- `questions-en.yaml` - English (default language)
- `questions-[lang].yaml` - Translations
- `questions-en.yaml` - English (source of truth)
- `questions-[lang].yaml` - Translations, currently `ja`, `pt` and `zh`
- `quarantine/` - Translations that are incomplete or not yet reviewed, excluded from the site

To add a language, add the YAML file and add the language to the list in `index.html`.
To add a language, add the YAML file and add a link for it to the language nav in `index.html`.

### Updating Questions and Content

**⚠️ IMPORTANT: When updating `questions-en.yaml`, you MUST also update the corresponding translations:**

1. **Make changes to the English source file first**: Edit `data/questions-en.yaml`
2. **Update translation**: Apply equivalent changes to `data/questions-[lang].yaml`
3. **Verify consistency**: Ensure all three files have:
3. **Bump the version**: Follow the rules in [VERSIONING.md](VERSIONING.md)
4. **Verify consistency**: Run `python3 scripts/validate_content.py`, which checks that every file has:
- Same category IDs and structure
- Same question IDs within each category
- Same option values (1-5) for scoring consistency
- Translated text for all user-facing content
- Same option values (1-4) for scoring consistency

It compares structure only, and cannot tell whether the text was actually translated. Check that by eye.

### What Needs Translation

Expand All @@ -52,7 +74,7 @@ When updating content, ensure these elements are translated in all language file

After updating translations:

1. Test each language using URL parameters: `?lang=en`, `?lang=zh`, `?lang=es`
1. Test each language using URL parameters: `?lang=en`, `?lang=ja`, `?lang=pt`, `?lang=zh`
2. Verify all text displays correctly
3. Ensure functionality works across all languages
4. Test the complete assessment flow in each language
102 changes: 102 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Versioning

This project tracks **two independent version numbers**. Knowing which one to change is usually the only thing you need from this document.

| Version | Where it lives | What it describes |
| --- | --- | --- |
| **Release version** | git tag, e.g. `v0.9.0`, plus [CHANGELOG.md](CHANGELOG.md) | The repository as a whole: application code, styling, docs, content |
| **Content version** | `metadata.content_version` in every `data/questions-*.yaml` | The assessment question set itself |

They are allowed to differ, and usually will.

## Why the content is versioned separately

Answers are serialized straight into the URL:

```text
?investment_1=1&adoption_2=2&interfaces_3=3&v=0.9.0
```

Those `field_name` keys and their `1` to `4` values are a **public contract**. The README encourages people to share these links, and they turn up in screenshots, blog posts and conference slides.

If a question is renamed, removed, or renumbered, every previously shared link silently starts meaning something different. No error, no warning; the same URL just produces a different result. That is a compatibility surface the application code does not have: a fix to the spider chart cannot invalidate anyone's saved link, but adding one question can.

So the question set gets a version of its own, stamped into every shared link as `v`, and the app compares that stamp against the version it is running.

## When to bump `content_version`

The tiers are defined by what happens to links that were shared before the change.

| Bump | Change | Effect on existing shared links |
| --- | --- | --- |
| **MAJOR** | Remove or rename a `field_name`; change the option `value` scale; add or remove a category | Old links now mean something **different**, and are actively misleading |
| **MINOR** | Add a question with a new `field_name`, adjust scoring | Old links remain valid but **incomplete** |
| **PATCH** | Reword a question, option, or description; fix a typo, translation, or link | Old links remain **fully valid** |

`data/questions-en.yaml` is the source of truth. Bump it there first, then bring the translations up to the same number as they are updated.

## `model_version` and `model_url`

`model_version` records which release of the upstream [CNCF Platform Engineering Maturity Model](https://cloudnativeplatforms.com/whitepapers/platform-eng-maturity-model/) the questions are derived from. `model_url` is the link to exactly that version.

They sit next to each other deliberately. The whitepaper URL also appears inside the translated `intro` prose, and CI checks that both point at the same document. Otherwise it is easy to bump `model_version` to `2.0` while the intro quietly keeps sending readers to v1.

### Linking a translated maturity model

The maturity model and whitepapers are published in several languages. A translation **should** point at its own locale rather than the English original. For example, a reader working through the assessment in Japanese is better served by the Japanese source material.

```yaml
# data/questions-ja.yaml
model_version: "1.0"
model_url: "https://cloudnativeplatforms.com/ja/whitepapers/platform-eng-maturity-model/v1/?..."
```

Two rules apply:

- `model_version` **must** be identical across every language. They all describe the same upstream release, and CI blocks a mismatch.
- `model_url` **may** differ per language, but must point at the same release, and must agree with the whitepaper link inside that file's own `intro`.

**Use the locale whenever it exists, even if that page is not translated yet.** The whitepaper site handles this itself: a locale that exists but has no translation for a given page renders a "Translation Needed" banner above the English text, with a link explaining how to contribute. Linking it keeps the reader in their own language context, tells them the truth, and starts serving the translation automatically the moment one lands, with no change needed here.

So the test is whether the **locale** exists, not whether that particular page has been translated:

```sh
curl -o /dev/null -w '%{http_code}\n' -L \
https://cloudnativeplatforms.com/<lang>/whitepapers/platform-eng-maturity-model/v1/
```

`200` means use it. `404` means the locale does not exist at all, so use the English URL. Portuguese is currently in this position.

## Translations

Every language file carries the same `content_version` as `data/questions-en.yaml` once it is in sync. A file still showing an older number is, by definition, behind. CI reports this as a warning rather than an error, because a lagging translation is acceptable while a broken one is not.

What is **not** optional is structural parity. Every published language must have identical category ids and order, question ids, `field_name` values, and option values. A translation that renames a field breaks scoring and shared links for everyone using that language. CI blocks on this.

Files under `data/quarantine/` are excluded from publication and never block CI. A file lives there when it is incomplete or unreviewed. To bring one out: reach full structural parity, set its `content_version` to match the source, and move it into `data/`.

## Cutting a release

`main` is protected and requires pull requests, so releases are never tagged from a local branch.

1. Branch, and make the change.
2. Bump `content_version` if the question set changed. Add a `CHANGELOG.md` entry under `## [Unreleased]`.
3. Open a pull request. The `validate-content` check must pass.
4. Merge.
5. Move the `## [Unreleased]` entries under a new version heading with the date.
6. Tag the merge commit on `main` (`git tag v0.9.1`) and publish a GitHub Release pointing at that entry.

There is no build step and no artifact (GitHub Pages serves `main` directly), so a tag is a marker of a known-good state rather than something that produces a deliverable.

## What CI enforces

`.github/workflows/validate-content.yml` runs `scripts/validate_content.py` on every pull request. Run it locally the same way:

```sh
python3 scripts/validate_content.py # structural checks
python3 scripts/validate_content.py --base origin/main # also the version-bump gate
```

**Blocking:** files parse as YAML; every published language is at structural parity with the source; `content_version`, `model_version` and `model_url` are present and well formed; the intro whitepaper link agrees with `model_url`; and `data/questions-en.yaml` cannot change without its `content_version` changing too.

**Warning only:** a translation behind the source version, and anything wrong in `data/quarantine/`.
Loading
Loading