# mingliiii/dissecting_ai_reviews architecture

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

- Interactive diagram: https://gitdiagram.com/mingliiii/dissecting_ai_reviews
- Repository: https://github.com/mingliiii/dissecting_ai_reviews

## Overview

This repository is a toolkit for studying how controlled rhetorical rewrites affect AI peer reviews. Its main workflow takes an anonymized LaTeX source archive through rewriting, protected-content validation, and PDF compilation; review workflows then evaluate PDFs with a fixed standard or strict form. README documentation also describes joint, repeated, and review-guided variants. The graph includes those documented capabilities, while unsampled script-to-script calls are shown only where the README establishes the relationship.

Main entry points: [`workflows/review_guided.sh`](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/review_guided.sh) (Review-guided rewrite), [`src/rewrite_source.sh`](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/rewrite_source.sh) (Source rewriting), [`src/compile_zip.sh`](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/compile_zip.sh) (PDF compilation), [`workflows/single.sh`](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/single.sh) (Single rewrite)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiments["Experimental workflows"]
  node_single["Single rewrite<br/>[single.sh]"]
  node_joint["Joint rewrite<br/>[joint.sh]"]
  node_repeat["Repeated rewrite<br/>[repeat.sh]"]
  node_guided["Review-guided rewrite<br/>[review_guided.sh]"]
  node_reviewflow["Review workflow<br/>[review.sh]"]
end

subgraph group_rewrite["Rewrite system"]
  node_rewriteengine["Source rewriting<br/>[rewrite_source.sh]"]
  node_container["Container rewrite"]
end

subgraph group_preservation["Validation and compilation"]
  node_checker["Protected-content checker<br/>[check_protected.py]"]
  node_maintex["Main TeX detection<br/>[detect_main_tex.py]"]
  node_compiler["PDF compilation<br/>[compile_zip.sh]"]
end

subgraph group_review["PDF review"]
  node_reviewer["PDF review<br/>[review_pdf.py]"]
  node_reviewprompts["Review templates"]
end

subgraph group_prompts["Prompt library"]
  node_prompts["Rewrite instructions"]
end

node_user(("Researcher"))
node_source["LaTeX source ZIP"]
node_pdf["Compiled PDF"]
node_reviewapi{{"Review API"}}
node_reviewresult["Structured review"]

node_user -->|"runs"| node_single
node_user -->|"runs"| node_joint
node_user -->|"runs"| node_repeat
node_user -->|"runs"| node_guided
node_user -->|"runs"| node_reviewflow
node_source -->|"provides source"| node_single
node_source -->|"provides source"| node_joint
node_source -->|"provides source"| node_repeat
node_source -->|"provides source"| node_guided
node_single -->|"invokes rewrite"| node_rewriteengine
node_joint -->|"invokes rewrite"| node_rewriteengine
node_repeat -->|"repeats rewrite"| node_rewriteengine
node_guided -->|"invokes rewrite"| node_rewriteengine
node_rewriteengine -.->|"runs in container"| node_container
node_rewriteengine -->|"uses instructions"| node_prompts
node_single -->|"validates output"| node_checker
node_joint -->|"validates output"| node_checker
node_repeat -->|"validates each round"| node_checker
node_guided -->|"validates rewrite"| node_checker
node_single -->|"compiles source"| node_compiler
node_joint -->|"compiles source"| node_compiler
node_repeat -->|"compiles final source"| node_compiler
node_guided -->|"compiles source"| node_compiler
node_compiler -.->|"selects entrypoint"| node_maintex
node_compiler -->|"produces PDF"| node_pdf
node_reviewflow -->|"reviews PDF"| node_reviewer
node_guided -->|"reviews intermediate PDF"| node_reviewer
node_reviewer -->|"uses template"| node_reviewprompts
node_reviewer -->|"requests review"| node_reviewapi
node_reviewer -->|"writes review"| node_reviewresult
node_pdf -->|"provides PDF"| node_reviewflow
node_pdf -->|"provides intermediate PDF"| node_guided
node_reviewresult -->|"guides rewrite"| node_guided

