π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
Checkpoint: File edits
rUvdced77342d4d
diff --git a/.claude/helpers/statusline.cjs b/.claude/helpers/statusline.cjsindex 92de31ca46..04448fcf9b 100644--- a/.claude/helpers/statusline.cjs+++ b/.claude/helpers/statusline.cjs@@ -24,7 +24,7 @@ const CONFIG = {showPerformance: true,refreshInterval: 5000,maxAgents: 15,- topology: 'hierarchical',+ topology: 'hierarchical-mesh',};// ANSI colors@@ -178,52 +178,50 @@ function getLearningStats() {return { patterns, sessions, trajectories };}-// Get V3 progress from learning state (grows as system learns)+// Get V3 progress from REAL metrics filesfunction getV3Progress() {const learning = getLearningStats();+ const totalDomains = 5;++ let dddProgress = 0;+ let dddScore = 0;+ let dddMaxScore = 100;+ let moduleCount = 0;- // Check for metrics file first (created by init)- const metricsPath = path.join(process.cwd(), '.claude-flow', 'metrics', 'v3-progress.json');- if (fs.existsSync(metricsPath)) {+ // Check ddd-progress.json for REAL DDD analysis+ const dddPath = path.join(process.cwd(), '.claude-flow', 'metrics', 'ddd-progress.json');+ if (fs.existsSync(dddPath)) {try {- const data = JSON.parse(fs.readFileSync(metricsPath, 'utf-8'));- if (data.domains) {- const domainsCompleted = data.domains.completed || 0;- const totalDomains = data.domains.total || 5;- // Use ddd.progress if provided and > 0, otherwise calculate from domains- const dddProgress = (data.ddd?.progress > 0)- ? data.ddd.progress- : Math.min(100, Math.floor((domainsCompleted / totalDomains) * 100));- return {- domainsCompleted,- totalDomains,- dddProgress,- patternsLearned: data.learning?.patternsLearned || learning.patterns,- sessionsCompleted: data.learning?.sessionsCompleted || learning.sessions- };- }+ const data = JSON.parse(fs.readFileSync(dddPath, 'utf-8'));+ dddProgress = data.progress || 0;+ dddScore = data.score || 0;+ dddMaxScore = data.maxScore || 100;+ moduleCount = data.modules ? Object.keys(data.modules).length : 0;} catch (e) {- // Fall through to pattern-based calculation+ // Ignore - use fallback}}- // DDD progress based on actual learned patterns- // New install: 0 patterns = 0/5 domains, 0% DDD- // As patterns grow: 10+ patterns = 1 domain, 50+ = 2, 100+ = 3, 200+ = 4, 500+ = 5- let domainsCompleted = 0;- if (learning.patterns >= 500) domainsCompleted = 5;- else if (learning.patterns >= 200) domainsCompleted = 4;- else if (learning.patterns >= 100) domainsCompleted = 3;- else if (learning.patterns >= 50) domainsCompleted = 2;- else if (learning.patterns >= 10) domainsCompleted = 1;-- const totalDomains = 5;- const dddProgress = Math.min(100, Math.floor((domainsCompleted / totalDomains) * 100));+ // Calculate domains completed from DDD progress (each 20% = 1 domain)+ let domainsCompleted = Math.min(5, Math.floor(dddProgress / 20));++ // Fallback: if no DDD data, use pattern-based calculation+ if (dddProgress === 0 && learning.patterns > 0) {+ if (learning.patterns >= 500) domainsCompleted = 5;+ else if (learning.patterns >= 200) domainsCompleted = 4;+ else if (learning.patterns >= 100) domainsCompleted = 3;+ else if (learning.patterns >= 50) domainsCompleted = 2;+ else if (learning.patterns >= 10) domainsCompleted = 1;+ dddProgress = Math.floor((domainsCompleted / totalDomains) * 100);+ }return {domainsCompleted,totalDomains,dddProgress,+ dddScore,+ dddMaxScore,+ moduleCount,patternsLearned: learning.patterns,sessionsCompleted: learning.sessions};@@ -358,15 +356,16 @@ function getSystemMetrics() {let memoryMB = 0;let subAgents = 0;- // Check learning.json first (works on all platforms)+ // Check learning.json first for REAL intelligence metricsconst learningMetricsPath = path.join(process.cwd(), '.claude-flow', 'metrics', 'learning.json');let intelligenceFromFile = null;let contextFromFile = null;if (fs.existsSync(learningMetricsPath)) {try {const data = JSON.parse(fs.readFileSync(learningMetricsPath, 'utf-8'));- if (data.routing?.accuracy !== undefined) {- intelligenceFromFile = Math.min(100, Math.floor(data.routing.accuracy));+ // Use intelligence.score (the REAL metric) instead of routing.accuracy+ if (data.intelligence?.score !== undefined) {+ intelligenceFromFile = Math.min(100, Math.floor(data.intelligence.score));}if (data.sessions?.total !== undefined) {contextFromFile = Math.min(100, data.sessions.total * 5);@@ -517,8 +516,29 @@ function getSystemMetrics() {};}-// Get ADR (Architecture Decision Records) status+// Get ADR (Architecture Decision Records) status from REAL compliance datafunction getADRStatus() {+ let compliance = 0;+ let totalChecks = 0;+ let compliantChecks = 0;+ let checks = {};++ // Check adr-compliance.json for REAL compliance data+ const compliancePath = path.join(process.cwd(), '.claude-flow', 'metrics', 'adr-compliance.json');+ if (fs.existsSync(compliancePath)) {+ try {+ const data = JSON.parse(fs.readFileSync(compliancePath, 'utf-8'));+ compliance = data.compliance || 0;+ checks = data.checks || {};+ totalChecks = Object.keys(checks).length;+ compliantChecks = Object.values(checks).filter(c => c.compliant).length;+ return { count: totalChecks, implemented: compliantChecks, compliance };+ } catch (e) {+ // Fall through to file-based detection+ }+ }++ // Fallback: count ADR files directlyconst adrPaths = [path.join(process.cwd(), 'docs', 'adrs'),path.join(process.cwd(), 'docs', 'adr'),@@ -540,7 +560,6 @@ function getADRStatus() {);count = files.length;- // Check for implemented status in ADR filesfor (const file of files) {try {const content = fs.readFileSync(path.join(adrPath, file), 'utf-8');@@ -559,7 +578,8 @@ function getADRStatus() {}}- return { count, implemented };+ compliance = count > 0 ? Math.floor((implemented / count) * 100) : 0;+ return { count, implemented, compliance };}// Get hooks status (enabled/registered hooks)@@ -1096,9 +1116,14 @@ function generateStatusline() {const vectorColor = agentdb.vectorCount > 0 ? c.brightGreen : c.dim;const testColor = tests.testFiles > 0 ? c.brightGreen : c.dim;+ // Show ADR compliance % if from real data, otherwise show count+ const adrDisplay = adrs.compliance > 0+ ? `${adrColor}β${adrs.compliance}%${c.reset}`+ : `${adrColor}β${adrs.implemented}/${adrs.count}${c.reset}`;+lines.push(`${c.brightPurple}π§ Architecture${c.reset} ` +- `${c.cyan}ADRs${c.reset} ${adrColor}β${adrs.implemented}/${adrs.count}${c.reset} ${c.dim}β${c.reset} ` ++ `${c.cyan}ADRs${c.reset} ${adrDisplay} ${c.dim}β${c.reset} ` +`${c.cyan}DDD${c.reset} ${dddColor}β${String(progress.dddProgress).padStart(3)}%${c.reset} ${c.dim}β${c.reset} ` +`${c.cyan}Security${c.reset} ${securityColor}β${security.status}${c.reset}`);diff --git a/.claude/settings.json b/.claude/settings.jsonindex 255f9b8b42..4d6c7cea0a 100644--- a/.claude/settings.json+++ b/.claude/settings.json@@ -32,7 +32,8 @@"CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true","CLAUDE_FLOW_V3_CLI_ENABLED": "true","CLAUDE_FLOW_V3_CLI_PATH": "/workspaces/claude-flow/v3/@claude-flow/cli/bin/cli.js",- "CLAUDE_FLOW_V3_INTELLIGENCE": "true"+ "CLAUDE_FLOW_V3_INTELLIGENCE": "true",+ "CLAUDE_FLOW_V3_ENABLED": "true"},"permissions": {"allowedTools": [@@ -173,12 +174,12 @@"timeout": 4000,"command": "/workspaces/claude-flow/.claude/helpers/learning-hooks.sh store \"Edit: $TOOL_INPUT_file_path\" code 0.7 2>/dev/null || true"},- {+ {"type": "command","timeout": 4000,"command": "node /workspaces/claude-flow/v3/@claude-flow/cli/bin/cli.js hooks post-edit --file \"$TOOL_INPUT_file_path\" --success true --train-patterns true --memory-key \"edit/$TOOL_INPUT_file_path\" 2>/dev/null || true"},- {+ {"type": "command","timeout": 10000,"command": "/workspaces/claude-flow/.claude/helpers/auto-commit.sh batch 'Checkpoint: File edits' 2>/dev/null || true"@@ -510,7 +511,13 @@"v3Configuration": {"domains": {"total": 5,- "names": ["task-management", "session-management", "health-monitoring", "lifecycle-management", "event-coordination"],+ "names": [+ "task-management",+ "session-management",+ "health-monitoring",+ "lifecycle-management",+ "event-coordination"+ ],"sourceDir": "src/domains"},"swarm": {@@ -567,5 +574,36 @@"commit": "Co-Authored-By: claude-flow <[email protected]>","pr": "π€ Generated with [claude-flow](https://github.com/ruvnet/claude-flow)"},- "enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]-}+ "enabledMcpjsonServers": [+ "claude-flow",+ "ruv-swarm"+ ],+ "claudeFlow": {+ "version": "3.0.0",+ "enabled": true,+ "agentTeams": {+ "enabled": true,+ "teammateMode": "auto",+ "taskListEnabled": true,+ "mailboxEnabled": true,+ "coordination": {+ "autoAssignOnIdle": true,+ "trainPatternsOnComplete": true,+ "notifyLeadOnComplete": true,+ "sharedMemoryNamespace": "agent-teams"+ },+ "hooks": {+ "teammateIdle": {+ "enabled": true,+ "autoAssign": true,+ "checkTaskList": true+ },+ "taskCompleted": {+ "enabled": true,+ "trainPatterns": true,+ "notifyLead": true+ }+ }+ }+ }+}\ No newline at end of filediff --git a/v3/@claude-flow/cli/src/init/executor.ts b/v3/@claude-flow/cli/src/init/executor.tsindex cc69c5814e..9a59327e5b 100644--- a/v3/@claude-flow/cli/src/init/executor.ts+++ b/v3/@claude-flow/cli/src/init/executor.ts@@ -254,9 +254,23 @@ export interface UpgradeResult {/*** Merge new settings into existing settings.json* Preserves user customizations while adding new features like Agent Teams+ * Uses platform-specific commands for Mac, Linux, and Windows*/function mergeSettingsForUpgrade(existing: Record<string, unknown>): Record<string, unknown> {const merged = { ...existing };+ const platform = detectPlatform();+ const isWindows = platform.os === 'windows';++ // Platform-specific command wrappers+ // Windows: Use PowerShell-compatible commands+ // Mac/Linux: Use bash-compatible commands with 2>/dev/null+ const teammateIdleCmd = isWindows+ ? 'npx @claude-flow/cli@latest hooks teammate-idle --auto-assign true 2>$null; exit 0'+ : 'npx @claude-flow/cli@latest hooks teammate-idle --auto-assign true 2>/dev/null || true';++ const taskCompletedCmd = isWindows+ ? 'if ($env:TASK_ID) { npx @claude-flow/cli@latest hooks task-completed --task-id $env:TASK_ID --train-patterns true 2>$null }; exit 0'+ : '[ -n "$TASK_ID" ] && npx @claude-flow/cli@latest hooks task-completed --task-id "$TASK_ID" --train-patterns true 2>/dev/null || true';// 1. Merge env vars (preserve existing, add new)const existingEnv = (existing.env as Record<string, string>) || {};@@ -278,7 +292,7 @@ function mergeSettingsForUpgrade(existing: Record<string, unknown>): Record<strihooks: [{type: 'command',- command: 'npx @claude-flow/cli@latest hooks teammate-idle --auto-assign true 2>/dev/null || true',+ command: teammateIdleCmd,timeout: 5000,continueOnError: true,},@@ -294,7 +308,7 @@ function mergeSettingsForUpgrade(existing: Record<string, unknown>): Record<strihooks: [{type: 'command',- command: '[ -n "$TASK_ID" ] && npx @claude-flow/cli@latest hooks task-completed --task-id "$TASK_ID" --train-patterns true 2>/dev/null || true',+ command: taskCompletedCmd,timeout: 5000,continueOnError: true,},