# opsharp/unslop architecture

> Architecture diagram of the GitHub repository opsharp/unslop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/opsharp/unslop
- Repository: https://github.com/opsharp/unslop

## Overview

Unslop is an AI-writing humanizer delivered as an agent skill plus standalone Python tools. The user-facing flow is to scan a draft for phrase, sentence-structure, and document-silhouette issues; an agent reviews candidates in context, then applies targeted edits subject to preservation checks. The repository also includes voice teaching/scoring and a substantial benchmark harness. The listed tree omits the skill command files, so their internal routing is not represented; links below rely on README statements or shown source/index references.

Main entry points: [`evals/core_runner.py`](https://github.com/opsharp/unslop/blob/main/evals/core_runner.py) (Core benchmark runner), [`scripts/structure_scan.py`](https://github.com/opsharp/unslop/blob/main/scripts/structure_scan.py) (Structure scanner), [`scripts/banned_phrase_scan.py`](https://github.com/opsharp/unslop/blob/main/scripts/banned_phrase_scan.py) (Phrase scanner), [`scripts/validate_preservation.py`](https://github.com/opsharp/unslop/blob/main/scripts/validate_preservation.py) (Preservation validator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Writing detection"]
  node_phrase["Phrase scanner"]
  node_structure["Structure scanner<br/>[structure_scan.py]"]
  node_silhouette["Silhouette scanner<br/>[silhouette_scan.py]"]
  node_language["Language helpers<br/>[_lang.py]"]
  node_readability["Readability metrics"]
end

subgraph group_editing["Editing safeguards"]
  node_suggest["Suggestion runner<br/>[suggest.py]"]
  node_constraints["Constraint extraction"]
  node_preservation["Preservation validator"]
  node_diff["Edit diff check<br/>[diff_check.py]"]
end

subgraph group_voice["Voice tools"]
  node_calibration["Pair calibration<br/>[calibrate_pairs.py]"]
  node_voiceprofile["Voice profile<br/>[voice_profile.py]"]
  node_voicescore["Voice scoring<br/>[voice_score.py]"]
  node_voicecard["Voice card<br/>[voice_card.py]"]
end

subgraph group_evaluation["Product evaluation"]
  node_benchmark["Core benchmark runner<br/>[core_runner.py]"]
  node_generation["Model adapter<br/>[model_generate.py]"]
  node_metrics["Benchmark metrics<br/>[core_metrics.py]"]
  node_parity["Model parity harness"]
  node_climb["Structure climb harness"]
end

node_writer(("Writer / agent"))

node_writer -->|"scans text"| node_phrase
node_writer -->|"scans text"| node_structure
node_writer -->|"scans text"| node_silhouette
node_phrase -->|"returns candidates"| node_writer
node_structure -->|"returns candidates"| node_writer
node_silhouette -->|"returns candidates"| node_writer
node_writer -->|"requests suggestions"| node_suggest
node_suggest -->|"calls scanner"| node_phrase
node_suggest -->|"calls scanner"| node_structure
node_suggest -->|"checks edits"| node_preservation
node_writer -->|"extracts constraints"| node_constraints
node_constraints -->|"provides constraints"| node_preservation
node_writer -->|"teaches voice"| node_calibration
node_voicecard -->|"reads profile"| node_voiceprofile
node_voicescore -->|"reads profile"| node_voiceprofile
node_benchmark -->|"requests generation"| node_generation
node_benchmark -->|"calls scanner"| node_phrase
node_benchmark -->|"calls scanner"| node_structure
node_benchmark -->|"calls scanner"| node_silhouette
node_benchmark -->|"calls metrics"| node_readability
node_benchmark -->|"extracts constraints"| node_constraints
node_benchmark -->|"validates rewrite"| node_preservation
node_benchmark -->|"checks changes"| node_diff
node_metrics -->|"scores results"| node_benchmark
node_parity -->|"compares detection"| node_phrase
node_parity -->|"compares detection"| node_structure
node_parity -->|"checks outcomes"| node_preservation
node_climb -->|"scans drafts"| node_structure
node_climb -->|"scans drafts"| node_silhouette
node_climb -->|"checks rewrites"| node_preservation

click node_phrase "https://github.com/opsharp/unslop/blob/main/scripts/banned_phrase_scan.py"
click node_structure "https://github.com/opsharp/unslop/blob/main/scripts/structure_scan.py"
click node_silhouette "https://github.com/opsharp/unslop/blob/main/scripts/silhouette_scan.py"
click node_language "https://github.com/opsharp/unslop/blob/main/scripts/_lang.py"
click node_readability "https://github.com/opsharp/unslop/blob/main/scripts/readability_metrics.py"
click node_suggest "https://github.com/opsharp/unslop/blob/main/scripts/suggest.py"
click node_constraints "https://github.com/opsharp/unslop/blob/main/scripts/extract_constraints.py"
click node_preservation "https://github.com/opsharp/unslop/blob/main/scripts/validate_preservation.py"
click node_diff "https://github.com/opsharp/unslop/blob/main/scripts/diff_check.py"
click node_calibration "https://github.com/opsharp/unslop/blob/main/scripts/calibrate_pairs.py"
click node_voiceprofile "https://github.com/opsharp/unslop/blob/main/scripts/voice_profile.py"
click node_voicescore "https://github.com/opsharp/unslop/blob/main/scripts/voice_score.py"
click node_voicecard "https://github.com/opsharp/unslop/blob/main/scripts/voice_card.py"
click node_benchmark "https://github.com/opsharp/unslop/blob/main/evals/core_runner.py"
click node_generation "https://github.com/opsharp/unslop/blob/main/evals/model_generate.py"
click node_metrics "https://github.com/opsharp/unslop/blob/main/evals/core_metrics.py"
click node_parity "https://github.com/opsharp/unslop/blob/main/evals/run_model_parity.py"
click node_climb "https://github.com/opsharp/unslop/blob/main/evals/run_structure_climb.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_phrase,node_structure,node_silhouette,node_language,node_readability toneBlue
class node_suggest,node_constraints,node_preservation,node_diff toneAmber
class node_calibration,node_voiceprofile,node_voicescore,node_voicecard toneMint
class node_benchmark,node_generation,node_metrics,node_parity,node_climb toneRose
class node_writer toneIndigo
```

## Components

### Writing detection

- [Phrase scanner](https://github.com/opsharp/unslop/blob/main/scripts/banned_phrase_scan.py): `scripts/banned_phrase_scan.py`
- [Structure scanner](https://github.com/opsharp/unslop/blob/main/scripts/structure_scan.py): `scripts/structure_scan.py`
- [Silhouette scanner](https://github.com/opsharp/unslop/blob/main/scripts/silhouette_scan.py): `scripts/silhouette_scan.py`
- [Language helpers](https://github.com/opsharp/unslop/blob/main/scripts/_lang.py): `scripts/_lang.py`
- [Readability metrics](https://github.com/opsharp/unslop/blob/main/scripts/readability_metrics.py): `scripts/readability_metrics.py`

### Editing safeguards

- [Suggestion runner](https://github.com/opsharp/unslop/blob/main/scripts/suggest.py): `scripts/suggest.py`
- [Constraint extraction](https://github.com/opsharp/unslop/blob/main/scripts/extract_constraints.py): `scripts/extract_constraints.py`
- [Preservation validator](https://github.com/opsharp/unslop/blob/main/scripts/validate_preservation.py): `scripts/validate_preservation.py`
- [Edit diff check](https://github.com/opsharp/unslop/blob/main/scripts/diff_check.py): `scripts/diff_check.py`

### Voice tools

- [Pair calibration](https://github.com/opsharp/unslop/blob/main/scripts/calibrate_pairs.py): `scripts/calibrate_pairs.py`
- [Voice profile](https://github.com/opsharp/unslop/blob/main/scripts/voice_profile.py): `scripts/voice_profile.py`
- [Voice scoring](https://github.com/opsharp/unslop/blob/main/scripts/voice_score.py): `scripts/voice_score.py`
- [Voice card](https://github.com/opsharp/unslop/blob/main/scripts/voice_card.py): `scripts/voice_card.py`

### Product evaluation

- [Core benchmark runner](https://github.com/opsharp/unslop/blob/main/evals/core_runner.py): `evals/core_runner.py`
- [Model adapter](https://github.com/opsharp/unslop/blob/main/evals/model_generate.py): `evals/model_generate.py`
- [Benchmark metrics](https://github.com/opsharp/unslop/blob/main/evals/core_metrics.py): `evals/core_metrics.py`
- [Model parity harness](https://github.com/opsharp/unslop/blob/main/evals/run_model_parity.py): `evals/run_model_parity.py`
- [Structure climb harness](https://github.com/opsharp/unslop/blob/main/evals/run_structure_climb.py): `evals/run_structure_climb.py`

### Other components

- **Writer / agent**

## Connections

- Writer / agent → Phrase scanner: scans text (evidence: `README.md`)
- Writer / agent → Structure scanner: scans text (evidence: `README.md`)
- Writer / agent → Silhouette scanner: scans text (evidence: `README.md`)
- Phrase scanner → Writer / agent: returns candidates (evidence: `README.md`)
- Structure scanner → Writer / agent: returns candidates (evidence: `README.md`)
- Silhouette scanner → Writer / agent: returns candidates (evidence: `README.md`)
- Writer / agent → Suggestion runner: requests suggestions (evidence: `scripts/suggest.py`)
- Suggestion runner → Phrase scanner: calls scanner (evidence: `scripts/suggest.py`)
- Suggestion runner → Structure scanner: calls scanner (evidence: `scripts/suggest.py`)
- Suggestion runner → Preservation validator: checks edits (evidence: `scripts/suggest.py`)
- Writer / agent → Constraint extraction: extracts constraints (evidence: `README.md`)
- Constraint extraction → Preservation validator: provides constraints (evidence: `scripts/validate_preservation.py`)
- Writer / agent → Pair calibration: teaches voice (evidence: `README.md`)
- Voice card → Voice profile: reads profile (evidence: `scripts/voice_card.py`)
- Voice scoring → Voice profile: reads profile (evidence: `scripts/voice_score.py`)
- Core benchmark runner → Model adapter: requests generation (evidence: `evals/core_runner.py`)
- Core benchmark runner → Phrase scanner: calls scanner (evidence: `evals/core_runner.py`)
- Core benchmark runner → Structure scanner: calls scanner (evidence: `evals/core_runner.py`)
- Core benchmark runner → Silhouette scanner: calls scanner (evidence: `evals/core_runner.py`)
- Core benchmark runner → Readability metrics: calls metrics (evidence: `evals/core_runner.py`)
- Core benchmark runner → Constraint extraction: extracts constraints (evidence: `evals/core_runner.py`)
- Core benchmark runner → Preservation validator: validates rewrite (evidence: `evals/core_runner.py`)
- Core benchmark runner → Edit diff check: checks changes (evidence: `evals/core_runner.py`)
- Benchmark metrics → Core benchmark runner: scores results (evidence: `evals/core_metrics.py`)
- Model parity harness → Phrase scanner: compares detection (evidence: `evals/run_model_parity.py`)
- Model parity harness → Structure scanner: compares detection (evidence: `evals/run_model_parity.py`)
- Model parity harness → Preservation validator: checks outcomes (evidence: `evals/run_model_parity.py`)
- Structure climb harness → Structure scanner: scans drafts (evidence: `evals/run_structure_climb.py`)
- Structure climb harness → Silhouette scanner: scans drafts (evidence: `evals/run_structure_climb.py`)
- Structure climb harness → Preservation validator: checks rewrites (evidence: `evals/run_structure_climb.py`)
