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
112 lines (106 loc) • 3.52 kB
JavaScript
;
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiTemplates = void 0;
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
/**
* ApiTemplates handles OpenAPI specification templates
*/
class ApiTemplates {
static async createOpenApiTemplate(apiPath) {
const openApiPath = path.join(apiPath, 'openapi.yaml');
if (fs.existsSync(openApiPath)) {
return; // Don't overwrite existing OpenAPI spec
}
const openApiContent = `openapi: 3.0.3
info:
title: CortexWeaver Project API
description: |
This is a template OpenAPI specification for your CortexWeaver project.
This contract serves as the formal specification for your API, following
Specification-Driven Development (SDD) principles. AI agents will use this
contract as their source of truth for implementation and testing.
version: 1.0.0
contact:
name: Project Team
email: team@example.com
servers:
- url: http://localhost:3000/api/v1
description: Development server
paths:
/health:
get:
summary: Health check endpoint
description: Returns the health status of the API
operationId: getHealth
tags:
- Health
responses:
'200':
description: API is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum: [healthy]
timestamp:
type: string
format: date-time
components:
schemas:
ErrorResponse:
type: object
required:
- error
- message
properties:
error:
type: string
description: Error code or type
message:
type: string
description: Human-readable error message
tags:
- name: Health
description: Health check endpoints`;
fs.writeFileSync(openApiPath, openApiContent);
}
}
exports.ApiTemplates = ApiTemplates;
//# sourceMappingURL=api-templates.js.map