> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/SynkraAI/aiox-core/llms.txt
> Use this file to discover all available pages before exploring further.

# Autonomous Development Engine (ADE)

> Transform requirements into production code with AIOX's autonomous development system

## What is ADE?

The **Autonomous Development Engine (ADE)** is AIOX's revolutionary system for autonomous software development. It transforms vague requirements into production-ready code through structured pipelines and specialized AI agents.

<Info>
  ADE enables truly autonomous development: from gathering requirements to shipping working code, with built-in recovery, quality gates, and learning.
</Info>

## The 7 ADE Epics

ADE is composed of seven interconnected systems that work together to enable autonomous development:

<CardGroup cols={2}>
  <Card title="Epic 1: Worktree Manager" icon="folder-tree">
    Isolates work in Git worktrees for safe parallel development
  </Card>

  <Card title="Epic 2: Migration V2→V3" icon="arrow-right-arrow-left">
    Migrates agents to autoClaude V3 format
  </Card>

  <Card title="Epic 3: Spec Pipeline" icon="pipe">
    Transforms requirements into executable specifications
  </Card>

  <Card title="Epic 4: Execution Engine" icon="play">
    Executes specs with 13-step Coder Agent workflow
  </Card>

  <Card title="Epic 5: Recovery System" icon="arrows-rotate">
    Automatically recovers from failures
  </Card>

  <Card title="Epic 6: QA Evolution" icon="shield-check">
    Structured 10-phase quality review
  </Card>

  <Card title="Epic 7: Memory Layer" icon="brain">
    Learns and documents patterns for future use
  </Card>
</CardGroup>

## Architecture Flow

```mermaid theme={null}
graph LR
    A[User Request] --> B[Spec Pipeline]
    B --> C[Execution Engine]
    C --> D[Working Code]
    C --> E[Recovery System]
    E --> C
    D --> F[QA Evolution]
    F --> G[Memory Layer]
    G --> B
```

## Epic 1: Worktree Manager

Isolates development work in separate Git worktrees, enabling parallel development without branch conflicts.

### Commands (@devops)

<CodeGroup>
  ```bash Create Worktree theme={null}
  @devops *create-worktree STORY-42
  ```

  ```bash List Worktrees theme={null}
  @devops *list-worktrees
  ```

  ```bash Merge Worktree theme={null}
  @devops *merge-worktree STORY-42
  ```

  ```bash Cleanup theme={null}
  @devops *cleanup-worktrees
  ```
</CodeGroup>

### Benefits

* **Safe Isolation**: Each story gets its own working directory
* **Parallel Work**: Multiple stories can be developed simultaneously
* **Easy Cleanup**: Remove completed worktrees without affecting main branch

## Epic 2: Migration V2→V3

Migrates agent definitions from autoClaude V2 to the new V3 format with enhanced capabilities.

### Commands (@devops)

<CodeGroup>
  ```bash Inventory Assets theme={null}
  @devops *inventory-assets
  ```

  ```bash Analyze Dependencies theme={null}
  @devops *analyze-paths
  ```

  ```bash Migrate Single Agent theme={null}
  @devops *migrate-agent architect
  ```

  ```bash Batch Migration theme={null}
  @devops *migrate-batch
  ```
</CodeGroup>

### autoClaude V3 Format

```yaml theme={null}
autoClaude:
  version: '3.0'
  migratedAt: '2026-01-29T02:24:10.724Z'

  specPipeline:
    canGather: boolean      # @pm
    canAssess: boolean      # @architect
    canResearch: boolean    # @analyst
    canWrite: boolean       # @pm
    canCritique: boolean    # @qa

  execution:
    canCreatePlan: boolean  # @architect
    canCreateContext: boolean # @architect
    canExecute: boolean     # @dev
    canVerify: boolean      # @dev

  recovery:
    canTrackAttempts: boolean # @dev
    canRollback: boolean    # @dev

  qa:
    canReview: boolean      # @qa
    canRequestFix: boolean  # @qa

  memory:
    canCaptureInsights: boolean # @dev
    canExtractPatterns: boolean # @analyst
    canDocumentGotchas: boolean # @dev
```

## Epic 3: Spec Pipeline

Transforms vague user requirements into detailed, executable specifications through a multi-agent collaboration process.

### Pipeline Phases

<Steps>
  <Step title="Gather Requirements">
    **@pm** collects and documents user needs

    ```bash theme={null}
    @pm *gather-requirements
    ```
  </Step>

  <Step title="Assess Complexity">
    **@architect** evaluates technical complexity and identifies risks

    ```bash theme={null}
    @architect *assess-complexity
    ```
  </Step>

  <Step title="Research Dependencies">
    **@analyst** investigates required libraries, APIs, and patterns

    ```bash theme={null}
    @analyst *research-deps
    ```
  </Step>

  <Step title="Write Specification">
    **@pm** creates detailed executable spec

    ```bash theme={null}
    @pm *write-spec
    ```
  </Step>

  <Step title="Critique & Approve">
    **@qa** reviews and approves or requests changes

    ```bash theme={null}
    @qa *critique-spec
    ```
  </Step>
