docs(hyperguild): document brain pass-rate subcommand and /pass-rate endpoint
Adds pass-rate to the CLI README's subcommand block. Updates CLAUDE.md to note the new /pass-rate endpoint alongside the existing brain HTTP REST API surface. Updates the session_log MCP tool's final_status description to reflect the new pass|fail|skip vocabulary introduced by Plan 5's SKILL.md instrumentation; the aggregator still accepts legacy ok|error|skipped values for backwards compat.
This commit is contained in:
@@ -232,6 +232,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -237,6 +237,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -235,6 +235,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -232,6 +232,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ The brain HTTP REST API (`/query`, `/write`, `/ingest`, `/ingest-raw`,
|
|||||||
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
`/ingest-path`, `/backfill-refs`) remains available on the same port (3300) for
|
||||||
shell scripts and non-MCP clients.
|
shell scripts and non-MCP clients.
|
||||||
|
|
||||||
|
The brain HTTP REST API also serves a read-only `GET /pass-rate?skill=X&window=Y`
|
||||||
|
endpoint that aggregates `final_status` counts from session logs and returns
|
||||||
|
`{skill, window, pass, fail, skip, total, pass_rate}`. Plan 6 (routing pod)
|
||||||
|
reads this to decide whether to route skill calls to local models. Pass rate
|
||||||
|
is `null` when no logged invocations are in the window.
|
||||||
|
|
||||||
## Agent instructions
|
## Agent instructions
|
||||||
|
|
||||||
When acting as a coding agent on this project:
|
When acting as a coding agent on this project:
|
||||||
|
|||||||
@@ -69,6 +69,35 @@ EOF
|
|||||||
knowledge/example-lesson.md
|
knowledge/example-lesson.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `hyperguild brain pass-rate <skill>`
|
||||||
|
|
||||||
|
Returns the pass rate for a skill over a lookback window. Computed
|
||||||
|
on-demand from `brain/sessions/*.jsonl`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ hyperguild brain pass-rate tdd
|
||||||
|
tdd: 47 / 50 = 94% (window: 7d)
|
||||||
|
|
||||||
|
$ hyperguild brain pass-rate tdd --window 30d --json
|
||||||
|
{
|
||||||
|
"skill": "tdd",
|
||||||
|
"window": "30d",
|
||||||
|
"pass": 142,
|
||||||
|
"fail": 8,
|
||||||
|
"skip": 5,
|
||||||
|
"total": 155,
|
||||||
|
"pass_rate": 0.9467
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
|
||||||
|
- `--window` — lookback window (default `7d`; accepts `Nh`, `Nd`)
|
||||||
|
- `--json` — emit the raw response envelope
|
||||||
|
|
||||||
|
Skills with no logged invocations return zero counts and `pass_rate: null`
|
||||||
|
(indicating "no data", distinct from "always passes").
|
||||||
|
|
||||||
### `hyperguild mode <cloud|client-local|sovereign>`
|
### `hyperguild mode <cloud|client-local|sovereign>`
|
||||||
|
|
||||||
Writes a `.mcp.json` template for the chosen operating mode.
|
Writes a `.mcp.json` template for the chosen operating mode.
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ func (s *Server) tools() []map[string]any {
|
|||||||
"skill": str("skill name"),
|
"skill": str("skill name"),
|
||||||
"phase": str("phase within the skill"),
|
"phase": str("phase within the skill"),
|
||||||
"project_root": str("absolute project root"),
|
"project_root": str("absolute project root"),
|
||||||
"final_status": str("ok | error | skipped"),
|
"final_status": str("pass | fail | skip (legacy: ok | error | skipped also accepted)"),
|
||||||
"file_path": str("optional file produced"),
|
"file_path": str("optional file produced"),
|
||||||
"model_used": str("optional model identifier"),
|
"model_used": str("optional model identifier"),
|
||||||
"duration_ms": int_("optional duration in ms"),
|
"duration_ms": int_("optional duration in ms"),
|
||||||
|
|||||||
Reference in New Issue
Block a user