Skip to content

Feature/auggie orchestration#1

Open
rishitank wants to merge 49 commits intomainfrom
feature/auggie-orchestration
Open

Feature/auggie orchestration#1
rishitank wants to merge 49 commits intomainfrom
feature/auggie-orchestration

Conversation

@rishitank
Copy link
Copy Markdown
Owner

@rishitank rishitank commented Aug 11, 2025

This update removes lingering submodules (astropy_fix, claude-flow-wiki), fixes CI binary naming, hardens swarm-ui process handling, updates the smoke Jest config, and adds a new workflow 'Update Package Lockfile' to regenerate package-lock.json. To resolve the current npm ci ERESOLVE, trigger the new workflow with branch=feature/auggie-orchestration, which will run npm install --package-lock-only and push the updated lockfile.

Alternatively, locally run:

  • npm install --package-lock-only
  • git add package-lock.json
  • git commit -m "chore(lockfile): regenerate"
  • git push origin feature/auggie-orchestration

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 11, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

191 files out of 297 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds an Auggie-first engine adapter and runtime selection, auggie-flow CLI entrypoint and wrappers, multi-engine support across CLI and swarm paths, documentation and migration notes, smoke Jest tests and CI smoke workflow, dependency/security workflows, packaging/tooling updates, and related tests and config files.

Changes

Cohort / File(s) Summary of changes
CI Smoke Workflow
.github/workflows/ci-smoke.yml
New GitHub Actions workflow that sets up Node 20, runs npm ci, and executes smoke tests via tests/jest.smoke.config.js on push and pull_request.
CI Workflows & Security
.github/workflows/ci.yml, .github/workflows/dependency-review.yml, .github/workflows/security-audit.yml
CI updates: permissions/concurrency, renamed lint step to lint:core, added format:check, consolidated test step; new dependency-review and npm security-audit workflows.
Ignore Rules
.gitignore
Added "Worktrees" section ignoring .worktrees/.
Docs & Migration
README.md, docs/migration-to-auggie-flow.md, docs/migration/orchestrator-mcp.md, SECURITY.md
New/updated docs: Auggie Flow usage note, migration guides, orchestrator MCP doc, and security policy. Minor editorial fixes in README.
CLI Entrypoint & Packaging
bin/auggie-flow.js, package.json, bin/claude-flow.js
New dispatcher bin/auggie-flow.js; registered auggie-flow in package.json; updated devDependency versions, added lint:core and format:check, included bin in published files; updated branding strings in bin/claude-flow.js.
Shell Helpers
scripts/auggie-flow-wrapper.sh, scripts/spawn-auggie-terminal.sh
New wrapper to prefer local/monorepo/global auggie-flow and a cross‑platform terminal spawner that embeds prompt content and forwards args.
Engine Adapter (TS & JS)
src/cli/engine/engine-adapter.ts, src/cli/engine/engine-adapter.js
New adapter exposing detectEngine, resolveEngine, spawnEngine and Engine type to choose/spawn auggie or claude via env or PATH.
CLI Commands & Orchestrator
src/cli/commands/*.ts, src/cli/simple-cli.js, src/cli/simple-orchestrator.ts
Replaced hardcoded claude spawns with engine-aware spawnEngine, introduced AUGGIE_FLOW_ENGINE defaults, and updated logs/user-facing strings to reference Auggie where applicable.
Simple Commands & Swarm
src/cli/simple-commands/*.js, src/cli/simple-commands/swarm.js, src/swarm/claude-code-interface.ts
Dynamic engine selection for spawn calls, engine-wired defaults, expanded headless/non-interactive detection, background execution support, lifecycle event hooks, and spawn fallbacks.
Tests & Jest Smoke Config
tests/cli/auggie-flow-smoke.test.ts, tests/cli/engine-adapter.test.ts, tests/jest.smoke.config.js, tests/smoke.setup.js
Added smoke tests for auggie-flow and engine adapter, Jest smoke config and setup file setting CLAUDE_FLOW_ENV and defaulting AUGGIE_FLOW_ENGINE to auggie.
UI & Branding Edits
src/ui/**, src/ui/web-ui/core/*, src/ui/web-ui/views/GitHubIntegrationTest.js
Branding and UI key renames from Claude → Auggie, localStorage key update, MCP tool name prefix change, and a repository string update in a test.
Miscellaneous Editorials
README.md, various src/*
Minor formatting, string replacements (Claude → Auggie in user-facing text), and small refactors; no public API signature removals.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Bin as bin/auggie-flow.js
  participant Runtime as CLI runtime (JS/TS)
  participant EA as Engine Adapter
  participant Child as child_process
  participant Aug as auggie
  participant Cla as claude

  User->>Bin: invoke auggie-flow [args]
  Bin->>Runtime: dispatch to JS/TS runtime
  Runtime->>EA: resolveEngine(AUGGIE_FLOW_ENGINE?)
  EA-->>Runtime: 'auggie' or 'claude'
  Runtime->>Child: spawn(resolvedEngine, args, opts)
  alt resolvedEngine == 'auggie'
    Child->>Aug: execute Auggie binary
  else resolvedEngine == 'claude'
    Child->>Cla: execute Claude binary
  end
Loading
sequenceDiagram
  autonumber
  participant GitHub
  participant Runner as CI runner
  participant Node as actions/setup-node@v4
  participant NPM as npm ci
  participant Jest as npm test -- --config tests/jest.smoke.config.js

  GitHub-->>Runner: push / pull_request trigger
  Runner->>Node: setup Node 20
  Runner->>NPM: install dependencies
  Runner->>Jest: run smoke tests
  Jest-->>Runner: exit status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop through branches, a rabbit in code,
Choosing Auggie or Claude down the committal road.
Smoke tests tumble, wrappers spin bright,
Binaries bustle, workflows hum — CI's carrot light. 🥕

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/auggie-orchestration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

🔭 Outside diff range comments (6)
src/cli/simple-commands/swarm-ui.js (4)

547-559: Fix TDZ bug and shadowing of Node’s global process

const binary = process.env... runs in the same scope where const process = ... is declared next; this triggers a temporal dead zone error (and unintentionally shadows Node’s global process). Rename the child handle to avoid TDZ and shadowing.

-      const binary = process.env.AUGGIE_FLOW_BIN || 'auggie-flow';
-      const process = spawn(binary, args, {
+      const binary = process.env.AUGGIE_FLOW_BIN || 'auggie-flow';
+      const child = spawn(binary, args, {
         detached: true,
         stdio: 'ignore',
       });
 
-      process.unref();
+      child.unref();
 
       // Track the process for later termination
       const processId = `swarm-${Date.now()}`;
-      this.activeProcesses.set(processId, process);
+      this.activeProcesses.set(processId, child);
 
-      this.log(`Launched swarm with PID: ${process.pid} (ID: ${processId})`);
+      this.log(`Launched swarm with PID: ${child.pid} (ID: ${processId})`);

613-654: Unify orphaned-process detection across platforms and avoid hard-coded “claude-flow”

The Unix branch still greps for "claude-flow swarm". Also, define binName once and reuse in both branches for consistency.

   async stopOrphanedProcesses() {
     // Cross-platform approach to find and stop orphaned processes
     const { exec } = require('child_process');
     const os = require('os');
+    const binName = process.env.AUGGIE_FLOW_BIN || 'auggie-flow';
 
     if (os.platform() === 'win32') {
       // Windows: Use wmic to find and kill processes
-      const binName = process.env.AUGGIE_FLOW_BIN || 'auggie-flow';
       exec(
         `wmic process where "commandline like '%${binName} swarm%'" get processid`,
         (error, stdout) => {
           if (!error && stdout) {
             const pids = stdout
               .split('\n')
               .map((line) => line.trim())
               .filter((line) => /^\d+$/.test(line));
 
             pids.forEach((pid) => {
               exec(`taskkill /F /PID ${pid}`, (killError) => {
                 if (!killError) {
                   this.log(`Stopped orphaned process PID: ${pid}`);
                 }
               });
             });
           }
         },
       );
     } else {
       // Unix-like systems: Use ps and grep
-      exec('ps aux | grep "claude-flow swarm" | grep -v grep', (error, stdout) => {
+      exec(`ps aux | grep "${binName} swarm" | grep -v grep`, (error, stdout) => {
         if (!error && stdout) {
           const lines = stdout.split('\n').filter((line) => line.trim());
           lines.forEach((line) => {
             const parts = line.split(/\s+/);
             const pid = parts[1];
             if (pid && /^\d+$/.test(pid)) {
               try {
                 process.kill(parseInt(pid), 'SIGTERM');
                 this.log(`Stopped orphaned process PID: ${pid}`);
               } catch (killError) {
                 // Process might not exist or no permission
               }
             }
           });
         }
       });
     }
   }

571-606: Terminate full process trees on Windows for tracked processes

For tracked children, child.kill('SIGTERM') may not terminate child sub-processes on Windows. Use taskkill /T when on Windows; keep SIGTERM for Unix.

   async stopSwarm() {
     this.log('Stopping all swarm operations...');
 
     try {
       // Cross-platform process termination
       let stoppedCount = 0;
 
       // First, try to stop tracked processes
-      for (const [processId, process] of this.activeProcesses) {
+      const os = require('os');
+      const { exec } = require('child_process');
+      for (const [processId, child] of this.activeProcesses) {
         try {
           // Use process.kill() for cross-platform compatibility
-          if (process.pid && !process.killed) {
-            process.kill('SIGTERM');
+          if (child.pid && !child.killed) {
+            if (os.platform() === 'win32') {
+              exec(`taskkill /T /F /PID ${child.pid}`);
+            } else {
+              child.kill('SIGTERM');
+            }
             stoppedCount++;
-            this.log(`Stopped process ${processId} (PID: ${process.pid})`);
+            this.log(`Stopped process ${processId} (PID: ${child.pid})`);
           }
         } catch (err) {
           // Process might already be dead
           this.log(`Process ${processId} already terminated`, 'warn');
         }
       }

613-654: Provide PowerShell fallback for WMIC on Windows

To guard against WMIC being removed on modern Windows, wrap the existing wmic call so that if it errors, you fall back to a PowerShell CIM query. In src/cli/simple-commands/swarm-ui.js (lines 613–654), update the Windows branch as follows:

     if (os.platform() === 'win32') {
       // Windows: Use wmic to find and kill processes
       const binName = process.env.AUGGIE_FLOW_BIN || 'auggie-flow';
-      exec(
-        `wmic process where "commandline like '%${binName} swarm%'" get processid`,
-        (error, stdout) => {
-          if (!error && stdout) {
+      exec(
+        `wmic process where "commandline like '%${binName} swarm%'" get processid`,
+        (error, stdout) => {
+          if (!error && stdout) {
             const pids = stdout
               .split('\n')
               .map((line) => line.trim())
               .filter((line) => /^\d+$/.test(line));
 
             pids.forEach((pid) => {
               exec(`taskkill /F /PID ${pid}`, (killError) => {
                 if (!killError) {
                   this.log(`Stopped orphaned process PID: ${pid}`);
                 }
               });
             });
-          }
+          } else {
+            // WMIC unavailable → PowerShell fallback
+            const psCmd = [
+              'Get-CimInstance Win32_Process',
+              `| Where-Object { $_.CommandLine -match '${binName} swarm' }`,
+              '| ForEach-Object { $_.ProcessId }'
+            ].join(' ');
+            exec(`powershell -NoProfile -Command "${psCmd}"`, (psErr, psOut) => {
+              if (!psErr && psOut) {
+                psOut
+                  .trim()
+                  .split(/\r?\n/)
+                  .filter(Boolean)
+                  .forEach((pid) => {
+                    exec(`taskkill /F /PID ${pid}`);
+                  });
+              }
+            });
+          }
         },
       );

Verify that no other custom‐binary references are overlooked:

• Run
rg -n --no-heading 'auggie-flow swarm' -S

src/cli/simple-orchestrator.ts (1)

366-373: Bug: command name is dropped when spawning the CLI

You split the entered text but only pass cmdArgs to the child process, dropping the leading command token. simple-cli expects args[0] to be the command, so commands will be misrouted.

Pass the full args array (or prepend cmd):

-    const args = command.split(' ');
-    const cmd = args[0];
-    const cmdArgs = args.slice(1);
+    const args = command.split(' ');
+    const cmd = args[0];
+    const cmdArgs = args.slice(1);
@@
-    const child = spawn('node', [path.join(rootDir, 'src/cli/simple-cli.js'), ...cmdArgs], {
+    const child = spawn('node', [path.join(rootDir, 'src/cli/simple-cli.js'), cmd, ...cmdArgs], {
       stdio: ['pipe', 'pipe', 'pipe'],
       env: { ...process.env, CLAUDE_FLOW_WEB_MODE: 'true' },
     });

Additionally, consider robust resolution of the executable (see next comment).

src/cli/simple-commands/automation-executor.js (1)

227-241: Remove dead code in isClaudeAvailable method

The fallback logic (lines 234-240) is unreachable dead code. The detectPreferredEngine() function already checks for both auggie and claude commands, so if it returns null, neither is available. The subsequent execSync('which claude') check will never find Claude if detectPreferredEngine() didn't.

Simplify the method:

 async isClaudeAvailable() {
-  // Prefer Auggie if present
-  try {
-    const engine = await detectPreferredEngine();
-    return engine !== null;
-  } catch {}
-
-  try {
-    const { execSync } = await import('child_process');
-    execSync('which claude', { stdio: 'ignore' });
-    return true;
-  } catch {
-    return false;
-  }
+  const engine = detectPreferredEngine();
+  return engine !== null;
 }

Also note that if you fix detectPreferredEngine() to be synchronous as suggested earlier, this method doesn't need to be async either.

🧹 Nitpick comments (25)
src/cli/simple-commands/swarm-ui.js (5)

33-34: Branding consistency: update “Claude Flow” to “Auggie Flow”

The title and header still reference Claude Flow. Align with Auggie-Flow naming introduced by this PR.

-      title: 'Claude Flow - Swarm Control Center',
+      title: 'Auggie Flow - Swarm Control Center',
...
-      content: '{center}🐝 Claude Flow Swarm Control Center{/center}',
+      content: '{center}🐝 Auggie Flow Swarm Control Center{/center}',

Also applies to: 68-74


702-711: Improve clarity: avoid reusing identifier process for child handles

Within the cleanup loop, process shadows the Node global, which is confusing (even though it’s correct). Prefer a different name.

-    for (const [processId, process] of this.activeProcesses) {
+    for (const [processId, child] of this.activeProcesses) {
       try {
-        if (process.pid && !process.killed) {
-          process.kill('SIGTERM');
+        if (child.pid && !child.killed) {
+          child.kill('SIGTERM');
         }
       } catch (err) {
         // Ignore errors during cleanup
       }
     }

343-351: Shell execution from UI is unsafe; prefer spawn with args or sandboxing

exec runs an arbitrary shell command from the UI input. Even in a local CLI, this is a footgun. Consider either:

  • Restricting to a whitelist of supported actions, or
  • Parsing to command + args and using spawn with shell: false.

[security]

If you must keep it, display a prominent warning in the UI and guard with a config flag (e.g., AUGGIE_UI_ALLOW_SHELL).

Also applies to: 657-673


361-372: Set an explicit “running/monitoring” status when monitoring starts

status stays ‘idle’ unless stopSwarm sets ‘stopped’. Set a meaningful status during monitoring to reflect the actual state.

   async startMonitoring() {
     this.log('Starting swarm monitoring...');
 
     // Update interval
     this.updateInterval = setInterval(() => {
       this.updateSwarmData();
     }, 2000);
 
     // Initial update
-    await this.updateSwarmData();
+    this.swarmData.status = 'monitoring';
+    await this.updateSwarmData();
   }

Also applies to: 429-436


545-565: Key stability for activeProcesses

Using swarm-${Date.now()} risks collision if objectives are created within the same millisecond. Prefer a stable key such as PID.

-      const processId = `swarm-${Date.now()}`;
-      this.activeProcesses.set(processId, child);
+      const processId = `swarm-${child.pid}`;
+      this.activeProcesses.set(processId, child);
tests/smoke.setup.js (1)

1-3: Avoid hard-overriding test env; default if unset

To prevent clobbering a pre-configured test environment, set CLAUDE_FLOW_ENV only when not already defined.

-process.env.CLAUDE_FLOW_ENV = 'test';
+process.env.CLAUDE_FLOW_ENV = process.env.CLAUDE_FLOW_ENV || 'test';
README.md (3)

3-4: Clarify engine selection precedence and supported values

State explicitly that AUGGIE_FLOW_ENGINE supports 'auggie' and 'claude', and document precedence with CLI flags (if any), env var, and defaults. Link to the migration guide for details.


114-116: Provide Auggie-first examples alongside Claude flags

These examples still show --claude. Add parallel examples using AUGGIE_FLOW_ENGINE=auggie and/or auggie-flow to reinforce the new flow.

Example:

  • AUGGIE_FLOW_ENGINE=auggie npx claude-flow@alpha hive-mind spawn "user-management" --namespace users
  • auggie-flow hive-mind spawn "user-management" --namespace users

213-216: JSON snippet is valid, but clarify execution context

Since settings.json runs commands non-interactively, briefly note that 'npx' will resolve locally installed claude-flow and may incur network cost if not present. Optionally suggest absolute binary paths if predictability is required.

.github/workflows/ci-smoke.yml (1)

13-16: Enable dependency caching for faster CI

Cache npm to speed up the smoke job.

-      - uses: actions/setup-node@v4
-        with:
-          node-version: 20
+      - uses: actions/setup-node@v4
+        with:
+          node-version: 20
+          cache: 'npm'

Optional: add concurrency to cancel superseded PR runs.

docs/migration-to-auggie-flow.md (2)

5-8: Document supported engine values and default behaviour

Add a short note that AUGGIE_FLOW_ENGINE supports 'auggie' and 'claude', and what default is used when unset. Mention precedence if both env and CLI flags exist.


14-17: Clarify fallback and binary override precedence

Good call-out. Also specify that AUGGIE_FLOW_BIN affects UI spawns and how it interacts with AUGGIE_FLOW_ENGINE (which selects engine), to avoid confusion.

src/cli/simple-orchestrator.ts (2)

275-277: Branding consistency: update all console strings to Auggie-Flow

You updated the connect messages, but other UI strings still reference Claude-Flow (page title, input placeholder, command prompt on completion, help note).

Suggested updates (outside this hunk):

  • Title in HTML header: "🧠 Auggie-Flow Console"
  • Input placeholder: 'Enter auggie-flow command...'
  • On command_complete, prompt should be 'auggie-flow> '
  • Help note: 'web console interface for auggie-flow CLI commands'

341-343: Prompt mismatch on command completion

The prompt after command completion still shows 'claude-flow>'. Align with the updated prompt used when sending commands.

-        appendOutput('\n<span class="prompt">claude-flow> </span>');
+        appendOutput('\n<span class="prompt">auggie-flow> </span>');
tests/jest.smoke.config.js (1)

17-26: Migrate from deprecated 'globals' to transform options

The 'globals' configuration for ts-jest is deprecated. Consider moving these settings to the transform options for better compatibility with newer versions.

  transform: {
-    '^.+\\.(ts|tsx)$': ['ts-jest', { useESM: true, isolatedModules: true }],
+    '^.+\\.(ts|tsx)$': ['ts-jest', {
+      useESM: true,
+      isolatedModules: true,
+      tsconfig: {
+        esModuleInterop: true,
+        allowJs: true,
+        module: 'esnext'
+      }
+    }],
  },
  extensionsToTreatAsEsm: ['.ts', '.tsx', '.js'],
  moduleNameMapper: {
    // Allow importing ESM .js paths without breaking Jest
    '^(\\.{1,2}\\/.*)\\.js$': '$1',
  },
  setupFiles: [
    '<rootDir>/tests/smoke.setup.js'
  ],
-  globals: {
-    'ts-jest': {
-      useESM: true,
-      tsconfig: {
-        esModuleInterop: true,
-        allowJs: true,
-        module: 'esnext'
-      }
-    }
-  }
src/cli/engine/engine-adapter.js (3)

3-8: Add JSDoc documentation and input validation

Consider adding documentation and validating the preferred engine parameter to ensure type safety and better maintainability.

+/**
+ * Detects which engine to use based on preference and availability
+ * @param {string} [preferred] - Preferred engine ('auggie' or 'claude')
+ * @returns {string} The selected engine
+ */
 export function detectEngine(preferred) {
-  if (preferred) return preferred;
+  if (preferred) {
+    if (preferred !== 'auggie' && preferred !== 'claude') {
+      console.warn(`Invalid engine preference: ${preferred}. Using default detection.`);
+    } else {
+      return preferred;
+    }
+  }
   try { execSync('command -v auggie', { stdio: 'ignore', shell: true }); return 'auggie'; } catch {}
   try { execSync('command -v claude', { stdio: 'ignore', shell: true }); return 'claude'; } catch {}
   return 'claude';
 }