click node_single "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/single.sh"
click node_joint "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/joint.sh"
click node_repeat "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/repeat.sh"
click node_guided "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/review_guided.sh"
click node_reviewflow "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/review.sh"
click node_rewriteengine "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/rewrite_source.sh"
click node_container "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/rewrite_in_container.sh"
click node_prompts "https://github.com/mingliiii/dissecting_ai_reviews/tree/main/prompts"
click node_checker "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/check_protected.py"
click node_maintex "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/detect_main_tex.py"
click node_compiler "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/compile_zip.sh"
click node_reviewer "https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/review_pdf.py"
click node_reviewprompts "https://github.com/mingliiii/dissecting_ai_reviews/tree/main/prompts"

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_single,node_joint,node_repeat,node_guided,node_reviewflow,node_reviewapi,node_reviewresult toneBlue
class node_rewriteengine,node_container toneAmber
class node_checker,node_maintex,node_compiler toneMint
class node_reviewer,node_reviewprompts toneRose
class node_prompts,node_user,node_source,node_pdf toneIndigo
```

## Components

### Experimental workflows

- [Single rewrite](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/single.sh): `workflows/single.sh`
- [Joint rewrite](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/joint.sh): `workflows/joint.sh`
- [Repeated rewrite](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/repeat.sh): `workflows/repeat.sh`
- [Review-guided rewrite](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/review_guided.sh): `workflows/review_guided.sh`
- [Review workflow](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/workflows/review.sh): `workflows/review.sh`

### Rewrite system

- [Source rewriting](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/rewrite_source.sh): `src/rewrite_source.sh`
- [Container rewrite](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/rewrite_in_container.sh): `src/rewrite_in_container.sh`

### Validation and compilation

- [Protected-content checker](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/check_protected.py): `src/check_protected.py`
- [Main TeX detection](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/detect_main_tex.py): `src/detect_main_tex.py`
- [PDF compilation](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/compile_zip.sh): `src/compile_zip.sh`

### PDF review

- [PDF review](https://github.com/mingliiii/dissecting_ai_reviews/blob/main/src/review_pdf.py): `src/review_pdf.py`
- [Review templates](https://github.com/mingliiii/dissecting_ai_reviews/tree/main/prompts): `prompts`

### Prompt library

- [Rewrite instructions](https://github.com/mingliiii/dissecting_ai_reviews/tree/main/prompts): `prompts`

### Other components

- **Researcher**
- **LaTeX source ZIP**
- **Compiled PDF**
- **Review API**
- **Structured review**

## Connections

- Researcher → Single rewrite: runs (evidence: `README.md`)
- Researcher → Joint rewrite: runs (evidence: `README.md`)
- Researcher → Repeated rewrite: runs (evidence: `README.md`)
- Researcher → Review-guided rewrite: runs (evidence: `README.md`)
- Researcher → Review workflow: runs (evidence: `README.md`)
- LaTeX source ZIP → Single rewrite: provides source (evidence: `README.md`)
- LaTeX source ZIP → Joint rewrite: provides source (evidence: `README.md`)
- LaTeX source ZIP → Repeated rewrite: provides source (evidence: `README.md`)
- LaTeX source ZIP → Review-guided rewrite: provides source (evidence: `README.md`)
- Single rewrite → Source rewriting: invokes rewrite (evidence: `README.md`)
- Joint rewrite → Source rewriting: invokes rewrite (evidence: `README.md`)
- Repeated rewrite → Source rewriting: repeats rewrite (evidence: `README.md`)
- Review-guided rewrite → Source rewriting: invokes rewrite (evidence: `README.md`)
- Source rewriting → Container rewrite: runs in container
- Source rewriting → Rewrite instructions: uses instructions (evidence: `README.md`)
- Single rewrite → Protected-content checker: validates output (evidence: `README.md`)
- Joint rewrite → Protected-content checker: validates output (evidence: `README.md`)
- Repeated rewrite → Protected-content checker: validates each round (evidence: `README.md`)
- Review-guided rewrite → Protected-content checker: validates rewrite (evidence: `README.md`)
- Single rewrite → PDF compilation: compiles source (evidence: `README.md`)
- Joint rewrite → PDF compilation: compiles source (evidence: `README.md`)
- Repeated rewrite → PDF compilation: compiles final source (evidence: `README.md`)
- Review-guided rewrite → PDF compilation: compiles source (evidence: `README.md`)
- PDF compilation → Main TeX detection: selects entrypoint
- PDF compilation → Compiled PDF: produces PDF (evidence: `README.md`)
- Review workflow → PDF review: reviews PDF (evidence: `README.md`)
- Review-guided rewrite → PDF review: reviews intermediate PDF (evidence: `README.md`)
- PDF review → Review templates: uses template (evidence: `README.md`)
- PDF review → Review API: requests review (evidence: `README.md`)
- PDF review → Structured review: writes review (evidence: `README.md`)
- Compiled PDF → Review workflow: provides PDF (evidence: `README.md`)
- Compiled PDF → Review-guided rewrite: provides intermediate PDF (evidence: `README.md`)
- Structured review → Review-guided rewrite: guides rewrite (evidence: `README.md`)
