MultiPerspectiveAnalysisTask
Analyze complex topics from multiple independent viewpoints and synthesize findings into a unified, high-confidence conclusion using parallel agent execution.
Side-Effect Safe
Multi-Agent Synthesis
GPT-4o Recommended
⚙️ MultiPerspectiveAnalysisConfig.json
{
"analysis_subject": "Migrating to Microservices",
"perspectives": [
"Technical Debt",
"Operational Complexity",
"Developer Velocity"
],
"input_files": ["src/**/*.kt"],
"synthesize": true,
"consensus_threshold": 0.8
}
→
👁️ Session UI (TabbedDisplay)
Overview
Technical Debt
Synthesis
Unified Conclusion
The analysis shows a 0.85 consensus that migration is viable if operational tooling is prioritized.
- Agreement: High risk in deployment overhead.
- Conflict: Developer velocity may dip initially.
Live Results Showcase
Explore actual analysis artifacts generated by this task in the test workspace.
Execution Configuration
| Field | Type | Description |
|---|---|---|
analysis_subject* |
String |
The topic or problem to analyze from multiple viewpoints. |
perspectives* |
List<String> |
List of viewpoints (e.g., technical, business, ethical, user). |
input_files |
List<String> |
Glob patterns (e.g. **/*.kt) for source context. |
synthesize |
Boolean |
If true, generates a unified conclusion. Default: true. |
consensus_threshold |
Double |
Minimum agreement level (0.0-1.0). Default: 0.7. |
related_files |
List<String> |
Additional files for context (supports glob patterns). |
Task Lifecycle
- Initialization: Validates that the subject and perspectives are provided and the threshold is within bounds (0.0-1.0).
- Context Gathering: Resolves glob patterns in
input_filesandrelated_filesto provide the LLM with relevant source code or documentation. - Parallel Analysis: Spawns independent
ChatAgentinstances for each perspective. This prevents "groupthink" or cross-contamination of ideas between viewpoints. - Synthesis: A specialized synthesis agent reviews all perspective results to identify common themes, conflicts, and overall consensus.
- UI Rendering: Results are streamed into a
TabbedDisplay, allowing users to toggle between individual analyses and the final synthesis.
Embedded Execution (Scenario B)
Invoke this task directly using the UnifiedHarness in headless mode:
import com.simiacryptus.cognotik.plan.TaskType
import com.simiacryptus.cognotik.plan.tools.social.MultiPerspectiveAnalysisTask.Companion.MultiPerspectiveAnalysis
import com.simiacryptus.cognotik.plan.tools.social.MultiPerspectiveAnalysisTask.MultiPerspectiveAnalysisTaskExecutionConfigData
import com.simiacryptus.cognotik.plan.tools.TaskTypeConfig
// 1. Define Runtime Input
val executionConfig = MultiPerspectiveAnalysisTaskExecutionConfigData(
analysis_subject = "Migrating to Microservices",
perspectives = listOf("Technical Debt", "Operational Complexity"),
input_files = listOf("src/**/*.kt"),
synthesize = true,
consensus_threshold = 0.8
)
// 2. Run via Harness
harness.runTask(
taskType = MultiPerspectiveAnalysis,
typeConfig = TaskTypeConfig(), // Use default static config
executionConfig = executionConfig,
workspace = File("./my-project"),
autoFix = true
)
Kotlin Task Instantiation
val task = MultiPerspectiveAnalysisTask(
orchestrationConfig = config,
planTask = MultiPerspectiveAnalysisTaskExecutionConfigData(
analysis_subject = "Adopting Rust for performance modules",
perspectives = listOf("Security", "Performance", "Hiring"),
synthesize = true,
consensus_threshold = 0.8
)
)
Prompt Segment
The following instructions are injected into the orchestrator to guide the LLM:
MultiPerspectiveAnalysis - Analyze problems from multiple viewpoints with synthesis
** Specify the subject to analyze in analysis_subject
** Provide a list of perspectives to consider (e.g., technical, business, ethical, user experience)
** Optionally, list input files (supports glob patterns) to provide context for the analysis
** Set synthesize=true to generate a unified conclusion from all perspectives
** Configure consensus_threshold (0.0-1.0) to determine minimum agreement level
** Additional context files can be specified via input_files
** Each perspective will be analyzed independently, then synthesized
** Useful for:
- Architectural decision making
- Code review from multiple angles
- Strategic planning
- Risk assessment
- Feature evaluation