321 Commits
Author SHA1 Message Date
mathias 4ef6a22e28 feat: add CD workflow (buildctl → Gitea registry → infra repo update) 2026-04-20 21:36:22 +02:00
mathias 3796cfca87 fix: add .dockerignore and non-root USER to Dockerfile 2026-04-20 20:27:42 +02:00
mathias 7ce544a051 feat: add multi-stage Dockerfile with claude CLI runtime 2026-04-20 20:24:20 +02:00
mathias 391720155e docs: add CD pipeline implementation plan 2026-04-20 20:17:07 +02:00
mathias ae6600b8d2 docs: add CD pipeline design spec (BuildKit + Flux GitOps) 2026-04-20 20:10:16 +02:00
mathiasandClaude Sonnet 4.6 6328766c7f fix(main): re-evaluate chain per call to respect caller model override
CI / Lint / Test / Vet (push) Successful in 1m8s
CI / Mirror to GitHub (push) Has been skipped
buildOrch now returns a closure instead of *Orchestrator. Each invocation
calls models.ChainFor(skill, req.Model) so a non-empty caller override
collapses to a single-entry chain (no escalation). The attempts slice is
also allocated fresh per call, preventing unbounded growth across requests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.3.0
2026-04-20 11:34:09 +02:00
mathiasandClaude Sonnet 4.6 f1deedd39d feat(main): wire per-skill Orchestrators replacing single executor.Run
Each skill now gets its own Orchestrator built from its ChainFor entry,
with LiteLLM for local tiers and Claude for cloud tiers. Removes the
defunct models.Resolve calls and single shared executor.Run pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 11:28:10 +02:00
mathias 5cb272a869 feat(exec): add Orchestrator chain walker with verification and warm-state logging 2026-04-20 11:06:13 +02:00
mathias e96b39a812 feat(exec): add Claude verifier for local model output quality gate 2026-04-20 11:02:59 +02:00
mathias 5db5b33cd7 feat(exec): add LiteLLM HTTP executor for local model dispatch 2026-04-20 10:46:08 +02:00
mathias a32457b5bc feat(exec): pass --model flag to claude subprocess for cloud-tier dispatch 2026-04-20 08:55:03 +02:00
mathiasandClaude Sonnet 4.6 e0be5f0f98 feat(config): replace single-model config with chain-based routing
Implements escalation chains per skill with three-layer priority:
1. Caller override (model param) — no escalation
2. Per-skill chain from models.yaml
3. default_chain fallback

