Skip to content

Generate project-wide consistency report

GET
/api/writing/proseguard/report/{project_id}

Batch-lint all documents and return comprehensive editorial consistency analysis.

project_id
required
Project Id
string

Successful Response

ProjectConsistencyReport

Full project-wide ProseGuard consistency report.

Batch-lints every document in the project and aggregates results into a comprehensive editorial health snapshot.

Attributes: project_id: The project UUID generated_at: ISO timestamp when the report was generated total_documents: Total documents in the project total_documents_linted: Documents that had content and were linted total_word_count: Aggregate word count across all documents total_violations: Total violations across all documents total_errors: Total error-severity violations total_warnings: Total warning-severity violations total_infos: Total info-severity violations by_category: Violation counts keyed by rule category by_severity: Violation counts keyed by severity level documents: Per-document lint results project_rules: The project-level ruleset config: ProseGuard configuration active_families: Rule families enabled at project level disabled_families: Rule families disabled at project level overrides: All scope-level rule overrides with divergence analysis override_count: Total number of scope overrides suppressions: Per-document suppression audit total_suppressed_rules: Total unique rule suppressions across all documents total_suppressed_instances: Total instance suppressions across all documents top_violation_rules: Rules ranked by violation count descending

object
projectId
required
Projectid

Project UUID

string
generatedAt
required
Generatedat

ISO timestamp of report generation

string
totalDocuments
required
Totaldocuments

Total documents in project

integer
totalDocumentsLinted
required
Totaldocumentslinted

Documents with content that were linted

integer
totalWordCount
required
Totalwordcount

Aggregate word count across all documents

integer
totalViolations
required
Totalviolations

Total violations across all documents

integer
totalErrors
required
Totalerrors

Total error-severity violations

integer
totalWarnings
required
Totalwarnings

Total warning-severity violations

integer
totalInfos
required
Totalinfos

Total info-severity violations

integer
byCategory
required
Bycategory

Violation counts by category - {structural: 5, aiisms: 3}

object
key
additional properties
integer
bySeverity
required
Byseverity

Violation counts by severity - {error: 2, warning: 6}

object
key
additional properties
integer
documents
required
Documents

Per-document lint results sorted by violation count descending

Array<object>
DocumentLintEntry

Lint results for a single document in a project-wide consistency report.

Aggregates violations, active rules, and scope resolution for one document.

Attributes: document_id: The document UUID document_title: Human-readable document title word_count: Total word count of the document content violations: All violations found in this document error_count: Number of error-severity violations warning_count: Number of warning-severity violations info_count: Number of info-severity violations summary: Aggregated violation statistics active_rules: Rules that were checked during this lint pass resolved_scopes: Scope chain used for rule resolution has_scope_override: Whether this document has document-level rule overrides has_content: Whether this document had a .docx file on disk

object
documentId
required
Documentid

Document UUID

string
documentTitle
required
Documenttitle

Human-readable document title

string
wordCount
required
Wordcount

Total word count of document content

integer
violations
required
Violations

All violations found in this document

Array<object>
ProseGuardViolation

A single ProseGuard violation with full explainability.

Every violation includes enough context for the user to understand why it was flagged and how to fix it.

Attributes: rule_id: Identifier for the rule that was violated rule_category: Category of the violated rule severity: How severe this violation is location: Precise location in the content message: Human-readable description of the violation suggestion: Optional fix suggestion matched_text: The actual text that triggered the violation rule_threshold: What the rule expected (e.g., “max: 1”) resolved_from_scope: Which scope this rule came from match_mode: How the match was performed (for debugging)

object
ruleId
required
Ruleid

Rule identifier - e.g. ‘max_em_dashes_per_paragraph’

string
ruleCategory
required
Rulecategory

Category of the violated rule

string
Allowed values: structural stylistic semantic continuity aiisms temporal
severity
required
Severity

Violation severity level

string
Allowed values: error warning info
location
required
ViolationLocation

Precise location of violation

object
paragraph
required
Paragraph

0-based paragraph index

integer
sentence
Any of:
integer
characterStart
required
Characterstart

Character offset from content start (AUTHORITATIVE)

