.claude/skills/v3-integration-deep/SKILL.md
Deep agentic-flow@alpha integration implementing ADR-001. Eliminates 10,000+ duplicate lines by building claude-flow as specialized extension rather than parallel implementation.
npx skillsauth add softmg/product-tracker V3 Deep IntegrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transforms claude-flow from parallel implementation to specialized extension of agentic-flow@alpha, eliminating massive code duplication while achieving performance improvements and feature parity.
# Initialize deep integration
Task("Integration architecture", "Design agentic-flow@alpha adapter layer", "v3-integration-architect")
# Feature integration (parallel)
Task("SONA integration", "Integrate 5 SONA learning modes", "v3-integration-architect")
Task("Flash Attention", "Implement 2.49x-7.47x speedup", "v3-integration-architect")
Task("AgentDB coordination", "Setup 150x-12,500x search", "v3-integration-architect")
┌─────────────────────────────────────────┐
│ claude-flow agentic-flow │
├─────────────────────────────────────────┤
│ SwarmCoordinator → Swarm System │ 80% overlap (eliminate)
│ AgentManager → Agent Lifecycle │ 70% overlap (eliminate)
│ TaskScheduler → Task Execution │ 60% overlap (eliminate)
│ SessionManager → Session Mgmt │ 50% overlap (eliminate)
└─────────────────────────────────────────┘
TARGET: <5,000 lines (vs 15,000+ currently)
class SONAIntegration {
async initializeMode(mode: SONAMode): Promise<void> {
switch(mode) {
case 'real-time': // ~0.05ms adaptation
case 'balanced': // general purpose
case 'research': // deep exploration
case 'edge': // resource-constrained
case 'batch': // high-throughput
}
await this.agenticFlow.sona.setMode(mode);
}
}
class FlashAttentionIntegration {
async optimizeAttention(): Promise<AttentionResult> {
return this.agenticFlow.attention.flashAttention({
speedupTarget: '2.49x-7.47x',
memoryReduction: '50-75%',
mechanisms: ['multi-head', 'linear', 'local', 'global']
});
}
}
class AgentDBIntegration {
async setupCrossAgentMemory(): Promise<void> {
await this.agentdb.enableCrossAgentSharing({
indexType: 'HNSW',
speedupTarget: '150x-12500x',
dimensions: 1536
});
}
}
class MCPToolsIntegration {
async integrateBuiltinTools(): Promise<void> {
// Leverage 213 pre-built tools
const tools = await this.agenticFlow.mcp.getAvailableTools();
await this.registerClaudeFlowSpecificTools(tools);
// Use 19 hook types
const hookTypes = await this.agenticFlow.hooks.getTypes();
await this.configureClaudeFlowHooks(hookTypes);
}
}
import { Agent as AgenticFlowAgent } from 'agentic-flow@alpha';
export class ClaudeFlowAgent extends AgenticFlowAgent {
async handleClaudeFlowTask(task: ClaudeTask): Promise<TaskResult> {
return this.executeWithSONA(task);
}
// Backward compatibility
async legacyCompatibilityLayer(oldAPI: any): Promise<any> {
return this.adaptToNewAPI(oldAPI);
}
}
class SystemMigration {
async migrateSwarmCoordination(): Promise<void> {
// Replace SwarmCoordinator (800+ lines) with agentic-flow Swarm
const swarmConfig = await this.extractSwarmConfig();
await this.agenticFlow.swarm.initialize(swarmConfig);
}
async migrateAgentManagement(): Promise<void> {
// Replace AgentManager (1,736+ lines) with agentic-flow lifecycle
const agents = await this.extractActiveAgents();
for (const agent of agents) {
await this.agenticFlow.agent.create(agent);
}
}
async migrateTaskExecution(): Promise<void> {
// Replace TaskScheduler with agentic-flow task graph
const tasks = await this.extractTasks();
await this.agenticFlow.task.executeGraph(this.buildTaskGraph(tasks));
}
}
class CodeCleanup {
async removeDeprecatedCode(): Promise<void> {
// Remove massive duplicate implementations
await this.removeFile('src/core/SwarmCoordinator.ts'); // 800+ lines
await this.removeFile('src/agents/AgentManager.ts'); // 1,736+ lines
await this.removeFile('src/task/TaskScheduler.ts'); // 500+ lines
// Total reduction: 10,000+ → <5,000 lines
}
}
class RLIntegration {
algorithms = [
'PPO', 'DQN', 'A2C', 'MCTS', 'Q-Learning',
'SARSA', 'Actor-Critic', 'Decision-Transformer'
];
async optimizeAgentBehavior(): Promise<void> {
for (const algorithm of this.algorithms) {
await this.agenticFlow.rl.train(algorithm, {
episodes: 1000,
rewardFunction: this.claudeFlowRewardFunction
});
}
}
}
const attentionBenchmark = {
baseline: 'current attention mechanism',
target: '2.49x-7.47x improvement',
memoryReduction: '50-75%',
implementation: 'agentic-flow@alpha Flash Attention'
};
const searchBenchmark = {
baseline: 'linear search in current systems',
target: '150x-12,500x via HNSW indexing',
implementation: 'agentic-flow@alpha AgentDB'
};
class BackwardCompatibility {
// Phase 1: Dual operation
async enableDualOperation(): Promise<void> {
this.oldSystem.continue();
this.newSystem.initialize();
this.syncState(this.oldSystem, this.newSystem);
}
// Phase 2: Feature-by-feature migration
async migrateGradually(): Promise<void> {
const features = this.getAllFeatures();
for (const feature of features) {
await this.migrateFeature(feature);
await this.validateFeatureParity(feature);
}
}
// Phase 3: Complete transition
async completeTransition(): Promise<void> {
await this.validateFullParity();
await this.deprecateOldSystem();
}
}
v3-memory-unification - Memory system integrationv3-performance-optimization - Performance target validationv3-swarm-coordination - Swarm system migrationv3-security-overhaul - Secure integration patternsdocumentation
Task tracking and plan management. Used by planner to create plans and persist tasks, by orchestrator to read tasks and update progress, by documenter to create completion reports, and by any agent to log non-critical issues.
development
Create, edit, evaluate, and package agent skills. Use when building a new skill from scratch, improving an existing skill, running evals to test a skill, benchmarking skill performance, optimizing a skill's description for better triggering, reviewing third-party skills for quality, or packaging skills for distribution. Not for using skills or general coding tasks.
development
Simple implementation workflow - code, test, document. Use when user invokes /implement, wants to create code with automatic testing and documentation, or for simple single-purpose tasks that don't need planning.
development
Security best practices covering authentication, input validation, API security, secrets management, data protection, and OWASP Top 10. Use when implementing auth flows, API endpoints, file uploads, or any feature touching passwords, tokens, PII, or sensitive data. Do NOT use for code style reviews or architecture decisions.