leerness 1.36.186 → 1.36.188

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.ko.md +2 -0
  3. package/README.md +11 -6
  4. package/bin/leerness.js +268 -61
  5. package/docs/e2e-observation-contract.md +51 -0
  6. package/docs/runtime-compatibility-api.md +183 -0
  7. package/docs/state-paths-api.md +5 -0
  8. package/docs/state-scopes.md +9 -7
  9. package/docs/store-diagnostics-api.md +67 -0
  10. package/docs/store-observation-contract.md +94 -0
  11. package/docs/verification-evidence.md +67 -0
  12. package/docs/worktree-runtime-migration.md +278 -0
  13. package/lib/claims-baseline.js +1 -1
  14. package/lib/file-leases.js +2 -2
  15. package/lib/git.js +64 -15
  16. package/lib/io.js +9 -3
  17. package/lib/migrate.js +1 -1
  18. package/lib/preview-serve.js +5 -1
  19. package/lib/role-fallback.js +3 -3
  20. package/lib/role-store.js +2 -2
  21. package/lib/runtime-layout.js +395 -0
  22. package/lib/runtime-writes.js +166 -0
  23. package/lib/session-close.js +1 -1
  24. package/lib/state-git.js +1 -1
  25. package/lib/store-diagnostic-read.js +66 -0
  26. package/lib/store-diagnostics.js +74 -0
  27. package/lib/workspace-dir.js +12 -1
  28. package/package.json +10 -6
  29. package/scripts/command-flags-probe.js +3 -2
  30. package/scripts/dead-flags-probe.js +1 -1
  31. package/scripts/e2e-child-diagnostics-probe.js +143 -0
  32. package/scripts/e2e-child-diagnostics.js +33 -0
  33. package/scripts/e2e-temp-scope-probe.js +127 -0
  34. package/scripts/e2e.js +108 -27
  35. package/scripts/encoding-selftest-probe.js +222 -0
  36. package/scripts/false-claim-probe.js +31 -3
  37. package/scripts/file-lease-probe.js +4 -1
  38. package/scripts/legacy-runtime-negative-probe.js +72 -0
  39. package/scripts/mutation-integrity-probe.js +3 -0
  40. package/scripts/role-fallback-probe.js +67 -6
  41. package/scripts/runtime-admission-probe.js +282 -0
  42. package/scripts/runtime-git-write-probe.js +116 -0
  43. package/scripts/runtime-layout-probe.js +1198 -0
  44. package/scripts/runtime-repl-probe.js +271 -0
  45. package/scripts/runtime-replacement-probe.js +190 -0
  46. package/scripts/runtime-write-probe.js +458 -0
  47. package/scripts/selftest-cleanup-probe.js +168 -0
  48. package/scripts/store-diagnostic-probe.js +272 -0
  49. package/scripts/workspace-dir-lock-order-probe.js +310 -35
  50. package/scripts/workspace-dir-migration-probe.js +17 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.36.188 — 2026-09-08
4
+
5
+ - Add read-only state stores diagnostics for decision, lesson and role status, bounded reads and explicit fallback provenance; preserve metadata-only state inspect and existing mutation behavior.
6
+
7
+ ## 1.36.187 — 2026-09-05
8
+
9
+ - feat(state): add read-only runtime compatibility diagnosis and observed-layout write guards; keep legacy storage without migration or activation
10
+ - fix(runtime): recheck CLI/MCP/REPL, direct I/O, retained descriptors, lock heartbeat, Windows replacement and Git mutation boundaries; preserve standalone concurrent producers
11
+ - perf(state): reuse operation-local Git topology and workspace ownership while re-reading compatibility indicators; add real writer and old-client negative controls
12
+ - fix(selftest): retain bounded UR-0113 encoding failure diagnostics and restore prior exit status; preserve the original Windows Node24 replay failure as inconclusive
13
+ - fix(windows): allow 30 seconds per metadata-preserving replacement attempt; keep uncertain timeouts non-retryable and retain original/recovery artifacts
14
+ - fix(runtime): join in-flight legacy migrations read-only before writer admission and share canonical identity across Windows namespace, short-path and junction aliases; preserve bounded denial and rollback
15
+ - fix(selftest): bound transient Windows cleanup retries for three owned diagnostic fixtures, retain exact directory identity and report exhausted cleanup failures instead of leaving silent leaks
16
+ - fix(compatibility): preserve successive standalone producer commands with exact output-name/type admission; cover real repeated CLI use early and restore missing glossary marker imports for lossless rebuilds
17
+ - fix(test): observe temporary probe residue in the actual child-owned directory; retain foreign-parent and real-child negative controls without deleting unrelated files
18
+ - fix(test): retain bounded child/setup failure diagnostics for handoff and doctor E2E checks; align only JSON121's doctor wrapper with its nested selftest deadline, preserving original assertions and other command budgets
19
+
3
20
  ## 1.36.186 — 2026-09-05
4
21
 
5
22
  - T-0174: add read-only five-scope state inspection with worktree/project isolation and honest legacy inventory; reuse workspace snapshots, skip unused npm skill discovery and bookkeeping, preserve all existing state.
