Generate project-wide consistency report
GET /api/writing/proseguard/report/{project_id}
Batch-lint all documents and return comprehensive editorial consistency analysis.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
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
Project UUID
ISO timestamp of report generation
Total documents in project
Documents with content that were linted
Aggregate word count across all documents
Total violations across all documents
Total error-severity violations
Total warning-severity violations
Total info-severity violations
Violation counts by category - {structural: 5, aiisms: 3}
object
Violation counts by severity - {error: 2, warning: 6}
object
Per-document lint results sorted by violation count descending
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
Document UUID
Human-readable document title
Total word count of document content
All violations found in this document
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
Rule identifier - e.g. ‘max_em_dashes_per_paragraph’
Category of the violated rule
Violation severity level
Precise location of violation
object
0-based paragraph index
Character offset from content start (AUTHORITATIVE)
End character offset (AUTHORITATIVE)
Start offset of containing paragraph
End offset of containing paragraph
Human-readable violation description
The actual text that triggered the violation
What the rule expected - e.g. ‘max: 1’
Which scope this rule came from - e.g. ‘scene’
How match was performed - ‘substring_casefold’ or ‘word_boundary_casefold’
DE handler model-id that produced this violation
Error-severity violation count
Warning-severity violation count
Info-severity violation count
Aggregated violation statistics
object
Total violation count
Violations by category - {structural: 2, stylistic: 1}
object
Violations by severity - {error: 1, warning: 2}
object
Rules checked during this lint pass
object
Total rules checked
Individual active rules
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
Machine rule name
Human-readable rule description
Rule category
Scope chain used for rule resolution
Whether this document has document-level rule overrides
Whether this document had a .docx file on disk
Project-level ruleset
object
Project UUID this ruleset belongs to
Scope level for this ruleset
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)
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
Phrases to flag - substring match (merged with parent scopes)
Words to flag - word-boundary match (merged with parent scopes)
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
POV modes explicitly forbidden
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
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
Terms not allowed in this scope - substring match
Explicit overrides to parent forbidden_terms
Key = forbidden form, Value = required form - e.g. {“Alexander”: “Alex”}
object
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
AI-marker words to flag - word-boundary match (merged with parent scopes)
AI-marker phrases to flag - substring match (merged with parent scopes)
Exotic dialogue tags to flag - word-boundary match (merged with parent scopes)
AI-typical character names to flag - word-boundary match (merged with parent scopes)
Filter word patterns like ‘he felt’ - word-boundary match (merged with parent scopes)
ProseGuard temporal rule configuration.
object
Enable temporal checking
Check for mixed date formats
Check for anachronistic terms
Check character-location conflicts
Anachronism violation severity
Location conflict severity
Date format inconsistency severity
ProseGuard configuration
object
Master toggle for ProseGuard
Automatically revise content on violations
Maximum revision attempts (hard cap)
Only auto-revise at this severity level or higher
Rule families enabled at project level
Rule families disabled at project level
All scope-level overrides with divergence analysis
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
Override scope level
Resolved human-readable label
Rule families this override touches
Rules less strict than project defaults
Rules more strict than project defaults
Total scope overrides
Per-document suppression audit
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
Document UUID
Human-readable document title
Rule IDs suppressed for this document
Violation signatures suppressed for this document
Total suppression count
Total unique rule suppressions across all documents
Total instance suppressions across all documents
Rules ranked by violation count descending
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
Machine rule identifier
Rule category
Total violations from this rule
Severity level
Documents where this rule was violated
Validation Error