</Steps>

### Spec Output

The pipeline produces a `spec.yaml` file containing:

* **User Story**: What and why
* **Acceptance Criteria**: Success conditions
* **Technical Approach**: Implementation strategy
* **Dependencies**: Required packages and APIs
* **Risks**: Potential issues and mitigations
* **Subtasks**: Breakdown of work

## Epic 4: Execution Engine

Executes approved specs using the **13-Step Coder Agent** workflow with mandatory self-critique.

### The 13 Steps

<AccordionGroup>
  <Accordion title="Steps 1-3: Context Loading">
    1. **Load Context** - Read project structure, tech stack
    2. **Read Implementation Plan** - Load `implementation.yaml`
    3. **Understand Current Subtask** - Parse requirements
  </Accordion>

  <Accordion title="Steps 4-5: Code Implementation">
    4. **Plan Approach** - Design solution
    5. **Write Code** - Implement solution
       * **5.5 SELF-CRITIQUE** (mandatory) - Review own code
  </Accordion>

  <Accordion title="Steps 6-9: Testing & Quality">
    6. **Run Tests** - Execute test suite
       * **6.5 SELF-CRITIQUE** (mandatory) - Evaluate test results
    7. **Fix Issues** - Address failing tests
    8. **Run Linter** - Check code style
    9. **Fix Lint Issues** - Resolve violations
  </Accordion>

  <Accordion title="Steps 10-13: Completion">
    10. **Verify Manually** - Smoke test functionality
    11. **Update Plan Status** - Mark subtask complete
    12. **Commit Changes** - Git commit with message
    13. **Signal Completion** - Notify orchestrator
  </Accordion>
</AccordionGroup>

### Commands

<CodeGroup>
  ```bash Create Implementation Plan theme={null}
  @architect *create-plan
  ```

  ```bash Generate Context theme={null}
  @architect *create-context
  ```

  ```bash Execute Subtask theme={null}
  @dev *execute-subtask 1.1
  ```
</CodeGroup>

### Self-Critique

The Execution Engine enforces **mandatory self-critique** at steps 5.5 and 6.5:

```yaml theme={null}
selfCritique:
  required: true
  checklistRef: 'self-critique-checklist.md'
  phases:
    - code_quality
    - test_coverage
    - edge_cases
    - error_handling
```

## Epic 5: Recovery System

Automatically detects and recovers from failures during subtask execution.

### Recovery Flow

```mermaid theme={null}
graph TD
    A[Subtask Fails] --> B[Track Attempt]
    B --> C{Attempts < 3?}
    C -->|Yes| D[Retry]
    C -->|No| E[Stuck Detection]
    E --> F[Rollback]
    F --> G[Escalate to Human]
    D --> H{Success?}
    H -->|No| B
    H -->|Yes| I[Continue]
```

### Commands (@dev)

<CodeGroup>
  ```bash Track Attempt theme={null}
  @dev *track-attempt
  ```

  ```bash Rollback theme={null}
  @dev *rollback
  ```

  ```bash View Recovery Status theme={null}
  @dev *track-attempt --status
  ```
</CodeGroup>

### Automatic Features

* **Attempt Tracking**: Records each implementation try
* **Stuck Detection**: Identifies repeating failures
* **Smart Rollback**: Returns to last known good state
* **Human Escalation**: Notifies when intervention needed

## Epic 6: QA Evolution

Structured 10-phase quality review process that ensures code quality before shipping.

### 10 Review Phases

<Steps>
  <Step title="Setup & Context Loading">
    Load story, specs, and changed files
  </Step>

  <Step title="Code Quality Analysis">
    Check patterns, practices, architecture
  </Step>

  <Step title="Test Coverage Review">
    Verify tests exist and are comprehensive
  </Step>

  <Step title="Security Scan">
    Identify vulnerabilities and risks
  </Step>

  <Step title="Performance Check">
    Analyze for bottlenecks and inefficiencies
  </Step>

  <Step title="Documentation Audit">
    Ensure code is well-documented
  </Step>

  <Step title="Accessibility Review">
    Check WCAG compliance for UI changes
  </Step>

  <Step title="Integration Points Check">
    Verify API contracts and dependencies
  </Step>

  <Step title="Edge Cases & Error Handling">
    Test boundary conditions and failures
  </Step>

  <Step title="Final Summary & Decision">
    PASS, CONCERNS, FAIL, or WAIVED
  </Step>
</Steps>

### Commands (@qa)

<CodeGroup>
  ```bash Full Review theme={null}
  @qa *review-build STORY-42
  ```

  ```bash Request Fix theme={null}
  @qa *request-fix "Missing error handling in API call"
  ```

  ```bash Verify Fix theme={null}
  @qa *verify-fix
  ```
</CodeGroup>

### QA Decisions

