Pre-publish question quality analyzer for Stack Overflow.
Prepost analyzes your question before you post it - checking if the answer already exists, scoring its structure and clarity, detecting duplicates, validating tags, analyzing code quality, and giving you specific tips to improve it before posting.
The pipeline runs in two phases:
Phase 1 runs two agents in parallel:
- Search agent - searches the web for existing answers to your question
- Classifier agent - scores your question across 5 structural dimensions
Both feed into a decision agent that produces one of four verdicts:
publish- question is well structured and ready to postrevise_first- good start but needs improvementnot_ready- too vague, address gaps before postingdo_not_post- a direct answer already exists
Phase 2 runs six agents in parallel if Phase 1 clears the question:
- Duplicate detector - checks SO question corpus for semantic similarity
- Tag validator - validates tags against SO API, suggests missing ones
- Code analyzer - checks syntax, missing imports, undefined variables
- Tone checker - flags frustration, entitlement, or excessive hedging
- MRE checker - runs code in an E2B sandbox to verify reproducibility
- Docs linker - surfaces relevant official documentation
All six feed into an aggregator that produces a refined final verdict with specific actionable tips.
- LangGraph - agent orchestration
- LangChain - LLM interface
- Groq - LLM backend (Llama 3.3 70B)
- Tavily - web search
- Stack Exchange API - SO question data
- E2B - code sandbox for MRE checking
- FastAPI - REST API wrapper
- Docker - containerized API server
- Pydantic - data validation
- uv - package management
- Clone the repo
git clone https://github.com/yourname/prepost.git
cd prepost- Install dependencies
uv sync- Copy
.env.exampleto.envand fill in your API keys
cp .env.example .envGROQ_API_KEY=gsk_...
TAVILY_API_KEY=tvly-...
SO_API_KEY= # optional, increases rate limit
E2B_API_KEY=e2b_... # required for Phase 2 MRE checker- Run with Docker
docker compose up --build- Or run locally
uv run uvicorn app:server --reload --port 8000- Load the Firefox extension
- Go to
about:debuggingin Firefox - Click "This Firefox"
- Click "Load Temporary Add-on..."
- Select
extension/manifest.json - Go to
https://stackoverflow.com/questions/ask
prepost/
config.py settings and env vars
state.py LangGraph state schema
graph.py graph definition and node wiring
tools/
llm_client.py Groq LLM interface
web_search.py Tavily search wrapper
so_api.py Stack Exchange API wrapper
nodes/
search.py web search agent node
classifier.py structure classifier node
decision.py verdict decision node
tips.py tips generator node
duplicate_detector.py SO duplicate detection
tag_validator.py SO tag validation
code_analyzer.py AST syntax + static analysis
tone_checker.py sentiment and tone analysis
mre_checker.py E2B sandbox execution
docs_linker.py official docs search
aggregator.py Phase 2 signal synthesis
extension/
manifest.json Firefox extension config
content.js sidebar injection and logic
sidebar.css sidebar styles
tests/
test_graph.py
test_graph_phase2.py
test_search_node.py
test_classifier_node.py
test_decision_node.py
test_tips_node.py
test_web_search.py
test_so_api.py
test_duplicate_detector.py
test_tag_validator.py
test_code_analyzer.py
test_tone_checker.py
test_mre_checker.py
test_docs_linker.py
test_aggregator.py
- Phase 1 - core pipeline: search, classify, decide, tips
- Phase 2 - duplicate detector, tag validator, code analyzer, tone check, MRE checker, docs linker
- Firefox extension with sidebar UI
- FastAPI wrapper + Docker
- Phase 3 - FastAPI → browser extension polish
- Phase 4 - feedback loop, answer quality predictor, auto rewriter