API description quality review
Purpose
Review the descriptions of component props, events and slots for whether a developer or an agent can use the component correctly from the description and the metadata beside it. The review uses four diagnostic lens assessments per component package and one rating derived from them. It produces no criterion scores, percentages or issue-rate calculations.
Rubric version
The current version is 1.0.
This file owns the lenses, the rating rule, the cluster and package-unique treatment, and the
suggested-rewrite standard. API estate index owns the reviewer input.
API review reports owns the report contracts.
api-quality-rubric.config.json owns the machine-readable
values. The content-quality rubric is separate and unchanged.
Scope
- Unit: one component package,
@maersk-global/mds-components-core-<slug>.accordionandaccordion-itemare separate packages with separate ratings. - Source: the
apikey of the package’smetadata.json, which holdsprops,events,slotsandtypes. Nothing else: no component source, demos, page content or other metadata keys. - Reviewed text: the
descriptionof every prop, event and slot. The other fields (type,defaultValue,options,required,category,typescriptType,types) are evidence the descriptions are checked against. They are not reviewed for wording.
Review sequence
- Read the reviewer input in full. Do not consult earlier reviews, scores or ledgers.
- Examine each reviewed description through all four lenses.
- Record each supported problem once as a finding, noting every lens it affects.
- Assess each lens as Strong, Mixed or Weak from the supported evidence.
- Return the lens assessments verbatim. Reviewers do not rate quality: the merge step derives it from the lens assessments (Quality rating).
Do not count defects, calculate rates or force a finding under every lens. A lens with no supported problem needs no finding.
Review lenses
| Stored value | Display assessment | Meaning |
|---|---|---|
strong | Strong | No supported substantive finding affects this lens. Optional polish does not change it. |
mixed | Mixed | A supported, contained weakness affects this lens. |
weak | Weak | Supported evidence shows that this aspect of the descriptions is materially unreliable. |
Every Mixed or Weak assessment must be supported by at least one substantive finding. Every substantive finding must name at least one Mixed or Weak lens. Explain a problem once even when it affects several lenses.
A substantive finding changes what a developer or agent can understand, decide or do with the API. Optional polish improves wording without a demonstrated effect on those outcomes.
Clarity
Can the reader understand what the prop, event or slot is on the first read?
- Strong: each description resolves to one meaning and names its subject.
- Mixed: a contained set of descriptions is circular (restates the name), fragmentary, tangled or has a missing referent, but the intended meaning is recoverable from the name and type.
- Weak: descriptions are pervasively unreadable or the meaning cannot be recovered from the name and type.
A recoverable typo or a stylistic preference is not a substantive clarity finding.
Completeness
Does the description say what the reader needs to use the item?
- Strong: each description states what the item does and, where a value, event payload or slot content is involved, what it accepts or carries and when it applies.
- Mixed: a contained set of items has an empty description, omits the condition or consequence that decides how to use it, or omits an interaction with another item the reader would otherwise trip over.
- Weak: empty or content-free descriptions are widespread, or an item whose misuse is likely has no usable description.
An empty description is a completeness finding. A missing defaultValue is a completeness finding
only when the description does not state the behaviour that applies when the prop is unset.
Accuracy
Do the descriptions agree with the metadata they describe? Check each description against that
item’s type, typescriptType, defaultValue, options and required, and against api.types.
- Strong: nothing in the descriptions contradicts the metadata.
- Mixed: a contained set of descriptions contradicts the metadata or names a value, default, option or event payload the metadata does not support.
- Weak: contradictions are widespread, or one would lead a reader to a wrong implementation of a commonly used item.
Report only contradictions and unsupported claims the metadata demonstrates. A description that claims behaviour the metadata neither supports nor contradicts belongs under uncertainty: ask the author. Do not guess at component source.
Consistency
Is the same concept described the same way across components?
- Strong: a shared name with the same type is described with one meaning, in compatible wording.
- Mixed: a shared item has wordings that differ in meaning, or in wording enough to suggest a difference that does not exist, in a contained number of packages.
- Weak: a widely shared item contradicts itself across packages, or the same concept is described in several incompatible ways.
Different wording is not a finding when the components differ and the description says how. Show that the difference is unexplained before requesting one wording.
Shared clusters and package-unique descriptions
The estate index groups items by key (kind, name and type):
- A shared cluster is a key used by two or more packages. The estate reviewer reviews each cluster once, across all its wordings, under all four lenses. A finding fans out to every affected package it names, so the same problem is never reported package by package. Consistency can only be judged here.
- A package-unique description belongs to a key used by exactly one package. The package reviewer reviews these under clarity, completeness and accuracy. Consistency does not apply to unique descriptions: they have nothing to be consistent with, so the package report has no consistency assessment. The merge takes a package’s consistency from its clusters alone, and a package in no cluster is Strong for consistency.
A package’s own copy of a shared item is judged in its cluster, not again by the package reviewer.
Quality rating
Per lens, a package’s assessment is the worst of:
- the package reviewer’s assessment of its unique descriptions (clarity, completeness and accuracy only; consistency comes from clusters); and
- the worst estate-reviewer assessment (the combined assessment: the estate review is run twice by independent reviewers, and per cluster and lens the merge takes the worse of the two reports) of the flagged clusters the package belongs to, under that lens, capped at Mixed (a Weak cluster counts as Mixed for each package in it), but only when the package meets the threshold gate below.
Threshold gate. The gate is about the package as a whole. A package’s flagged items are its
items (props, events and slots) that sit in a cluster the estate reviewer assessed Mixed or Weak under
any lens, each item counted once whichever lenses flagged it. If the flagged items are at least
25% of the package’s total items and at least 2 items, the gate is met and the package’s flagged
clusters count: each lens takes the worst assessment across the package’s flagged clusters under that
lens (capped at Mixed). Below the gate the clusters’ findings are still listed in the estate summary
and the estate report, but they lower no lens for that package. The thresholds are
clusterRating.minShare (0.25) and clusterRating.minItems (2) in
review/config/api-quality-rubric.config.json; the merge script reads them from there. Each
package’s gate (distinct flagged items, total, share, met, and the flagged count per lens) is
recorded in the estate summary (clusterGate).
Worst means Weak, then Mixed, then Strong. The package reviewer’s assessment always applies in
full. Only a package’s own unique descriptions can make a lens Weak for that package. A shared
description that is poor estate-wide (for example disabled) lowers each package using it to at
most Medium, and only when it is a meaningful part of that package’s API, so one poor shared prop
does not rate an otherwise good component down. The estate report still records the cluster as
Weak. A package with no unique descriptions takes its assessment from counted clusters alone; a
package in no cluster takes it from the package reviewer alone. Estate findings are also kept in
the estate report.
The overall rating is then derived from the lens assessments. Apply the first matching condition:
| Condition | Stored value | Display rating |
|---|---|---|
| Any lens is Weak | low | Low quality |
| No lens is Weak and any lens is Mixed | medium | Medium quality |
| Every lens is Strong | high | High quality |
This keeps the consistency rule of the content-quality rubric: High needs every lens Strong, and
Medium or Low need at least one Mixed or Weak lens. It differs from the content-quality rubric in
one respect: there the rating is a holistic judgement about a core task and is explicitly not
derived from the lens assessments. API packages have no core task, and no single reviewer sees the
whole package, so the rating is a deterministic function of the merged lens assessments. The merge
script, not a reviewer, applies it. qualityReason is generated from the decisive lens and
finding IDs.
The rating covers only the reviewed descriptions. It does not prove the component behaves as described.
Finding standard
Every substantive finding must include:
- a quote of the description, or the precise missing statement;
- the affected key and, for a cluster, the wordings and packages involved;
- the likely consequence for a developer or agent;
- the lens or lenses involved;
- a suggested rewrite, or one concrete author question when the intended behaviour is not established by the metadata.
Use neutral report IDs (F1, F2 and so on) with no severity labels. Separate substantive findings
from optional polish.
Suggested rewrite standard
A rewrite is for the component source, where the description is fixed upstream. It must:
- apply the content-voice-and-tone skill: British spelling, active voice, lead with the point, one meaning per sentence, no hype;
- describe the item, not the component’s page: state what it does, then the value it accepts or the payload it carries, then the condition that matters;
- agree with the item’s
type,optionsanddefaultValue. Name options exactly as the metadata does, and state the default only when the metadata records one; - for a cluster, give one wording that every affected package can use unchanged, or state which
packages need a variant and why. Say which wordings (
W1,W2) it replaces; - never invent behaviour. When the metadata does not establish it, ask one author question instead of writing a rewrite;
- stay short. A description that restates the name adds nothing.