tcl

package
v0.0.0-...-dfb39b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPrompt

func BuildPrompt(articleIDs []string, temperature int) string

BuildPrompt assembles the compliance system prompt block from the given article IDs and TCL temperature (1–10).

func DefaultArticleIDs

func DefaultArticleIDs() []string

DefaultArticleIDs returns the IDs of all defaultSelected articles.

func HardwiredArticleIDs

func HardwiredArticleIDs() []string

HardwiredArticleIDs returns the IDs of all hardwired articles.

func MergeWithHardwired

func MergeWithHardwired(selected []string) []string

MergeWithHardwired takes a user's article selection and ensures all hardwired articles are present. Order is preserved: user selections first, then any hardwired articles not already in the list.

Types

type Article

type Article struct {
	ID              string `json:"id"`
	Label           string `json:"label"`
	Category        string `json:"category"`
	Hardwired       bool   `json:"hardwired"`
	DefaultSelected bool   `json:"defaultSelected"`
	ReferenceURL    string `json:"referenceUrl"`
	Interpretation  string `json:"interpretation"`
}

type AutoSelectHeuristic

type AutoSelectHeuristic struct {
	Condition          string   `json:"condition"`
	AutoSelectArticles []string `json:"autoSelectArticles"`
}

type Group

type Group struct {
	TreatyID string    `json:"treatyId"`
	Items    []Article `json:"items"`
}

type LLMHelperConfig

type LLMHelperConfig struct {
	PromptTemplate       string                `json:"promptTemplate"`
	AutoSelectHeuristics []AutoSelectHeuristic `json:"autoSelectHeuristics"`
}

type MasterList

type MasterList struct {
	Version     string      `json:"version"`
	Treaties    []Treaty    `json:"treaties"`
	Articles    []Group     `json:"articles"`
	SelectionUI SelectionUI `json:"selectionUi"`
}

func Master

func Master() MasterList

Master returns the full embedded TCL master list.

type MultiSelectConfig

type MultiSelectConfig struct {
	TreatyFieldID              string `json:"treatyFieldId"`
	ArticleFieldID             string `json:"articleFieldId"`
	AllowArticleFilterByTreaty bool   `json:"allowArticleFilterByTreaty"`
	ShowHardwiredBadge         bool   `json:"showHardwiredBadge"`
	DisallowDeselectHardwired  bool   `json:"disallowDeselectHardwired"`
}

type SelectionUI

type SelectionUI struct {
	MultiSelect MultiSelectConfig `json:"multiSelect"`
	LLMHelper   LLMHelperConfig   `json:"llmHelper"`
}

type Treaty

type Treaty struct {
	ID              string `json:"id"`
	Label           string `json:"label"`
	Citation        string `json:"citation"`
	Jurisdiction    string `json:"jurisdiction"`
	Required        bool   `json:"required"`
	CanDeselect     bool   `json:"canDeselect"`
	DefaultSelected bool   `json:"defaultSelected"`
	SourceURL       string `json:"sourceUrl"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL