feat: implement context file loading system for agent prompts

- Introduced a new utility function `loadContextFiles` to load project-specific context files from the `.automaker/context/` directory, enhancing agent prompts with project rules and guidelines.
- Updated `AgentService` and `AutoModeService` to utilize the new context loading functionality, combining context prompts with existing system prompts for improved agent performance.
- Added comprehensive documentation on the context files system, including usage examples and metadata structure, to facilitate better understanding and implementation.
- Removed redundant context loading logic from `AutoModeService`, streamlining the codebase.

These changes aim to improve the agent's contextual awareness and adherence to project-specific conventions.
This commit is contained in:
Test User
2025-12-22 00:09:57 -05:00
parent e2718b37e3
commit 398f7b8fdd
5 changed files with 462 additions and 81 deletions

View File

@@ -37,21 +37,20 @@ export {
} from './prompt-builder.js';
// Logger
export {
createLogger,
getLogLevel,
setLogLevel,
LogLevel,
} from './logger.js';
export { createLogger, getLogLevel, setLogLevel, LogLevel } from './logger.js';
// File system utilities
export {
mkdirSafe,
existsSafe,
} from './fs-utils.js';
export { mkdirSafe, existsSafe } from './fs-utils.js';
// Path utilities
export { normalizePath, pathsEqual } from './path-utils.js';
// Context file loading
export {
normalizePath,
pathsEqual,
} from './path-utils.js';
loadContextFiles,
getContextFilesSummary,
type ContextMetadata,
type ContextFileInfo,
type ContextFilesResult,
type LoadContextFilesOptions,
} from './context-loader.js';