⚙️ ExecutionConfig.json
{
  "complex_problem": "Design a scalable microservices architecture.",
  "decomposition_strategy": "functional",
  "max_depth": 2,
  "include_file_context": true,
  "input_files": ["src/main/kotlin/**/*.kt"],
  "synthesize_solution": true,
  "validate_coherence": true
}
👁️ Session UI (TabbedDisplay)
Overview Context Decomposition Solutions Synthesis Validation
✅ Analysis Complete!
Summary:
• Subproblems Identified: 3
• Solutions Generated: 3
• Average Confidence: 94%

Live Results Showcase

Explore actual artifacts generated by this task, including decomposition logs and synthesized solutions.

Task Execution Configuration

Field Type Description
complex_problem* String The high-level problem or requirement to be decomposed and solved.
include_file_context Boolean Whether to include file context in the analysis. Default: true.
decomposition_strategy String Strategy for breakdown: functional, temporal, spatial, or hierarchical.
max_depth Int Maximum levels of recursive decomposition. Default: 3.
synthesize_solution Boolean If true, integrates subproblem solutions into a single response. Default: true.
validate_coherence Boolean Performs a final LLM pass to check for contradictions in the synthesis. Default: true.
input_files List<String> Glob patterns (e.g. **/*.kt) for source code context.
related_files List<String> Specific file paths to include as additional context.

Lifecycle & Reasoning Flow

1. Context Assembly
Gathers data from input_files, related_files, and results from previous tasks in the orchestration chain.
2. Decomposition & Dependency Mapping
The LLM identifies 3-7 subproblems. A topological sort is performed to resolve dependencies and detect circular loops before execution.
3. Sequential Subproblem Solving
Each subproblem is solved in order. Solutions from dependencies are injected into the context of subsequent subproblems to ensure continuity.
4. Synthesis & Coherence Validation
Individual solutions are merged. If validate_coherence is enabled, the system identifies gaps or contradictions and suggests improvements.

Embedded Execution (Headless)

Use the UnifiedHarness to run this task programmatically in CI/CD or CLI tools.


import com.simiacryptus.cognotik.apps.general.UnifiedHarness
import com.simiacryptus.cognotik.plan.tools.reasoning.DecompositionSynthesisTask.Companion.DecompositionSynthesis
import com.simiacryptus.cognotik.plan.tools.reasoning.DecompositionSynthesisTask.DecompositionSynthesisTaskExecutionConfigData
import com.simiacryptus.cognotik.plan.tools.TaskTypeConfig
import java.io.File

val harness = UnifiedHarness(serverless = true, openBrowser = false)
harness.start()

val result = harness.runTask(
    taskType = DecompositionSynthesis,
    typeConfig = TaskTypeConfig(),
    executionConfig = DecompositionSynthesisTaskExecutionConfigData(
        complex_problem = "Design a multi-tenant SaaS authentication system",
        decomposition_strategy = "functional",
        max_depth = 2,
        synthesize_solution = true,
        validate_coherence = true
    ),
    workspace = File("./my-project-docs")
)
println("Synthesized Solution: ${result}")
            

Test Case Example

Example configuration for validating the task's ability to handle circular dependencies.


{
  "complex_problem": "Analyze the relationship between Module A and Module B",
  "decomposition_strategy": "hierarchical",
  "related_files": ["src/ModuleA.kt", "src/ModuleB.kt"],
  "max_depth": 1,
  "validate_coherence": true
}
            

Prompt Segment

The following logic is injected into the LLM context to define the tool's capabilities:


DecompositionSynthesis - Break down complex problems into subproblems
** Optionally, list input files (supports glob patterns) to be examined for context
** Specify the complex problem to decompose
** Choose decomposition strategy: functional, temporal, spatial, hierarchical
** Set maximum decomposition depth (default: 3)
** Enable solution synthesis to combine subproblem solutions
** Enable coherence validation to check solution consistency
** Related files can provide context for the problem
** Output: Comprehensive solution with decomposition analysis, subproblem solutions, and synthesis
** Returns: Final synthesized solution or concatenated subproblem solutions
** Implements divide-and-conquer reasoning approach