@legna-lnc/legnacode 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,701 +1,723 @@
1
- # Changelog
2
-
3
- 🌐 [中文文档](./CHANGELOG.zh-CN.md)
4
-
5
- All notable changes to LegnaCode CLI will be documented in this file.
6
-
7
- ## [1.5.2] - 2026-04-20
8
-
9
- ### Performance
10
-
11
- - **Async CodeGraph** — `build()` and `walkDir()` converted from sync to async, yielding the event loop every 50 files. Added `maxDepth=10` depth limit and `visitedInodes` symlink loop protection. `save()` now uses async `writeFile`.
12
- - **undoTracker size guard** — Added 1MB file size limit; files exceeding it skip undo snapshot recording (prevents OOM). `readFileSync` async `readFile`.
13
- - **Async error file pre-injection** `extractErrorFiles` converted from `existsSync`+`readFileSync` to async `access`+`readFile`.
14
- - **stripCode dedup** — `magicKeywords.ts` reduced `stripCode()` from 3-4 calls to 1, passing the result to all downstream functions.
15
- - **FileMemoryProvider TTL cache** — `searchSolutions` and fallback file search now use 60s TTL cache, avoiding repeated disk reads on every prefetch.
16
- - **OML_SESSION_GUIDANCE cache** — `attachments.ts` dynamic import cached at module level after first load.
17
- - **frustrationHint patterns hoisted** — Regex array moved from function body to module-level constant.
18
-
19
- ### i18n
20
-
21
- - **Compacting status messages localized** — "Compacting context…" "凝练上下文…", "Compacting conversation" "精炼对话中" for Chinese users.
22
- - **Turn completion verbs localized** — New `getTurnCompletionVerbs()` function; Chinese users see "烹制了 5s" instead of "Baked for 5s".
23
-
24
- ### Cleanup
25
-
26
- - Deleted dead code `src/commands/undo.ts` (was never registered in command list).
27
- - Fixed dead conditional in `extractImports`.
28
-
29
- ## [1.5.1] - 2026-04-19
30
-
31
- ### Features
32
-
33
- - **Proactive skill invocation** — Wired `OML_SESSION_GUIDANCE` (the "1% rule") into the `skill_listing` attachment. The AI now proactively considers available skills before every response, instead of only responding to explicit `/slash` commands.
34
- - **Frontend/design auto-guidelines** — New `designPrompt.ts` detects frontend intent (UI, prototype, design exploration) from user input and transparently injects layered design guidelines (oklch colors, responsive layout, animation best practices, design exploration methodology). Zero user action required.
35
- - **Enhanced designer agent** — `/oml:designer` now carries a full design methodology prompt (oklch palettes, mobile-first, ARIA accessibility, 3+ variation exploration) instead of a one-line description.
36
-
37
- ### Bug Fixes
38
-
39
- - **Skills were never proactively used** — `OML_SESSION_GUIDANCE` was defined in `superpowers.ts` but never imported or injected anywhere. Now wired into the skill listing attachment.
40
-
41
- ## [1.5.0] - 2026-04-19
42
-
43
- ### Bug Fixes
44
-
45
- - **Fix REPL startup deadlock** — The `/undo` command was registered via static `import` in `commands.ts`, creating a circular dependency (`commands.ts` → `undo.ts` → `commands.ts`) that caused Bun's module loader to deadlock. The REPL would hang with no output on launch. Fixed by removing the static import entirely. The `/undo` feature remains available via `src/services/undoTracker.ts` (wired into Edit/Write tools) but is no longer registered as a slash command to avoid the circular dependency.
46
-
47
- ### Features (carried from 1.4.8/1.4.9)
48
-
49
- - **AtomCode intelligence fusion** Pangu CJK spacing, negative feedback detection, tool call loop detection, error file pre-injection, first-read full file
50
- - **OpenAI-compatible bridge adapter** — Anthropic ↔ OpenAI format translation for DeepSeek/Qwen/GLM/Ollama/vLLM/LM Studio
51
- - **Code Graph** — Regex-based symbol index + file dependency graph (TS/JS/Python/Go/Rust)
52
- - **Parallel File Edit** — One sub-agent per file with sibling skeletons
53
- - **Workflow Engine** — Structured markdown step execution with checks and dependencies
54
- - **Cross-session knowledge** — Auto-writes `.legna/knowledge.md` on session end
55
- - **Baseline builds** — No-AVX binaries for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline)
56
-
57
- ## [1.4.9] - 2026-04-17
58
-
59
- ### Features
60
-
61
- - **Baseline (no-AVX) builds** — New platform packages for older x64 CPUs without AVX instruction set support:
62
- - `@legna-lnc/legnacode-darwin-x64-baseline` — macOS Intel (pre-2011 or Hackintosh without AVX)
63
- - `@legna-lnc/legnacode-linux-x64-baseline` — Linux x64 servers/VMs without AVX
64
- - Fixes `warn: CPU lacks AVX support, strange crashes may occur` error
65
- - Install: `npm i -g @legna-lnc/legnacode-darwin-x64-baseline` (use directly, not via main package)
66
-
67
- ## [1.4.8] - 2026-04-17
68
-
69
- ### Features
70
-
71
- - **AtomCode intelligence fusion (Layer A)** — Lightweight agent intelligence, zero new dependencies:
72
- - **Pangu CJK spacing** — Auto-inserts spaces between CJK and ASCII in Markdown rendering
73
- - **Negative feedback detection** — Detects frustration ("still broken"/"错了"/"まだ壊れ"), injects strategy-shift hint (EN/ZH/JA)
74
- - **Tool call loop detection** — Same (tool, args) 3+ times blocks. Resets per user message
75
- - **Error file pre-injection** — Bash fail extracts file paths from stderr, auto-reads first 30 lines
76
- - **First-read full file** — First encounter ignores offset/limit, forces full read
77
-
78
- - **OpenAI-compatible bridge adapter (Layer B1)** — Full Anthropic ↔ OpenAI format translation:
79
- - Message format: `tool_use` ↔ `tool_calls`, `tool_result` ↔ `role: "tool"`
80
- - Tool schema: `input_schema` ↔ `function.parameters`
81
- - JSON repair for weak models (markdown fences, trailing commas, unbalanced brackets)
82
- - Supports: OpenAI, DeepSeek, Qwen, GLM, SiliconFlow, Ollama, vLLM, LM Studio
83
- - Activate: `OPENAI_COMPAT_BASE_URL` + `OPENAI_COMPAT_API_KEY` env vars
84
-
85
- - **Code Graph (Layer B2)** Regex-based symbol index + file dependency graph:
86
- - Languages: TypeScript/TSX, JavaScript, Python, Go, Rust
87
- - Incremental mtime updates, persisted to `<cwd>/.legna/.palace/graph.json`
88
- - **Wired:** auto-builds on session start, injects file summaries into prefetch context
89
-
90
- - **Parallel File Edit (Layer B3)** — "One sub-agent per file" execution model:
91
- - Target file full text + sibling skeletons + interface contracts
92
- - **Wired:** integrated into `/dispatch` skill prompt with parallel edit instructions
93
-
94
- - **Workflow Engine (Layer B4)** — Structured step execution:
95
- - Markdown `## Step N:` format with checks, failure handling, dependencies
96
- - **Wired:** WorkflowTool now parses steps, shows status, substitutes args
97
-
98
- - **/undo command** — Reverts the last file edit (Edit or Write tool):
99
- - Tracks original content before each edit, max 20 entries per session
100
- - New file creation undo deletes the file
101
-
102
- - **Cross-session knowledge persistence** Auto-writes `<cwd>/.legna/knowledge.md`:
103
- - Extracts key decisions/actions from last 10 assistant messages on session end
104
- - Appends timestamped entries, caps at 50KB
105
-
106
- - **Enhanced compiler error detection** — Extended error file pre-injection:
107
- - Now matches compiler-style paths (`file.ts:42`, `file.py(10)`) in addition to standard paths
108
-
109
- ## [1.4.7] - 2026-04-16
110
-
111
- ### Features
112
-
113
- - **claude-mem memory intelligence fusion** Ported 5 lightweight techniques from claude-mem's persistent memory system into DrawerStore, zero new dependencies:
114
- - **Content-hash deduplication** `sha256(wing + room + content)` with 30-second window prevents duplicate observations during rapid compaction cycles
115
- - **Token economics tracking** — Each drawer records `discoveryTokens` (cost to create) and `readTokens` (accumulated recall cost) for memory ROI analysis
116
- - **Relevance feedback** — `relevanceCount` incremented on each search hit; frequently recalled memories get up to +100% importance boost via `importance * (1 + 0.1 * min(count, 10))`
117
- - **90-day time decay** `max(0.3, 1.0 - age_days / 90)` applied to both search similarity and importance ranking. Old memories fade but never fully disappear
118
- - **Privacy tag filtering** `<private>...</private>` content stripped to `[REDACTED]` before memory extraction. Zero config, just wrap sensitive text in tags
119
-
120
- ### Architecture
121
-
122
- - Modified `src/memdir/vectorStore/types.ts` Drawer gains `discoveryTokens`, `readTokens`, `relevanceCount`, `contentHash` fields
123
- - Modified `src/memdir/vectorStore/drawerStore.ts` — Schema migration (4 new columns), content-hash dedup in upsert, relevance feedback in search, time decay in search + topByImportance
124
- - Modified `src/memdir/vectorStore/exchangeExtractor.ts``stripPrivate()` applied before pair extraction
125
-
126
- ## [1.4.6] - 2026-04-16
127
-
128
- ### Bug Fixes
129
-
130
- - **OML skill crash fix** — All 40 OML skills (16 superpowers + 5 orchestrators + 19 agents) returned `string` instead of `ContentBlockParam[]` from `getPromptForCommand`, causing `result.filter is not a function` crash on `/ultrawork`, `/ralph`, `/autopilot`, etc. Now wrapped as `Promise<[{ type: 'text', text }]>`.
131
- - **Statusline writes to wrong config dir** — `statuslineSetup` agent hardcoded `~/.claude/settings.json` and `~/.claude/statusline-command.sh`. Fixed to `~/.legna/`.
132
-
133
- ### Improvements
134
-
135
- - **Plans moved to project-local** — Default plan directory changed from `~/.legna/plans/` to `<cwd>/.legna/plans/`. Plans now live alongside the project they belong to.
136
- - **Auto-memory moved to project-local** — Default auto-memory path changed from `~/.legna/projects/<slug>/memory/` to `<cwd>/.legna/memory/`. First startup auto-migrates files from the legacy global path (non-destructive, never overwrites).
137
- - **Compound engineering seamless fusion** — Knowledge compounding from compound-engineering-plugin, injected into 3 existing automation points with zero new commands:
138
- - `onPreCompress`: high-value exchange pairs auto-written to `docs/solutions/` (opt-in via `mkdir docs/solutions`)
139
- - `prefetch`: auto-searches `docs/solutions/` for past learnings when user asks related questions
140
- - `magicKeywords`: deep scope detection (refactor/migrate/architecture) appends a lightweight compound hint
141
- - **Legacy path comments cleaned** — Updated stale `~/.claude/projects/` references in memdir, extractMemories, settings types
142
-
143
- ## [1.4.5] - 2026-04-13
144
-
145
- ### Features
146
-
147
- - **OpenViking content tiering fusion** — Ported L0/L1/L2 three-tier content grading from OpenViking's context database:
148
- - **Content Tiering** — Each drawer auto-generates L0 (one-sentence summary, ~25 words) and L1 (core overview, ~200 words) at upsert time. L2 is the full verbatim content.
149
- - **Budget-aware wake-up** — `wakeUp()` now accepts a token budget (default 800) and greedily fills it with L1 content, degrading to L0 when budget is tight.
150
- - **Budget-capped recall** — New `recallWithBudget()` method: L2→L1→L0 degradation strategy ensures recall never exceeds character budget.
151
- - **CJK-aware token estimation** — `estimateTokens()` handles mixed CJK/Latin text.
152
- - **SQLite schema migration** — Existing DrawerStore databases auto-migrate with `ALTER TABLE ADD COLUMN`.
153
- - **Fixed recallByTopic()** — Now passes actual query for vector ranking instead of empty string.
154
-
155
- ## [1.4.4] - 2026-04-11
156
-
157
- ### Improvements
158
-
159
- - **Status messages moved to spinner line** — autocompact / output truncated / interrupted status messages no longer insert system messages into the conversation; they now display temporarily on the spinner animation line, flashing briefly without polluting context
160
- - **ToolUseContext adds setSpinnerMessage** generic spinner text callback allowing the query loop to update spinner status at any time
161
- - **LegnaCode vs Claude Code comparison doc** added [COMPARISON.md](./COMPARISON.md) with 60+ item-by-item comparison across 9 categories
162
-
163
- ## [1.4.3] - 2026-04-11
164
-
165
- ### Features
166
-
167
- - **mempalace memory architecture integration** — ported mempalace core memory system, pure TypeScript implementation, zero external dependencies:
168
- - **DrawerStore** — SQLite-persisted vector memory storage + WAL audit log, deterministic drawer ID (sha256 idempotent upsert)
169
- - **TF-IDF vectorizer** — pure TS implementation (Porter stemming + cosine similarity), <10K drawer search <5ms
170
- - **4-layer memory stack** — L0 identity (~100 tokens) + L1 top drawers (~500-800 tokens) loaded every turn, L2/L3 recalled on demand. Per-turn tokens reduced from ~8K to ~800 (~88% savings)
171
- - **Temporal knowledge graph** — SQLite entity-relation storage, supports triples with validity periods and point-in-time queries
172
- - **Room auto-classification** — 6 categories (facts/decisions/events/discoveries/preferences/advice) with keyword scoring
173
- - **Exchange pair extractor** — Q+A paired chunking + 5-category tag scoring (decisions/preferences/milestones/problems/emotional)
174
- - **Auto-migration** — automatically migrates existing .legna/memory/*.md files to DrawerStore on first startup
175
- - **PreCompact memory save** — automatically extracts high-value exchange pairs to DrawerStore before compaction, preventing memory loss
176
-
177
- ### Architecture
178
-
179
- - Added `src/memdir/vectorStore/` — complete vector memory system (8 files)
180
- - `types.ts` — Drawer, SearchResult, MetadataFilter types
181
- - `tfidfVectorizer.ts`TF-IDF + Porter stemming + cosine similarity
182
- - `drawerStore.ts`SQLite persistence + WAL + vector search
183
- - `roomDetector.ts`content auto-classification
184
- - `layeredStack.ts` — 4-layer memory stack
185
- - `knowledgeGraph.ts` temporal knowledge graph
186
- - `exchangeExtractor.ts` — exchange pair extraction + tag scoring
187
- - `migration.ts` — .md → DrawerStore auto-migration
188
- - Upgraded `src/memdir/providers/FileMemoryProvider.ts` — DrawerStore + LayeredStack backend
189
- - Wired `src/services/compact/autoCompact.ts`calls onPreCompress before compaction
190
-
191
- ## [1.4.2] - 2026-04-11
192
-
193
- ### Features
194
-
195
- - **verbose enabled by default** — users now see full tool execution progress and status information by default
196
- - **Token/Timer instant display** — removed 30-second delay, token count and elapsed time shown from second 1
197
- - **Autocompact status visible** — displays "Compacting conversation context..." system message during conversation compaction
198
- - **Interrupt reason visible** — shows abort reason on interruption (streaming and tool_execution phases)
199
- - **Output truncated retry prompt** — displays retry progress during max output tokens recovery
200
- - **Tool execution logging** — StreamingToolExecutor outputs current tool name and queue depth
201
- - **Microcompact/Snip logging** added debug logging for compaction operations
202
- - **ForkedAgent startup logging** outputs label and ID when child agent starts
203
-
204
- ### Bug Fixes
205
-
206
- - **Apple Terminal notification logic fix** bell is now sent only when bell is not disabled (logic was previously inverted)
207
-
208
- ## [1.4.0] - 2026-04-11
209
-
210
- ### Features
211
-
212
- - **MiniMax deep native integration** — when using MiniMax models with `MINIMAX_API_KEY` configured, automatically registers 6 native multimodal tools:
213
- - `MiniMaxImageGenerate` image generation (POST /v1/image_generation)
214
- - `MiniMaxVideoGenerate` — video generation + async polling (POST /v1/video_generation)
215
- - `MiniMaxSpeechSynthesize` — text-to-speech (POST /v1/t2a_v2)
216
- - `MiniMaxMusicGenerate` — music generation (POST /v1/music_generation)
217
- - `MiniMaxVisionDescribe`image understanding VLM (POST /v1/coding_plan/vlm)
218
- - `MiniMaxWebSearch`web search (POST /v1/web_search)
219
- - **MiniMax auth command** — `/auth-minimax` command to configure API key, persisted to `~/.legna/minimax-credentials.json`
220
- - **MiniMax tool schema export** — `schemaExport.ts` supports exporting Anthropic-compatible tool schemas
221
- - **MiniMax multimodal skill pack** — 5 built-in skills (image/video/speech/music/pipeline) guiding AI to orchestrate multimodal workflows
222
- - **Smart model routing** — heuristic routing to fast/default/strong model tiers based on prompt complexity
223
- - **Autonomous skill detection** — detects repetitive tool call patterns and prompts users to save as reusable skills
224
- - **Context compression enhancements**:
225
- - Tool output pre-pruning — large tool_result blocks auto-trimmed before compact (head + tail preserved)
226
- - Budget pressure injection — injects hints into tool results when context usage exceeds 80%, guiding the model to wrap up
227
- - **RPC subprocess tool execution** — Unix Domain Socket RPC server + stub generator + code execution runner; AI-generated scripts can call back LegnaCode tools (Bash/Read/Write/Edit/Glob/Grep/WebFetch) via RPC, compressing multi-step operations into a single inference
228
- - **Memory Provider plugin system** — abstract base class + registry + default FileMemoryProvider; supports one external provider running in parallel with built-in memory, full lifecycle (initialize/prefetch/syncTurn/shutdown) + optional hooks (onTurnStart/onSessionEnd/onPreCompress/onDelegation)
229
- - **Cross-session memory search** — `/recall` command searches historical session JSONL files with keyword matching + relevance ranking
230
- - **Worker thread pool** — large file operations / batch searches can be offloaded to worker threads, avoiding main thread blocking
231
-
232
- ### Architecture
233
-
234
- - Added `src/tools/MiniMaxTools/`complete MiniMax multimodal tool directory (client, endpoints, 6 buildTool tools, conditional registration, schema export)
235
- - Added `src/services/rpc/`RPC subprocess tool execution (rpcServer.ts, stubGenerator.ts, codeExecutionRunner.ts)
236
- - Added `src/memdir/providers/`Memory Provider plugin system (MemoryProvider.ts abstract base class, FileMemoryProvider.ts default implementation, registry.ts registry)
237
- - Added `src/services/modelRouter.ts` — task complexity estimation + model tier routing
238
- - Added `src/services/skillAutoCreate.ts` — tool call pattern detector, integrated into toolExecution.ts
239
- - Added `src/services/compact/toolOutputPruner.ts` — tool output pre-pruning, integrated into autoCompact.ts
240
- - Added `src/services/compact/budgetPressure.ts` — context budget pressure injection, integrated into query.ts
241
- - Added `src/services/sessionSearch.ts`cross-session search engine
242
- - Added `src/commands/recall/``/recall` command
243
- - Added `src/commands/auth/``/auth-minimax` command
244
- - Added `src/skills/builtin-minimax/` 5 MiniMax multimodal skill files
245
- - Added `src/utils/workerPool.ts`worker thread pool
246
-
247
- ## [1.3.7] - 2026-04-09
248
-
249
- ### Bug Fixes
250
-
251
- - **Resume session detection** — `legna resume` failed to discover sessions written to `<project>/.legna/sessions/` since v1.3.0. `getStatOnlyLogsForWorktrees()` only scanned the global `~/.legna/projects/`; it now also scans the project-local sessions directory, consistent with `fetchLogs()` behavior
252
- - **Interrupted diagnostics logging** — added abort reason + call stack logging at `onCancel()` and `query.ts` interrupt points; traceable under `--verbose` mode
253
-
254
- ### Enhancements
255
-
256
- - **Priority-now interrupt visibility** when a queued command interrupts the current task, the command summary is logged to debug log instead of silently aborting
257
- - **Background task status visibility** footer pill shows real-time activity summary for a single background agent (latest tool + token stats); task completion notification includes progress statistics
258
-
259
- ### Architecture
260
-
261
- - `src/utils/sessionStorage.ts` — `getStatOnlyLogsForWorktrees()` Path A/B both include `.legna/sessions/` scanning
262
- - `src/query.ts` — abort reason logging added at both `createUserInterruptionMessage` call sites
263
- - `src/screens/REPL.tsx` — `onCancel()` call stack logging, priority-now useEffect logs command summary
264
- - `src/tasks/pillLabel.ts`single agent task displays `getActivitySummary()` real-time activity
265
- - `src/tasks/LocalMainSessionTask.ts` — `completeMainSessionTask` captures progress, notification includes statistics
266
-
267
- ## [1.3.6] - 2026-04-09
268
-
269
- ### Bug Fixes
270
-
271
- - **Windows Edit tool path separator false positive** — fixed [#7935](https://github.com/anthropics/claude-code/issues/7935): on Windows, after reading a file with forward slashes (`D:/path`), Edit/MultiEdit tools reported "File has been unexpectedly modified" error. Root cause: `path.normalize()` does not always convert `/` to `\` in certain runtimes (Bun compiled binary + Git Bash/MINGW environment), causing FileStateCache key mismatch
272
- - `FileStateCache` added `normalizeKey()` — explicitly replaces `/` with the native separator (Windows: `\`) after `path.normalize()`, ensuring `D:/foo` and `D:\foo` always hit the same cache entry
273
- - `expandPath()` added `ensureNativeSeparators()` all returned paths force backslashes on Windows as a defensive fix
274
-
275
- ### Architecture
276
-
277
- - `src/utils/fileStateCache.ts` — `normalizeKey()` replaces bare `normalize()`, imports `sep`
278
- - `src/utils/path.ts``ensureNativeSeparators()` wraps all `normalize()`/`resolve()`/`join()` return values
279
-
280
- ## [1.3.5] - 2026-04-07
281
-
282
- ### Bug Fixes
283
-
284
- - **SessionStart hook error** OML's SessionStart hook used `type: 'prompt'`, but the SessionStart phase has no `toolUseContext` (LLM call context), causing a guaranteed crash. Removed SessionStart hook; skill guidance is now exposed through skill descriptions
285
- - **Windows alt-screen rendering flicker** — in alt-screen mode, `fullResetSequence_CAUSES_FLICKER` was still triggered (viewport changes, scrollback detection, etc.), causing full-screen clear + redraw flicker. Added `altScreenFullRedraw()` method; in alt-screen mode, uses simple `CSI 2J + CSI H` (erase screen + cursor home) instead of `clearTerminal`'s Windows legacy path
286
- - **Windows drainStdin** previously skipped stdin draining entirely on Windows; residual mouse events caused input field corruption. Changed to flush buffered input events by toggling raw mode
287
-
288
- ### Architecture
289
-
290
- - `src/ink/log-update.ts` — 5 `fullResetSequence_CAUSES_FLICKER` call sites now check `altScreen`, added `altScreenFullRedraw()` method
291
- - `src/ink/ink.tsx` — Windows `drainStdin` alternative (toggle raw mode)
292
- - `src/plugins/bundled/oml/definition.ts` — removed SessionStart hook, OML upgraded to 1.2.0
293
-
294
- ## [1.3.4] - 2026-04-07
295
-
296
- ### New Features
297
-
298
- - **OML Superpowers engineering discipline** — integrated obra/superpowers core skills, enforcing strict software engineering workflows for AI
299
- - `/verify` — completion verification discipline: cannot claim completion without fresh evidence
300
- - `/tdd` — TDD enforcement: RED-GREEN-REFACTOR, write tests before code
301
- - `/debug` — 4-stage systematic debugging, question architecture after 3 failures
302
- - `/brainstorm` Socratic design: hard gate, no implementation allowed until design is approved
303
- - `/write-plan` — break design into 2-5 minute tasks, zero placeholders
304
- - `/sdd` — sub-agent driven development: implement → spec review → quality review, 3 stages
305
- - `/exec-plan` — load plan file and execute tasks sequentially
306
- - `/dispatch`parallel sub-agent dispatch
307
- - `/code-review`dispatch reviewer sub-agent
308
- - `/worktree`Git worktree isolated development
309
- - `/finish-branch` — branch wrap-up (merge/PR/keep/discard)
310
- - **SessionStart skill guidance** — automatically injects OML skill guidance prompt at session start ("1% rule")
311
- - OML plugin version upgraded to 1.1.0, 35 built-in skills total
312
-
313
- ### Architecture
314
-
315
- - `src/plugins/bundled/oml/superpowers.ts` — 11 engineering discipline skills + SessionStart guidance
316
- - `src/plugins/bundled/oml/definition.ts` appended superpowers skills + SessionStart hook
317
-
318
- ## [1.3.3] - 2026-04-07
319
-
320
- ### New Features
321
-
322
- - **OML (Oh-My-LegnaCode) smart orchestration layer** — built-in oh-my-claudecode core functionality, works out of the box
323
- - 5 orchestration skills: `/ultrawork` (parallel execution), `/ralph` (persistent loop), `/autopilot` (fully autonomous), `/ralplan` (plan then execute), `/plan-oml` (structured planning)
324
- - 19 specialized agent skills: `/oml:explore`, `/oml:planner`, `/oml:architect`, `/oml:executor`, `/oml:verifier`, etc.
325
- - Magic Keywords auto-detection: when prompt contains keywords like ultrawork/ralph/autopilot/ultrathink, orchestration directives are auto-injected (supports CJK and Vietnamese)
326
- - Can be enabled/disabled via `/plugin` UI (`oml@builtin`, enabled by default)
327
- - `OML_BUILTIN` feature flag controls compile-time DCE
328
-
329
- ### Bug Fixes
330
-
331
- - **Windows Terminal Fullscreen** — automatically enables alt-screen mode in `WT_SESSION` environment, completely eliminating the cursor-up viewport yank bug (microsoft/terminal#14774). Covers WSL-in-Windows-Terminal. `CLAUDE_CODE_NO_FLICKER=0` to opt-out
332
-
333
- ### Architecture
334
-
335
- - `src/plugins/bundled/oml/` — OML plugin module (definition, skills, agents, magicKeywords)
336
- - `src/plugins/bundled/index.ts` — registered OML builtin plugin
337
- - `src/utils/processUserInput/processUserInput.ts` — magic keyword detection integration point
338
- - `src/utils/fullscreen.ts` — Windows Terminal fullscreen condition
339
-
340
- ## [1.3.2] - 2026-04-07
341
-
342
- ### Breaking Changes
343
-
344
- - **Disabled HISTORY_SNIP** — `bunfig.toml` feature flag set to false, compile-time DCE removes all snip-related code (SnipTool, snipCompact, snipProjection, force-snip command, attachments nudge). Auto-compact is unaffected; context management reverts to the original mechanism
345
-
346
- ### Bug Fixes
347
-
348
- - **Windows Terminal streaming text** — no longer disables streaming text display for all Windows; now only disabled under legacy conhost. Windows Terminal (detected via `WT_SESSION` environment variable) restores normal streaming rendering
349
-
350
- ## [1.3.1] - 2026-04-06
351
-
352
- ### Bug Fixes
353
-
354
- - **Snip-aware context window** — 1M models are no longer prematurely snipped; `KEEP_RECENT` changed from hardcoded 10 to dynamic calculation (1M: 200, 500K: 100, 200K: 10)
355
- - **Snip nudge frequency** — 1M model nudge threshold raised from 20 to 100 messages
356
- - **branch command branding** — `/branch` resume prompt changed from `claude -r` to `legna -r`
357
- - **admin version fallback** displays correct version number when running from source
358
-
359
- ### Architecture
360
-
361
- - `src/services/compact/snipCompact.ts` — added `getSnipThresholds(model)` dynamic threshold function; `snipCompactIfNeeded` and `shouldNudgeForSnips` gained model parameter
362
- - `src/query.ts` / `src/QueryEngine.ts` / `src/commands/force-snip-impl.ts` — pass model parameter
363
-
364
- ## [1.3.0] - 2026-04-04
365
-
366
- ### New Features
367
-
368
- - **Project-local storage** — sessions, skills, memory, rules, and settings all moved down to `<project>/.legna/` directory
369
- - New sessions written to `<project>/.legna/sessions/<uuid>.jsonl`, traveling with the project
370
- - Project-level skills/rules/settings/agent-memory/workflows unified under `.legna/`
371
- - `.legna/` automatically added to `.gitignore`
372
- - **Global data migration** — automatically migrates from `~/.claude/` to `~/.legna/` on first startup (one-way)
373
- - Migrates settings.json, credentials, rules, skills, agents, plugins, keybindings, etc.
374
- - Does not overwrite existing files; writes `.migration-done` marker on completion
375
- - `LEGNA_NO_CONFIG_SYNC=1` to disable
376
- - **`legna migrate` command** — manual data migration
377
- - `--global` migrates global data only
378
- - `--sessions` migrates current project sessions to local only
379
- - `--all` migrates everything (default)
380
- - `--dry-run` preview mode
381
- - **Three-level fallback reads** — automatically searches `.legna/` → `.claude/` → `~/.legna/` → `~/.claude/` when reading, zero-breakage backward compatibility
382
-
383
- ### Architecture
384
-
385
- - `src/utils/legnaPathResolver.ts` — unified path resolution (PROJECT_FOLDER/LEGACY_FOLDER/resolveProjectPath)
386
- - `src/utils/ensureLegnaGitignored.ts` auto-gitignore utility
387
- - `src/utils/envUtils.ts` — refactored global migration logic, removed old syncClaudeConfigToLegna
388
- - `src/utils/sessionStoragePortable.ts` — added getLocalSessionsDir/getLegacyProjectsDir, refactored resolveSessionFilePath
389
- - `src/utils/sessionStorage.ts` — session write path switched to project-local
390
- - `src/utils/listSessionsImpl.ts`multi-source scan and merge (local + global + legacy)
391
- - `src/commands/migrate/` CLI migration command
392
-
393
- ## [1.2.1] - 2026-04-04
394
-
395
- ### New Features
396
-
397
- - **Model Adapter Layer** — unified third-party model compatibility framework, auto-detects model/endpoint and applies corresponding transforms
398
- - **MiMo (Xiaomi) adapter** — api.xiaomimimo.com/anthropic, supports mimo-v2-pro/omni/flash (1M ctx)
399
- - simplifyThinking + forceAutoToolChoice + normalizeTools + stripBetas + injectTopP(0.95) + stripCacheControl
400
- - Handles content_filter / repetition_truncation stop_reason
401
- - **GLM (ZhipuAI) adapter** — open.bigmodel.cn/api/anthropic, supports glm-5.1/5/5-turbo/4.7/4.6/4.5, etc.
402
- - Full standard transform suite, server-side auto-caching (strip cache_control)
403
- - **DeepSeek adapter** — api.deepseek.com/anthropic, supports deepseek-chat/coder/reasoner
404
- - stripReasoningContent to avoid 400 errors, reasoner models auto-strip temperature/top_p
405
- - **Kimi (Moonshot) adapter** — api.moonshot.ai/anthropic, supports kimi-k2/k2.5/k2-turbo, etc.
406
- - Preserves cache_control (Kimi supports prompt caching discount), stripReasoningContent
407
- - **MiniMax adapter** api.minimaxi.com/anthropic (China) + api.minimax.io/anthropic (international)
408
- - Supports MiniMax-M2.7/M2.5/M2.1/M2 full series (204K ctx), case-insensitive matching
409
- - Deep compatibility: preserves metadata, tool_choice, cache_control, top_p (other adapters need strip/force)
410
- - Only needs simplifyThinking + normalizeTools + stripBetas + stripUnsupportedFieldsKeepMetadata
411
-
412
- ### Architecture
413
-
414
- - `src/utils/model/adapters/index.ts` — adapter registry + match/transform dispatch
415
- - `src/utils/model/adapters/shared.ts` 12 shared transform functions (including new stripUnsupportedFieldsKeepMetadata)
416
- - `src/utils/model/adapters/{mimo,glm,deepseek,kimi,minimax}.ts` — 5 provider adapters
417
- - `src/services/api/claude.ts` — paramsFromContext() calls applyModelAdapter() at the end
418
-
419
- ## [1.2.0] - 2026-04-03
420
-
421
- ### New Features
422
-
423
- - **Sessions grouped by project** — WebUI session history panel groups sessions by project path
424
- - **resume command with cd** copied resume command auto-includes `cd` to project directory (Windows uses `cd /d`)
425
- - **Migration supports session history** — config migration panel adds "also migrate session history" option, copies `projects/` directory
426
- - **Windows native compilation** Windows binary now compiled natively on Windows
427
-
428
- ### Fixed
429
-
430
- - Migration panel field names corrected to match actual settings.json fields
431
-
432
- ## [1.1.10] - 2026-04-03
433
-
434
- ### Fixed
435
-
436
- - **Windows compile script fix** — `scripts/compile.ts` correctly handles `.exe` suffix on Windows, fixing the issue where compiled output file could not be found
437
- - **Windows native binary recompiled and published** — recompiled native `legna.exe` using Windows-native Bun, replacing the previous cross-compiled version
438
-
439
- ## [1.1.9] - 2026-04-03
440
-
441
- ### Fixed
442
-
443
- - **postinstall auto-installs platform package** — added `npm/postinstall.cjs`; during `npm install`, automatically detects and installs the corresponding platform binary package from the official registry, completely solving the issue where optionalDependencies fails on Windows/mirror registries
444
- - **Force official registry** — postinstall uses `--registry https://registry.npmjs.org` to avoid 404 errors from unsynchronized mirrors (e.g., Taobao)
445
- - **bin wrapper simplified** — removed runtime auto-install logic, now guaranteed by postinstall
446
-
447
- ## [1.1.8] - 2026-04-03
448
-
449
- ### Fixed
450
-
451
- - **Windows npm global install missing platform package** — bin wrapper now auto-executes `npm install -g` for the corresponding platform package when it detects the package is not installed, no longer requiring manual user action
452
- - **bin wrapper path lookup optimization** fixed scope directory path joining under global node_modules flat layout
453
-
454
- ## [1.1.7] - 2026-04-03
455
-
456
- ### Fixed
457
-
458
- - **Completely fixed Windows external module error** — cleared the compile external list; all stub modules (`@ant/*`, `@anthropic-ai/*`, native napi) are now bundled into the binary, no longer depending on runtime external modules
459
-
460
- ## [1.1.6] - 2026-04-03
461
-
462
- ### Fixed
463
-
464
- - **Windows external module error** — removed `@anthropic-ai/sandbox-runtime`, `@anthropic-ai/mcpb`, `@anthropic-ai/claude-agent-sdk`, `audio-capture-napi`, `color-diff-napi`, `modifiers-napi` from the compile external list, letting stub code bundle directly into the binary; Windows no longer reports `Cannot find module`
465
- - **bin wrapper multi-path lookup** — `npm/bin/legna.cjs` added global node_modules flat path and nested path fallback, improving cross-platform npm global install compatibility
466
- - **Version number automation** — added `scripts/bump.ts` for one-click sync of version numbers across package.json, bunfig.toml, webui/package.json, and optionalDependencies
467
- - **Release process automation** — rewrote `scripts/publish.ts` for one-click bump build webui → compile all → publish npm
468
-
469
- ## [1.1.5] - 2026-04-03
470
-
471
- ### New Features
472
-
473
- - **WebUI admin panel** — `legna admin` launches a browser-based admin panel (HTTP server + React SPA, default port 3456), visual management of both `~/.claude/` and `~/.legna/` config directories
474
- - **Config editing** edit API endpoint, API key, model mapping (Opus/Sonnet/Haiku), timeout, permission mode, language, and all other settings.json fields in the browser
475
- - **Config file switching** — lists settings*.json files, shows baseUrl/model, one-click swap to activate
476
- - **Session history browsing** — parses all session JSONL files under the projects directory, displays project path, slug, time, prompt count, and copy resume command
477
- - **Config migration** — Claude ↔ LegnaCode bidirectional migration, supports full or selective field migration (env/model/permissions, etc.), preview diff before migration
478
- - **npm cross-platform publishing** — bin wrapper (.cjs), compile-all cross-platform compilation (darwin/linux/win32), publish script
479
- - **OAuth disabled** — `isAnthropicAuthEnabled()` returns false, removed OAuth login flow
480
-
481
- ### Fixed (1.1.1 ~ 1.1.5)
482
-
483
- - bin wrapper changed to `.cjs` to fix ESM `require` error
484
- - `optionalDependencies` platform package versions aligned
485
- - Terminal restored on admin server exit with screen clear
486
- - WebUI frontend inlined into binary, no longer depends on external `webui/dist/`
487
- - All package versions unified to 1.1.5
488
-
489
- ### Architecture
490
-
491
- - Backend: `src/server/admin.ts` — Bun.serve REST API, SPA inlined as string constant
492
- - Frontend: `webui/` — React 18 + Vite + Tailwind SPA, tab-based scope switching
493
- - Inlining: `scripts/inline-webui.ts` → `src/server/admin-ui-html.ts`
494
- - CLI: `src/entrypoints/cli.tsx` — `admin` fast-path, zero extra module loading
495
-
496
- ## [1.0.9] - 2026-04-03
497
-
498
- ### New Features
499
-
500
- - **i18n multilingual completion** — completed ~100 missing hardcoded English strings across 9 files, covering Spinner, teammate tree, pill labels, keyboard shortcut hints, Tips, and all other UI areas
501
- - **Built-in styled status bar** — no external script configuration needed; displays directory, Git branch/sync status, model name (smart parsing to friendly name), colored context progress bar, and time by default; cross-platform compatible with Win/Mac/Linux
502
- - **Config auto-migration** — automatically syncs `~/.claude/settings.json` to `~/.legna/settings.json` on startup; prints warning without overwriting when both sides differ; `LEGNA_NO_CONFIG_SYNC=1` to disable
503
-
504
- ### Changed
505
-
506
- - `~/.legna/` is now the preferred config directory, `~/.claude/` serves as compatibility fallback
507
- - Status bar model name auto-parsing: `Claude-Opus-4-6-Agentic[1m]` `Opus 4.6`
508
- - `KeyboardShortcutHint` component "to" connector word internationalized (Chinese displays "→")
509
-
510
- ### Files Changed
511
-
512
- | File | Changes |
513
- |------|---------|
514
- | `src/utils/i18n/zh.ts` | +50 translation entries |
515
- | `src/components/Spinner.tsx` | 7 i18n points |
516
- | `src/components/PromptInput/PromptInputFooterLeftSide.tsx` | 4 i18n points |
517
- | `src/components/design-system/KeyboardShortcutHint.tsx` | "to" internationalized |
518
- | `src/components/Spinner/teammateSelectHint.ts` | i18n |
519
- | `src/components/Spinner/TeammateSpinnerTree.tsx` | 6 i18n points |
520
- | `src/components/Spinner/TeammateSpinnerLine.tsx` | 7 i18n points |
521
- | `src/tasks/pillLabel.ts` | all pill labels i18n |
522
- | `src/services/tips/tipRegistry.ts` | 25 tips i18n |
523
- | `src/utils/builtinStatusLine.ts` | added: built-in status bar renderer |
524
- | `src/components/StatusLine.tsx` | integrated built-in status bar |
525
- | `src/utils/envUtils.ts` | config auto-migration logic |
526
-
527
- ## [1.0.8] - 2026-04-02
528
-
529
- ### New Features
530
-
531
- - **MONITOR_TOOL** — MCP server health monitoring tool, supports start/stop/status operations, background periodic ping to detect connection status
532
- - **WORKFLOW_SCRIPTS** — workflow automation system, reads `.claude/workflows/*.md` to execute multi-step workflows, `/workflows` command lists available workflows
533
- - **HISTORY_SNIP** — session history trimming, model can proactively call SnipTool to remove old messages and free context, `/force-snip` for forced trimming, UI retains full history while model view is filtered
534
-
535
- ### Infrastructure
536
-
537
- - Added `src/tools/MonitorTool/MonitorTool.ts` MCP monitoring tool (buildTool construction)
538
- - Added `src/tasks/MonitorMcpTask/MonitorMcpTask.ts` monitoring background task lifecycle management
539
- - Added `src/components/permissions/MonitorPermissionRequest/` monitoring permission UI
540
- - Added `src/components/tasks/MonitorMcpDetailDialog.tsx` monitoring task detail dialog
541
- - Added `src/tools/WorkflowTool/WorkflowTool.ts` workflow execution tool
542
- - Added `src/tools/WorkflowTool/createWorkflowCommand.ts` workflow command scanning and registration
543
- - Added `src/tools/WorkflowTool/bundled/index.ts` built-in workflow registration entry
544
- - Added `src/tools/WorkflowTool/WorkflowPermissionRequest.tsx` workflow permission UI
545
- - Added `src/commands/workflows/` `/workflows` slash command
546
- - Added `src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts` workflow background task (kill/skip/retry)
547
- - Added `src/components/tasks/WorkflowDetailDialog.tsx` workflow detail dialog
548
- - Added `src/services/compact/snipCompact.ts` — trim trigger logic (rewrote stub)
549
- - Added `src/services/compact/snipProjection.ts` model view message filtering
550
- - Added `src/tools/SnipTool/SnipTool.ts` — model-callable trimming tool
551
- - Added `src/tools/SnipTool/prompt.ts` — SnipTool constants and prompt
552
- - Added `src/commands/force-snip.ts` — `/force-snip` slash command
553
- - Added `src/components/messages/SnipBoundaryMessage.tsx` trim boundary UI component
554
- - 3 feature flags flipped: MONITOR_TOOL, WORKFLOW_SCRIPTS, HISTORY_SNIP
555
- - Cumulative 47/87 feature flags enabled
556
-
557
- ## [1.0.7] - 2026-04-02
558
-
559
- ### New Features
560
-
561
- - **TERMINAL_PANEL** `Alt+J` toggles built-in terminal panel (tmux persistent), TerminalCapture tool can read terminal content
562
- - **WEB_BROWSER_TOOL**built-in web browsing tool, fetches web page content and extracts text
563
- - **TEMPLATES** — structured workflow template system, `legna new/list/reply` CLI commands, job status tracking
564
- - **BG_SESSIONS** — background session management, `legna ps/logs/attach/kill/--bg`, tmux persistence + PID file discovery
565
-
566
- ### Infrastructure
567
-
568
- - Added `src/tools/TerminalCaptureTool/`tmux capture-pane tool (2 files)
569
- - Added `src/tools/WebBrowserTool/WebBrowserTool.ts` — fetch + HTML text extraction
570
- - Added `src/jobs/classifier.ts` — workflow turn classifier
571
- - Added `src/cli/handlers/templateJobs.ts` — template CLI handler
572
- - Added `src/cli/bg.ts` — background session CLI (5 handlers)
573
- - Added `src/utils/taskSummary.ts` — periodic activity summary
574
- - Added `src/utils/udsClient.ts` — active session enumeration
575
- - Cumulative 44/87 feature flags enabled
576
-
577
- ## [1.0.6] - 2026-04-02
578
-
579
- ### New Features
580
-
581
- - **CACHED_MICROCOMPACT** — cache-aware tool result compression, deletes old tool_result via API cache_edits directive without breaking prompt cache
582
- - **AGENT_TRIGGERS** — `/loop` cron scheduling command + CronCreate/Delete/List tools, local scheduled task engine
583
- - **TREE_SITTER_BASH** — pure TypeScript bash AST parser (~4300 lines), used for command safety analysis
584
- - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
585
- - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
586
- - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
587
- - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool
588
-
589
- ### Infrastructure
590
-
591
- - Rewrote `src/services/compact/cachedMicrocompact.ts` (from stub to 150+ line full implementation)
592
- - Added `src/services/compact/cachedMCConfig.ts` — synchronous config module
593
- - Added `CACHE_EDITING_BETA_HEADER` to `src/constants/betas.ts`
594
- - Added `src/skills/mcpSkills.ts`, `src/services/compact/reactiveCompact.ts`
595
- - Added `src/tools/ReviewArtifactTool/`, `src/skills/bundled/hunter.ts`
596
- - Cumulative 40/87 feature flags enabled
597
-
598
- ## [1.0.5] - 2026-04-02
599
-
600
- ### New Features
601
-
602
- - **AGENT_TRIGGERS** — `/loop` cron scheduling command, CronCreate/Delete/List tools, local scheduled task engine
603
- - **TREE_SITTER_BASH** — pure TypeScript bash AST parser, used for command safety analysis
604
- - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
605
- - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
606
- - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
607
- - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool + permission UI
608
-
609
- ### Infrastructure
610
-
611
- - Added `src/skills/mcpSkills.ts` — MCP skill discovery module
612
- - Added `src/services/compact/reactiveCompact.ts` — reactive compression strategy
613
- - Added `src/tools/ReviewArtifactTool/` code review tool
614
- - Added `src/components/permissions/ReviewArtifactPermissionRequest/`review permission UI
615
- - Added `src/skills/bundled/hunter.ts` — /review skill registration
616
- - Cumulative 39/87 feature flags enabled
617
-
618
- ## [1.0.4] - 2026-04-02
619
-
620
- ### New Features
621
-
622
- - **ULTRAPLAN** — `/ultraplan` structured multi-step planning command
623
- - **VERIFICATION_AGENT** — auto-spawns verification Agent after batch task completion
624
- - **AUTO_THEME** — auto-switches dark/light theme by querying terminal background color via OSC 11
625
- - **AGENT_MEMORY_SNAPSHOT** — Agent memory snapshots
626
- - **FILE_PERSISTENCE** — file persistence tracking
627
- - **POWERSHELL_AUTO_MODE** — PowerShell auto mode
628
- - **HARD_FAIL** — strict error mode
629
- - **SLOW_OPERATION_LOGGING** — slow operation logging
630
- - **UNATTENDED_RETRY** — unattended retry
631
- - **ALLOW_TEST_VERSIONS** — allow test versions
632
-
633
- ### Infrastructure
634
-
635
- - Added `src/utils/systemThemeWatcher.ts`OSC 11 terminal theme detection and real-time monitoring
636
- - Cumulative 33/87 feature flags enabled
637
-
638
- ## [1.0.3] - 2026-04-02
639
-
640
- ### New Features
641
-
642
- - **COMMIT_ATTRIBUTION** — tracks Claude's contribution ratio per commit, PR description auto-appends attribution trailer
643
- - **AWAY_SUMMARY** — displays summary of what happened while user was away
644
- - **COMPACTION_REMINDERS** — efficiency reminders during context compaction
645
- - **HOOK_PROMPTS** — allows hooks to request user input
646
- - **BASH_CLASSIFIER** — shell command safety classifier
647
- - **EXTRACT_MEMORIES** — auto-extracts persistent memories from conversations
648
- - **SHOT_STATS** — session statistics panel
649
- - **PROMPT_CACHE_BREAK_DETECTION** — detects prompt cache invalidation
650
- - **ULTRATHINK** — deep thinking mode
651
- - **MCP_RICH_OUTPUT** — MCP tool rich text output
652
- - **CONNECTOR_TEXT** — connector text enhancement
653
- - **NATIVE_CLIPBOARD_IMAGE** — native clipboard image support
654
- - **NEW_INIT** — improved project initialization flow
655
- - **DUMP_SYSTEM_PROMPT** — debug system prompt export
656
- - **BREAK_CACHE_COMMAND** — `/break-cache` command
657
- - **BUILTIN_EXPLORE_PLAN_AGENTS**built-in Explore/Plan Agents
658
-
659
- ### Infrastructure
660
-
661
- - Added `src/utils/attributionHooks.ts`, `attributionTrailer.ts`, `postCommitAttribution.ts` — three attribution modules
662
-
663
- ## [1.0.2] - 2026-04-02
664
-
665
- ### New Features
666
-
667
- - **QUICK_SEARCH** — `Ctrl+P` quick file open in fullscreen mode, `Ctrl+Shift+F` global symbol/content search
668
- - **MESSAGE_ACTIONS** — copy, edit, retry and other actions on messages in fullscreen mode
669
- - **FORK_SUBAGENT** — `/fork <directive>` session fork, child Agent inherits full conversation context and executes tasks in parallel
670
- - **HISTORY_PICKER** — `Ctrl+R` opens history search dialog, replacing the previous inline search
671
-
672
- ### Infrastructure
673
-
674
- - Added `src/commands/fork/` command module and `UserForkBoilerplateMessage` UI component
675
-
676
- ## [1.0.1] - 2026-04-02
677
-
678
- ### New Features
679
-
680
- - **BUDDY virtual pet companion** — `/buddy hatch` hatches an exclusive coding pet, 18 species, 5 rarities, random attributes
681
- - `/buddy hatch` hatch · `/buddy pet` pet · `/buddy stats` stats · `/buddy release` release
682
- - Pet comments in cute language based on conversation context, supports multilingual auto-switching
683
- - Re-hatching after release gives a different pet (generation counter)
684
- - **TOKEN_BUDGET** — use `+500k` or `use 2M tokens` in prompts to set token budget, auto-tracks usage
685
- - **STREAMLINED_OUTPUT** environment variable `CLAUDE_CODE_STREAMLINED_OUTPUT=true` enables streamlined output
686
-
687
- ### Fixes
688
-
689
- - **Build system feature flags fix** — `scripts/build.ts` now correctly reads `bunfig.toml`'s `[bundle.features]` and passes them to the `Bun.build()` API; previously all `feature()` calls defaulted to `false`
690
-
691
- ### Infrastructure
692
-
693
- - Added `scripts/compile.ts` replacing bare `bun build --compile`, ensuring compiled binary correctly applies feature flags
694
- - Added `src/buddy/companionObserver.ts` context-aware pet reaction system
695
- - Added `src/commands/buddy/` complete command module
696
-
697
- ## [1.0.0] - 2026-03-31
698
-
699
- - Initial release: LegnaCode CLI v1.0.0
700
- - Built on the Claude Code CLI open-source edition
701
- - Brand adaptation and customization
1
+ # Changelog
2
+
3
+ 🌐 [中文文档](./CHANGELOG.zh-CN.md)
4
+
5
+ All notable changes to LegnaCode CLI will be documented in this file.
6
+
7
+ ## [1.5.3] - 2026-04-21
8
+
9
+ ### Features
10
+
11
+ - **Hermes Self-Evolution Loop** — Automatic learning closed loop: repeated tool patterns (3x) auto-generate SKILL.md via side-channel LLM; behavior corrections auto-write to `.legna/memory/`; no user confirmation needed. Background Review Agent extracts experience insights after each session.
12
+ - **Qwen Model Adapter** — Dedicated adapter for Qwen full series (qwen-plus, qwen-max, qwen-turbo, qwen-coder-plus, qwq-plus, qwen3-235b). Supports `thinking_budget` mapping, DashScope server-side web search (`enable_search`), `reasoning_content` streaming, and `content_filter` stop reason.
13
+ - **WebUI Chat Viewer** — New "聊天记录" panel in admin WebUI. Browse session history with full message rendering, collapsible thinking blocks, tool call visualization (input/output/error), and auto-scroll. Backend `/api/:scope/sessions/:id/messages` endpoint reads JSONL session files.
14
+ - **WebUI Live Chat** — `legna admin` WebUI now supports live chat via SSE streaming. Send messages, see streaming responses with thinking/tool-use visualization. Note: each message starts a new independent session (no multi-turn conversation); intended for quick API connectivity testing, not as a full chat client.
15
+ - **Skill Auto-Create** — `SkillPatternDetector.record()` was already wired but results were never surfaced. Now auto-creates skills from detected patterns and notifies user after the fact.
16
+ - **Skill Improvement Path B** — `skillImprovement` no longer gated to active skill execution. General conversation learning detects workflow preferences, behavior corrections, and coding style preferences every 10 user messages.
17
+ - **Nudge System** — Counter-driven session learning summary. Reports what was automatically learned (skills created, corrections captured, insights recorded) instead of suggesting the user go learn.
18
+
19
+ ### Improvements
20
+
21
+ - **onPreCompress Enhanced** — Working state extraction added alongside existing exchange pair extraction. Captures current task, key decisions, file paths, and error patterns before context compression. High-priority drawer written to DrawerStore.
22
+ - **Skill Version Backup** — `applySkillImprovement` now backs up current SKILL.md to `.versions/` before overwriting. Changelog with last 20 versions maintained automatically.
23
+ - **`/skillify` Unlocked** — Removed `USER_TYPE === 'ant'` gate. All users can now capture session workflows as reusable skills.
24
+
25
+ ### Bug Fixes
26
+
27
+ - **WebUI inline script crash** — Fixed `Unexpected token '<'` error caused by unescaped `</` sequences in inlined JavaScript. JS and CSS are now served as separate files (`/__admin__/app.js`, `/__admin__/app.css`) instead of being inlined into `<script>` tags.
28
+
29
+ ## [1.5.2] - 2026-04-20
30
+
31
+ ### Performance
32
+
33
+ - **Async CodeGraph** — `build()` and `walkDir()` converted from sync to async, yielding the event loop every 50 files. Added `maxDepth=10` depth limit and `visitedInodes` symlink loop protection. `save()` now uses async `writeFile`.
34
+ - **undoTracker size guard** — Added 1MB file size limit; files exceeding it skip undo snapshot recording (prevents OOM). `readFileSync` async `readFile`.
35
+ - **Async error file pre-injection** — `extractErrorFiles` converted from `existsSync`+`readFileSync` to async `access`+`readFile`.
36
+ - **stripCode dedup** — `magicKeywords.ts` reduced `stripCode()` from 3-4 calls to 1, passing the result to all downstream functions.
37
+ - **FileMemoryProvider TTL cache** — `searchSolutions` and fallback file search now use 60s TTL cache, avoiding repeated disk reads on every prefetch.
38
+ - **OML_SESSION_GUIDANCE cache** — `attachments.ts` dynamic import cached at module level after first load.
39
+ - **frustrationHint patterns hoisted** — Regex array moved from function body to module-level constant.
40
+
41
+ ### i18n
42
+
43
+ - **Compacting status messages localized** — "Compacting context…" → "凝练上下文…", "Compacting conversation" → "精炼对话中" for Chinese users.
44
+ - **Turn completion verbs localized** — New `getTurnCompletionVerbs()` function; Chinese users see "烹制了 5s" instead of "Baked for 5s".
45
+
46
+ ### Cleanup
47
+
48
+ - Deleted dead code `src/commands/undo.ts` (was never registered in command list).
49
+ - Fixed dead conditional in `extractImports`.
50
+
51
+ ## [1.5.1] - 2026-04-19
52
+
53
+ ### Features
54
+
55
+ - **Proactive skill invocation** — Wired `OML_SESSION_GUIDANCE` (the "1% rule") into the `skill_listing` attachment. The AI now proactively considers available skills before every response, instead of only responding to explicit `/slash` commands.
56
+ - **Frontend/design auto-guidelines** — New `designPrompt.ts` detects frontend intent (UI, prototype, design exploration) from user input and transparently injects layered design guidelines (oklch colors, responsive layout, animation best practices, design exploration methodology). Zero user action required.
57
+ - **Enhanced designer agent** — `/oml:designer` now carries a full design methodology prompt (oklch palettes, mobile-first, ARIA accessibility, 3+ variation exploration) instead of a one-line description.
58
+
59
+ ### Bug Fixes
60
+
61
+ - **Skills were never proactively used** — `OML_SESSION_GUIDANCE` was defined in `superpowers.ts` but never imported or injected anywhere. Now wired into the skill listing attachment.
62
+
63
+ ## [1.5.0] - 2026-04-19
64
+
65
+ ### Bug Fixes
66
+
67
+ - **Fix REPL startup deadlock** — The `/undo` command was registered via static `import` in `commands.ts`, creating a circular dependency (`commands.ts` `undo.ts` → `commands.ts`) that caused Bun's module loader to deadlock. The REPL would hang with no output on launch. Fixed by removing the static import entirely. The `/undo` feature remains available via `src/services/undoTracker.ts` (wired into Edit/Write tools) but is no longer registered as a slash command to avoid the circular dependency.
68
+
69
+ ### Features (carried from 1.4.8/1.4.9)
70
+
71
+ - **AtomCode intelligence fusion** — Pangu CJK spacing, negative feedback detection, tool call loop detection, error file pre-injection, first-read full file
72
+ - **OpenAI-compatible bridge adapter** — Anthropic OpenAI format translation for DeepSeek/Qwen/GLM/Ollama/vLLM/LM Studio
73
+ - **Code Graph** — Regex-based symbol index + file dependency graph (TS/JS/Python/Go/Rust)
74
+ - **Parallel File Edit** — One sub-agent per file with sibling skeletons
75
+ - **Workflow Engine** — Structured markdown step execution with checks and dependencies
76
+ - **Cross-session knowledge** — Auto-writes `.legna/knowledge.md` on session end
77
+ - **Baseline builds** — No-AVX binaries for older x64 CPUs (darwin-x64-baseline, linux-x64-baseline)
78
+
79
+ ## [1.4.9] - 2026-04-17
80
+
81
+ ### Features
82
+
83
+ - **Baseline (no-AVX) builds** New platform packages for older x64 CPUs without AVX instruction set support:
84
+ - `@legna-lnc/legnacode-darwin-x64-baseline` — macOS Intel (pre-2011 or Hackintosh without AVX)
85
+ - `@legna-lnc/legnacode-linux-x64-baseline`Linux x64 servers/VMs without AVX
86
+ - Fixes `warn: CPU lacks AVX support, strange crashes may occur` error
87
+ - Install: `npm i -g @legna-lnc/legnacode-darwin-x64-baseline` (use directly, not via main package)
88
+
89
+ ## [1.4.8] - 2026-04-17
90
+
91
+ ### Features
92
+
93
+ - **AtomCode intelligence fusion (Layer A)** — Lightweight agent intelligence, zero new dependencies:
94
+ - **Pangu CJK spacing** — Auto-inserts spaces between CJK and ASCII in Markdown rendering
95
+ - **Negative feedback detection** Detects frustration ("still broken"/"错了"/"まだ壊れ"), injects strategy-shift hint (EN/ZH/JA)
96
+ - **Tool call loop detection** Same (tool, args) 3+ times → blocks. Resets per user message
97
+ - **Error file pre-injection** — Bash fail → extracts file paths from stderr, auto-reads first 30 lines
98
+ - **First-read full file** — First encounter ignores offset/limit, forces full read
99
+
100
+ - **OpenAI-compatible bridge adapter (Layer B1)** Full Anthropic ↔ OpenAI format translation:
101
+ - Message format: `tool_use` ↔ `tool_calls`, `tool_result` ↔ `role: "tool"`
102
+ - Tool schema: `input_schema` `function.parameters`
103
+ - JSON repair for weak models (markdown fences, trailing commas, unbalanced brackets)
104
+ - Supports: OpenAI, DeepSeek, Qwen, GLM, SiliconFlow, Ollama, vLLM, LM Studio
105
+ - Activate: `OPENAI_COMPAT_BASE_URL` + `OPENAI_COMPAT_API_KEY` env vars
106
+
107
+ - **Code Graph (Layer B2)** Regex-based symbol index + file dependency graph:
108
+ - Languages: TypeScript/TSX, JavaScript, Python, Go, Rust
109
+ - Incremental mtime updates, persisted to `<cwd>/.legna/.palace/graph.json`
110
+ - **Wired:** auto-builds on session start, injects file summaries into prefetch context
111
+
112
+ - **Parallel File Edit (Layer B3)** — "One sub-agent per file" execution model:
113
+ - Target file full text + sibling skeletons + interface contracts
114
+ - **Wired:** integrated into `/dispatch` skill prompt with parallel edit instructions
115
+
116
+ - **Workflow Engine (Layer B4)** Structured step execution:
117
+ - Markdown `## Step N:` format with checks, failure handling, dependencies
118
+ - **Wired:** WorkflowTool now parses steps, shows status, substitutes args
119
+
120
+ - **/undo command** — Reverts the last file edit (Edit or Write tool):
121
+ - Tracks original content before each edit, max 20 entries per session
122
+ - New file creation undo deletes the file
123
+
124
+ - **Cross-session knowledge persistence** Auto-writes `<cwd>/.legna/knowledge.md`:
125
+ - Extracts key decisions/actions from last 10 assistant messages on session end
126
+ - Appends timestamped entries, caps at 50KB
127
+
128
+ - **Enhanced compiler error detection** — Extended error file pre-injection:
129
+ - Now matches compiler-style paths (`file.ts:42`, `file.py(10)`) in addition to standard paths
130
+
131
+ ## [1.4.7] - 2026-04-16
132
+
133
+ ### Features
134
+
135
+ - **claude-mem memory intelligence fusion** — Ported 5 lightweight techniques from claude-mem's persistent memory system into DrawerStore, zero new dependencies:
136
+ - **Content-hash deduplication** — `sha256(wing + room + content)` with 30-second window prevents duplicate observations during rapid compaction cycles
137
+ - **Token economics tracking** — Each drawer records `discoveryTokens` (cost to create) and `readTokens` (accumulated recall cost) for memory ROI analysis
138
+ - **Relevance feedback** — `relevanceCount` incremented on each search hit; frequently recalled memories get up to +100% importance boost via `importance * (1 + 0.1 * min(count, 10))`
139
+ - **90-day time decay** — `max(0.3, 1.0 - age_days / 90)` applied to both search similarity and importance ranking. Old memories fade but never fully disappear
140
+ - **Privacy tag filtering** — `<private>...</private>` content stripped to `[REDACTED]` before memory extraction. Zero config, just wrap sensitive text in tags
141
+
142
+ ### Architecture
143
+
144
+ - Modified `src/memdir/vectorStore/types.ts` — Drawer gains `discoveryTokens`, `readTokens`, `relevanceCount`, `contentHash` fields
145
+ - Modified `src/memdir/vectorStore/drawerStore.ts` — Schema migration (4 new columns), content-hash dedup in upsert, relevance feedback in search, time decay in search + topByImportance
146
+ - Modified `src/memdir/vectorStore/exchangeExtractor.ts` — `stripPrivate()` applied before pair extraction
147
+
148
+ ## [1.4.6] - 2026-04-16
149
+
150
+ ### Bug Fixes
151
+
152
+ - **OML skill crash fix** — All 40 OML skills (16 superpowers + 5 orchestrators + 19 agents) returned `string` instead of `ContentBlockParam[]` from `getPromptForCommand`, causing `result.filter is not a function` crash on `/ultrawork`, `/ralph`, `/autopilot`, etc. Now wrapped as `Promise<[{ type: 'text', text }]>`.
153
+ - **Statusline writes to wrong config dir** — `statuslineSetup` agent hardcoded `~/.claude/settings.json` and `~/.claude/statusline-command.sh`. Fixed to `~/.legna/`.
154
+
155
+ ### Improvements
156
+
157
+ - **Plans moved to project-local** — Default plan directory changed from `~/.legna/plans/` to `<cwd>/.legna/plans/`. Plans now live alongside the project they belong to.
158
+ - **Auto-memory moved to project-local** — Default auto-memory path changed from `~/.legna/projects/<slug>/memory/` to `<cwd>/.legna/memory/`. First startup auto-migrates files from the legacy global path (non-destructive, never overwrites).
159
+ - **Compound engineering seamless fusion** — Knowledge compounding from compound-engineering-plugin, injected into 3 existing automation points with zero new commands:
160
+ - `onPreCompress`: high-value exchange pairs auto-written to `docs/solutions/` (opt-in via `mkdir docs/solutions`)
161
+ - `prefetch`: auto-searches `docs/solutions/` for past learnings when user asks related questions
162
+ - `magicKeywords`: deep scope detection (refactor/migrate/architecture) appends a lightweight compound hint
163
+ - **Legacy path comments cleaned** — Updated stale `~/.claude/projects/` references in memdir, extractMemories, settings types
164
+
165
+ ## [1.4.5] - 2026-04-13
166
+
167
+ ### Features
168
+
169
+ - **OpenViking content tiering fusion** — Ported L0/L1/L2 three-tier content grading from OpenViking's context database:
170
+ - **Content Tiering** — Each drawer auto-generates L0 (one-sentence summary, ~25 words) and L1 (core overview, ~200 words) at upsert time. L2 is the full verbatim content.
171
+ - **Budget-aware wake-up** — `wakeUp()` now accepts a token budget (default 800) and greedily fills it with L1 content, degrading to L0 when budget is tight.
172
+ - **Budget-capped recall** — New `recallWithBudget()` method: L2→L1→L0 degradation strategy ensures recall never exceeds character budget.
173
+ - **CJK-aware token estimation** — `estimateTokens()` handles mixed CJK/Latin text.
174
+ - **SQLite schema migration** — Existing DrawerStore databases auto-migrate with `ALTER TABLE ADD COLUMN`.
175
+ - **Fixed recallByTopic()** — Now passes actual query for vector ranking instead of empty string.
176
+
177
+ ## [1.4.4] - 2026-04-11
178
+
179
+ ### Improvements
180
+
181
+ - **Status messages moved to spinner line** autocompact / output truncated / interrupted status messages no longer insert system messages into the conversation; they now display temporarily on the spinner animation line, flashing briefly without polluting context
182
+ - **ToolUseContext adds setSpinnerMessage** generic spinner text callback allowing the query loop to update spinner status at any time
183
+ - **LegnaCode vs Claude Code comparison doc** added [COMPARISON.md](./COMPARISON.md) with 60+ item-by-item comparison across 9 categories
184
+
185
+ ## [1.4.3] - 2026-04-11
186
+
187
+ ### Features
188
+
189
+ - **mempalace memory architecture integration** ported mempalace core memory system, pure TypeScript implementation, zero external dependencies:
190
+ - **DrawerStore** — SQLite-persisted vector memory storage + WAL audit log, deterministic drawer ID (sha256 idempotent upsert)
191
+ - **TF-IDF vectorizer** — pure TS implementation (Porter stemming + cosine similarity), <10K drawer search <5ms
192
+ - **4-layer memory stack** — L0 identity (~100 tokens) + L1 top drawers (~500-800 tokens) loaded every turn, L2/L3 recalled on demand. Per-turn tokens reduced from ~8K to ~800 (~88% savings)
193
+ - **Temporal knowledge graph** — SQLite entity-relation storage, supports triples with validity periods and point-in-time queries
194
+ - **Room auto-classification** — 6 categories (facts/decisions/events/discoveries/preferences/advice) with keyword scoring
195
+ - **Exchange pair extractor** — Q+A paired chunking + 5-category tag scoring (decisions/preferences/milestones/problems/emotional)
196
+ - **Auto-migration** — automatically migrates existing .legna/memory/*.md files to DrawerStore on first startup
197
+ - **PreCompact memory save** — automatically extracts high-value exchange pairs to DrawerStore before compaction, preventing memory loss
198
+
199
+ ### Architecture
200
+
201
+ - Added `src/memdir/vectorStore/`complete vector memory system (8 files)
202
+ - `types.ts`Drawer, SearchResult, MetadataFilter types
203
+ - `tfidfVectorizer.ts` — TF-IDF + Porter stemming + cosine similarity
204
+ - `drawerStore.ts` — SQLite persistence + WAL + vector search
205
+ - `roomDetector.ts` — content auto-classification
206
+ - `layeredStack.ts`4-layer memory stack
207
+ - `knowledgeGraph.ts` — temporal knowledge graph
208
+ - `exchangeExtractor.ts` exchange pair extraction + tag scoring
209
+ - `migration.ts` — .md → DrawerStore auto-migration
210
+ - Upgraded `src/memdir/providers/FileMemoryProvider.ts` — DrawerStore + LayeredStack backend
211
+ - Wired `src/services/compact/autoCompact.ts` — calls onPreCompress before compaction
212
+
213
+ ## [1.4.2] - 2026-04-11
214
+
215
+ ### Features
216
+
217
+ - **verbose enabled by default** users now see full tool execution progress and status information by default
218
+ - **Token/Timer instant display** removed 30-second delay, token count and elapsed time shown from second 1
219
+ - **Autocompact status visible** — displays "Compacting conversation context..." system message during conversation compaction
220
+ - **Interrupt reason visible** — shows abort reason on interruption (streaming and tool_execution phases)
221
+ - **Output truncated retry prompt** — displays retry progress during max output tokens recovery
222
+ - **Tool execution logging** — StreamingToolExecutor outputs current tool name and queue depth
223
+ - **Microcompact/Snip logging** — added debug logging for compaction operations
224
+ - **ForkedAgent startup logging** — outputs label and ID when child agent starts
225
+
226
+ ### Bug Fixes
227
+
228
+ - **Apple Terminal notification logic fix** — bell is now sent only when bell is not disabled (logic was previously inverted)
229
+
230
+ ## [1.4.0] - 2026-04-11
231
+
232
+ ### Features
233
+
234
+ - **MiniMax deep native integration** when using MiniMax models with `MINIMAX_API_KEY` configured, automatically registers 6 native multimodal tools:
235
+ - `MiniMaxImageGenerate`image generation (POST /v1/image_generation)
236
+ - `MiniMaxVideoGenerate`video generation + async polling (POST /v1/video_generation)
237
+ - `MiniMaxSpeechSynthesize` — text-to-speech (POST /v1/t2a_v2)
238
+ - `MiniMaxMusicGenerate` — music generation (POST /v1/music_generation)
239
+ - `MiniMaxVisionDescribe` — image understanding VLM (POST /v1/coding_plan/vlm)
240
+ - `MiniMaxWebSearch` — web search (POST /v1/web_search)
241
+ - **MiniMax auth command** `/auth-minimax` command to configure API key, persisted to `~/.legna/minimax-credentials.json`
242
+ - **MiniMax tool schema export** — `schemaExport.ts` supports exporting Anthropic-compatible tool schemas
243
+ - **MiniMax multimodal skill pack** 5 built-in skills (image/video/speech/music/pipeline) guiding AI to orchestrate multimodal workflows
244
+ - **Smart model routing** — heuristic routing to fast/default/strong model tiers based on prompt complexity
245
+ - **Autonomous skill detection** detects repetitive tool call patterns and prompts users to save as reusable skills
246
+ - **Context compression enhancements**:
247
+ - Tool output pre-pruning — large tool_result blocks auto-trimmed before compact (head + tail preserved)
248
+ - Budget pressure injection — injects hints into tool results when context usage exceeds 80%, guiding the model to wrap up
249
+ - **RPC subprocess tool execution** — Unix Domain Socket RPC server + stub generator + code execution runner; AI-generated scripts can call back LegnaCode tools (Bash/Read/Write/Edit/Glob/Grep/WebFetch) via RPC, compressing multi-step operations into a single inference
250
+ - **Memory Provider plugin system** — abstract base class + registry + default FileMemoryProvider; supports one external provider running in parallel with built-in memory, full lifecycle (initialize/prefetch/syncTurn/shutdown) + optional hooks (onTurnStart/onSessionEnd/onPreCompress/onDelegation)
251
+ - **Cross-session memory search** — `/recall` command searches historical session JSONL files with keyword matching + relevance ranking
252
+ - **Worker thread pool** — large file operations / batch searches can be offloaded to worker threads, avoiding main thread blocking
253
+
254
+ ### Architecture
255
+
256
+ - Added `src/tools/MiniMaxTools/`complete MiniMax multimodal tool directory (client, endpoints, 6 buildTool tools, conditional registration, schema export)
257
+ - Added `src/services/rpc/`RPC subprocess tool execution (rpcServer.ts, stubGenerator.ts, codeExecutionRunner.ts)
258
+ - Added `src/memdir/providers/` — Memory Provider plugin system (MemoryProvider.ts abstract base class, FileMemoryProvider.ts default implementation, registry.ts registry)
259
+ - Added `src/services/modelRouter.ts` — task complexity estimation + model tier routing
260
+ - Added `src/services/skillAutoCreate.ts` — tool call pattern detector, integrated into toolExecution.ts
261
+ - Added `src/services/compact/toolOutputPruner.ts` — tool output pre-pruning, integrated into autoCompact.ts
262
+ - Added `src/services/compact/budgetPressure.ts` — context budget pressure injection, integrated into query.ts
263
+ - Added `src/services/sessionSearch.ts` — cross-session search engine
264
+ - Added `src/commands/recall/``/recall` command
265
+ - Added `src/commands/auth/``/auth-minimax` command
266
+ - Added `src/skills/builtin-minimax/` — 5 MiniMax multimodal skill files
267
+ - Added `src/utils/workerPool.ts` worker thread pool
268
+
269
+ ## [1.3.7] - 2026-04-09
270
+
271
+ ### Bug Fixes
272
+
273
+ - **Resume session detection** — `legna resume` failed to discover sessions written to `<project>/.legna/sessions/` since v1.3.0. `getStatOnlyLogsForWorktrees()` only scanned the global `~/.legna/projects/`; it now also scans the project-local sessions directory, consistent with `fetchLogs()` behavior
274
+ - **Interrupted diagnostics logging** — added abort reason + call stack logging at `onCancel()` and `query.ts` interrupt points; traceable under `--verbose` mode
275
+
276
+ ### Enhancements
277
+
278
+ - **Priority-now interrupt visibility** when a queued command interrupts the current task, the command summary is logged to debug log instead of silently aborting
279
+ - **Background task status visibility** — footer pill shows real-time activity summary for a single background agent (latest tool + token stats); task completion notification includes progress statistics
280
+
281
+ ### Architecture
282
+
283
+ - `src/utils/sessionStorage.ts` — `getStatOnlyLogsForWorktrees()` Path A/B both include `.legna/sessions/` scanning
284
+ - `src/query.ts`abort reason logging added at both `createUserInterruptionMessage` call sites
285
+ - `src/screens/REPL.tsx` `onCancel()` call stack logging, priority-now useEffect logs command summary
286
+ - `src/tasks/pillLabel.ts`single agent task displays `getActivitySummary()` real-time activity
287
+ - `src/tasks/LocalMainSessionTask.ts` — `completeMainSessionTask` captures progress, notification includes statistics
288
+
289
+ ## [1.3.6] - 2026-04-09
290
+
291
+ ### Bug Fixes
292
+
293
+ - **Windows Edit tool path separator false positive** — fixed [#7935](https://github.com/anthropics/claude-code/issues/7935): on Windows, after reading a file with forward slashes (`D:/path`), Edit/MultiEdit tools reported "File has been unexpectedly modified" error. Root cause: `path.normalize()` does not always convert `/` to `\` in certain runtimes (Bun compiled binary + Git Bash/MINGW environment), causing FileStateCache key mismatch
294
+ - `FileStateCache` added `normalizeKey()` — explicitly replaces `/` with the native separator (Windows: `\`) after `path.normalize()`, ensuring `D:/foo` and `D:\foo` always hit the same cache entry
295
+ - `expandPath()` added `ensureNativeSeparators()` — all returned paths force backslashes on Windows as a defensive fix
296
+
297
+ ### Architecture
298
+
299
+ - `src/utils/fileStateCache.ts``normalizeKey()` replaces bare `normalize()`, imports `sep`
300
+ - `src/utils/path.ts``ensureNativeSeparators()` wraps all `normalize()`/`resolve()`/`join()` return values
301
+
302
+ ## [1.3.5] - 2026-04-07
303
+
304
+ ### Bug Fixes
305
+
306
+ - **SessionStart hook error** OML's SessionStart hook used `type: 'prompt'`, but the SessionStart phase has no `toolUseContext` (LLM call context), causing a guaranteed crash. Removed SessionStart hook; skill guidance is now exposed through skill descriptions
307
+ - **Windows alt-screen rendering flicker** in alt-screen mode, `fullResetSequence_CAUSES_FLICKER` was still triggered (viewport changes, scrollback detection, etc.), causing full-screen clear + redraw flicker. Added `altScreenFullRedraw()` method; in alt-screen mode, uses simple `CSI 2J + CSI H` (erase screen + cursor home) instead of `clearTerminal`'s Windows legacy path
308
+ - **Windows drainStdin** previously skipped stdin draining entirely on Windows; residual mouse events caused input field corruption. Changed to flush buffered input events by toggling raw mode
309
+
310
+ ### Architecture
311
+
312
+ - `src/ink/log-update.ts` — 5 `fullResetSequence_CAUSES_FLICKER` call sites now check `altScreen`, added `altScreenFullRedraw()` method
313
+ - `src/ink/ink.tsx` — Windows `drainStdin` alternative (toggle raw mode)
314
+ - `src/plugins/bundled/oml/definition.ts` — removed SessionStart hook, OML upgraded to 1.2.0
315
+
316
+ ## [1.3.4] - 2026-04-07
317
+
318
+ ### New Features
319
+
320
+ - **OML Superpowers engineering discipline** — integrated obra/superpowers core skills, enforcing strict software engineering workflows for AI
321
+ - `/verify` — completion verification discipline: cannot claim completion without fresh evidence
322
+ - `/tdd` TDD enforcement: RED-GREEN-REFACTOR, write tests before code
323
+ - `/debug` 4-stage systematic debugging, question architecture after 3 failures
324
+ - `/brainstorm` Socratic design: hard gate, no implementation allowed until design is approved
325
+ - `/write-plan` break design into 2-5 minute tasks, zero placeholders
326
+ - `/sdd` sub-agent driven development: implement spec review → quality review, 3 stages
327
+ - `/exec-plan` load plan file and execute tasks sequentially
328
+ - `/dispatch` — parallel sub-agent dispatch
329
+ - `/code-review` — dispatch reviewer sub-agent
330
+ - `/worktree` — Git worktree isolated development
331
+ - `/finish-branch` branch wrap-up (merge/PR/keep/discard)
332
+ - **SessionStart skill guidance** — automatically injects OML skill guidance prompt at session start ("1% rule")
333
+ - OML plugin version upgraded to 1.1.0, 35 built-in skills total
334
+
335
+ ### Architecture
336
+
337
+ - `src/plugins/bundled/oml/superpowers.ts` — 11 engineering discipline skills + SessionStart guidance
338
+ - `src/plugins/bundled/oml/definition.ts` — appended superpowers skills + SessionStart hook
339
+
340
+ ## [1.3.3] - 2026-04-07
341
+
342
+ ### New Features
343
+
344
+ - **OML (Oh-My-LegnaCode) smart orchestration layer** built-in oh-my-claudecode core functionality, works out of the box
345
+ - 5 orchestration skills: `/ultrawork` (parallel execution), `/ralph` (persistent loop), `/autopilot` (fully autonomous), `/ralplan` (plan then execute), `/plan-oml` (structured planning)
346
+ - 19 specialized agent skills: `/oml:explore`, `/oml:planner`, `/oml:architect`, `/oml:executor`, `/oml:verifier`, etc.
347
+ - Magic Keywords auto-detection: when prompt contains keywords like ultrawork/ralph/autopilot/ultrathink, orchestration directives are auto-injected (supports CJK and Vietnamese)
348
+ - Can be enabled/disabled via `/plugin` UI (`oml@builtin`, enabled by default)
349
+ - `OML_BUILTIN` feature flag controls compile-time DCE
350
+
351
+ ### Bug Fixes
352
+
353
+ - **Windows Terminal Fullscreen** — automatically enables alt-screen mode in `WT_SESSION` environment, completely eliminating the cursor-up viewport yank bug (microsoft/terminal#14774). Covers WSL-in-Windows-Terminal. `CLAUDE_CODE_NO_FLICKER=0` to opt-out
354
+
355
+ ### Architecture
356
+
357
+ - `src/plugins/bundled/oml/`OML plugin module (definition, skills, agents, magicKeywords)
358
+ - `src/plugins/bundled/index.ts` — registered OML builtin plugin
359
+ - `src/utils/processUserInput/processUserInput.ts` — magic keyword detection integration point
360
+ - `src/utils/fullscreen.ts` — Windows Terminal fullscreen condition
361
+
362
+ ## [1.3.2] - 2026-04-07
363
+
364
+ ### Breaking Changes
365
+
366
+ - **Disabled HISTORY_SNIP** — `bunfig.toml` feature flag set to false, compile-time DCE removes all snip-related code (SnipTool, snipCompact, snipProjection, force-snip command, attachments nudge). Auto-compact is unaffected; context management reverts to the original mechanism
367
+
368
+ ### Bug Fixes
369
+
370
+ - **Windows Terminal streaming text** — no longer disables streaming text display for all Windows; now only disabled under legacy conhost. Windows Terminal (detected via `WT_SESSION` environment variable) restores normal streaming rendering
371
+
372
+ ## [1.3.1] - 2026-04-06
373
+
374
+ ### Bug Fixes
375
+
376
+ - **Snip-aware context window** — 1M models are no longer prematurely snipped; `KEEP_RECENT` changed from hardcoded 10 to dynamic calculation (1M: 200, 500K: 100, 200K: 10)
377
+ - **Snip nudge frequency** 1M model nudge threshold raised from 20 to 100 messages
378
+ - **branch command branding** — `/branch` resume prompt changed from `claude -r` to `legna -r`
379
+ - **admin version fallback** — displays correct version number when running from source
380
+
381
+ ### Architecture
382
+
383
+ - `src/services/compact/snipCompact.ts` — added `getSnipThresholds(model)` dynamic threshold function; `snipCompactIfNeeded` and `shouldNudgeForSnips` gained model parameter
384
+ - `src/query.ts` / `src/QueryEngine.ts` / `src/commands/force-snip-impl.ts` — pass model parameter
385
+
386
+ ## [1.3.0] - 2026-04-04
387
+
388
+ ### New Features
389
+
390
+ - **Project-local storage** sessions, skills, memory, rules, and settings all moved down to `<project>/.legna/` directory
391
+ - New sessions written to `<project>/.legna/sessions/<uuid>.jsonl`, traveling with the project
392
+ - Project-level skills/rules/settings/agent-memory/workflows unified under `.legna/`
393
+ - `.legna/` automatically added to `.gitignore`
394
+ - **Global data migration** — automatically migrates from `~/.claude/` to `~/.legna/` on first startup (one-way)
395
+ - Migrates settings.json, credentials, rules, skills, agents, plugins, keybindings, etc.
396
+ - Does not overwrite existing files; writes `.migration-done` marker on completion
397
+ - `LEGNA_NO_CONFIG_SYNC=1` to disable
398
+ - **`legna migrate` command** — manual data migration
399
+ - `--global` migrates global data only
400
+ - `--sessions` migrates current project sessions to local only
401
+ - `--all` migrates everything (default)
402
+ - `--dry-run` preview mode
403
+ - **Three-level fallback reads** — automatically searches `.legna/` → `.claude/` → `~/.legna/` → `~/.claude/` when reading, zero-breakage backward compatibility
404
+
405
+ ### Architecture
406
+
407
+ - `src/utils/legnaPathResolver.ts`unified path resolution (PROJECT_FOLDER/LEGACY_FOLDER/resolveProjectPath)
408
+ - `src/utils/ensureLegnaGitignored.ts` auto-gitignore utility
409
+ - `src/utils/envUtils.ts` refactored global migration logic, removed old syncClaudeConfigToLegna
410
+ - `src/utils/sessionStoragePortable.ts` added getLocalSessionsDir/getLegacyProjectsDir, refactored resolveSessionFilePath
411
+ - `src/utils/sessionStorage.ts` — session write path switched to project-local
412
+ - `src/utils/listSessionsImpl.ts` — multi-source scan and merge (local + global + legacy)
413
+ - `src/commands/migrate/` — CLI migration command
414
+
415
+ ## [1.2.1] - 2026-04-04
416
+
417
+ ### New Features
418
+
419
+ - **Model Adapter Layer** — unified third-party model compatibility framework, auto-detects model/endpoint and applies corresponding transforms
420
+ - **MiMo (Xiaomi) adapter** — api.xiaomimimo.com/anthropic, supports mimo-v2-pro/omni/flash (1M ctx)
421
+ - simplifyThinking + forceAutoToolChoice + normalizeTools + stripBetas + injectTopP(0.95) + stripCacheControl
422
+ - Handles content_filter / repetition_truncation stop_reason
423
+ - **GLM (ZhipuAI) adapter** — open.bigmodel.cn/api/anthropic, supports glm-5.1/5/5-turbo/4.7/4.6/4.5, etc.
424
+ - Full standard transform suite, server-side auto-caching (strip cache_control)
425
+ - **DeepSeek adapter** — api.deepseek.com/anthropic, supports deepseek-chat/coder/reasoner
426
+ - stripReasoningContent to avoid 400 errors, reasoner models auto-strip temperature/top_p
427
+ - **Kimi (Moonshot) adapter** — api.moonshot.ai/anthropic, supports kimi-k2/k2.5/k2-turbo, etc.
428
+ - Preserves cache_control (Kimi supports prompt caching discount), stripReasoningContent
429
+ - **MiniMax adapter** — api.minimaxi.com/anthropic (China) + api.minimax.io/anthropic (international)
430
+ - Supports MiniMax-M2.7/M2.5/M2.1/M2 full series (204K ctx), case-insensitive matching
431
+ - Deep compatibility: preserves metadata, tool_choice, cache_control, top_p (other adapters need strip/force)
432
+ - Only needs simplifyThinking + normalizeTools + stripBetas + stripUnsupportedFieldsKeepMetadata
433
+
434
+ ### Architecture
435
+
436
+ - `src/utils/model/adapters/index.ts` adapter registry + match/transform dispatch
437
+ - `src/utils/model/adapters/shared.ts` 12 shared transform functions (including new stripUnsupportedFieldsKeepMetadata)
438
+ - `src/utils/model/adapters/{mimo,glm,deepseek,kimi,minimax}.ts` — 5 provider adapters
439
+ - `src/services/api/claude.ts` paramsFromContext() calls applyModelAdapter() at the end
440
+
441
+ ## [1.2.0] - 2026-04-03
442
+
443
+ ### New Features
444
+
445
+ - **Sessions grouped by project** — WebUI session history panel groups sessions by project path
446
+ - **resume command with cd** — copied resume command auto-includes `cd` to project directory (Windows uses `cd /d`)
447
+ - **Migration supports session history** — config migration panel adds "also migrate session history" option, copies `projects/` directory
448
+ - **Windows native compilation** — Windows binary now compiled natively on Windows
449
+
450
+ ### Fixed
451
+
452
+ - Migration panel field names corrected to match actual settings.json fields
453
+
454
+ ## [1.1.10] - 2026-04-03
455
+
456
+ ### Fixed
457
+
458
+ - **Windows compile script fix** — `scripts/compile.ts` correctly handles `.exe` suffix on Windows, fixing the issue where compiled output file could not be found
459
+ - **Windows native binary recompiled and published** — recompiled native `legna.exe` using Windows-native Bun, replacing the previous cross-compiled version
460
+
461
+ ## [1.1.9] - 2026-04-03
462
+
463
+ ### Fixed
464
+
465
+ - **postinstall auto-installs platform package** — added `npm/postinstall.cjs`; during `npm install`, automatically detects and installs the corresponding platform binary package from the official registry, completely solving the issue where optionalDependencies fails on Windows/mirror registries
466
+ - **Force official registry** — postinstall uses `--registry https://registry.npmjs.org` to avoid 404 errors from unsynchronized mirrors (e.g., Taobao)
467
+ - **bin wrapper simplified** — removed runtime auto-install logic, now guaranteed by postinstall
468
+
469
+ ## [1.1.8] - 2026-04-03
470
+
471
+ ### Fixed
472
+
473
+ - **Windows npm global install missing platform package** — bin wrapper now auto-executes `npm install -g` for the corresponding platform package when it detects the package is not installed, no longer requiring manual user action
474
+ - **bin wrapper path lookup optimization** fixed scope directory path joining under global node_modules flat layout
475
+
476
+ ## [1.1.7] - 2026-04-03
477
+
478
+ ### Fixed
479
+
480
+ - **Completely fixed Windows external module error** — cleared the compile external list; all stub modules (`@ant/*`, `@anthropic-ai/*`, native napi) are now bundled into the binary, no longer depending on runtime external modules
481
+
482
+ ## [1.1.6] - 2026-04-03
483
+
484
+ ### Fixed
485
+
486
+ - **Windows external module error** — removed `@anthropic-ai/sandbox-runtime`, `@anthropic-ai/mcpb`, `@anthropic-ai/claude-agent-sdk`, `audio-capture-napi`, `color-diff-napi`, `modifiers-napi` from the compile external list, letting stub code bundle directly into the binary; Windows no longer reports `Cannot find module`
487
+ - **bin wrapper multi-path lookup** `npm/bin/legna.cjs` added global node_modules flat path and nested path fallback, improving cross-platform npm global install compatibility
488
+ - **Version number automation** — added `scripts/bump.ts` for one-click sync of version numbers across package.json, bunfig.toml, webui/package.json, and optionalDependencies
489
+ - **Release process automation** — rewrote `scripts/publish.ts` for one-click bump → build webui → compile all → publish npm
490
+
491
+ ## [1.1.5] - 2026-04-03
492
+
493
+ ### New Features
494
+
495
+ - **WebUI admin panel** — `legna admin` launches a browser-based admin panel (HTTP server + React SPA, default port 3456), visual management of both `~/.claude/` and `~/.legna/` config directories
496
+ - **Config editing** — edit API endpoint, API key, model mapping (Opus/Sonnet/Haiku), timeout, permission mode, language, and all other settings.json fields in the browser
497
+ - **Config file switching** — lists settings*.json files, shows baseUrl/model, one-click swap to activate
498
+ - **Session history browsing** — parses all session JSONL files under the projects directory, displays project path, slug, time, prompt count, and copy resume command
499
+ - **Config migration** — Claude ↔ LegnaCode bidirectional migration, supports full or selective field migration (env/model/permissions, etc.), preview diff before migration
500
+ - **npm cross-platform publishing** — bin wrapper (.cjs), compile-all cross-platform compilation (darwin/linux/win32), publish script
501
+ - **OAuth disabled** — `isAnthropicAuthEnabled()` returns false, removed OAuth login flow
502
+
503
+ ### Fixed (1.1.1 ~ 1.1.5)
504
+
505
+ - bin wrapper changed to `.cjs` to fix ESM `require` error
506
+ - `optionalDependencies` platform package versions aligned
507
+ - Terminal restored on admin server exit with screen clear
508
+ - WebUI frontend inlined into binary, no longer depends on external `webui/dist/`
509
+ - All package versions unified to 1.1.5
510
+
511
+ ### Architecture
512
+
513
+ - Backend: `src/server/admin.ts` — Bun.serve REST API, SPA inlined as string constant
514
+ - Frontend: `webui/` React 18 + Vite + Tailwind SPA, tab-based scope switching
515
+ - Inlining: `scripts/inline-webui.ts` → `src/server/admin-ui-html.ts`
516
+ - CLI: `src/entrypoints/cli.tsx` `admin` fast-path, zero extra module loading
517
+
518
+ ## [1.0.9] - 2026-04-03
519
+
520
+ ### New Features
521
+
522
+ - **i18n multilingual completion** completed ~100 missing hardcoded English strings across 9 files, covering Spinner, teammate tree, pill labels, keyboard shortcut hints, Tips, and all other UI areas
523
+ - **Built-in styled status bar** — no external script configuration needed; displays directory, Git branch/sync status, model name (smart parsing to friendly name), colored context progress bar, and time by default; cross-platform compatible with Win/Mac/Linux
524
+ - **Config auto-migration** — automatically syncs `~/.claude/settings.json` to `~/.legna/settings.json` on startup; prints warning without overwriting when both sides differ; `LEGNA_NO_CONFIG_SYNC=1` to disable
525
+
526
+ ### Changed
527
+
528
+ - `~/.legna/` is now the preferred config directory, `~/.claude/` serves as compatibility fallback
529
+ - Status bar model name auto-parsing: `Claude-Opus-4-6-Agentic[1m]` → `Opus 4.6`
530
+ - `KeyboardShortcutHint` component "to" connector word internationalized (Chinese displays "→")
531
+
532
+ ### Files Changed
533
+
534
+ | File | Changes |
535
+ |------|---------|
536
+ | `src/utils/i18n/zh.ts` | +50 translation entries |
537
+ | `src/components/Spinner.tsx` | 7 i18n points |
538
+ | `src/components/PromptInput/PromptInputFooterLeftSide.tsx` | 4 i18n points |
539
+ | `src/components/design-system/KeyboardShortcutHint.tsx` | "to" internationalized |
540
+ | `src/components/Spinner/teammateSelectHint.ts` | i18n |
541
+ | `src/components/Spinner/TeammateSpinnerTree.tsx` | 6 i18n points |
542
+ | `src/components/Spinner/TeammateSpinnerLine.tsx` | 7 i18n points |
543
+ | `src/tasks/pillLabel.ts` | all pill labels i18n |
544
+ | `src/services/tips/tipRegistry.ts` | 25 tips i18n |
545
+ | `src/utils/builtinStatusLine.ts` | added: built-in status bar renderer |
546
+ | `src/components/StatusLine.tsx` | integrated built-in status bar |
547
+ | `src/utils/envUtils.ts` | config auto-migration logic |
548
+
549
+ ## [1.0.8] - 2026-04-02
550
+
551
+ ### New Features
552
+
553
+ - **MONITOR_TOOL** — MCP server health monitoring tool, supports start/stop/status operations, background periodic ping to detect connection status
554
+ - **WORKFLOW_SCRIPTS** workflow automation system, reads `.claude/workflows/*.md` to execute multi-step workflows, `/workflows` command lists available workflows
555
+ - **HISTORY_SNIP** session history trimming, model can proactively call SnipTool to remove old messages and free context, `/force-snip` for forced trimming, UI retains full history while model view is filtered
556
+
557
+ ### Infrastructure
558
+
559
+ - Added `src/tools/MonitorTool/MonitorTool.ts` — MCP monitoring tool (buildTool construction)
560
+ - Added `src/tasks/MonitorMcpTask/MonitorMcpTask.ts` — monitoring background task lifecycle management
561
+ - Added `src/components/permissions/MonitorPermissionRequest/` monitoring permission UI
562
+ - Added `src/components/tasks/MonitorMcpDetailDialog.tsx` monitoring task detail dialog
563
+ - Added `src/tools/WorkflowTool/WorkflowTool.ts` workflow execution tool
564
+ - Added `src/tools/WorkflowTool/createWorkflowCommand.ts` workflow command scanning and registration
565
+ - Added `src/tools/WorkflowTool/bundled/index.ts` — built-in workflow registration entry
566
+ - Added `src/tools/WorkflowTool/WorkflowPermissionRequest.tsx` — workflow permission UI
567
+ - Added `src/commands/workflows/` — `/workflows` slash command
568
+ - Added `src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts`workflow background task (kill/skip/retry)
569
+ - Added `src/components/tasks/WorkflowDetailDialog.tsx` — workflow detail dialog
570
+ - Added `src/services/compact/snipCompact.ts` — trim trigger logic (rewrote stub)
571
+ - Added `src/services/compact/snipProjection.ts` — model view message filtering
572
+ - Added `src/tools/SnipTool/SnipTool.ts` — model-callable trimming tool
573
+ - Added `src/tools/SnipTool/prompt.ts` — SnipTool constants and prompt
574
+ - Added `src/commands/force-snip.ts` — `/force-snip` slash command
575
+ - Added `src/components/messages/SnipBoundaryMessage.tsx` trim boundary UI component
576
+ - 3 feature flags flipped: MONITOR_TOOL, WORKFLOW_SCRIPTS, HISTORY_SNIP
577
+ - Cumulative 47/87 feature flags enabled
578
+
579
+ ## [1.0.7] - 2026-04-02
580
+
581
+ ### New Features
582
+
583
+ - **TERMINAL_PANEL** — `Alt+J` toggles built-in terminal panel (tmux persistent), TerminalCapture tool can read terminal content
584
+ - **WEB_BROWSER_TOOL** — built-in web browsing tool, fetches web page content and extracts text
585
+ - **TEMPLATES** — structured workflow template system, `legna new/list/reply` CLI commands, job status tracking
586
+ - **BG_SESSIONS** — background session management, `legna ps/logs/attach/kill/--bg`, tmux persistence + PID file discovery
587
+
588
+ ### Infrastructure
589
+
590
+ - Added `src/tools/TerminalCaptureTool/` — tmux capture-pane tool (2 files)
591
+ - Added `src/tools/WebBrowserTool/WebBrowserTool.ts` fetch + HTML text extraction
592
+ - Added `src/jobs/classifier.ts` — workflow turn classifier
593
+ - Added `src/cli/handlers/templateJobs.ts` — template CLI handler
594
+ - Added `src/cli/bg.ts` — background session CLI (5 handlers)
595
+ - Added `src/utils/taskSummary.ts` — periodic activity summary
596
+ - Added `src/utils/udsClient.ts` active session enumeration
597
+ - Cumulative 44/87 feature flags enabled
598
+
599
+ ## [1.0.6] - 2026-04-02
600
+
601
+ ### New Features
602
+
603
+ - **CACHED_MICROCOMPACT** — cache-aware tool result compression, deletes old tool_result via API cache_edits directive without breaking prompt cache
604
+ - **AGENT_TRIGGERS** — `/loop` cron scheduling command + CronCreate/Delete/List tools, local scheduled task engine
605
+ - **TREE_SITTER_BASH** — pure TypeScript bash AST parser (~4300 lines), used for command safety analysis
606
+ - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
607
+ - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
608
+ - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
609
+ - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool
610
+
611
+ ### Infrastructure
612
+
613
+ - Rewrote `src/services/compact/cachedMicrocompact.ts` (from stub to 150+ line full implementation)
614
+ - Added `src/services/compact/cachedMCConfig.ts`synchronous config module
615
+ - Added `CACHE_EDITING_BETA_HEADER` to `src/constants/betas.ts`
616
+ - Added `src/skills/mcpSkills.ts`, `src/services/compact/reactiveCompact.ts`
617
+ - Added `src/tools/ReviewArtifactTool/`, `src/skills/bundled/hunter.ts`
618
+ - Cumulative 40/87 feature flags enabled
619
+
620
+ ## [1.0.5] - 2026-04-02
621
+
622
+ ### New Features
623
+
624
+ - **AGENT_TRIGGERS** — `/loop` cron scheduling command, CronCreate/Delete/List tools, local scheduled task engine
625
+ - **TREE_SITTER_BASH** — pure TypeScript bash AST parser, used for command safety analysis
626
+ - **TREE_SITTER_BASH_SHADOW** — tree-sitter vs legacy parser shadow comparison mode
627
+ - **MCP_SKILLS** — auto-discovers and registers skill commands from MCP server `skill://` resources
628
+ - **REACTIVE_COMPACT** — auto-triggers context compression on 413/overload errors
629
+ - **REVIEW_ARTIFACT** — `/review` code review skill + ReviewArtifact tool + permission UI
630
+
631
+ ### Infrastructure
632
+
633
+ - Added `src/skills/mcpSkills.ts` — MCP skill discovery module
634
+ - Added `src/services/compact/reactiveCompact.ts` — reactive compression strategy
635
+ - Added `src/tools/ReviewArtifactTool/`code review tool
636
+ - Added `src/components/permissions/ReviewArtifactPermissionRequest/` review permission UI
637
+ - Added `src/skills/bundled/hunter.ts` — /review skill registration
638
+ - Cumulative 39/87 feature flags enabled
639
+
640
+ ## [1.0.4] - 2026-04-02
641
+
642
+ ### New Features
643
+
644
+ - **ULTRAPLAN** — `/ultraplan` structured multi-step planning command
645
+ - **VERIFICATION_AGENT** — auto-spawns verification Agent after batch task completion
646
+ - **AUTO_THEME** — auto-switches dark/light theme by querying terminal background color via OSC 11
647
+ - **AGENT_MEMORY_SNAPSHOT** — Agent memory snapshots
648
+ - **FILE_PERSISTENCE** — file persistence tracking
649
+ - **POWERSHELL_AUTO_MODE** — PowerShell auto mode
650
+ - **HARD_FAIL** — strict error mode
651
+ - **SLOW_OPERATION_LOGGING** — slow operation logging
652
+ - **UNATTENDED_RETRY** — unattended retry
653
+ - **ALLOW_TEST_VERSIONS** — allow test versions
654
+
655
+ ### Infrastructure
656
+
657
+ - Added `src/utils/systemThemeWatcher.ts` OSC 11 terminal theme detection and real-time monitoring
658
+ - Cumulative 33/87 feature flags enabled
659
+
660
+ ## [1.0.3] - 2026-04-02
661
+
662
+ ### New Features
663
+
664
+ - **COMMIT_ATTRIBUTION** — tracks Claude's contribution ratio per commit, PR description auto-appends attribution trailer
665
+ - **AWAY_SUMMARY** — displays summary of what happened while user was away
666
+ - **COMPACTION_REMINDERS** — efficiency reminders during context compaction
667
+ - **HOOK_PROMPTS** — allows hooks to request user input
668
+ - **BASH_CLASSIFIER** — shell command safety classifier
669
+ - **EXTRACT_MEMORIES** — auto-extracts persistent memories from conversations
670
+ - **SHOT_STATS** — session statistics panel
671
+ - **PROMPT_CACHE_BREAK_DETECTION** — detects prompt cache invalidation
672
+ - **ULTRATHINK** — deep thinking mode
673
+ - **MCP_RICH_OUTPUT** — MCP tool rich text output
674
+ - **CONNECTOR_TEXT** connector text enhancement
675
+ - **NATIVE_CLIPBOARD_IMAGE** — native clipboard image support
676
+ - **NEW_INIT** improved project initialization flow
677
+ - **DUMP_SYSTEM_PROMPT** — debug system prompt export
678
+ - **BREAK_CACHE_COMMAND** — `/break-cache` command
679
+ - **BUILTIN_EXPLORE_PLAN_AGENTS** — built-in Explore/Plan Agents
680
+
681
+ ### Infrastructure
682
+
683
+ - Added `src/utils/attributionHooks.ts`, `attributionTrailer.ts`, `postCommitAttribution.ts` three attribution modules
684
+
685
+ ## [1.0.2] - 2026-04-02
686
+
687
+ ### New Features
688
+
689
+ - **QUICK_SEARCH** — `Ctrl+P` quick file open in fullscreen mode, `Ctrl+Shift+F` global symbol/content search
690
+ - **MESSAGE_ACTIONS** — copy, edit, retry and other actions on messages in fullscreen mode
691
+ - **FORK_SUBAGENT** — `/fork <directive>` session fork, child Agent inherits full conversation context and executes tasks in parallel
692
+ - **HISTORY_PICKER** — `Ctrl+R` opens history search dialog, replacing the previous inline search
693
+
694
+ ### Infrastructure
695
+
696
+ - Added `src/commands/fork/` command module and `UserForkBoilerplateMessage` UI component
697
+
698
+ ## [1.0.1] - 2026-04-02
699
+
700
+ ### New Features
701
+
702
+ - **BUDDY virtual pet companion** — `/buddy hatch` hatches an exclusive coding pet, 18 species, 5 rarities, random attributes
703
+ - `/buddy hatch` hatch · `/buddy pet` pet · `/buddy stats` stats · `/buddy release` release
704
+ - Pet comments in cute language based on conversation context, supports multilingual auto-switching
705
+ - Re-hatching after release gives a different pet (generation counter)
706
+ - **TOKEN_BUDGET** — use `+500k` or `use 2M tokens` in prompts to set token budget, auto-tracks usage
707
+ - **STREAMLINED_OUTPUT** — environment variable `CLAUDE_CODE_STREAMLINED_OUTPUT=true` enables streamlined output
708
+
709
+ ### Fixes
710
+
711
+ - **Build system feature flags fix** — `scripts/build.ts` now correctly reads `bunfig.toml`'s `[bundle.features]` and passes them to the `Bun.build()` API; previously all `feature()` calls defaulted to `false`
712
+
713
+ ### Infrastructure
714
+
715
+ - Added `scripts/compile.ts` replacing bare `bun build --compile`, ensuring compiled binary correctly applies feature flags
716
+ - Added `src/buddy/companionObserver.ts` context-aware pet reaction system
717
+ - Added `src/commands/buddy/` complete command module
718
+
719
+ ## [1.0.0] - 2026-03-31
720
+
721
+ - Initial release: LegnaCode CLI v1.0.0
722
+ - Built on the Claude Code CLI open-source edition
723
+ - Brand adaptation and customization