Skip to content

Commit 521d233

Browse files
refactor: remove dead code and feature-flag ralph
Dead code removed (~5,800 lines): - testing-agent.ts - orphaned after CLI removal - paradedb-adapter.ts - unused database adapter - retrieval-benchmarks.ts, graph-retrieval.ts, hierarchical-retrieval.ts - team-analytics.ts - no imports - model-aware-compaction.ts, incremental-gc.ts - unused context managers - security-secrets-scanner.ts - no imports - linear-unified.ts - never registered Feature flags: - Ralph integration now lazy-loaded (STACKMEMORY_RALPH) - Default ON unless explicitly disabled All 480 tests passing.
1 parent c70c544 commit 521d233

12 files changed

Lines changed: 21 additions & 7142 deletions

src/agents/testing-agent.ts

Lines changed: 0 additions & 859 deletions
This file was deleted.

src/cli/commands/linear-unified.ts

Lines changed: 0 additions & 467 deletions
This file was deleted.

src/cli/index.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import {
3737
createMemoryCommand,
3838
} from './commands/decision.js';
3939
import clearCommand from './commands/clear.js';
40-
import createRalphCommand from './commands/ralph.js';
4140
import serviceCommand from './commands/service.js';
4241
import { registerLoginCommand } from './commands/login.js';
4342
import { registerSignupCommand } from './commands/signup.js';
@@ -687,7 +686,6 @@ program.addCommand(createHandoffCommand());
687686
program.addCommand(createDecisionCommand());
688687
program.addCommand(createMemoryCommand());
689688
program.addCommand(clearCommand);
690-
program.addCommand(createRalphCommand());
691689
program.addCommand(serviceCommand);
692690
program.addCommand(createHooksCommand());
693691

@@ -701,6 +699,18 @@ if (isFeatureEnabled('skills')) {
701699
// Skills integration not available - silently skip
702700
});
703701
}
702+
703+
// Register ralph commands (feature-flagged, lazy-loaded)
704+
// Default ON for development, OFF for npm package users
705+
if (isFeatureEnabled('ralph')) {
706+
import('./commands/ralph.js')
707+
.then(({ default: createRalphCommand }) =>
708+
program.addCommand(createRalphCommand())
709+
)
710+
.catch(() => {
711+
// Ralph integration not available - silently skip
712+
});
713+
}
704714
program.addCommand(createDaemonCommand());
705715
program.addCommand(createShellCommand());
706716
program.addCommand(createAPICommand());

0 commit comments

Comments
 (0)