CanonDigest.h header

#include <ew/app/CanonDigest.h>

Namespace ew::app

Functions

QString ew::app::entityCanonDigest(const ew::core::Project &project, const ew::core::Entity &entity)

A plain-text canon digest for a single entity: a header line ("- Name (Category): summary", the trailing parts present only when available) followed by an indented " Label: value" line for each of the entity's non-empty structured field values – the concrete truths (eye colour, status, birth year, ...) that ground AI continuity checking and retrieval. A Reference field resolves to the target entity's name (so canon reads "Homeland: Gondor", not a raw id); the summary/description shown inline is not repeated among the facts; fields with no schema definition follow, keyed by their raw key. This is the shared per-entity format the consistency check (gatherCanonFacts) and Ask-Your-World retrieval (formatRetrievedCanon) both build on, so the two feed the model the same world facts. Does not itself apply the AI opt-out (aiExcluded) – the caller decides which entities to include.