lyw912/CapstoneProject

Python

0

46 commits

updated Jul 18, 2026

See the code

README

CapstoneProject

Multi-agent public-opinion intelligence for evidence-grounded analysis and traceable reports.

Python 3.11+ React 18 Vite 6 Flask runtime LangGraph agent graphs GPL-2.0 license

Documentation | Quick Start | Artifact Review | Architecture | API | Walkthrough

CapstoneProject is an end-to-end system for public-opinion analysis. It keeps separate evidence, coordination, reporting, and UI components; the current Coordinator implementation uses an EvidenceGraph-centered intelligence layer to gather observable public evidence, model quality and repeated coverage, audit claims against cited excerpts, and turn cited insights into editable, exportable reports through Signal Studio.

Signal Studio Home

Positioning

Reference PointKnown ForThis Project Adds
RAGRetrieve, then generate.Stance, trust, divergence, proof view.
Microsoft GraphRAGGraph reasoning over corpora.Live public-opinion workflow and exports.
AutoGen / CrewAIGeneric multi-agent orchestration.Domain agents with a stable Coordinator artifact.
Sentiment classifiersLabels and scores.Investigation, synthesis, and reports.
BI/static dashboardsVisualization.Run, refine, edit, monitor, export.

Core strengths: multi-agent evidence analysis, inspectable reasoning, structured report IR, Signal Studio UI, OpenAPI contracts, and acceptance-ready docs. See Contribution And Novelty.

Product Flow

StageUser ExperienceMain System Path
BriefEnter a topic and start analysis.Signal Studio -> Flask -> AgentCoordinator
EvidenceInspect source mix, stance, trust, distinct evidence groups, repeated coverage, and provider diagnostics.AgentCoordinator internal layer -> EvidenceGraph
ReasoningReview audited claims, cited sources, tensions, confidence, and recommended follow-up.Claim-driven adaptive research loop and evidence audit
ReportGenerate, edit, annotate, and export a polished report.ReportEngine -> Document IR -> renderers
OperateAdjust providers, start runtime, inspect traces, and send feedback.Flask runtime APIs, configurable LangSmith traces

System context

Architecture At A Glance

LayerResponsibilityPrimary Paths
InterfaceSignal Studio views, report editor, evidence review, runtime controlsfrontend/, templates/index.html, static/signal-studio/
API gatewayFlask routes, background tasks, config editing, static shell, observabilityapp.py
CoordinationPublic entry point, progress reporting, and Coordinator artifact exportAgentCoordinator/
Internal intelligenceSource acquisition, semantic quality routing, canonical clustering, quality features, claim mining, audit, synthesisAgentCoordinator/intelligence/
Evidence enginesQueryEngine, MediaEngine, and MindSpider evidence/search utilities used directly or through Coordinator integration pointsQueryEngine/, MediaEngine/, MindSpider/
ReportingTemplate selection, chapter generation, Document IR, HTML/MD/PDF exportReportEngine/
QualityRegression tests, provider evaluation, sanitization, schema validationtests/, api_evaluation/

Interface Preview

ReadoutProofReport Editing
Signal Studio ReadoutSignal Studio ProofSignal Studio Edit

More screenshots: Signal Studio Screenshots.

Quick Start

Use Python 3.11 or newer. If python is not on PATH, use Conda or the uv commands shown in the full Setup Guide.

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m playwright install chromium
Copy-Item .env.example .env

Configure provider keys in .env, then build the final UI:

cd frontend
npm install
npm run build
cd ..

Start the Flask runtime:

python app.py

uv equivalent:

uv run --with-requirements requirements.txt python app.py

Open:

http://127.0.0.1:5000

For the complete setup path, provider profile, artifact review path, and verification checklist, use the Setup Guide.

Core API Surface

EndpointPurpose
GET /api/system/statusRead final runtime status.
POST /api/system/startInitialize runtime components.
GET /api/config / POST /api/configRead or persist selected runtime settings.
POST /api/coordinator/runStart integrated multi-agent analysis.
GET /api/coordinator/task/{task_id}Poll Coordinator task state.
GET /api/coordinator/latestLoad the newest Coordinator artifact.
POST /api/report/generateStart report generation from current analysis.
GET /api/report/stream/{task_id}Stream report-generation progress with SSE.
GET /api/report/export/pdf/{task_id}Export generated report as PDF.

References:

Coordinator Intelligence Runtime

POST /api/coordinator/run keeps the public endpoint name for compatibility and executes AgentCoordinator.run(). Internally, the Coordinator uses its intelligence layer, then writes one fused coordinator_output_latest.json artifact with schema 2.1-coordinator-intelligence:

  • coordinator_intelligence: the internal evidence ledger with EvidenceGraph, quality_summary, freshness_summary, provider_diagnostics, audit_summary, and cited insights.
  • Compatibility fields such as synthesis, source_data, divergence_matrix, fact_opinion_separation, and coordinator_trace; these are evidence-derived views, not a separate second artifact.
  • Explicit provider diagnostics for missing or failing Jina semantic quality, QueryEngine LLM routing, source acquisition providers (Tavily, Bocha, Anspire), and local replay fallback routes.

