Skip to content

Update project-level ProseGuard rules

PUT
/api/writing/proseguard/rules/{project_id}

Create or update ProseGuard rules for a project.

project_id
required
Project Id
string
RuleSetUpdateRequest

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
Any of:
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
Any of:
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
Any of:
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
Any of:
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
Any of:
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:

Successful Response

SaveResponse

Response for save operations.

object
success
required
Success
boolean
message
required
Message
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