mira-consciousness
Version:
Memory & Intelligence Retention Archive - Preserving The Spark
75 lines • 2.21 kB
TypeScript
/**
* Claude File Injector
* ===================
*
* Handles automatic injection and management of MIRA integration sections
* in CLAUDE.md files for distribution and setup.
*
* Features:
* - Detects existing CLAUDE.md files
* - Injects minimal MIRA integration section
* - Preserves user content
* - Updates existing MIRA sections
* - Uses Claude Code SDK for intelligent modification
*/
export interface ClaudeFileConfig {
projectName?: string;
projectType?: string;
primaryLanguage?: string;
preserveUserContent?: boolean;
forceUpdate?: boolean;
}
export declare class ClaudeFileInjector {
private static readonly MIRA_SECTION_MARKER;
private static readonly MIRA_END_MARKER;
/**
* Inject MIRA integration into CLAUDE.md file
*/
injectMIRASection(targetPath: string, config?: ClaudeFileConfig): Promise<{
success: boolean;
message: string;
created: boolean;
}>;
/**
* Create new CLAUDE.md with MIRA integration
*/
private createNewClaudeFile;
/**
* Update existing CLAUDE.md with MIRA integration
*/
private updateExistingClaudeFile;
/**
* Check if CLAUDE.md already has MIRA section
*/
private hasMIRASection;
/**
* Replace existing MIRA section with updated version
*/
private replaceMIRASection;
/**
* Inject MIRA section at the top of existing content
*/
private injectMIRASectionAtTop;
/**
* Generate MIRA integration template
*/
private generateMIRATemplate;
/**
* Use Claude Code SDK to intelligently modify CLAUDE.md
* This method uses the Claude CLI to make intelligent modifications
*/
injectViaClaudeCode(targetPath: string, config?: ClaudeFileConfig): Promise<{
success: boolean;
message: string;
}>;
/**
* Generate detailed prompt for Claude Code modification
*/
private generateClaudeCodePrompt;
/**
* Auto-detect project configuration for better templating
*/
detectProjectConfig(targetPath: string): Promise<ClaudeFileConfig>;
}
export default ClaudeFileInjector;
//# sourceMappingURL=ClaudeFileInjector.d.ts.map