10-13: Add JSDoc documentation

Add documentation to improve code maintainability.

+/**
+ * Resolves the engine to use based on environment configuration
+ * @returns {string} The resolved engine
+ */
 export function resolveEngine() {
   const env = process.env.AUGGIE_FLOW_ENGINE;
   return detectEngine(env);
 }

15-18: Add JSDoc documentation and parameter validation

Document the function and consider validating the args parameter.

+/**
+ * Spawns an engine process with the given arguments
+ * @param {string[]} args - Command line arguments
+ * @param {object} opts - Spawn options
+ * @returns {ChildProcess} The spawned process
+ */
 export function spawnEngine(args, opts) {
+  if (!Array.isArray(args)) {
+    throw new TypeError('args must be an array');
+  }
   const engine = resolveEngine();
   return spawn(engine, args, opts);
 }
tests/cli/engine-adapter.test.ts (1)

16-21: Consider making the test more deterministic

The test accepts either 'auggie' or 'claude' as valid output, which could mask issues if the fallback logic changes unexpectedly. Consider mocking the command detection to make the test deterministic.

You could mock execSync to control which commands are "found" during testing, ensuring consistent and predictable test results.

src/swarm/claude-code-interface.ts (4)

162-162: Address the TODO comment

The TODO indicates that the verify method may need updating to check the selected engine. This should be addressed to ensure proper engine verification.

Would you like me to help implement the engine-specific verification logic or open an issue to track this task?


243-244: Simplify the engine override logic

The conditional assignment can be simplified since resolveEngine() already returns the appropriate engine.

-      // Override executable with engine preference (Auggie preferred)
-      command.executable = resolveEngine() === 'auggie' ? 'auggie' : command.executable;
+      // Override executable with resolved engine
+      command.executable = resolveEngine();

587-589: Consider improving readability of multi-line ternary expressions

Multi-line ternary expressions can be hard to read. Consider extracting them into variables or using if-else statements for better clarity.

For example, at lines 587-589:

-    const avgResponseTime = agents.length > 0
-      ? agents.reduce((sum, a) => sum + a.metrics.averageResponseTime, 0) / agents.length
-      : 0;
+    const avgResponseTime = agents.length > 0
+      ? agents.reduce((sum, a) => sum + a.metrics.averageResponseTime, 0) / agents.length
+      : 0;

Or better yet:

let avgResponseTime = 0;
if (agents.length > 0) {
  avgResponseTime = agents.reduce((sum, a) => sum + a.metrics.averageResponseTime, 0) / agents.length;
}

Also applies to: 1107-1109, 1113-1115


1235-1235: Simplify the complex ternary expression

The nested ternary expression is hard to read and maintain. Consider extracting the logic into a separate function or using a more straightforward approach.

-      claudeExecutablePath: (process.env.AUGGIE_FLOW_ENGINE ?? 'auggie') === 'auggie' ? 'auggie' : 'claude',
+      claudeExecutablePath: resolveEngine(),

Since you're already importing resolveEngine, use it directly for consistency.

tests/cli/auggie-flow-smoke.test.ts (1)

7-10: Add a timeout to spawnSync to avoid hanging CI

Smoke tests should fail fast if the child process stalls.

