diff --git a/docs/superpowers/plans/2026-05-03-pass-rate-logging.md b/docs/superpowers/plans/2026-05-03-pass-rate-logging.md index 8205b93..1fdfff0 100644 --- a/docs/superpowers/plans/2026-05-03-pass-rate-logging.md +++ b/docs/superpowers/plans/2026-05-03-pass-rate-logging.md @@ -167,10 +167,14 @@ import ( "github.com/stretchr/testify/require" ) -// writeSession writes one or more JSONL entries to /.jsonl. +// writeSession writes one or more JSONL entries to /sessions/.jsonl. +// The handler scans /sessions/*.jsonl, so the helper creates the +// sessions/ subdir to match the production layout. func writeSession(t *testing.T, dir, sessionID string, entries ...string) { t.Helper() - path := filepath.Join(dir, sessionID+".jsonl") + sessionsDir := filepath.Join(dir, "sessions") + require.NoError(t, os.MkdirAll(sessionsDir, 0o755)) + path := filepath.Join(sessionsDir, sessionID+".jsonl") body := "" for _, e := range entries { body += e + "\n" @@ -942,6 +946,7 @@ Update `cmd/hyperguild/README.md` to document the new `pass-rate` subcommand. Up **Files:** - Modify: `cmd/hyperguild/README.md` (add `pass-rate` subcommand block) - Modify: `CLAUDE.md` (mention `/pass-rate` in the brain HTTP REST API section) +- Modify: `internal/skills/sessionlog/skill.go` (or wherever the `session_log` MCP tool is registered) — update the `final_status` description from `ok | error | skipped` to `pass | fail | skip (legacy: ok | error | skipped accepted)` so the agent-facing tool definition matches the new SKILL.md vocabulary - [ ] **Step 1: Update the CLI README** @@ -978,6 +983,21 @@ Skills with no logged invocations return zero counts and `pass_rate: null` (indicating "no data", distinct from "always passes"). ``` +- [ ] **Step 1.5: Update the `session_log` MCP tool's `final_status` description** + +Find the `session_log` tool registration in the supervisor (`internal/skills/sessionlog/`). Update the `final_status` field's description string to read: + +``` +pass | fail | skip (legacy: ok | error | skipped also accepted) +``` + +This keeps the agent-facing schema honest — Plan 5's SKILL.md contract uses the new vocabulary. The aggregator normalizes both for backward compat, but the tool's docstring should lead with the new vocabulary. + +```bash +grep -rn "ok | error | skipped\|final_status.*description" ~/dev/AI/hyperguild/.worktrees/pass-rate-endpoint/internal/skills/sessionlog/ ~/dev/AI/hyperguild/.worktrees/pass-rate-endpoint/ingestion/internal/skills/sessionlog/ 2>/dev/null | head +# Locate the registration; update the description string verbatim. +``` + - [ ] **Step 2: Update CLAUDE.md** Find the section in `CLAUDE.md` that documents the brain HTTP REST API (look for `## MCP endpoints` or similar). After the existing endpoint list, add a note about `/pass-rate`: