Extension:Jade/Entity data

Jade data exists on wiki pages, as JSON documented here.

Judgment targets
Judgments apply to a single wiki entity, given by the judgment page's title: "Judgment:Revision/543210", which targets a revision with ID 543210 on the wiki.

There are currently two possible target types,


 * Diff - Any edit to a page, for example https://en.wikipedia.org/?diff=12345678
 * Revision - Snapshot of a page's content, for example https://en.wikipedia.org/wiki/Sinharaja_Forest_Reserve?oldid=12345678

Judgment page title
Judgment titles correspond to their target entity like,"https://en.wikipedia.org/?diff=12345678 is judged by https://en.wikipedia.org/wiki/Jade:Diff/12345678."Each target entity type has its own page title keyword:


 * Judgment:Diff/12345678
 * Judgment:Revision/12345678

Use the Jade API to calculate judgment page titles (TODO: implement and give an example), or use the API directly. Note that both namespace and keyword may be translated. For example a revision judgment in Russian Wikipedia might have the title "Суждение:Версия/12345678".

On the bright side, these translations are managed by configuration and aren't expected to change after initial deployment to a wiki. See  in mediawiki-config to translate.

Judgment scoring schema
Schemas and their data formats are documented in JADE/Labels, and we summarize here:


 * damaging - boolean. Is this diff damaging to the content?  false.
 * goodfaith - boolean. Was this diff made in good faith?  true.
 * contentquality - string. Wikipedia 1.0 assessment (but without lists for some reason): "Stub".  For Wikidata, you might use the item quality scale, e.g. "E".

Namespaces
Judgments are stored on the same wiki as the page being judged, in the  namespace. Permissions for this namespace should be the same as for regular content namespaces. There is also a  namespace for discussion about each JADE page.

Data structure
For more sophisticated integrations, you might want to read and manipulate the judgment structure directly. JADE pages are organized by schema, contain a list of judgments for each schema.

Scoring schemas can only be used on a specific entity type, configure  if you need to change the allowed schemas for any entity type. Wikidata for example overrides the default  quality scale with , implementing its own quality scale.

One judgment per schema must be chosen as the  value, this indicates the current consensus opinion.

The minimum valid  judgment page:

A more interesting example, with conflicting judgments (this is fine), some notes, and both  schemas represented.

Each wiki entity type supports different schemas, here is a  judgment.

Endorsements
TODO

Validation
JADE pages are validated before they are saved to the database, and if the data format is incorrect the edit will be aborted. Internally, we specify most of our validation rules as a JSON schema, which you can read here. You can run your own validation locally using the JSON schema libraries available for many programming languages.

Judgment content must refer to a real revision or page.

An additional validation is done on the page title, which must match the entity being judged as described above.

Detailed validation errors will appear on save, if there are problems with your syntax. Feel free to reach out to us for debugging help.