-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Parent Epic
Part of #692 (Operational Skill Store)
Summary
Extend terraphim-agent learn from failure-only capture to also record successful multi-step workflows as reusable CapturedProcedure entries.
What Changes
New types in terraphim_types
CapturedProcedure-- ordered list of steps with preconditions, postconditions, and confidence scoreProcedureStep-- individual command with expected exit code, output pattern, timeout, required env vars
New capture path in terraphim_agent/src/learnings/
- Add
capture_successful_procedure()alongside existingcapture_failed_command() - Accept session ID or manual step list as input
- Store as markdown (matching existing format) with structured frontmatter
- Index via RoleGraph (same as failure learnings)
CLI extensions
terraphim-agent learn capture-success "task-type" --steps-from-session <id>
terraphim-agent learn capture-success "task-type" --steps "cmd1" "cmd2" "cmd3"
terraphim-agent learn procedures
terraphim-agent learn procedures --task-type "deploy"Affected Crates
terraphim_agent(learnings module)terraphim_types(new types)
Dependencies
- Enhanced learning capture: multi-hook pipeline with importance scoring #599 Enhanced learning capture (multi-hook pipeline provides richer event data)
Acceptance Criteria
-
CapturedProceduretype defined with serde + Persistable -
capture-successsubcommand stores procedure to learnings directory -
proceduressubcommand lists stored procedures with confidence scores - Existing
learn listandlearn queryalso surface procedures - Aho-Corasick deduplication prevents storing near-identical procedures
- Unit tests for capture, storage, and query paths
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request