Include glossary guidance in proposal conversations

This commit is contained in:
2026-11-26 18:22:52 +00:00
parent 20db09bd2a
commit e0445abe48
15 changed files with 82 additions and 15 deletions

View File

@@ -3,14 +3,31 @@ package promptcontext
import (
"encoding/json"
"fmt"
"strings"
"gitea.maximumdirect.net/eric/audita/v4/internal/core/glossary"
)
// GlossaryVariables contains the glossary inputs shared by a stage's proposals.
type GlossaryVariables struct {
ContextJSON string
ProtectionJSON string
ContextJSON string
ProtectionJSON string
InstructionsBlock string
}
type GlossaryInstruction struct {
Collection string
Text string
}
func GlossaryInstructionsBlock(instructions []GlossaryInstruction) string {
var blocks []string
for _, instruction := range instructions {
if instruction.Text != "" {
blocks = append(blocks, instruction.Collection+":\n"+instruction.Text)
}
}
return strings.Join(blocks, "\n\n")
}
func PrepareGlossaryVariables(entries []glossary.Entry, terms []glossary.Term) (GlossaryVariables, error) {