/** * SDDStrategy - Spec-Driven Development output format * * Generates three interconnected documents that form a complete development specification: * - spec.md: Requirements, constraints, acceptance criteria * - plan.md: Implementation phases, timeline, dependencies * - tasks.md: Task breakdown with Mermaid dependency graph * * @module strategies/sdd-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.4 */ import type { SessionState } from "../domain/design/types.js"; import type { PromptResult } from "../domain/prompting/types.js"; import type { OutputArtifacts, RenderOptions } from "./output-strategy.js"; import { OutputApproach } from "./output-strategy.js"; import { BaseStrategy } from "./shared/base-strategy.js"; import type { ValidationResult } from "./shared/types.js"; /** * SDDStrategy implements Spec-Driven Development output format. * * Supports rendering: * - SessionState: Complete design session state into spec/plan/tasks * - PromptResult: Prompt configuration into SDD format * * @extends {BaseStrategy} */ export declare class SDDStrategy extends BaseStrategy { protected readonly name = "sdd"; protected readonly version = "2.0.0"; /** The output approach this strategy implements */ readonly approach = OutputApproach.SDD; /** * Validate that the input is a SessionState or PromptResult. * * @param input - Input to validate * @returns Validation result */ validate(input: SessionState | PromptResult): ValidationResult; /** * Execute the SDD rendering strategy. * * @param input - The domain result to render (SessionState or PromptResult) * @returns Output artifacts with primary spec.md and secondary plan.md, tasks.md */ execute(input: SessionState | PromptResult, _options?: Partial): Promise; /** * 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 SessionState to SDD artifacts. * * @param result - The session state to render * @param options - Optional rendering options * @returns Output artifacts with spec, plan, and tasks documents * @private */ private renderSession; /** * Render a PromptResult to SDD artifacts. * * @param result - The prompt result to render * @param options - Optional rendering options * @returns Output artifacts with spec, plan, and tasks documents * @private */ private renderPrompt; /** * Generate spec.md from SessionState. * * @param result - The session state * @returns Specification document * @private */ private generateSpec; /** * Generate plan.md from SessionState. * * @param result - The session state * @returns Implementation plan document * @private */ private generatePlan; /** * Generate tasks.md from SessionState. * * @param result - The session state * @returns Task breakdown document with Mermaid diagram * @private */ private generateTasks; /** * Generate spec.md from PromptResult. * * @param result - The prompt result * @returns Specification document * @private */ private generateSpecFromPrompt; /** * Generate plan.md from PromptResult. * * @param result - The prompt result * @returns Implementation plan document * @private */ private generatePlanFromPrompt; /** * Generate tasks.md from PromptResult. * * @param result - The prompt result * @returns Task breakdown document * @private */ private generateTasksFromPrompt; /** * Extract title from SessionState. * * @param result - The session state * @returns Title string * @private */ private extractTitle; /** * Extract overview from SessionState. * * @param result - The session state * @returns Overview text * @private */ private extractOverview; /** * Extract functional requirements from SessionState. * * @param result - The session state * @returns Formatted requirements list * @private */ private extractFunctionalRequirements; /** * Extract non-functional requirements from SessionState. * * @param result - The session state * @returns Formatted non-functional requirements * @private */ private extractNonFunctionalRequirements; /** * Extract constraints from SessionState. * * @param result - The session state * @returns Formatted constraints list * @private */ private extractConstraints; /** * Extract success criteria from SessionState. * * @param result - The session state * @returns Formatted success criteria * @private */ private extractSuccessCriteria; /** * Extract phases from SessionState. * * @param result - The session state * @returns Formatted phases description * @private */ private extractPhases; /** * Extract timeline from SessionState. * * @param result - The session state * @returns Formatted timeline * @private */ private extractTimeline; /** * Extract dependencies from SessionState. * * @param result - The session state * @returns Formatted dependencies * @private */ private extractDependencies; /** * Extract risks from SessionState. * * @param result - The session state * @returns Formatted risks * @private */ private extractRisks; /** * Extract tasks from SessionState. * * @param result - The session state * @returns Formatted task list * @private */ private extractTasks; /** * Generate Mermaid dependency graph from SessionState. * * @param result - The session state * @returns Mermaid diagram syntax * @private */ private generateDependencyGraph; /** * Type guard for SessionState. * * @param result - The value to check * @returns True if result is a SessionState * @private */ private isSessionState; /** * Type guard for PromptResult. * * @param result - The value to check * @returns True if result is a PromptResult * @private */ private isPromptResult; } //# sourceMappingURL=sdd-strategy.d.ts.map