Files
audita/docs/internal/prompts.md

3.5 KiB

Audita Prompt Registry

internal/prompts embeds seven PromptKit YAML definitions under assets/prompts. The IDs and selected version remain:

  • modules.glossary.proposal (v1)
  • modules.homophones.proposal (v1)
  • modules.spoken_word.proposal (v1)
  • modules.grammar.proposal (v1)
  • validators.spoken_form_plausibility (v1)
  • validators.meaning_reversal_review (v1)
  • validators.editorial_review (v1)

PromptKit reads the embedded definitions and renders their system and user messages from named string variables. The role-bound adapter supplies HardeningPolicy alongside ProposalContract and ValidationContract from embedded fragments under assets/shared, after caller variables so callers cannot replace those instructions. Common literal-span and identity guidance lives in the proposal fragment; shared candidate-reference, context, and confidence guidance lives in the validation fragment. Module-specific policies and examples remain in YAML. Proposal prompts receive the section JSON, glossary JSON where used, and transcript description block. Validator prompts receive the correction payload and description block. The prompt assets retain the prior task instructions and output-schema association. The role-bound runtime supplies the complete JSON Schema output contract and repair count; the definition does not own an operator-facing repair default. The correction-set schema requires a string replacement and accepts an empty string. Proposal guidance uses it for eligible span deletion and permits literal spacing edits; validator guidance evaluates the full before/after segment under each validator's existing remit. A blank resulting segment remains a domain rejection, not a structural schema error.

internal/framework/responseschema remains the only embedded source for correction_set.v1.json and validator_decision_set.v1.json. It exposes that filesystem to PromptKit and retains Audita's schema-key lookup. PromptKit's prepared execution supplies definition and rendered hashes; Audita does not recompute or promise equality with hashes from the removed template renderer. The small Audita registry records only prompt ID, version, source, and embedded path. Prepared runtime metadata belongs in diagnostics rather than the registry.

The structured-call contract carries prompt ID/version, string variables, response-schema key, and logical-call attribution. Module and validator callers pass these values through the role-bound adapter. See the LLM runtime for runtime assembly and configuration for operator-selected profiles.

Proposal instructions describe literal matching, each module's replacement policy, source-based proposal identity, and confidence in whether an edit is warranted. Proposal id and validator correction_index values are short, one-based references scoped to each request, not internal transcript/proposal identities. Mapping belongs to proposal generation and validator reconciliation. Validator instructions distinguish confidence in the verdict from the verdict itself. Compact output examples illustrate the supplied schema without requiring fixed JSON formatting or key order. The grammar article exception and glossary mishearing exception apply consistently across their instructions.

Only the three active validator definitions are retained. The unused internal grammar_review and spoken_word_review definitions and type selections were removed; built-in chains and operator configuration are unchanged.