integer
characterEnd
required
Characterend

End character offset (AUTHORITATIVE)

integer
paragraphStartChar
required
Paragraphstartchar

Start offset of containing paragraph

integer
paragraphEndChar
required
Paragraphendchar

End offset of containing paragraph

integer
message
required
Message

Human-readable violation description

string
suggestion
Any of:
string
matchedText
required
Matchedtext

The actual text that triggered the violation

string
ruleThreshold
required
Rulethreshold

What the rule expected - e.g. ‘max: 1’

string
resolvedFromScope
required
Resolvedfromscope

Which scope this rule came from - e.g. ‘scene’

string
matchMode
required
Matchmode

How match was performed - ‘substring_casefold’ or ‘word_boundary_casefold’

string
timelineEventId
Any of:
string
timelineId
Any of:
string
sourceHandler
Sourcehandler

DE handler model-id that produced this violation

string
default: divinity/proseguard-scan
errorCount
required
Errorcount

Error-severity violation count

integer
warningCount
required
Warningcount

Warning-severity violation count

integer
infoCount
required
Infocount

Info-severity violation count

integer
summary
required
ProseGuardSummary

Aggregated violation statistics

object
totalViolations
required
Totalviolations

Total violation count

integer
byCategory
required
Bycategory

Violations by category - {structural: 2, stylistic: 1}

object
key
additional properties
integer
bySeverity
required
Byseverity

Violations by severity - {error: 1, warning: 2}

object
key
additional properties
integer
activeRules
required
ActiveRulesSummary

Rules checked during this lint pass

object
totalRulesChecked
required
Totalruleschecked

Total rules checked

integer
rules
required
Rules

Individual active rules

Array<object>
ActiveRuleDetail

One active rule that was checked during linting.

Attributes: rule_name: Machine name e.g. “max_sentence_length” description: Human description e.g. “Sentence length limit: 35 words” category: Rule category

object
ruleName
required
Rulename

Machine rule name

string
description
required
Description

Human-readable rule description

string
category
required
Category

Rule category

string
Allowed values: structural stylistic semantic continuity aiisms temporal
resolvedScopes
required
Resolvedscopes

Scope chain used for rule resolution

Array<string>
hasScopeOverride
required
Hasscopeoverride

Whether this document has document-level rule overrides

boolean
hasContent
required
Hascontent

Whether this document had a .docx file on disk

boolean
projectRules
required
ProseGuardRuleSet

Project-level ruleset

object
projectId
required
Projectid

Project UUID this ruleset belongs to

string
scope
required
Scope

Scope level for this ruleset

string
Allowed values: project document scene character
scopeId
Any of:
string
structural
StructuralRules

Structural constraints for prose - sentence/paragraph length, punctuation limits.

These rules enforce mechanical constraints that affect readability and pacing. Merging strategy: Most restrictive wins (smaller max values).

Attributes: enabled: Whether structural checks are active (can be re-enabled by child scopes) max_sentence_length: Maximum words per sentence (None = inherit) max_paragraph_length: Maximum words per paragraph (None = inherit) max_em_dashes_per_paragraph: Limit overuse of em-dashes (None = inherit) max_ellipses_per_paragraph: Limit ellipsis usage (None = inherit)

object
enabled
Any of:
boolean
maxSentenceLength
Any of:
integer
>= 5 <= 100
maxParagraphLength
Any of:
integer
>= 20 <= 500
maxEmDashesPerParagraph
Any of:
integer
<= 10
maxEllipsesPerParagraph
Any of:
integer
<= 10
stylistic
StylisticRules

Stylistic constraints - banned phrases/words, repetition limits.

These rules enforce author voice consistency and eliminate crutch words. Merging strategy: Union (combine lists from all applicable scopes).

Attributes: enabled: Whether stylistic checks are active banned_phrases: Phrases to flag (substring match, casefold) banned_words: Words to flag (word-boundary match, casefold) max_word_repetition_per_paragraph: Max same word occurrences (None = inherit)

object
enabled
Any of:
boolean
bannedPhrases
Bannedphrases

Phrases to flag - substring match (merged with parent scopes)

