@ngockhoale/ukit 3.4.85 → 3.5.1

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
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to UKit are documented here.
4
4
 
5
+ ## 3.5.1 - 2026-11-14
6
+
7
+ First release of the memory line (3.5.x). Recall now returns the project's written decisions instead of content-free session stubs. Design and evidence: `docs/research/2026-11-14_memory-system-research.md` (repository only).
8
+
9
+ - **Recall reads `docs/MEMORY.md`.** Each top-level bullet of the files listed in the new `memory.sources` setting (default `['docs/MEMORY.md']`; relative `.md` paths only, at most 8 files of 512 KB) is a read-only recall document cited as `path:line`. Nothing is copied into `records.json`, so the file stays the single source and cannot drift. A missing file contributes nothing.
10
+ - **One ranking engine.** `ukit memory recall`/`search`, the prompt-time lane (`route-task.mjs`), the compact reinjection lane (`reinject-context.mjs`) and `skill-router.sh` previously each had their own scorer; the `skill-router.sh` one read only the v1 store. All four now call one BM25 engine (`src/core/memory/recallEngine.js`, shipped byte-identical as `.claude/ukit/runtime/memory-recall.mjs`): IDF over the eligible set, length normalisation, a score floor, and an explicit empty result when nothing is relevant. Removed: the `created_at / now` term (always about 1), the additive type, evidence and recency bonuses, and the newest-20 cut that ran before scoring in the hook lanes. Curated record types keep a small multiplicative prior, which can reorder matches but never surface a non-match. Ties break on the record id, never on a timestamp, so a re-saved entry does not reorder injected context.
11
+ - **Episodes carry content.** A session episode is now `Task: <prompt, 240 chars>. Wrote: <files>. Verify: ok|fail|not-run via <command>. Unfinished: …`, with the files and command as evidence. A session with no successful write records nothing. Prompt text passes the shared secret redaction before it is stored, and absolute project paths are rewritten to relative ones.
12
+ - **One episode per task, not per session.** When a session moves to a new task, the outgoing task's episode inputs are spooled next to its ledger (`<ledger>.json.episodes`, at most 32 tasks, async and advisory: a spool failure never changes the ledger event). `ukit memory episode` and the idle-ledger backfill record each spooled task once (dedupe key: session + task id). A prompt is attached only to the task it started.
13
+ - **Old stub episodes are archived, not deleted.** `ukit install` moves pre-3.5.1 episodes of the form `Session <id>: writeOk, verify=ok, N receipts, last command …` to `.ukit/storage/memory/v2/episodes-archive.json` after taking a store backup. It is idempotent and never fails the install. `ukit memory archive-episodes [--dry-run|--restore]` runs or reverses it by hand.
14
+ - **Memory telemetry reaches disk.** Short-lived CLI runs queued `retrieval.query` / `memory.retrieved` / `memory.write` events and exited before any flush, and a fresh project had no observability directory to write to; no memory event had ever been recorded. The CLI now flushes pending recorders before exit (2 s bound), and the hook lanes emit one metadata-only `retrieval.query` event per recall (counts, abstention, top score, record refs; never prompt or record text).
15
+ - Measured on a 48-question gold set built from this repository's `docs/MEMORY.md` (`scripts/bench/memory-gold.mjs`, through the real CLI; repository only): answer in the top 3 went from 0/38 to 37/38, and no-answer questions returning nothing from 9/10 to 10/10. A regression test (`tests/bench/memoryGold.test.js`) holds the gate.
16
+ - Engines: Claude Code and omp use all lanes (omp through the Claude runtime bridge). Codex has no UKit hooks, so it gets the new recall through `ukit memory recall`, and its episodes are recorded by the idle-ledger backfill rather than at session end. Codex and omp were not run live for this release; coverage is the shared runtime's tests.
17
+ - Repository only: `CHANGELOG.md` entries 2.7.0–2.8.0 and 3.4.0–3.4.50 (except 3.4.14 and 3.4.22) moved verbatim to `docs/archive/` to keep the package inside its size budget (limits unchanged). The memory module inventory moved to `docs/design/memory-io-inventory.md`.
18
+
5
19
  ## 3.4.85 - 2026-11-14
6
20
 
7
21
  - Release gate (repository only): **the publish guard no longer has an owner-authorization prerequisite.** Since 3.4.72 `npm publish` also required a fresh owner chat message naming the exact version, so finished, verified and reviewed work stopped to ask for a sentence. The project owner did not want that step: a release is a new version number for users to check. The per-version message check and the standing-grant form added in 3.4.84 are both removed; a receipt needs no `authorization` block and a leftover one is ignored. Still mandatory: an official `release:verify` PASS on the exact candidate (unchanged), and an independent review whose final verdict is exactly APPROVED, derived from a native reviewer session. One review rule replaces a side effect of the removed step: the owner-session comparison was also what kept the reviewer apart from the working session, so the cited review message must now come from a separate reviewer agent's own transcript (`<session>/subagents/agent-<id>.jsonl`); a message from a main session is refused. `PROJECT_IMPORTANT.md` §4.4 now records the rule (finished work ships without asking; the two quality gates stay).
@@ -298,261 +312,6 @@ Completion-gate fixes from a field-telemetry audit of the projects running UKit
298
312
  - Review-panel aggregation: FAIL/NOT_RUN dominate, underscore verdict aliases normalized, executable N/A becomes NOT_RUN; explicit product / integration-evidence / status-only review kinds. Handoff commands carry retry-fingerprint and pending-review continuity rules.
299
313
  - Audit: `docs/analysis/HANDOFF-INTENT-DISPATCH-AUDIT.md`. Historical CKit wrapper/contract origin remains unknown; verified offline on macOS/Node 22 only; no live host proof, no CI dispatch.
300
314
 
