Skip to content

Commit db6fcd2

Browse files
release: v0.10.1 — SLM-optimized prompts, context budgets, E2E tests, docs
## SLM Prompt Optimization (pkg/agents/prompts.go) - All 19 prompts restructured with bullet lists, explicit JSON examples - Anti-hallucination rules added to 14/19 prompts - Worker/Tester/Reviewer/Corrector/Splitter/Planner fully optimized: HARD SCOPE, TOOL INVARIANTS, ANTI-HALLUCINATION, COMMON SLM FAILURES sections ## Context Budget for SLMs (pkg/context/, pkg/config/, pkg/compact/) - DefaultMaxContextKB: 32→16 (safe for 7B-30B models) - SafetyMarginPercent=80: reserves 20% for system prompt+response - MaxLeanPackBytes=12KB (was 16KB) - MaxSkillFraction=15% (skills limited to 15% of remaining budget) - File-first ordering for coding agents - All compaction fallbacks aligned to SLM-safe defaults ## E2E Tests (test/e2e/blocks_test.go) - 9 comprehensive tests: go/python pack apply, list/show, validate, materialize agents, nil config handling, pipeline preset, round-trip, QA gate resolution ## Docs - changelog: SLM optimization details - studio.md: File Inspector + HITL popup documentation - testing.md: enhanced smoke test ## All tests passing - 35/35 packages pass (including new e2e tests)
1 parent 5ec6842 commit db6fcd2

13 files changed

Lines changed: 1140 additions & 166 deletions

File tree

‎docs/changelog.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,38 @@
1414
- All existing functionality preserved: SSE streaming, run/stop, specialist picker,
1515
config badges, event scrolling, result summary.
1616

17+
### SLM Optimizations
18+
19+
- **JSON repair improvements** — The repair engine now handles Python-style boolean
20+
literals (`True`/`False`) by normalizing them to JSON `true`/`false` before parsing.
21+
Trailing text after closing braces — a common SLM artifact where the model appends
22+
commentary after completing JSON output — is stripped automatically, reducing parse
23+
failures on partial or over-eager completions.
24+
- **Tester gate robustness** — Regex-based pass detection scans tester output for 20+
25+
known shell/test-framework success markers (`PASS`, `ok`, `success`, `tests passed`,
26+
`All tests passed`, `0 failures`, green check variants). This makes the tester agent
27+
reliably recognize passing test runs regardless of framework (Go test, pytest, Jest,
28+
etc.) or output format quirks.
29+
- **Worker status detection** — Smarter heuristics for detecting worker completion
30+
status from partial, malformed, or tool-chain-terminated output. Reduces false
31+
"incomplete" classifications when the worker produced valid changes but the final
32+
JSON was truncated or blocked by a tool call.
33+
- **Improved tester prompt** — Tuned tester agent system prompt for better SLM
34+
adherence: explicit pass/fail criteria, shell command expectations, and a
35+
structured output schema that small models can follow more consistently.
36+
- **LiveView enhancements** — Pipeline progress strip now reflects slot insertions
37+
(before/after/replace) with distinct styling. Group labels remain sticky during
38+
scroll in long runs. Event cards include tool-call metadata (tool name, args
39+
summary) inline.
40+
- **HITL popup** — New modal overlay in Studio for escalate, clarify, continue, and
41+
shell-permission decisions. Replaces the inline prompt pattern with a focused,
42+
non-dismissible dialog that includes a visible countdown timer, action buttons,
43+
and contextual metadata (affected task, agent, retry count).
44+
- **File inspector** — New Studio page for browsing workspace files with syntax
45+
highlighting, line numbers, and a diff view against the last checkpoint snapshot.
46+
Supports read-only inspection of any file in the project tree during or after
47+
runs — useful for verifying worker edits without leaving the Studio.
48+
1749
---
1850

1951
## v0.10.0 — Building Blocks, Language Packs & One-Click Pipeline Switching

‎docs/studio.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,32 @@ The loop reloads `board.json` each wave. Chaos, but *structured* chaos.
5656

