mcp-ai-agent-guidelines
Version:
A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices
85 lines • 3.19 kB
TypeScript
/**
* ChatStrategy - Default output format for LLM chat interfaces
*
* Renders domain results as simple, clean markdown optimized for
* chat-based LLM interfaces. This is the baseline output strategy.
*
* @module strategies/chat-strategy
* @see {@link https://github.com/Anselmoo/mcp-ai-agent-guidelines/blob/development/plan-v0.13.x/specs/SPEC-001-output-strategy-layer.md SPEC-001} §4.1
*/
import type { ScoringResult } from "../domain/analysis/types.js";
import type { PromptResult } from "../domain/prompting/types.js";
import type { OutputArtifacts, OutputStrategy, RenderOptions } from "./output-strategy.js";
import { OutputApproach } from "./output-strategy.js";
/**
* ChatStrategy implements the default chat-optimized markdown output format.
*
* Supports rendering:
* - PromptResult: Hierarchical sections with optional metadata
* - ScoringResult: Score breakdown table with recommendations
*
* @implements {OutputStrategy<PromptResult | ScoringResult>}
*/
export declare class ChatStrategy implements OutputStrategy<PromptResult | ScoringResult> {
/** The output approach this strategy implements */
readonly approach = OutputApproach.CHAT;
/**
* Render a domain result to chat-optimized markdown artifacts.
*
* @param result - The domain result to render (PromptResult or ScoringResult)
* @param options - Optional rendering options
* @returns Output artifacts with primary markdown document
* @throws {Error} If result type is not supported
*/
render(result: PromptResult | ScoringResult, options?: Partial<RenderOptions>): OutputArtifacts;
/**
* Check if this strategy supports rendering a specific domain type.
*
* @param domainType - The domain type identifier
* @returns True if this strategy can render the domain type
*/
supports(domainType: string): boolean;
/**
* Render a PromptResult to markdown.
*
* Converts hierarchical prompt sections to markdown headings and content.
* Optionally includes metadata footer with technique and token estimate.
*
* @param result - The prompt result to render
* @param options - Optional rendering options
* @returns Output artifacts with formatted prompt
* @private
*/
private renderPrompt;
/**
* Render a ScoringResult to markdown table.
*
* Creates a formatted score report with:
* - Overall score heading
* - Breakdown table with all metrics
* - Recommendations list
*
* @param result - The scoring result to render
* @param options - Optional rendering options (currently unused)
* @returns Output artifacts with score report
* @private
*/
private renderScoring;
/**
* Type guard for PromptResult.
*
* @param result - The value to check
* @returns True if result is a PromptResult
* @private
*/
private isPromptResult;
/**
* Type guard for ScoringResult.
*
* @param result - The value to check
* @returns True if result is a ScoringResult
* @private
*/
private isScoringResult;
}
//# sourceMappingURL=chat-strategy.d.ts.map