How alinawlo/master-thesis-code works
ReformAgent is a policy-reform proposal discovery and document-processing application. Users explore proposal records or upload a policy document; the extraction interface processes it through an n8n workflow, presents results for duplicate review, and saves processed records. The repository also contains semantic deduplication, PDF page resolution, execution logging, and an analyst agent. Evidence is limited to the supplied excerpts and source index; several UI features and the analyst agent’s runtime wiring are not shown.
Main entry points: vite.config.ts Workflow middleware · App.tsx App shell · Pipeline.tsx Extraction pipeline · ragDeduplication.ts Semantic matching
Components 16
Application interface
- App shell
reformagent/src/App.tsx - Proposal explorer
reformagent/src/components/ReformExplorer.tsx
Document processing
- Extraction pipeline
reformagent/src/components/Pipeline.tsx - n8n workflow
reformagent/workflows/n8n_reformagent_workflow.json - Workflow middleware
reformagent/vite.config.ts - PDF page resolver
reformagent/src/server/pdfPageResolver.ts
Deduplication and records
- Duplicate review
reformagent/src/components/DeduplicationReview.tsx - Semantic matching
reformagent/src/server/ragDeduplication.ts - CSV records
reformagent/src/server/ragDeduplication.ts
Analysis and history
- Execution logger
reformagent/src/server/executionLogger.ts - Execution history
reformagent/workflows/execution_history.json - Gemini extraction
reformagent/src/lib/gemini.ts - Reform analyst
reformagent/agents/reform_analyst.py - Taxonomy clusters
reformagent/taxonomy_clusters.json
Other components
- User
- Google Gemini API
Connections 12
- User → App shell: uses
reformagent/src/App.tsx - App shell → Proposal explorer: renders
reformagent/src/App.tsx - App shell → Extraction pipeline: opens
reformagent/src/App.tsx - Extraction pipeline → Duplicate review: uses
reformagent/src/components/Pipeline.tsx - Extraction pipeline → Workflow middleware: submits extraction
- Workflow middleware → n8n workflow: invokes
reformagent/vite.config.ts - Workflow middleware → Semantic matching: calls
reformagent/vite.config.ts - Workflow middleware → PDF page resolver: resolves pages
reformagent/vite.config.ts - Workflow middleware → Execution logger: logs executions
reformagent/vite.config.ts - Semantic matching → CSV records: reads and writes
reformagent/src/server/ragDeduplication.ts - Execution logger → Execution history: writes history
reformagent/src/server/executionLogger.ts - Gemini extraction → Google Gemini API: requests analysis
reformagent/src/lib/gemini.ts