Documentation
¶
Overview ¶
Package curation implements the memory maintenance system for colony data. It provides 8 curation ants (sentinel, nurse, critic, herald, janitor, archivist, librarian, scribe) and an orchestrator that runs them in a fixed sequential order matching the shell orchestrator.sh behavior. Sentinel abort prevents remaining steps when data corruption is detected.
Index ¶
- type Archivist
- type Critic
- type CurationAnt
- type CurationResult
- type Herald
- type Janitor
- type Librarian
- type Nurse
- type Orchestrator
- func (o *Orchestrator) Caste() agent.Caste
- func (o *Orchestrator) Execute(ctx context.Context, event events.Event) error
- func (o *Orchestrator) Name() string
- func (o *Orchestrator) Run(ctx context.Context, dryRun bool) (*CurationResult, error)
- func (o *Orchestrator) Subscribe(bus *events.Bus) error
- func (o *Orchestrator) Triggers() []agent.Trigger
- type Scribe
- type Sentinel
- type StepResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archivist ¶
type Archivist struct {
// contains filtered or unexported fields
}
Archivist archives low-trust instincts. Instincts with confidence < 0.30 are marked as "archived" to indicate they should not influence colony behavior. The instinct data is preserved but flagged for future pruning.
func NewArchivist ¶
NewArchivist creates a new Archivist ant backed by the given store.
type Critic ¶
type Critic struct {
// contains filtered or unexported fields
}
Critic detects contradictions in the instinct store. Two instincts are considered contradictory if they share the same topic but express opposing conclusions (e.g., one says "prefer X" and another says "avoid X").
type CurationAnt ¶
type CurationAnt interface {
agent.Agent
Run(ctx context.Context, dryRun bool) (StepResult, error)
}
CurationAnt is the internal interface extended from agent.Agent that adds the Run method used by the orchestrator for sequential step execution.
type CurationResult ¶
type CurationResult struct {
Steps []StepResult `json:"steps"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
DryRun bool `json:"dry_run"`
DurationMs int64 `json:"duration_ms"`
}
CurationResult holds the aggregate outcome of a full curation run.
type Herald ¶
type Herald struct {
// contains filtered or unexported fields
}
Herald promotes high-confidence instincts to QUEEN.md. It reads instincts with confidence >= 0.80 and writes their trigger patterns to the Patterns section of QUEEN.md, following the queen.PromoteInstinct pattern.
type Janitor ¶
type Janitor struct {
// contains filtered or unexported fields
}
Janitor cleans expired events from the event bus JSONL store. It delegates to bus.Cleanup which removes events past their TTL.
func NewJanitor ¶
NewJanitor creates a new Janitor ant with access to the store and bus.
type Librarian ¶
type Librarian struct {
// contains filtered or unexported fields
}
Librarian produces inventory statistics across colony data stores. It counts entries in observations, instincts, events, and pheromones to give an overview of colony memory health.
func NewLibrarian ¶
NewLibrarian creates a new Librarian ant with access to the store and bus.
type Nurse ¶
type Nurse struct {
// contains filtered or unexported fields
}
Nurse recalculates trust scores for instincts with out-of-date scores. It reads the instincts store and updates entries whose computed score differs from the stored value.
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator runs all 8 curation ants in sequence. If the sentinel step detects corrupt stores, remaining steps are skipped. The orchestrator implements the Agent interface so it can be registered in the agent registry and triggered by the event bus.
func NewOrchestrator ¶
func NewOrchestrator(store *storage.Store, bus *events.Bus) *Orchestrator
NewOrchestrator creates a curation orchestrator with all 8 ants in the correct sequential order matching the shell orchestrator.sh behavior: sentinel, nurse, critic, herald, janitor, archivist, librarian, scribe.
func (*Orchestrator) Caste ¶
func (o *Orchestrator) Caste() agent.Caste
Caste returns the agent's role category.
func (*Orchestrator) Name ¶
func (o *Orchestrator) Name() string
Name returns the unique identifier for this agent.
func (*Orchestrator) Run ¶
func (o *Orchestrator) Run(ctx context.Context, dryRun bool) (*CurationResult, error)
Run executes all 8 curation ants sequentially. If the sentinel step fails (corrupt stores detected), the remaining steps are marked as skipped and the loop breaks early.
func (*Orchestrator) Subscribe ¶
func (o *Orchestrator) Subscribe(bus *events.Bus) error
Subscribe registers the orchestrator for consolidation events.
func (*Orchestrator) Triggers ¶
func (o *Orchestrator) Triggers() []agent.Trigger
Triggers returns the event patterns that activate the orchestrator.
type Scribe ¶
type Scribe struct{}
Scribe generates a text report summarizing the curation run results. It collects StepResults from the orchestrator and formats them into a human-readable report that can be persisted or displayed.
type Sentinel ¶
type Sentinel struct {
// contains filtered or unexported fields
}
Sentinel is the health-check curation ant. It verifies that colony data stores are not corrupt before allowing remaining curation steps to run. If any checked store contains invalid JSON, Sentinel returns an error and the orchestrator skips remaining steps.
func NewSentinel ¶
NewSentinel creates a new Sentinel ant backed by the given store.