| Decision     | Meaning                  | Next Action               |
| ------------ | ------------------------ | ------------------------- |
| **PASS**     | Ready to ship            | Merge to main             |
| **CONCERNS** | Approved with follow-ups | Ship with tech debt story |
| **FAIL**     | Needs fixes              | Return to @dev            |
| **WAIVED**   | Bypass authorized        | Requires @po approval     |

## Epic 7: Memory Layer

Persistent memory system that captures and reuses patterns, insights, and gotchas.

### Memory Types

<CardGroup cols={2}>
  <Card title="Insights" icon="lightbulb">
    Discoveries during development sessions
  </Card>

  <Card title="Patterns" icon="code">
    Reusable code patterns extracted from implementations
  </Card>

  <Card title="Gotchas" icon="triangle-exclamation">
    Known pitfalls and how to avoid them
  </Card>

  <Card title="Decisions" icon="gavel">
    Architectural and technical decisions
  </Card>
</CardGroup>

### Commands

<CodeGroup>
  ```bash Capture Insights (@dev) theme={null}
  @dev *capture-insights
  ```

  ```bash List Gotchas (@dev) theme={null}
  @dev *list-gotchas
  ```

  ```bash Extract Patterns (@analyst) theme={null}
  @analyst *extract-patterns
  ```

  ```bash Map Codebase (@architect) theme={null}
  @architect *map-codebase
  ```
</CodeGroup>

### Memory Structure

```
.aiox-core/memory/
├── insights/
│   ├── 2026-01-15-auth-flow.md
│   └── 2026-01-20-performance.md
├── patterns/
│   ├── api-error-handling.md
│   └── state-management.md
├── gotchas/
│   ├── async-race-conditions.yaml
│   └── dependency-conflicts.yaml
└── decisions/
    ├── tech-stack.md
    └── architecture.md
```

## Complete ADE Workflow

Here's a full example of using all ADE epics together:

<Steps>
  <Step title="Create Spec">
    ```bash theme={null}
    @pm *gather-requirements
    @architect *assess-complexity
    @analyst *research-deps
    @pm *write-spec
    @qa *critique-spec
    ```
  </Step>

  <Step title="Prepare Execution">
    ```bash theme={null}
    @devops *create-worktree STORY-42
    @architect *create-plan
    @architect *create-context
    ```
  </Step>

  <Step title="Execute Subtasks">
    ```bash theme={null}
    @dev *execute-subtask 1.1
    @dev *execute-subtask 1.2
    # Recovery kicks in automatically if needed
    ```
  </Step>

  <Step title="QA Review">
    ```bash theme={null}
    @qa *review-build STORY-42
    # If issues found:
    @qa *request-fix "Issue description"
    @dev *apply-qa-fix
    @qa *verify-fix
    ```
  </Step>

  <Step title="Capture Learning">
    ```bash theme={null}
    @dev *capture-insights
    @analyst *extract-patterns
    ```
  </Step>

  <Step title="Merge & Ship">
    ```bash theme={null}
    @devops *merge-worktree STORY-42
    @devops *cleanup-worktrees
    ```
  </Step>
</Steps>

## QA Gates

Each Epic has a quality gate that must pass before proceeding:

```bash theme={null}
@qa *gate epic-{N}-{name}
```

**Possible Outcomes:**

* **PASS** - Next epic unlocked
* **CONCERNS** - Approved with follow-ups
* **FAIL** - Return for fixes
* **WAIVED** - Bypass authorized by @po

## Related Documentation

<CardGroup cols={2}>
  <Card title="Agent Reference" icon="users" href="/agents/overview">
    See all agent capabilities and commands
  </Card>

  <Card title="Custom Agents" icon="wrench" href="/advanced/custom-agents">
    Create your own agents with ADE capabilities
  </Card>

  <Card title="Squads System" icon="people-group" href="/advanced/squads">
    Organize agents into specialized teams
  </Card>

  <Card title="IDE Integration" icon="code" href="/advanced/ide-integration">
    Set up ADE in your development environment
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Subtask Fails Repeatedly">
    ```bash theme={null}
    # Check attempt history
    @dev *track-attempt --status

    # Rollback to last good state
    @dev *rollback --hard

    # Try alternative approach
    @dev *execute-subtask 2.1 --approach alternative
    ```
  </Accordion>

  <Accordion title="Spec Not Approved">
    ```bash theme={null}
    # View critique feedback
    cat docs/stories/STORY-42/spec-critique.json

    # Refine spec
    @pm *write-spec --iterate

    # Re-submit
    @qa *critique-spec
    ```
  </Accordion>

  <Accordion title="Worktree Conflicts">
    ```bash theme={null}
    # List active worktrees
    @devops *list-worktrees

    # Resolve conflicts
    @devops *merge-worktree STORY-42 --resolve

    # Cleanup
    @devops *cleanup-worktrees
    ```
  </Accordion>
</AccordionGroup>

<Info>
  **Version:** 1.0.0 | **Status:** Production Ready ✅
</Info>
