Lint content with ProseGuard
POST /api/writing/proseguard/lint
Run ProseGuard on content using resolved rules from all applicable scopes. This is the AUTHORITATIVE check.
Request Body required
Section titled “Request Body required ”Request to lint content using ProseGuard.
Attributes: content: The prose content to lint project_id: Project context for rule resolution document_id: Optional document context scene_id: Optional scene context character_ids: Optional character context (for dialogue/POV)
object
Prose content to lint
Project UUID for rule resolution
Responses
Section titled “ Responses ”Successful Response
Complete result of a ProseGuard lint pass.
Contains all violations, summary statistics, and metadata for revision comparison and audit trails.
Attributes: content_hash: SHA-256 hash of linted content (first 16 chars) ruleset_hash: Hash of resolved rules + spec version (for audit trail) violations: All violations found (SORTED deterministically) error_count: Count of error-severity violations warning_count: Count of warning-severity violations info_count: Count of info-severity violations error_rule_ids: Unique rule IDs with errors (SORTED for comparison) summary: Aggregated statistics lint_timestamp: ISO timestamp of this lint pass resolved_scopes: Scopes that contributed to rule resolution unconfigured_checks: Checks that are enabled but have no rules set up
Deterministic Ordering: - violations: Sorted by (paragraph, character_start, severity, rule_category, rule_id) - error_rule_ids: Sorted lexicographically (ASCII codepoint order)
object
SHA-256 hash of linted content (first 16 chars)
Hash of resolved rules + spec version (for audit trail)
All violations - SORTED by (paragraph, char_start, severity, category, rule_id)
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
Count of error-severity violations
Count of warning-severity violations
Count of info-severity violations
Unique rule IDs with errors - SORTED lexicographically for comparison
Aggregated statistics
object
Total violation count
Violations by category - {structural: 2, stylistic: 1}
object
Violations by severity - {error: 1, warning: 2}
object
Rules that were actively 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
ISO timestamp of this lint pass
Scopes that contributed - e.g. [‘scene:chapter1’, ‘project’]
Word count of the linted content
Checks that are enabled but dormant due to empty configuration
A ProseGuard check that is enabled but has no rules configured.
Surfaced in lint results so the UI can guide users toward setting up checks they’re missing. Each entry represents a specific sub-check within a rule category that is dormant due to empty configuration.
Attributes: category: The rule category this check belongs to check_name: Human-readable name of the specific check reason: Why this check is dormant setup_hint: Actionable guidance for the user
object
Rule category this check belongs to
Human-readable check name
Why this check is currently dormant
Actionable guidance for configuring this check
Validation Error