-function run(cmd: string, args: string[] = [], env: NodeJS.ProcessEnv = {}) {
-  const res = spawnSync(cmd, args, { encoding: 'utf-8', env: { ...process.env, ...env } });
+function run(cmd: string, args: string[] = [], env: NodeJS.ProcessEnv = {}) {
+  const res = spawnSync(cmd, args, {
+    encoding: 'utf-8',
+    env: { ...process.env, ...env },
+    timeout: 30000
+  });
   return { code: res.status ?? 0, out: (res.stdout || '') + (res.stderr || '') };
 }
src/cli/commands/claude.ts (1)

84-99: Good move to spawnEngine; update dry-run output to reflect engine

Spawn centralisation looks right. For consistency, print the resolved engine in the dry-run section too, not hardcoded “claude”.

Outside-hunk tweak (dry-run block):

-        console.log(chalk.gray(`claude ${claudeArgs.join(' ')}`));
+        const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
+        console.log(chalk.gray(`${engine} ${claudeArgs.join(' ')}`));
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02e1db0 and 775b598.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (25)
  • .github/workflows/ci-smoke.yml (1 hunks)
  • .gitignore (1 hunks)
  • README.md (9 hunks)
  • bin/auggie-flow.js (1 hunks)
  • docs/migration-to-auggie-flow.md (1 hunks)
  • package.json (3 hunks)
  • scripts/auggie-flow-wrapper.sh (1 hunks)
  • scripts/spawn-auggie-terminal.sh (1 hunks)
  • src/cli/commands/claude.ts (3 hunks)
  • src/cli/commands/index.ts (1 hunks)
  • src/cli/commands/sparc.ts (1 hunks)
  • src/cli/commands/swarm.ts (2 hunks)
  • src/cli/engine/engine-adapter.js (1 hunks)
  • src/cli/engine/engine-adapter.ts (1 hunks)
  • src/cli/simple-cli.js (1 hunks)
  • src/cli/simple-commands/automation-executor.js (65 hunks)
  • src/cli/simple-commands/sparc.js (1 hunks)
  • src/cli/simple-commands/swarm-ui.js (2 hunks)
  • src/cli/simple-commands/swarm.js (32 hunks)
  • src/cli/simple-orchestrator.ts (4 hunks)
  • src/swarm/claude-code-interface.ts (26 hunks)
  • tests/cli/auggie-flow-smoke.test.ts (1 hunks)
  • tests/cli/engine-adapter.test.ts (1 hunks)
  • tests/jest.smoke.config.js (1 hunks)
  • tests/smoke.setup.js (1 hunks)
🔥 Files not summarized due to errors (1)
  • src/cli/simple-commands/swarm-ui.js: Error: Server error: no LLM provider could handle the message
🧰 Additional context used
🧬 Code Graph Analysis (13)
src/cli/simple-commands/swarm-ui.js (2)
bin/auggie-flow.js (1)
  • args (24-24)
src/cli/simple-commands/github/init.js (1)
  • exec (12-12)
src/cli/engine/engine-adapter.js (3)
src/cli/engine/engine-adapter.ts (3)
  • detectEngine (5-10)
  • resolveEngine (12-15)
  • spawnEngine (17-20)
src/cli/simple-commands/sparc.js (2)
  • env (446-446)
  • engine (448-448)
bin/auggie-flow.js (1)
  • args (24-24)
bin/auggie-flow.js (1)
src/cli/simple-commands/swarm.js (4)
  • __filename (1244-1244)
  • __dirname (1245-1245)
  • cleanup (70-73)
  • cleanup (813-819)
src/cli/simple-cli.js (3)
src/cli/simple-commands/swarm.js (5)
  • engine (795-795)
  • engine (920-920)
  • claudeArgs (784-784)
  • claudeArgs (900-900)
  • claudeArgs (1396-1396)
src/cli/engine/engine-adapter.js (1)
  • engine (16-16)
src/cli/simple-commands/sparc.js (3)
  • engine (448-448)
  • child (450-454)
  • claudeArgs (349-349)
src/cli/simple-commands/sparc.js (4)
src/cli/simple-commands/swarm.js (5)
  • engine (795-795)
  • engine (920-920)
  • claudeArgs (784-784)
  • claudeArgs (900-900)
  • claudeArgs (1396-1396)
src/cli/engine/engine-adapter.js (1)
  • engine (16-16)
src/cli/simple-cli.js (3)
  • engine (1532-1532)
  • child (1533-1547)
  • claudeArgs (1501-1501)
bin/auggie-flow.js (2)
  • child (43-47)
  • child (78-81)
scripts/spawn-auggie-terminal.sh (1)
src/cli/simple-cli.js (2)
  • command (226-226)
  • command (471-477)
src/cli/commands/sparc.ts (3)
src/cli/simple-commands/swarm.js (5)
  • engine (795-795)
  • engine (920-920)
  • claudeArgs (784-784)
  • claudeArgs (900-900)
  • claudeArgs (1396-1396)
src/cli/engine/engine-adapter.js (1)
  • engine (16-16)
src/cli/simple-commands/sparc.js (3)
  • engine (448-448)
  • child (450-454)
  • claudeArgs (349-349)
src/cli/simple-orchestrator.ts (3)
src/cli/simple-commands/swarm-ui.js (1)
  • path (10-10)
src/cli/simple-commands/swarm.js (4)
  • path (1090-1090)
  • path (1239-1239)
  • path (1530-1530)
  • __dirname (1245-1245)
bin/auggie-flow.js (1)
  • __dirname (16-16)
src/cli/commands/claude.ts (4)
src/cli/simple-commands/swarm.js (2)
  • engine (795-795)
  • engine (920-920)
src/cli/engine/engine-adapter.js (2)
  • engine (16-16)
  • spawnEngine (15-18)
src/cli/simple-cli.js (1)
  • engine (1532-1532)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
src/cli/commands/swarm.ts (3)
src/cli/simple-commands/swarm.js (3)
  • claudeArgs (784-784)
  • claudeArgs (900-900)
  • claudeArgs (1396-1396)
src/cli/simple-commands/sparc.js (1)
  • claudeArgs (349-349)
src/cli/simple-cli.js (1)
  • claudeArgs (1501-1501)
src/cli/engine/engine-adapter.ts (4)
src/cli/simple-commands/sparc.js (2)
  • env (446-446)
  • engine (448-448)
src/cli/simple-cli.js (2)
  • env (271-271)
  • engine (1532-1532)
bin/auggie-flow.js (1)
  • args (24-24)
src/cli/simple-commands/swarm.js (3)
  • args (2204-2204)
  • engine (795-795)
  • engine (920-920)
src/cli/simple-commands/automation-executor.js (3)
src/cli/simple-commands/swarm.js (8)
  • claudeProcess (796-799)
  • claudeProcess (921-924)
  • claudeProcess (1404-1407)
  • engine (795-795)
  • engine (920-920)
  • claudeArgs (784-784)
  • claudeArgs (900-900)
  • claudeArgs (1396-1396)
src/cli/engine/engine-adapter.js (1)
  • engine (16-16)
src/cli/simple-cli.js (2)
  • engine (1532-1532)
  • claudeArgs (1501-1501)
src/cli/simple-commands/swarm.js (1)
src/cli/engine/engine-adapter.js (2)
  • env (11-11)
  • engine (16-16)
🪛 Biome (2.1.2)
src/cli/simple-commands/swarm-ui.js

[error] 547-547: This variable is used before its declaration.

The variable is declared here:

(lint/correctness/noInvalidUseBeforeDeclaration)

🪛 Shellcheck (0.10.0)
scripts/auggie-flow-wrapper.sh

[warning] 11-11: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 16-16: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 21-21: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 26-26: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

scripts/spawn-auggie-terminal.sh

[warning] 6-6: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

(SC2124)

🪛 ESLint
src/cli/simple-orchestrator.ts

[error] 705-705: 'cliPath' is assigned a value but never used.

(@typescript-eslint/no-unused-vars)

src/cli/commands/swarm.ts

[error] 490-490: Unnecessary escape character: ".

(no-useless-escape)


[error] 490-490: Unnecessary escape character: ".

(no-useless-escape)

src/cli/engine/engine-adapter.ts

[error] 7-7: Empty block statement.

(no-empty)


[error] 8-8: Empty block statement.

(no-empty)

🔇 Additional comments (16)
.gitignore (1)

136-139: Sensible ignore for local Git worktrees

Adding .worktrees/ under a clear “Worktrees” section is a good safeguard to avoid committing auxiliary worktree folders. No conflicts with .git/worktrees (already excluded via .git/). LGTM.

src/cli/simple-commands/swarm-ui.js (1)

615-634: Good: bin name is now configurable on Windows orphan scan

Using process.env.AUGGIE_FLOW_BIN || 'auggie-flow' to build the WMIC query aligns with Auggie-first orchestration.

README.md (6)

64-66: Documentation change looks fine

No functional impact. Nothing to fix here.


147-149: LGTM

The memory command line is consistent with the rest of the doc.


187-189: LGTM

The hook description is consistent.


436-438: LGTM

Consistent with the MCP servers described elsewhere.


625-629: LGTM

Help references align with the commands listed.


867-869: LGTM

Minor wording change; no action.

package.json (1)

158-160: Verify ESLint/TS plugin compatibility with upgrades

Upgrading to typescript-eslint v8 and TypeScript 5.9 is fine in general, but ensure your ESLint config is aligned (rules renamed/removed) and CI still passes lint.

Run locally:

  • npm run lint
  • npm run typecheck

If issues arise, consider pinning matching eslint version/rules or applying the codemods from typescript-eslint v8 release notes.

Also applies to: 172-174

.github/workflows/ci-smoke.yml (1)

19-23: LGTM

Explicitly setting AUGGIE_FLOW_ENGINE ensures deterministic engine paths during smoke tests.

src/cli/engine/engine-adapter.ts (1)

1-21: Well-structured TypeScript implementation

The TypeScript implementation provides good type safety with the Engine type and proper typing for all functions. The empty catch blocks are acceptable here as they're used for fallback logic when commands aren't found.

src/cli/commands/claude.ts (1)

156-171: Batch path: consistent engine logging and spawning is correct

Engine-aware logging plus spawnEngine is consistent with the adapter. Looks good.

src/cli/simple-commands/automation-executor.js (1)

347-347: Good generalisation of error message

The change from "Claude instance error" to "Engine instance error" appropriately reflects the multi-engine support.

src/cli/simple-commands/swarm.js (3)

272-277: Well-structured health check response

The enhanced health check endpoint returns comprehensive JSON with service name, version, and timestamp - excellent for container orchestration and monitoring systems.


849-852: Comprehensive non-interactive mode detection

Good defensive programming - the non-interactive detection considers multiple flags and environment conditions, ensuring proper behaviour in various deployment scenarios.


1575-1580: Well-structured health check response with traceability

The health endpoint returns comprehensive information including swarmId for traceability and debugging - excellent for production monitoring.

Comment thread bin/auggie-flow.js
Comment thread package.json Outdated
Comment on lines +1 to +3
#!/usr/bin/env bash
# Auggie-Flow local wrapper
# Ensures auggie-flow runs from your project directory
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Harden the shell script: strict mode and robust error handling

Enable strict mode to catch failures early.

-#!/usr/bin/env bash
+#!/usr/bin/env bash
+set -euo pipefail
🤖 Prompt for AI Agents
In scripts/auggie-flow-wrapper.sh around lines 1 to 3, the script lacks strict
mode and robust error handling; enable strict mode by adding set -euo pipefail
and a safe IFS (e.g. IFS=$'\n\t'), resolve and cd to the script's project
directory using a safe dirname/realpath pattern and check the cd return status
(exit with a clear error on failure), and ensure all variable usages are quoted
to avoid word-splitting and globbing issues.

Comment on lines +9 to +18
# Prefer local bin
if [ -f "${PROJECT_DIR}/node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}"
exec "${PROJECT_DIR}/node_modules/.bin/auggie-flow" "$@"

# Monorepo parent bin
elif [ -f "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}"
exec "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" "$@"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Handle cd failures and preserve quoting

Use 'cd ... || exit 1' to satisfy SC2164 and ensure robust behaviour.

 if [ -f "${PROJECT_DIR}/node_modules/.bin/auggie-flow" ]; then
-  cd "${PROJECT_DIR}"
+  cd "${PROJECT_DIR}" || exit 1
   exec "${PROJECT_DIR}/node_modules/.bin/auggie-flow" "$@"
 
 # Monorepo parent bin
 elif [ -f "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" ]; then
-  cd "${PROJECT_DIR}"
+  cd "${PROJECT_DIR}" || exit 1
   exec "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" "$@"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Prefer local bin
if [ -f "${PROJECT_DIR}/node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}"
exec "${PROJECT_DIR}/node_modules/.bin/auggie-flow" "$@"
# Monorepo parent bin
elif [ -f "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}"
exec "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" "$@"
# Prefer local bin
if [ -f "${PROJECT_DIR}/node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}" || exit 1
exec "${PROJECT_DIR}/node_modules/.bin/auggie-flow" "$@"
# Monorepo parent bin
elif [ -f "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" ]; then
cd "${PROJECT_DIR}" || exit 1
exec "${PROJECT_DIR}/../node_modules/.bin/auggie-flow" "$@"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 11-11: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 16-16: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🤖 Prompt for AI Agents
In scripts/auggie-flow-wrapper.sh around lines 9 to 18, the shell script uses cd
"${PROJECT_DIR}" without handling failures and triggers SC2164; update both cd
invocations to explicitly handle failure by appending '|| exit 1' (preserving
the existing double-quoted "${PROJECT_DIR}" usage) so the script exits if the cd
fails and retains correct argument quoting.

Comment on lines +19 to +28
# Global installation
elif command -v auggie-flow &> /dev/null; then
cd "${PROJECT_DIR}"
exec auggie-flow "$@"

# Fallback to executing JS directly
else
cd "${PROJECT_DIR}"
node ./bin/auggie-flow.js "$@" || npx --yes auggie-flow@latest "$@"
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Continue: handle cd failures and JS fallback exit codes

  • Guard cd as above.
  • For fallback, prefer exec for both node and npx to ensure correct exit codes propagate.
 elif command -v auggie-flow &> /dev/null; then
-  cd "${PROJECT_DIR}"
+  cd "${PROJECT_DIR}" || exit 1
   exec auggie-flow "$@"
 
 # Fallback to executing JS directly
 else
-  cd "${PROJECT_DIR}"
-  node ./bin/auggie-flow.js "$@" || npx --yes auggie-flow@latest "$@"
+  cd "${PROJECT_DIR}" || exit 1
+  if [ -f "./bin/auggie-flow.js" ]; then
+    exec node ./bin/auggie-flow.js "$@"
+  else
+    exec npx --yes auggie-flow@latest "$@"
+  fi
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Global installation
elif command -v auggie-flow &> /dev/null; then
cd "${PROJECT_DIR}"
exec auggie-flow "$@"
# Fallback to executing JS directly
else
cd "${PROJECT_DIR}"
node ./bin/auggie-flow.js "$@" || npx --yes auggie-flow@latest "$@"
fi
# Global installation
elif command -v auggie-flow &> /dev/null; then
cd "${PROJECT_DIR}" || exit 1
exec auggie-flow "$@"
# Fallback to executing JS directly
else
cd "${PROJECT_DIR}" || exit 1
if [ -f "./bin/auggie-flow.js" ]; then
exec node ./bin/auggie-flow.js "$@"
else
exec npx --yes auggie-flow@latest "$@"
fi
fi
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 21-21: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 26-26: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🤖 Prompt for AI Agents
In scripts/auggie-flow-wrapper.sh around lines 19 to 28, the current branch
assumes cd to PROJECT_DIR always succeeds and uses a plain node invocation that
can mask or not propagate exit codes; update the block to check the cd command
(exit non-zero if it fails) before running the fallback, and use exec for both
the node invocation and the npx fallback so the called process replaces the
shell and its exit code propagates; in short, guard cd with a conditional/||
exit, then exec node ./bin/auggie-flow.js "$@" || exec npx --yes
auggie-flow@latest "$@".

Comment thread src/cli/simple-commands/sparc.js Outdated
Comment on lines 448 to 453
const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
console.log(`\n📡 Spawning ${engine === 'auggie' ? 'auggie' : 'claude'} process...\n`);
const child = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
cwd: cwd(),
env: env,
stdio: 'inherit'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use engine-adapter and align diagnostics to the resolved engine

Avoid duplicating engine selection. Use resolveEngine/spawnEngine and update the visible command and “which” check to match the selected engine.

Within this hunk:

-    const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
-    console.log(`\n📡 Spawning ${engine === 'auggie' ? 'auggie' : 'claude'} process...\n`);
-    const child = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
+    const { resolveEngine, spawnEngine } = await import('../engine/engine-adapter.js');
+    const engine = resolveEngine();
+    console.log(`\n📡 Spawning ${engine === 'auggie' ? 'auggie' : 'claude'} process...\n`);
+    const child = spawnEngine(claudeArgs, {
       cwd: cwd(),
       env: env,
       stdio: 'inherit'
     });

Also adjust earlier debug lines and check:

-    console.log('\n🔍 Debug: Executing claude with:');
-    console.log('Command: claude');
+    console.log('\n🔍 Debug: Executing engine with:');
+    console.log(`Command: ${engine}`);

-        const child = spawn('which', ['claude'], {
+        const child = spawn('which', [engine], {

And exception text:

-    printError(`Failed to execute Claude: ${err.message}`);
+    printError(`Failed to execute engine: ${err.message}`);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
console.log(`\n📡 Spawning ${engine === 'auggie' ? 'auggie' : 'claude'} process...\n`);
const child = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
cwd: cwd(),
env: env,
stdio: 'inherit'
const { resolveEngine, spawnEngine } = await import('../engine/engine-adapter.js');
const engine = resolveEngine();
console.log(`\n📡 Spawning ${engine === 'auggie' ? 'auggie' : 'claude'} process...\n`);
const child = spawnEngine(claudeArgs, {
cwd: cwd(),
env: env,
stdio: 'inherit'
});
🤖 Prompt for AI Agents
In src/cli/simple-commands/sparc.js around lines 448 to 453, you’re duplicating
engine selection and hardcoding 'auggie' vs 'claude'; replace that with the
shared resolver and spawner: call resolveEngine (or the module function that
returns the chosen engine) to get the resolved engine name, use spawnEngine (or
spawn wrapper) to start the process instead of spawn(...) with inline ternary,
and update the console message, the earlier debug/which check and any exception
text to reference the resolved engine value so the visible command and
diagnostic "which" check always match the engine actually used. Ensure env, cwd
and stdio are preserved when delegating to spawnEngine.

Comment thread src/cli/simple-commands/swarm.js
Comment thread src/cli/simple-commands/swarm.js Outdated
Comment on lines +703 to 706
// Determine the correct auggie-flow executable path
const rootDir = path.resolve(__dirname, '../..');
const cliPath = path.join(rootDir, 'bin', 'claude-flow');
const cliPath = path.join(rootDir, 'bin', 'auggie-flow');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Unused variable and fragile path resolution to CLI entry

  • cliPath is computed but never used (lint error).
  • Spawning 'src/cli/simple-cli.js' will fail in published builds where only dist/ exists.

Use a robust resolution order and include the command token; prefer the new bin 'auggie-flow.js' when present. Minimal change within this hunk:

-  // Determine the correct auggie-flow executable path
-  const rootDir = path.resolve(__dirname, '../..');
-  const cliPath = path.join(rootDir, 'bin', 'auggie-flow');
+  // Determine the correct auggie-flow executable path(s)
+  const rootDir = path.resolve(__dirname, '../..');
+  const cliJsBin = path.join(rootDir, 'bin', 'auggie-flow.js');
+  const distSimpleCli = path.join(rootDir, 'dist', 'cli', 'simple-cli.js');
+  const srcSimpleCli = path.join(rootDir, 'src', 'cli', 'simple-cli.js');
@@
-  const child = spawn('node', [path.join(rootDir, 'src/cli/simple-cli.js'), ...cmdArgs], {
+  // Prefer JS bin, then dist, then src
+  const entry = [cliJsBin, distSimpleCli, srcSimpleCli].find((p) => {
+    try { return require('fs').existsSync(p); } catch { return false; }
+  }) || srcSimpleCli;
+  const child = spawn(process.execPath, [entry, cmd, ...cmdArgs], {
     stdio: ['pipe', 'pipe', 'pipe'],
-    env: { ...process.env, CLAUDE_FLOW_WEB_MODE: 'true' },
+    env: {
+      ...process.env,
+      CLAUDE_FLOW_WEB_MODE: 'true',
+      AUGGIE_FLOW_WEB_MODE: 'true'
+    },
   });

Outside this hunk, add:

  • import fs from 'fs';

This resolves the lint error and ensures the orchestrator works in both dev (src) and build (dist/bin) layouts.

Also applies to: 708-711

🧰 Tools
🪛 ESLint

[error] 705-705: 'cliPath' is assigned a value but never used.

(@typescript-eslint/no-unused-vars)

Comment thread tests/jest.smoke.config.js Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
package.json (1)

7-8: Ensure auggie-flow binary is published and executable

The new bin mapping is good, but bin/auggie-flow.js isn’t in the package “files” allowlist, so it will be omitted from published packages and the binary will break for consumers. Also verify it has a shebang and executable mode in git.

Apply:

   "files": [
     "cli.js",
     "bin/claude-flow.js",
+    "bin/auggie-flow.js",
     "bin/claude-flow",
     "bin/claude-flow-dev",
     "bin/claude-flow-pkg.js",

Verification script:

#!/bin/bash
set -euo pipefail

echo "Checking package.json 'files' includes bin/auggie-flow.js..."
jq -r '.files[]' package.json | grep -qx 'bin/auggie-flow.js' && echo "OK" || { echo "Missing bin/auggie-flow.js in files"; exit 1; }

echo "Checking file existence..."
test -f bin/auggie-flow.js && echo "OK" || { echo "bin/auggie-flow.js not found"; exit 1; }

echo "Checking shebang..."
head -n1 bin/auggie-flow.js | grep -qE '^#! */usr/bin/env node' && echo "OK" || { echo "Missing/incorrect shebang"; exit 1; }

echo "Checking executable bit in git..."
# mode 100755 indicates executable in git index
git ls-files -s bin/auggie-flow.js | awk '{print $1}' | grep -q '100755' && echo "OK" || { echo "File not marked executable in git (chmod +x and commit)"; exit 1; }
🧹 Nitpick comments (2)
package.json (2)

47-47: Minor: simplify lint:core paths

src/cli already covers src/cli/engine; you can drop the redundant path to keep the command terse.

Apply:

-"lint:core": "eslint src/cli src/cli/engine src/swarm --ext .ts --max-warnings 0",
+"lint:core": "eslint src/cli src/swarm --ext .ts --max-warnings 0",

159-160: typescript-eslint dependency shape: avoid redundancy or config mismatch

You’re pinning both the legacy pair (@typescript-eslint/eslint-plugin + @typescript-eslint/parser) and the new meta package (typescript-eslint). Unless you’ve migrated to the flat config using the meta package, this is redundant and can confuse tooling.

  • If using traditional ESLint config (.eslintrc.*), keep plugin + parser and remove typescript-eslint.
  • If using flat config with typescript-eslint, drop the separate plugin/parser and update config accordingly; also ensure eslint version compatibility.

Option A (keep classic setup):

   "devDependencies": {
     ...
-    "typescript-eslint": "^8.39.0"
+    // Removed meta package; using plugin + parser
   }

Option B (use flat config):

   "devDependencies": {
     ...
-    "@typescript-eslint/eslint-plugin": "^8.39.0",
-    "@typescript-eslint/parser": "^8.39.0",
+    // Using unified meta pkg with flat config
+    "typescript-eslint": "^8.39.0",
     ...
   }

Please confirm which ESLint config you intend to use so we can align dependencies.

Also applies to: 173-174

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 775b598 and ce23bf3.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml (1 hunks)
  • package.json (4 hunks)

Comment thread .github/workflows/ci.yml
Comment on lines +38 to +39
- name: Lint core
run: npm run lint:core
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Lint coverage narrowed to core paths — confirm intent or keep full coverage

Switching from npm run lint (which lints src) to lint:core (src/cli and src/swarm) may miss issues in other folders (e.g., monitoring, server, utils). If unintentional, keep full coverage or run both.

Option 1: keep full coverage

-      - name: Lint core
-        run: npm run lint:core
+      - name: Lint
+        run: npm run lint

Option 2: run both (strict on core, broad elsewhere)

       - name: Lint core
         run: npm run lint:core
+      - name: Lint (broad)
+        run: npm run lint || true

Confirm which directories should be enforced in CI at this stage.


🏁 Script executed:

#!/bin/bash
set -eo pipefail

echo "=== package.json lint scripts ==="
grep -R '"lint"' -n package.json || true

echo
echo "=== CI workflow lint steps ==="
grep -R "lint" -n .github/workflows/ci.yml || true

echo
echo "=== CI workflow context (lines 30–60) ==="
sed -n '30,60p' .github/workflows/ci.yml || true

Length of output: 1243


🏁 Script executed:

#!/bin/bash
set -eo pipefail

echo "=== Checking for lint:core definition in package.json ==="
grep -R '"lint:core"' -n package.json || echo "No lint:core script in package.json found"

echo
echo "=== Searching entire project for lint:core references ==="
grep -R "lint:core" -n .

Length of output: 597


🏁 Script executed:

#!/bin/bash
set -eo pipefail

echo "=== Listing subdirectories in src ==="
find src -maxdepth 1 -type d | sed '1d'

Length of output: 552


Lint coverage restricted to core modules – please confirm or adjust

The lint:core script (package.json line 47) only runs ESLint on src/cli, src/cli/engine and src/swarm. All other src/… directories (e.g. src/monitoring, src/utils, src/services etc.) are omitted from CI.

Please choose one of the following or propose a tailored set of directories:

• Keep full coverage

 .github/workflows/ci.yml (lines 38-39)
-      - name: Lint core
-        run: npm run lint:core
+      - name: Lint
+        run: npm run lint

• Run both strict core and broad lint

 .github/workflows/ci.yml (after line 39)
       - name: Lint core
         run: npm run lint:core
+      - name: Lint (all src)
+        run: npm run lint

• Extend lint:core to include additional directories in package.json if you intend to narrow linting to a specific subset.

Confirm which directories must be enforced in CI.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Lint core
run: npm run lint:core
- name: Lint
run: npm run lint
🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 38-39: CI currently runs the npm script
"lint:core" which only lints src/cli, src/cli/engine and src/swarm, omitting
other src directories; decide which directories must be enforced in CI and
either (A) change the workflow to run full lint (npm run lint) for all src/, (B)
run both strict core and a broader lint step (add a second job/step invoking npm
run lint:all or similar), or (C) expand the "lint:core" script in package.json
to include the additional directories you want checked (e.g., src/monitoring,
src/utils, src/services) and then keep the workflow as-is — update the workflow
and/or package.json accordingly to reflect the chosen coverage.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
package.json (1)

7-8: Include bin/auggie-flow.js in published files to avoid a broken CLI for consumers

The new bin entry maps to bin/auggie-flow.js, but that file isn’t in the "files" whitelist. It will be omitted from the published package, breaking the "auggie-flow" command.

Apply this change to the "files" array:

   "files": [
     "cli.js",
     "bin/claude-flow.js",
+    "bin/auggie-flow.js",
     "bin/claude-flow",
     "bin/claude-flow-dev",
     "bin/claude-flow-pkg.js",
     "bin/claude-flow-swarm",
     "bin/claude-flow-swarm-background",
#!/bin/bash
set -euo pipefail

echo "Checking package.json entries…"
jq -r '.bin' package.json
echo
echo "Verifying files whitelist contains bin/auggie-flow.js…"
if jq -e '.files[] | select(. == "bin/auggie-flow.js")' package.json >/dev/null; then
  echo "OK: files array includes bin/auggie-flow.js"
else
  echo "FAIL: files array missing bin/auggie-flow.js" && exit 1
fi

echo
echo "Checking that bin/auggie-flow.js exists, has a shebang, and is executable in git…"
test -f bin/auggie-flow.js || { echo "FAIL: bin/auggie-flow.js missing"; exit 1; }
head -n1 bin/auggie-flow.js | grep -qE '^#!.*/env node|^#!.*/node' || { echo "FAIL: missing Node shebang"; exit 1; }
# Check git mode 100755 (executable)
mode=$(git ls-files --stage -- bin/auggie-flow.js | awk '{print $1}')
if [ "$mode" != "100755" ]; then
  echo "FAIL: bin/auggie-flow.js not executable in repo (mode=$mode). Run: git update-index --chmod=+x bin/auggie-flow.js"
  exit 1
else
  echo "OK: bin/auggie-flow.js is executable (git mode 100755)"
fi
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce23bf3 and efd51f8.

📒 Files selected for processing (1)
  • package.json (4 hunks)
🔇 Additional comments (1)
package.json (1)

47-47: LGTM on lint:core

Targeted linting for core CLI/engine/swarm is sensible and non-breaking.

Comment thread package.json
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🔭 Outside diff range comments (11)
docs/migration/orchestrator-mcp.md (1)

36-36: Remove stray line “36”.

Looks like an artefact accidentally committed at the end of the file.

Apply this diff to delete it:

-36
src/cli/simple-commands/swarm.js (10)

256-266: Duplicate headless-mode configuration with inconsistent defaults

Headless flags are applied twice with different defaults ('stream-json' vs 'json'), which is confusing and error-prone. Consolidate into a single helper and call it with the intended default.

@@
-  if (flags && flags.headless) {
-    const isHeadless = isHeadlessEnvironment();
-    // Configure for headless mode
-    flags = {
-      ...flags,
-      'non-interactive': true,
-      'output-format': flags['output-format'] || 'stream-json', // Use stream-json for Claude compatibility
-      'no-auto-permissions': false,
-    };
-  }
+  if (flags && flags.headless) {
+    flags = applyHeadlessFlags(flags, { outputFormatDefault: 'stream-json' });
+  }
@@
-  if (flags && flags.headless) {
-    const isHeadless = isHeadlessEnvironment();
-    if (!isHeadless) {
-      console.log('🤖 Forcing headless mode as requested');
-    }
-    flags = {
-      ...flags,
-      'non-interactive': true,
-      'output-format': flags['output-format'] || 'json',
-      'no-auto-permissions': false,
-    };
-  }
+  if (flags && flags.headless) {
+    if (!isHeadlessEnvironment()) {
+      console.log('🤖 Forcing headless mode as requested');
+    }
+    flags = applyHeadlessFlags(flags, { outputFormatDefault: 'json' });
+  }

Add this helper near the top of the module:

function applyHeadlessFlags(flags, { outputFormatDefault }) {
  return {
    ...flags,
    'non-interactive': true,
    'output-format': flags['output-format'] || outputFormatDefault,
    'no-auto-permissions': false,
  };
}

Also applies to: 297-309


312-317: Broaden non-interactive detection to match later logic and headless state

Top-level isNonInteractive misses flags['non-interactive'] and headless/CI detection. Align it with later checks so downstream logic is consistent.

-  const isNonInteractive = isJsonOutput || (flags && flags['no-interactive']);
+  const isNonInteractive =
+    isJsonOutput ||
+    (flags && (flags['no-interactive'] || flags['non-interactive'])) ||
+    isHeadlessEnvironment() ||
+    (flags && flags.headless);

5-12: Import engine resolver once; avoid inline duplication later

You re-introduce engine selection logic in multiple places. Import a resolver once and use it consistently.

 import { args, mkdirAsync, writeTextFile, exit, cwd } from '../node-compat.js';
 import { spawn, execSync } from 'child_process';
-// Removed unused spawnEngine import to avoid lint error
+import { resolveEngine } from '../engine/engine-adapter.js';
 import { existsSync, chmodSync, statSync, readFileSync } from 'fs';

855-878: Engine availability check only tests claude; breaks when engine=auggie

If AUGGIE_FLOW_ENGINE=auggie, checking which claude is misleading and may abort even when auggie is present. Resolve the engine and check the appropriate binary. Also tailor messages.

-      let claudeAvailable = false;
+      let cliAvailable = false;
       try {
-        execSync('which claude', { stdio: 'ignore' });
-        claudeAvailable = true;
+        const engine = flags?.claude ? 'claude' : resolveEngine();
+        const bin = engine === 'auggie' ? 'auggie' : 'claude';
+        execSync(`which ${bin}`, { stdio: 'ignore' });
+        cliAvailable = true;
       } catch {
-        if (!isNonInteractive) {
-          console.log('⚠️  Claude Code CLI not found in PATH');
-          console.log('Install it with: npm install -g @anthropic-ai/claude-code');
-          console.log('Or use --claude flag to open Claude Code CLI');
-          console.log('\nWould spawn Claude Code with swarm objective:');
-          console.log(`📋 Objective: ${objective}`);
-          console.log('\nOptions:');
-          console.log('  • Use --executor flag for built-in executor: claude-flow swarm "objective" --executor');
-          console.log('  • Use --claude flag to open Claude Code CLI: claude-flow swarm "objective" --claude');
-        } else {
-          // In non-interactive mode, output JSON error
-          console.error(JSON.stringify({
-            error: 'Claude Code CLI not found',
-            message: 'Install with: npm install -g @anthropic-ai/claude-code',
-            fallback: 'Use --executor flag for built-in executor'
-          }));
-        }
+        const engine = flags?.claude ? 'claude' : resolveEngine();
+        const bin = engine === 'auggie' ? 'auggie' : 'claude';
+        if (!isNonInteractive) {
+          console.log(`⚠️  ${bin} CLI not found in PATH`);
+          if (bin === 'claude') {
+            console.log('Install it with: npm install -g @anthropic-ai/claude-code');
+            console.log('Or use --executor flag to run the built-in executor');
+          } else {
+            console.log('Install it with: npm install -g auggie');
+            console.log('Or set AUGGIE_FLOW_ENGINE=claude to use Claude Code CLI');
+          }
+          console.log('\nWould spawn with swarm objective:');
+          console.log(`📋 Objective: ${objective}`);
+        } else {
+          console.error({
+            error: `${bin} CLI not found`,
+            fallback: 'Use --executor flag for built-in executor'
+          });
+        }
         return;
       }

1040-1048: Deno branch uses Node’s child_process.spawn

In the Deno code path, using Node’s spawn will fail. Use Deno.Command in this branch.

-        const bgProcess = spawn(bgScriptPath, bgArgs, {
-          stdio: ['ignore', 'pipe', 'pipe'],
-        });
-
-        // Read and display output
-        const decoder = new TextDecoder();
-        const output = await bgProcess.output();
-        console.log(decoder.decode(output.stdout));
+        const output = await new Deno.Command(bgScriptPath, {
+          args: bgArgs,
+          stdout: 'piped',
+          stderr: 'piped',
+        }).output();
+        console.log(new TextDecoder().decode(output.stdout));

1060-1060: Deno fallback script is executed with node

The generated script has a Deno shebang but is launched with node. This will not run. Execute with deno run.

-    node "${scriptPath}" > "${logFile}" 2>&1 &
+    deno run --allow-all "${scriptPath}" > "${logFile}" 2>&1 &

1072-1077: Deno branch again uses Node’s spawn to run bash

Use Deno.Command to execute the shell script in Deno environments.

-        const shellProcess = spawn('bash', [shellScriptPath], {
-          stdio: 'ignore',
-          detached: true,
-        });
-        shellProcess.unref();
+        await new Deno.Command('bash', {
+          args: [shellScriptPath],
+          stdout: 'null',
+          stderr: 'null',
+        }).spawn();

1261-1261: ReferenceError risk: Deno checked without typeof guard

Accessing Deno directly in Node will throw. Use typeof Deno !== 'undefined'.

-        if (swarmDemoPath && Deno) {
+        if (swarmDemoPath && typeof Deno !== 'undefined') {

1404-1407: Non-interactive Claude wrapper hard-codes 'claude'

For consistency with engine selection, resolve the engine and spawn the correct binary.

-        const claudeProcess = spawn('claude', claudeArgs, {
+        const engine = resolveEngine();
+        const bin = engine === 'auggie' ? 'auggie' : 'claude';
+        const claudeProcess = spawn(bin, claudeArgs, {
           stdio: ['pipe', 'inherit', 'inherit'],
           shell: false,
         });

2204-2230: Direct execution argument parsing is broken (shadowing and empty argv)

This block initialises args as an empty array, then iterates and pushes into itself. It never consumes process/deno argv and shadows the imported args. Parse from Deno args or process.argv and pass positional args correctly.

-  const args = [];
-  const flags = {};
-
-  // Parse arguments and flags
-  for (let i = 0; i < args.length; i++) {
-    const arg = args[i];
-    if (arg.startsWith('--')) {
-      const flagName = arg.substring(2);
-      const nextArg = args[i + 1];
-
-      if (nextArg && !nextArg.startsWith('--')) {
-        flags[flagName] = nextArg;
-        i++; // Skip the next argument
-      } else {
-        flags[flagName] = true;
-      }
-    } else {
-      args.push(arg);
-    }
-  }
-
-  // The objective is all non-flag arguments joined
-  const objective = args.join(' ');
-
-  // Execute the swarm command
-  await swarmCommand([objective], flags);
+  const argv = typeof Deno !== 'undefined' ? args : process.argv.slice(2);
+  const positional = [];
+  const flags = {};
+
+  for (let i = 0; i < argv.length; i++) {
+    const arg = argv[i];
+    if (arg.startsWith('--')) {
+      const flagName = arg.substring(2);
+      const nextArg = argv[i + 1];
+      if (nextArg && !nextArg.startsWith('--')) {
+        flags[flagName] = nextArg;
+        i++;
+      } else {
+        flags[flagName] = true;
+      }
+    } else {
+      positional.push(arg);
+    }
+  }
+
+  await swarmCommand(positional, flags);
♻️ Duplicate comments (2)
src/cli/simple-commands/swarm.js (2)

33-37: Good fix: ESM-compatible Docker detection

Replacing the inline CommonJS require with the ESM-imported readFileSync resolves the module loading issue flagged earlier and keeps fs usage consistent.


920-924: Engine spawn logic duplicated; resolve once and spawn the correct binary

Use resolveEngine() here (and avoid re-deriving from env) for consistency.

-      const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
-      const claudeProcess = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
+      const engine = flags?.claude ? 'claude' : resolveEngine();
+      const bin = engine === 'auggie' ? 'auggie' : 'claude';
+      const claudeProcess = spawn(bin, claudeArgs, {
         stdio: 'inherit',
         shell: false,
       });
🧹 Nitpick comments (22)
docs/migration/orchestrator-mcp.md (6)

5-5: Make the stub command explicit with the CLI name.

Clarify that these are CLI invocations, not subcommands in isolation.

Apply this diff:

-- Orchestrator lifecycle stubs: `orchestrator begin | continue | end`
+- Orchestrator lifecycle stubs: `auggie-flow orchestrator {begin|continue|end}`

7-7: Clarify cache duration and terminology.

Spell out the duration and call it a TTL for precision.

Apply this diff:

-- MCP bridge: forward non-SPARC tools to an injected Claude Code MCP client when present, with a tiny 2s in-memory cache
+- MCP bridge: forward non-SPARC tools to an injected Claude Code MCP client when present, with a tiny in-memory cache (2‑second TTL)

18-20: Use the alias in the verification steps (or show both) to validate the migration.

Since the goal is to ensure the alias mirrors the canonical entrypoint, demonstrate it here.

Apply this diff:

-   - `./claude-flow orchestrator begin`
-   - `./claude-flow orchestrator continue`
-   - `./claude-flow orchestrator end`
+   - `./auggie-flow orchestrator begin` (aka `./claude-flow orchestrator begin`)
+   - `./auggie-flow orchestrator continue` (aka `./claude-flow orchestrator continue`)
+   - `./auggie-flow orchestrator end` (aka `./claude-flow orchestrator end`)

22-25: Make the MCP cache verification reproducible.

Add concrete steps for hit and expiry to avoid ambiguous outcomes.

Apply this diff:

 3) MCP pass-through (when MCP client injected)
    - Start Claude Code MCP server and wrapper
-   - Call a tool twice; the second call should hit the tiny cache
+   - Call a tool twice within 2 seconds; the second call should hit the tiny cache
+   - Example:
+     - `./auggie-flow tool run <non-sparc-tool> --args '{}'`
+     - Immediately repeat the same command; expect a cache hit indicator in logs
+   - Wait for >2 seconds and call again; expect a cache miss (fresh invocation)
+     - Example: `sleep 3 && ./auggie-flow tool run <non-sparc-tool> --args '{}'`

26-30: Add scope note for SPARC and cache behaviour.

Briefly define SPARC and clarify cache scope to set expectations.

Apply this diff:

 - No behavior changes for existing commands
 - The orchestrator stubs are intentionally minimal; deeper wiring can be layered incrementally
 - The MCP cache (2s TTL) is conservative and only reduces immediate duplicate calls
+ - “SPARC” refers to the internal tool family; only non‑SPARC tool calls are forwarded via MCP
+ - Cache is per‑process and not shared across workers; restarts will cold‑start the cache

31-34: Strengthen “Next steps” with testable acceptance criteria.

Make the follow-ups actionable and measurable.

Apply this diff:

 ## Next steps (optional)
 - Wire orchestrator stubs to event bus + checkpoints
-- Add unit tests for MCP forwarding and cache TTL
+- Add unit tests for MCP forwarding and cache TTL:
+  - Hit within TTL (<2s), miss after TTL (>2s)
+  - Distinguish cache key by tool name + args payload
+  - Verify per‑process scope (no cross‑process sharing)
 - Expand orchestrator lifecycle to support resumable checkpoints in core
+  - Persist and resume from a checkpoint ID; include idempotency safeguards
.github/workflows/dependency-review.yml (3)

4-7: Broaden ignored file patterns to avoid unnecessary runs.

If the intent is to skip pure non-code changes, consider ignoring additional common asset types to reduce noise and CI load.

   pull_request:
     paths-ignore:
       - '**/*.md'
       - '**/*.png'
       - '**/*.jpg'
+      - '**/*.jpeg'
+      - '**/*.gif'
+      - '**/*.svg'
+      - '**/*.webp'
+      - '**/*.ico'
+      - 'docs/**'

22-23: Consider stricter thresholds and less noise.

  • Fail on high or above to catch more severe issues early.
  • Only comment on failure to avoid PR comment spam.
-          comment-summary-in-pr: always
-          fail-on-severity: critical
+          comment-summary-in-pr: on-failure
+          fail-on-severity: high

10-11: Optional: add concurrency to cancel superseded runs.

Prevents duplicate runs on rapid pushes to the same PR.

   dependency-review:
     runs-on: ubuntu-latest
+    concurrency:
+      group: dependency-review-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+      cancel-in-progress: true
SECURITY.md (4)

9-11: Fix markdownlint MD034 (no-bare-urls) by converting the email to a mailto link

This removes the linter warning and makes the contact actionable.

-- Please email security reports to security@example.com
+- Please email security reports to [security@example.com](mailto:security@example.com)

19-19: Remove stray “19” at EOF

There’s an extra “19” character at the end of the file that should be removed.

-19
+

5-18: Clarify response targets and add safe harbour language

Adding explicit response targets and safe harbour guidance sets expectations for researchers and reduces ambiguity.

 ## Reporting a Vulnerability
 - Please email security reports to security@example.com
 - Include detailed reproduction steps and affected versions
 - We aim to acknowledge reports within 72 hours
 
+## Response Targets
+- Acknowledgement: within 72 hours
+- Initial triage/assessment: within 7 business days
+- Remediation plan: provided as soon as reasonably possible based on severity and impact
+
 ## Preferred Languages
 - English
 
 ## PGP
 - Not currently supported
+
+## Safe Harbour
+We support responsible security research. If you make a good-faith effort to comply with this policy:
+- We will not pursue legal action against you.
+- We consider testing to be authorised, and your research to be in good faith.
+- Avoid privacy violations, service degradation, or data destruction. Only access data that is your own.
+
+## Out of Scope (Examples)
+- Social engineering of our staff or contractors
+- Physical attacks
+- Denial of service (DoS/DDoS) or volumetric testing
+
+## Dependencies and Supply Chain
+If the vulnerability is in a third-party dependency, please include the package name, version, and advisory (if any). We may coordinate with upstreams when appropriate.

If you want, I can draft a .well-known/security.txt to mirror this policy.


9-9: Replace placeholder contact with a real address before merging

security@example.com” appears to be a placeholder. Ensure a monitored inbox is used.

.github/workflows/security-audit.yml (2)

16-23: Pin actions to commit SHAs and improve caching

Pinning actions reduces supply-chain risk. Adding cache-dependency-path aligns the npm cache with the lockfile for better hit rates.

-      - name: Checkout
-        uses: actions/checkout@v4
+      - name: Checkout
+        uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
-      - name: Use Node LTS
-        uses: actions/setup-node@v4
+      - name: Use Node LTS
+        uses: actions/setup-node@0a44ba784435a370a7167a2c4c3778d5d5928b4c # v4
         with:
           node-version: 'lts/*'
           cache: 'npm'
+          cache-dependency-path: package-lock.json

If you prefer to keep version tags, consider enabling Actions provenance/verification to mitigate risk.


24-26: Optional: make audit severity configurable and non-fatal for workflow_dispatch runs

This allows maintainers to tune strictness and avoid blocking ad-hoc runs unexpectedly.

 on:
   pull_request:
     paths:
       - 'package.json'
       - 'package-lock.json'
       - 'npm-shrinkwrap.json'
   workflow_dispatch:
+    inputs:
+      audit-level:
+        description: 'Severity threshold for npm audit'
+        type: choice
+        options: [low, moderate, high, critical]
+        default: high
 jobs:
   npm-audit:
     runs-on: ubuntu-latest
@@
-      - name: Run npm audit (prod only; high+)
-        if: ${{ hashFiles('package-lock.json') != '' && hashFiles('package.json') != '' }}
-        run: npm audit --omit=dev --audit-level=high
+      - name: Run npm audit (prod only)
+        if: ${{ hashFiles('package-lock.json') != '' && hashFiles('package.json') != '' }}
+        run: npm audit --omit=dev --audit-level=${{ inputs.audit-level || 'high' }}
src/cli/simple-commands/swarm.js (7)

39-39: Make TTY detection robust

process.stdin.isTTY/process.stdout.isTTY can be undefined. Coerce to booleans to avoid false positives in headless detection.

-  const hasTTY = process.stdin.isTTY && process.stdout.isTTY;
+  const hasTTY = Boolean(process.stdin?.isTTY) && Boolean(process.stdout?.isTTY);

318-340: JSON logs override may double-encode JSON strings

Overriding console.log/error to JSON-stringify any message risks double-encoding when callers already pass JSON strings. Consider detecting pre-serialised JSON or allowing objects to be logged as-is.


359-359: Drop dynamic child_process import; use the top-level import

The dynamic import rebinds spawn/execSync unnecessarily and complicates reasoning. Use the already imported top-level bindings.

-      const { execSync, spawn } = await import('child_process');
+      // use top-level child_process imports

805-811: Typo in guidance: memory_usage vs memory_store

The tool is named memory_store elsewhere. Fix the tip to avoid confusion.

-        console.log('• Store results with mcp__claude-flow__memory_usage');
+        console.log('• Store results with mcp__claude-flow__memory_store');

849-853: Avoid redefining isNonInteractive; reuse the top-level calculation

This local redefinition diverges from the earlier isNonInteractive logic and adds cognitive load. Remove and use the already computed isNonInteractive.

-      const isNonInteractive = flags['no-interactive'] ||
-                               flags['non-interactive'] ||
-                               flags['output-format'] === 'stream-json' ||
-                               isHeadlessEnvironment();
+      // Use top-level isNonInteractive

893-895: Non-interactive messaging hard-codes 'claude'

Make the printed command reflect the actual engine binary.

-        console.log('🤖 Running in non-interactive mode with Claude');
-        console.log('📋 Command: claude [prompt] -p --output-format stream-json --verbose');
+        const engine = flags?.claude ? 'claude' : resolveEngine();
+        const bin = engine === 'auggie' ? 'auggie' : 'claude';
+        console.log(`🤖 Running in non-interactive mode with ${bin}`);
+        console.log(`📋 Command: ${bin} [prompt] -p --output-format stream-json --verbose`);

937-943: Genericise engine error messages

Errors refer specifically to Claude even when the selected engine may be Auggie.

-      claudeProcess.on('error', (err) => {
-        console.error('❌ Failed to launch Claude Code:', err.message);
-      });
+      claudeProcess.on('error', (err) => {
+        console.error('❌ Failed to launch engine:', err.message);
+      });
@@
-    } catch (error) {
-      console.error('❌ Failed to spawn Claude Code:', error.message);
+    } catch (error) {
+      console.error('❌ Failed to spawn engine:', error.message);

Also applies to: 944-947

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 83007f9 and aedfb24.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml (3 hunks)
  • .github/workflows/dependency-review.yml (1 hunks)
  • .github/workflows/security-audit.yml (1 hunks)
  • SECURITY.md (1 hunks)
  • docs/migration/orchestrator-mcp.md (1 hunks)
  • package.json (5 hunks)
  • src/cli/simple-commands/swarm.js (32 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • .github/workflows/ci.yml
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/cli/simple-commands/swarm.js (2)
src/cli/engine/engine-adapter.js (2)
  • env (11-11)
  • engine (16-16)
src/cli/simple-commands/sparc.js (2)
  • env (446-446)
  • engine (448-448)
🪛 markdownlint-cli2 (0.17.2)
SECURITY.md

9-9: Bare URL used

(MD034, no-bare-urls)

🪛 actionlint (1.7.7)
.github/workflows/security-audit.yml

11-11: calling function "hashFiles" is not allowed here. "hashFiles" is only available in "jobs.<job_id>.steps.continue-on-error", "jobs.<job_id>.steps.env", "jobs.<job_id>.steps.if", "jobs.<job_id>.steps.name", "jobs.<job_id>.steps.run", "jobs.<job_id>.steps.timeout-minutes", "jobs.<job_id>.steps.with", "jobs.<job_id>.steps.working-directory". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details

(expression)

🪛 LanguageTool
docs/migration/orchestrator-mcp.md

[misspelling] ~32-~32: Did you mean the adverb “even”?
Context: ...(optional) - Wire orchestrator stubs to event bus + checkpoints - Add unit tests for ...

(EVENT_EVEN)

🔇 Additional comments (2)
.github/workflows/dependency-review.yml (2)

17-18: Forked PRs nuance: PR comments may be blocked.

On pull_request events from forks, the GITHUB_TOKEN typically has read-only perms; even with job-level write perms, comment posting may be blocked by repo settings. If you need comments on forked PRs, consider pull_request_target with great care and ensure you never check out or run fork code with elevated perms. Alternatively, accept that comments may only appear for same-repo PRs.

Would you like me to draft a safe pull_request_target variant that checks out the base repo only (no fork code execution) and still comments on forked PRs?


9-11: LGTM overall; solid, minimal workflow.

Clear job naming and ubuntu-latest runner are appropriate for this use case.

- '**/*.md'
- '**/*.png'
- '**/*.jpg'
workflow_dispatch:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Manual runs will fail without base/head refs; split steps and add workflow_dispatch inputs.

dependency-review-action needs base-ref and head-ref when not running on a pull_request event. With the current workflow_dispatch trigger and a single “Dependency Review” step, manual runs will error out. Fix by adding inputs for the manual trigger and splitting the action step with event-based conditions.

Apply this diff within the Dependency Review step block to split per event:

-      - name: Dependency Review
-        uses: actions/dependency-review-action@v4
-        with:
-          comment-summary-in-pr: always
-          fail-on-severity: critical
+      - name: Dependency Review (PR)
+        if: ${{ github.event_name == 'pull_request' }}
+        uses: actions/dependency-review-action@v4
+        with:
+          comment-summary-in-pr: always
+          fail-on-severity: critical
+
+      - name: Dependency Review (manual)
+        if: ${{ github.event_name == 'workflow_dispatch' }}
+        uses: actions/dependency-review-action@v4
+        with:
+          base-ref: ${{ github.event.inputs.base-ref }}
+          head-ref: ${{ github.event.inputs.head-ref }}
+          comment-summary-in-pr: always
+          fail-on-severity: critical

Additionally, update the workflow_dispatch trigger to accept the required inputs (outside the selected lines):

on:
  pull_request:
    paths-ignore:
      - '**/*.md'
      - '**/*.png'
      - '**/*.jpg'
  workflow_dispatch:
    inputs:
      base-ref:
        description: Base ref to compare against (e.g., main)
        required: true
        type: string
        default: main
      head-ref:
        description: Head ref or branch to compare (e.g., feature/my-branch)
        required: true
        type: string

Also applies to: 19-23

🤖 Prompt for AI Agents
In .github/workflows/dependency-review.yml around lines 8 and also apply changes
to lines 19-23, the workflow_dispatch trigger and the Dependency Review step
must be updated so manual runs provide base/head refs and the action only runs
with appropriate refs: add workflow_dispatch inputs for base-ref and head-ref
(required strings, default base-ref to main) at the top-level
on.workflow_dispatch, then split the single Dependency Review step into two
conditional steps (or two uses) — one that runs on pull_request using
github.event.pull_request.base.ref and github.event.pull_request.head.sha/ref,
and another that runs on workflow_dispatch using the input values
(github.event.inputs['base-ref'] and github.event.inputs['head-ref']) passed to
the dependency-review-action; ensure each step supplies base-ref and head-ref
only when available and avoid running the action without those inputs.

Comment thread .github/workflows/dependency-review.yml Outdated
Comment thread .github/workflows/security-audit.yml Outdated
Comment thread src/cli/simple-commands/swarm.js Outdated
Comment on lines 795 to 799
const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
const claudeProcess = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
stdio: 'inherit',
shell: false,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

--claude should force Claude CLI regardless of AUGGIE_FLOW_ENGINE

Currently the engine selection respects AUGGIE_FLOW_ENGINE even when --claude is provided, which is surprising. Force 'claude' here.

-        const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
-        const claudeProcess = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
+        // --claude implies launching the Claude CLI regardless of AUGGIE_FLOW_ENGINE
+        const claudeProcess = spawn('claude', claudeArgs, {
           stdio: 'inherit',
           shell: false,
         });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
const claudeProcess = spawn(engine === 'auggie' ? 'auggie' : 'claude', claudeArgs, {
stdio: 'inherit',
shell: false,
});
// --claude implies launching the Claude CLI regardless of AUGGIE_FLOW_ENGINE
const claudeProcess = spawn('claude', claudeArgs, {
stdio: 'inherit',
shell: false,
});
🤖 Prompt for AI Agents
In src/cli/simple-commands/swarm.js around lines 795 to 799, the spawn call
still respects AUGGIE_FLOW_ENGINE even when the user passed --claude; change the
logic so the CLI flag takes precedence. Detect the parsed option/flag (e.g.
options.claude or argv.claude depending on parser) and use that to force the
engine to 'claude' (engine = options.claude ? 'claude' :
process.env.AUGGIE_FLOW_ENGINE || 'auggie') or simply pass 'claude' to spawn
when the flag is set; keep the rest of the spawn options unchanged.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
src/cli/simple-commands/swarm.js (1)

2199-2229: Bug: direct-exec argument parsing is broken (parses an empty array)

args is initialised as an empty array and then iterated, so no flags/positional args are ever parsed. Use process.argv.slice(2) and don’t shadow args.

Apply this diff:

-// Allow direct execution
+// Allow direct execution
 if (import.meta.main) {
-  // When called directly as a script, parse all arguments
-  const args = [];
-  const flags = {};
-
-  // Parse arguments and flags
-  for (let i = 0; i < args.length; i++) {
-    const arg = args[i];
+  // When called directly as a script, parse all arguments
+  const argv = process.argv.slice(2);
+  const positional = [];
+  const flags = {};
+
+  // Parse arguments and flags
+  for (let i = 0; i < argv.length; i++) {
+    const arg = argv[i];
     if (arg.startsWith('--')) {
       const flagName = arg.substring(2);
-      const nextArg = args[i + 1];
+      const nextArg = argv[i + 1];
 
       if (nextArg && !nextArg.startsWith('--')) {
         flags[flagName] = nextArg;
         i++; // Skip the next argument
       } else {
         flags[flagName] = true;
       }
     } else {
-      args.push(arg);
+      positional.push(arg);
     }
   }
 
   // The objective is all non-flag arguments joined
-  const objective = args.join(' ');
+  const objective = positional.join(' ');
 
   // Execute the swarm command
-  await swarmCommand([objective], flags);
+  await swarmCommand([objective], flags);
 }
♻️ Duplicate comments (6)
src/cli/commands/index.ts (1)

1281-1286: Keep logs consistent with the actually resolved engine (use resolveEngine)

The log currently derives the engine from AUGGIE_FLOW_ENGINE with a default, but spawnEngine may resolve differently (e.g., fallback when auggie isn’t on PATH). Use resolveEngine to ensure the printed engine matches what’s spawned.

Apply this diff:

-              const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
-console.log(`\n🚀 Spawning ${engine === 'auggie' ? 'Auggie' : 'Claude'} for task: ${task.name || taskId}`);
-
-              const { spawnEngine } = await import('../engine/engine-adapter.js');
+              const { resolveEngine, spawnEngine } = await import('../engine/engine-adapter.js');
+              const engine = resolveEngine();
+              console.log(`\n🚀 Spawning ${engine === 'auggie' ? 'Auggie' : 'Claude'} for task: ${task.name || taskId}`);

Also applies to: 1284-1286

src/cli/simple-commands/automation-executor.js (2)

15-29: Make detectPreferredEngine synchronous; avoid dynamic imports and empty catches

The function doesn’t need to be async. Avoid dynamic import and remove empty catch blocks for maintainability. Prefer which for cross-platform compatibility.

Apply this diff:

-// Engine detection: prefer Auggie CLI if available, otherwise fall back to Claude CLI
-async function detectPreferredEngine() {
-  try {
-    const { execSync } = await import('child_process');
-    try {
-      execSync('command -v auggie', { stdio: 'ignore', shell: true });
-      return 'auggie';
-    } catch {}
-    try {
-      execSync('command -v claude', { stdio: 'ignore', shell: true });
-      return 'claude';
-    } catch {}
-  } catch {}
-  return null;
-}
+// Engine detection: prefer Auggie CLI if available, otherwise fall back to Claude CLI
+function detectPreferredEngine() {
+  try {
+    execSync('which auggie', { stdio: 'ignore' });
+    return 'auggie';
+  } catch {}
+  try {
+    execSync('which claude', { stdio: 'ignore' });
+    return 'claude';
+  } catch {}
+  return null;
+}

Additionally, add this import at the top of the file:

import { spawn, execSync } from 'child_process';

278-286: Avoid duplicate engine resolution; reuse the resolved engine for logging and spawning

Engine is resolved twice (once for logging, once implicitly in spawnEngine). Resolve once via resolveEngine so logs always match the spawned process, and drop the unused second resolution.

Apply this diff:

-      const engine = process.env.AUGGIE_FLOW_ENGINE || (await detectPreferredEngine()) || 'claude';
-console.log(`    🤖 Spawning ${engine === 'auggie' ? 'Auggie' : 'Claude'} for ${agent.name}: ${engine} ${flagsDisplay} "${displayPrompt}"`);
+      const { resolveEngine } = await import('../engine/engine-adapter.js');
+      const engine = resolveEngine();
+      console.log(`    🤖 Spawning ${engine === 'auggie' ? 'Auggie' : 'Claude'} for ${agent.name}: ${engine} ${flagsDisplay} "${displayPrompt}"`);
-    // Spawn engine process (Auggie preferred)
-    const engine = process.env.AUGGIE_FLOW_ENGINE || (await detectPreferredEngine()) || 'claude';
-    const claudeProcess = spawnEngine(claudeArgs, {
+    // Spawn engine process (resolved via adapter)
+    const claudeProcess = spawnEngine(claudeArgs, {
       stdio: stdioConfig,
       shell: false,
     });

Also applies to: 295-301

src/cli/simple-commands/swarm.js (1)

794-799: --claude should force Claude CLI regardless of AUGGIE_FLOW_ENGINE

This path still routes through spawnEngine, which may resolve to Auggie if configured. Users specifying --claude expect Claude to be started.

Apply this diff:

-        // Spawn engine with the prompt as the first argument (exactly like hive-mind does)
-        const claudeProcess = spawnEngine(claudeArgs, {
+        // --claude implies launching the Claude CLI regardless of AUGGIE_FLOW_ENGINE
+        const claudeProcess = spawn('claude', claudeArgs, {
           stdio: 'inherit',
           shell: false,
         });
src/cli/simple-commands/sparc.js (1)

417-446: Align diagnostics and checks with the resolved engine (auggie/claude)

Debug output and the which check hard-code “claude”, but you now spawn via the adapter. Resolve the engine once and use it for:

  • the which check
  • the debug “Command:” line
  • user-facing messages and errors

Apply these diffs:

  1. Resolve the engine and fix the which check and debug:
-  // Show debug info for non-interactive mode or when verbose
+  // Show debug info for non-interactive mode or when verbose
   if (isNonInteractive || subArgs.includes('--verbose') || subArgs.includes('-v')) {
-    console.log('\n🔍 Debug: Executing claude with:');
-    console.log('Command: claude');
+    const { resolveEngine } = await import('../engine/engine-adapter.js');
+    const engine = resolveEngine();
+    console.log('\n🔍 Debug: Executing engine with:');
+    console.log(`Command: ${engine}`);
     ...
   }
-    // Check if claude command exists
+    // Check if resolved engine command exists
     try {
       const checkResult = await new Promise((resolve) => {
-        const child = spawn('which', ['claude'], {
+        const { resolveEngine } = await import('../engine/engine-adapter.js');
+        const engine = resolveEngine();
+        const child = spawn('which', [engine], {
           stdio: ['pipe', 'pipe', 'pipe']
         });
  1. Keep the adapter-based spawn (already correct):
-    console.log(`\n📡 Spawning engine process...\n`);
+    console.log(`\n📡 Spawning engine process...\n`);

Also applies to: 447-455

src/cli/simple-cli.js (1)

1533-1534: Remove unused local engine variable and rely entirely on engine-adapter

The local const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie' is unused and reintroduces per-site engine resolution logic the adapter is meant to centralise. Drop it and let spawnEngine/resolveEngine handle preference and fallback consistently.

Apply this diff:

-              const engine = process.env.AUGGIE_FLOW_ENGINE || 'auggie';
 const child = spawnEngine(claudeArgs, {

Optional follow-up: consider making the error message below engine-agnostic (“Failed to spawn engine”) since the adapter may pick Auggie. No functional change, purely clarity.

To double-check that removing the local fallback preserves behaviour, verify the adapter defaults to Auggie when AUGGIE_FLOW_ENGINE is unset:

#!/bin/bash
# Inspect resolveEngine() and how it derives defaults/preference.
echo "== engine-adapter.js =="
rg -n "resolveEngine\\(" -n -A 40 -B 2 src/cli/engine/engine-adapter.js || true
echo
echo "== engine-adapter.ts =="
rg -n "resolveEngine\\(" -n -A 40 -B 2 src/cli/engine/engine-adapter.ts || true
echo
echo "== References to AUGGIE_FLOW_ENGINE in adapter files =="
rg -n "AUGGIE_FLOW_ENGINE" src/cli/engine/engine-adapter.* || true
🧹 Nitpick comments (5)
src/cli/simple-commands/automation-executor.js (4)

228-242: Clarify semantics: this checks “engine availability”, not just Claude

This logic returns true if either Auggie or Claude exists. Consider renaming to isEngineAvailable() (and adjust callers) to avoid confusion and future mistakes.

Would you like me to generate a small follow-up patch that renames the method and updates its call sites (including error messages) to “Engine CLI not found (Auggie or Claude)”?


235-241: Minor: remove dynamic import; use top-level execSync already imported

This catch makes the control flow harder to read. Use the already imported execSync and which for consistency.

Apply this diff:

-    try {
-      const { execSync } = await import('child_process');
-      execSync('which claude', { stdio: 'ignore' });
+    try {
+      execSync('which claude', { stdio: 'ignore' });
       return true;
     } catch {
       return false;
     }

346-355: Rename error type to reflect engine-agnostic path

Pushing type: 'claude_instance_error' is misleading now that spawning is engine-agnostic. Use engine_instance_error.

Apply this diff:

-      this.errors.push({
-        type: 'claude_instance_error',
+      this.errors.push({
+        type: 'engine_instance_error',
         agent: agent.id,
         error: error.message,
         timestamp: new Date()
       });

172-176: Adjust error message to be engine-agnostic

The preceding availability check accepts either Auggie or Claude. The message should reflect that to reduce user confusion.

-      throw new Error('Claude CLI not found. Please install Claude Code: https://claude.ai/code');
+      throw new Error('Engine CLI not found (Auggie or Claude). Please install one: Auggie or Claude Code (https://claude.ai/code)');
src/cli/simple-commands/sparc.js (1)

468-469: Make error message engine-agnostic

This path now spawns via the adapter, so the error should not be Claude-specific.

-    printError(`Failed to execute Claude: ${err.message}`);
+    printError(`Failed to execute engine: ${err.message}`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between aedfb24 and 90769bf.

📒 Files selected for processing (5)
  • src/cli/commands/index.ts (2 hunks)
  • src/cli/simple-cli.js (2 hunks)
  • src/cli/simple-commands/automation-executor.js (64 hunks)
  • src/cli/simple-commands/sparc.js (2 hunks)
  • src/cli/simple-commands/swarm.js (33 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (5)
src/cli/simple-cli.js (5)
src/cli/engine/engine-adapter.js (2)
  • engine (16-16)
  • spawnEngine (15-18)
src/cli/simple-commands/sparc.js (2)
  • child (451-455)
  • claudeArgs (351-351)
bin/auggie-flow.js (2)
  • child (43-47)
  • child (78-81)
bin/claude-flow.js (2)
  • child (43-47)
  • child (81-84)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
src/cli/simple-commands/sparc.js (3)
src/cli/engine/engine-adapter.js (1)
  • spawnEngine (15-18)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
src/cli/simple-commands/swarm.js (3)
  • claudeArgs (784-784)
  • claudeArgs (899-899)
  • claudeArgs (1394-1394)
src/cli/simple-commands/automation-executor.js (3)
src/cli/simple-cli.js (1)
  • engine (1533-1533)
src/cli/engine/engine-adapter.js (2)
  • engine (16-16)
  • spawnEngine (15-18)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
src/cli/commands/index.ts (5)
src/cli/simple-commands/sparc.js (1)
  • child (451-455)
bin/auggie-flow.js (2)
  • child (43-47)
  • child (78-81)
src/cli/simple-cli.js (2)
  • child (1534-1548)
  • engine (1533-1533)
src/cli/engine/engine-adapter.js (2)
  • spawnEngine (15-18)
  • engine (16-16)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
src/cli/simple-commands/swarm.js (4)
src/cli/simple-commands/sparc.js (1)
  • env (448-448)
src/cli/engine/engine-adapter.js (2)
  • env (11-11)
  • spawnEngine (15-18)
src/cli/engine/engine-adapter.ts (1)
  • spawnEngine (17-20)
bin/auggie-flow.js (1)
  • cleanup (49-56)
🔇 Additional comments (7)
src/cli/commands/index.ts (1)

1194-1213: Good move: centralised spawning via engine-adapter

Switching to spawnEngine with a clean env overlay and stdio inheritance is the right direction. This centralises engine selection and reduces duplication.

src/cli/simple-commands/swarm.js (4)

7-9: LGTM: engine-adapter import and fs ESM import

Good addition of spawnEngine and switching to readFileSync via ESM import.


34-37: LGTM: safer Docker detection in ESM

Replacing require('fs').readFileSync with readFileSync from fs in ESM context avoids module-type pitfalls.


918-923: LGTM: centralised engine spawning in default flow

Using spawnEngine here is consistent with the adapter pattern and keeps spawning logic DRY.


1402-1405: LGTM: piping prompt to engine via adapter for non-interactive run

The stdin piping + adapter use is clean and consistent with the rest of the CLI.

src/cli/simple-commands/sparc.js (1)

7-8: LGTM: adopting engine-adapter

Importing spawnEngine aligns this command with the new engine abstraction.

src/cli/simple-cli.js (1)

26-26: Good move: centralised engine spawning via adapter

Importing and using spawnEngine consolidates engine resolution and reduces duplicated logic. This aligns this CLI path with the rest of the codebase.

…dispatcher; keep env vars as-is for compatibility
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (9)
src/ui/web-ui/core/StateManager.js (1)

66-72: File-system persistence still uses “.claude-flow-state.json” – align with Auggie naming and migrate legacy files.

Keep backward compatibility by reading the legacy file if the new one doesn’t exist, then write to the new filename going forward.

Apply this diff:

-          const stateFile = path.join(process.cwd(), '.claude-flow-state.json');
+          const stateFileCurrent = path.join(process.cwd(), '.auggie-flow-state.json');
+          const stateFileLegacy = path.join(process.cwd(), '.claude-flow-state.json');
@@
-          if (fs.existsSync(stateFile)) {
-            const data = fs.readFileSync(stateFile, 'utf8');
-            persistedData = JSON.parse(data);
-          }
+          if (fs.existsSync(stateFileCurrent)) {
+            const data = fs.readFileSync(stateFileCurrent, 'utf8');
+            persistedData = JSON.parse(data);
+          } else if (fs.existsSync(stateFileLegacy)) {
+            const data = fs.readFileSync(stateFileLegacy, 'utf8');
+            persistedData = JSON.parse(data);
+            try {
+              // Best-effort migrate to new file name
+              fs.writeFileSync(stateFileCurrent, data);
+              // Optionally remove legacy: fs.unlinkSync(stateFileLegacy);
+            } catch (e) {
+              console.warn('Could not migrate legacy state file:', e.message);
+            }
+          }
@@
-          const stateFile = path.join(process.cwd(), '.claude-flow-state.json');
+          const stateFile = path.join(process.cwd(), '.auggie-flow-state.json');

Also applies to: 172-175

bin/claude-flow.js (1)

49-65: Improve child process cleanup logic to avoid relying on child.killed and to unreference timeouts.

child.killed only reflects whether kill() was called, not whether the process exited. Prefer checking exitCode and unref the timeout so it doesn’t keep the parent alive.

Apply this diff:

-      const cleanup = () => {
-        if (!child.killed) {
-          child.kill('SIGTERM');
-          setTimeout(() => {
-            if (!child.killed) {
-              child.kill('SIGKILL');
-            }
-          }, 5000);
-        }
-      };
+      const cleanup = () => {
+        if (child.exitCode === null) {
+          try { child.kill('SIGTERM'); } catch {}
+          const t = setTimeout(() => {
+            if (child.exitCode === null) {
+              try { child.kill('SIGKILL'); } catch {}
+            }
+          }, 5000);
+          t.unref?.();
+        }
+      };
@@
-      child.on('exit', (code) => {
+      child.on('exit', (code) => {
+        process.off('SIGTERM', cleanup);
+        process.off('SIGINT', cleanup);
+        process.off('exit', cleanup);
         process.exit(code || 0);
       });

Also applies to: 71-75

src/ui/web-ui/core/MCPIntegrationLayer.js (4)

63-71: Consider supporting both Auggie and Claude detection for smooth migration.

At present, detection only checks window.claudeFlowMCP and CLAUDE_FLOW_MCP_ENABLED. Add Auggie equivalents while retaining legacy support.

Apply this diff:

-      if (typeof window !== 'undefined' && window.claudeFlowMCP) {
+      if (typeof window !== 'undefined' && (window.auggieFlowMCP || window.claudeFlowMCP)) {
         return 'connected';
       }
@@
-      if (typeof process !== 'undefined' && process.env.CLAUDE_FLOW_MCP_ENABLED === 'true') {
+      if (
+        typeof process !== 'undefined' &&
+        (process.env.AUGGIE_FLOW_MCP_ENABLED === 'true' || process.env.CLAUDE_FLOW_MCP_ENABLED === 'true')
+      ) {
         return 'connected';
       }

465-471: Engine/tool name change may break existing MCP servers — add a backward-compatible fallback.

Using mcp__auggie-flow__… exclusively could fail against servers expecting mcp__claude-flow__…. Try both prefixes before falling back to mock mode.

Apply this diff:

   async executeRealTool(toolName, params) {
     // This would call the actual MCP tool
     // For now, we'll simulate the call
-    const mcpToolName = `mcp__auggie-flow__${toolName}`;
+    const prefixes = [`mcp__auggie-flow__`, `mcp__claude-flow__`];
 
-    if (typeof window !== 'undefined' && window.claudeFlowMCP) {
-      return await window.claudeFlowMCP.execute(mcpToolName, params);
+    if (typeof window !== 'undefined' && (window.auggieFlowMCP || window.claudeFlowMCP)) {
+      const client = window.auggieFlowMCP || window.claudeFlowMCP;
+      for (const p of prefixes) {
+        try {
+          return await client.execute(`${p}${toolName}`, params);
+        } catch (e) {
+          // Try next prefix
+        }
+      }
     }

380-383: executeTool('swarm_status') will throw: tool is not registered.

getSwarmStatus invokes a non-existent tool. Either add swarm_status to discovery or adjust the call to an existing tool.

Apply this diff to register a minimal tool:

       monitoring: [
         {
           name: 'performance_report',
           description: 'Generate performance reports',
           params: ['format', 'timeframe'],
         },
+        {
+          name: 'swarm_status',
+          description: 'Swarm status overview',
+          params: [],
+        },

Alternatively, change getSwarmStatus to use 'swarm_monitor' with sensible defaults.

Also applies to: 690-696


600-609: Cache cleanup interval is never cleared — potential timer leak on shutdown.

Store the interval handle and clear it in shutdown().

Apply this diff:

   initializeCache() {
     // Clean expired cache entries every 5 minutes
-    setInterval(
+    this.cacheCleanupTimer = setInterval(
       () => {
         for (const [key, entry] of this.cache.entries()) {
           if (this.isCacheExpired(entry)) {
             this.cache.delete(key);
           }
         }
       },
       5 * 60 * 1000,
     );
   }
@@
   async shutdown() {
     // Cancel all active executions
     this.activeExecutions.clear();
 
     // Clear cache
     this.cache.clear();
 
+    // Clear cache cleanup timer
+    if (this.cacheCleanupTimer) {
+      clearInterval(this.cacheCleanupTimer);
+      this.cacheCleanupTimer = null;
+    }
+
     // Clear tool results
     this.toolResults.clear();
 
     this.eventBus.emit('mcp:shutdown');
   }

Also applies to: 701-712

src/ui/web-ui/views/GitHubIntegrationTest.js (1)

195-197: Direct-execution check won’t work under ESM as written.

process.argv[1] is a filesystem path, whilst import.meta.url is a file:// URL. Compare like-for-like to ensure the test runs when executed directly.

Apply this diff:

-// Run test if executed directly
-if (typeof process !== 'undefined' && process.argv[1] === import.meta.url) {
-  runGitHubViewTest();
-}
+// Run test if executed directly (ESM-safe)
+import { pathToFileURL } from 'url';
+if (typeof process !== 'undefined') {
+  const invoked = process.argv?.[1];
+  const invokedHref = invoked ? pathToFileURL(invoked).href : '';
+  if (invokedHref === import.meta.url) {
+    runGitHubViewTest();
+  }
+}
src/ui/web-ui/core/ViewManager.js (2)

49-56: Ensure container class is always applied; also look up both Auggie and legacy container IDs

If an element with id='claude-flow-ui' exists, the new auggie-flow-main-container class is never applied, so the updated styles won’t take effect. Also, when an auggie-flow-ui already exists, this code won’t find it and will create a duplicate container.

Apply this diff to handle both IDs and ensure the new class is always present without duplicating the container:

-    this.containerElement =
-      document.getElementById('claude-flow-ui') || document.createElement('div');
-
-    if (!this.containerElement.id) {
-      this.containerElement.id = 'auggie-flow-ui';
-      this.containerElement.className = 'auggie-flow-main-container';
-      document.body.appendChild(this.containerElement);
-    }
+    this.containerElement =
+      document.getElementById('auggie-flow-ui') ||
+      document.getElementById('claude-flow-ui') ||
+      document.createElement('div');
+
+    const isNew = !this.containerElement.parentElement;
+
+    // Always ensure Auggie class is present for styling
+    this.containerElement.classList.add('auggie-flow-main-container');
+
+    // Set Auggie ID if this is a newly created container
+    if (!this.containerElement.id) {
+      this.containerElement.id = 'auggie-flow-ui';
+    }
+
+    if (isNew) {
+      document.body.appendChild(this.containerElement);
+    }

151-165: Responsive CSS still references Claude selectors

In the @media block, .claude-flow-view and .claude-flow-title remain and won’t affect the new classes.

Apply this diff to align the responsive rules with the Auggie classes:

       @media (max-width: 768px) {
         .auggie-flow-main-container {
           padding: 10px;
         }
-        
-        .claude-flow-view {
+
+        .auggie-flow-view {
           padding: 10px;
         }
-        
-        .claude-flow-title {
+
+        .auggie-flow-title {
           font-size: 20px;
         }
       }
🧹 Nitpick comments (2)
src/ui/web-ui/README.md (1)

308-308: Use British spelling: “licence” (noun).

Minor documentation nit: in en-GB, the noun form is “licence”.

Apply this diff:

-Part of the Auggie Flow project. See main project license.
+Part of the Auggie Flow project. See main project licence.
src/ui/web-ui/core/StateManager.js (1)

151-161: “lastSave” is reported in stats but never set.

Persist the timestamp in state when saving so getStateStats() returns meaningful data.

Apply this diff:

       const stateData = {
         timestamp: Date.now(),
         version: '2.0.0',
         preferences: Object.fromEntries(this.preferences),
         viewStates: Object.fromEntries(this.viewStates),
         toolResults: Object.fromEntries(this.toolResults),
         sessionData: Object.fromEntries(this.sessionData),
         state: Object.fromEntries(this.state),
       };
+      // Track last save time in state for diagnostics
+      this.state.set('lastSave', stateData.timestamp);

Also applies to: 441-443

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 90769bf and 1fc90f4.

📒 Files selected for processing (9)
  • bin/claude-flow.js (2 hunks)
  • src/ui/console/index.html (6 hunks)
  • src/ui/web-ui/EnhancedProcessUI.js (3 hunks)
  • src/ui/web-ui/README.md (2 hunks)
  • src/ui/web-ui/core/MCPIntegrationLayer.js (2 hunks)
  • src/ui/web-ui/core/StateManager.js (1 hunks)
  • src/ui/web-ui/core/UIManager.js (1 hunks)
  • src/ui/web-ui/core/ViewManager.js (10 hunks)
  • src/ui/web-ui/views/GitHubIntegrationTest.js (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/ui/web-ui/core/UIManager.js
  • src/ui/console/index.html
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/ui/web-ui/EnhancedProcessUI.js (1)
src/cli/utils.js (1)
  • printSuccess (10-12)
🪛 LanguageTool
src/ui/web-ui/README.md

[locale-violation] ~308-~308: license must be spelled with a “c” when used as a noun in British English. Use “licence”.
Context: ...e Auggie Flow project. See main project license.

(LICENCE_LICENSE_NOUN_SINGULAR)

🔇 Additional comments (9)
src/ui/web-ui/README.md (1)

5-5: Branding updates look consistent.

References to Auggie Flow read clearly and align with the broader rename.

Also applies to: 12-12

bin/claude-flow.js (1)

126-126: Help text and URLs updated to Auggie-Flow — looks good.

Messaging is consistent and actionable for users when no runtime is found.

Also applies to: 132-132, 137-137

src/ui/web-ui/core/MCPIntegrationLayer.js (1)

2-2: Auggie Flow branding acknowledged.

Header comment aligns with the rename.

src/ui/web-ui/views/GitHubIntegrationTest.js (1)

111-111: Repository targets updated to augmentcode/auggie-flow — looks correct.

The examples and logging align with the branding rename.

Also applies to: 118-118, 126-126

src/ui/web-ui/EnhancedProcessUI.js (2)

201-201: Branding update LGTM

Welcome banner updated to Auggie-Flow. No functional impact.


280-280: Header text update LGTM

Title now reflects Auggie-Flow. Consistent with the rebrand.

src/ui/web-ui/core/ViewManager.js (3)

71-150: Auggie CSS selectors LGTM

Main selectors and classes (.auggie-flow-*) look consistent with the rename and match the DOM classes below.


286-311: DOM view class renames LGTM

The DOM structure uses auggie-flow-* classes consistently and matches the injected CSS.


377-386: Loading template class rename LGTM

Template now uses auggie-flow-loading, which is defined in the style block.

this.viewStates = new Map();
this.sessionData = new Map();
this.storageKey = 'claude-flow-ui-state';
this.storageKey = 'auggie-flow-ui-state';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Renaming the localStorage key without migration will silently drop users’ saved UI state.

Changing the key to 'auggie-flow-ui-state' means existing persisted state under 'claude-flow-ui-state' won’t load. Add a simple migration path to read the legacy key and atomically migrate it.

Apply this diff to add legacy support and migrate on first load:

-    this.storageKey = 'auggie-flow-ui-state';
+    this.storageKey = 'auggie-flow-ui-state';
+    this.legacyStorageKeys = ['claude-flow-ui-state'];
@@
-      // Try to load from localStorage in browser
+      // Try to load from localStorage in browser (with migration from legacy keys)
       if (typeof window !== 'undefined' && window.localStorage) {
-        const stored = localStorage.getItem(this.storageKey);
-        if (stored) {
-          persistedData = JSON.parse(stored);
-        }
+        const stored = localStorage.getItem(this.storageKey);
+        if (stored) {
+          persistedData = JSON.parse(stored);
+        } else if (this.legacyStorageKeys?.length) {
+          for (const legacyKey of this.legacyStorageKeys) {
+            const legacyStored = localStorage.getItem(legacyKey);
+            if (legacyStored) {
+              persistedData = JSON.parse(legacyStored);
+              // Migrate immediately
+              localStorage.setItem(this.storageKey, legacyStored);
+              localStorage.removeItem(legacyKey);
+              break;
+            }
+          }
+        }
       }

Also applies to: 49-60

🤖 Prompt for AI Agents
In src/ui/web-ui/core/StateManager.js around lines 16 and 49-60, the storage key
was changed to 'auggie-flow-ui-state' which will drop existing persisted state
under the legacy key 'claude-flow-ui-state'; add a migration on first load that:
checks for existing data under the new key and if absent reads the legacy key,
validates/parses it, writes it atomically to the new key, and removes the legacy
key; ensure you do not overwrite an existing new-key value and handle JSON parse
errors safely (log/ignore legacy and continue) so migration is best-effort and
performed only once.

Comment thread src/ui/web-ui/core/ViewManager.js Outdated
Comment on lines 66 to 70
if (document.getElementById('auggie-flow-styles')) return;

const styles = document.createElement('style');
styles.id = 'claude-flow-styles';
styles.textContent = `
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Style ID check/assignment mismatch causes duplicate style injection

You check for auggie-flow-styles but create claude-flow-styles. This leads to reinjection of the styles on each initialise, and you can also miss the legacy ID.

Apply this diff to make the check and the created ID consistent and backwards-compatible:

-    if (document.getElementById('auggie-flow-styles')) return;
+    if (
+      document.getElementById('auggie-flow-styles') ||
+      document.getElementById('claude-flow-styles') /* legacy */
+    ) return;
 
     const styles = document.createElement('style');
-    styles.id = 'claude-flow-styles';
+    styles.id = 'auggie-flow-styles';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (document.getElementById('auggie-flow-styles')) return;
const styles = document.createElement('style');
styles.id = 'claude-flow-styles';
styles.textContent = `
if (
document.getElementById('auggie-flow-styles') ||
document.getElementById('claude-flow-styles') /* legacy */
) return;
const styles = document.createElement('style');
styles.id = 'auggie-flow-styles';
styles.textContent = `
🤖 Prompt for AI Agents
In src/ui/web-ui/core/ViewManager.js around lines 66 to 70, the code checks for
'auggie-flow-styles' but creates 'claude-flow-styles', causing duplicate
injections and missing the legacy ID; update the logic to first check for either
existing ID ('auggie-flow-styles' OR 'claude-flow-styles') and only return if
one exists, then create the style element with the canonical new ID
('claude-flow-styles') so new injections use the consistent ID while remaining
backward-compatible with the legacy ID check.

Comment on lines 578 to 583
console.log();
console.log(colors.cyan('📊 GitHub Integration Status:'));
console.log(` Repository: ${colors.green('claude-code-flow')}`);
console.log(` Branch: ${colors.yellow('claude-flow-v2.0.0')}`);
console.log(` Branch: ${colors.yellow('auggie-flow-v2.0.0')}`);
console.log(` Status: ${colors.green('Connected')}`);
console.log(` Last Sync: ${colors.gray('Recently')}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

GitHub repo branding appears inconsistent with branch

The branch now reads auggie-flow-v2.0.0 (good), but the repository line still says claude-code-flow. Please confirm the intended repository name and update to avoid mixed branding in the UI. If the repo has migrated, switch to the Auggie naming or, better, avoid hard-coding by sourcing from a single config.

Run this to find leftover Claude references and the canonical Auggie repo string used elsewhere:

If you just want the quick inline fix here:

-    console.log(`  Repository: ${colors.green('claude-code-flow')}`);
+    console.log(`  Repository: ${colors.green('auggie-flow')}`);

🏁 Script executed:

#!/bin/bash
# Find potential leftover Claude branding
rg -n --color=never -S 'claude[-_ ]?(code[-_ ])?flow' | sed -E 's/:.*//g' | sort -u

# Inspect Auggie repo references to choose a consistent name
rg -n --color=never -S 'auggie[-_ ]?(code[-_ ])?flow' | sed -E 's/:.*//g' | sort -u

Length of output: 39578


Action: Fix inconsistent GitHub repo branding in web UI

Verified with the ripgrep results you provided — the UI prints "claude-code-flow" while the branch shows "auggie-flow-v2.0.0". There are many remaining "claude" references in the repo; update the UI and consider a global rename or centralise the repo name.

Files to check (non‑exhaustive):

  • src/ui/web-ui/EnhancedProcessUI.js (lines ~578–583) — immediate fix
  • src/ui/web-ui/views/GitHubIntegrationTest.js
  • src/swarm/claude-code-interface.ts
  • src/mcp/claude-code-wrapper.ts
  • bin/claude-flow.js and bin/auggie-flow.js
  • scripts/auggie-flow-wrapper.sh, README.md, docs/migration-to-auggie-flow.md

Quick inline fix:

-    console.log(`  Repository: ${colors.green('claude-code-flow')}`);
+    console.log(`  Repository: ${colors.green('auggie-flow')}`);

Recommendation: avoid hard‑coding the repo name — read it from a single config or environment value so branding stays consistent across the codebase.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log();
console.log(colors.cyan('📊 GitHub Integration Status:'));
console.log(` Repository: ${colors.green('claude-code-flow')}`);
console.log(` Branch: ${colors.yellow('claude-flow-v2.0.0')}`);
console.log(` Branch: ${colors.yellow('auggie-flow-v2.0.0')}`);
console.log(` Status: ${colors.green('Connected')}`);
console.log(` Last Sync: ${colors.gray('Recently')}`);
console.log();
console.log(colors.cyan('📊 GitHub Integration Status:'));
console.log(` Repository: ${colors.green('auggie-flow')}`);
console.log(` Branch: ${colors.yellow('auggie-flow-v2.0.0')}`);
console.log(` Status: ${colors.green('Connected')}`);
console.log(` Last Sync: ${colors.gray('Recently')}`);
🤖 Prompt for AI Agents
In the file src/ui/web-ui/EnhancedProcessUI.js around lines 578 to 583, the code
prints the GitHub repository name as "claude-code-flow" while the branch is
shown as "auggie-flow-v2.0.0". This inconsistency in branding should be fixed.
Update the repository name in the console log to match the "auggie-flow"
branding used elsewhere in the codebase. Additionally, consider a global search
and replace for "claude" references and centralizing the repository name in a
single configuration or environment variable to ensure consistent branding
across the entire application.

…px child cleanup handlers\n- wrapper scripts: strict mode, cd guards, quoting, arrays\n- spawn-auggie-terminal: validate args, escape prompt/args\n- swarm.js: --claude forces 'claude' CLI\n- ViewManager: fix style id and legacy check\n- workflows: least-privilege perms and hashFiles scope
…avoid ETARGET; CI no longer regenerates lockfile
…t lockfile mismatch while we stabilize; no audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant