Drop the three-layer Claude subprocess orchestration (local model →
Claude verifier → cloud escalation). Skills now call LiteLLM directly
and return plain text to Claude Code, which decides what to do with it.
- Delete executor, orchestrator, verifier, result, attempts packages
- Simplify LiteLLMExecutor: Run(Request)→Result becomes Complete(model,sys,user)→(string,int64,error)
- Replace ExecutorFn with CompleteFunc in all 6 skill configs
- Rewrite all skill handlers to call Complete and return {"text","model","duration_ms"}
- Simplify config/models: remove Verifier/LlamaSwapURL, add ModelFor
- Bump version to v0.5.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.2 KiB
Go
50 lines
1.2 KiB
Go
// internal/skills/retrospective/skill.go
|
|
package retrospective
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
|
|
"github.com/mathiasbq/supervisor/internal/registry"
|
|
)
|
|
|
|
// CompleteFunc is the function used to call a local model.
|
|
type CompleteFunc func(ctx context.Context, model, system, user string) (string, int64, error)
|
|
|
|
// Config holds retrospective skill configuration.
|
|
type Config struct {
|
|
SkillPrompt string
|
|
DefaultModel string
|
|
SessionsDir string
|
|
CompleteFunc CompleteFunc
|
|
}
|
|
|
|
// Skill implements registry.Skill for the retrospective tool.
|
|
type Skill struct {
|
|
cfg Config
|
|
}
|
|
|
|
// New constructs a retrospective Skill.
|
|
func New(cfg Config) *Skill { return &Skill{cfg: cfg} }
|
|
|
|
// Name returns the skill name.
|
|
func (s *Skill) Name() string { return "retrospective" }
|
|
|
|
// Tools returns the MCP tool definitions.
|
|
func (s *Skill) Tools() []registry.ToolDef {
|
|
return []registry.ToolDef{
|
|
{
|
|
Name: "retrospective",
|
|
Description: "Consult a local model to analyse a completed session and identify what is novel or worth preserving as organizational knowledge.",
|
|
InputSchema: json.RawMessage(`{
|
|
"type": "object",
|
|
"required": ["session_id"],
|
|
"properties": {
|
|
"session_id": {"type": "string"},
|
|
"model": {"type": "string"}
|
|
}
|
|
}`),
|
|
},
|
|
}
|
|
}
|