PR #131 removed WriteNote's legacy brain/knowledge/ fallback branch that
activated when wing/hall were both empty, but never updated the CLI that
was the only caller relying on it. Since `hyperguild brain write` never
sent wing/hall, every invocation of the CLI's most load-bearing brain
command started hard-erroring "wing and hall are required" — a live,
README-documented command broken on every call.
Separately, writeRequest never had a `slug` field (pre-existing, unrelated
to #131): the CLI's slug value was silently dropped server-side even
before this PR, falling back to a timestamp filename.
Fix:
- `hyperguild brain write <wing> <hall> <slug>` replaces the old
`<type> <slug>` shape. Positional args, mirroring the existing
`brain query <topic>` pattern and matching writeHallNote's own
wing/hall/slug parameter order server-side (handler.go's
brain.NotePath(brainDir, wing, hall, slug)) — no new flags needed since
wing/hall/slug are all required, not optional filters.
- brainClient.Write now sends {wing, hall, filename, content}, matching
writeRequest exactly (writeRequest already gained a Filename field in
#131, so no server-side change was needed — only the CLI was sending
the wrong shape). This also fixes the dead slug bug: slug now arrives
server-side as filename instead of being silently dropped.
- Added TestWrite_CLIPayloadRoundTrips in ingestion/internal/api, which
POSTs the CLI's exact JSON envelope to the real Handler.Write (not a
mock) and asserts a real file with real wing/hall frontmatter lands on
disk. cmd/hyperguild and ingestion are separate Go modules (no
go.work), so this can't be a single cross-module test — instead the
wire contract is pinned from the server side, closing the gap where
cmd/hyperguild/http_test.go's TestBrainClient_Write_Success used only a
hand-rolled httptest mock and stayed green through the wing/hall
regression.
- Updated cmd/hyperguild/README.md and the 2026-05-03 CLI design spec's
stale `<type> <slug>` examples.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drafted via superpowers:feature-spec. Plan 6 of 7 in the skill
migration. Surface frozen at 4 cost-routable skills (code_review,
debug, retrospective, trainer); LiteLLM proxies model choice; pass-
rate drives the route decision with default-to-local plus an env
kill switch for the empty-data window. Plan 7 amendment baked in:
internal/skills/{review,debug,retrospective,trainer} survive Plan 6.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Skill instrumentation pattern, brain /pass-rate HTTP endpoint, and
optional hyperguild CLI subcommand for shell access. Pilot with tdd
SKILL.md, then roll out to 6 binary-outcome skills (code-review,
debug, feature-spec, session-retrospective, trainer, spec-driven-dev).
Decisions: SKILL.md as source of truth for the logging contract;
on-demand aggregation from JSONL (no materialized counters until
proven necessary); pass|fail|skip vocabulary forward, with
ok|error|skipped accepted by the read-side aggregator for backwards
compat.
Seven success criteria, ten out-of-scope items, six risks.
The brain HTTP REST /query endpoint accepts POST with JSON body
{query, limit}, not GET with URL query string. Surfaced empirically
during Plan 4 Task 7 smoke testing. Spec text now matches the
implementation.
Implementation-level spec for the hyperguild CLI: a stdlib Go binary
at cmd/hyperguild/ with subcommands tier, brain query/write, and mode
(cloud|client-local|sovereign). Replaces the supervisor's tier MCP and
provides shell-friendly access to the brain HTTP REST API.
Six measurable success criteria, seven out-of-scope items, six risks.
Decisions logged: stdlib flag + inline router (no cobra), reuse
internal/tier verbatim, BRAIN_URL env override, mode subcommand writes
.mcp.json with per-mode template plus placeholder for the Plan 6
routing pod.
Full vision for the hyperguild SDO: monorepo structure, two-layer brain
(declarative wiki + parametric training data), operating tiers, MCP tool
surface, session log format, retrospective + trainer workers, and four
implementation phases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Captures the full architecture: Go MCP server on flamingo, Claude
supervisor+worker instance, LiteLLM/Ollama gradual delegation, TDD
as first skill, language-agnostic test runner detection, structured
JSON output contract, and three-layer model selection.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>