Files
proffesor-for-testing__agen…/docs/templates/optimized-skill-template.md
Dragan Spiridonov 1e3fbb5ea8 release: v2.1.0 - Comprehensive QX Analysis & Skills Optimization (#107)
* SwarmMemoryManager Refactoring Plan

* fix: add missing directories to npm package (v1.9.3)

Added templates/, .claude/helpers/, and docs/reference/ to package.json
files array. These were missing from the npm distribution, causing
`aqe init` to fail with "Template file not found" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* checkpoint improvements

* fix: critical memory/learning system fixes for v1.9.4

## Critical Fixes
- Vector embeddings now stored correctly (was storing NULL)
- SQL parameter style fixed for agentdb's SqlJsDatabase wrapper
- HNSW index schema mismatch resolved with pattern_id column
- Hooks now save to correct database (.agentic-qe/agentdb.db)

## New Features
- Added 5 SwarmMemoryManager methods for learning data retrieval:
  - getBestAction() - Q-learning best action selection
  - getRecentLearningExperiences() - Recent experience retrieval
  - getLearningExperiencesByTaskType() - Task-filtered experiences
  - getHighRewardExperiences() - Successful experience extraction
  - getLearningStats() - Aggregate learning statistics
- Added comprehensive integration test for memory/learning loop
- Added RuVector pattern store integration (experimental)

## Technical Details
- Vector embeddings: 384 dimensions × 4 bytes = 1,536 bytes per pattern
- All 12 integration tests pass
- HNSW index: 150x faster vector search enabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: move ARM64-only ruvector packages to optionalDependencies

Fixes CI failures caused by platform-specific dependencies:
- @ruvector/node-linux-arm64-gnu (ARM64 only)
- ruvector-core-linux-arm64-gnu (ARM64 only)

These packages caused npm ci to fail on x64 CI runners with:
"EBADPLATFORM - wanted linux/arm64, current linux/x64"

Solution: Move ARM64 packages to optionalDependencies and add
x64 variants for cross-platform compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: regenerate package-lock.json with x64 ruvector packages

Updates lockfile to include optional x64 platform packages for
CI compatibility:
- @ruvector/node-linux-x64-gnu@0.1.17
- ruvector-core-linux-x64-gnu@0.1.15

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: replace fake QUIC with proper implementation and clean up skills manifest

QUIC Transport:
- Remove fake HTTP/2-based QUICTransport.ts that pretended to be QUIC
- Add proper QUIC implementation via Rust/WASM (@agentic-flow/quic-wasm)
- Add WebSocket fallback transport for when WASM unavailable
- Add dedicated type declarations for optional WASM module
- Features: 0-RTT connection, stream multiplexing, TLS 1.3 built-in

Skills Manifest:
- Rewrite skills-manifest.json with only QE skills (41 skills)
- Remove Claude Flow platform skills (agentdb-*, flow-nexus-*, github-*, etc.)
- Organize into proper categories: qe-core, testing-methodologies, etc.

Bug Fixes:
- Fix UnifiedMemoryCoordinator.ts TypeScript errors
- Use Logger.getInstance() instead of private constructor
- Use swarmMemory.query() instead of non-existent list() method
- Use correct close() method signatures for backends

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add QX Partner agent, compact subagents, fix CLAUDE.md dynamic counts

- Add QX Partner agent for Quality Experience analysis combining QA + UX perspectives
- Compact 9 subagent definitions to ~80 lines each (88% reduction)
- Fix CLAUDE.md template to dynamically count agents (including subagents) and skills
- Move CLAUDE.md creation after parallel phases for accurate counts
- Remove 'Production-Ready' claim from README and CHANGELOG
- Clean up backup files and move docs to proper directory

Initialization now correctly reports:
- 31 QE Agents (20 main + 11 subagents)
- 53 QE Skills
- 8 Slash Commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve CI failures and security alert #36

- Replace MD5 with SHA-256 for ETag calculation (security alert #36)
- Fix CRLF line endings in shell scripts causing parse errors
- Remove 'local' keyword from for-loop in test-integration-batched.sh
- Use dynamic process.cwd() instead of hardcoded path in jest.config.js
- Enhance quality-gate.ts to parse test logs when results file missing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Complete Agentic QE Fleet v2.1 implementation (closes #101)

## Implemented Features

### Error Recovery Enhancement (Task 1.3)
- CircuitBreaker class with state management (CLOSED/OPEN/HALF_OPEN)
- RetryStrategy with exponential/linear/constant backoff
- RecoveryOrchestrator with 6 recovery strategies
- Transport fallback mechanisms

### Dynamic Skill Loader (Task 2.2)
- Metadata-only initial loading (98% token reduction)
- On-demand full skill retrieval
- LRU caching with configurable TTL (30min default)
- Preload suggestions for critical workflows

### Swarm Learning Optimizer (Task 4.1)
- Topology recommendation engine (hierarchical/mesh/ring/star)
- Agent allocation with capability matching and load balancing
- Bottleneck detection (agent/memory/coordination/IO)
- Real-time performance adjustments
- Added getLatestRecommendation() method

### Workflow Orchestrator (Task 4.2)
- AdaptiveScheduler with dynamic strategy selection
- Priority-based task queue with age boosting
- Task dependency resolution
- Work stealing and backpressure handling
- Added getQueueDepth() and getStatus() methods

### Unified Memory Coordinator (Task 4.3)
- Consolidated memory managers (SQLite, AgentDB, Vector, JSON)
- Automatic failover chain with health monitoring
- Batch operations and namespace isolation
- Periodic sync between backends

### SwarmCoordinator Improvements
- Real CPU utilization tracking via process.cpuUsage()
- Queue depth from WorkflowOrchestrator
- Optimizer recommendations in feedback data
- Calculated average complexity from metrics

## Additional Changes
- Migration documentation and test restructuring plan
- GitHub issue templates and workflows
- Test suite improvements and cleanup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: optimize 38 QE skills with agent-focused format (#102)

- Add enhanced YAML frontmatter (tokenEstimate, agents, tags, etc.)
- Add <default_to_action> blocks for immediate actionable guidance
- Add Quick Reference Cards with tables for at-a-glance info
- Add Agent Integration examples using Task() pattern
- Add Agent Coordination Hints (memory namespace + fleet coordination)
- Condense content optimized for agent consumption
- Reduce total token footprint by ~65% across skills

Skills updated:
- Core QE: agentic-quality-engineering, holistic-testing-pact
- Testing Types: api-testing, chaos-engineering, compatibility, compliance,
  contract, database, exploratory, localization, mobile, mutation,
  performance, regression, security, visual-testing
- Methodologies: tdd-london-chicago, xp-practices, context-driven,
  risk-based, shift-left, shift-right
- Analysis: code-review-quality, quality-metrics, test-design-techniques
- Strategy: test-automation-strategy, test-data-management,
  test-environment-management, test-reporting-analytics
- CI/CD: cicd-pipeline-qe-orchestrator, accessibility-testing
- Communication: brutal-honesty-review, bug-reporting-excellence,
  consultancy-practices, sherlock-review, six-thinking-hats, technical-writing
- Refactoring: refactoring-patterns

Also includes: package.json updates, docs/optimization/, docs/templates/,
scripts/validate-skill-optimization.ts

Skipped: testability-scoring (pending PR from @fndlalit)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* release: v2.1.0 - Comprehensive QX Analysis & Skills Optimization

## Summary
- Comprehensive QX Analysis with 23+ heuristics (PR #104 by @fndlalit)
- 38 QE Skills optimized with agent-focused format (PR #102)
- Testability Scoring skill v2.1 with optimized format
- QX Partner Agent v2.1 with enhanced capabilities
- Fix MCP SDK compatibility for @modelcontextprotocol/sdk bump (PR #105)

## Changes
- .claude/agents/qx-partner.md: Updated to v2.1 with domain-specific detection
- .claude/skills/testability-scoring/SKILL.md: Optimized format (59% token reduction)
- src/mcp/server.ts: Removed deprecated 'description' field for MCP SDK compatibility
- package.json: Bumped version to 2.1.0
- README.md: Updated version and release notes
- CHANGELOG.md: Added v2.1.0 release notes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 11:07:46 +01:00

13 KiB

name, description, category, priority, tokenEstimate, agents, implementation_status, optimization_version, last_optimized, dependencies, quick_reference_card, tags
name description category priority tokenEstimate agents implementation_status optimization_version last_optimized dependencies quick_reference_card tags
skill-name-kebab-case Concise one-sentence description of what this skill does and when to use it. Maximum 200 characters. qe-core|testing-methodologies|test-design|specialized-testing|analysis-review|infrastructure|development-practices|bug-management critical|high|medium|low 1200
qe-agent-1
qe-agent-2
optimized 1.0 2025-12-02
dependency-skill-1
dependency-skill-2
true
tag1
tag2
tag3

Skill Name

<default_to_action> When [trigger/context] is requested:

  1. ACTION VERB: First critical step with clear outcome
  2. ACTION VERB: Second step with specific deliverable
  3. ACTION VERB: Third step with measurable result
  4. ACTION VERB: Fourth step with validation criteria
  5. ACTION VERB: Fifth step with completion indicator

Quick Decision Matrix:

  • Scenario A → Action X (use when Y)
  • Scenario B → Action Z (use when W)
  • Scenario C → Action Q (use when P)

Critical Success Factors:

  • Factor 1: Measurable criterion
  • Factor 2: Observable outcome
  • Factor 3: Validation checkpoint </default_to_action>

Quick Reference Card

When to Use

  • Trigger condition 1 (specific context)
  • Trigger condition 2 (specific need)
  • Trigger condition 3 (specific problem)
  • Trigger condition 4 (specific goal)

Key Actions

  1. Primary action with expected outcome
  2. Secondary action with validation
  3. Tertiary action with deliverable
  4. Quality check with pass/fail criteria
  5. Completion step with artifacts

Tools & Frameworks

  • Tool 1: Best for X (Learning curve: Low/Medium/High)
  • Tool 2: Best for Y (Learning curve: Low/Medium/High)
  • Tool 3: Best for Z (Learning curve: Low/Medium/High)

Common Patterns

Pattern Use Case Complexity
Pattern A Scenario X Low
Pattern B Scenario Y Medium
Pattern C Scenario Z High

Success Criteria

✅ Metric 1: Target value or range ✅ Metric 2: Validation method ✅ Metric 3: Quality threshold ❌ Anti-pattern 1: What to avoid ❌ Anti-pattern 2: Common pitfall

Agent Coordination

  • agent-type-1: Primary responsibility and output
  • agent-type-2: Supporting role and artifacts
  • agent-type-3: Validation and quality gates

Core Concepts

Concept 1: Foundational Understanding

Definition: Clear, concise explanation in 1-2 sentences.

Key Points:

  • Essential element 1 with measurable aspect
  • Essential element 2 with observable outcome
  • Essential element 3 with validation criteria

Example:

// Minimal, focused example demonstrating core concept
function exampleFunction() {
  // Only essential code, no verbose comments
  return criticalOperation();
}

Concept 2: Advanced Application

When to Use: Specific context or condition.

Approach:

  1. Step 1 with clear outcome
  2. Step 2 with validation
  3. Step 3 with completion criteria

Trade-offs:

Approach Pros Cons When to Use
Option A Benefit 1, Benefit 2 Limitation 1 Context X
Option B Benefit 3, Benefit 4 Limitation 2 Context Y

Implementation Patterns

Pattern 1: Primary Use Case

Goal: Specific, measurable objective.

Steps:

  1. Preparation: What to set up
  2. Execution: How to perform action
  3. Validation: How to verify success
  4. Iteration: How to refine

Example:

// Concrete, runnable example
const result = await primaryPattern({
  config: { key: 'value' },
  validation: (r) => r.status === 'success'
});

Expected Outcome:

  • Observable result 1
  • Measurable metric 2
  • Validation checkpoint 3

Pattern 2: Secondary Use Case

Context: When pattern 1 doesn't apply.

Quick Implementation:

// Minimal code snippet
const alternative = quickPattern(input);
// Expected: specific result type

Comparison:

Aspect Pattern 1 Pattern 2
Speed Fast Moderate
Accuracy High Medium
Complexity Low Medium

Common Scenarios

Scenario A: Frequent Problem

Problem: Clear problem statement.

Solution:

  1. Diagnostic step with expected finding
  2. Remediation action with outcome
  3. Verification with pass/fail criteria

Code Example:

// Minimal solution code
const fix = applyFix(problem);
if (fix.verified) { /* success */ }

Scenario B: Edge Case

When It Happens: Specific trigger condition.

Handling:

  • Detection method
  • Mitigation strategy
  • Fallback approach

Tools & Integrations

Tool Selection Matrix

Tool Best For Complexity Setup Time
Tool A Use case X Low 5 min
Tool B Use case Y Medium 30 min
Tool C Use case Z High 2 hours

Integration Example: Tool A

// Minimal working integration
import { Tool } from 'tool-package';

const integration = new Tool({
  essential: 'config',
  only: 'critical-params'
});

const result = await integration.execute();
// Validation: expected result structure

Agent Coordination Hints

Memory Namespace

Store data in: aqe/{category}/{skill-name}/{data-type}

Schema:

{
  "skill": "skill-name",
  "timestamp": "ISO-8601",
  "agent": "qe-agent-name",
  "operation": "action-performed",
  "results": {
    "metric1": "value",
    "metric2": "value",
    "status": "success|failure"
  },
  "metadata": {
    "duration": "milliseconds",
    "resources": ["file1.js", "file2.test.js"]
  }
}

Coordination Flow

  1. Agent 1 → Primary action, store results to memory
  2. Agent 2 → Retrieve results, perform analysis
  3. Agent 3 → Make decision based on analysis
  4. Fleet Commander → Coordinate cross-agent workflow

Blackboard Patterns

Post to: {category}/{event-type} with priority critical|high|medium|low Subscribe to: {related-category}/{related-event} for downstream coordination

Event Schema:

{
  "event": "skill-name:action-completed",
  "priority": "high",
  "payload": {
    "status": "success",
    "artifacts": ["file1", "file2"],
    "next_actions": ["validation", "reporting"]
  }
}

Cross-Agent Dependencies

Fleet Coordination Example

// Example of multi-agent coordination
const fleetStrategy = await FleetManager.coordinate({
  strategy: 'skill-name-workflow',
  agents: [
    'qe-agent-1',  // Primary execution
    'qe-agent-2',  // Analysis & validation
    'qe-agent-3'   // Reporting & decisions
  ],
  topology: 'sequential|parallel|hierarchical',
  memoryNamespace: 'aqe/skill-name',
  coordination: {
    shareResults: true,
    waitForCompletion: true,
    aggregateFindings: true
  }
});

Best Practices

✅ Do This

  • Practice 1: Clear guideline with measurable outcome
  • Practice 2: Specific action with validation method
  • Practice 3: Observable behavior with success criteria

❌ Avoid This

  • Anti-pattern 1: Problem and why it's bad
  • Anti-pattern 2: Common mistake and consequences
  • Anti-pattern 3: Pitfall and how to prevent

Performance Tips

Optimization Impact Effort When to Apply
Tip 1 High Low Always
Tip 2 Medium Medium Scale >100
Tip 3 Low High Edge cases

Troubleshooting

Issue 1: Common Problem

Symptoms:

  • Observable symptom 1
  • Measurable indicator 2

Diagnosis:

# Command to diagnose
diagnostic-command --flags

Solution:

  1. Remediation step 1
  2. Validation step 2
  3. Confirmation step 3

Issue 2: Edge Case Problem

Root Cause: Explanation of underlying issue.

Quick Fix:

// Minimal fix code
const fix = quickSolution(problem);

Long-term Solution: Strategic approach for prevention.


Example 1: Basic Usage

// Complete working example
import { Skill } from 'skill-package';

async function basicExample() {
  const skill = new Skill({ config: 'value' });
  const result = await skill.execute();

  // Validation
  if (result.success) {
    console.log('Success:', result.data);
  }
}

Expected Output:

Success: { metric: 95, status: 'passed' }

Example 2: Advanced Usage

// Complex scenario with error handling
async function advancedExample() {
  try {
    const result = await complexOperation({
      option1: true,
      option2: 'value'
    });
    return result;
  } catch (error) {
    // Graceful degradation
    return fallbackStrategy();
  }
}

Metrics & Validation

Success Metrics

Metric Target Measurement Method
Metric 1 95%+ Automated test
Metric 2 <200ms Performance monitoring
Metric 3 0 errors Error tracking

Quality Gates

Pre-execution:

  • Prerequisite 1 verified
  • Prerequisite 2 validated
  • Configuration correct

Post-execution:

  • Success criteria met
  • Artifacts generated
  • Quality thresholds passed

Validation Commands

# Validate setup
npm run validate:{skill-name}

# Run quality checks
npm run quality-check

# Generate report
npm run report:{skill-name}

Prerequisites

Complementary Skills

Downstream Skills


Resources

Documentation

  • Official docs: URL
  • API reference: URL
  • Best practices: URL

Learning Resources

Community


Metadata

Implementation Status: optimized

Optimization Details:

baseline_tokens: 2500
optimized_tokens: 1200
reduction_percent: 52
optimization_date: 2025-12-02
optimizer: claude-sonnet-4-5
validation_status: passed
agent_tested: [qe-agent-1, qe-agent-2]

Version History:

  • v1.0 (2025-12-02): Initial optimized version
  • v0.9 (2025-11-XX): Baseline before optimization

Maintainers:

  • Primary: Agent type or team
  • Contributors: Community members

Document Version: 1.0 Last Updated: 2025-12-02 Compatibility: Claude Code 2.0+, Agentic QE Fleet v2.0+ License: MIT (or appropriate license)


Template Usage Instructions

For New Skills

  1. Copy this template to .claude/skills/{skill-name}/SKILL.md
  2. Replace all placeholder text in {curly-braces}
  3. Update YAML frontmatter with accurate metadata
  4. Fill in <default_to_action> with actionable directives
  5. Complete Quick Reference Card section
  6. Add agent coordination hints
  7. Validate with: npm run validate-skill .claude/skills/{skill-name}/SKILL.md

For Optimizing Existing Skills

  1. Read existing skill to understand core content
  2. Extract essential information
  3. Apply optimization patterns from /docs/optimization/claude-4-5-patterns.md
  4. Preserve all critical examples and code
  5. Add missing sections (quick reference, agent coordination)
  6. Update metadata and implementation status
  7. Validate token reduction (target: 40-50%)
  8. Test with actual agent execution

Validation Checklist

  • YAML frontmatter complete
  • <default_to_action> block present (100-200 tokens)
  • Quick reference card included
  • Agent coordination section present
  • Token estimate ≤ 1500 (or documented reason)
  • All code examples runnable
  • Related skills cross-referenced
  • Implementation status accurate
  • Tested with at least one agent

Token Budget Guidelines

  • YAML frontmatter: ~80 tokens
  • <default_to_action>: 100-200 tokens
  • Quick reference card: 200-400 tokens
  • Core concepts: 300-500 tokens
  • Implementation patterns: 200-400 tokens
  • Agent coordination: 150-250 tokens
  • Examples: 150-300 tokens
  • Remaining sections: 200-400 tokens
  • Total target: 1,200-1,500 tokens (adjust based on complexity)

This is a living template. Update it as optimization patterns evolve.