5757
---
5858

59+
## File inspector 🔍
60+
61+
The **File Inspector** page lets you browse and inspect any file in the workspace
62+
without leaving Studio. Click any file in the tree to open it in a read-only viewer
63+
with syntax highlighting and line numbers.
64+
65+
| Feature | Details |
66+
|---------|---------|
67+
| 📂 **File tree** | Full project tree — click any file to inspect |
68+
| 🎨 **Syntax highlighting** | Language-aware highlighting for Go, Python, JS/TS, YAML, JSON, Markdown, and more |
69+
| 🔢 **Line numbers** | Gutter line numbers for precise referencing |
70+
| 🆚 **Diff view** | Toggle to compare current file content against the last checkpoint snapshot (`rewind` data) |
71+
| 🔄 **Live refresh** | File content auto-refreshes when workers write changes during a run |
72+
| 🧊 **Read-only** | Inspection only — no accidental edits. Use the TUI or your editor to make changes |
73+
74+
Use the File Inspector to:
75+
- Verify worker edits at a glance during a run
76+
- Spot-check generated code before the tester phase
77+
- Compare diffs against the pre-run checkpoint to understand what changed
78+
- Browse AGENTS.md, CONTEXT.md, and MEMORY.md in one place
79+
80+
Access it from the left navigation bar — the `📄 Files` tab sits alongside Agents,
81+
Skills, and Blocks.
82+
83+
---
84+
5985
## Human-in-the-loop modals ✋
6086

6187
Studio blocks the relevant step with a modal (pipeline header shows **Awaiting you**):
@@ -82,6 +108,24 @@ On timeout the dedicated **@escalate** arbitrator picks retry / re-scope / abort
82108

83109
API: `GET /api/escalate/pending` · `POST /api/escalate/answer` `{"action":"retry"}`.
84110

111+
### HITL popup overlay
112+
113+
v0.10.1 introduced a redesigned **HITL popup** — a modal overlay that replaces the
114+
old inline prompt pattern with a focused, non-dismissible dialog:
115+
116+
| Element | Behavior |
117+
|---------|----------|
118+
| ⏱️ **Countdown timer** | Visible countdown bar showing remaining decision time; pulses red when under 10 seconds |
119+
| 🏷️ **Context header** | Shows affected task ID, agent name, and retry count (for escalate) |
120+
| 🎯 **Action buttons** | Large, color-coded buttons for each available action (approve, deny, retry, re-scope, etc.) |
121+
| 🚫 **Non-dismissible** | Cannot click away or close — a decision is required (or the timeout fires) |
122+
| 📝 **Optional note** | Text field for adding a rationale that gets logged with the decision |
123+
| 🔔 **Pipeline indicator** | The pipeline progress strip shows **Awaiting you** with a pulsing amber indicator |
124+
125+
The popup appears for all HITL triggers: clarify, plan approve, escalate, continue,
126+
and shell permission requests. When the timeout fires, the configured fallback agent
127+
(e.g. `@escalate` for escalate decisions) takes over automatically.
128+
85129
---
86130

87131
## Live events (SSE) 📡

‎docs/testing.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ mkdir -p /tmp/slm-demo && cd /tmp/slm-demo
2929
printf 'package main\n\nfunc Hello() string { return "hi" }\n' > hello.go
3030
printf '# Agents\n\nPrefer tiny Go edits and godoc comments.\n' > AGENTS.md
3131
slmcode init
32-
slmcode blocks apply go # apply Go pipeline + QA gate
32+
# Apply the Go language pack: tuned pipeline, go-worker/go-tester agents,
33+
# and quality gate (go vet + go test). Always run this after init so the
34+
# pipeline is configured for your language before the first run.
35+
slmcode blocks apply go
3336
slmcode run -v "Add a Go doc comment to Hello() explaining it returns a greeting. Keep it tiny."
3437
cat hello.go && slmcode board && slmcode session list
3538
```

0 commit comments

Comments
 (0)