Documentation
¶
Overview ¶
Package journal provides a per-task decision log with AI summarization. Entries are stored as JSONL (one JSON object per line) in .cloop/journal/<task-id>.jsonl for efficient append-only writes.
Index ¶
- Variables
- func Append(workDir string, entry Entry) error
- func IsValidType(t EntryType) bool
- func ListAll(workDir string) ([]string, error)
- func Summarize(ctx context.Context, p provider.Provider, model string, entries []Entry) (string, error)
- func SummarizePrompt(taskID string, entries []Entry) string
- type Entry
- type EntryType
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidTypes = []EntryType{TypeDecision, TypeObservation, TypeBlocker, TypeInsight}
ValidTypes lists the accepted entry type values.
Functions ¶
func Append ¶
Append writes a single entry to the task's journal file. The file is created if it does not exist. The directory is created on demand.
func IsValidType ¶
IsValidType reports whether t is a recognised entry type.
func Summarize ¶
func Summarize(ctx context.Context, p provider.Provider, model string, entries []Entry) (string, error)
Summarize calls the AI provider to generate a narrative summary of a task's journal.
func SummarizePrompt ¶
SummarizePrompt builds the AI prompt used by Summarize.
Types ¶
Click to show internal directories.
Click to hide internal directories.