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