301
- ## 3.4.50 - 2026-10-21
302
-
303
- **Verification exit-proof integrity (long-run OMP field audit).**
304
- - Fix execution-ledger false PASS receipts: a bare `pipefail`/`PIPESTATUS` word (e.g. `echo pipefail`) no longer exempts a masked pipe; only real `set -o pipefail` before the pipe or an immediate `exit ${PIPESTATUS[n]}` with the correct index proves the runner status.
305
- - A runner followed by `|| …`, backgrounded with `&`, inside a `for`/`while`/`case` flow, behind `bash -c` hiding a masked pipe, or followed by `exit 0`/`true`/`:`/leading `!` is recorded as `exitStatusUnproven` (not passing). Claude `tool_response.interrupted:true` now counts as failure.
306
- - Bare runners, `cd repo; runner`, `&&` chains, real pipefail and terminal subshell/group runners stay accepted. Sequential consumers (including `; echo "exit=$?"`) and `if runner; then echo ok; fi` no longer receive PASS credit: recognizing a runner attempt does not prove its exit. Loop keywords as runner arguments (`vitest -t case`) are not loops.
307
- - Audit report: `UKIT_LONG_RUN_ORCHESTRATION_AUDIT.md`. Verified locally on macOS/Node 22 only; OMP live host-ordering attribution remains UNVERIFIED. No CI dispatch.
308
-
309
- ## 3.4.49 - 2026-10-19
310
-
311
- **Conditional consumer verification intent closure.**
312
- - Fix a live Completion Gate false write obligation: a verification request ("Mục tiêu: xác nhận …") whose source repair/release steps apply only if a defect is found, plus a disposable test-project setup, was classified CODE_IMPLEMENTATION and demanded write-evidence even after a real `npm test` exit 0. The classifier now recognizes a declared verification goal with a narrowly structured conditional repair branch and `xác nhận` as a verify lead; unconditional trailing orders, quoted goals and non-repair conditionals still block.
313
- - Safety preserved: when the conditional repair branch is actually taken (an owned in-project substantive source write), the evaluator re-activates the release-publication demand; explicit publish prohibitions dominate. Classifier copies (src, resolver, hook) are pinned by a mirror parity test.
314
- - Reproduced through the npm 3.4.48 consumer router/record/Stop lifecycle with real native exits; no receipt fabrication, task reassignment or ledger reset. Direct `node --test` recognition is unchanged. Verified on macOS/Node 22 only; OMP live attribution UNVERIFIED; no paid OMP smoke or CI dispatch.
315
-
316
- ## 3.4.48 - 2026-10-19
317
-
318
- **Completion evidence closure and reproducible multi-host installation.**
319
- - Recognize standalone `git diff --check` as native Git verification rather than a dry-run mutation. Failed/masked mutations, piped verification, foreign-task evidence and release remote/tag divergence still block.
320
- - Preserve task ownership through host-consumed coordination notices and continuations; bound Stop diagnostics without accepting incomplete work. Explicit no-publication lists and quoted/report-only references do not authorize a release.
321
- - Integrate verified OMP child-session/model-ownership safeguards, delegation runtime, installer defaults migration, runtime package dependencies and reproducible scaffolds.
322
- - Verified locally on macOS/Node 22. Claude/Codex/OMP asset installation is covered; OMP Full Playbook live correctness and trusted worker/dispatch attribution remain UNVERIFIED. No paid OMP smoke or cross-platform live PASS is claimed.
323
-
324
- ## 3.4.47 - 2026-10-18
325
-
326
- **Supervisor subagent usage attribution and rendered-instruction parity checks.**
327
- - Record subagent usage at the supervisor's terminal completion/cancellation boundary, using typed operation metadata and existing exactly-once guards. Provider-authenticated usage remains blocked; host transcript values are not relabeled as provider data.
328
- - Add read-only `render-instructions.mjs --parity` to byte-compare rendered root instructions with existing root files, including fixture-target support and drift diagnostics.
329
- - Add manual-only `/ukit:ci-check` cross-platform CI tooling; it remains opt-in and never pushes, merges, or publishes.
330
- - Locally verified on macOS/Node 22. Q-C98-1 and Q-C98-3 remain blocked on provider-authenticated data/privacy approval; no provider identity/pricing/cache model is claimed.
331
- ## 3.4.46 - 2026-10-18
332
-
333
- **Completion contract P0: forensic intent, attributable release evidence and conditional NO-GO.**
334
- - Correct negated/quoted forensic requests and Vietnamese status questions; explicit report artifacts require owned writes and nonempty output. External scratch writes do not count as product changes.
335
- - Conditional release contracts with a named `release:verify` preflight accept only current-task attributable native failure as terminal `RELEASE_NO_GO`, never publication success. Missing implementation writes still block; passing preflight retains publication obligations. Masked commands and stale receipts remain unproven.
336
- - Accept standalone `npm view <package> version --prefer-online` evidence without republishing; improve task/obligation diagnostics. OMP artifact checks use the installed project cwd.
337
- - Exclude only repository coverage/transcript audit scripts from npm; retain runtime and customer assets and the strict artifact budget.
338
- - Verified locally on macOS/Node 22 with real isolated OMP child-hook chains; no provider calls or GitHub Actions dispatch. Historical release ledger replay remains partial; OMP mid-task freeze remains open. UNIC Decision stays unchanged/off.
339
-
340
- ## 3.4.45 - 2026-10-17
341
-
342
- **P1 correctness repair: implementation prompts, release identity, large-transcript intent, continuation ownership.**
343
- - Implementation prompts ("fix/apply ...", Vietnamese "van sua" defer-strip) are no longer misread as READ_ONLY; negation scope is bounded and covered by a classification matrix built from a real prompt fixture.
344
- - Completion Gate release identity is decided by tag + shipped-file state, not HEAD==tag alone: a docs-only HEAD ahead of the tag passes; uncommitted/untracked shipped files, or a missing tag in a tagging repo, still require `release-publication`.
345
- - Transcripts above 32 MiB use one shared incremental intent scan (project-local cache under `.ukit/storage/cache/handoff-intent`, never written into `template_project`), wired into the Claude guard, OMP bridge and Stop coordinator. The first inconclusive call is a visible advisory, never a silent allow; append, truncation, rotation and corrupt/forged cache never create false authorization. Bounded-scan limits are unchanged.
346
- - Continuation phrases ("tiếp tục", "continue", "go on", ...) inherit only the active task instance's contract; completed, blocked, read-only and cross-session tasks do not leak authority or evidence.
347
- - Known limits: live OMP and Windows/Linux not exercised; verified on macOS/Node 22.
348
-
349
- ## 3.4.44 - 2026-10-14
350
-
351
- **Completion Gate scope and permission-choice preservation.**
352
- - Publish refusals in Vietnamese, including accented/uppercase `chưa`, `không` and `ĐỪNG`, no longer create publication obligations. Real publication requests still require registry evidence and release-tag consistency.
353
- - Conditional cron cancellation verifies the requested absence using a fresh native observation without inventing successful deletion. Existing in-flight contracts reconcile only the same conditional absence goal; mixed code tasks retain write/verification requirements.
354
- - Blockers are task-scoped in Stop and unfinished-work detection. Current blockers end explicitly BLOCKED, never COMPLETE; previous-task blockers cannot discharge new-task verification.
355
- - Preserve the established bypass startup template and explicit user permission choices. Instructions distinguish UKit workflow PLAN from host permission mode; these are preventive boundaries, not a runtime mode lock.
356
- - **The reported Claude Code extension spontaneous permission-mode switch remains OPEN and is not claimed fixed.** The two VS Code User startup settings configured on the owner's machine are local settings, not distributed by this npm package.
357
- - Includes the previously unreleased manual-only `/ukit:ci-check` tooling above; this release does not dispatch GitHub Actions.
358
-
359
- ## 3.4.43 - 2026-10-13
360
-
361
- **Completion Gate: an ordered `git tag` is discharged by the tag itself, so the live release Stop is accepted.**
362
- - Live root cause (3.4.42 still blocked this session): the prompt ordered a tag, so the git-integrity goal required target `tag`. A real tag created inside a compound command (`... && git tag ...; echo $?`) is a masked mutation and records as failed, and the independent remote-parity recovery only accepted `commit`/`push` targets, so `operation-verification` stayed missing although the tag, remote and registry were all correct.
363
- - Fix: the gate-time git authority also lists the tags that dereference to live HEAD (`git tag --points-at HEAD`, peels annotated tags). When `tag` is a required target, a tag at HEAD plus the existing remote-parity proof (remote sha == HEAD on the tracking remote, clean tree, observed after every mutation attempt) recovers it. No tag at HEAD, a diverged remote, a dirty tree or a later mutation still blocks.
364
- - Regressions in `tests/hooks/stopHookRelease.test.js`: masked tag with an annotated tag at HEAD -> ACCEPT (fails without the fix); no tag at HEAD -> BLOCK.
365
-
366
- ## 3.4.42 - 2026-10-13
367
-
368
- **Completion Gate: `cd <repo>; <command>` is a checked command, so a finished release is recognized by the live Stop hook.**
369
- - Live root cause (3.4.40/3.4.41 still blocked): agents run every Bash call as `cd <repo>; <cmd>`. The receipt classifier treated that `;` as shell masking, so `npm view`, `git ls-remote` and `git status --porcelain` minted no release/remote/clean-tree proof and Stop kept reporting `operation-verification, release-publication`. The runtime mirrors were byte-identical to the template; the evaluator was correct, the receipts never existed.
370
- - Fix (`cron-operation-adapter.mjs`): exactly one leading `cd <dir>` followed by `;`/`&&` is dropped before classification (it prints nothing; the exit status is the next command's). Any other `;`, `||`, pipe, `echo $?` or second `cd` still masks, mints no proof, and cannot produce a false ACCEPT. A masked `npm publish > log; echo $?` still mints no publish receipt; release completion never required one: registry view == package.json version plus a tag that dereferences to HEAD plus live remote parity is the proof, so an immutable version is never republished to manufacture a receipt.
371
- - Regressions: `tests/hooks/stopHookRelease.test.js` drives the real router, record and Stop hooks (bare, `cd ;`, `cd &&`; BLOCK then ACCEPT; wrong version, remote divergence, wrong tag, dirty tree, masked compounds, other session, runtime/template parity) and the adapter command shapes. Against the 3.4.41 adapter five of them fail.
372
-
373
- ## 3.4.41 - 2026-10-13
374
-
375
- **Completion Gate: a published release is recognized, and tests no longer depend on the developer's real `~/.ukit`.**
376
- - Root cause (release false block): the git-state `status` observation overwrote the standalone `git ls-remote` remote-parity proof stored under the same operation-bank key, so a verified release (registry, tag, remote, clean tree) still reported `operation-verification, release-publication` missing.
377
- - Fix (`operation-evidence.mjs`): a later successful, complete git-state observation carries forward a still-valid remote-sync proof only when it was observed after every mutation attempt; the proof is judged against live HEAD/branch/tracking remote, so a diverged remote, wrong branch, other repo, dirty tree or later failed push still blocks.
378
- - Verification integrity: the hook-spawning completion tests inherited the real user playbook directory when run inside the full suite (a bug-fix playbook then demanded repro receipts) and failed only there. They now run the hooks with an empty HOME.
379
- - `integrationP1`: the external Laya offline harness is stale against its own server (NameError). That is reported as a loud per-test SKIPPED naming the cause instead of failing; it is not a UKit Completion Gate criterion. No `UKIT_LAYA_ROOT` bypass is used.
380
- - Regressions: `tests/hooks/releaseCompletionEvidence.test.js` (R01–R08, R11, R13), extended `completionGateRequestScope.test.js` (R09, R10).
381
-
382
- ## 3.4.40 - 2026-10-12
383
-
384
- **Completion Gate: a read-only request no longer owes `impact-evidence` it can never produce.**
385
- - Root cause: a `READ_ONLY` contract (analysis of Markdown/logs/prompt text, read-only production inspection) carried `impact-evidence`, satisfied only by a source-read receipt. Answers drawn from docs, logs or text already in the prompt yield none, so Stop demanded further tool activity and looped into the loop breaker.
386
- - Fix: for `READ_ONLY` with no named target files and no attempted write, `impact-evidence` is not applicable. A named target still needs its read; any attempted write (unauthorized side effect) keeps the obligation; mutation orders keep write/verification/operation proof.
387
- - Regressions: `tests/hooks/completionGateRequestScope.test.js` (cross-request scope after an edit request, read-only inspection, missing contract, unauthorized write). Test allowlist gains the runtime-only `docs/AI_HANDOFF/RUN.md` cursor reference.
388
-
389
- ## 3.4.39 - 2026-10-12
390
-
391
- **Completion Gate: unrelated compound commands no longer erase authoritative git evidence; seals honour operation freshness.**
392
- - Root cause: a compound command such as `git rev-parse HEAD && git status --porcelain && npm view …` was parsed as a whole-tree `git status`, its mixed stdout read as a dirty tree, and that failed state record replaced the earlier valid `git ls-remote` proof (`missing operation-verification`).
393
- - Fix: a git state observation is only minted from ONE unmasked, transport-successful command; compound/masked/failed ones mint nothing and cannot overwrite proof. A standalone dirty status or a diverged remote still invalidates earlier success.
394
- - Seals now record the operation sequence: a later git mutation, failed state observation, or remote sha != HEAD voids the seal (previously only content fingerprint did).
395
- - Regressions: `completionClosure.test.js` (full 7-step sequence through the real hook chain), `gitSyncPostcondition.test.js`. No real Windows run.
396
-
397
- ## 3.4.38 - 2026-10-12
398
-
399
- **Completion Gate safety closure: mutation orders always get a contract; git sync needs authoritative remote proof.**
400
- - Issue 1 root cause: `isInformationalPrompt`'s consult-shape (a stray "Should I …?" / "…hay không" / "có phải") overrode a surviving imperative, so a real mutation order routed `informational` with no completion contract and Stop released with a non-blocking "nothing was verified" notice. Fix (router + `route-task.mjs` parity): a consult shape never demotes a prompt that still has a mutation order. Pure consults ("Should I fix X?") stay informational and never demand write evidence.
401
- - Issue 2: the 3.4.37 `git status -sb` `synced-state` proof read a local tracking ref (stale-able) and is removed. A masked commit/push is now discharged only by a standalone, unmasked `git ls-remote <remote> refs/heads/<branch>` observed after every mutation attempt whose sha equals live HEAD, on the branch's own tracking remote, with a clean worktree (gate-time `gitAuthority`). Remote behind, stale tracking ref, uncommitted changes, wrong remote/branch, forged/piped/failed output, other task/session: BLOCK.
402
- - Regressions through the real hook chain: `tests/hooks/completionClosure.test.js`; unit: `gitSyncPostcondition.test.js`. No real Windows run.
403
-
404
- ## 3.4.37 - 2026-10-12
405
-
406
- **Completion Gate: a clean, in-sync branch observation discharges a masked commit+push.**
407
- - Root cause: commit/push run inside a heredoc/`;`/pipe chain correctly mint an exit-unproven (failed) mutation receipt, and no later independent observation could ever discharge the `git-integrity` goal, so a finished, published release kept blocking Stop with `operation-verification`.
408
- - Fix: a standalone whole-tree `git status -sb` that prints exactly one `## branch...upstream` line (clean, no ahead/behind/gone) after every recorded git mutation attempt is a trusted `synced-state` proof for commit/push goals. Piped/failed/dirty/ahead/behind/no-upstream/earlier/other-task observations never count.
409
- - Regression: `tests/hooks/gitSyncPostcondition.test.js` (RED on 3.4.36). No real Windows run.
410
-
411
- ## 3.4.36 - 2026-10-12
412
-
413
- **Completion Gate: a finished task (incl. a release) stays finished across wakeups, compaction and repeated Stops.**
414
- - Harness-injected turns (`/loop` wakeup: transcript `isMeta` + `turnOrigin: scheduled`/`promptSource: system`; compaction "session is being continued") now resume the SAME task instance and keep its contract. Previously each minted a new task id, blanked the ledger and re-derived a MIXED git-integrity contract from the wakeup's wording, re-demanding write + verification + operation evidence from read-only post-release checks. A human prompt or an unmarked lookalike is still a fresh task.
415
- - Sealed completion: a Stop that evaluates COMPLETE from trusted receipts seals the task with the verified content fingerprint; later Stops of the same task are accepted until the content really changes. Seals are task- and session-scoped (no leakage to new tasks/sessions).
416
- - Verdict currency also compares a content fingerprint, so committing/pushing already-verified work no longer stales the test verdict (HEAD moved, content identical).
417
- - Release postcondition: a prompt ordering `npm publish` is complete only with trusted receipts (real unmasked `npm publish`, `npm view <pkg> version` printing package.json's version) and, if a release tag exists, its dereferenced commit equal to HEAD (never the annotated tag-object SHA). Unpublished/failed/fake claims keep blocking.
418
- - Wakeup ownership: repeated wakeups are issued by the Claude Code harness (`ScheduleWakeup`), not UKit (no scheduler in UKit). UKit neutralizes their effect and EXEC-04 now says never to schedule a wakeup after terminal completion. Real Windows runtime validation was not performed.
419
-
420
- ## 3.4.35 - 2026-10-12
421
-
422
- **Windows: `ukit update` no longer fails preflight with `npm is not runnable (spawnSync npm ENOENT)`.**
423
- - Root cause: `update.js` (`npm root -g`, `npm install -g`) and `updateSafety.js` (`npm --version` preflight) called `spawnSync('npm', …)`. On Windows npm is `npm.cmd`, so a bare name fails with ENOENT even though npm works in PowerShell (and spawning a `.cmd` directly fails with EINVAL on Node >= 18.20/20.12/22, including 24).
424
- - Fix: new `src/core/npmCommand.js` — on win32 npm runs through `%ComSpec% /d /s /c` (PATH/PATHEXT resolution, custom locations, paths with spaces); POSIX behavior is unchanged (direct spawn, no shell). Arguments are allowlisted so nothing cmd.exe treats specially can reach the command line. The preflight message now includes npm's first stderr line.
425
- - Validation limit: no real Windows host was available; the cmd.exe path is covered by exact-invocation tests plus a POSIX stand-in for cmd.exe, which proves the spawn/exit-code/timeout/PATH plumbing, not real Windows behavior.
426
-
427
- ## 3.4.34 - 2026-10-12
428
-
429
- **Hook interference fixes (P1): task intent, operation evidence, heredoc data, containment reporting.**
430
- - **Task intent.** Forensic, negated or deferred wording ("fix", "implement") is no longer read as a mutation order; `mutationOrder` is kept across tool events and "continue". Read-only and forensic tasks release at Stop without Edit/Write.
431
- - **Operation evidence.** Git push/clean and service restart + probe complete on matching operation receipts (whole-tree git state after the mutation, matching target/probe path/status, session- and task-scoped); dry-run, stale, failed, masked-exit and cross-task receipts are ignored. Mixed implementation + deploy keeps write evidence.
432
- - **Dangerous Command Guard.** A quoted heredoc fed to a plain text tool behind `cd x;` / `cd x &&` is data; interpreters, unquoted delimiters, substitution and pipe-to-shell stay blocked.
433
- - **Safe Patch.** `post-edit-verify` reports an out-of-project target as a scope refusal (still non-zero, never read) instead of a hook crash.
434
- - Project `.omp/config.yml` now carries the per-agent `task.agentCompactionThresholdOverrides` block that `ukit install` already generates, so a clean worktree install no longer modifies a tracked file.
435
-
436
- ## 3.4.33 - 2026-10-11
437
-
438
- **OMP token optimization, adaptive task decomposition and Completion Gate reliability.** Verified with the full suite and `yarn release:verify`.
439
- - **OMP project compaction.** Project `.omp/config.yml` defaults `compaction.thresholdTokens` to 90K; legacy 350K values migrate; install/update merge safely, preserve user overrides and per-agent compaction thresholds; uninstall is ownership-aware. Global OMP config is never touched (OMP 18.8.9 compatible).
440
- - **Adaptive task decomposition.** Context budget policy, cost-aware decomposition, runtime plan dispatch enforcement for tagged subtasks, dependency handling, resume/progress preservation and parent acceptance criteria; no redundant replanning.
441
- - **Completion Gate.** Status/result lookups are classified READ_ONLY (no fake write/verification evidence); coding tasks still require write and verification evidence. Contracts are bound to task, session and source snapshot; a read-only or answer-only reroute parks the running implementation contract and a continuation restores it; new task ids never inherit old evidence.
442
-
443
- ## 3.4.32 - 2026-10-11
444
-
445
- **UNIC-Decision integration P1: safety floors, ordinal score contract, request caps.** Verified with the full suite (566 files) and `yarn release:verify`; no live inference was run (offline fixtures plus an offline run of the Laya server translator).
446
- - **Sidecar is deterministic-only.** The six `workflow.*` sidecar decisions always return the deterministic answer at every stage; no adapter call is made. `modelAnswer`/`agreement` are no longer emitted; `--fixture`, `--list` and the result schema keys are unchanged.
447
- - **Escalation floors.** Fix-loop escalation never lowers verification depth (depth = max(deterministic floor, model), order `none<runnable<review-round<escalate`), never swaps the lane, and never applies model output at `shadow`. Fixed in both the template and the live `src/index/fixLoopEscalation.js`.
448
- - **Review safety floor.** The verdict floor always runs over all findings: critical → `CHANGES-REQUESTED`; important/unknown → at least `APPROVED-WITH-MINOR`; `Act on` buckets cannot be downgraded; `shadow` keeps the deterministic verdict.
449
- - **Score contract.** Ordinal `score` questions are sent as a string enum of ordered labels (rubric in the function description) and decoded as `indexOf(label)+1`; numeric answers are rejected. Wire format of `route.rigor.v1`/`preflight.rigor.v1` is now labels (`r0`..`r4`); parsed values stay integer 1..N.
450
- - **Request caps.** `decisionPlane.maxBatchQuestions` (default 8) and `maxEnumLabels` (default 11) are enforced before transport (`unsupported`, deterministic fallback); duplicate question keys are `invalid`. Route shadow and review use partial coverage in ONE batch: skipped decisions are reported (`coverage`, `skippedDecisions`, `outcomeClass: partial`) and keep deterministic results; no request splitting.
451
- - Limits: oversize requests outside route shadow/review fall back deterministically; escalation lane model answers are never applied; the server-side `unic-decision` model alias is unchanged. Details: `docs/UNIC-DECISION-INTEGRATION-P1-FIX.md`.
452
-
453
- ## 3.4.31 - 2026-10-11
454
-
455
- **Completion Gate: task-aware operational completion (fixes the CronDelete/CronList false positive).** Verified with the full suite (`yarn test`, 566 files) plus focused six-scenario routing → recorder → Stop regressions.
456
- - **Task kinds.** CODE_IMPLEMENTATION / OPERATIONAL / READ_ONLY / CONFIGURATION / MIXED are classified independently of write activity. Implementation still requires a source write plus risk-based verification; mixed tasks keep both obligations.
457
- - **Operational evidence.** New bounded, tool-agnostic proof bank (`operation-evidence.mjs`) and strict native-result normalization (`cron-operation-adapter.mjs`): completion needs an accepted execution, matching target/scope, a fresh verified postcondition and active-task evidence. Unsupported result shapes fail closed.
458
- - **Task-instance isolation.** Each request gets its own task identity; identical repeated requests are distinct tasks, while continue/resume keeps identity. Evidence and journals from an earlier task cannot satisfy a new one.
459
- - **Receipt retention / replay protection.** Failed operations survive receipt eviction; native tool-use IDs are tracked (bounded, fail-closed on saturation) so an overwritten observation cannot replay as fresh proof.
460
- - **Claude Code / OMP.** The Claude recorder and settings matchers cover `CronDelete`/`CronList` success and failure events; the OMP bridge normalizes `cron_delete`/`cron_list` results. Codex uses the shared policy helper (no native Stop enforcement claimed).
461
- - **Negation-aware classification.** "Xóa cron …, không thay đổi code, Git hoặc Docker" / "Delete cron …. Do not modify source code, Git or Docker." classify as OPERATIONAL; negated source instructions no longer become source requirements.
462
- - **No-route mutation.** A prompt that ordered a change but matched no skill (no routed contract) now ends with an explicit "nothing was verified" notice instead of a silent stop. This is a notice, not a block — a known limitation.
463
- - Loop-breaker release note no longer claims no verification ran; docs retry-guidance wording aligned in the template instructions.
464
- - Limits: classifier is lexical; the Cron adapter does not support an "ensure presence" goal (fails closed); no live native end-to-end run was performed.
465
-
466
- ## 3.4.30 - 2026-10-10
467
-
468
- **Orchestration: routing, goal/cycle continuation, task ownership, discovery, landing.** Verified with `yarn test:handoff` (184/184) and `yarn release:verify`; live Claude Code two-cycle run-all and the Claude create-only permission denial were exercised on disposable fixtures. Known limits: OMP permission denial is verified through the hook bridge only, and Codex has no pre-tool hook for ownership enforcement. No performance gain is claimed beyond removing the identified redundant Stop-denial / archive-repair round.
469
- - **Stop-gate evidence capture (P0).** `isVerificationCommand`/`TEST_RUNNER_COMMAND` now accept subshell/group openers, so `(yarn test; echo "exit $?" >> log)` mints a receipt (it previously minted none → endless `missing verification-evidence`). `verdictHistory` retention never evicts the last satisfying PASS; a pipe-masked run is reported as "exit status unproven" instead of "fix the failure". Pipe-masked status is still rejected. Tests: `tests/hooks/stopGateReceiptCapture.test.js`.
470
- - **F3 ↔ ExitPredicate.** `index:all-done` on a header-only INDEX now reads `archive/cycle-NN/TASK-*.md`; `run-all` additionally requires no pending queued blueprints. Finalizing a cycle never implies run-all completion. Test: `tests/handoff/f3FinalizationPredicate.test.mjs`.
471
- - **Archive/Goal completion invariant.** F3 now runs `resumable-run.mjs archive-cycle <root> <NN>` before the INDEX reset: the verified INDEX rows are persisted to `archive/cycle-NN/INDEX.md` and terminal statuses stamped into archived task headers; `index:all-done` reads that snapshot (header only for legacy archives, missing row fails closed, rows immutable per cycle). Removes the stale-`ready` repair round. Receipt detection ignores quoted literals and sees `bash -c '<runner>'`. Tests: `archiveCompletionInvariant.test.mjs` (AR-01…15).
472
- - **Main-agent task ownership.** During implement phases the main agent must hold a claim (`main:<session>` owner) via the existing registry; new CLI `resumable-run.mjs claim|release <root> <TASK-ID> --owner <owner>`.
473
- - **Routing.** Deterministic greeting fast-path; Vietnamese edit verbs; REFERENCE / CLONE / SQL / REUSE / RUN-ALL signals stamped in the route summary; negated and plan-only prompts never imply implementation; "run all the tests" is a test run, "chạy hết pending tasks" is goal-level run-all; "use <symbol> from Core" stamps reuse-first. Explicit handoff commands keep authority over inferred intent.
474
- - **Goal vs cycle.** `deriveGoalStatus`; default exit predicate `all(index:all-done)`; quota pause marks `Paused: yes` (structured error records only); a finalized cycle (done cursor + header-only INDEX) releases once.
475
- - **Task ownership.** Per-task claims with task identity, lease renewal, owner fencing and takeover; wired through the Claude Code and OMP delegation hooks; per-session route-state sidecars fix a cross-session collision. The main agent takes part in the same registry (see above).
476
- - **Discovery.** Index schema 9: fuzzy symbol candidates (never auto-substituted), global and SQL symbols, caller proof with `unverifiedImpact`, bounded fallback search that reports truncation instead of posing as exhaustive.
477
- - **Reuse/reference/clone/SQL advisory.** `skill-router.sh` now emits one short source-resolution line for reuse-first, reference/clone and SQL prompts (including the previously silent no-route exit): resolve the named symbol with `query-index.mjs --symbol`, never invent a module, leave the reference untouched, alias vs real column. Found by a live OMP run that invented `import … from 'Core'`. `REFERENCE_TARGET_RE` also accepts "like the reviewed Customer dropdown".
478
- - **`handoff-fullstack` F3.** Archive step now snapshots verified INDEX rows (`archive-cycle`) so a finished cycle never needs a post-`done` repair round; the final verification for `verify:pass` runs in-session (the receipt is per-session).
479
- - **Playbook observability.** `ledger.playbookTrace`, `--playbook-status`.
480
- - **Fixes.** `land-worktree` / `cleanup-task-worktree` accepted only `TASK-C97-NNN`, so every ordinary handoff task (`TASK-001`) was blocked at landing; they now accept `TASK-NNN` and `TASK-<cycle>-NNN` (still no separators or whitespace). `block-dangerous` no longer blocks a quoted-delimiter heredoc whose body merely documents a dangerous command; real commands, unquoted heredocs and heredocs piped to a shell stay denied. `handoff-fullstack` P3 no longer blocks the run when the lite commit agent has no shell. `handoff-create` headless rule.
481
-
482
- ## 3.4.29 - 2026-10-09
483
-
484
- **Fixes (no new features).**
485
- - `ukit install` inside the UKit source repo no longer overwrites the hand-curated root `CLAUDE.md` / `AGENTS.md` (repo-only Release Policy was lost). Self-install now seeds but never overwrites them, like `docs/`; downstream projects still get them refreshed. Regression: `tests/core/buildPlan.test.js`.
486
- - `ukit status` no longer reads the ambient project's `context-capacity.json` (CLAUDE_PROJECT_DIR/cwd); the capacity record is scoped to the reported project root, so `statusCommand.test.js` passes with or without a live runtime cache.
487
- - Completion gate: `yarn release:verify; echo "exit=$?"` (and `&&`/`|` variants without a space) is now recognised as a verification command, so the green run records `verification-evidence`. Failed runs still record as failed. Regression: `tests/hooks/executionLedgerReleaseVerify.test.js`.
488
-
489
- ## 3.4.28 - 2026-10-09
490
-
491
- **Release-safety close-out: config preservation, safe `ukit update`, OMP eval/Bash hardening (local RC; not yet published).**
492
- - **U1 `.claude/settings.json` ownership merge.** User `model`, `permissions.allow|deny|ask`, `permissions.defaultMode`, user environment entries, `statusLine`, plugins and unknown keys survive install/update. UKit-owned: `hooks` (safety wiring) and the template's own environment keys. Permission lists are a union (template entries always present). Behaviour change: user-added top-level keys no longer count as drift.
493
- - **U2 `.ukit/storage/config.json` ownership merge** (`src/core/runtimeConfigMerge.js`). User values (model routing, `autonomy`, `orchestration.permissionMode`, thresholds, unknown keys) win; new template keys are filled; `version`/`agent`/`_help` follow the release. The opt-in `orchestration.allowUnsafeEval` is reset to `false` on every upgrade and reported. A merge that would produce an invalid config leaves the file untouched; a corrupt file is replaced (timestamped backup first).
494
- - **F5 safe `ukit update`.** Preflight (npm runnable, install metadata readable, project writable), project snapshot with sha256 manifest before `npm install -g`, automatic restore + hash verification when the project refresh fails. The global package is **never** rolled back automatically: the output says so and prints `npm install -g @ngockhoale/ukit@<previous>`. Last 3 snapshots kept under `.claude/ukit/.ukit/update-snapshots/`.
495
- - **F1 OMP `eval` payload** (`{language, code}`) is now seen by the Bash guard chain (was an empty command).
496
- - **F2 OMP `eval` default-deny** in the bridge itself (independent of `.omp/config.yml`): allowed only with `orchestration.allowUnsafeEval=true`. The guard is best-effort for eval; threat model in `docs/release/MULTI-ENGINE-RELEASE-GATE.md`.
497
- - **F4 OMP Bash/eval fail closed** on hook-runner transport failure (no verdict = no execution). Read/Grep/Glob stay fail-open. User escape hatch: `UKIT_OMP_BASH_FAIL_OPEN=1`. The Stop lane is unaffected (no Stop loop).
498
- - Known limits: OMP tools `task`, MCP, `browser`, `user_bash`, `user_python` have no UKit guard chain; the Read/Grep secret guard is advisory on a runner outage.
499
-
500
- ## 3.4.27 - 2026-10-09
501
-
502
- **Stop-gate evidence loop hardening and linked-worktree isolation (follow-up to 3.4.26).**
503
- - `execution-ledger`: `yarn`/`npm`/`pnpm release:verify` is recorded as a verification receipt. A verification command piped through `| tail`/`| grep` no longer journals as a pass unless `pipefail`/`PIPESTATUS` proves the real exit status. Verification verdicts are scoped to the checkout they ran in, and path-qualified runners are recognised; Bash work in sibling worktrees is attributed to the right checkout.
504
- - `stop-coordinator` / `handoff-resume`: the Stop/SessionStart handoff cursor is scoped to the git-verified linked worktree, so a run in one worktree no longer blocks or resumes another.
505
- - `safe-patch` / `pre-edit-backup`: Edit/Write targets inside git-listed linked worktrees of the same repo are accepted; backups are isolated per worktree even when two worktrees share one relative path.
506
- - `hook-chain-runner --emit-verdict`: multi-document JSON on stdout from chained hooks is coalesced into one valid document.
507
- - `auto-allow-bash`: a burst of concurrent hooks no longer silently loses allow rules. Dropped rules are journaled and the bounded lock slice is widened. Trade-off: worst-case lock wait under contention rises from ~1.2 s to ~3 s.
508
- - Dev tooling: `scripts/dev/worktree-preflight.mjs` bootstraps the gitignored runtime in a fresh worktree via `ukit install`, re-renders drifted gitignored `CLAUDE.md`/`AGENTS.md`, warns on a symlinked `node_modules`, and bounds its git/render children with explicit timeouts. `manifests/documentation.yaml` declares `WORKLOG_ARCHIVE.md` as `local_only`.
509
- - Test-only: route-audit `tmpDir` cleanup retries so a detached decision-shadow child cannot fail `afterEach` with `ENOTEMPTY`.
510
- - Known limits: 1 of 165 stress iterations of the concurrent auto-allow burst still lost a rule (cause not yet identified). Existing checkouts must re-run `ukit install` to pick up the new runtime.
511
-
512
- ## 3.4.26 - 2026-10-08
513
-
514
- **P1 fix: completion gate no longer reports `missing write-evidence` for tracked-file changes made through Bash.**
515
- - `execution-ledger`: a Bash receipt records a git workspace fingerprint (HEAD + hash of `git diff HEAD`, tracked files only). When it differs from the previous receipt, a synthetic write is applied. First observation, git failure/timeout, non-git directories and untracked files record nothing (fail-closed).
516
- - Strictly read-only Bash (`ls`, `cat`, `git status`, ...) and verification commands absorb the delta into the baseline instead of earning a write, so a background process or subagent edit is not credited to the main agent.
517
- - Evidence tier: a Bash-derived write is `inferred` (`evidenceTier: 'inferred'`, supporting evidence); only Edit/Write is direct. Inferred writes never satisfy `verification-evidence`.
518
- - Known limits: the first Bash of a session only seeds the baseline, so a mutation made by that very command is not credited; a delta that coincides with a non-read-only Bash is still attributed to it (inferred, not proof).
519
- - Regression tests: `tests/hooks/bashMutationEvidence.test.js` (12 cases).
520
- - Not included: AWAITING_USER stop handling (separate bug); `isVerificationCommand` coverage for commands such as `yarn release:verify`.
521
-
522
- ## 3.4.25 - 2026-10-08
523
-
524
- **P0 hotfix: Stop hook no longer force-continues a run the user paused or cancelled.**
525
- - `stop-coordinator`: a genuine user pause/cancel turn ("pause", "cancel", "tạm dừng", "dừng lại", ...) now outranks every Stop lane (completion gate, task watchdog, handoff cursor). The stop is released with a visible note and run state (RUN.md, tasks, branches, worktrees) is left untouched. The signal is read only from real user turns in the host transcript, never from agent text, tool output, sub-agent reports or hook feedback; a later resume turn wins; an unreadable or over-budget scan means "no interruption", so enforcement is never relaxed by a lost read.
526
- - Handoff cursor reentrancy valve: when `stop_hook_active` is set and the same cursor signature repeats, the stop is released once with an advisory instead of waiting for the stalled-block cap. A cursor that moved keeps blocking.
527
- - Regression tests: `tests/hooks/stopHookInterruption.test.js` (15 cases).
528
- - Documentation registry: `docs/analysis/SUBAGENT-COST-AUDIT.md` (C99) is now classified in `manifests/documentation.yaml`; 3.4.24's consistency suite flagged it as an unregistered/orphan doc.
529
- - Not included: no change to evidence/ledger accounting or model routing.
530
-
531
- ## 3.4.24 - 2026-10-08
532
-
533
- **Honest per-category token usage record + report** (C98; capability only — no producer exists yet, so real stores report `no_data`).
534
- - Schema v1.3 (additive): `model.completed`/`model.failed` payloads may now carry `usage_categories` — the five typed `{value, source}` resources `fresh_input_tokens`, `cache_read_tokens`, `cache_write_tokens`, `output_tokens`, `reasoning_tokens`. Absent categories stay `UNKNOWN`/null — never 0, never estimated. The registry stays append-only; old records remain valid.
535
- - `routeAdapter` maps provider-reported categories when a producer supplies `usage.categories`; numeric values are accepted only from `PROVIDER` sources, and the legacy aggregate-token mapping is byte-unchanged.
536
- - New read-only `ukit telemetry usage [--json]`: scans the segment store non-destructively (corrupt segments are skipped and reported, never quarantined by a read), prints a readiness verdict `no_data | aggregate_only | categorized`, per-source totals only (never combined), record counts (not unique runs), and labels `cache.hit/miss` as UKit-internal lookups, not a provider prompt cache. Exit codes: 0 normal, 1 usage error, 2 typed store failure. Creates no files.
537
- - `readSegments(..., {readOnly: true})` new option: default quarantine behavior is byte-for-byte unchanged.
538
- - Privacy: the five category keys + `usage_categories` joined the support-projection allowlist and `REDACTION_VERSION` bumped to `df-redact-7` (existing support bundles invalidate once). Counts and source tags only — never content.
539
- - Not included: a producer that actually records provider token categories (queued Q-C98-1/Q-C98-2 — needs evidence the host exposes usage), any cost/price model or provider identity fields (Q-C98-3). No token-savings or cost claims are made or implied.
540
-
541
- ## 3.4.23 - 2026-10-08
542
-
543
- **Core hook/gate reliability repairs** (C97; each backed by baseline RED, GREEN and independent different-model review).
544
- - `stale-spec-check`: containment errors for external/traversal targets are caught at the checker boundary instead of crashing the hook chain.
545
- - `hook-chain-runner`: bounded failure provenance and diagnostics while staying fail-closed.
546
- - `docContracts`: `checkRenderVars` and `collectScannableDocs` prune isolated worktree checkouts; the walk skips `node_modules` and breaks symlink cycles by realpath (live-repo contract check 12.4s -> 0.3s).
547
- - Handoff intent: exact command-suffix boundary, `handoff-implement` recognized, torn newest JSONL entry yields unknown instead of an older opposite intent; `handoff-create`-owned runs stay planning-only through Stop/resume.
548
- - `protect-files`: backslash path spellings get the same protection as slash paths.
549
- - `land-worktree`: complete base-relative copy-back (committed, staged, deleted, renamed, newline paths).
550
- - `cleanup-task-worktree`: receipt-gated, recoverable cleanup with source/destination authority containment; no forced removal.
551
- - Vision: already-pending unread image is idempotent; a corrupt pending marker is retained with a diagnostic.
552
- - `output-compression`: a subagent's raw tool output no longer charges the parent's compact-pressure session (hard-cap gates unchanged).
553
- - Not included: shell create-scope detection (TASK-C97-007) and decision-log lock reclaim (TASK-C97-013) failed final review and were reverted to the 3.4.22 behavior.
554
- - Packed-artifact size cap raised 3.16 MB -> 3.17 MB.
555
-
556
315
  ## 3.4.22 - 2026-10-07
557
316
 
558
317
  **Windows: `.sh` hooks no longer deny every Edit/Write/Bash.**
@@ -565,91 +324,6 @@ Completion-gate fixes from a field-telemetry audit of the projects running UKit
565
324
  - `*.sh` is pinned to LF (repo `.gitattributes` and a shipped `.claude/.gitattributes`) so a CRLF checkout cannot
566
325
  break hook scripts. Troubleshooting added to `docs/INSTALL.md`.
567
326
 
568
- ## 3.4.21 - 2026-10-07
569
-
570
- **Hook runtime no longer burns CPU/disk on every tool call** (five measured bugs, C95).
571
- - Retention sweeps (tee cache, hook-latency telemetry, execution ledger, hook payloads, omp hook errors) only
572
- looked at the first 128 directory entries, so old files past that window were never pruned and the
573
- over-cap rule deleted newer files instead. The scan window now rotates.
574
- - Chained `.sh` hooks no longer each spawn their own `node hook-telemetry.mjs --finish`; `hook-chain-runner.mjs`
575
- writes the per-step rows (an Edit chain went from 11 node spawns to 5, same telemetry rows).
576
- - `unic-decision` now honours its persisted circuit breaker (closed/open/half-open, fail-open): a rejected key
577
- or dead endpoint no longer costs a failed call on every prompt.
578
- - The context hard-cap gate probes the transcript incrementally instead of re-reading the last 4 MB and
579
- rewriting `compact-pressure.json` on ~95% of calls; invalid persisted probe state falls back to a full scan.
580
-
581
- ## 3.4.20 - 2026-10-06
582
-
583
- **`ukit update` now displays the NEW version.** The running process is the old code, so the
584
- banner used to print only the stale "Current version" and read like the update had not
585
- worked. It now prints `Updated: <old> -> <new>` (version read from the freshly installed global
586
- package.json) right after `npm install -g`, repeats the new version in the final line, and says
587
- "already the latest" when nothing changed.
588
-
589
- **Release/verify tooling no longer wastes minutes on trivial work.**
590
- - `release:verify` now runs the cheap deterministic gates first (`docs:render:check`, `tests/consistency`) and
591
- stops the ~4 min core suite after 5 failures (`--bail 5`); a stale instruction render or template/active
592
- drift is reported in seconds, not after the full suite.
593
- - Single-instance lock: a second concurrent `release:verify` for the same repo exits 3 naming the live pid
594
- instead of racing the first (two concurrent suites made both slow and flaky).
595
- - `rollout.test.js` no longer re-runs the entire `release:verify` from inside `release:verify` (that one test
596
- took ~307 s, doubling the release gate).
597
- - Instruction core: "Long commands run once" rule (never duplicate a backgrounded/timed-out long run).
598
- - Fixed a comment in `handoff-model-guard.sh` that the watchdog-coverage scan mistook for an unarmed inline
599
- `node -e` block (shipped red in 3.4.18/3.4.19 because only the hooks suite was run before release).
600
-
601
- ## 3.4.19 - 2026-10-06
602
-
603
- **Create-scope guard: more read-only shell false positives removed (found by replaying 4vn's real blocked commands).**
604
- `2>/dev/null;` / `2>/dev/null|` (operator glued to the redirect target) was read as a write to a file
605
- named `/dev/null;`; commands after shell keywords (`for ...; do jq ...`, `then`, `else`, `while`) skipped the
606
- read-only interpreter mask. Real writes (`>src/a.js;`, write APIs) still block. Test 14 in createScopeGuard.
607
-
608
- ## 3.4.18 - 2026-10-06
609
-
610
- **Stops the token-burning respawn loop at its source.**
611
- - New `block-breaker.mjs`: the hook chain counts identical PreToolUse refusals per session
612
- (paths/ids normalized); from the 3rd, the refusal text gains a "STOP — report verbatim, do not
613
- retry or respawn" directive. Advisory + fail-open; off via `blockBreaker.enabled=false` or
614
- `UKIT_BLOCK_BREAKER=0`. Loaded dynamically so a partially-updated runtime cannot crash the chain.
615
- - Create-scope guard: read-only inline `node -e` / `python3 -c` / `jq` / heredoc analysis is no
616
- longer misread as a shell write (arrow functions, `n>1750`, identifiers like `ln`/`cp`);
617
- scripts that use write APIs (`writeFile`, `os.system`, `open(..,'w')`, ...) still block.
618
- - `handoff-planner` / `handoff-create`: write PLAN.md (with `PLANNER_MODEL` footer) first, report a
619
- refused write verbatim instead of retrying, never run in `isolation: "worktree"`.
620
-
621
- ## 3.4.17 - 2026-10-06
622
-
623
- **Planners can revise an unimplemented task that still carries the skeleton Executor Report.**
624
- `handoff-model-guard.sh` blocked every Edit/Write to an existing `TASK-xxx.md` whose
625
- `## Executor Report` (or `## Reviewer Verdict`) was still the Phase-2 skeleton, demanding
626
- `EXECUTOR_MODEL` — so `/ukit:handoff-create` could create a task but never amend it after
627
- plan review. The model gate now fires only when the phase section itself changes to real
628
- content; edits elsewhere, unchanged skeletons and inert placeholders (`Not started.`,
629
- `KEY: -`) pass. Real executor/reviewer reports without a valid model, lite-tier models and
630
- real-model demotion stay blocked. Regression: `tests/hooks/taskSkeletonAmendment.test.js`.
631
-
632
- ## 3.4.16 - 2026-10-05
633
-
634
- **Create-scope guard no longer blocks planner subagents running in a git worktree.**
635
- `handoff-model-guard.sh` classified write targets against the main project root, so a
636
- `handoff-planner` isolated in a worktree (`.claude/worktrees/<n>/`, `.worktrees/<n>/`, or a
637
- sibling checkout of the same repo) writing `docs/AI_HANDOFF/*` read as `deny-.claude` /
638
- `outside-root` — an unfixable block the agent retried blind. Targets are now scoped against
639
- that worktree's own root (same-repo verified via git common dir); source/config stay denied
640
- inside the worktree and unrelated outside paths stay denied. Test: `tests/hooks/createScopeGuard.test.js` #13.
641
-
642
- ## 3.4.15 - 2026-10-05
643
-
644
- **Hook chain no longer masks a real gate block (stops blind-retry token burn).**
645
- When a mid-chain gate exited 2 with its own reason (e.g. `handoff-model-guard.sh`:
646
- `PLAN.md has no valid PLANNER_MODEL`), `hook-chain-runner.mjs` treated the unrun later gate
647
- as "chain broke before fail-closed gate(s) ran: context-hardcap-gate.sh" and discarded the
648
- real reason. Agents (notably `handoff-planner`) could not tell what to fix and were respawned
649
- repeatedly. A completed exit-2 gate is now the verdict: its stderr/systemMessage is surfaced
650
- and later gates stay unrun. Infra failures (timeout/signal/budget) still fail closed with the
651
- "chain broke" message. Regression test in `tests/hooks/hookChainFailureSurface.test.js`.
652
-
653
327
  ## 3.4.14 - 2026-10-04
654
328
 
655
329
  **New `advisor-plan` skill, a create-session write-scope guard, and a deliberate-future queue contract.**
@@ -696,522 +370,6 @@ means rows dispositioned, not implemented.
696
370
  Tests: `advisorPlanSkill`, `createScopeGuard`, `advisorReleaseDocs`, `advisorIntentRouting`,
697
371
  `advisorStatusDocs`, `routeCatalog`.
698
372
 
699
- ## 3.4.13 - 2026-10-04
700
-
701
- **`/ukit:handoff-create` is strictly planning-only; the Stop gate follows the session's CURRENT handoff intent.**
702
- `handoff-create` writes SPEC/PLAN/task files under `docs/AI_HANDOFF/` and stops with tasks
703
- `ready` (queued) — it never edits product code, launches executors, or escalates itself
704
- into implementation, even when an unfinished `RUN.md` exists or after compact/resume.
705
- New shared `handoff-intent.mjs` classifies a transcript by its MOST RECENT structured
706
- intent (`/ukit:handoff-create` vs `/ukit:handoff-fullstack` command tag, `Skill` call,
707
- SessionStart resume banner). The Stop gate and `handoff-resume.sh` both use it: a session
708
- that planned after an earlier fullstack run is no longer bounced into the stale run,
709
- while a session actually driving `handoff-fullstack` (including create → fullstack
710
- re-acquire) is still held to completion — the completion gate and ExitPredicate are
711
- unchanged. Unknown/unreadable/windowed-out transcripts stay fail-closed. Claude Code,
712
- Codex and omp share the same runtime, with native transcript envelopes normalized.
713
- Planning alongside a live run preserves its cursor, index and tasks and writes a
714
- separate queued plan instead. Tests: `handoffIntentSeparation`,
715
- `handoffResumeIntent`, `handoffCreateQueueing`.
716
-
717
- ## 3.4.12 - 2026-10-02
718
-
719
- **Handoff Stop gate is session-scoped — a stale `RUN.md` no longer hijacks unrelated sessions.**
720
- Before, any session in a repo was bounced with "CONTINUE IMMEDIATELY" whenever
721
- `docs/AI_HANDOFF/RUN.md` carried a live `Phase:` (or a `done` whose ExitPredicate
722
- failed, e.g. `git:clean` on a dirty tree) — even a fresh session opened only to plan.
723
- `evaluateHandoffCursor` now takes the session `transcriptPath` and enforces the
724
- gate only when that session itself drives the run, proven by STRUCTURED transcript
725
- evidence (a real user turn with the `/ukit:handoff-fullstack` tag, a `Skill` call for
726
- it, or a SessionStart attachment carrying the resume banner). Marker strings in tool
727
- output, bash commands or source files do not count. An unreadable/oversized
728
- transcript keeps the legacy block (a real run is never released by a lost read).
729
- The omp bridge passes the transcript path too.
730
-
731
- - `handoff-resume.sh`: `startup`/`clear` sessions get an informational note (ignore
732
- unless asked; `/ukit:handoff-fullstack` to continue, `/ukit:handoff-clear` to
733
- discard) instead of a resume order; `compact`/`resume` still resume automatically.
734
- - New config `handoff.fullstack.stopGateScope`: `"session"` (default) | `"project"`
735
- (legacy repo-wide gate).
736
- - `reset-compact-pressure.sh`: staged-payload read is async (was a sync
737
- `readFileSync` inside the hook deadline window; fixes BUG-C22-03 test).
738
- - `async-lock.mjs`: an `EEXIST` from the lock's PARENT-directory mkdir (a regular file
739
- squatting on the store path) is a hard error, not lock contention — it used to spin
740
- out the whole acquisition budget and hang crash-path hooks (`reinject-context`,
741
- `output-compression`) for ~15 s instead of failing fast with a systemMessage.
742
- - `skill-router.sh`: restored a missing `};` (v3.4.11 syntax error that silently
743
- disabled the whole router).
744
- - Hook-deadline conventions: no sync-fs mention in `verification-guard.sh`/
745
- `observability-emit.mjs`, explicit timeout on the codex probe's `spawnSync`.
746
- - Test/doc hygiene: tests follow the cycle-91 inventory archive move; baseline
747
- reconciliation pins the major.minor line instead of exact patch; decision-coverage
748
- allowlist covers `deriveTypedDelegationAdvice`.
749
-
750
- ## 3.4.11 - 2026-10-01
751
-
752
- **Gate posture is answer-first; only explicit change orders mint work debt.**
753
- The router now stamps `routingContext.planOnly` (new `isPlanOnlyRequest` —
754
- "chỉ lên plan", "plan thôi", "just plan it", "plan … không implement") next to
755
- `mutationOrder`. The completion gate's `no-mutation-order` valve covers both:
756
- when a prompt ordered no mutation or asked only for a plan/answer, missing
757
- `write-evidence` AND `verification-evidence` release loud instead of forcing
758
- an Edit loop. A prompt that does order a change — or a turn that already
759
- attempted an edit — keeps the normal gate. To implement a reviewed plan:
760
- "implement", "sửa", "làm luôn", or `execute this plan`.
761
-
762
- ## 3.4.10 - 2026-10-01
763
-
764
- **sensitive-data-guard reads .env placeholders.** `classifySecretFile` now
765
- exempts every dotenv name carrying a distributable marker
766
- (`example|examples|sample|template|dist`) — `.env.example.local`,
767
- `.env.production.example`, `.env.sample`, `.env.dist`, `.env.template`
768
- alongside the old `.env.example` — for Read/Grep and Bash lanes alike.
769
- Real env files (`.env`, `.env.local`, `.env.production`) stay blocked.
770
-
771
- ## 3.4.8 - 2026-10-01
772
-
773
- (3.4.7 and 3.4.9 were lost to npm staged-version E409 limbo; 3.4.8 landed and its `latest` tag was assigned via `npm dist-tag`.)
774
-
775
-
776
- **Completion gate no longer demands an edit for read-only questions.** The
777
- skill router now stamps `routingContext.mutationOrder` (was the prompt a real
778
- mutation order?) and the Stop gate releases with a loud reason when a
779
- no-mutation prompt was misrouted into a write-debt mode — ending the
780
- Stop → "make an Edit" → AskUserQuestion → Stop loop on questions like
781
- "nút Excel gọi hàm nào?". A real edit attempt keeps the normal gate.
782
-
783
- ## 3.4.6 - 2026-09-30
784
-
785
- Republish of 3.4.4 — npm staged-version E409 limbo (same content, version bump only; 3.4.5 hit the same wall).
786
-
787
- ## 3.4.4 - 2026-09-30
788
-
789
- **Stop-hook blocks are now user-visible.** When the Stop gate refuses a
790
- premature stop (missing completion evidence, mid-flight handoff run, watchdog
791
- budget), Claude Code previously received only the model-facing `reason` — the
792
- turn looked like a silent stall and users had to type "continue" blindly.
793
- Every blocked stop now also emits a `systemMessage` shown in the transcript:
794
- `[UKit] Stop blocked — <policyOwner>: <reason first line>`.
795
-
796
- ## 3.4.3 - 2026-09-29
797
-
798
- Republish of 3.4.2 — npm staged-version E409 limbo (same content, version bump only).
799
-
800
- ## 3.4.2 - 2026-09-29
801
-
802
- **Bug-sweep cycles C91–C93 — 42 fixes.** Handoff cycles C91 (26), C92 (13) and
803
- C93 (3) closed the confirmed-bug backlog across deny-gates, install/uninstall
804
- data-loss paths, agent-runtime supervision, index integrity, codeintel
805
- freshness, telemetry durability, routing floors, and runtime CLI locking.
806
-
807
- - Deny gates: quote/splice/IFS bypasses and compact `-c`/`eval` operand
808
- recursion in the PreToolUse guards (templateHooks + audit tests).
809
- - Install/uninstall: typed `InstallMetadataError` on corrupt `install.json`
810
- (doctor), uninstall refuses corrupt/unreadable ledger instead of silently
811
- proceeding, plus other destructive-path hardening.
812
- - agentRuntime: supervisor pgid kill-target fix, `cancel_pending` edge,
813
- dead `recovery.js` cancelled-branch removal.
814
- - Index/codeintel: integrity checks, freshness/retrieval guards.
815
- - Handoff machinery: model-tier guard override anchor (task-file declaration +
816
- `.ukit/storage/tier-override` marker), Release Policy mirror restored into
817
- root `CLAUDE.md`/`AGENTS.md`.
818
-
819
- ## 3.4.1 - 2026-09-28
820
-
821
- Republish of 3.4.0 — npm staged-version E409 limbo (same content, version bump only).
822
-
823
- ## 3.4.0 - 2026-09-28
824
-
825
- **Playbook system + subagent orchestrator.** Handoff cycles C84–C89 shipped the
826
- full playbook backlog and the queued orchestrator blueprint:
827
-
828
- - **24 playbooks shipped to `template_user/playbooks/`** — bug-fix, investigation,
829
- small-feature, feature-implementation (renamed from issue-implementation),
830
- refactor, performance, runtime-forensics, session-pickup, verification,
831
- skill-evaluation, autonomous-run, architecture-decision, migration, release,
832
- prototype + sub-playbooks (hillclimb, babysit, shipping, orchestrate,
833
- autopilot-full, autopilot-stack, worktree-cleanup, open-pr) mapped onto
834
- existing work-groups via `SUB_PLAYBOOK_WORKGROUP`. `ukit playbook show|list`
835
- and `ukit playbook doctor` report all of them; manifest seeds keep installs
836
- current.
837
- - **Routing + measurement**: shared `routeResolver`/`playbookRegistry` twins
838
- (byte-parity enforced), session-history extractor, verification-map table +
839
- consumers, review-policy decision plane, cross-check depth, fix-loop
840
- escalation (`debugLoopThreshold`), measured-reliability tier selection,
841
- advisory-turn stop escape (waiting/no-change turns never mint write debt).
842
- - **`ukit vm run`**: evidence-gated live lane for the Agent VM — real
843
- VmEngine+supervisor execution gated behind `decisionRuntime.vm` stages
844
- (off→shadow refuse; canary/default required), `lane:'live'` evidence records.
845
- - **Subagent orchestrator (SO-001..007)**: frozen baseline corpus, `subagent.usage`
846
- provenance telemetry (off-default, typed resource provenance, never invented
847
- usage), TaskContract/ResultEnvelope validators + bounded artifact refs with
848
- claim-level resolution, `probeSubagentCapabilities` host matrix (enforced /
849
- advisory / unsupported), typed delegation advice in shadow, context manifest
850
- builders (isolated/curated, `fork_unavailable` honest label), golden eval +
851
- rollout verdict harness (INCOMPARABLE when evidence < 9-run floor).
852
- - **Release-cluster contract (RCC-01)**: `docs/pstack/c82/RELEASE_CLUSTER_CONTRACT.md`
853
- — `gh`/git-over-Bash fallbacks for every release step + the land-authorization
854
- boundary (irreversible writes always ask; Codex gate is advisory).
855
- - **`worktree-sweep.mjs`**: safety-gated stale-worktree reclamation
856
- (enumerate → classify → no-uncommitted/no-active-run gates → remove safe only).
857
-
858
- Note: `npm pack` budgets raised once for the wave (packed 3.03MB, unpacked
859
- 9.88MB — attributed in `tests/integration/packageArtifact.test.js`).
860
-
861
- ## 2.8.0 - 2026-09-23
862
-
863
- - **User-Level `.ukit` layer (cycle C46)**: new `~/.ukit/` layer resolved via `os.homedir()` (correct on Windows/Linux/macOS), immutable on `ukit update` (`level: "user"` manifests + `mergeStrategy: skip`).
864
- - Canonical API: `src/core/userPaths.js`, `src/core/memory/{recordStore,userMemory}.js`, `src/core/userPlaybooks.js`.
865
- - Merge-per-key precedence: project wins config keys, user wins personal data; `loadRuntimeConfig(projectRoot, {homeDir})` deep-merges defaults←user←project; invalid user-only config warns and falls back to defaults.
866
- - Install seeds the user layer (`manifests/platform.user.yaml` + `templates/user/`); router + `route-task.mjs` mirror are user-layer aware; new `ukit playbook` CLI; `ukit memory --user`; doctor user-layer section.
867
- - **v3 pstack-derived specs**: playbook policies, principle index (15 leaf skills), `modelRoles`, typed verdicts + patch-id currency, decision log (`docs/pstack/SPEC-*.md`, `V3_RESHAPE.md`).
868
- - **M01.1**: additive `ResolvedTaskRoute` v1 behind `routing.routeSchema.stage` (default `off` = byte-identical legacy route).
869
-
870
- ## 2.7.13 - 2026-09-22
871
-
872
- - Same content as 2.7.12 (npm staged-publish never completed; re-published as 2.7.13).
873
-
874
- ## 2.7.12 - 2026-09-22
875
-
876
- - **Token & latency diet (cycle C45)**:
877
- - Output compression now configurable: `tokenPipeline.outputMaxTokens` (default 600) and `outputMaxLines` (default 40); output already under budget passes through uncompressed — no tee file, no forced re-read.
878
- - omp sessions now write memory v2 episodes on session stop (`session-episode.sh` wired into the bridge), so memory recall accumulates under omp.
879
- - System prompt ~23% smaller (AGENTS.md 17.1KB → 13.1KB); all rule IDs preserved.
880
- - Unattended retry budget reduced to 2 attempts / 2 strategies (UNATTENDED-02).
881
- - Removed dead config: `memory.autoCapture`, all `advisor*` keys, `subagents.diffReview*`, `postEditReviewPolicy`, and the code-reviewer `REVIEW_TARGET_TYPE=diff` sidecar mode.
882
- - `memory.maxInjectionTokens` now honored within [160, 640] (was silently clamped to 320).
883
- - Hook deadline audit: all shipped hooks verified deadline-armed or bounded; watchdog coverage test extended.
884
-
885
- ## 2.7.11 - 2026-09-22
886
-
887
- - **User permission mode is never overwritten**: `ukit install`/`ukit update`
888
- used to rewrite `.claude/settings.json` wholesale, so the template's
889
- `permissions.defaultMode: "bypassPermissions"` silently clobbered a
890
- user-chosen mode (e.g. `plan`) on every install. `defaultMode` is now
891
- user-owned in `merge_env_overwrite_with_backup`: excluded from the drift
892
- comparison and merged back into the written content. The template default
893
- still applies on fresh installs or when the user never set a mode.
894
- (`src/core/diffPlan.js`, +4 tests in `tests/core/diffPlan.test.js`)
895
-
896
- ## 2.7.8 - 2026-09-22
897
-
898
- Stall/hang fixes — cycle C43 (TASK-001..008): the indefinite-stall producers
899
- root-caused in `docs/AI_REPORT/archive/2026-09-21-NORMAL_CHAT_STALL.md` are fixed
900
- across Claude Code, omp, and Codex runtimes.
901
-
902
- - **CX-8**: route-state writes are atomic + locked — torn `skill-router-state.json`
903
- writes can no longer wedge the router.
904
- - **OMP-3/F-2**: omp receipt dedupe — a tool result is recorded once; duplicate
905
- receipts no longer double-count execution records.
906
- - **RC-4/OMP-1/F-3/F-4**: breaker-freeze family — budgeted reclaim, pstart
907
- stamps, fail-open streaks; continuation sidecar merge gate stamps
908
- `lastContinuationAt` strictly newer than its base and materializes counter
909
- state when the main ledger file is absent.
910
- - **F-5/F-5b**: `withFileLock` policy + reclaim — stale locks reclaimed via
911
- pstart mismatch; recycled-pid regression tests added.
912
- - **F-15**: verifier-classification — verification outcomes classified so a
913
- non-verification failure no longer masquerades as a test failure.
914
- - **F-RC-2**: `hook-chain-runner` exits promptly after verdict — bounded stdout
915
- flush then `process.exit`; an abandoned in-proc step promise can no longer
916
- pin the event loop for the full registered timeout.
917
- - **F-10/OMP-2**: omp Stop parity — omp sessions get the same handoff-cursor
918
- Stop-gate lane as Claude Code.
919
- - **OMP-6/F-8/CX-10**: `createPayloadReference` staging runs under a deadline
920
- with fail-open to inline payload (never throws, host loop not frozen); omp
921
- SessionStart carries `session_id` so `reset-compact-pressure` no longer
922
- wipes every session's pressure records; codex `requiredBeforeCompletion`
923
- renders only commands that exist in `package.json`.
924
- - Housekeeping: stale "Kilo" tool labels scrubbed from handoff docs, agent
925
- report contracts, and config help text (functional support was already
926
- removed; the regression tests and gateway comments documenting that removal
927
- are intentionally kept).
928
-
929
- ## 2.7.7 - 2026-09-21
930
-
931
- Audit-report remediation + hook observability — cycle C42 (TASK-001..011): all 12
932
- findings from the three 2026-09-20 reports closed; the reports moved to
933
- `docs/AI_REPORT/archive/`.
934
-
935
- - B1: `hook-chain-runner` short-circuits on a permission decision under
936
- `--emit-verdict`. A `hookSpecificOutput` decision on a step now owns the
937
- verdict and stops the chain there, so the decision JSON is emitted as the
938
- whole stdout instead of being concatenated in front of the next step's
939
- output, and a genuinely-skipped fail-closed gate is no longer exempted from
940
- the fail-closed verdict. C8 (same task): an invalid `:N` budget suffix
941
- (`:0`, `:-1`) warns and runs the step on its default budget instead of
942
- silently parsing; a non-numeric suffix stays a literal path.
943
- - B2: `yarn test <files>` — the repo's dominant verification form — is now
944
- recognized by the verification-minutes estimator alongside `yarn vitest
945
- [run]`, so task budgets are no longer inflated by the 1-minute flat
946
- fallback.
947
- - B3: doctor strips `{{...}}` placeholders before `parse()`ing the omp config
948
- template, so a placeholder in key position no longer makes the `yaml` lib
949
- emit "Keys with collection values will be stringified" on every run.
950
- - C5: new scoped `scripts/install/sync-installed-mirror.mjs` (`--check` reports
951
- drift, bare run rewrites). It reuses the real install pipeline
952
- (`buildInstallPlan` → `diffInstallPlan` → `applyDiffResults`) so drift is
953
- decided by exactly the code `ukit install` uses, and it only ever touches
954
- `.claude/**`/`.omp/**` plan targets — never `src/`, `docs/`, or user-authored
955
- files. Parity coverage widened to `.claude/ukit/index/`.
956
- - C7: hook-chain failure surfaces pinned by
957
- `tests/hooks/hookChainFailureSurface.test.js` (output overflow on a
958
- fail-closed gate, budget exhausted mid-chain, signal death); the decision to
959
- drop non-verdict stderr is documented in `UKIT_INTERNALS.md`.
960
- - O1: telemetry wired into the four previously unmeasured hooks
961
- (`reinject-context`, `auto-prune-bash`, `reset-compact-pressure`,
962
- `session-episode`) via a no-staging arm path in the `hook-telemetry` engine.
963
- Four hooks now emit rows where they emitted none.
964
- - O2: audit snapshots carry provenance (`generatedAt` + telemetry row/file
965
- counts), and `scripts/perf/diff-perf-findings.mjs` diffs two snapshots per
966
- finding id without touching live telemetry.
967
- - O3: telemetry rows split stdin-stage time from execution time (`stageMs`),
968
- so a slow producer is distinguishable from a slow step.
969
- - O4/O6: telemetry consumers audited and the consolidated row shape pinned
970
- (`tests/hooks/chainTelemetryRowShape.test.js`); doctor escalates when a
971
- failure actually landed on a chain carrying a fail-closed gate or exhausted
972
- its budget — purely additive to the existing detail/remedy.
973
- - O5: telemetry append overhead measured; numbers recorded in
974
- `scripts/perf/perf-measure.md`.
975
- - Fixed `tests/consistency/ompDocsSync.test.js` case 4: the frozen-history
976
- guard treated the `RULES.md` §Clear Handoff step-2 archive rotation (delete
977
- the oldest cycle, fold it into `HISTORY.md`) as tampering, so the test was
978
- red at HEAD and at the `v2.7.2`/`v2.7.5` tags. The guard now exempts a
979
- cycle-dir deletion only when a matching `HISTORY.md` row exists and the
980
- post-rotation archive is back within the 3-dir cap; rewrites, renames, and
981
- unrecorded deletions still fail.
982
- - Fixed `src/core/memory/store.js`: the session-archive cap appended and
983
- `slice(-cap)`ed, so it evicted by insertion position instead of age — a
984
- session archived late carrying an older end time outlived a newer one written
985
- earlier. It now drops the oldest by end time (ties keep insertion order),
986
- matching the key `archiveSessions` already uses. The regression case in
987
- `tests/core/sessionArchiveBound.test.js` had a `Date.now()`-per-session
988
- fixture whose outcome depended on whether the clock ticked mid-array, so it
989
- passed on an unloaded box and failed under load; the fixture is now
990
- deterministic and the case fails against the old code.
991
- - `withFileLock` (both `templates/.claude/ukit/runtime/token-utils.mjs` and its
992
- `src/core/fileOps.js` twin) is now fail-closed: a lock wait that exceeds
993
- `maxWaitMs` skips the mutation instead of running it unlocked, and the drop is
994
- journaled to `<file>.lock-drops.jsonl` (bounded 128-record JSONL). Both twins
995
- delegate to `async-lock.mjs`, so owner stamping (pid + token + pstart),
996
- recycled-pid detection, and claim+quarantine stale reclaim exist exactly once;
997
- a stale lock whose recorded pid was recycled is now reclaimed instead of
998
- wedging every mutation for that file. `writeJson`/`writeFileAtomic` fall back
999
- to copy+unlink when `rename` fails with EXDEV (cross-mount tmp dirs).
1000
-
1001
- ## 2.7.6 - 2026-09-20
1002
-
1003
- Permission posture work — cycle C41 (TASK-001..004): omp prompts aligned to
1004
- Claude Code — routine commands auto-allow, gates kept only for destructive
1005
- operations.
1006
-
1007
- - `rm -rf *` static catch-all removed from `templates/.omp/config.yml`
1008
- `bash.patterns`, `templates/.claude/settings.json`, and
1009
- `permissionPolicy.CANONICAL_DENY` (16→15). The `block-dangerous` hook remains
1010
- the authority for generic `rm -rf <dir>` (fail-closed), so coverage for
1011
- real destructive targets is unchanged while routine/safe cleanup paths no
1012
- longer hit the static deny on both hosts.
1013
- - `ompConfigMerge` now coerces preserved legacy `prompt`/`ask` bash.patterns
1014
- to `allow` instead of `deny` — under rendered `yolo` a broad preserved
1015
- pattern (worst case `*`) could globally brick bash. Preserved `deny` still
1016
- passes through; canonical deny + the hook still gate destructive commands.
1017
- - `permissionDoctor` new FAIL check `omp-approval-mode-not-pinned`: under
1018
- `orchestration.permissionMode: unattended`, fires when omp `approvalMode`
1019
- is missing or not `yolo`; plus an advisory audit of preserved bash.patterns.
1020
- `applicable:false` when `.omp/config.yml` is absent or mode ≠ unattended.
1021
- - `sensitive-data-guard` added to `CANONICAL_PROTECTED` (no precedence
1022
- change); new `tests/manifest/c41OmpPosture.test.js` asserts routine
1023
- commands are not prompted, all destructive classes stay denied, and
1024
- enumerates the full prompt-producing gate inventory (stale-spec-guard,
1025
- sensitive-data-guard, bridge, FAIL_CLOSED).
1026
-
1027
- ## 2.7.5 - 2026-09-20
1028
-
1029
- Hook performance work — cycle C40 (TASK-001..007): `.mjs` module steps,
1030
- fail-closed registry, and a hook budget guard.
1031
-
1032
- - `hook-chain-runner` supports `"<path>.mjs[:N]"` module steps: the arg is
1033
- imported in-proc and its `runHook(ctx)` is invoked with
1034
- `{payload, payloadText, projectRoot, env, deadlineMs, signal}` — no child
1035
- process spawn on the hot path. A throw reports `error`, a
1036
- `deadlineMs`/`AbortSignal` breach reports `timeout` + `killed`; infra
1037
- failures exit 2 when the step is fail-closed, else 1. Every step appends a
1038
- `recordHookTiming` telemetry row under its `<name>.mjs` hook name, and
1039
- `UKIT_HOOK_DEADLINE_MS` is scrubbed from `process.env`/`ctx.env` around the
1040
- import so a stale host deadline cannot leak into module steps.
1041
- - Fail-closed registry extended: `sensitive-data-guard.mjs` and
1042
- `block-dangerous.mjs` join `FAIL_CLOSED_SCRIPTS`, so module-step verdicts
1043
- keep the same fail-closed posture as the `.sh` wrappers they replaced.
1044
- - `sensitive-data-guard`, `block-dangerous`, and `record-execution` ported to
1045
- dual-mode modules: each `.mjs` exports `runHook(ctx)` for chain execution
1046
- plus an `isDirectRun()` CLI path for standalone/debug invocation;
1047
- `hookFailClosed` is exported per module (`true` for the two gates, `false`
1048
- for the telemetry sink). The `.sh` files remain as thin wrappers — staging,
1049
- salvage glue (`UKIT_SALVAGED_*` env), telemetry, then a single
1050
- `node <module>.mjs` call — with byte-identical verdicts verified against the
1051
- pre-port implementations. `record-execution.mjs` also exposes
1052
- `setLedgerMessageEmitter` on `execution-ledger.mjs` so in-proc runs route
1053
- the `noteSweepFailure` systemMessage through the emitter instead of fd 1.
1054
- - Settings + bridge wiring: `settings.json` chains and the omp bridge
1055
- `HOOK_EVENT_MAP` now point at the `.mjs` steps; the bridge's
1056
- `TIMEOUT_STAYS_CLOSED` / payload-stays-closed checks cover
1057
- `block-dangerous.mjs` so verdicts stay identical after the swap.
1058
- - Hook budget guard: `tests/hooks/hookChainBudget.test.js` enforces ≤8 chain
1059
- steps per group, requires a `:N` suffix on every `.sh|mjs` arg, and pins
1060
- outer `timeout` ≥ Σ(:N) + 10s — adding or removing a hook without updating
1061
- the outer fails loudly. The same suite asserts the settings↔bridge mirror
1062
- 1:1 for every event/matcher lane. The contract is documented under
1063
- `UKIT_INTERNALS.md → Hook budget`.
1064
-
1065
- ## 2.7.4 - 2026-09-20
1066
-
1067
- Deferred hook findings + residual risks — cycle C39 (TASK-001..005).
1068
-
1069
- - `session-episode.sh` held-stdin stall fixed twice over: gate-first
1070
- ordering — a pre-staging node probe evaluates
1071
- `learning.episodes.autoWrite === true`; gate off / missing / corrupt
1072
- config or absent node exits 0 immediately without touching stdin
1073
- (~2084ms → ~14–40ms). The gate-on staged-read + `ukit memory episode`
1074
- flow is unchanged. The gate probe itself is armed with an unref'd
1075
- `UKIT_HOOK_DEADLINE_MS` deadline (default 2s → exit 0, gate-off safe
1076
- default) so a wedged probe can never re-create the stall it prevents.
1077
- - SessionEnd residual spawn cost (`chain-sessionend-all`) resolved: the
1078
- background watchdog subshell in `session-episode.sh` inherited the
1079
- child's stdout/stderr pipes, blocking captured-stdio callers ~2s after
1080
- script exit. Watchdog now detaches stdio (`>/dev/null 2>&1 &`) —
1081
- residual 2050ms → ~40ms median; telemetry, per-script `:N` budgets,
1082
- and fail-open posture preserved.
1083
- - Regression guard `chainTimeoutSuffixes`: every `"<path>.sh":N` budget
1084
- suffix in template + installed `settings.json` is pinned against the
1085
- script's original standalone timeout — drift in either direction
1086
- (wrong N or missing suffix) fails the suite.
1087
- - `ukit doctor` gains a `Hook-chain checks` section
1088
- (`src/core/hookChainDoctor.js`): bounded scan of recent
1089
- `hook-latency/*.jsonl` rows reports fail-closed outcomes
1090
- (timeout/error) as an advisory warning with remedy — never blocks,
1091
- exit code untouched.
1092
-
1093
- ## 2.7.3 - 2026-09-20
1094
-
1095
- AI freeze audit remediation — cycle C38 (TASK-001..007).
1096
-
1097
- - OpenCode residual sweep: `rg -i opencode` inventory classified into
1098
- keepers vs residuals; residual surfaces removed or steer-only, with a
1099
- zero-residual manifest test guarding regressions.
1100
- - Unresolved-template-token repair: `mergeOmpConfig` + `diffPlan` detect
1101
- literal `{{token}}` left in rendered artifacts, repair known tokens,
1102
- report unknown ones via `unresolvedTokens` (never fabricate); install
1103
- prints a repair line like the C35 migration line.
1104
- - `orchestration.allowUnsafeEval` (default `false`, optional-present):
1105
- only an explicit `true` renders `tools.approval.eval: allow` in
1106
- `.omp/config.yml` via the `omp.evalApproval` render variable; every
1107
- other state renders `deny` — fail-closed, never prompt. Migrations
1108
- never enable it; absence keeps the safe default.
1109
- - `src/core/permissionPolicy.js` — pure semantic compiler
1110
- `compilePermissionPolicy({ permissionMode, allowUnsafeEval, host,
1111
- surfaces? })`: canonical deny set + precedence tiers
1112
- (hard-deny > protected-guard > host-deny > explicit-allow >
1113
- mode-fallback), models `interactive`/`safe-auto`/`unattended` across
1114
- claude/omp/codex, throws `UKIT_EPOLICY` on unknown mode. Render,
1115
- doctor, and the matrix share it as single source of truth.
1116
- - `ukit doctor --permissions [--json]`: `src/core/permissionDoctor.js`
1117
- compiles the policy against live surfaces and reports FAIL classes
1118
- (unattended-prompt, deny-loss, unsafe-eval-mismatch,
1119
- unrendered-token) with exit 1; reachable prompts under
1120
- interactive/safe-auto report as INFO, absent host surfaces SKIP;
1121
- compact section in the default doctor run, full table under the flag.
1122
- - No-freeze matrix (`tests/manifest/c38NoFreezeMatrix.test.js`):
1123
- safe→allow, destructive→deny+recovery, unknown-in-unattended never
1124
- asks, truncated payloads fail closed, merge idempotent, zero `{{`
1125
- residuals.
1126
- - Canonical deny surfaces closed (R4.5 review): `templates/.claude/
1127
- settings.json` now denies the full canonical destructive set
1128
- (`git push -f`, `git clean -fd`, `git checkout .`, `git restore .`,
1129
- `rm -rf .`, `rm -rf`, `dd if=/dev/`, `*> /dev/sda`, `mkfs`,
1130
- fork-bomb) and the `gh pr create/comment` + `gh issue comment`
1131
- entries moved `ask`→`deny` — static surfaces can't express
1132
- ask-under-interactive-only, so deny is the only mode-safe posture
1133
- (unattended runs must never reach a prompt). `templates/.omp/
1134
- config.yml` gains `git push --force-with-lease*`. Report-only hosts
1135
- (codex) no longer count toward doctor `deny-loss`.
1136
- - `ukit-bridge.js` (omp): `ask` verdicts now degrade to `block` with a
1137
- recorded cause + recovery route instead of surfacing an interactive
1138
- prompt under unattended mode (audit row 61).
1139
- - Docs: `docs/UKIT_INTERNALS.md` gains a Permission Modes + Unsafe Eval
1140
- section — unattended ≠ all-destructive-allowed; a deny routes the
1141
- agent to the next safer alternative, and the host-internal-wait
1142
- guidance is unchanged.
1143
-
1144
- ## 2.7.2 - 2026-09-20
1145
-
1146
- OpenCode adapter removal — cycle C37 (TASK-001..004).
1147
-
1148
- - Removed the OpenCode adapter lane end to end: adapter registry key +
1149
- aliases, `templates/adapter-presets/opencode/`, host-capability matrix
1150
- entry, doc-benchmark `opencode.yaml` fixture + BMK-09, manifest/manifest
1151
- wiring, `--tools` help listing, and root `opencode.json` dogfood file.
1152
- - Steer-not-break detection: a leftover `opencode.json` is a user file —
1153
- install/status/doctor now detect it via `src/core/opencodeSteer.js` and
1154
- print one canonical warning advising manual removal (`rm opencode.json`);
1155
- the file is never written, merged, pruned, or auto-deleted.
1156
- - Legacy tolerance: stale `agent`/`agents`/`compact.agentContext.targets`
1157
- values naming `opencode` are normalized away with a warning instead of
1158
- hard-failing; `--tools=opencode` / `--adapter opencode` warn + ignore /
1159
- fall back with exit 0; uninstall still removes a tracked `opencode.json`
1160
- on explicit user request; `opencode.json` stays in gitignore advice.
1161
- - Packaging: `package.json` description/keywords/`files` and `.npmignore`
1162
- no longer reference the deleted preset; `packageArtifact.test.js` asserts
1163
- the tarball ships zero `adapter-presets/opencode` entries.
1164
-
1165
- ## 2.7.1 - 2026-09-20
1166
-
1167
- omp native-tier steering — cycle C36 (TASK-001..005).
1168
-
1169
- - `templates/.omp/config.yml` modelRoles now pins omp's native cost tiers
1170
- `smol`/`default`/`slow` (→ `unic-lite`/`unic-code`/`unic-smart`) so omp's
1171
- built-in tier steering resolves UKit's gateway aliases directly; `vision`
1172
- stays `unic-vision` (capability lane — unic-code/unic-smart cannot read
1173
- images on this gateway).
1174
- - Back-compat: `lite`/`code`/`smart` kept as independent alias keys (not
1175
- references) resolving to the same unic-* values — a maintainer overriding
1176
- a cost tier must edit the matching alias too.
1177
- - `.omp/agents/*.md` rebound from direct unic-* names to `@smol`/`@default`/
1178
- `@slow`/`@vision` frontmatter so agents follow the modelRoles map.
1179
- - Migration: `mergeOmpConfig` merges `modelRoles` per key (user-pinned keys
1180
- preserved, newly added template keys recorded via `addedModelRoleKeys`)
1181
- instead of clobbering the whole map.
1182
- - `orchestration.modelTiers.*.ompRole` added to the runtime config template
1183
- + `runtimeConfig.js` so each tier declares which modelRoles key it binds
1184
- (lite→smol, code→default, smart→slow, vision→vision).
1185
-
1186
- ## 2.7.0 - 2026-09-20
1187
-
1188
- OMP fully autonomous / unattended mode — cycle C35 (TASK-008..014).
1189
-
1190
- - Product knob: `orchestration.permissionMode: "unattended"` declared in
1191
- `.ukit/storage/config.json` (template + validation; `interactive`/`safe-auto`
1192
- reserved for later cycles).
1193
- - omp approval surface: `templates/.omp/config.yml` pins
1194
- `tools.approvalMode: yolo` + all ten `tools.approval.*: allow` — the C34
1195
- key-omission decision is superseded now that unattended is a declared
1196
- product mode (interactive global configs can no longer downgrade shipped
1197
- installs to prompting).
1198
- - Migration: `mergeOmpConfig` + diffPlan wiring — installed `.omp/config.yml`
1199
- upgrades preserve user `modelRoles`/keys/`bash.patterns`, strip legacy
1200
- `prompt` policies, stay idempotent, and never clobber unparseable files.
1201
- - `ukit doctor`: new unattended section verifies `permissionMode`, the
1202
- rendered approval map, zero residual `prompt` policies, and the deny set.
1203
- - Unattended completion loop: `## Unattended Completion Loop` guidance in
1204
- core.md (rendered to CLAUDE.md/AGENTS.md) — turns end only on completion
1205
- evidence, a real external blocker, or a deny; denies route to the next
1206
- safer alternative instead of a question.
1207
- - `block-dangerous.sh`: name-allowlisted `rm` targets now require realpath
1208
- containment inside the project root (symlink-out / `..` traversal closed;
1209
- fail closed without realpath).
1210
- - Residuals recorded in `docs/AI_REPORT/AI_FREEZE_AUDIT.md` §8: eval stays
1211
- `allow` ("dangerously autonomous, user-chosen" — eval-sandbox roadmap
1212
- note); opencode `bash."*": "ask"` flip deferred pending deny-set
1213
- expansion.
1214
-
1215
373
  ## 2.5.0 - 2026-09-18
1216
374
 
1217
375
  C20 feature release (14 handoff tasks + 3-lane review): project-owner instructions via a
@@ -1274,4 +432,4 @@ UKit gains a fourth runtime and loses one. omp (Oh My Pi) reaches full parity wi
1274
432
 
1275
433
  **Known gap:** omp was not installed on the machine this release was built on. Every omp assertion in the test suite is against the generated `.omp/` tree and the bridge module's shape — the packed-tarball test confirms `templates/.omp/**` actually publishes, but nothing here observes omp's runtime behaviour. The three open verification items (does omp emit `session_start` on a post-compact continuation; omp's real base-URL key; omp's real auto-compact-window key) are recorded in `docs/AI_HANDOFF/tasks/TASK-008.md`.
1276
434
 
1277
- Entries for 2.5.1 through 2.6.11 are archived in the repository at `docs/archive/CHANGELOG-2.5.1-2.6.11.md`. Entries for 3.0.0 through 3.3.3 are archived in the repository at `docs/archive/CHANGELOG-3.0.0-3.3.3.md`. Entries for 2.1.0 through 2.2.16 (except 2.2.1) are archived in the repository at `docs/archive/CHANGELOG-2.1.0-2.2.16.md`; entries for 1.0.0 through 2.0.7 at `docs/archive/CHANGELOG-1.0.0-2.0.7.md` (neither is shipped in the npm package).
435
+ Entries for 3.4.0 through 3.4.50 (except 3.4.14 and 3.4.22) are archived in the repository at `docs/archive/CHANGELOG-3.4.0-3.4.50.md`. Entries for 2.7.0 through 2.8.0 are archived in the repository at `docs/archive/CHANGELOG-2.7.0-2.8.0.md`. Entries for 2.5.1 through 2.6.11 are archived in the repository at `docs/archive/CHANGELOG-2.5.1-2.6.11.md`. Entries for 3.0.0 through 3.3.3 are archived in the repository at `docs/archive/CHANGELOG-3.0.0-3.3.3.md`. Entries for 2.1.0 through 2.2.16 (except 2.2.1) are archived in the repository at `docs/archive/CHANGELOG-2.1.0-2.2.16.md`; entries for 1.0.0 through 2.0.7 at `docs/archive/CHANGELOG-1.0.0-2.0.7.md` (neither is shipped in the npm package).