/**
 * Spec Metadata Manager
 *
 * Manages spec.md files in .specweave/docs/internal/specs/{project-id}/
 *
 * CRITICAL ARCHITECTURE:
 * - Specs are the SOURCE OF TRUTH for features
 * - Specs are PERMANENT (never deleted)
 * - External tools (GitHub/Jira/ADO) sync to specs, NOT increments
 * - Uses FLATTENED structure (v0.16.11+): specs/{project-id}/ not projects/{project-id}/specs/
 *
 * @module spec-metadata-manager
 */
import { SpecMetadata, SpecContent, SpecValidationResult } from '../types/spec-metadata.js';
import { Logger } from '../../utils/logger.js';
export declare class SpecMetadataManager {
    private specsDir;
    private projectManager;
    private logger;
    constructor(projectRoot?: string, projectId?: string, options?: {
        logger?: Logger;
    });
    /**
     * Get all spec files
     */
    getAllSpecs(): Promise<string[]>;
    /**
     * Load spec metadata and content
     */
    loadSpec(specId: string): Promise<SpecContent | null>;
    /**
     * Save spec metadata (update frontmatter)
     */
    saveMetadata(specId: string, metadata: Partial<SpecMetadata>): Promise<void>;
    /**
     * Link spec to external tool
     */
    linkToExternal(specId: string, provider: 'github' | 'jira' | 'ado', externalData: {
        id: string | number;
        url: string;
        [key: string]: any;
    }): Promise<void>;
    /**
     * Unlink spec from external tool
     */
    unlinkFromExternal(specId: string, provider: 'github' | 'jira' | 'ado'): Promise<void>;
    /**
     * Update sync status
     */
    updateSyncStatus(specId: string, provider: 'github' | 'jira' | 'ado', status: 'synced' | 'out-of-sync' | 'error', error?: string): Promise<void>;
    /**
     * Validate spec structure
     */
    validateSpec(specId: string): Promise<SpecValidationResult>;
    /**
     * Get spec file path — supports both flat and folder formats.
     * Living docs generate folder structure: {specsDir}/{specId}/FEATURE.md
     * Legacy format uses flat files: {specsDir}/spec-{specId}.md
     */
    private getSpecPath;
    /**
     * Load user stories from separate us-*.md files in a living docs feature folder.
     * Mirrors the approach used by GitHubFeatureSync.findUserStories() but returns
     * the UserStory type expected by JIRA/ADO sync.
     */
    private loadUserStoriesFromFiles;
    /**
     * Map living docs frontmatter status to UserStory status
     */
    private mapFrontmatterStatus;
    /**
     * Parse user stories from markdown content
     */
    private parseUserStories;
    /**
     * Parse acceptance criteria for a specific user story
     */
    private parseAcceptanceCriteriaForUS;
    /**
     * Determine user story status based on AC completion
     */
    private determineStatusFromAC;
    /**
     * Parse increment references from markdown content
     */
    private parseIncrements;
    /**
     * Parse increment status from icon and text
     */
    private parseIncrementStatus;
    /**
     * Calculate progress from user stories
     */
    private calculateProgress;
    /**
     * Create a new spec (template)
     */
    createSpec(specId: string, title: string, priority?: 'P0' | 'P1' | 'P2' | 'P3'): Promise<string>;
}
//# sourceMappingURL=spec-metadata-manager.d.ts.map