Adds an optional path field to brain_ingest so Claude can ingest files
or directories directly by path without embedding content in the call.
Routing: path set → /ingest-path; content+source set → /ingest; neither → error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Small models (phi4-mini) produce correct markdown analysis but then
append the old {status/phase/skill} JSON schema out of training habit.
stripResultJSON() detects and removes these trailing fences so Claude
Code receives clean prose regardless of model behaviour.
Non-schema json blocks (config examples etc) are preserved.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the three-layer Claude subprocess orchestration (local model →
Claude verifier → cloud escalation). Skills now call LiteLLM directly
and return plain text to Claude Code, which decides what to do with it.
- Delete executor, orchestrator, verifier, result, attempts packages
- Simplify LiteLLMExecutor: Run(Request)→Result becomes Complete(model,sys,user)→(string,int64,error)
- Replace ExecutorFn with CompleteFunc in all 6 skill configs
- Rewrite all skill handlers to call Complete and return {"text","model","duration_ms"}
- Simplify config/models: remove Verifier/LlamaSwapURL, add ModelFor
- Bump version to v0.5.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
--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>
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>
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>
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>
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>
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>
- 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>
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>
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>
Remove cmd/supervisor/supervisor binary from git (was accidentally
committed) and add it to .gitignore. Move LITELLM_API_KEY from the
prompt string into the subprocess env, preventing it from appearing
in error log output when JSON parsing fails.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>