UNPKG

adpa-enterprise-framework-automation

Version:

Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe

34 lines 1.35 kB
import { getAIProcessor } from '../../ai/AIProcessor.js'; import { PerspectivesTemplate } from './PerspectivesTemplate.js'; /** * Processor for the BABOK Perspectives document. * Uses AI to enhance the Perspectives content, with fallback to the template. */ export class PerspectivesProcessor { async process(context) { return this.generate(context); } async generate(context) { const template = new PerspectivesTemplate(); const aiProcessor = getAIProcessor(); let content; try { const userPrompt = template.generateContent(context); const systemPrompt = 'You are an expert business analyst. Generate a standards-compliant BABOK Perspectives document in markdown.'; const messages = aiProcessor.createMessages(systemPrompt, userPrompt); const response = await aiProcessor.makeAICall(messages); content = aiProcessor.extractContent(response); } catch (err) { content = template.generateContent(context); } if (!content || typeof content !== 'string' || content.length < 100) { content = template.generateContent(context); } return { title: 'Perspectives (BABOK v3)', content }; } } //# sourceMappingURL=PerspectivesProcessor.js.map