terraform plan consequence analysis with blast-radius estimation
Parses Terraform execution plans (JSON format) to identify resource changes, dependencies, and potential blast radius. Analyzes which resources will be created, modified, or destroyed and traces downstream impacts through resource dependency graphs. Integrates with MCP protocol to expose analysis results to AI agents for decision-making before apply operations.
Unique: Implements consequence analysis as an MCP server that integrates directly into AI agent workflows, allowing agents to query plan impacts before execution rather than analyzing plans post-hoc. Uses dependency graph traversal to estimate blast radius rather than simple resource counting.
vs alternatives: Provides real-time consequence analysis integrated into agent decision loops, whereas terraform plan alone requires manual interpretation and external tools like Checkov only perform policy checks, not impact analysis.
shell command consequence evaluation with side-effect prediction
Analyzes shell commands (bash, sh, zsh) to predict side effects including file system mutations, process spawning, network calls, and environment variable changes. Uses pattern matching and AST-like parsing to identify dangerous operations (rm, dd, curl with sudo, etc.) and traces command chains to estimate overall system impact. Exposes findings through MCP tool interface for agent evaluation.
Unique: Integrates shell command consequence analysis into MCP protocol, allowing AI agents to query command safety before execution. Uses pattern-based detection of dangerous operations combined with command chain tracing rather than full shell parsing.
vs alternatives: Provides agent-integrated safety checks for shell commands, whereas ShellCheck focuses on syntax/style issues and tools like audit-shell only log executed commands; recourse-cli enables preventive analysis before execution.
mcp tool call consequence validation with schema-aware impact assessment
Validates MCP tool calls against their schemas and predicts consequences of tool execution based on tool metadata and parameter values. Analyzes tool definitions to identify which tools perform mutations, access sensitive resources, or have side effects. Evaluates whether a proposed tool call aligns with agent intent and flags potentially dangerous parameter combinations (e.g., delete with wildcard patterns).
Unique: Extends MCP protocol with consequence validation layer that analyzes tool calls against schemas and side-effect metadata before execution. Uses schema introspection combined with parameter analysis to predict tool impacts.
vs alternatives: Provides schema-aware tool call validation integrated into MCP workflows, whereas generic schema validators only check type correctness; recourse-cli adds consequence prediction and side-effect analysis.
dependency graph analysis for infrastructure and resource relationships
Builds and traverses dependency graphs from Terraform plans and MCP tool definitions to trace resource relationships and impact chains. Identifies direct dependencies (explicit resource references) and estimates transitive impacts when resources are modified or deleted. Generates visual or textual representations of dependency chains to help agents understand cascading effects.
Unique: Implements dependency graph analysis as part of MCP server, allowing agents to query resource relationships and impact chains dynamically. Uses graph traversal algorithms to estimate transitive impacts rather than simple reference counting.
vs alternatives: Provides dynamic dependency analysis integrated into agent workflows, whereas static Terraform visualization tools only show structure; recourse-cli enables agents to query impacts for specific change scenarios.
risk scoring and consequence severity classification
Assigns risk scores and severity classifications to proposed actions (Terraform changes, shell commands, tool calls) based on impact type, blast radius, and resource criticality. Uses a scoring model that considers factors like number of affected resources, whether changes are reversible, and whether critical infrastructure is involved. Provides severity labels (low, medium, high, critical) to help agents make informed decisions.
Unique: Implements quantitative risk scoring for infrastructure and command consequences as part of MCP server, enabling agents to make risk-aware decisions. Uses multi-factor scoring model considering impact scope, reversibility, and resource criticality.
vs alternatives: Provides automated risk scoring integrated into agent workflows, whereas manual risk assessment is subjective and time-consuming; recourse-cli enables consistent, quantitative risk evaluation.
mcp protocol server implementation with tool exposure
Implements a Model Context Protocol (MCP) server that exposes consequence analysis capabilities as MCP tools callable by AI agents. Handles MCP protocol communication, tool registration, parameter marshaling, and result serialization. Allows agents to invoke consequence analysis tools through standard MCP client interfaces without direct library imports.
Unique: Implements full MCP server for consequence analysis, exposing all capabilities through standard MCP tool interface. Handles protocol-level concerns (serialization, async communication, error handling) transparently.
vs alternatives: Provides MCP-native integration for consequence analysis, whereas library-based approaches require code changes; recourse-cli enables drop-in integration via MCP protocol.
multi-format input parsing for terraform, shell, and tool definitions
Parses multiple input formats including Terraform JSON plans, shell command text, and MCP tool definition schemas. Uses format-specific parsers to extract relevant information (resource changes, command operations, tool metadata) and normalize into internal representations for analysis. Handles format variations and provides clear error messages for malformed inputs.
Unique: Implements unified parsing layer that handles multiple input formats (Terraform, shell, MCP) with format-specific logic, normalizing diverse inputs into common analysis representations.
vs alternatives: Provides single tool for analyzing multiple action types, whereas separate tools require format conversion and orchestration; recourse-cli handles parsing and normalization transparently.
reversibility assessment and data loss risk detection
Analyzes operations to determine whether changes are reversible and identifies operations that could cause permanent data loss. Classifies operations as reversible (can be undone via backup/rollback), partially reversible (some data recoverable), or irreversible (permanent loss). Detects high-risk patterns like database deletions, encryption key destruction, and unbackup'd resource removal.
Unique: Specifically analyzes reversibility and data loss risk across Terraform, shell, and MCP domains, enabling consistent data protection policies regardless of operation type
vs alternatives: More focused on data loss prevention than generic consequence analysis tools; provides explicit reversibility classification to inform approval decisions