Array<string>
default:
bannedWords
Bannedwords

Words to flag - word-boundary match (merged with parent scopes)

Array<string>
default:
maxWordRepetitionPerParagraph
Any of:
integer
>= 1 <= 20
semantic
SemanticRules

Semantic constraints - POV enforcement, pronoun requirements.

These rules enforce narrative consistency within scenes and characters. Merging strategy: POV overrides by most specific; pronouns merge by key.

Attributes: enabled: Whether semantic checks are active pov_mode: Required point-of-view mode (None = inherit) forbid_pov: POV modes explicitly forbidden in this scope character_pronouns: Character display name -> pronouns mapping (word-boundary match). Keys must be character display names (e.g. “Kaya”, “Draven”), NOT UUIDs. The checker matches these names in prose text using word boundaries.

Note: character_pronouns should NOT be defined at scene scope - they are silently dropped at merge time and trigger import validation errors.

object
enabled
Any of:
boolean
povMode
Any of:
string
Allowed values: first second third_limited third_omniscient
forbidPov
Forbidpov

POV modes explicitly forbidden

Array<string>
default:
characterPronouns
Characterpronouns

Character pronouns keyed by display name or character ID. IDs are resolved to display names at lint time via pronoun_name_map. e.g. {“Kaya”: [“she”, “her”]} or {“uuid”: [“she”, “her”]}

object
key
additional properties
Array<string>
dialoguePovExempt
Any of:
boolean
narrationYouSeverity
Any of:
string
Allowed values: error warning ignore
continuity
ContinuityRules

Continuity constraints - term restrictions, name form requirements.

These rules enforce text-level consistency (NOT factual lore - that’s LoreKeeper). Merging strategy: Lists merge with allowed_terms override; name_forms merge by key.

Attributes: enabled: Whether continuity checks are active forbidden_terms: Terms not allowed in this scope (substring match) allowed_terms: Explicit overrides to parent forbidden_terms required_name_forms: Key (forbidden form) -> Value (required form)

Note: If a term appears in both forbidden_terms and allowed_terms at same scope, allowed_terms wins.

object
enabled
Any of:
boolean
forbiddenTerms
Forbiddenterms

Terms not allowed in this scope - substring match

Array<string>
default:
allowedTerms
Allowedterms

Explicit overrides to parent forbidden_terms

Array<string>
default:
requiredNameForms
Requirednameforms

Key = forbidden form, Value = required form - e.g. {“Alexander”: “Alex”}

object
key
additional properties
string
aiisms
AiIsmsRules

AI-isms constraints - flag AI-typical words, phrases, dialogue tags, names, and filter words.

These rules detect common markers of AI-generated prose that break immersion. Merging strategy: Union (combine lists from all applicable scopes).

Attributes: enabled: Whether AI-isms checks are active flagged_words: Words that are AI markers (word-boundary match, casefold) flagged_phrases: Phrases that are AI markers (substring match, casefold) flagged_dialogue_tags: Exotic dialogue tags to flag (word-boundary match, casefold) flagged_names: AI-typical character names (word-boundary match, casefold) filter_words: Filter word patterns like “he felt” (word-boundary match, casefold)

object
enabled
Any of:
boolean
flaggedWords
Flaggedwords

AI-marker words to flag - word-boundary match (merged with parent scopes)

Array<string>
default:
flaggedPhrases
Flaggedphrases

AI-marker phrases to flag - substring match (merged with parent scopes)

Array<string>
default:
flaggedDialogueTags
Flaggeddialoguetags

Exotic dialogue tags to flag - word-boundary match (merged with parent scopes)

Array<string>
default:
flaggedNames
Flaggednames

AI-typical character names to flag - word-boundary match (merged with parent scopes)

Array<string>
default:
filterWords
Filterwords

Filter word patterns like ‘he felt’ - word-boundary match (merged with parent scopes)

Array<string>
default:
temporal
TemporalRules

ProseGuard temporal rule configuration.

object
enabled
Enabled

Enable temporal checking

boolean
default: true
checkDateFormatConsistency
Checkdateformatconsistency

