Analyze content for rule suggestions
POST /api/writing/proseguard/analyze
Analyze content to detect POV mode, character names, repetition candidates, and name form variants. Returns suggestions the user can accept or dismiss to populate ProseGuard rules.
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Result of analyzing content for rule suggestions.
Generated by POST /proseguard/analyze. Contains suggestions that the user can accept or dismiss to populate ProseGuard rules.
object
Suggested POV mode based on pronoun analysis of narration text.
object
Detected dominant POV mode
Confidence 0.0-1.0 (dominant count / total)
Pronoun counts by type — {“first”: 42, “second”: 3, “third”: 120}
object
Detected character names, ideally grounded in Legendry
A detected character name, ideally grounded in the Legendry.
When source == "legendry", the character was matched against an
existing lore_entry (by title or alias) and legendry_title holds
the canonical title. Pronouns are mined from the Legendry entry’s
voice_profile, section content, or inferred as a last resort.
When source == "text_analysis", the name was detected in prose but
has no matching Legendry entry — the user should consider adding one.
object
Name as it appears in the prose
How the name was resolved against the Legendry
Suggested pronoun set (e.g., [‘he’, ‘him’])
Where the pronouns came from in the Legendry
Times this name appears in text
Whether suggestion is grounded in Legendry or pure text detection
Non-character Legendry entities referenced in prose
A non-character Legendry entity (faction, location, species, event, etc.) detected in the prose.
These feed continuity.required_name_forms: the canonical title
becomes the required form, and any variant spellings found in prose
that don’t match either the title or a registered alias become
variant entries.
object
The form that appeared in prose
Legendry entry ID
Canonical Legendry title
Legendry entry_type (faction, location, species, event, etc.)
Aliases already registered on the Legendry entry
Times the entity appears in prose
How the entity was resolved against the Legendry
Legendry entries that look like the same entity
Two Legendry entries that look like the same entity.
Not a name-form suggestion — ProseGuard cannot reconcile the rules on its own. The user needs to merge or delete one of the entries.
object
First entry ID
First entry title
Second entry ID
Second entry title
Entry type (both entries share this)
Why they look alike (e.g. ‘titles differ by 1 character’)
Words that may be crutch words based on frequency
A frequently repeated word that could be a crutch word candidate.
object
The repeated word
Total occurrences in document
Number of distinct paragraphs the word appears in
Name variant pairs that may need canonical form enforcement
A pair of name variants where one may be the canonical form.
object
Less frequent variant (e.g., ‘Alexander’)
More frequent form (e.g., ‘Alex’)
Occurrences of the variant
Occurrences of the canonical form
Word count of analyzed content
Validation Error