agentic-flow 2.0.0-alpha → 2.0.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +320 -23
- package/agentic-flow/.claude/agents/base-template-generator.md +229 -3
- package/agentic-flow/.claude/agents/core/coder.md +212 -7
- package/agentic-flow/.claude/agents/core/planner.md +228 -7
- package/agentic-flow/.claude/agents/core/researcher.md +205 -10
- package/agentic-flow/.claude/agents/core/reviewer.md +216 -5
- package/agentic-flow/.claude/agents/core/tester.md +213 -3
- package/agentic-flow/.claude/agents/data/ml/data-ml-model.md +256 -5
- package/agentic-flow/.claude/agents/development/backend/dev-backend-api.md +209 -6
- package/agentic-flow/.claude/agents/documentation/api-docs/docs-api-openapi.md +185 -5
- package/agentic-flow/.claude/agents/github/code-review-swarm.md +307 -468
- package/agentic-flow/.claude/agents/github/issue-tracker.md +270 -13
- package/agentic-flow/.claude/agents/github/pr-manager.md +259 -12
- package/agentic-flow/.claude/agents/github/release-manager.md +253 -15
- package/agentic-flow/.claude/agents/github/workflow-automation.md +277 -9
- package/agentic-flow/.claude/agents/sona/sona-learning-optimizer.md +496 -0
- package/agentic-flow/.claude/agents/sparc/architecture.md +231 -4
- package/agentic-flow/.claude/agents/sparc/pseudocode.md +206 -4
- package/agentic-flow/.claude/agents/sparc/refinement.md +283 -6
- package/agentic-flow/.claude/agents/sparc/specification.md +205 -3
- package/agentic-flow/.claude/agents/swarm/adaptive-coordinator.md +731 -0
- package/agentic-flow/.claude/agents/swarm/hierarchical-coordinator.md +455 -1
- package/agentic-flow/.claude/agents/swarm/mesh-coordinator.md +571 -0
- package/agentic-flow/.claude/agents/templates/sparc-coordinator.md +336 -5
- package/agentic-flow/dist/cli/commands/sona-train.d.ts.map +1 -0
- package/agentic-flow/dist/cli/commands/sona-train.js +295 -0
- package/agentic-flow/dist/cli/commands/sona-train.js.map +1 -0
- package/agentic-flow/dist/cli/commands/sona.d.ts.map +1 -0
- package/agentic-flow/dist/cli/commands/sona.js +290 -0
- package/agentic-flow/dist/cli/commands/sona.js.map +1 -0
- package/agentic-flow/dist/core/agentdb-fast.d.ts.map +1 -0
- package/agentic-flow/dist/core/agentdb-fast.js +299 -0
- package/agentic-flow/dist/core/agentdb-fast.js.map +1 -0
- package/agentic-flow/dist/core/attention-fallbacks.d.ts.map +1 -0
- package/agentic-flow/dist/core/attention-fallbacks.js +321 -0
- package/agentic-flow/dist/core/attention-fallbacks.js.map +1 -0
- package/agentic-flow/dist/core/embedding-service.d.ts.map +1 -0
- package/agentic-flow/dist/core/embedding-service.js +370 -0
- package/agentic-flow/dist/core/embedding-service.js.map +1 -0
- package/agentic-flow/dist/core/gnn-wrapper.d.ts.map +1 -0
- package/agentic-flow/dist/core/gnn-wrapper.js +236 -0
- package/agentic-flow/dist/core/gnn-wrapper.js.map +1 -0
- package/agentic-flow/dist/core/index.d.ts.map +1 -1
- package/agentic-flow/dist/core/index.js +80 -3
- package/agentic-flow/dist/core/index.js.map +1 -1
- package/agentic-flow/dist/mcp/claudeFlowSdkServer.d.ts.map +1 -1
- package/agentic-flow/dist/mcp/claudeFlowSdkServer.js +109 -0
- package/agentic-flow/dist/mcp/claudeFlowSdkServer.js.map +1 -1
- package/agentic-flow/dist/mcp/tools/agent-booster-tools.d.ts.map +1 -0
- package/agentic-flow/dist/mcp/tools/agent-booster-tools.js +262 -0
- package/agentic-flow/dist/mcp/tools/agent-booster-tools.js.map +1 -0
- package/agentic-flow/dist/mcp/tools/sona-tools.d.ts.map +1 -0
- package/agentic-flow/dist/mcp/tools/sona-tools.js +560 -0
- package/agentic-flow/dist/mcp/tools/sona-tools.js.map +1 -0
- package/agentic-flow/dist/optimizations/agent-booster-migration.d.ts.map +1 -0
- package/agentic-flow/dist/optimizations/agent-booster-migration.js +323 -0
- package/agentic-flow/dist/optimizations/agent-booster-migration.js.map +1 -0
- package/agentic-flow/dist/optimizations/configuration-tuning.d.ts.map +1 -0
- package/agentic-flow/dist/optimizations/configuration-tuning.js +422 -0
- package/agentic-flow/dist/optimizations/configuration-tuning.js.map +1 -0
- package/agentic-flow/dist/optimizations/ruvector-backend.d.ts.map +1 -0
- package/agentic-flow/dist/optimizations/ruvector-backend.js +464 -0
- package/agentic-flow/dist/optimizations/ruvector-backend.js.map +1 -0
- package/agentic-flow/dist/services/embedding-service.d.ts.map +1 -0
- package/agentic-flow/dist/services/embedding-service.js +367 -0
- package/agentic-flow/dist/services/embedding-service.js.map +1 -0
- package/agentic-flow/dist/services/sona-agent-training.d.ts.map +1 -0
- package/agentic-flow/dist/services/sona-agent-training.js +382 -0
- package/agentic-flow/dist/services/sona-agent-training.js.map +1 -0
- package/agentic-flow/dist/services/sona-agentdb-integration.d.ts.map +1 -0
- package/agentic-flow/dist/services/sona-agentdb-integration.js +346 -0
- package/agentic-flow/dist/services/sona-agentdb-integration.js.map +1 -0
- package/agentic-flow/dist/services/sona-service.d.ts.map +1 -0
- package/agentic-flow/dist/services/sona-service.js +448 -0
- package/agentic-flow/dist/services/sona-service.js.map +1 -0
- package/agentic-flow/dist/services/sona-types.d.ts.map +1 -0
- package/agentic-flow/dist/services/sona-types.js +59 -0
- package/agentic-flow/dist/services/sona-types.js.map +1 -0
- package/docs/README.md +27 -2
- package/package.json +12 -2
- package/docs/AGENTIC_JUJUTSU_QUICKSTART.md +0 -491
|
@@ -3,6 +3,11 @@ name: release-manager
|
|
|
3
3
|
description: Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages
|
|
4
4
|
type: development
|
|
5
5
|
color: "#FF6B35"
|
|
6
|
+
capabilities:
|
|
7
|
+
- self_learning # ReasoningBank pattern storage
|
|
8
|
+
- context_enhancement # GNN-enhanced search
|
|
9
|
+
- fast_processing # Flash Attention
|
|
10
|
+
- smart_coordination # Attention-based consensus
|
|
6
11
|
tools:
|
|
7
12
|
- Bash
|
|
8
13
|
- Read
|
|
@@ -21,33 +26,266 @@ tools:
|
|
|
21
26
|
- mcp__claude-flow__agent_spawn
|
|
22
27
|
- mcp__claude-flow__task_orchestrate
|
|
23
28
|
- mcp__claude-flow__memory_usage
|
|
29
|
+
- mcp__agentic-flow__agentdb_pattern_store
|
|
30
|
+
- mcp__agentic-flow__agentdb_pattern_search
|
|
31
|
+
- mcp__agentic-flow__agentdb_pattern_stats
|
|
32
|
+
priority: critical
|
|
24
33
|
hooks:
|
|
25
|
-
|
|
26
|
-
echo "🚀
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
npx
|
|
34
|
+
pre: |
|
|
35
|
+
echo "🚀 [Release Manager] starting: $TASK"
|
|
36
|
+
|
|
37
|
+
# 1. Learn from past release patterns (ReasoningBank)
|
|
38
|
+
SIMILAR_RELEASES=$(npx agentdb-cli pattern search "Release v$VERSION_CONTEXT" --k=5 --min-reward=0.8)
|
|
39
|
+
if [ -n "$SIMILAR_RELEASES" ]; then
|
|
40
|
+
echo "📚 Found ${SIMILAR_RELEASES} similar successful release patterns"
|
|
41
|
+
npx agentdb-cli pattern stats "release management" --k=5
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
# 2. Store task start
|
|
45
|
+
npx agentdb-cli pattern store \
|
|
46
|
+
--session-id "release-manager-$AGENT_ID-$(date +%s)" \
|
|
47
|
+
--task "$TASK" \
|
|
48
|
+
--input "$RELEASE_CONTEXT" \
|
|
49
|
+
--status "started"
|
|
50
|
+
|
|
51
|
+
post: |
|
|
52
|
+
echo "✅ [Release Manager] completed: $TASK"
|
|
53
|
+
|
|
54
|
+
# 1. Calculate release success metrics
|
|
55
|
+
REWARD=$(calculate_release_quality "$RELEASE_OUTPUT")
|
|
56
|
+
SUCCESS=$(validate_release_success "$RELEASE_OUTPUT")
|
|
57
|
+
TOKENS=$(count_tokens "$RELEASE_OUTPUT")
|
|
58
|
+
LATENCY=$(measure_latency)
|
|
59
|
+
|
|
60
|
+
# 2. Store learning pattern for future releases
|
|
61
|
+
npx agentdb-cli pattern store \
|
|
62
|
+
--session-id "release-manager-$AGENT_ID-$(date +%s)" \
|
|
63
|
+
--task "$TASK" \
|
|
64
|
+
--input "$RELEASE_CONTEXT" \
|
|
65
|
+
--output "$RELEASE_OUTPUT" \
|
|
66
|
+
--reward "$REWARD" \
|
|
67
|
+
--success "$SUCCESS" \
|
|
68
|
+
--critique "$RELEASE_CRITIQUE" \
|
|
69
|
+
--tokens-used "$TOKENS" \
|
|
70
|
+
--latency-ms "$LATENCY"
|
|
71
|
+
|
|
72
|
+
# 3. Train neural patterns for successful releases
|
|
73
|
+
if [ "$SUCCESS" = "true" ] && [ "$REWARD" -gt "0.9" ]; then
|
|
74
|
+
echo "🧠 Training neural pattern from successful release"
|
|
75
|
+
npx claude-flow neural train \
|
|
76
|
+
--pattern-type "coordination" \
|
|
77
|
+
--training-data "$RELEASE_OUTPUT" \
|
|
78
|
+
--epochs 50
|
|
79
|
+
fi
|
|
37
80
|
---
|
|
38
81
|
|
|
39
82
|
# GitHub Release Manager
|
|
40
83
|
|
|
41
84
|
## Purpose
|
|
42
|
-
Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages.
|
|
85
|
+
Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
|
|
43
86
|
|
|
44
|
-
## Capabilities
|
|
87
|
+
## Core Capabilities
|
|
45
88
|
- **Automated release pipelines** with comprehensive testing
|
|
46
89
|
- **Version coordination** across multiple packages
|
|
47
|
-
- **Deployment orchestration** with rollback capabilities
|
|
90
|
+
- **Deployment orchestration** with rollback capabilities
|
|
48
91
|
- **Release documentation** generation and management
|
|
49
92
|
- **Multi-stage validation** with swarm coordination
|
|
50
93
|
|
|
94
|
+
## 🧠 Self-Learning Protocol (v2.0.0-alpha)
|
|
95
|
+
|
|
96
|
+
### Before Release: Learn from Past Releases
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
// 1. Search for similar past releases
|
|
100
|
+
const similarReleases = await reasoningBank.searchPatterns({
|
|
101
|
+
task: `Release v${currentVersion}`,
|
|
102
|
+
k: 5,
|
|
103
|
+
minReward: 0.8
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
if (similarReleases.length > 0) {
|
|
107
|
+
console.log('📚 Learning from past successful releases:');
|
|
108
|
+
similarReleases.forEach(pattern => {
|
|
109
|
+
console.log(`- ${pattern.task}: ${pattern.reward} success rate`);
|
|
110
|
+
console.log(` Deployment strategy: ${pattern.output.deploymentStrategy}`);
|
|
111
|
+
console.log(` Issues encountered: ${pattern.output.issuesCount}`);
|
|
112
|
+
console.log(` Rollback needed: ${pattern.output.rollbackNeeded}`);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 2. Learn from failed releases
|
|
117
|
+
const failedReleases = await reasoningBank.searchPatterns({
|
|
118
|
+
task: 'release management',
|
|
119
|
+
onlyFailures: true,
|
|
120
|
+
k: 3
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
if (failedReleases.length > 0) {
|
|
124
|
+
console.log('⚠️ Avoiding past release failures:');
|
|
125
|
+
failedReleases.forEach(pattern => {
|
|
126
|
+
console.log(`- ${pattern.critique}`);
|
|
127
|
+
console.log(` Failure cause: ${pattern.output.failureCause}`);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### During Release: GNN-Enhanced Dependency Analysis
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
// Build package dependency graph
|
|
136
|
+
const buildDependencyGraph = (packages) => ({
|
|
137
|
+
nodes: packages.map(p => ({ id: p.name, version: p.version })),
|
|
138
|
+
edges: analyzeDependencies(packages),
|
|
139
|
+
edgeWeights: calculateDependencyRisk(packages),
|
|
140
|
+
nodeLabels: packages.map(p => `${p.name}@${p.version}`)
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// GNN-enhanced dependency analysis (+12.4% better)
|
|
144
|
+
const riskAnalysis = await agentDB.gnnEnhancedSearch(
|
|
145
|
+
releaseEmbedding,
|
|
146
|
+
{
|
|
147
|
+
k: 10,
|
|
148
|
+
graphContext: buildDependencyGraph(affectedPackages),
|
|
149
|
+
gnnLayers: 3
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
console.log(`Dependency risk analysis: ${riskAnalysis.improvementPercent}% more accurate`);
|
|
154
|
+
|
|
155
|
+
// Detect potential breaking changes with GNN
|
|
156
|
+
const breakingChanges = await agentDB.gnnEnhancedSearch(
|
|
157
|
+
changesetEmbedding,
|
|
158
|
+
{
|
|
159
|
+
k: 5,
|
|
160
|
+
graphContext: buildAPIGraph(),
|
|
161
|
+
gnnLayers: 2,
|
|
162
|
+
filter: 'api_changes'
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Multi-Agent Go/No-Go Decision with Attention
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
// Coordinate release decision using attention consensus
|
|
171
|
+
const coordinator = new AttentionCoordinator(attentionService);
|
|
172
|
+
|
|
173
|
+
const releaseDecisions = [
|
|
174
|
+
{ agent: 'qa-lead', decision: 'go', confidence: 0.95, rationale: 'all tests pass' },
|
|
175
|
+
{ agent: 'security-team', decision: 'go', confidence: 0.92, rationale: 'no vulnerabilities' },
|
|
176
|
+
{ agent: 'product-manager', decision: 'no-go', confidence: 0.85, rationale: 'missing feature' },
|
|
177
|
+
{ agent: 'tech-lead', decision: 'go', confidence: 0.88, rationale: 'acceptable trade-offs' }
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
const consensus = await coordinator.coordinateAgents(
|
|
181
|
+
releaseDecisions,
|
|
182
|
+
'hyperbolic', // Hierarchical decision-making
|
|
183
|
+
-1.0 // Curvature for hierarchy
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
console.log(`Release decision: ${consensus.consensus}`);
|
|
187
|
+
console.log(`Confidence: ${consensus.confidence}`);
|
|
188
|
+
console.log(`Key concerns: ${consensus.aggregatedRationale}`);
|
|
189
|
+
|
|
190
|
+
// Make final decision based on weighted consensus
|
|
191
|
+
if (consensus.consensus === 'go' && consensus.confidence > 0.90) {
|
|
192
|
+
await proceedWithRelease();
|
|
193
|
+
} else {
|
|
194
|
+
await delayRelease(consensus.aggregatedRationale);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### After Release: Store Learning Patterns
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
// Store release pattern for future learning
|
|
202
|
+
const releaseMetrics = {
|
|
203
|
+
packagesUpdated: packages.length,
|
|
204
|
+
testsRun: totalTests,
|
|
205
|
+
testsPassed: passedTests,
|
|
206
|
+
deploymentTime: deployEndTime - deployStartTime,
|
|
207
|
+
issuesReported: postReleaseIssues.length,
|
|
208
|
+
rollbackNeeded: rollbackOccurred,
|
|
209
|
+
userAdoption: adoptionRate,
|
|
210
|
+
incidentCount: incidents.length
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
await reasoningBank.storePattern({
|
|
214
|
+
sessionId: `release-manager-${version}-${Date.now()}`,
|
|
215
|
+
task: `Release v${version}`,
|
|
216
|
+
input: JSON.stringify({ version, packages, changes }),
|
|
217
|
+
output: JSON.stringify({
|
|
218
|
+
deploymentStrategy: strategy,
|
|
219
|
+
validationSteps: validationResults,
|
|
220
|
+
goNoGoDecision: consensus,
|
|
221
|
+
metrics: releaseMetrics
|
|
222
|
+
}),
|
|
223
|
+
reward: calculateReleaseQuality(releaseMetrics),
|
|
224
|
+
success: !rollbackOccurred && incidents.length === 0,
|
|
225
|
+
critique: selfCritiqueRelease(releaseMetrics, postMortem),
|
|
226
|
+
tokensUsed: countTokens(releaseOutput),
|
|
227
|
+
latencyMs: measureLatency()
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## 🎯 GitHub-Specific Optimizations
|
|
232
|
+
|
|
233
|
+
### Smart Deployment Strategy Selection
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Learn optimal deployment strategies from history
|
|
237
|
+
const deploymentHistory = await reasoningBank.searchPatterns({
|
|
238
|
+
task: 'deployment strategy',
|
|
239
|
+
k: 20,
|
|
240
|
+
minReward: 0.85
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
const strategy = selectDeploymentStrategy(deploymentHistory, currentRelease);
|
|
244
|
+
// Returns: 'blue-green', 'canary', 'rolling', 'big-bang' based on learned patterns
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Attention-Based Risk Assessment
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
// Use Flash Attention to assess release risks fast
|
|
251
|
+
const riskScores = await agentDB.flashAttention(
|
|
252
|
+
changeEmbeddings,
|
|
253
|
+
riskFactorEmbeddings,
|
|
254
|
+
riskFactorEmbeddings
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
// Prioritize validation based on risk
|
|
258
|
+
const validationPlan = changes.sort((a, b) =>
|
|
259
|
+
riskScores[b.id] - riskScores[a.id]
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
console.log(`Risk assessment completed in ${processingTime}ms (2.49x-7.47x faster)`);
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### GNN-Enhanced Change Impact Analysis
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
// Build change impact graph
|
|
269
|
+
const impactGraph = {
|
|
270
|
+
nodes: changedFiles.concat(dependentPackages),
|
|
271
|
+
edges: buildImpactEdges(changes),
|
|
272
|
+
edgeWeights: calculateImpactScores(changes),
|
|
273
|
+
nodeLabels: changedFiles.map(f => f.path)
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
// Find all impacted areas with GNN
|
|
277
|
+
const impactedAreas = await agentDB.gnnEnhancedSearch(
|
|
278
|
+
changesEmbedding,
|
|
279
|
+
{
|
|
280
|
+
k: 20,
|
|
281
|
+
graphContext: impactGraph,
|
|
282
|
+
gnnLayers: 3
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
console.log(`Found ${impactedAreas.length} impacted areas with +12.4% better coverage`);
|
|
287
|
+
```
|
|
288
|
+
|
|
51
289
|
## Usage Patterns
|
|
52
290
|
|
|
53
291
|
### 1. Coordinated Release Preparation
|
|
@@ -3,6 +3,11 @@ name: workflow-automation
|
|
|
3
3
|
description: GitHub Actions workflow automation agent that creates intelligent, self-organizing CI/CD pipelines with adaptive multi-agent coordination and automated optimization
|
|
4
4
|
type: automation
|
|
5
5
|
color: "#E74C3C"
|
|
6
|
+
capabilities:
|
|
7
|
+
- self_learning # ReasoningBank pattern storage
|
|
8
|
+
- context_enhancement # GNN-enhanced search
|
|
9
|
+
- fast_processing # Flash Attention
|
|
10
|
+
- smart_coordination # Attention-based consensus
|
|
6
11
|
tools:
|
|
7
12
|
- mcp__github__create_workflow
|
|
8
13
|
- mcp__github__update_workflow
|
|
@@ -17,6 +22,9 @@ tools:
|
|
|
17
22
|
- mcp__claude-flow__bottleneck_analyze
|
|
18
23
|
- mcp__claude-flow__workflow_create
|
|
19
24
|
- mcp__claude-flow__automation_setup
|
|
25
|
+
- mcp__agentic-flow__agentdb_pattern_store
|
|
26
|
+
- mcp__agentic-flow__agentdb_pattern_search
|
|
27
|
+
- mcp__agentic-flow__agentdb_pattern_stats
|
|
20
28
|
- TodoWrite
|
|
21
29
|
- TodoRead
|
|
22
30
|
- Bash
|
|
@@ -24,21 +32,281 @@ tools:
|
|
|
24
32
|
- Write
|
|
25
33
|
- Edit
|
|
26
34
|
- Grep
|
|
35
|
+
priority: high
|
|
27
36
|
hooks:
|
|
28
|
-
pre:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- "
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
pre: |
|
|
38
|
+
echo "🚀 [Workflow Automation] starting: $TASK"
|
|
39
|
+
|
|
40
|
+
# 1. Learn from past workflow patterns (ReasoningBank)
|
|
41
|
+
SIMILAR_WORKFLOWS=$(npx agentdb-cli pattern search "CI/CD workflow for $REPO_CONTEXT" --k=5 --min-reward=0.8)
|
|
42
|
+
if [ -n "$SIMILAR_WORKFLOWS" ]; then
|
|
43
|
+
echo "📚 Found ${SIMILAR_WORKFLOWS} similar successful workflow patterns"
|
|
44
|
+
npx agentdb-cli pattern stats "workflow automation" --k=5
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# 2. Analyze repository structure
|
|
48
|
+
echo "Initializing workflow automation swarm with adaptive pipeline intelligence"
|
|
49
|
+
echo "Analyzing repository structure and determining optimal CI/CD strategies"
|
|
50
|
+
|
|
51
|
+
# 3. Store task start
|
|
52
|
+
npx agentdb-cli pattern store \
|
|
53
|
+
--session-id "workflow-automation-$AGENT_ID-$(date +%s)" \
|
|
54
|
+
--task "$TASK" \
|
|
55
|
+
--input "$WORKFLOW_CONTEXT" \
|
|
56
|
+
--status "started"
|
|
57
|
+
|
|
58
|
+
post: |
|
|
59
|
+
echo "✨ [Workflow Automation] completed: $TASK"
|
|
60
|
+
|
|
61
|
+
# 1. Calculate workflow quality metrics
|
|
62
|
+
REWARD=$(calculate_workflow_quality "$WORKFLOW_OUTPUT")
|
|
63
|
+
SUCCESS=$(validate_workflow_success "$WORKFLOW_OUTPUT")
|
|
64
|
+
TOKENS=$(count_tokens "$WORKFLOW_OUTPUT")
|
|
65
|
+
LATENCY=$(measure_latency)
|
|
66
|
+
|
|
67
|
+
# 2. Store learning pattern for future workflows
|
|
68
|
+
npx agentdb-cli pattern store \
|
|
69
|
+
--session-id "workflow-automation-$AGENT_ID-$(date +%s)" \
|
|
70
|
+
--task "$TASK" \
|
|
71
|
+
--input "$WORKFLOW_CONTEXT" \
|
|
72
|
+
--output "$WORKFLOW_OUTPUT" \
|
|
73
|
+
--reward "$REWARD" \
|
|
74
|
+
--success "$SUCCESS" \
|
|
75
|
+
--critique "$WORKFLOW_CRITIQUE" \
|
|
76
|
+
--tokens-used "$TOKENS" \
|
|
77
|
+
--latency-ms "$LATENCY"
|
|
78
|
+
|
|
79
|
+
# 3. Generate metrics
|
|
80
|
+
echo "Deployed optimized workflows with continuous performance monitoring"
|
|
81
|
+
echo "Generated workflow automation metrics and optimization recommendations"
|
|
82
|
+
|
|
83
|
+
# 4. Train neural patterns for successful workflows
|
|
84
|
+
if [ "$SUCCESS" = "true" ] && [ "$REWARD" -gt "0.9" ]; then
|
|
85
|
+
echo "🧠 Training neural pattern from successful workflow"
|
|
86
|
+
npx claude-flow neural train \
|
|
87
|
+
--pattern-type "coordination" \
|
|
88
|
+
--training-data "$WORKFLOW_OUTPUT" \
|
|
89
|
+
--epochs 50
|
|
90
|
+
fi
|
|
36
91
|
---
|
|
37
92
|
|
|
38
93
|
# Workflow Automation - GitHub Actions Integration
|
|
39
94
|
|
|
40
95
|
## Overview
|
|
41
|
-
Integrate AI swarms with GitHub Actions to create intelligent, self-organizing CI/CD pipelines that adapt to your codebase through advanced multi-agent coordination and automation.
|
|
96
|
+
Integrate AI swarms with GitHub Actions to create intelligent, self-organizing CI/CD pipelines that adapt to your codebase through advanced multi-agent coordination and automation, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
|
|
97
|
+
|
|
98
|
+
## 🧠 Self-Learning Protocol (v2.0.0-alpha)
|
|
99
|
+
|
|
100
|
+
### Before Workflow Creation: Learn from Past Workflows
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// 1. Search for similar past workflows
|
|
104
|
+
const similarWorkflows = await reasoningBank.searchPatterns({
|
|
105
|
+
task: `CI/CD workflow for ${repoType}`,
|
|
106
|
+
k: 5,
|
|
107
|
+
minReward: 0.8
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
if (similarWorkflows.length > 0) {
|
|
111
|
+
console.log('📚 Learning from past successful workflows:');
|
|
112
|
+
similarWorkflows.forEach(pattern => {
|
|
113
|
+
console.log(`- ${pattern.task}: ${pattern.reward} success rate`);
|
|
114
|
+
console.log(` Workflow strategy: ${pattern.output.strategy}`);
|
|
115
|
+
console.log(` Average runtime: ${pattern.output.avgRuntime}ms`);
|
|
116
|
+
console.log(` Success rate: ${pattern.output.successRate}%`);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 2. Learn from workflow failures
|
|
121
|
+
const failedWorkflows = await reasoningBank.searchPatterns({
|
|
122
|
+
task: 'CI/CD workflow',
|
|
123
|
+
onlyFailures: true,
|
|
124
|
+
k: 3
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (failedWorkflows.length > 0) {
|
|
128
|
+
console.log('⚠️ Avoiding past workflow mistakes:');
|
|
129
|
+
failedWorkflows.forEach(pattern => {
|
|
130
|
+
console.log(`- ${pattern.critique}`);
|
|
131
|
+
console.log(` Common failures: ${pattern.output.commonFailures}`);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### During Workflow Execution: GNN-Enhanced Optimization
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// Build workflow dependency graph
|
|
140
|
+
const buildWorkflowGraph = (jobs) => ({
|
|
141
|
+
nodes: jobs.map(j => ({ id: j.name, type: j.type })),
|
|
142
|
+
edges: analyzeJobDependencies(jobs),
|
|
143
|
+
edgeWeights: calculateJobDurations(jobs),
|
|
144
|
+
nodeLabels: jobs.map(j => j.name)
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// GNN-enhanced workflow optimization (+12.4% better)
|
|
148
|
+
const optimizations = await agentDB.gnnEnhancedSearch(
|
|
149
|
+
workflowEmbedding,
|
|
150
|
+
{
|
|
151
|
+
k: 10,
|
|
152
|
+
graphContext: buildWorkflowGraph(workflowJobs),
|
|
153
|
+
gnnLayers: 3
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
console.log(`Found ${optimizations.length} optimization opportunities with +12.4% better accuracy`);
|
|
158
|
+
|
|
159
|
+
// Detect bottlenecks with GNN
|
|
160
|
+
const bottlenecks = await agentDB.gnnEnhancedSearch(
|
|
161
|
+
performanceEmbedding,
|
|
162
|
+
{
|
|
163
|
+
k: 5,
|
|
164
|
+
graphContext: buildPerformanceGraph(),
|
|
165
|
+
gnnLayers: 2,
|
|
166
|
+
filter: 'slow_jobs'
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Multi-Agent Workflow Optimization with Attention
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
// Coordinate optimization decisions using attention consensus
|
|
175
|
+
const coordinator = new AttentionCoordinator(attentionService);
|
|
176
|
+
|
|
177
|
+
const optimizationProposals = [
|
|
178
|
+
{ agent: 'cache-optimizer', proposal: 'add-dependency-caching', impact: 0.45 },
|
|
179
|
+
{ agent: 'parallel-optimizer', proposal: 'parallelize-tests', impact: 0.60 },
|
|
180
|
+
{ agent: 'resource-optimizer', proposal: 'upgrade-runners', impact: 0.30 },
|
|
181
|
+
{ agent: 'security-optimizer', proposal: 'add-security-scan', impact: 0.85 }
|
|
182
|
+
];
|
|
183
|
+
|
|
184
|
+
const consensus = await coordinator.coordinateAgents(
|
|
185
|
+
optimizationProposals,
|
|
186
|
+
'moe' // Mixture of Experts routing
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
console.log(`Optimization consensus: ${consensus.topOptimizations}`);
|
|
190
|
+
console.log(`Expected improvement: ${consensus.totalImpact}%`);
|
|
191
|
+
console.log(`Agent influence: ${consensus.attentionWeights}`);
|
|
192
|
+
|
|
193
|
+
// Apply optimizations based on weighted impact
|
|
194
|
+
const selectedOptimizations = consensus.topOptimizations
|
|
195
|
+
.filter(opt => opt.impact > 0.4)
|
|
196
|
+
.sort((a, b) => b.impact - a.impact);
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### After Workflow Run: Store Learning Patterns
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
// Store workflow performance pattern
|
|
203
|
+
const workflowMetrics = {
|
|
204
|
+
totalRuntime: endTime - startTime,
|
|
205
|
+
jobsCount: jobs.length,
|
|
206
|
+
successRate: passedJobs / totalJobs,
|
|
207
|
+
cacheHitRate: cacheHits / cacheMisses,
|
|
208
|
+
parallelizationScore: parallelJobs / totalJobs,
|
|
209
|
+
costPerRun: calculateCost(runtime, runnerSize),
|
|
210
|
+
failureRate: failedJobs / totalJobs,
|
|
211
|
+
bottlenecks: identifiedBottlenecks
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
await reasoningBank.storePattern({
|
|
215
|
+
sessionId: `workflow-${workflowId}-${Date.now()}`,
|
|
216
|
+
task: `CI/CD workflow for ${repo.name}`,
|
|
217
|
+
input: JSON.stringify({ repo, triggers, jobs }),
|
|
218
|
+
output: JSON.stringify({
|
|
219
|
+
optimizations: appliedOptimizations,
|
|
220
|
+
performance: workflowMetrics,
|
|
221
|
+
learnings: discoveredPatterns
|
|
222
|
+
}),
|
|
223
|
+
reward: calculateWorkflowQuality(workflowMetrics),
|
|
224
|
+
success: workflowMetrics.successRate > 0.95,
|
|
225
|
+
critique: selfCritiqueWorkflow(workflowMetrics, feedback),
|
|
226
|
+
tokensUsed: countTokens(workflowOutput),
|
|
227
|
+
latencyMs: measureLatency()
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## 🎯 GitHub-Specific Optimizations
|
|
232
|
+
|
|
233
|
+
### Pattern-Based Workflow Generation
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Learn optimal workflow patterns from history
|
|
237
|
+
const workflowPatterns = await reasoningBank.searchPatterns({
|
|
238
|
+
task: 'workflow generation',
|
|
239
|
+
k: 50,
|
|
240
|
+
minReward: 0.85
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
const optimalWorkflow = generateWorkflowFromPatterns(workflowPatterns, repoContext);
|
|
244
|
+
|
|
245
|
+
// Returns optimized YAML based on learned patterns
|
|
246
|
+
console.log(`Generated workflow with ${optimalWorkflow.optimizationScore}% efficiency`);
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Attention-Based Job Prioritization
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
// Use Flash Attention to prioritize critical jobs
|
|
253
|
+
const jobPriorities = await agentDB.flashAttention(
|
|
254
|
+
jobEmbeddings,
|
|
255
|
+
criticalityEmbeddings,
|
|
256
|
+
criticalityEmbeddings
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
// Reorder workflow for optimal execution
|
|
260
|
+
const optimizedJobOrder = jobs.sort((a, b) =>
|
|
261
|
+
jobPriorities[b.id] - jobPriorities[a.id]
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
console.log(`Job prioritization completed in ${processingTime}ms (2.49x-7.47x faster)`);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### GNN-Enhanced Failure Prediction
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
// Build historical failure graph
|
|
271
|
+
const failureGraph = {
|
|
272
|
+
nodes: pastWorkflowRuns,
|
|
273
|
+
edges: buildFailureCorrelations(),
|
|
274
|
+
edgeWeights: calculateFailureProbabilities(),
|
|
275
|
+
nodeLabels: pastWorkflowRuns.map(r => `run-${r.id}`)
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// Predict potential failures with GNN
|
|
279
|
+
const riskAnalysis = await agentDB.gnnEnhancedSearch(
|
|
280
|
+
currentWorkflowEmbedding,
|
|
281
|
+
{
|
|
282
|
+
k: 10,
|
|
283
|
+
graphContext: failureGraph,
|
|
284
|
+
gnnLayers: 3,
|
|
285
|
+
filter: 'failed_runs'
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
console.log(`Predicted failure risks: ${riskAnalysis.map(r => r.riskFactor)}`);
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Adaptive Workflow Learning
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
// Continuous learning from workflow executions
|
|
296
|
+
const performanceTrends = await reasoningBank.getPatternStats({
|
|
297
|
+
task: 'workflow execution',
|
|
298
|
+
k: 100
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
console.log(`Performance improvement over time: ${performanceTrends.improvementPercent}%`);
|
|
302
|
+
console.log(`Common optimizations: ${performanceTrends.commonPatterns}`);
|
|
303
|
+
console.log(`Best practices emerged: ${performanceTrends.bestPractices}`);
|
|
304
|
+
|
|
305
|
+
// Auto-apply learned optimizations
|
|
306
|
+
if (performanceTrends.improvementPercent > 10) {
|
|
307
|
+
await applyLearnedOptimizations(performanceTrends.bestPractices);
|
|
308
|
+
}
|
|
309
|
+
```
|
|
42
310
|
|
|
43
311
|
## Core Features
|
|
44
312
|
|