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
126 lines (121 loc) • 5.5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CLITemplates = void 0;
const project_templates_1 = require("./project-templates");
const config_templates_1 = require("./config-templates");
const docker_templates_1 = require("./docker-templates");
/**
* CLITemplates Module
* Handles creation of various template files and directory structures
*
* This is the main entry point that delegates to specialized template modules:
* - ProjectTemplates: Main project structure and prompts
* - ConfigTemplates: Configuration files and schemas
* - DockerTemplates: Docker and Kubernetes configurations
*/
class CLITemplates {
// Project structure methods - delegate to ProjectTemplates
static async createPlanTemplate(projectRoot) {
return project_templates_1.ProjectTemplates.createPlanTemplate(projectRoot);
}
static async createPromptsDirectory(projectRoot) {
return project_templates_1.ProjectTemplates.createPromptsDirectory(projectRoot);
}
static async createPrototypesDirectory(projectRoot) {
return project_templates_1.ProjectTemplates.createPrototypesDirectory(projectRoot);
}
static async createPrototypesReadme(prototypesPath) {
return project_templates_1.ProjectTemplates.createPrototypesReadme(prototypesPath);
}
static async createPrototypeTemplates(prototypesPath) {
return project_templates_1.ProjectTemplates.createPrototypeTemplates(prototypesPath);
}
// Configuration methods - delegate to ConfigTemplates
static async createEnvTemplate(projectRoot) {
return config_templates_1.ConfigTemplates.createEnvTemplate(projectRoot);
}
static async createOpenApiTemplate(apiPath) {
return config_templates_1.ConfigTemplates.createOpenApiTemplate(apiPath);
}
static async createJsonSchemaTemplates(schemasPath) {
return config_templates_1.ConfigTemplates.createJsonSchemaTemplates(schemasPath);
}
static async createContractsDirectory(projectRoot) {
return config_templates_1.ConfigTemplates.createContractsDirectory(projectRoot);
}
static async createGitIgnoreTemplate(projectRoot) {
return config_templates_1.ConfigTemplates.createGitIgnoreTemplate(projectRoot);
}
// Docker methods - delegate to DockerTemplates
static async createDockerCompose(projectRoot) {
return docker_templates_1.DockerTemplates.createDockerCompose(projectRoot);
}
static async createDockerfile(projectRoot) {
return docker_templates_1.DockerTemplates.createDockerfile(projectRoot);
}
static async createDockerIgnore(projectRoot) {
return docker_templates_1.DockerTemplates.createDockerIgnore(projectRoot);
}
static async createDockerComposeOverride(projectRoot) {
return docker_templates_1.DockerTemplates.createDockerComposeOverride(projectRoot);
}
static async createDockerfileDev(projectRoot) {
return docker_templates_1.DockerTemplates.createDockerfileDev(projectRoot);
}
static async createKubernetesTemplates(projectRoot) {
return docker_templates_1.DockerTemplates.createKubernetesTemplates(projectRoot);
}
static async createHelmChart(projectRoot) {
return docker_templates_1.DockerTemplates.createHelmChart(projectRoot);
}
// Convenience methods for common operations
static async createFullProjectStructure(projectRoot) {
// Create all essential project files and directories
await Promise.all([
this.createPlanTemplate(projectRoot),
this.createEnvTemplate(projectRoot),
this.createGitIgnoreTemplate(projectRoot),
this.createContractsDirectory(projectRoot),
this.createPromptsDirectory(projectRoot),
this.createPrototypesDirectory(projectRoot),
]);
}
static async createDockerSetup(projectRoot) {
// Create Docker-related files
await Promise.all([
this.createDockerCompose(projectRoot),
this.createDockerfile(projectRoot),
this.createDockerIgnore(projectRoot),
this.createDockerComposeOverride(projectRoot),
this.createDockerfileDev(projectRoot),
]);
}
static async createKubernetesSetup(projectRoot) {
// Create Kubernetes deployment files
await Promise.all([
this.createKubernetesTemplates(projectRoot),
this.createHelmChart(projectRoot),
]);
}
// Backward compatibility - maintain existing interfaces
static createBasicPersonaTemplate(agentName) {
return `# ${agentName.charAt(0).toUpperCase() + agentName.slice(1)} Agent
## Role
${agentName.replace('-', ' ').replace(/\b\w/g, l => l.toUpperCase())} for CortexWeaver projects.
## Core Identity
You are the ${agentName.replace('-', ' ')} agent, responsible for specific tasks within the CortexWeaver ecosystem.
## Primary Responsibilities
- [Add specific responsibilities for this agent]
- [Define key tasks and outputs]
- [Specify interaction patterns with other agents]
## Guidelines
- Follow CortexWeaver's Specification-Driven Development approach
- Maintain high quality standards
- Collaborate effectively with other agents
- Document all decisions and rationale
---
*This is a basic template. Please customize based on the specific agent's role and responsibilities.*`;
}
}
exports.CLITemplates = CLITemplates;
//# sourceMappingURL=index.js.map