If optional external search or rerank providers are not configured, the engine records not_configured diagnostics and continues the Coordinator flow. Local replay is disabled by default; it is intended for demos/tests only and is used only when COORDINATOR_ALLOW_REPLAY_FALLBACK=true, with local_fixture:used recorded in the artifact.

Documentation

Start HereUse It For
Documentation HomeFull documentation map.
Project BriefProduct scope and system purpose.
CapabilitiesWhat the system does and where each capability lives.
System ArchitectureMain components, decisions, and runtime structure.
Runtime FlowEndpoint-level execution path.
SetupLocal environment and first run.
Artifact ReviewReview cached artifacts, screenshots, and report examples.
RunbookRoutine operation and diagnostics.
TestingVerification commands and coverage.
Evidence DashboardProvider benchmark, regression evidence, and review proof points.
Defense BriefConcise technical narrative for review or defense.
Contribution And NoveltyContribution map, baseline comparison, and defense talking points.
RoadmapCompleted scope and engineering evolution plan.

Repository Map

CapstoneProject/
|-- app.py                    # Flask orchestrator and final runtime API gateway
|-- frontend/                 # Signal Studio React/Vite source
|-- AgentCoordinator/         # Coordinator entry point, internal intelligence layer, artifact cache
|   `-- intelligence/         # EvidenceGraph contracts, source gateway, quality pipeline, audit, synthesis
|-- QueryEngine/              # Search, trust, stance, social enrichment
|-- MediaEngine/              # Media-side research
|-- ReportEngine/             # Report generation graph, IR, renderers, exports
|-- ForumEngine/              # Forum-style coordination utilities
|-- SentimentAnalysisModel/   # Sentiment and topic model assets
|-- api_evaluation/           # Provider benchmark harness and results
|-- tests/                    # Regression and contract tests
`-- docs/                     # Authoritative documentation library

Quality And Operations

AreaDocument
Test coverage and commandsTesting
API provider benchmarkAPI Evaluation
Evidence summaryEvidence Dashboard
Security and sensitive input handlingSecurity And Safety
Deployment shapeDeployment
TroubleshootingTroubleshooting
Data/model asset policyData And Model Assets
Contribution guideCONTRIBUTING

License

This repository is distributed under the GNU General Public License v2.0.

Project Status

The main application path is the Flask-served Signal Studio runtime. The authoritative project documentation is in docs/, with runtime asset boundaries documented in Runtime Assets.

lyw912/CapstoneProject

Python

0

46 commits

updated Jul 18, 2026

See the code

README

CapstoneProject

Multi-agent public-opinion intelligence for evidence-grounded analysis and traceable reports.

Python 3.11+ React 18 Vite 6 Flask runtime LangGraph agent graphs GPL-2.0 license

Documentation | Quick Start | Artifact Review | Architecture | API | Walkthrough

CapstoneProject is an end-to-end system for public-opinion analysis. It keeps separate evidence, coordination, reporting, and UI components; the current Coordinator implementation uses an EvidenceGraph-centered intelligence layer to gather observable public evidence, model quality and repeated coverage, audit claims against cited excerpts, and turn cited insights into editable, exportable reports through Signal Studio.

Signal Studio Home

Positioning

Reference PointKnown ForThis Project Adds
RAGRetrieve, then generate.Stance, trust, divergence, proof view.
Microsoft GraphRAGGraph reasoning over corpora.Live public-opinion workflow and exports.
AutoGen / CrewAIGeneric multi-agent orchestration.Domain agents with a stable Coordinator artifact.
Sentiment classifiersLabels and scores.Investigation, synthesis, and reports.
BI/static dashboardsVisualization.Run, refine, edit, monitor, export.

Core strengths: multi-agent evidence analysis, inspectable reasoning, structured report IR, Signal Studio UI, OpenAPI contracts, and acceptance-ready docs. See Contribution And Novelty.

Product Flow

StageUser ExperienceMain System Path
BriefEnter a topic and start analysis.Signal Studio -> Flask -> AgentCoordinator
EvidenceInspect source mix, stance, trust, distinct evidence groups, repeated coverage, and provider diagnostics.AgentCoordinator internal layer -> EvidenceGraph
ReasoningReview audited claims, cited sources, tensions, confidence, and recommended follow-up.Claim-driven adaptive research loop and evidence audit
ReportGenerate, edit, annotate, and export a polished report.ReportEngine -> Document IR -> renderers
OperateAdjust providers, start runtime, inspect traces, and send feedback.Flask runtime APIs, configurable LangSmith traces

System context

Architecture At A Glance

