run method
Runs this command.
The return value is wrapped in a Future if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
Future<void> run() async {
if (!ContextService.isInitialized()) {
print('ContextForge has not been initialized in this repository.\n');
print('Run:');
print(' contextforge init');
return;
}
ContextService.ensureContextFilesExist();
ContextService.ensureDataFilesExist();
final aiContextContent = _generateAiContext();
FileService.writeFile('${ContextService.contextDir}/ai_context.md',
aiContextContent);
print('✔ ai_context.md generated successfully');
}