Skip to main content

Planning System Overview

The NikCLI Planning System is an intelligent, AI-powered execution planning framework that breaks down complex development tasks into structured, executable plans with comprehensive risk assessment, dependency management, and interactive approval workflows.

Core Concepts

What is the Planning System?

The Planning System transforms high-level user goals into detailed, executable plans that:
  • Analyze project context and requirements
  • Generate structured execution steps with dependencies
  • Assess risks and provide mitigation strategies
  • Execute plans with real-time progress tracking
  • Validate results and handle failures gracefully

Key Components

System Architecture

Planning Manager

The central orchestrator that coordinates plan generation, validation, approval, and execution:

Plan Generator

Analyzes user requests and generates comprehensive execution plans:

Plan Executor

Executes validated plans with monitoring, approval, and error handling:

Planning Lifecycle

1. Context Analysis

The system begins by analyzing the project context:

2. Plan Generation

AI-powered plan generation creates structured execution steps:

3. Risk Assessment

Comprehensive risk analysis with mitigation strategies:

4. Plan Validation

Pre-execution validation ensures plan integrity:

5. User Approval

Interactive approval for risky operations:

6. Execution

Step-by-step execution with real-time tracking:

Plan Types

Standard Plans

Generated from user requests with full analysis:

Enhanced Plans (TodoPlan)

Rich todo-based plans with detailed metadata:

Autonomous Plans

AI-driven plans with automatic execution:

Execution Models

Sequential Execution

Steps execute in dependency order:

Parallel Execution

Independent steps can run concurrently:

Agent-Delegated Execution

Complex steps delegated to specialized agents:

Risk Management

Risk Levels

Four risk levels determine approval requirements:
LevelDescriptionAuto-ApproveExample Operations
LowRead-only, non-destructive✅ YesFile reading, analysis
MediumFile modifications⚠️ OptionalCreating files, updates
HighPotentially destructive❌ NoDeletions, replacements
CriticalSystem-level changes❌ NoPackage installations, migrations

Risk Assessment Algorithm

Mitigation Strategies

Tool Integration

Tool Capabilities

The planning system integrates with the tool registry:

Secure Tool Routing

High-risk operations route through secure wrappers:

Context Awareness

Workspace Context

Integration with RAG system for intelligent planning:

Project Analysis

Automatic detection of project characteristics:

Progress Tracking

Real-time Updates

Track execution progress in real-time:

Progress Metrics

Error Handling

Failure Strategies

Rollback Support

Performance Considerations

Optimization Strategies

  1. Parallel Execution: Run independent steps concurrently
  2. Caching: Cache tool results for repeated operations
  3. Lazy Loading: Load context only when needed
  4. Streaming: Stream large outputs incrementally

Timeouts

Best Practices

Plan Design

DO:
  • Break complex tasks into 5-15 manageable steps
  • Set realistic duration estimates
  • Use clear, actionable step titles
  • Define proper dependencies
  • Include validation steps
DON’T:
  • Create monolithic plans with 50+ steps
  • Skip risk assessment
  • Ignore error handling
  • Omit user feedback for risky operations

Execution

DO:
  • Review high-risk operations before approval
  • Monitor execution progress
  • Handle failures gracefully
  • Log execution results
DON’T:
  • Auto-approve destructive operations
  • Ignore validation warnings
  • Skip dependency checks
  • Bypass approval system

Next Steps

Plan Generation

Learn how to generate intelligent execution plans

Execution Flow

Understand the plan execution lifecycle

Plan Templates

Explore pre-built plan templates

Interactive Planning

Master interactive plan approval and modification