LayerResponsibilityPrimary Paths
InterfaceSignal Studio views, report editor, evidence review, runtime controlsfrontend/, templates/index.html, static/signal-studio/
API gatewayFlask routes, background tasks, config editing, static shell, observabilityapp.py
CoordinationPublic entry point, progress reporting, and Coordinator artifact exportAgentCoordinator/
Internal intelligenceSource acquisition, semantic quality routing, canonical clustering, quality features, claim mining, audit, synthesisAgentCoordinator/intelligence/
Evidence enginesQueryEngine, MediaEngine, and MindSpider evidence/search utilities used directly or through Coordinator integration pointsQueryEngine/, MediaEngine/, MindSpider/
ReportingTemplate selection, chapter generation, Document IR, HTML/MD/PDF exportReportEngine/
QualityRegression tests, provider evaluation, sanitization, schema validationtests/, api_evaluation/

Interface Preview

ReadoutProofReport Editing
Signal Studio ReadoutSignal Studio ProofSignal Studio Edit

More screenshots: Signal Studio Screenshots.

Quick Start

Use Python 3.11 or newer. If python is not on PATH, use Conda or the uv commands shown in the full Setup Guide.

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m playwright install chromium
Copy-Item .env.example .env

Configure provider keys in .env, then build the final UI:

cd frontend
npm install
npm run build
cd ..

Start the Flask runtime:

python app.py

uv equivalent:

uv run --with-requirements requirements.txt python app.py

Open:

http://127.0.0.1:5000

For the complete setup path, provider profile, artifact review path, and verification checklist, use the Setup Guide.

Core API Surface

EndpointPurpose
GET /api/system/statusRead final runtime status.
POST /api/system/startInitialize runtime components.
GET /api/config / POST /api/configRead or persist selected runtime settings.
POST /api/coordinator/runStart integrated multi-agent analysis.
GET /api/coordinator/task/{task_id}Poll Coordinator task state.
GET /api/coordinator/latestLoad the newest Coordinator artifact.
POST /api/report/generateStart report generation from current analysis.
GET /api/report/stream/{task_id}Stream report-generation progress with SSE.
GET /api/report/export/pdf/{task_id}Export generated report as PDF.

References:

Coordinator Intelligence Runtime

POST /api/coordinator/run keeps the public endpoint name for compatibility and executes AgentCoordinator.run(). Internally, the Coordinator uses its intelligence layer, then writes one fused coordinator_output_latest.json artifact with schema 2.1-coordinator-intelligence:

  • coordinator_intelligence: the internal evidence ledger with EvidenceGraph, quality_summary, freshness_summary, provider_diagnostics, audit_summary, and cited insights.
  • Compatibility fields such as synthesis, source_data, divergence_matrix, fact_opinion_separation, and coordinator_trace; these are evidence-derived views, not a separate second artifact.
  • Explicit provider diagnostics for missing or failing Jina semantic quality, QueryEngine LLM routing, source acquisition providers (Tavily, Bocha, Anspire), and local replay fallback routes.

If optional external search or rerank providers are not configured, the engine records not_configured diagnostics and continues the Coordinator flow. Local replay is disabled by default; it is intended for demos/tests only and is used only when COORDINATOR_ALLOW_REPLAY_FALLBACK=true, with local_fixture:used recorded in the artifact.

Documentation

Start HereUse It For
Documentation HomeFull documentation map.
Project BriefProduct scope and system purpose.
CapabilitiesWhat the system does and where each capability lives.
System ArchitectureMain components, decisions, and runtime structure.
Runtime FlowEndpoint-level execution path.
SetupLocal environment and first run.
Artifact ReviewReview cached artifacts, screenshots, and report examples.
RunbookRoutine operation and diagnostics.
TestingVerification commands and coverage.
Evidence DashboardProvider benchmark, regression evidence, and review proof points.
Defense BriefConcise technical narrative for review or defense.
Contribution And NoveltyContribution map, baseline comparison, and defense talking points.
RoadmapCompleted scope and engineering evolution plan.

Repository Map

CapstoneProject/
|-- app.py                    # Flask orchestrator and final runtime API gateway
|-- frontend/                 # Signal Studio React/Vite source
|-- AgentCoordinator/         # Coordinator entry point, internal intelligence layer, artifact cache
|   `-- intelligence/         # EvidenceGraph contracts, source gateway, quality pipeline, audit, synthesis
|-- QueryEngine/              # Search, trust, stance, social enrichment
|-- MediaEngine/              # Media-side research
|-- ReportEngine/             # Report generation graph, IR, renderers, exports
|-- ForumEngine/              # Forum-style coordination utilities
|-- SentimentAnalysisModel/   # Sentiment and topic model assets
|-- api_evaluation/           # Provider benchmark harness and results
|-- tests/                    # Regression and contract tests
`-- docs/                     # Authoritative documentation library

Quality And Operations

AreaDocument
Test coverage and commandsTesting
API provider benchmarkAPI Evaluation
Evidence summaryEvidence Dashboard
Security and sensitive input handlingSecurity And Safety
Deployment shapeDeployment
TroubleshootingTroubleshooting
Data/model asset policyData And Model Assets
Contribution guideCONTRIBUTING

License

This repository is distributed under the GNU General Public License v2.0.

Project Status

The main application path is the Flask-served Signal Studio runtime. The authoritative project documentation is in docs/, with runtime asset boundaries documented in Runtime Assets.