TExcelTAD
Home › Platform Engineering: Internal Developer Platforms › Scorecards & Maturity Checks

Scorecards & Maturity Checks

A golden path makes new services good. Scorecards tell you whether existing services are still good, and show each team what to do next. A scorecard is a named set of checks, each evaluated per catalog entity, grouped into levels (bronze, silver, gold) or a percentage: "linkly passes 9 of 10 production-readiness checks; missing: a runbook entry for every alert".

Where scorecards come from

Open-source Backstage has no built-in scorecards. Options:

Option How checks are defined
Tech Insights (Backstage community plugin) fact retrievers collect facts per entity on a schedule (from the catalog, GitHub, CI…); checks are rules over those facts (a JSON rules engine)
Spotify's Soundcheck (commercial Backstage plugin) checks and tracks configured in YAML or the UI, with levels
Port, Cortex, OpsLevel (SaaS portals) scorecards built in, rules over the portal's data model
Your own a nightly job that computes facts and writes a report or annotations

They all share the same model: facts (data about an entity) → checks (rules over facts) → scorecards (checks grouped into levels). The rest of the lesson builds that model.

Collecting facts from a repository

Most facts come from the service's own files. The session computes a facts JSON for a service repository with yq and jq, the way a fact retriever or a CI job would:

bash · try it yourself
mkdir -p linkly/{chart/templates,docs,monitoring} && cd linkly
cat > catalog-info.yaml <<'EOF'
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: linkly
  annotations: {backstage.io/techdocs-ref: "dir:.", pagerduty.com/service-id: P1LNK}
spec: {type: service, lifecycle: production, owner: team-links, system: links}
EOF
printf 'kind: PodDisruptionBudget\n' > chart/templates/pdb.yaml
printf 'kind: Deployment\n' > chart/templates/deployment.yaml
printf 'image:\n  tag: 1.4.0\nresources:\n  limits: {memory: 128Mi}\n' > chart/values.yaml
printf '# Runbook\n' > docs/runbook.md
cat > monitoring/slo.yaml <<'EOF'
service: linkly
objectives:
  - {name: availability, target: 99.9}
EOF
jq -n \
  --arg owner "$(yq '.spec.owner' catalog-info.yaml)" \
  --arg lifecycle "$(yq '.spec.lifecycle' catalog-info.yaml)" \
  --argjson techdocs "$(yq '.metadata.annotations | has("backstage.io/techdocs-ref")' catalog-info.yaml)" \
  --argjson oncall "$(yq '.metadata.annotations | has("pagerduty.com/service-id")' catalog-info.yaml)" \
  --argjson pdb "$(grep -lq PodDisruptionBudget chart/templates/*.yaml && echo true || echo false)" \
  --argjson memoryLimit "$(yq '.resources.limits | has("memory")' chart/values.yaml)" \
  --argjson latestTag "$(yq '.image.tag == "latest"' chart/values.yaml)" \
  --argjson runbook "$([ -s docs/runbook.md ] && echo true || echo false)" \
  --argjson sloCount "$(yq '.objectives | length' monitoring/slo.yaml)" \
  '{entity: "component:default/linkly", facts: $ARGS.named}' | tee facts.json
{
  "entity": "component:default/linkly",
  "facts": {
    "owner": "team-links",
    "lifecycle": "production",
    "techdocs": true,
    "oncall": true,
    "pdb": true,
    "memoryLimit": true,
    "latestTag": false,
    "runbook": true,
    "sloCount": 1
  }
}

Evaluating checks and levels

The checks are rules over those facts; levels require all checks of the level below. This model evaluates a production-readiness scorecard for four services:

