mcp-ai-agent-guidelines
Version:
A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices
214 lines • 6.14 kB
TypeScript
/**
* RFCStrategy - Request for Comments document format
*
* Renders domain results as RFC (Request for Comments) documents with
* standard sections for formal technical proposals.
*
* @module strategies/rfc-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.2
*/
import type { SessionState } from "../domain/design/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";
/**
* RFCStrategy implements the RFC (Request for Comments) document format.
*
* Supports rendering:
* - PromptResult: Convert prompt analysis to RFC proposal
* - SessionState: Convert design session to RFC document
*
* @implements {OutputStrategy<PromptResult | SessionState>}
*/
export declare class RFCStrategy implements OutputStrategy<PromptResult | SessionState> {
/** The output approach this strategy implements */
readonly approach = OutputApproach.RFC;
/**
* Render a domain result to RFC format.
*
* @param result - The domain result to render (PromptResult or SessionState)
* @param options - Optional rendering options
* @returns Output artifacts with primary RFC document
* @throws {Error} If result type is not supported
*/
render(result: PromptResult | SessionState, 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 RFC format.
*
* @param result - The prompt result to render
* @param options - Optional rendering options
* @returns Output artifacts with RFC document
* @private
*/
private renderPromptAsRFC;
/**
* Render a SessionState to RFC format.
*
* @param result - The session state to render
* @param options - Optional rendering options
* @returns Output artifacts with RFC document
* @private
*/
private renderSessionAsRFC;
/**
* Extract title from PromptResult.
*
* @param result - The prompt result
* @returns Extracted title
* @private
*/
private extractTitle;
/**
* Extract summary from PromptResult.
*
* @param result - The prompt result
* @returns Extracted summary
* @private
*/
private extractSummary;
/**
* Extract scope from PromptResult.
*
* @param result - The prompt result
* @returns Extracted scope
* @private
*/
private extractScope;
/**
* Extract proposal from PromptResult.
*
* @param result - The prompt result
* @returns Extracted proposal
* @private
*/
private extractProposal;
/**
* Extract pros from PromptResult.
*
* @param result - The prompt result
* @returns Extracted pros as bullet list
* @private
*/
private extractPros;
/**
* Extract cons from PromptResult.
*
* @param result - The prompt result
* @returns Extracted cons as bullet list
* @private
*/
private extractCons;
/**
* Extract alternatives from PromptResult.
*
* @param result - The prompt result
* @returns Extracted alternatives
* @private
*/
private extractAlternatives;
/**
* Extract conclusion from PromptResult.
*
* @param result - The prompt result
* @returns Extracted conclusion
* @private
*/
private extractConclusion;
/**
* Extract title from SessionState.
*
* @param result - The session state
* @returns Extracted title
* @private
*/
private extractSessionTitle;
/**
* Extract summary from SessionState.
*
* @param result - The session state
* @returns Extracted summary
* @private
*/
private extractSessionSummary;
/**
* Extract scope from SessionState.
*
* @param result - The session state
* @returns Extracted scope
* @private
*/
private extractSessionScope;
/**
* Extract proposal from SessionState.
*
* @param result - The session state
* @returns Extracted proposal
* @private
*/
private extractSessionProposal;
/**
* Extract pros from SessionState.
*
* @param result - The session state
* @returns Extracted pros as bullet list
* @private
*/
private extractSessionPros;
/**
* Extract cons from SessionState.
*
* @param result - The session state
* @returns Extracted cons as bullet list
* @private
*/
private extractSessionCons;
/**
* Extract alternatives from SessionState.
*
* @param result - The session state
* @returns Extracted alternatives
* @private
*/
private extractSessionAlternatives;
/**
* Extract conclusion from SessionState.
*
* @param result - The session state
* @returns Extracted conclusion
* @private
*/
private extractSessionConclusion;
/**
* Format RFC content with optional metadata footer.
*
* @param baseContent - The base RFC content without metadata
* @param options - Optional rendering options
* @returns Formatted content with or without metadata footer
* @private
*/
private formatRFCContent;
/**
* Type guard for PromptResult.
*
* @param result - The value to check
* @returns True if result is a PromptResult
* @private
*/
private isPromptResult;
/**
* Type guard for SessionState.
*
* @param result - The value to check
* @returns True if result is a SessionState
* @private
*/
private isSessionState;
}
//# sourceMappingURL=rfc-strategy.d.ts.map