Loading content/handbook/engineering/architecture/design-documents/autodevops_v2/_index.md +101 −1 Original line number Diff line number Diff line --- title: "AutoDevOps v2" status: proposed status: ongoing creation-date: "2025-12-12" authors: [ "@fabiopitino" ] coach: [] Loading Loading @@ -121,6 +121,106 @@ The current AutoDevOps implementation (see [AutoDevOps documentation](https://do - **Outdated dependency management**: AutoDevOps uses some outdated dependencies (for example, PostgreSQL version) creating compatibility issues, and potential security gaps. ## Detailed components Implement AI-assisted CI/CD pipeline generation using a **Flow + Agent** architecture where a foundational CI Pipeline Agent provides domain expertise while referencing GitLab CI/CD documentation for best practices, and a Flow orchestrates the user experience. **1. CI Pipeline Agent (Foundational)** - Generic, reusable component providing CI/CD domain expertise - Analyzes projects (language, framework, test files, deployment targets) - Generates pipeline configurations based on best practices - References CI/CD documentation for recommendations (not hardcoded) - Can be leveraged by multiple flows and use cases - Adapts automatically as best practices and guidelines evolve **2. Flow: Build CI Config (Foundational)** - Opinionated, guided workflow for first-time pipeline creation - Orchestrates user journey: context gathering → generation → review → approval - Triggered by `Generate .gitlab-ci.yml with AI` button in UI - Uses CI Pipeline Agent internally for heavy lifting - Reduces cognitive load through constrained choices and smart defaults - Provides clear entry point for novice users **3. CI/CD Documentation (Best Practices)** - Single source of truth for CI/CD recommendations - Agent references docs for: recommended pipeline structure, job configuration best practices, security scanning, performance optimization, tier-specific capabilities - Decouples best practices from agent logic - Enables rapid iteration on recommendations without agent retraining **4. CI Language Service** - Provides syntax validation, autocomplete, and hover documentation - Handles YAML schema validation - Provides visualization of resulting pipeline in real-time - Complements agent by focusing on syntax, not logic - Enables real-time feedback in IDE **5. IDE Integration (WebIDE/VSCode)** - Displays generated pipeline configuration - Integrates Language Service for editing support - Links to documentation for learning - Shows real-time visualization (future enhancement) ### User Flow 1. User clicks `Generate .gitlab-ci.yml with AI` button 1. Flow initiates and gathers context (project analysis, user preferences) 1. Flow invokes CI Pipeline Agent with gathered context 1. Agent references CI/CD documentation for best practices 1. Agent generates pipeline configuration with explanations 1. Flow presents result to user for review/approval 1. User can open IDE to edit with Language Service support 1. IDE displays documentation links and visualization ### Benefits - **Flexibility:** Agent remains generic and adaptable to customer needs - **Maintainability:** Best practices centralized in documentation, not code - **Reusability:** Agent can power multiple features (flows, chat commands, IDE suggestions) - **Scalability:** Documentation updates automatically improve agent recommendations - **User Experience:** Flow provides guided, opinionated experience for novices - **Future-proof:** Architecture supports WebIDE agent integration when available ```mermaid graph TB subgraph User["User Interface"] Button["Generate .gitlab-ci.yml Button"] IDE["IDE<br/>(WebIDE/VSCode)"] Chat[Duo Agentic Chat] end subgraph AI["AI Components"] Flow["Flow: Build CI Config<br/>(Orchestrates workflow)"] Agent["CI Pipeline Agent<br/>(Domain expertise)"] end Docs["CI/CD Documentation<br/>(Best practices & guidelines)"] LSP["CI Language Service<br/>(Syntax, validation, autocomplete)"] Button -->|triggers| Flow Flow -->|uses| Agent Agent -->|references| Docs Agent -->|generates| IDE IDE -->|uses| LSP Chat -->|uses| Agent Flow -->|provides context to| Agent style Button fill:#e1f5ff style Chat fill:#e1f5ff style IDE fill:#e1f5ff style Flow fill:#fff3e0 style Agent fill:#fff3e0 style Docs fill:#f3e5f5 style LSP fill:#f3e5f5 ``` ## Architecture Decision Records ### ADR 1: Implement core logic as a Foundational Agent Loading Loading
content/handbook/engineering/architecture/design-documents/autodevops_v2/_index.md +101 −1 Original line number Diff line number Diff line --- title: "AutoDevOps v2" status: proposed status: ongoing creation-date: "2025-12-12" authors: [ "@fabiopitino" ] coach: [] Loading Loading @@ -121,6 +121,106 @@ The current AutoDevOps implementation (see [AutoDevOps documentation](https://do - **Outdated dependency management**: AutoDevOps uses some outdated dependencies (for example, PostgreSQL version) creating compatibility issues, and potential security gaps. ## Detailed components Implement AI-assisted CI/CD pipeline generation using a **Flow + Agent** architecture where a foundational CI Pipeline Agent provides domain expertise while referencing GitLab CI/CD documentation for best practices, and a Flow orchestrates the user experience. **1. CI Pipeline Agent (Foundational)** - Generic, reusable component providing CI/CD domain expertise - Analyzes projects (language, framework, test files, deployment targets) - Generates pipeline configurations based on best practices - References CI/CD documentation for recommendations (not hardcoded) - Can be leveraged by multiple flows and use cases - Adapts automatically as best practices and guidelines evolve **2. Flow: Build CI Config (Foundational)** - Opinionated, guided workflow for first-time pipeline creation - Orchestrates user journey: context gathering → generation → review → approval - Triggered by `Generate .gitlab-ci.yml with AI` button in UI - Uses CI Pipeline Agent internally for heavy lifting - Reduces cognitive load through constrained choices and smart defaults - Provides clear entry point for novice users **3. CI/CD Documentation (Best Practices)** - Single source of truth for CI/CD recommendations - Agent references docs for: recommended pipeline structure, job configuration best practices, security scanning, performance optimization, tier-specific capabilities - Decouples best practices from agent logic - Enables rapid iteration on recommendations without agent retraining **4. CI Language Service** - Provides syntax validation, autocomplete, and hover documentation - Handles YAML schema validation - Provides visualization of resulting pipeline in real-time - Complements agent by focusing on syntax, not logic - Enables real-time feedback in IDE **5. IDE Integration (WebIDE/VSCode)** - Displays generated pipeline configuration - Integrates Language Service for editing support - Links to documentation for learning - Shows real-time visualization (future enhancement) ### User Flow 1. User clicks `Generate .gitlab-ci.yml with AI` button 1. Flow initiates and gathers context (project analysis, user preferences) 1. Flow invokes CI Pipeline Agent with gathered context 1. Agent references CI/CD documentation for best practices 1. Agent generates pipeline configuration with explanations 1. Flow presents result to user for review/approval 1. User can open IDE to edit with Language Service support 1. IDE displays documentation links and visualization ### Benefits - **Flexibility:** Agent remains generic and adaptable to customer needs - **Maintainability:** Best practices centralized in documentation, not code - **Reusability:** Agent can power multiple features (flows, chat commands, IDE suggestions) - **Scalability:** Documentation updates automatically improve agent recommendations - **User Experience:** Flow provides guided, opinionated experience for novices - **Future-proof:** Architecture supports WebIDE agent integration when available ```mermaid graph TB subgraph User["User Interface"] Button["Generate .gitlab-ci.yml Button"] IDE["IDE<br/>(WebIDE/VSCode)"] Chat[Duo Agentic Chat] end subgraph AI["AI Components"] Flow["Flow: Build CI Config<br/>(Orchestrates workflow)"] Agent["CI Pipeline Agent<br/>(Domain expertise)"] end Docs["CI/CD Documentation<br/>(Best practices & guidelines)"] LSP["CI Language Service<br/>(Syntax, validation, autocomplete)"] Button -->|triggers| Flow Flow -->|uses| Agent Agent -->|references| Docs Agent -->|generates| IDE IDE -->|uses| LSP Chat -->|uses| Agent Flow -->|provides context to| Agent style Button fill:#e1f5ff style Chat fill:#e1f5ff style IDE fill:#e1f5ff style Flow fill:#fff3e0 style Agent fill:#fff3e0 style Docs fill:#f3e5f5 style LSP fill:#f3e5f5 ``` ## Architecture Decision Records ### ADR 1: Implement core logic as a Foundational Agent Loading