Files
amcs/internal/types/learning.go
Hein 91239bcf4b
Some checks failed
CI / build-and-test (push) Failing after -31m12s
refactor(store,tools): migrate IDs from UUID to bigserial int64
All internal entity lookups now use bigserial primary keys (int64) while
GUIDs are retained for external/public identification. Updated store
functions (TouchProject, UpdateThoughtMetadata, AddThoughtAttachment) to
query by id instead of guid, added GetThoughtByID, changed semanticSearch
and all tool helpers to use *int64 project IDs, and updated retry/backfill
workers to use int64 thought IDs throughout.
2026-05-03 11:43:34 +02:00

70 lines
2.5 KiB
Go

package types
import (
"time"
"github.com/google/uuid"
)
type LearningEvidenceLevel string
const (
LearningEvidenceHypothesis LearningEvidenceLevel = "hypothesis"
LearningEvidenceObserved LearningEvidenceLevel = "observed"
LearningEvidenceVerified LearningEvidenceLevel = "verified"
)
type LearningStatus string
const (
LearningStatusPending LearningStatus = "pending"
LearningStatusInProgress LearningStatus = "in_progress"
LearningStatusResolved LearningStatus = "resolved"
LearningStatusWontFix LearningStatus = "wont_fix"
LearningStatusPromoted LearningStatus = "promoted"
)
type LearningPriority string
const (
LearningPriorityLow LearningPriority = "low"
LearningPriorityMedium LearningPriority = "medium"
LearningPriorityHigh LearningPriority = "high"
)
type Learning struct {
ID int64 `json:"id"`
GUID uuid.UUID `json:"guid"`
Summary string `json:"summary"`
Details string `json:"details"`
Category string `json:"category"`
Area string `json:"area"`
Status LearningStatus `json:"status"`
Priority LearningPriority `json:"priority"`
Confidence LearningEvidenceLevel `json:"confidence"`
ActionRequired bool `json:"action_required"`
SourceType string `json:"source_type,omitempty"`
SourceRef string `json:"source_ref,omitempty"`
ProjectID *int64 `json:"project_id,omitempty"`
RelatedThoughtID *int64 `json:"related_thought_id,omitempty"`
RelatedSkillID *int64 `json:"related_skill_id,omitempty"`
ReviewedBy *string `json:"reviewed_by,omitempty"`
ReviewedAt *time.Time `json:"reviewed_at,omitempty"`
DuplicateOfLearningID *int64 `json:"duplicate_of_learning_id,omitempty"`
SupersedesLearningID *int64 `json:"supersedes_learning_id,omitempty"`
Tags []string `json:"tags"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type LearningFilter struct {
Limit int
ProjectID *int64
Category string
Area string
Status string
Priority string
Tag string
Query string
}