non-linear

from zpankz/mcp-skillset

MCP Skillset - Claude Code skills, references, and knowledge base

1 stars0 forksUpdated Jan 15, 2026
npx skills add https://github.com/zpankz/mcp-skillset --skill non-linear

SKILL.md

Non-Linear Reasoning

Execute uncertainty-aware reasoning through recursive think→act→observe loops using Anthropic's orchestrator-worker pattern with effort scaling.

Quick Reference

NeedGo To
Research orchestrationreferences/RESEARCH-ORCHESTRATION.md
Subagent patternsreferences/SUBAGENTS.md
MCP integrationreferences/MCP-INTEGRATION.md
State persistencereferences/STATE-PERSISTENCE.md
NoisyGraph schemareferences/NOISY-GRAPH.md
Sandbox executionreferences/SANDBOX.md

Triggers

TriggerModeEffort Level
/nlr, /reason, /think-deepFullAdaptive (1-10 subagents)
/compactAbbreviatedMinimal (1-3 subagents)
/semanticExploratoryMaximum (5-10 subagents)
/research [topic]ResearchFull orchestrator-worker
Complex query auto-detectAdaptiveScore-based scaling

Architecture: Orchestrator-Worker Pattern

Based on Anthropic's multi-agent research system architecture:

┌─────────────────────────────────────────────────────────────────────┐
│                      LEAD RESEARCHER (Orchestrator)                  │
│  • Analyzes query complexity → determines effort level              │
│  • Develops research strategy → saves to Memory                      │
│  • Spawns specialized subagents → coordinates parallel execution     │
│  • Synthesizes findings → handles citation attribution               │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   ┌─────────────┐  ┌─────────────┐  ┌─────────────┐                │
│   │  MAPPER     │  │  SKEPTIC    │  │  SEARCHER   │    ...         │
│   │  SUBAGENT   │  │  SUBAGENT   │  │  SUBAGENT   │                │
│   └──────┬──────┘  └──────┬──────┘  └──────┬──────┘                │
│          │                │                │                        │
│          └────────────────┴────────────────┘                        │
│                           │                                         │
│                   ┌───────▼───────┐                                 │
│                   │    MEMORY     │  (State persistence)            │
│                   │  checkpoint   │                                 │
│                   └───────────────┘                                 │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Effort Scaling (Anthropic Pattern)

Query complexity determines subagent allocation:

ComplexitySubagentsTool CallsUse Case
Simple13-10Single fact-finding
Moderate2-410-30Multi-source synthesis
Complex5-1030-100+Deep research, comparison

Complexity Classification

def classify_effort(query: str, context: dict) -> EffortLevel:
    score = 0
    
    # Domain complexity
    domains = detect_domains(query)  # medical, legal, technical, etc.
    score += len(domains) * 2
    
    # Reasoning indicators
    if any(w in query.lower() for w in ['compare', 'analyze', 'synthesize']):
        score += 3
    if any(w in query.lower() for w in ['mechanism', 'pathway', 'causation']):
        score += 4
    
    # Stakes multiplier (medical/legal = high stakes)
    if 'medical' in domains or 'legal' in domains:
        score *= 1.5
    
    # Novelty (requires verification)
    if requires_current_information(query):
        score += 2
    
    return EffortLevel.from_score(score)
    # < 4: SIMPLE, 4-8: MODERATE, > 8: COMPLEX

Core Workflow

Phase 1: Initialize Lead Researcher

# Extended thinking for strategy development
thoughtbox({
    thought: """
    LEAD RESEARCHER INITIALIZATION
    Query: {query}
    
    Strategy Development:
    1. Complexity assessment: {classify_effort(query)}
    2. Domain identification: {detect_domains(query)}
    3. Subagent allocation: {determine_subagents(effort_level)}
    4. Research plan: {develop_plan(query, context)}
    """,
    thoughtNumber: 1,
    totalThoughts: effort_level.max_iterations,
    nextThoughtNeeded: True,
    includeGuide: True
})

# Save plan to memory for context overflow recovery
checkpoint_state({
    "plan": research_plan,
    "subagents": allocated_subagents,
    "iteration": 0
})

Phase 2: Spawn Subagents with Task Descriptions

Each subagent receives detailed instructions to prevent duplication:

SUBAGENT_TEMPLATES = {
    "mapper": {
        "objective": "Extract entities, relationships, and structural gaps from {domain}",
        "output_format": {
            "entities": [{"label": str, "confide

...
Read full content

Repository Stats

Stars1
Forks0