/** * Project Guidance Loader - Loads high-level guidance files for AI agents * * This module searches for and loads high-level guidance files commonly used * in AI-assisted coding projects (AGENTS.md, CLAUDE.md, etc.) to ensure * all AI commands follow project-specific guidelines. * * IMPORTANT: This module distinguishes between: * - GUIDANCE FILES (AGENTS.md, CLAUDE.md, etc.) - Always loaded, instruct AI behaviour * - PROJECT KNOWLEDGE (knowledge-base/*) - Selectively loaded per command to save tokens * * Both are project-declared content injected into the LLM prompt — guidance * files explicitly with "You MUST follow these instructions strictly" — * reachable by cloning any repo and running any `valora` command inside it, * no `.valora/` declaration or install step required. Same "untrusted * project content steering agent behaviour with no confirmation" class as * `.valora/config.json`'s hooks field and `.valora/lsp-servers.json`; gated * behind the same `isWorkspaceTrusted()` mechanism rather than a new one. */ /** * Get the project root directory — the directory from which Valora is being run. * This is always process.cwd(), not the Valora package install directory. */ export declare function getProjectRoot(): string; /** * Search for and load all guidance files in the project root * Returns combined content of all found guidance files * * NOTE: This only loads GUIDANCE files (AGENTS.md, CLAUDE.md, etc.) * Project knowledge from knowledge-base/ is loaded separately via loadProjectKnowledge() */ export declare function loadProjectGuidance(): Promise; /** * Clear the guidance cache (useful for testing or when files change) */ export declare function clearGuidanceCache(): void; /** * Load project knowledge files selectively based on command requirements * * @param knowledgeFiles - Array of filenames to load from knowledge-base/ directory * Examples: ['FUNCTIONAL.md', 'PRD.md', 'PLAN-*.md'] * Supports glob patterns for dynamic file matching * @returns Combined content of requested knowledge files, or null if none found * * Usage: * - create-prd command: loadProjectKnowledge(['FUNCTIONAL.md']) * - create-backlog command: loadProjectKnowledge(['PRD.md']) * - implement command: loadProjectKnowledge(['PLAN-*.md']) // loads latest plan * - review-functional command: loadProjectKnowledge(['PRD.md', 'FUNCTIONAL.md']) */ export declare function loadProjectKnowledge(knowledgeFiles: string[]): Promise; /** * Clear only the knowledge cache (useful when knowledge files change) */ export declare function clearKnowledgeCache(): void; /** * Check if any guidance files exist in the project */ export declare function hasProjectGuidance(): boolean; /** * Get the list of guidance file patterns being searched for */ export declare function getGuidanceFilePatterns(): readonly string[]; /** * Load available agent definitions for pre-injection into the LLM context * * This pre-loads agent files so the LLM doesn't need to use read_file tool * to access agent definitions. Agent files are loaded from data/agents/ directory. * * @param agentRoles - Array of agent role names to load (e.g., ['product-manager', 'lead']) * @returns Combined content of requested agent files, or null if none found */ export declare function loadAvailableAgents(agentRoles: string[]): Promise; /** * Clear only the agent content cache (useful when agent files change) */ export declare function clearAgentContentCache(): void; //# sourceMappingURL=project-guidance-loader.d.ts.map