/** * knowledge-loader.ts * * Loads framework best-practice knowledge from Markdown files. * * Resolution order (first hit wins for each skill): * 1. CODEPRISM_KNOWLEDGE_DIR/.md — user / team override * 2. /.codeprism/knowledge/.md — workspace-local contribution * 3. src/skills/knowledge/.md — built-in (shipped with codeprism) * * This makes the knowledge base community-extensible: anyone can drop a * `myframework.md` file in CODEPRISM_KNOWLEDGE_DIR and codeprism picks it up on * next index — no TypeScript skill registration required. * * ## Community contribution format * * ```markdown * # Best Practices * * ## Architecture * - bullet one * - bullet two * * ## Code Style * - bullet one * * ## Testing * ## Performance * ## Security * ## Anti-Patterns * ``` * * Only recognised section headers are parsed; unknown headers are ignored. * Sections missing from the file produce empty arrays (the TypeScript skill * bestPractices is used as fallback for any empty section). */ import type { BestPractices } from "./types.js"; /** * Parse a knowledge Markdown file into a BestPractices object. * Returns null if the file cannot be read. */ export declare function parseKnowledgeFile(filePath: string): Promise | null>; /** * Load the best-practice knowledge for a skill, applying community/user * overrides on top of the TypeScript skill's built-in bestPractices. * * @param skillId Skill identifier (e.g. "rails") * @param base TypeScript skill's bestPractices (fallback) * @param workspaceRoot User workspace root for local knowledge lookup * @returns Merged BestPractices (override wins per section) */ export declare function loadKnowledge(skillId: string, base: BestPractices, workspaceRoot: string): Promise; /** * Load knowledge for multiple skills concurrently. * Returns a map of skillId → merged BestPractices. */ export declare function loadAllKnowledge(skills: Array<{ id: string; bestPractices: BestPractices; }>, workspaceRoot: string): Promise>; /** * List all discoverable skill IDs, including community-contributed ones * that have no corresponding TypeScript Skill definition. * * Community frameworks: any `.md` file in CODEPRISM_KNOWLEDGE_DIR or * /.codeprism/knowledge/ whose stem doesn't match a built-in skill. */ export declare function discoverCommunitySkillIds(builtinIds: Set, workspaceRoot: string): Promise; //# sourceMappingURL=knowledge-loader.d.ts.map