Update project-level ProseGuard rules
PUT /api/writing/proseguard/rules/{project_id}
Create or update ProseGuard rules for a project.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Request to update a ProseGuard ruleset.
Attributes: structural: Updated structural rules (or None to keep existing) stylistic: Updated stylistic rules (or None to keep existing) semantic: Updated semantic rules (or None to keep existing) continuity: Updated continuity rules (or None to keep existing)
object
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)
Responses
Section titled “ Responses ”Successful Response
Response for save operations.
object
Validation Error