Files
mathiasandClaude Sonnet 5 b600cc986c
CI / Lint / Test / Vet (push) Failing after 5s
CI / Mirror to GitHub (push) Has been skipped
chore(module): rename module github.com/mathiasbq/supervisor -> git.d-ma.be/mathias/hyperguild (#42)
Aligns module path with canonical Gitea source (infra ADR-0004) and
repo name. Binary only, no downstream consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Roq1ajWKR5f1hG5Df9wC6A
2026-07-26 23:37:11 +02:00

50 lines
1.3 KiB
Go

// internal/skills/sessionlog/skill.go
package sessionlog
import (
"encoding/json"
"git.d-ma.be/mathias/hyperguild/internal/registry"
)
// Config holds sessionlog skill configuration.
type Config struct {
SessionsDir string // path to brain/sessions/
}
// Skill implements registry.Skill for the session_log tool.
type Skill struct {
cfg Config
}
// New constructs a sessionlog Skill.
func New(cfg Config) *Skill { return &Skill{cfg: cfg} }
// Name returns the skill name.
func (s *Skill) Name() string { return "sessionlog" }
// Tools returns the MCP tool definitions.
func (s *Skill) Tools() []registry.ToolDef {
return []registry.ToolDef{
{
Name: "session_log",
Description: "Append a structured entry to the current session log. Call after each skill invocation completes to record what happened for retrospective and training data extraction.",
InputSchema: json.RawMessage(`{
"type": "object",
"required": ["session_id"],
"properties": {
"session_id": {"type": "string"},
"skill": {"type": "string"},
"phase": {"type": "string"},
"project_root": {"type": "string"},
"final_status": {"type": "string"},
"file_path": {"type": "string"},
"model_used": {"type": "string"},
"duration_ms": {"type": "integer"},
"message": {"type": "string"}
}
}`),
},
}
}