Check for mixed date formats

boolean
default: true
checkAnachronisms
Checkanachronisms

Check for anachronistic terms

boolean
default: true
checkLocationConflicts
Checklocationconflicts

Check character-location conflicts

boolean
default: true
anachronismSeverity
Anachronismseverity

Anachronism violation severity

string
default: warning
Allowed values: error warning info
locationConflictSeverity
Locationconflictseverity

Location conflict severity

string
default: warning
Allowed values: error warning info
dateFormatSeverity
Dateformatseverity

Date format inconsistency severity

string
default: info
Allowed values: error warning info
createdAt
Createdat
string
updatedAt
Updatedat
string
config
required
ProseGuardConfig

ProseGuard configuration

object
enabled
Enabled

Master toggle for ProseGuard

boolean
default: true
autoReviseEnabled
Autoreviseenabled

Automatically revise content on violations

boolean
maxRevisionAttempts
Maxrevisionattempts

Maximum revision attempts (hard cap)

integer
default: 2 >= 1 <= 5
autoReviseSeverity
Autoreviseseverity

Only auto-revise at this severity level or higher

string
default: error
Allowed values: error warning
activeFamilies
required
Activefamilies

Rule families enabled at project level

Array<string>
disabledFamilies
required
Disabledfamilies

Rule families disabled at project level

Array<string>
overrides
required
Overrides

All scope-level overrides with divergence analysis

Array<object>
OverrideAuditEntry

A scoped rule override with divergence analysis vs. project defaults.

Attributes: scope: Override scope level (document, scene, or character) scope_id: UUID of the scope target label: Resolved human-readable label for this scope target entry_type: Type of the lore entry (for scene/character scopes) families_overridden: Rule families that this override touches rules_relaxed: Rules that are LESS strict than project defaults rules_tightened: Rules that are MORE strict than project defaults

object
scope
required
Scope

Override scope level

string
Allowed values: document scene character
scopeId
required
Any of:
string
label
required
Label

Resolved human-readable label

string
entryType
required
Any of:
string
familiesOverridden
required
Familiesoverridden

Rule families this override touches

Array<string>
rulesRelaxed
required
Rulesrelaxed

Rules less strict than project defaults

Array<string>
rulesTightened
required
Rulestightened

Rules more strict than project defaults

Array<string>
overrideCount
required
Overridecount

Total scope overrides

integer
suppressions
required
Suppressions

Per-document suppression audit

Array<object>
SuppressionAuditEntry

Suppression data for a single document in the consistency report.

Attributes: document_id: The document UUID document_title: Human-readable document title suppressed_rules: Rule IDs that are suppressed for this document suppressed_instances: Violation signatures that are suppressed total_suppressions: Total count of all suppressions

object
documentId
required
Documentid

Document UUID

string
documentTitle
required
Documenttitle

Human-readable document title

string
suppressedRules
required
Suppressedrules

Rule IDs suppressed for this document

Array<string>
suppressedInstances
required
Suppressedinstances

Violation signatures suppressed for this document

Array<string>
totalSuppressions
required
Totalsuppressions

Total suppression count

integer
totalSuppressedRules
required
Totalsuppressedrules

Total unique rule suppressions across all documents

integer
totalSuppressedInstances
required
Totalsuppressedinstances

Total instance suppressions across all documents

integer
topViolationRules
required
Topviolationrules

Rules ranked by violation count descending

Array<object>
ViolationRuleBreakdown

Aggregate statistics for a single rule across all documents.

Attributes: rule_id: Machine identifier for the rule category: Rule category (structural, stylistic, etc.) hit_count: Total times this rule was violated across all documents severity: Severity level of violations from this rule affected_document_ids: Document UUIDs where this rule was violated

object
ruleId
required
Ruleid

Machine rule identifier

string
category
required
Category

Rule category

string
Allowed values: structural stylistic semantic continuity aiisms temporal
hitCount
required
Hitcount

Total violations from this rule

integer
severity
required
Severity

Severity level

string
Allowed values: error warning info
affectedDocumentIds
required
Affecteddocumentids

Documents where this rule was violated

Array<string>

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object