python · try it yourself
FACTS = {
    "linkly":     {"owner": "team-links", "techdocs": True,  "oncall": True,  "pdb": True,
                   "memoryLimit": True,  "latestTag": False, "runbook": True,  "sloCount": 1},
    "redirector": {"owner": "team-links", "techdocs": True,  "oncall": True,  "pdb": False,
                   "memoryLimit": True,  "latestTag": False, "runbook": False, "sloCount": 0},
    "analytics":  {"owner": "team-growth", "techdocs": False, "oncall": False, "pdb": False,
                   "memoryLimit": False, "latestTag": True,  "runbook": False, "sloCount": 0},
    "qr-codes":   {"owner": None, "techdocs": True, "oncall": True, "pdb": True,
                   "memoryLimit": True, "latestTag": False, "runbook": True, "sloCount": 2},
}

LEVELS = [   # (level, [(check id, description, rule)])
    ("bronze", [("has-owner",  "has an owner",               lambda f: f["owner"] is not None),
                ("no-latest",  "image tag is not latest",    lambda f: not f["latestTag"]),
                ("mem-limit",  "memory limit set",           lambda f: f["memoryLimit"])]),
    ("silver", [("techdocs",   "has TechDocs",               lambda f: f["techdocs"]),
                ("oncall",     "has an on-call rotation",    lambda f: f["oncall"]),
                ("pdb",        "has a PodDisruptionBudget",  lambda f: f["pdb"])]),
    ("gold",   [("slo",        "has at least one SLO",       lambda f: f["sloCount"] >= 1),
                ("runbook",    "has a runbook",              lambda f: f["runbook"])]),
]

def evaluate(facts):
    passed = sum(rule(facts) for _, checks in LEVELS for _, _, rule in checks)
    total = sum(len(checks) for _, checks in LEVELS)
    level = "none"
    for name, checks in LEVELS:
        failed = [cid for cid, _, rule in checks if not rule(facts)]
        if failed:                    # the lowest level not reached: these are the next things to fix
            return level, passed, total, failed
        level = name
    return level, passed, total, []

print(f"{'service':11} {'level':7} {'passed':>6}  next to fix")
for svc, facts in FACTS.items():
    level, passed, total, failing = evaluate(facts)
    print(f"{svc:11} {level:7} {passed:>3}/{total}  {', '.join(failing) or '-'}")
service     level   passed  next to fix
linkly      gold      8/8  -
redirector  bronze    5/8  pdb
analytics   none      1/8  no-latest, mem-limit
qr-codes    none      7/8  has-owner

Notice qr-codes: it passes 7 of 8 checks but sits at level none, because the one it fails (no owner) is a bronze check. Levels encode priorities: an unowned service with perfect docs is still a problem first and a success second. The "next to fix" column is what teams see on their entity page, which is far more actionable than a percentage.

Using scorecards without making enemies

  • Publish the checks before scoring anyone, with a link from every check to the doc that explains how to pass it (ideally: "update to the latest template").
  • Score services, not people. Show scorecards per team for the team; aggregate per organisation for leadership. A league table of teams breeds gaming.
  • Every failing check needs a paved fix. "Add a PDB" should be one template update or one line in values, not a research project.
  • Campaigns, not walls. Pick one check per quarter ("every production service has an SLO by Q3"), track it, celebrate it, then make it a requirement for new services.
  • Checks rot like code. When the facts change shape (a new chart layout, a renamed annotation), a check can silently pass for everyone. Keep a known-bad fixture in the scorecard's tests.

Test yourself

What are the three layers of the scorecard model used by Tech Insights and similar tools?

  1. Users, groups, roles
  2. Facts, checks, scorecards (levels)
  3. Logs, metrics, traces
  4. Plan, apply, destroy

Why does qr-codes reach no level despite passing 7 of 8 checks?

  1. A bug
  2. It fails a bronze check (no owner), and higher levels require all lower ones
  3. It has too many SLOs
  4. Gold checks are ignored

Which practice keeps scorecards from becoming a source of resentment?

  1. Rank teams publicly
  2. Give every failing check a documented, cheap fix and run focused campaigns
  3. Add 50 checks at once
  4. Hide the checks