Fiction Linter
Fiction Linter is a VS Code extension designed to act as a Semantic Physics Engine (SPE) for your fiction writing. It helps you avoid "First Probability" prose—generic, clichéd, or AI-sounding text—by rigorously checking your manuscript against a set of constraints.
Features
- Pattern Linter: Detects and flags:
- Cliches: Overused phrases (e.g., "shiver down spine", "released a breath").
- AI Tells: Structural patterns common in AI writing (e.g., "It is worth noting", "couldn't help but").
- Weak Phrasing: Vague descriptors or lack of sensory precision.
- Name & Place Validator:
- Checks character names against a blocklist of overused AI names.
- Flags generic or clichéd place names (e.g., "Willow Creek", "Ironpeak").
Visual Guide
The extension uses standard VS Code diagnostic colors to indicate the severity of the issue:
Red Squiggles (Error): Strict Bans & AI Patterns.
- Examples: "shiver down his spine", "It is worth noting that", "walls I've built".
- Action: These must be removed or rewritten.
Yellow Squiggles (Warning): Cliches, Tells, & Names.
- Examples: "released a breath", "felt sad", "Kael", "Willow Creek".
- Action: Avoid these unless strictly necessary or contextually justified.
Blue Squiggles (Info): Weak Phrasing & Style.
- Examples: "very", "just", "practiced ease".
- Action: Consider strengthening the prose with more specific descriptors.
Configuration
Zero Config: By default, the extension comes with a bundled set of standard Semantic Physics Engine rules (Cliches, Names, etc.). You don't need to do anything to start linting!
Advanced (Custom Rules):
If you have your own customized SPE definitions (YAML files), you can point the extension to them:
- Open VS Code Settings (
Cmd+,).
- Search for
Fiction Linter.
- Set the
Spe Path to the absolute path of your directory containing the .yaml files.
- Example:
/Users/yourname/projects/my-spe-config
The extension looks for:
cliche_collider.yaml
name_collider.yaml
place_collider.yaml
line_editing_protocol.yaml
AI Features
This extension includes AI-powered tools to help you fix prose issues:
- Fix with AI: Click "Quick Fix" on any squiggly line to have AI rewrite the sentence.
- Deep Scan (AI Scan):
- Button: Click the
$(search) AI Scan button in the status bar (bottom left).
- Scope:
- Chapter Mode: If your cursor is inside a chapter (marked by
## Chapter X), it scans only that chapter.
- Full Mode: If no characters are detected, it scans the entire document.
- Progressive: Scans in background chunks (default 5 paragraphs) so you can keep working.
- Cancel: Click the button again (
$(sync~spin) Stop Scan) to cancel immediately.
Configuration:
The extension attempts to use available VS Code Copilot models first. If none are found, you can configure a direct connection to OpenAI:
fiction-linter.openAiKey: Your OpenAI API Key.
fiction-linter.modelName: (Optional) Model to use (default: gpt-4).
fiction-linter.apiBaseUrl: (Optional) Custom endpoint (default: OpenAI).
fiction-linter.autoAiScanChunkSize: Number of paragraphs to scan at once (default: 5). Increase for faster scans if your API limits allow.
Requirements
- VS Code 1.100.0 or higher.
- A local copy of the Semantic Physics Engine data files.
Release Notes
0.1.5
- AI Scan Button: Added status bar button to trigger progressive AI scanning.
- Chapter Detection: Scans are now scoped to the current chapter.
- Bug Fixes: Improved Markdown activation and stability.
0.0.1
- Initial release.
- Support for Cliche Collider, Name Collider, and Place Collider.
Enjoy writing high-entropy fiction!