cicd-intelligent-recovery
Loop 3 of the Three-Loop Integrated Development System. CI/CD automation with intelligent failure recovery, root cause analysis, and comprehensive quality validation. Receives implementation from Loop 2, feeds failure patterns back to Loop 1. Achieves 100% test success through automated repair and theater validation. v2.0.0 with explicit agent SOPs.
What this skill does
# CI/CD Quality & Debugging Loop (Loop 3)
**Purpose**: Continuous integration with automated failure recovery and authentic quality validation.
**SOP Workflow**: Specification → Research → Planning → Execution → Knowledge
**Output**: 100% test success rate with authentic quality improvements and failure pattern analysis
**Integration**: This is Loop 3 of 3. Receives from `parallel-swarm-implementation` (Loop 2), feeds failure data back to `research-driven-planning` (Loop 1).
**Version**: 2.0.0
**Optimization**: Evidence-based prompting with explicit agent SOPs
---
## When to Use This Skill
Activate this skill when:
- Have complete implementation from Loop 2 (parallel-swarm-implementation)
- Need CI/CD pipeline automation with intelligent recovery
- Require root cause analysis for test failures
- Want automated repair with connascence-aware fixes
- Need validation of authentic quality (no theater)
- Generating failure patterns for Loop 1 feedback
**DO NOT** use this skill for:
- Initial development (use Loop 2 first)
- Manual debugging without CI/CD integration
- Quality checks during development (use Loop 2 theater detection)
---
## Input/Output Contracts
### Input Requirements
```yaml
input:
loop2_delivery_package:
location: .claude/.artifacts/loop2-delivery-package.json
schema:
implementation: object (complete codebase)
tests: object (test suite)
theater_baseline: object (theater metrics from Loop 2)
integration_points: array[string]
validation:
- Must exist and be valid JSON
- Must include theater_baseline for differential analysis
ci_cd_failures:
source: GitHub Actions workflow runs
format: JSON array of failure objects
required_fields: [file, line, column, testName, errorMessage, runId]
github_credentials:
required: gh CLI authenticated
check: gh auth status
```
### Output Guarantees
```yaml
output:
test_success_rate: 100% (guaranteed)
quality_validation:
theater_audit: PASSED (no false improvements)
sandbox_validation: 100% test pass
differential_analysis: improvement metrics
failure_patterns:
location: .claude/.artifacts/loop3-failure-patterns.json
feeds_to: Loop 1 (next iteration)
schema:
patterns: array[failure_pattern]
recommendations: object (planning/architecture/testing)
delivery_package:
location: .claude/.artifacts/loop3-delivery-package.json
contains:
- quality metrics (test success, failures fixed)
- analysis data (root causes, connascence context)
- validation results (theater, sandbox, differential)
- feedback for Loop 1
```
---
## Prerequisites
Before starting Loop 3, ensure Loop 2 completion:
```bash
# Verify Loop 2 delivery package exists
test -f .claude/.artifacts/loop2-delivery-package.json && echo "✅ Ready" || echo "❌ Run parallel-swarm-implementation first"
# Load implementation data
npx claude-flow@alpha memory query "loop2_complete" --namespace "integration/loop2-to-loop3"
# Verify GitHub CLI authenticated
gh auth status || gh auth login
```
---
## 8-Step CI/CD Process Overview
```
Step 1: GitHub Hook Integration (Download CI/CD failure reports)
↓
Step 2: AI-Powered Analysis (Gemini + 7-agent synthesis with Byzantine consensus)
↓
Step 3: Root Cause Detection (Graph analysis + Raft consensus)
↓
Step 4: Intelligent Fixes (Program-of-thought: Plan → Execute → Validate → Approve)
↓
Step 5: Theater Detection Audit (6-agent Byzantine consensus validation)
↓
Step 6: Sandbox Validation (Isolated production-like testing)
↓
Step 7: Differential Analysis (Compare to baseline with metrics)
↓
Step 8: GitHub Feedback (Automated reporting and loop closure)
```
---
## Step 1: GitHub Hook Integration
**Objective**: Download and process CI/CD pipeline failure reports from GitHub Actions.
**Agent Coordination**: Single orchestrator agent manages data collection.
### Configure GitHub Hooks
```bash
# Install GitHub CLI if needed
which gh || brew install gh
# Authenticate
gh auth login
# Configure webhook listener
gh api repos/{owner}/{repo}/hooks \
-X POST \
-f name='web' \
-f active=true \
-f events='["check_run", "workflow_run"]' \
-f config[url]='http://localhost:3000/hooks/github' \
-f config[content_type]='application/json'
```
### Download Failure Reports
```bash
# Get recent workflow runs
gh run list --repo {owner}/{repo} --limit 10 --json conclusion,databaseId \
| jq '.[] | select(.conclusion == "failure")' \
> .claude/.artifacts/failed-runs.json
# Download logs for each failure
cat .claude/.artifacts/failed-runs.json | jq -r '.databaseId' | while read RUN_ID; do
gh run view $RUN_ID --log \
> .claude/.artifacts/failure-logs-$RUN_ID.txt
done
```
### Parse Failure Data
```bash
node <<'EOF'
const fs = require('fs');
const failures = [];
// Parse all failure logs
const logFiles = fs.readdirSync('.claude/.artifacts')
.filter(f => f.startsWith('failure-logs-'));
logFiles.forEach(file => {
const log = fs.readFileSync(`.claude/.artifacts/${file}`, 'utf8');
// Extract structured failure data
const failureMatches = log.matchAll(/FAIL (.+?):(\d+):(\d+)\n(.+?)\n(.+)/g);
for (const match of failureMatches) {
failures.push({
file: match[1],
line: parseInt(match[2]),
column: parseInt(match[3]),
testName: match[4],
errorMessage: match[5],
runId: file.match(/failure-logs-(\d+)/)[1]
});
}
});
fs.writeFileSync(
'.claude/.artifacts/parsed-failures.json',
JSON.stringify(failures, null, 2)
);
console.log(`✅ Parsed ${failures.length} failures`);
EOF
```
**Validation Checkpoint**:
- ✅ Failure data parsed and structured
- ✅ All required fields present (file, line, testName, errorMessage)
---
## Step 2: AI-Powered Analysis
**Objective**: Use Gemini large-context analysis + 7 research agents with Byzantine consensus to examine each failure deeply.
**Evidence-Based Techniques**: Self-consistency, Byzantine consensus, program-of-thought
### Phase 1: Gemini Large-Context Analysis
**Leverage Gemini's 2M token window for full codebase analysis**
```bash
# Analyze failures with full codebase context
/gemini:impact "Analyze CI/CD test failures:
FAILURE DATA:
$(cat .claude/.artifacts/parsed-failures.json)
CODEBASE CONTEXT:
Full repository (all files)
LOOP 2 IMPLEMENTATION:
$(cat .claude/.artifacts/loop2-delivery-package.json)
ANALYSIS OBJECTIVES:
1. Identify cross-file dependencies related to failures
2. Detect failure cascade patterns (root → secondary → tertiary)
3. Analyze what changed between working and failing states
4. Assess system-level architectural impact
5. Identify connascence patterns in failing code
OUTPUT FORMAT:
{
dependency_graph: { nodes: [files], edges: [dependencies] },
cascade_map: { root_failures: [], cascaded_failures: [] },
change_analysis: { changed_files: [], change_impact: [] },
architectural_impact: { affected_systems: [], coupling_issues: [] }
}"
# Store Gemini analysis
cat .claude/.artifacts/gemini-response.json \
> .claude/.artifacts/gemini-analysis.json
```
### Phase 2: Parallel Multi-Agent Deep Dive (Self-Consistency)
**7 parallel agents for cross-validation and consensus**
```javascript
// PARALLEL ANALYSIS AGENTS - Evidence-Based Self-Consistency
[Single Message - Spawn All 7 Analysis Agents]:
// Failure Pattern Research (Dual agents for cross-validation)
Task("Failure Pattern Researcher 1",
`Research similar failures in external sources:
- GitHub issues for libraries we use
- Stack Overflow questions with similar error messages
- Documentation of known issues
Failures to research: $(cat .claude/.artifacts/parsed-failures.json | jq -r '.[].errorMessage')
For each failure:
1. Find similar reported issues
2. Document known solutions with evidence (links, code examples)
3. Note confidence level (high/medium/low)
Store findings: .clRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.