import { type ArchitectReport } from "@adi-mudi/pi-chirpi"; import { type DocTypeId } from "../docs-factory/catalog.js"; export interface GeneratedRoleDef { role: string; label: string; tools: string[]; mandate: string; /** When the harness should spawn this agent. Becomes part of the YAML * description: frontmatter so the harness auto-invokes correctly. * Required — every role has one. */ invocationHint: string; /** What this agent MUST NOT do, even if asked. Rendered as the * `## Out of scope` section between mandate and completion contract. * Required — every role has at least one entry. */ outOfScope: string[]; interactive?: boolean; /** Doc-writer roles carry a documentation contract from the catalog. */ docType?: DocTypeId; /** When set, the generator loads the file at this path (relative to the * agents source directory) and uses ITS content as the agent body — * replacing the standard mandate + outOfScope + completion contract * template. Used for specialists whose contract is too specific to * fit the standard template (e.g. community-researcher). The file * MUST be valid markdown with frontmatter (name + description + tools). */ bodyFile?: string; } export declare const GENERATED_ROLES: GeneratedRoleDef[]; export interface TechnologyResource { id: string; name: string; keywords: string[]; body: string; source: "bundle" | "project"; } export interface GeneratedAgentPlan { role: string; agentName: string; description: string; tools: string[]; content: string; } export interface WriteAgentsResult { created: string[]; regenerated: string[]; keptDrifted: string[]; skipped: string[]; } export declare const GENERATOR_VERSION = 10; export declare function getBundledTechnologiesDir(): string; /** Locate the canonical body file for a GeneratedRoleDef.bodyFile entry. * Resolution order: * 1. Same directory as this generator file (source layout) * 2. process.cwd() + pi-extension/src/agents/ (when running tests from repo root) * Returns null when the file cannot be found — the caller falls back to * the standard template body. */ export declare function resolveBodyFilePath(bodyFile: string): string | null; /** Load a canonical body file and return its content (frontmatter stripped). * Used by `buildGeneratedAgentMarkdown` when a role carries `bodyFile`. */ export declare function loadCanonicalBody(bodyFile: string): string | null; export declare function getProjectTechnologiesDir(cwd: string): string; export declare function parseKeywords(raw: unknown): string[]; export declare function discoverTechnologyResources(cwd: string): TechnologyResource[]; export declare function matchTechnologies(stackHints: string[], resources: TechnologyResource[]): TechnologyResource[]; export declare function getProjectSlug(cwd: string): string; export declare function buildGeneratedAgentMarkdown(def: GeneratedRoleDef, agentName: string, projectName: string, resources: TechnologyResource[], report: ArchitectReport | null): string; export declare function planAgentGeneration(cwd: string, roles: GeneratedRoleDef[], resources: TechnologyResource[], report: ArchitectReport | null): GeneratedAgentPlan[]; export declare function writeGeneratedAgents(cwd: string, plans: GeneratedAgentPlan[], opts?: { regenerate?: boolean; }): WriteAgentsResult; export interface RegenerationPreview { recreate: string[]; overwrite: string[]; keptDrifted: string[]; unknown: string[]; } export declare function previewRegeneration(cwd: string, agentNames: string[]): RegenerationPreview;