package/README.ko.md CHANGED
@@ -90,6 +90,8 @@ leerness verify-claim T-0001 --require-evidence
90
90
  ```
91
91
 
92
92
  - `optimism-check` · `verify-claim` — evidence의 도메인 주장(API·DB·결제·이메일·큐·캐시·알림·스토리지 등 10종)을 실제 소스 호출과 대조. **JavaScript뿐 아니라 Python·Ruby·Go·C#·Java·PHP·Rust 구현도 인식**합니다(1.13).
93
+
94
+ `verify-claim`의 통과는 적용된 증거 검사 통과이며 요구사항의 의미적 정확성 보장이 아닙니다. 단건 `--json`의 `evidenceLevel: "executed"`에는 실패한 실행도 포함되고 `semanticVerified`는 항상 `false`입니다. `--run-tests`를 지정해도 명령이 없거나 차단되면 실행을 건너뜁니다. `ok`·`reasons`·`run.skipped`·`run.allPassed`를 함께 확인하세요. [검증 결과 해석 및 실행 예제](docs/verification-evidence.md)를 참고하세요.
93
95
  - `lazy detect` — 증거 없는 done, 빈 handoff, 테스트 미실행, 미추적 TODO를 탐지.
94
96
  - 정직한 완료는 통과하고 가짜 완료만 exit 1로 차단 — `gate` 또는 CI에 그대로 연결됩니다.
95
97
 
package/README.md CHANGED
@@ -39,9 +39,9 @@ npx leerness task update T-0002 --status done --evidence "payment.js implemented
39
39
  npx leerness verify-claim T-0002 # exit 1 — payment.js does not exist. Claim rejected.
40
40
  ```
41
41
 
42
- Now actually write `payment.js`, then run the **same** `verify-claim T-0002` it exits 0. That is the whole idea: **"done" must match reality.**
42
+ Now write the implementation and record evidence, then run the **same** `verify-claim T-0002` again. A successful check means the applicable evidence checks passed; creating a file alone does not prove that the payment API works.
43
43
 
44
- > Tip: if your evidence claims a specific test count (e.g. "5 tests passed"), leerness counts the test functions actually present and rejects a claim that exceeds them so claim only what's true. That default is a static count of test declarations, not proof they pass; add `--run-tests --test-cmd "<your test cmd>"` to verify they actually pass by running them.
44
+ > Tip: test counts are static declaration-pattern heuristics, not execution or coverage proof. Add `--run-tests --test-cmd "<your trusted test command>" --json` to check the selected command's exit status and supported reporter output. `evidenceLevel: "executed"` includes failed runs; inspect `ok`, `reasons`, and `run` together. `semanticVerified` remains `false`. See [verification evidence and runnable examples](docs/verification-evidence.md) for skipped runs, unparsed output, and reporting limits.
45
45
 
46
46
  > Want a smaller footprint? `leerness init . --minimal` installs only the core memory + verification files instead of the full set.
47
47
 
@@ -98,6 +98,11 @@ Git-private/common scopes with `leerness state inspect . --json`. It is read-onl
98
98
  migration, runtime activation, or provider calls. See [the state inspection API](docs/state-paths-api.md)
99
99
  and [the staged architecture plan](docs/state-scopes.md).
100
100
 
101
+ `leerness state compatibility . --json` separately checks whether the observed runtime
102
+ layout permits this client's legacy writes. It creates no state and exposes bounded
103
+ failure reasons. This is a pre-migration compatibility guard, not a migration or a way
104
+ to stop older clients. See [the compatibility API and limits](docs/runtime-compatibility-api.md).
105
+
101
106
  By default leerness is **cooperative**: your AI agent runs the commands because CLAUDE.md / AGENTS.md tell it to. A determined agent could skip them. To turn the guideline into a guardrail:
102
107
 
103
108
  ```bash
@@ -161,7 +166,7 @@ MIT
161
166
  <!-- leerness:project-readme:start -->
162
167
  ## Leerness Project Harness
163
168
 
164
- 이 프로젝트는 Leerness v1.36.186 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
169
+ 이 프로젝트는 Leerness v1.36.188 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
165
170
 
166
171
  ### 정체성 — AI 에이전트 운영 레이어 (UR-0030)
167
172
 
@@ -215,7 +220,7 @@ leerness memory restore decision <date|title>
215
220
 
216
221
  ### MCP server (외부 AI 통합)
217
222
 
218
- Leerness v1.36.186는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **98개 도구**를 노출:
223
+ Leerness v1.36.188는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **98개 도구**를 노출:
219
224
 
220
225
  ```jsonc
221
226
  // 카테고리별
@@ -236,7 +241,7 @@ Leerness v1.36.186는 stdio JSON-RPC MCP server를 내장합니다 — Claude Co
236
241
  `<<autonomous-loop-dynamic>>` 신호만 보내면 AI가:
237
242
  1) 다음 라운드 후보 선정 → 2) 코드 변경 → 3) 회귀 테스트 갱신 → 4) 전체 e2e 스위트 통과 → 5) npm publish + git tag → 6) main push → 7) session close → 8) 다음 라운드 예약.
238
243
 
239
- 현재 누적: **v1.9.x → 1.36.186 릴리스 태그 이력** (수백 라운드) · _reports/는 비공개 보존.
244
+ 현재 누적: **v1.9.x → 1.36.188 릴리스 태그 이력** (수백 라운드) · _reports/는 비공개 보존.
240
245
 
241
246
  ### 성능 가이드
242
247
 
@@ -274,5 +279,5 @@ leerness release pack --close --auto-main-push
274
279
  - `.leerness/session-handoff.md`: 다음 세션 인수인계 (자동 작성)
275
280
  - `.leerness/lessons.md` / `decisions.md` / `rules.md`: 영구 메모리 (5 surface)
276
281
 
277
- Last synced by Leerness v1.36.186: 2026-09-05
282
+ Last synced by Leerness v1.36.188: 2026-09-08
278
283
  <!-- leerness:project-readme:end -->