Skip to content
Testing
Command

/aqe-analyze

Analyze test coverage, identify gaps, and optimize coverage strategy using sublinear algorithms

From plugin
agentic-qe
534149 skills169 agents149 commands1 MCP
> /plugin marketplace add proffesor-for-testing/agentic-qe
> /plugin install agentic-qe-fleet@agentic-qe

Command definition

aqe-analyze.md
name: aqe-analyze
description: Analyze test coverage, identify gaps, and optimize coverage strategy using sublinear algorithms

AQE Analyze Coverage

Analyze test coverage, identify gaps, and use sublinear algorithms to optimize coverage strategy.

Usage

aqe analyze [target] [options]
# or
/aqe-analyze [target] [options]

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | `target` | string | `coverage` | Analysis type: coverage, quality, gaps, trends, risk | | `--path` | path | `./src` | Source code path to analyze | | `--baseline` | path | - | Baseline coverage file for comparison | | `--threshold` | number | `95` | Minimum coverage threshold | | `--sublinear` | boolean | `true` | Use sublinear optimization algorithms | | `--format` | string | `text` | Output format: text, json, html, markdown | | `--output` | path | `stdout` | Output file path | | `--diff` | boolean | `false` | Show coverage diff from baseline |

Examples

Basic Coverage Analysis

aqe analyze coverage

Analyzes current test coverage for the entire codebase.

Gap Identification

aqe analyze gaps --path src/services --threshold 98

Identifies coverage gaps in the services directory with high threshold.

Trend Analysis

aqe analyze trends --baseline coverage-baseline.json --diff

Compares current coverage against baseline and shows changes.

Risk Assessment

aqe analyze risk --sublinear --format html --output risk-report.html

Generates HTML risk assessment report using sublinear algorithms.

Quality Analysis

aqe analyze quality --path tests/ --format json

Analyzes test quality metrics including flakiness and reliability.

Integration with Claude Code

Spawning Coverage Analyzer Agent

// Use Claude Code's Task tool to spawn the coverage analyzer agent
Task("Analyze coverage gaps", `
  Perform comprehensive coverage analysis:
  - Use sublinear algorithms for O(log n) performance
  - Identify critical coverage gaps
  - Prioritize gaps by risk and impact
  - Generate optimization recommendations

  Store analysis results in memory: aqe/coverage-analysis/results
  Coordinate with test generator to fill gaps.
`, "qe-coverage-analyzer")

Coordinated Analysis Workflow

// Analyze coverage and generate missing tests
[Single Message]:
  Task("Analyze coverage gaps", "Find critical gaps using sublinear algorithms", "qe-coverage-analyzer")
  Task("Generate missing tests", "Create tests for identified gaps", "qe-test-generator")

  TodoWrite({ todos: [
    {content: "Analyze coverage data", status: "in_progress", activeForm: "Analyzing coverage"},
    {content: "Identify critical gaps", status: "in_progress", activeForm: "Identifying gaps"},
    {content: "Generate tests for gaps", status: "pending", activeForm: "Generating tests"},
    {content: "Validate coverage improvement", status: "pending", activeForm: "Validating improvement"}
  ]})

Agent Coordination

Primary Agent

  • **qe-coverage-analyzer**: Main agent responsible for coverage analysis

Supporting Agents

  • **qe-test-generator**: Generates tests for identified gaps
  • **qe-quality-gate**: Validates coverage against thresholds

Coordination Flow

1. Pre-Task Hook
   ├─> Retrieve current coverage data
   ├─> Retrieve historical baseline
   └─> Load source code analysis

2. Coverage Analysis
   ├─> Parse coverage data using sublinear algorithms
   ├─> Identify coverage gaps with priority ranking
   ├─> Calculate coverage metrics and trends
   ├─> Generate optimization recommendations
   └─> Perform risk assessment

3. Post-Task Hook
   ├─> Store analysis results
   ├─> Update coverage gaps list
   ├─> Store recommendations
   ├─> Train neural patterns
   └─> Notify fleet of findings

Memory Operations

Input Memory Keys

# Retrieve current coverage data
npx ruflo@3.76.0 memory retrieve --key "aqe/coverage/current"

# Retrieve coverage baseline
npx ruflo@3.76.0 memory retrieve --key "aqe/coverage/baseline"

# Retrieve source code analysis
npx ruflo@3.76.0 memory retrieve --key "aqe/source-code"

Output Memory Keys

# Store analysis results
npx ruflo@3.76.0 memory store \
  --key "aqe/coverage-analysis/results" \
  --value '{"coverage": 93.5, "gaps": 12, "critical": 3}'

# Store identified gaps
npx ruflo@3.76.0 memory store \
  --key "aqe/coverage-gaps" \
  --value '[{"file": "auth.ts", "line": 45, "priority": "critical"}]'

# Store recommendations
npx ruflo@3.76.0 memory store \
  --key "aqe/coverage-recommendations" \
  --value '{"action": "generate", "targets": ["auth.ts:45-60"]}'

Hooks and Coordination

Pre-Task Hook

# One id per run; post-task below records the outcome against it
ANALYSIS_ID="aqe-analyze-$(date +%s)"
npx ruflo@3.76.0 hooks pre-task \
  --task-id "${ANALYSIS_ID}" \
  --description "Analyze coverage for ${target}"

Post-Task Hook

# Set TASK_SUCCEEDED to true or false from the actual result; results go to `memory store` above
npx ruflo@3.76.0 hooks post-task \
  --task-id "${ANALYSIS_ID:?run the pre-task block first, in the same shell}" \
  --success "${TASK_SUCCEEDED:?set to true or false}" \
  --agent "qe-coverage-specialist" \
  --task "Analyze coverage for ${target}"

Notify Fleet

npx ruflo@3.76.0 hooks notify \
  --message "Coverage analysis: ${COVERAGE_PCT}% with ${GAPS_COUNT} gaps"

Expected Outputs

Success Output

📊 Analyzing coverage...
🔍 Running sublinear coverage analysis...

📈 Coverage Analysis Results:
   Current Coverage: 93.5%
   Threshold: 95%
   Total Gaps: 12
   Critical Gaps: 3

🎯 Top Coverage Gaps:
   - src/services/auth.ts:45-60 (authentication flow)
   - src/utils/validators.ts:23-35 (input validation)
   - src/api/users.ts:102-115 (error handling)

💡 Recommendations:
   1. Generate 5 tests for authentication
Read more
@proffesor-for-testing
Ships withagentic-qe

Quality engineering tools for your coding agent. Generate tests, investigate coverage gaps, analyze flaky behavior and coordinate quality checks across the software lifecycle. Keep the findings close to the code and use them to make a better quality decision.

534119 skills169 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
534
Star history of proffesor-for-testing/agentic-qe on GitHub, a chart by star-history.com

Other commands on agentic-qe.

More commands from other plugins.

bkit

bkit

Command

bkit plugin help - Show all available bkit functions. Workaround for skills autocomplete issue. Use "/bkit" or just type "bkit…

bkit4d605
@popup-studio-ai@popup-studio-aiInstall Command
review

review

Command

Open the Canary session viewer and triage a recorded session.

canary4w500
@0xnyn@0xnynInstall Command