/** * Governance block builder. * * Produces a structured "--- Governance ---" block injected at position 0 of * every system prompt via `system.transform`. The block combines imperative * instructions from `HivemindConfigs` (mode, expertise, language) with * field:value context lines from the resolved behavioral profile. * * Format per D-06 (hybrid instruction + fields): * ``` * --- Governance --- * You are operating in expert-advisor mode. Communicate at intermediate-high level. Use en for all conversation and en for all documents. * communicationStyle: detailed | decisionSpeed: deliberate | expertise: intermediate-high * ``` * * @module governance-block * @see D-05, D-06, D-07 in CA-03-CONTEXT.md */ import type { HivemindConfigs } from "../../schema-kernel/hivemind-configs.schema.js"; import type { ResolvedBehavioralProfile } from "../../routing/behavioral-profile/types.js"; /** * Builds the structured governance block string for system prompt injection. * * The output has three lines + optional trajectory/contract instructions: * 1. `--- Governance ---` header * 2. Instruction line combining mode, expertise, and language directives * 3. Field:value context line (only when `profile` is provided) * 4. (P25.5) Trajectory and contract tool instructions (only when `config` is provided) * * @param config - Validated HivemindConfigs from the config subscriber. * @param profile - Optional resolved behavioral profile for field:value context. * @returns A single string with `\n` line breaks, ready for system array injection. * * @example * ```typescript * const config = HivemindConfigsSchema.parse({ * mode: "expert-advisor", * user_expert_level: "intermediate-high-level", * conversation_language: "en", * documents_and_artifacts_language: "en", * }) * const block = buildGovernanceBlock(config, profile) * // "--- Governance ---\nYou are operating in expert-advisor mode. ...\ncommunicationStyle: detailed | ..." * ``` */ export declare function buildGovernanceBlock(config: HivemindConfigs, profile?: ResolvedBehavioralProfile | undefined): string; //# sourceMappingURL=governance-block.d.ts.map