Skip to content

v3.20.0: Predictive Multi-Agent Orchestrator + Claude Code Leak Inspiration

Choose a tag to compare

@Delqhi Delqhi released this 17 Jun 21:00

Release Notes — v3.20.0

Predictive Multi-Agent Orchestrator + Claude Code Leak Inspiration

Release date: 2026-06-17
Previous tagged release: v3.17.0 (2026-06-13)
Commits in this release: 243


Highlights

  • Predictive Multi-Agent Orchestrator — the orchestrator is now a
    real-time, anticipatory system: a DeepPlanner emits parallel DAGs with
    probability scores, agents are pre-warmed before they're needed, the
    dispatcher is event-driven (channel-based, no polling), and past sessions
    inform future plans via pattern learning. The MockAgent placeholder has
    been replaced with a real LLM-backed LoopAgent.
  • Claude Code-Inspired Chat UX/btw side-questions, /undercover
    AI identity hiding, lazy tool loading (134K → 5K tokens), session
    switcher with preview, model selector with live switching, and a
    complete TUI rewrite with streaming text, visual message blocks, diff
    popups, and syntax highlighting.
  • SIN Fusion v1: Verify-Tournament (issue #290) — when the sacred
    verify-gate (M3) fails, the task is fanned out to 6 Fireworks models in
    parallel (MiniMax M3, Kimi K2.7 Code Fast/Pro, DeepSeek V4 Pro, Qwen
    3.7 Plus, GLM 5.2). First PoC-pass wins; losers cancelled. Cost-governor
    and difficulty gate included. Off by default (fusion.enabled = false).
  • Tool Coverage Enforcement (issues #248#253) — runtime
    ToolCoverageEnforcer rejects completion when required tools are
    missing or forbidden tools were used. M6 system-prompt fragment
    mandates SIN tools over naive built-ins. Tool-usage telemetry drives
    ledger tools --heatmap/--coverage/--unused. Unified catalog via
    sin-code catalog.
  • Test-First Verify-Loopsin_test, sin_test_generate,
    sin_quality_gate, sin_mutation, sin_fuzz, sin_property close
    the loop from code written to tests verified. LLM case filling with
    generate/execute/repair cycle.
  • 50+ New Subcommands & Featuresinstall, compress, debt,
    audit, ceo-audit, review, catalog, triage, grill, profile,
    compile-spec, cover, autopr, subagent, checkpoint, rewind,
    sessions fork/tree, and more.

New Features

Orchestrator

  • DeepPlanner (issue #282) — parallel DAG planning with probability
    scores per node. The planner emits multiple plan branches and scores
    them, selecting the highest-probability path.
  • Event-driven DAG dispatcher (issue #283) — replaced 50 ms polling
    loop with channel-based dispatch. Latency improvement: tasks start as
    soon as their dependencies complete, no polling delay.
  • Anticipatory agent pre-warming (issue #285) — the orchestrator
    pre-warms agents for likely next tasks based on the current plan DAG,
    reducing cold-start latency by spawning goroutines ahead of demand.
  • Real LLM-backed LoopAgent (issue #287) — the MockAgent placeholder
    has been replaced with a real LoopAgent that drives agentloop.Loop
    instances. PreWarmer interface implemented for integration with the
    pre-warming system.
  • Pattern learning from past sessions (issue #288) — the orchestrator
    now learns from completed sessions, building a pattern store that
    informs future plan generation.
  • Parallel subagent spawning (issue #284) — N sub-agents can now run
    concurrently instead of sequentially, with bounded concurrency.
  • Caveman-style output contracts (issue #174) — Critic, Adversary,
    Governor, and Cartographer emit byte-stable one-liners with 5 closed
    tags (delete, simplify, rebuild, risk, verify) and em-dash
    separators. Hedging is forbidden and rejected by VerifyFindings.
  • Orchestrator ToolChain (issue #252) — the planner attaches a
    deterministic ToolChain to every Plan for classified intents
    (security, review, architecture, test, codebase, docs).

TUI

  • Complete TUI rewrite — modern chat-based rendering with markdown
    support, streaming text, visual message blocks, animated spinner,
    context bar, branded welcome screen, and tool cards.
  • Chat search, compact mode, file browser, inline diff, syntax
    highlighting
    — full SOTA chat UX matching Claude Code / opencode.
  • Session switcher with preview and recency sorting (issue #259).
  • Model selector with performance metrics and live LLM switching
    (issue #259).
  • Permission dialog with diff-view overlay (issue #259) —
    Enter=allow, Esc=deny, popup border.
  • Token tracking + chat history persistence — per-session chat
    history saved and restored on session switch.
  • DAG Visualizer view for the orchestrator (issue #286) — visual
    representation of the DAG in the TUI.
  • 5 additional TUI features (issues #267#280) — context visualizer,
    agent dashboard, keymaps, layout debug, status line.
  • Auto-compact context at 80% token limit — prevents context window
    overflow without manual intervention.
  • Git TUI, LSP diagnostics, /init, watch mode, benchmarks, E2E
    tests
    — integrated git operations, live LSP diagnostics in the TUI.
  • Image graph generation — deterministic ECharts JSON rendering
    (bar/line/pie/area) with dark theme, gradients, glow, and animations.

LLM

  • Context compaction + prompt caching (issues #278, #277) —
    automatic context compaction and prompt caching to reduce token costs.
  • Fable/Mythos providers (issue #275) — new LLM provider integrations.
  • Thinking field for extended reasoning models — thinking field
    in wire request sends {"thinking":{"type":"enabled"}} for Fireworks
    models that support extended reasoning.
  • Verbosity / compression mode (issue #167) — five canonical modes
    (default, verbose, normal, terse, ultra) with byte-stable
    output per (mode, skillBody) pair. Auto-clarity clause ensures
    normal prose around destructive/security-relevant actions (M3).
  • SIN Fusion v1: Verify-Tournament (issue #290) — multi-model
    fan-out on verify-fail. 6-model Fireworks pool, thinking/reasoning
    mode, cost-governor (USD kill-switch), difficulty gate, PoC-only.
    New internal/fusion/ package with fireworks_pool.go,
    difficulty.go, tournament.go, provider_pool.go,
    provider_adapter.go. 264 tests, all -race clean. Off by default.

Permission

  • YOLO risk classifier + frustration detection (issues #272, #271) —
    classifies --yolo requests by risk level and detects user frustration
    patterns to adjust permission prompts.
  • Session-wide permission modes (issue #193) — plan, acceptEdits,
    bypass modes for session-scoped permission policies.
  • macOS Seatbelt sandbox backend (issue #199) — --sandbox flag with
    native macOS Seatbelt sandbox support alongside the existing Linux
    Landlock backend.
  • Agent profile tool surface (issue #249) — bundled profiles now set
    tools_allow to the full sin_* surface + all registered MCP prefixes.
    Destructive builtins remain at ask tier (M4).

Memory

  • autoDream background memory consolidation (issue #273) —
    background memory consolidation inspired by Claude's auto-compaction.
  • Byte-stable MEMORY.md surface (issue #192) — auto_mem/ package
    with memory auto-* CLI commands. Claude-Auto-Memory parity, M3-safe.
  • RAG over instinct store (issue #160) — internal/rag/ package with
    Embedder interface, HashEmbedder (deterministic, 384-dim), Index
    with persister, WorkerPool (bounded concurrency), and Retriever.
    sin instinct search "<query>" for top-5 cosine-similarity search.
  • Continuous-learning subsystem (instinct) — internal/instinct/
    with learned-instinct storage, embedding, and system-prompt injection.
  • sin-code compress (issue #172) — deterministic + LLM compaction
    for lessons, instincts, summaries, memory, and AGENTS.md. Three
    strategies (deterministic, llm, hybrid). Atomic snapshot +
    rollback for lossless Apply. Content-addressed plans.

Git

  • Git-worktree primitives (issue #194 part 2) — internal/isolation/
    with git-worktree-based workspace isolation. chat --worktree flag.
  • Workspace checkpointing + rewind (issue #194) — sin-code checkpoint and sin-code rewind subcommands. --rewind <checkpoint>
    flag on sin-code chat for headless workspace restore.
  • Session fork + tree lineage (issue #194) — sessions fork and
    sessions tree with parent_id lineage. Idempotent ALTER TABLE
    migration for pre-existing DBs.

LSP

  • LSP diagnostics in TUI — live LSP diagnostics rendered in the TUI
    chat interface.
  • LSP servers detectionsin-code lsp lists detected LSP servers
    on PATH (gopls, pyright, tsserver, rust-analyzer).

Chat

  • /btw side-questions (issue #276) — ask side-questions without
    losing the main conversation context.
  • /undercover AI identity hiding (issue #274) — hide the AI
    identity in chat output for user-testing scenarios.
  • Lazy tool loading (issue #270) — 134K → 5K tokens via tool_search.
    Tools are loaded on demand instead of all upfront.
  • Auto-activation hook (issue #176) — per-session rule injection on
    SessionStart + UserPrompt. --activate <rule> + --no-trigger
    flags. Project-local .sin-code/autoactivate.toml.
  • Sub-agent delegation (issue #153) — sin-code subagent CLI for
    isolated-context sub-agent spawning (wraps issue #192).
  • Self-Reflection-Turn before completion (issue #152) — the agent
    performs a self-reflection turn before reporting task completion.
  • Token/cost budget with hard cap (issue #151) — configurable
    token and cost budgets with hard caps that abort the loop.
  • Stagnation detection + adaptive stop-budget (issue #150) —
    detects when the agent is spinning without progress and adjusts the
    stop budget adaptively.
  • Path-scoped rule loader (issue #195) — .sin-code/rules/<topic>.md
    files loaded contextually based on file paths being edited.
  • Autolevel prompt-intent classifier (issue #198) — --autolevel
    flag classifies prompt intent and adjusts agent behavior accordingly.
  • Background task registry (issue #195) — in-process background task
    registry for async operations.
  • Polyglot check detection (issue #154) — verifier detects
    polyglot check patterns across languages.
  • In-process MCP Go-SDK wrapper (issue #202) — internal/sdk/ with
    NewServer / NewInProcessSession for embedding MCP servers in-process.
  • File-locked agent-team mailbox (issue #203) — internal/agentteams/
    for inter-agent communication via file-locked mailboxes.
  • Circuit breaker (issue #72) — native stdlib circuit breaker wired
    into all HTTP callers for resilient external API calls.

Eval

  • OpenTelemetry tracing (issue #75) — sin-code trace doctor for
    exporter sanity check. stdout / OTLP-HTTP / noop exporters. One span
    per hook Fire().
  • LLM-as-a-Judge (issue #75) — --judge-model / --judge-endpoint
    for LLM-based evaluation of agent outputs.
  • Golden Datasets (issue #75) — sin-code eval run --dataset evals/<name>.json --min-pass-rate 0.95 --json for CI gates.
  • Four-arm comparator (issue #171) — baseline / terse / lazy_skill /
    user-skill arms with --arm flag, snapshot, and diff. Deterministic
    JSON snapshots for reproducible CI.
  • CompileAndRun scorer — sandboxed compile + run with self-check
    assertions. YAGNI mode for trivial one-liners (compile-only).
  • Dual-mode Golden Datasets (issue #264) — compile_and_run cases
    gated behind --use-model switch for real chat completion routing.
  • Test-First Verify-Loop — 6 new chat tools:
    • sin_test — run tests with -race, -cover, structured JSON output
    • sin_test_generate — generate table-driven Go tests (LLM-assisted)
    • sin_quality_gate — pipeline: build → vet → test → staticcheck/gosec/govulncheck
    • sin_mutation — wrap gremlins unleash for mutation testing
    • sin_fuzz — run go test -fuzz targets
    • sin_property — run property-based tests (rapid / testing/quick)
  • LLM case filling (issue #256) — generate/execute/repair loop with
    max-iters safety cap. LLM fills in test cases for table-driven templates.
  • 4 golden datasetscritical.json, three-arm-example.json,
    test-generation.json, and more.

Commands

  • sin-code install (issue #170) — single-binary installer with
    SHA256 verification. 27-line install.sh curl|bash shim + 35-line
    install.ps1 for Windows.
  • sin-code compress (issue #172) — plan / apply / rollback
    subcommands for memory compaction.
  • sin-code debt (issue #177) — // sin-debt: <ceiling>, upgrade: <trigger> marker scanner, report, and policy gate.
  • sin-code audit (issue #180) — repo-wide complexity audit with
    static + LLM judge.
  • sin-code ceo-audit (issue #180) — 48-gate CEO audit with
    complexity gate.
  • sin-code review --complexity (issue #179) — ponytail 5-tag
    complexity review (delete, simplify, rebuild, risk, verify).
  • sin-code serve --compress-tools (issue #173) — ponytail-tag
    compressor shrinks the 47-tool manifest on the wire. --compress-tags
    subset, --print-stats savings report.
  • sin-code catalog (issue #163/#251) — unified tool catalog
    (list / search / info / unused) merging Hub, MCP, Chat, and External
    sources. 46+ MCP tools, 17+ chat tools, 14+ external MCP prefixes.
  • sin-code triage (issue #162) — backlog auto-prioritizer via gh.
    Deterministic scoring heuristic, markdown BACKLOG.md generator.
  • sin-code grill (issue #141) — native adversarial design-review.
    5 subcommands: start / next / answer / status / synthesize.
  • sin-code goal fusion (issue #140) — 4 new subcommands:
    status / complete / subtask / report.
  • sin-code profile (issue #175) — single-source-of-truth per-agent
    profile renderer. Byte-stable render, verify gate refuses drift.
  • sin-code compile-spec (issue #164) — declarative .sin-code.yml
    compiler with --init / --check / --out / --dry-run.
  • sin-code cover (issue #239) — coverage drone: scan / check / gaps / generate / hook / drain.
  • sin-code autopr (issue #158) — self-healing CI pipeline.
  • sin-code subagent (issue #192) — isolated-context sub-agent CLI.
  • sin-code checkpoint / sin-code rewind (issue #194) — workspace
    checkpointing and restore.
  • sin-code sessions fork / tree (issue #194) — session forking with
    parent_id lineage tree.
  • sin-code ledger tools (issue #250) — --heatmap / --coverage / --unused / --family / --json for tool-usage telemetry.
  • Skill lifecycle markers (issue #139) — native / external / deprecated markers with lifecycle: frontmatter. scripts/lifecycle_map.yaml
    single source of truth.
  • Skill distribution to external agents (issue #169) — sin-code skill install <name> --agent <target> for 8 agent families.
  • Shop skill integration (issue #142) — cj-dropshipping, stripe,
    tiktok-shop skills registered in KnownSkills().
  • sin-code spec (issue #157) — self-authoring spec loop with drift
    detection, Go signature drift, Python/JSON drift, CI gate.
  • internal/testutil/ (issue #161) — 5 race-safe test helpers:
    IsolatedSQLite, CleanEnv, WithTimeout, GoroutineLeakCheck,
    MustGo.
  • Native CDP recorder (issue #201) — browser/cdp with findings
    engine, vitals, and test harness.

Bug Fixes

  • TUI duplicate LLM responses — eliminated duplicate LLM responses
    and removed redundant ask entries in the chat loop.
  • TUI permission dialog keys — fixed keys intercepted by chat input;
    global hotkeys, /clear, streaming status now work correctly.
  • TUI Ctrl+X/Ctrl+C interception — intercept at top of Update,
    use KeyCode check for Enter.
  • TUI chat input SetValue — fixed SetValue + markdown FormatTokens
    DRY refactor.
  • TUI flaky TestSubmitSyncBusy — close runner in test to avoid
    temp-dir leak; wait for async Submit to finish.
  • TUI structured JSON logs — suppress structured JSON logs while TUI
    is running.
  • Browser CDP compile — fixed compile against chromedp v0.13.6.
  • Eval cmd missing brace — added missing closing brace for
    newEvalDiffCmd.
  • Docker-dependent tests (issue #254) — skip in short mode.
  • gosec G115/G204 — fixed integer conversion and SQL injection
    alerts across todo/audit, todo/id, webui/server (sha1→sha256, nosec).
  • golangci-lint v2 config migration — complete config migration and
    formatting fixes.
  • OpenTelemetry dependency upgrade — upgraded to v1.44.0 to resolve
    govulncheck findings.
  • Linux Landlock sandbox — repaired implementation.
  • Build reconciliation — reconciled coverage branch with main and
    restored green test suite after merge conflicts.
  • Golden help text — resolved firstLine conflict and updated golden
    help for new commands.
  • gofmt + goimports — comprehensive formatting fixes across the
    codebase for lint compliance.
  • Python lint — fixed ruff/pycodestyle/pyflakes across entire repo.
  • sync.Once copy — fixed go vet sync.Once copy warning.

Performance

  • Event-driven DAG dispatcher (issue #283) — 50 ms polling →
    channel-based dispatch. Eliminates polling latency entirely.
  • Lazy tool loading (issue #270) — 134K → 5K tokens via tool_search.
    Massive context window savings for MCP-heavy sessions.
  • Prompt caching (issue #277) — LLM prompt caching reduces
    repeated-token costs.
  • Context compaction (issue #278) — automatic context compaction at
    80% token limit prevents overflow without manual intervention.
  • Parallel subagent spawning (issue #284) — N sub-agents concurrent
    instead of sequential.
  • Agent pre-warming (issue #285) — anticipatory goroutine spawning
    reduces cold-start latency.
  • serve --compress-tools (issue #173) — shrinks 47-tool manifest
    on the wire, reducing token overhead for MCP consumers.
  • TUI SkipMCP flag — tests skip MCP connections (48s → 3.3s).
  • Circuit breaker (issue #72) — prevents cascading failures on
    external API calls with exponential backoff.

Tests

  • 1000+ new tests across the codebase, all green under
    go test -race -count=1.
  • 100% statement coverage achieved for 30+ internal packages
    including: scout, plugin_cmd, self-update, grasp, harvest, map,
    discover, memory, plugin, index, wiring, adapters, hooklife, learning,
    superpowers, vane, webui, tui, tui/chat, todo, assets, apiweb, commands,
    dataset, dispatch, dox, eval, ghbridge, goalcontract, health, hooks,
    llm, logger, mcpcompress, grill, catalog, autoactivate.
  • internal/testutil/ (issue #161) — 5 reusable race-safe test
    helpers with 21 tests.
  • Eval golden datasetscritical.json, three-arm-example.json,
    test-generation.json for CI gates.
  • E2E test framework — testscript-based CLI tests + MCP server stdio
    integration tests.
  • Benchmarks — ledger append benchmark with flake-resistant threshold.
  • Race-flake hardening v2 — comprehensive race condition fixes across
    orchestrator, notifications, loopbuilder, and todo packages.

Breaking Changes

  • Runtime DB migration (issue #265) — lessons.db and sessions.db
    now live in os.UserConfigDir()/sin-code/workspaces/<sha256-prefix12>/
    instead of the workspace's .sin-code/ directory. Existing DBs in the
    old location are not automatically migrated; the old .gitignore rule
    remains as defence-in-depth.
  • main.Version re-exportinternal.Version is now re-exported as
    main.Version via ldflags injection. Any external code reading
    main.Version continues to work; the canonical source is
    internal.Version.
  • Verbosity mode injection (issue #167) — system prompts now include
    a # Tool preference (mandate M6) fragment. Agents that parse the
    raw system prompt may see additional content. Use RenderSystemPrompt
    API instead of raw string concatenation.
  • Orchestrator output contracts (issue #174) — Critic/Adversary/
    Governor/Cartographer now emit caveman-style one-liners via Finding
    structs. Consumers parsing raw prose must switch to the structured
    Findings field.

Migration Guide

1. Runtime DB location (issue #265)

If you have existing session or lesson data in your workspace's
.sin-code/ directory, it will NOT be automatically moved. To migrate:

# Find your workspace hash
WS_HASH=$(echo -n "$(pwd)" | shasum -a 256 | cut -c1-12)

# Move existing DBs (macOS/Linux)
mkdir -p ~/Library/Application\ Support/sin-code/workspaces/$WS_HASH
cp .sin-code/sessions.db ~/Library/Application\ Support/sin-code/workspaces/$WS_HASH/
cp .sin-code/lessons.db ~/Library/Application\ Support/sin-code/workspaces/$WS_HASH/

Or simply start fresh — old data in .sin-code/ is harmless (the
.gitignore rule remains as defence-in-depth).

2. SIN Fusion (issue #290)

Fusion is off by default (fusion.enabled = false). To enable:

sin-code config set fusion.enabled true
sin-code config set fusion.providers "minimax-m3,kimi-k2p7-code-fast,glm-5p2"
sin-code config set fusion.max_cost_usd 5.0

Or via CLI flags:

sin-code chat --fusion-on-verify-fail --fusion-providers "glm-5p2"

3. Verbosity mode (issue #167)

Set your preferred verbosity:

sin-code config set llm.style terse   # default|verbose|normal|terse|ultra

4. Tool coverage enforcement (issue #248)

Configure required/forbidden tools:

sin-code config set agentloop.required_tools "sin_scout,sin_poc"
sin-code config set agentloop.forbidden_tools "sin_bash"

Or via CLI:

sin-code chat --require-tools sin_scout,sin_poc --forbid-tools sin_bash

5. Test-First Verify-Loop

Enable auto-generation of tests on writes:

sin-code config set test.auto_generate true
sin-code config set test.coverage_threshold 80

6. New subcommands

This release adds 20+ new subcommands. Run sin-code --help to see
the full list. Key additions: install, compress, debt, audit,
ceo-audit, review, catalog, triage, grill, profile,
compile-spec, cover, autopr, subagent, checkpoint, rewind.


goreleaser Configuration

  • Architectures: linux/darwin/windows × amd64/arm64
    (windows/arm64 excluded)
  • Binary name: sin-code
  • Brew formula: sin-code (via homebrew-sin tap)
  • SBOM: SPDX JSON via syft for every archive
  • Signing: keyless cosign (OIDC via GitHub Actions)
  • Version injection: ldflags -X .../internal.Version,
    -X .../internal.commit, -X .../internal.date
  • Snapshot mode: goreleaser release --snapshot --clean for
    local testing without pushing

Acknowledgments

This release represents the largest single release in SIN-Code history,
spanning 243 commits and incorporating features originally tracked as
v3.18.0 through v3.22.0 in the roadmap. Key contributors: the
OpenSIN-Code agent loop, SIN Fusion tournament system, and the
predictive orchestrator architecture.