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 score
ProcedureStep -- 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 existing capture_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
Acceptance Criteria
Parent Epic
Part of #692 (Operational Skill Store)
Summary
Extend
terraphim-agent learnfrom failure-only capture to also record successful multi-step workflows as reusableCapturedProcedureentries.What Changes
New types in
terraphim_typesCapturedProcedure-- ordered list of steps with preconditions, postconditions, and confidence scoreProcedureStep-- individual command with expected exit code, output pattern, timeout, required env varsNew capture path in
terraphim_agent/src/learnings/capture_successful_procedure()alongside existingcapture_failed_command()CLI extensions
Affected Crates
terraphim_agent(learnings module)terraphim_types(new types)Dependencies
Acceptance Criteria
CapturedProceduretype defined with serde + Persistablecapture-successsubcommand stores procedure to learnings directoryproceduressubcommand lists stored procedures with confidence scoreslearn listandlearn queryalso surface procedures