SECURITY NOTICE: This fork is optimized for complete automation. Because it bypasses all manual confirmation prompts, it is recommended to run it within an isolated environment, such as a dedicated code-server instance or a secure graphical container with VSCode.
- Spec-driven by default: Replaces Architect mode with Kiro-style Spec mode and Code mode with Vibe mode with appropriate prompt engineering.
- Streamlined Automation: Removes the restrictive "Roo is having trouble" halts to prevent interrupted automation runs.
- Instance Separation: Isolates modes and model configurations per instance, allowing you to run multiple independent airiOS Code tabs side-by-side within one VScode window.
- Asynchronous Subtasks (Alpha, enable in experimental settings): Introduces the
async_tasktoolset to run subtasks concurrently. Each subtask opens in a new editor tab, utilizing git worktrees and merging automatically upon completion.- Note:
new_taskandasync_taskare restricted to the Orchestrator or custom modes (not available in standard Vibe, Spec, Ask, or Debug modes). - Integration with superpowers
- Note:
- Tools Control: Adds a Tools section in settings to individually toggle all the default airiOS Code tools available to agent.
- Planned Integration:
- Integration with vi70x3/airi to append airiOS Code context snapshots to AIRI heartbeats.
The Swarm Architecture transitions parallel task execution into a structured coordination model featuring three distinct roles (Coordinator, Worktree Managers, and Agents) managed by a central daemon.
- Daemon Core (
Daemon): Acts as the central state hub. It manages the global registry of active agents, coordinates communication channels, persists plan state, and takes periodic snapshots of global swarm state for recovery. - Crash Detector (
CrashDetector): Monitors agent status via heartbeats, process liveness, and progress timeouts to detect unexpected process termination, timeout stalls, or missed heartbeats. - Checkpoint & Recovery (
ResumeCheckpointManager,RecoveryValidator): Persists structured agent progress checkpoints (ResumeCheckpoint) to disk. On daemon restart or agent crash, the validator reviews snapshots and checkpoints to flag inconsistencies (e.g., orphaned worktrees, tasks assigned to crashed agents) and attempts automated state repair.
- Context Store (
ContextStore): Implements a shared key-value database for coordination state. It supports atomic operations to prevent write-race conditions between parallel agents:- Compare-and-Set (CAS): Updates keys only if the current value matches an expected state.
- Transactional Updates: Multi-key modifications executed as an atomic batch with rollback on validation failure.
- Atomic Increments: Numerical updates with delta addition or subtraction.
- Communication Infrastructure: Provides Direct Messages (DMs), a global broadcast channel, and topic-based Channels managed by a
ChannelManagerthat maintains bounded message history with offset, limit, and time-range query support.
- Intent Avoidance (
IntentAvoidance): A proactive conflict-prevention system. Before modifying a file, agents declare their intent (IntentNotification), enabling other agents to wait, redirect, or coordinate to prevent concurrent write collisions. - Working Set Comparison (
WorkingSetComparator): Evaluates overlapping file access across different agents' active work areas (WorkingSet), assigning a conflict risk level (none, low, medium, high, critical) and recommending coordination actions. - Negotiation Manager (
NegotiationManager,ConflictTracker): Coordinates structured multi-agent negotiation protocols (propose, accept, reject, close) to resolve conflicts without coordinator intervention, logging all events to a persistent conflict timeline. - Semantic Conflict Detection (
SemanticConflictDetector): Analyzes file modifications at a structural level rather than raw text diffs to identify:- Incompatible JavaScript/TypeScript function signatures and class inheritance structures.
- API contract mismatches on interfaces and type aliases.
- Nested JSON configuration value clashes.
- Dependency version mismatches in
package.json.
- Git Operations Wrapper (
GitOperations): Manages isolated git worktrees. Handles automated branch creation, worktree mounting, status checking, staging, committing, and cleanups. - Merge Integration (
MergePreparationIntegration,MergePreparer): Evaluates task completions and worktree states against automatic merge criteria, producing status reports and triggering merges once all blockages and validation checks clear.
- Plan Versioning (
PlanVersioning): Tracks plan evolutions over time. Generates detailedPlanDiffstructures (added, removed, or modified tasks) on plan mutation, keeping full snapshots of recent plans in memory while pruning older ones. - Plan Quality Validator (
PlanQualityValidator): Performs static analysis on plan structures to detect circular dependencies, orphan tasks with no connections, invalid or empty task scopes, and duplicate task IDs. - UI Widgets (
SwarmInfoWidget,PlanInfoWidget): React-based panels displaying real-time agent graphs, communication channels, task directed acyclic graphs (DAGs), critical path lengths, and task blockages.
This system detects reasoning loops, wandering behaviors, and model changes, taking automated action to reduce context complexity and guide the agent back to a productive path.
- Semantic Tracker (
SemanticStateTracker): Maintains a bounded sliding window of structuredReasoningTurnevents containing tool patterns, touched files, hypotheses, conclusions, and state transitions. - Similarity Scorer (
SimilarityScorer): Computes pairwise turn similarity (0.0 to 1.0) using weighted structured signals:- Tool Pattern Overlap (0.35): Evaluated using Longest Common Subsequence (LCS) alignment.
- File Set Overlap (0.25): Evaluated using Jaccard similarity.
- Hypothesis (0.20) and Conclusion (0.10) Overlap: Evaluated using normalized case-insensitive set comparisons.
- State Transitions (0.10): Analyzes state progression.
- Progress Detector (
ProgressDetector): Classifies turns into tiered progress categories (Strong, Medium, Weak) based on file creation, new hypotheses, state changes, file edits, and test activity, outputting a normalized progress score. - Wandering Detector (
WanderingDetector): Detects non-convergent, non-repetitive exploration (low pairwise similarity but low progress over a prolonged turn sequence), recommending corrective actions before the agent exhausts its context window. - Loop Confidence (
LoopConfidenceCalculator): Computes loop confidence scores. Employs nonlinear escalation when similar turns persist, applies proportional decay during productive turns, and enforces a multi-turn cooldown post-compression.
- Strategy Classifier (
StrategyClassifier): Groups sequences of turns into coarse-grained tool categories (Read, Write, Execute, Explore, Delegate, Complete, Meta). - Strategy Memory (
StrategyMemory): Retains a history of strategies tried by the agent. Identifies strategy cycling by checking for exact sequence repetitions or alternating patterns (e.g., A-B-A-B).
- Model Usage Tracker (
ModelUsageTracker): Tracks which model and provider served each turn. If a user switches to a different model, the system detects this change and can force conversation history condensation (summarization) so that the incoming model receives a clean context summary rather than raw history from a model it has no relation to.
- Code Generation: Write code from natural language prompts and specifications.
- Context-Aware Modes: Adapt the assistant's behavior using Code, Architect, Ask, Debug, or Custom modes.
- Refactoring & Debugging: Analyze existing codebases, isolate bugs, and apply fixes.
- Documentation: Generate and maintain inline comments, READMEs, and technical documents.
- MCP Support: Extend functionality using Model Context Protocol (MCP) servers.
airiOS Code tailors its system prompts based on your current task:
- Vibe Mode: For standard development, editing, and file operations.
- Spec Mode: For system design, planning, and structural changes.
- Ask Mode: For querying the codebase, clarifying concepts, and documentation.
- Debug Mode: For tracing errors, examining logs, and diagnosing issues.
- Custom Modes: For defining specialized instructions tailored to your team's specific workflow.
Learn more: Using Modes • Custom Modes
- [Documentation](https://roocodeinc.github.io/airiOS Code-Code/): Guides for installation, configuration, and feature usage.