New APIs:
- Verifier() — fixed verifier for output validation
- LlamaSwapURL() — base URL for warm-state probing
- ChainFor(skill, override) — ordered model list for escalation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 08:48:33 +02:00
mathias 6d410b810b feat(session): extend Attempt with tier, timing, and verdict fields 2026-04-20 08:35:27 +02:00
mathias 76f195de2a docs: model orchestration design spec for Phase 3
CI / Lint / Test / Vet (push) Successful in 1m8s
CI / Mirror to GitHub (push) Successful in 4s
2026-04-20 07:45:32 +02:00
mathias f901d4e67d fix(ci): use --follow-tags instead of --tags to avoid re-pushing existing tags
CI / Lint / Test / Vet (push) Successful in 1m9s
CI / Mirror to GitHub (push) Successful in 3s
2026-04-19 19:16:22 +02:00
mathias 509c04b6e4 fix(session): use fmt.Fprintf with nolint to satisfy both staticcheck and errcheck
CI / Lint / Test / Vet (push) Successful in 1m7s
CI / Mirror to GitHub (push) Failing after 3s
v0.2.0
2026-04-19 18:56:12 +02:00
mathias 738275252c feat: hyperguild phase 2 — review/debug/spec/trainer skills with session history injection
CI / Lint / Test / Vet (push) Failing after 3s
CI / Mirror to GitHub (push) Has been skipped
2026-04-19 14:38:05 +02:00
mathiasandClaude Sonnet 4.6 38fcac4cba feat(trainer): add trainer MCP skill with reader→writer sub-agent chain
Reader agent scans session logs for SFT/DPO candidates; writer receives
reader output and formats+writes training pairs to brain/training-data/.
Adds trainer-reader.md and trainer-writer.md discipline prompts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 14:06:00 +02:00
mathiasandClaude Sonnet 4.6 7697e901d2 feat(spec): add spec writing MCP skill
Adds the spec skill that generates structured implementation specs from
requirements and writes them to a configurable output path in the project.
Follows the same pattern as review/debug skills with session history injection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:59:28 +02:00
mathiasandClaude Sonnet 4.6 8cff57009a feat(debug): add debug MCP skill with hypothesis generation
Implements the debug skill following the same pattern as review. The skill
accepts project_root + error (+ optional context/model/session_id), prepends
session history, and calls the executor to produce 3-5 ordered hypotheses —
diagnosis only, no fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:29:58 +02:00
mathiasandClaude Sonnet 4.6 8fb44affef feat(review): add code review MCP skill with session history injection
Implements the review skill following the same pattern as retrospective/tdd.
Validates project_root and files args, prepends session history when a
session_id is provided, and delegates to the executor with Read,Bash tools.
Iron-law discipline prompt enforces CRITICAL/WARNING/SUGGESTION output format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 11:11:29 +02:00
mathiasandClaude Sonnet 4.6 582ca5019b feat(tdd): inject session history into green and refactor worker prompts
Adds SessionsDir to tdd.Config, session_id to tool input schemas, and a
prependHistory method that reads the session JSONL log and prepends a
formatted history block to the task prompt before worker invocation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 10:18:23 +02:00
mathias 858a9ba1a1 fix(exec): expand validPhases and remove schema enum constraint for phase 2026-04-19 10:03:21 +02:00
mathiasandClaude Sonnet 4.6 cbef2da8de feat(session): add FormatHistory for worker context injection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 09:40:41 +02:00
mathiasandClaude Sonnet 4.6 b493651c26 fix(test): update executor test fixture to match --output-format json envelope
CI / Lint / Test / Vet (push) Successful in 1m9s
CI / Mirror to GitHub (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.1.0
2026-04-19 07:42:24 +02:00
mathiasandClaude Sonnet 4.6 6169404f34 fix(lint): fix remaining errcheck in brain handlers_test
CI / Lint / Test / Vet (push) Failing after 1m5s
CI / Mirror to GitHub (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 07:17:45 +02:00
mathiasandClaude Sonnet 4.6 a67106026f fix(lint): satisfy errcheck for io.Copy, json.Encode, Body.Close, deferred Close
CI / Lint / Test / Vet (push) Failing after 3s
CI / Mirror to GitHub (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 07:15:35 +02:00
mathiasandClaude Sonnet 4.6 99d523189f ci: add Gitea Actions quality gate and GitHub mirror
CI / Lint / Test / Vet (push) Failing after 3s
CI / Mirror to GitHub (push) Has been skipped
- check job: lint + test + vet across both Go modules (root + ingestion)
- mirror job: pushes main + tags to github.com/mathiasb/hyperguild after check passes
- Taskfile: add VERSION/SHORT_SHA vars, fix build/lint/test/vet for multi-module,
  add tag and push tasks — matches cobalt-dingo conventions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 06:39:22 +02:00
mathiasandClaude Sonnet 4.6 2d219760e5 docs: rewrite README for Phase 1 hyperguild
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 06:11:13 +02:00
mathiasandClaude Sonnet 4.6 4bf5edb78e fix(exec): use --output-format json to get structured output from claude
--json-schema combined with --output-format text produces empty stdout.
The structured result is in the "structured_output" field of the json
envelope. Updated executor to unwrap the envelope.

Also removes --bare flag which disables OAuth keychain reads, causing
silent auth failure when ANTHROPIC_API_KEY is not set.

Adds goreman Procfile + stdio bridge (cmd/bridge) for Claude Code MCP
integration. Task start/stop replaced with goreman + port-kill.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 06:04:10 +02:00
mathias 98acf1c14e feat: add task start/stop for tmux-managed hyperguild session 2026-04-17 21:38:26 +02:00
mathias 9741d8ba28 Merge branch 'feat/hyperguild-phase1' 2026-04-17 21:23:37 +02:00
mathias bf67299a48 chore: ignore .superpowers/ brainstorm sessions 2026-04-17 21:23:37 +02:00
mathiasandClaude Sonnet 4.6 24d9216474 fix(ingestion): preserve type and domain metadata as frontmatter in written notes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 21:22:14 +02:00
mathiasandClaude Sonnet 4.6 344def20bb test: phase 1 integration smoke test passing
All 8 MCP tools verified (tdd_red, tdd_green, tdd_refactor, brain_query,
brain_write, tier, session_log, retrospective). Ingestion write/query,
brain_query, tier, and session_log all return correct responses end-to-end.
Brain note written during smoke test committed to raw/ and wiki/concepts/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 21:18:08 +02:00
mathias d084af1af0 chore: add ingestion server tasks and update MCP registration 2026-04-17 20:54:40 +02:00
mathiasandClaude Sonnet 4.6 e98bb2ba65 feat: wire brain, org, sessionlog, retrospective skills into supervisor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:52:16 +02:00
mathias 23dd355b8a feat: add protocols.md, retrospective discipline, and brain directory structure 2026-04-17 20:49:56 +02:00
mathiasandClaude Sonnet 4.6 3dfc064353 fix: extend valid phases and return empty slice for missing session
Add "retrospective" to validPhases so non-TDD skills pass Validate().
Return []Entry{} instead of nil in session.Read when no file exists,
so JSON serialisation produces [] rather than null.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:48:32 +02:00
mathiasandClaude Sonnet 4.6 13ee0d7114 feat: add retrospective MCP tool
Adds internal/skills/retrospective/ — an MCP skill that reads a session
log and dispatches a worker subprocess (via ExecutorFn) to identify
learnings and write them to the brain. Follows the same executor pattern
as the TDD skill.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:45:22 +02:00
mathiasandClaude Sonnet 4.6 a2889645fc fix: add Message field to session.Entry and check marshal error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:43:01 +02:00
mathiasandClaude Sonnet 4.6 9cfce8f700 feat: add tier and session_log MCP tools
Adds two new MCP skill packages:
- internal/skills/org: exposes the tier tool, calling an injected TierFn
  for testability; returns current operating tier as structured JSON
- internal/skills/sessionlog: exposes the session_log tool, appending
  structured JSONL entries to brain/sessions/{session_id}.jsonl; requires
  session_id, wraps internal/session.Append

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:40:50 +02:00
mathiasandClaude Sonnet 4.6 e610e253ef fix(brain): pass type and domain fields to ingestion write endpoint
The write handler was building a hand-rolled map that dropped the type
and domain fields from writeArgs. Pass the struct directly so all fields
reach the ingestion server. Strengthen the test to assert the request
body contains the type field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:38:38 +02:00
mathiasandClaude Sonnet 4.6 275ba43df5 feat: add brain_query and brain_write MCP tools
Adds the brain skill that proxies HTTP calls to the ingestion server,
exposing brain_query (/query) and brain_write (/write) as MCP tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:36:39 +02:00
mathiasandClaude Sonnet 4.6 5722532f7d fix: session log error handling and scanner buffer size
- Replace deprecated os.IsNotExist with errors.Is(err, fs.ErrNotExist)
- Capture Close error in Append by calling it explicitly instead of defer
- Increase scanner buffer to 1 MB per line to handle large JSONL entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:34:36 +02:00
mathiasandClaude Sonnet 4.6 1b03532230 feat: add session log package (append/read JSONL)
Introduces internal/session with Entry and Attempt types, Append
(O_APPEND JSONL writer) and Read (line scanner, nil on missing file).
Raw material for retrospective and trainer workers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:32:38 +02:00
mathias fa6c084cf0 fix: suppress errcheck on Body.Close in tier probe 2026-04-17 20:31:10 +02:00
mathiasandClaude Sonnet 4.6 d09f7fe7d8 feat: add tier detection package
Probes Anthropic and LiteLLM endpoints to detect the current operating
tier (Full / LANOnly / Airplane) so downstream code can gate model
selection and managed-agent availability without manual configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:28:29 +02:00
mathiasandClaude Sonnet 4.6 d18fa0dd59 fix(ingestion): validate required query field in Query handler
Empty or whitespace-only queries would silently pass through to search,
returning meaningless results. Also removed the Domain field from
queryRequest — it was accepted but silently ignored since search.Query
has no domain parameter, which would confuse callers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:27:02 +02:00
mathiasandClaude Sonnet 4.6 e20edd6ca9 feat(ingestion): add query and write HTTP handlers
Implements POST /query (BM25 search via internal/search) and POST /write
(raw file persistence to brain/raw/) as an api.Handler struct. Filename
is auto-generated when absent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:24:51 +02:00