import { PromptModule, ModuleConfig } from './prompt-module.interface.js';
/**
 * Soul module — provides the agent's personality, tone, and working style.
 *
 * Resolution chain (P0-1 Phase 2):
 *   0. **TL overlay** — when `canDelegate=true`, layer the team-leader
 *      archetype (`config/souls/team-leader.md`) as the primary soul and
 *      append the agent's original-role soul as a Capability Specialty.
 *      A per-member soul still wins over the overlay (explicit > default).
 *   1. Per-member soul (~/.crewly/teams/{teamId}/members/{memberId}/soul.md)
 *   2. Role default soul (config/roles/{role}/soul.md)
 *   3. Reusable archetype (config/souls/{role}.md)
 *   4. Hardcoded minimal fallback
 *
 * Sources: Path A Step 5, Path B Section 9, Soul System Design (Section 6),
 * P0-1 Team-Leader Soul spec.
 */
export declare class SoulModule implements PromptModule {
    name: string;
    priority: number;
    maxTokens: number;
    compactable: boolean;
    /**
     * Always included — every agent benefits from personality definition.
     */
    shouldInclude(_config: ModuleConfig): boolean;
    /**
     * Build the soul section by resolving the soul file from the resolution chain.
     * If self-improvement data exists, appends a Self-Awareness section.
     *
     * @param config - Module configuration with role and project details
     * @returns Formatted markdown soul section
     */
    build(config: ModuleConfig): Promise<string>;
    /**
     * Resolve the soul content by checking each level of the resolution chain.
     *
     * @param config - Module configuration
     * @returns Soul content string
     */
    private resolveSoul;
    /**
     * Resolve the agent's specialty soul for the TL overlay layer.
     *
     * Reuses steps 3 & 4 of the legacy cascade (role default → archetype) but
     * deliberately skips the per-member soul (already checked in step 1 above)
     * and the team-leader archetype (which would cause infinite recursion when
     * `role === 'team-leader'`).
     *
     * @param config - Module configuration
     * @returns Specialty soul content, or null when no role-specific soul exists
     *          OR when the role IS team-leader (no specialty to layer).
     */
    private resolveSpecialtySoul;
    /**
     * Format the TL overlay layout: team-leader archetype as the primary soul,
     * with the original-role specialty appended as Capability Specialty.
     *
     * The Capability Specialty section is what the agent draws on when applying
     * the Self-Implementation Exception Rule from `team-leader.md` (TL leans on
     * IC instincts when self-implementing under specific conditions).
     *
     * @param tlContent - Raw team-leader.md content
     * @param specialty - Specialty soul content (null when no role specialty exists)
     * @param role - The agent's original role (used in the specialty header)
     * @returns Formatted TL overlay markdown
     */
    private formatTLOverlay;
    /**
     * Get the path to a member's personal soul file.
     *
     * @param teamId - Team ID
     * @param memberId - Member ID
     * @returns Absolute path to the member soul file
     */
    private getMemberSoulPath;
    /**
     * Read a file if it exists, returning its content or null.
     *
     * @param filePath - Path to the file
     * @returns File content string or null if not found
     */
    private readFileIfExists;
    /**
     * Format the soul content with a source annotation.
     *
     * @param content - Raw soul file content
     * @param source - Where the soul was resolved from
     * @returns Formatted soul section
     */
    private formatSoul;
    /**
     * Build the Self-Awareness section from self-improvement data.
     * Reads growth areas, self-model (blind spots), and prediction calibration.
     * Kept under ~200 tokens.
     *
     * @param sessionName - Agent session name
     * @returns Self-awareness markdown section, or null if no data exists
     */
    private buildSelfAwareness;
}
//# sourceMappingURL=soul.module.d.ts.map