UNPKG

instruqt

Version:

CLI tool for deploying AI agent context documentation across multiple platforms with dual MERN/module support

49 lines (42 loc) 2.06 kB
/** * @file Main entry point for the instruqt module * @description CLI tool for quickly deploying context documentation to AI agents. * Follows MERN backend architecture principles with feature-first organization. * @author instruqt team * @version 1.0.0 * * ARCHITECTURAL COMPLIANCE: This file now serves as the main barrel export following * MERN backend architecture principles with Single Responsibility Principle and * feature-first organization. All core functionality is organized into features. * * DESIGN DECISIONS: * 1. Feature-first architecture: Core functionality organized in /features directory * 2. Barrel exports: Each feature exports through index.js for clean imports * 3. Single Responsibility Principle: Each file has one specific responsibility * 4. Factory pattern: Maintained for backward compatibility and ease of use */ // Import centralized configuration from config/localVars.js const { RULE_DIRS, CONTEXT_MODES } = require('./config/localVars'); // Import all functionality from features following barrel export pattern const { Instruqt, deploy, ensureDir, getTemplateFiles, createInstruqt } = require('./features'); // Export pattern that avoids circular reference issues in complex module systems // RATIONALE: This pattern ensures all components are fully defined before being referenced // in factory functions, preventing potential issues with module loading order. // Initialize exports object explicitly to control export order module.exports = {}; // Export the class directly for users who want object-oriented interface // DESIGN DECISION: Direct export eliminates initialization issues while maintaining clean API module.exports.Instruqt = Instruqt; // Export configuration constants for access by factory functions module.exports.RULE_DIRS = RULE_DIRS; module.exports.CONTEXT_MODES = CONTEXT_MODES; // Export factory functions from features module.exports.createInstruqt = createInstruqt; module.exports.deploy = deploy; module.exports.getTemplateFiles = getTemplateFiles;