/** * RoleKnowledgeInjector — maps role-specific professional standards to pipeline stages. * * Implements Stage-Bound Design (arc42 §5.4): capabilities bind to stages, * not to Agent identities. Each stage gets the relevant role's best practices * injected as execution principles. * * Templates are loaded from `templates/` directory (shipped with npm package). * Users can override defaults via L2 configuration (custom template paths). */ import type { StageId } from '../types/index.js'; /** Coarse role category for principle injection. */ export type RoleCategory = 'pm' | 'architect' | 'engineer' | 'auditor' | 'ux' | 'release'; export interface StageMapping { role: RoleCategory; templateFile: string; description: string; } export interface RoleKnowledgeInjectorOptions { /** Custom templates directory. Overrides the default `templates/` path. */ templatesDir?: string; /** Custom stage-role mappings loaded from config (AC-6.6.3). Merged with defaults. */ customMappings?: Record; } export declare class RoleKnowledgeInjector { private readonly templatesDir; private readonly cache; private readonly stageRoleMap; constructor(options?: RoleKnowledgeInjectorOptions); /** * Get execution principles for a given stage. * Returns the markdown content of the corresponding role template. * Returns empty string if stage has no mapping or template is missing. */ getPrinciples(stageId: StageId): string; /** * Get default gate rules for a given stage. * Extracts rule-like items from the principles template. * Each bullet point becomes a gate rule with 'warning' severity. */ getGateRules(stageId: StageId): Array<{ ruleId: string; description: string; severity: 'blocker' | 'warning'; }>; /** * Inject stage principles into a task context object. * Returns an enriched context with `principles` field populated. */ inject(stageId: StageId, context: Record): Record; /** * Get the role category for a stage. */ getRoleForStage(stageId: StageId): RoleCategory | null; /** * List all known stage-to-role mappings. */ listMappings(): Array<{ stageId: string; role: RoleCategory; templateFile: string; description: string; }>; private loadTemplate; } //# sourceMappingURL=role-knowledge-injector.d.ts.map