import type { OrgRole, ToolProviderConfig } from './types.js'; export declare const SKILL_NAME_RE: RegExp; export interface SkillMeta { name: string; description: string; tags: string[]; tools: string[]; license?: string; source?: string; source_path?: string; source_commit?: string; /** Which root it was found in. */ origin: 'project' | 'user' | 'bundled' | 'catalog'; /** Catalog entry id, for `origin: 'catalog'`. */ catalogId?: string; /** Absolute skill directory. */ dir: string; } export interface Skill extends SkillMeta { body: string; /** Extra .md files in the skill dir, relative, excluding SKILL.md. */ files: string[]; } /** Shipped library: /org-skills, from dist/src/orgrt or src/orgrt. */ export declare function bundledSkillsDir(): string; export declare function skillRoots(projectRoot?: string): { dir: string; origin: SkillMeta['origin']; }[]; /** * Minimal frontmatter reader for top-level scalar and list keys. Handles * `key: value`, quoted values, JSON/flow lists (`[a, b]`), block lists * (`- a`), and folded/literal block scalars (`>` / `|`). Nested maps are * skipped — nothing here needs them. */ export declare function parseFrontmatter(text: string): { data: Record; body: string; }; /** One skill by name, or null. Names are validated before touching the disk. */ export declare function getSkill(name: string, projectRoot?: string): Skill | null; /** Every skill across the roots (overrides resolved), sorted by name. Cached * briefly per root set — the bundled library has hundreds of entries. */ export declare function listSkills(projectRoot?: string): SkillMeta[]; /** Rank skills against free text (a role's title and responsibilities, say). * Name and tag hits weigh more than description hits; idf keeps common * words from dominating. */ export declare function searchSkills(query: string, projectRoot?: string, opts?: { tag?: string; limit?: number; }): (SkillMeta & { score: number; })[]; /** `searchSkills`' scorer over any name/tags/description records (the * catalog ranks its assets with it). */ export declare function rankSkillMeta>(query: string, all: T[], opts?: { limit?: number; }): (T & { score: number; })[]; /** Expand a role's `skill_pool` (names and `tag:` selectors) to names. */ export declare function expandSkillPool(pool: string[] | undefined, projectRoot?: string): string[]; /** Every skill a role may use: pinned first, then its pool. */ export declare function roleSkillNames(role: Pick, projectRoot?: string): string[]; /** `org validate` errors for a role's skill references. */ export declare function validateRoleSkills(role: Pick, projectRoot?: string): string[]; /** The pinned-skill text for a role's system prompt, plus the on-demand * catalog. Deterministic for a given config so the prompt stays a stable * cache prefix. */ export declare function roleSkillGuidance(role: Pick, projectRoot?: string): string | undefined; /** Text of a skill (or one of its reference files) for org_skill_load. */ export declare function loadSkillText(name: string, file: string | undefined, projectRoot?: string): string; /** org_skill_search: the whole library, ranked against `query`, as names and * descriptions only. Discovery never widens access: a hit outside `allowed` * is marked as such and org_skill_load keeps refusing it. */ export declare function skillSearchText(query: string, allowed: string[], projectRoot?: string, limit?: number): string; /** MCP tools a set of skills asks for (monograph_*, monodesign_*). */ export declare function skillTools(names: string[], projectRoot?: string): string[]; export declare const SKILL_PROVIDER_NAME = "monomind"; /** The monomind MCP server, allow-listed to exactly the tools the role's * skills declare — so a developer role holding a code skill gets monograph, * and a copywriter never sees it. Undefined when no skill asks for a tool or * the role already configures a provider of that name itself. */ export declare function skillToolProvider(role: Pick, projectRoot?: string): ToolProviderConfig | undefined; /** A role's configured providers plus the skill-derived one, if any. */ export declare function effectiveToolProviders(role: Pick, projectRoot?: string): ToolProviderConfig[]; //# sourceMappingURL=skill-library.d.ts.map