cortexweaver
Version:
CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate
59 lines • 3.5 kB
JavaScript
;
/**
* GovernorAgent - Refactored into modular components for maintainability
*
* This file serves as the main entry point and maintains backward compatibility.
* The implementation has been split into focused modules under ./governor/
*
* Key modules:
* - CostMonitor: Handles cost tracking and analytics
* - BudgetEnforcer: Manages budget limits and enforcement
* - QualityAnalyzer: Analyzes test results and quality metrics
* - PheromoneManager: Creates and manages pheromones for agent coordination
* - PromptWorkflowManager: Handles prompt improvement workflow
* - ReflectorCoordinator: Manages Reflector agent spawning and coordination
* - GovernorAgent: Main orchestration class using composition pattern
*
* Total lines reduced from 1254 to ~200 per module (under 500-line limit)
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReflectorCoordinator = exports.PromptWorkflowManager = exports.PheromoneManager = exports.QualityAnalyzer = exports.BudgetEnforcer = exports.CostMonitor = exports.GovernorAgent = void 0;
// Re-export the refactored GovernorAgent as the default export
var governor_agent_1 = require("./governor/governor-agent");
Object.defineProperty(exports, "GovernorAgent", { enumerable: true, get: function () { return governor_agent_1.GovernorAgent; } });
// Re-export all types for backward compatibility
__exportStar(require("./governor/types"), exports);
// Re-export individual modules for advanced usage
var index_1 = require("./governor/index");
Object.defineProperty(exports, "CostMonitor", { enumerable: true, get: function () { return index_1.CostMonitor; } });
Object.defineProperty(exports, "BudgetEnforcer", { enumerable: true, get: function () { return index_1.BudgetEnforcer; } });
Object.defineProperty(exports, "QualityAnalyzer", { enumerable: true, get: function () { return index_1.QualityAnalyzer; } });
Object.defineProperty(exports, "PheromoneManager", { enumerable: true, get: function () { return index_1.PheromoneManager; } });
Object.defineProperty(exports, "PromptWorkflowManager", { enumerable: true, get: function () { return index_1.PromptWorkflowManager; } });
Object.defineProperty(exports, "ReflectorCoordinator", { enumerable: true, get: function () { return index_1.ReflectorCoordinator; } });
/**
* @deprecated Legacy direct usage patterns - use the modular GovernorAgent instead
*
* The monolithic implementation has been refactored into focused, testable modules.
* This provides better separation of concerns, easier testing, and maintainability.
*
* Migration guide:
* - Replace direct class instantiation with the new GovernorAgent
* - Individual modules can be imported for unit testing or custom usage
* - All existing public APIs remain compatible
*/
//# sourceMappingURL=governor.js.map