fix(claudewatcher): tag session-dump notes source_type: internal
brain-gardener#5: the audit's unsourced check was flagging 59 raw claudewatcher session dumps as high-severity hallucination risk, because it can't distinguish a first-party observation (a session transcript) from an external claim needing citation. Adds WriteNoteOptions.SourceType, emitted as source_type: <value> in the wing/hall frontmatter route. claudeSink (the claudewatcher sink) now always sets source_type: internal on the notes it writes.
This commit is contained in:
@@ -68,12 +68,13 @@ func (s *claudeSink) Ingest(ctx context.Context, b claudewatcher.Batch) error {
|
||||
}
|
||||
slug := "session-" + b.Host + "-" + b.SessionID
|
||||
if _, err := api.WriteNote(s.brainDir, api.WriteNoteOptions{
|
||||
Filename: slug,
|
||||
Wing: "claude-sessions",
|
||||
Hall: "facts",
|
||||
Type: "source",
|
||||
Domain: b.ProjectID,
|
||||
Content: sb.String(),
|
||||
Filename: slug,
|
||||
Wing: "claude-sessions",
|
||||
Hall: "facts",
|
||||
Type: "source",
|
||||
Domain: b.ProjectID,
|
||||
Content: sb.String(),
|
||||
SourceType: "internal", // raw session transcript, not an external claim (brain-gardener#5)
|
||||
}); err != nil {
|
||||
return fmt.Errorf("write claude session note: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user