leerness 1.9.322 → 1.9.323
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 +17 -0
- package/README.md +5 -5
- package/bin/harness.js +14 -5
- package/package.json +1 -1
- package/scripts/e2e.js +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.323 — 2026-06-05 — UR-0054 ⑥: fresh-init gate 통과 (lazy detect 부재신호 비차단)
|
|
4
|
+
|
|
5
|
+
**🚀 `leerness init` 직후 `leerness gate` 가 빈 트래커/미생성 handoff 때문에 즉시 실패하던 UX 결함 수정.**
|
|
6
|
+
|
|
7
|
+
### 배경 (UR-0054 ⑥)
|
|
8
|
+
fresh init 후 `gate`(verify+audit+scan+encoding+lazy) 중 **lazy detect 만 exit 1** — `handoff_never_generated`/`handoff_empty`/`no_test_run` 같은 "아직 작업 안 함" 신호를 lazy work 위반처럼 차단. 갓 init 한 프로젝트가 즉시 gate 실패 → 나쁜 첫인상.
|
|
9
|
+
|
|
10
|
+
### 구현 (UR-0054 ⑥)
|
|
11
|
+
1. **작업 흔적 기반 차단 판정**: `done/completed/verified` row 가 하나도 없으면(fresh/무작업) "부재" 신호(`progress_empty`/`handoff_never_generated`/`handoff_empty`/`no_test_run`)는 **어드바이저리(비차단)**. `blockingIssues = issues − advisory(무작업 시)`.
|
|
12
|
+
2. **active 프로젝트 보호 유지**: done-claim 이 있으면 모든 신호가 차단(기존 동작). 특히 `evidence_missing`(증거 없는 done)은 항상 차단.
|
|
13
|
+
3. JSON 에 `blockingIssues` 필드 추가, `healthy`/exit 는 blocking 기준.
|
|
14
|
+
4. selftest 70→71 · e2e 267→268.
|
|
15
|
+
|
|
16
|
+
### 검증
|
|
17
|
+
- **selftest 71/71 PASS** · **E2E 268/268 PASS** (회귀 0).
|
|
18
|
+
- 실측: fresh init → `lazy detect` exit **0**(issues=3 advisory, blocking=0, healthy=true) · 거짓완료(done+증거0) 추가 → exit **1**(blocking=3, evidence_missing 차단 유지).
|
|
19
|
+
|
|
3
20
|
## 1.9.322 — 2026-06-05 — UR-0044(완료): MCP handler 통합 (_mcpToCliArgs 추출)
|
|
4
21
|
|
|
5
22
|
**🧩 mcpServeCmd 의 인라인 83-case switch(name→cliArgs)를 단일 함수 `_mcpToCliArgs` 로 통합 — ToolRegistry handler 통합 완료.**
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **AI 코딩 에이전트의 거짓 완료·중복·망각·충돌을 막아주는 검수·기억·협업 CLI 하네스.**
|
|
4
4
|
> **A CLI harness that stops AI coding agents from faking completion, duplicating work, forgetting context, and colliding.**
|
|
5
5
|
|
|
6
|
-
[](https://www.npmjs.com/package/leerness) [](https://www.npmjs.com/package/leerness) []() []() []() []() []() []()
|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
╔══════════════════════════════════════════════════════════════╗
|
|
@@ -471,7 +471,7 @@ MIT — © leerness contributors
|
|
|
471
471
|
<!-- leerness:project-readme:start -->
|
|
472
472
|
## Leerness Project Harness
|
|
473
473
|
|
|
474
|
-
이 프로젝트는 Leerness v1.9.
|
|
474
|
+
이 프로젝트는 Leerness v1.9.323 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
|
|
475
475
|
|
|
476
476
|
### 정체성 — AI 에이전트 운영 레이어 (UR-0030)
|
|
477
477
|
|
|
@@ -525,7 +525,7 @@ leerness memory restore decision <date|title>
|
|
|
525
525
|
|
|
526
526
|
### MCP server (외부 AI 통합)
|
|
527
527
|
|
|
528
|
-
Leerness v1.9.
|
|
528
|
+
Leerness v1.9.323는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **83개 도구**를 노출:
|
|
529
529
|
|
|
530
530
|
```jsonc
|
|
531
531
|
// 카테고리별
|
|
@@ -546,7 +546,7 @@ Leerness v1.9.322는 stdio JSON-RPC MCP server를 내장합니다 — Claude Cod
|
|
|
546
546
|
`<<autonomous-loop-dynamic>>` 신호만 보내면 AI가:
|
|
547
547
|
1) 다음 라운드 후보 선정 → 2) 코드 변경 → 3) stress-v* 신규 작성 + 누적 회귀 → 4) e2e 219/219 → 5) npm pack + git tag + GitHub release → 6) main 자동 push (1.9.140+) → 7) session close → 8) 다음 라운드 예약.
|
|
548
548
|
|
|
549
|
-
현재 누적: **70 라운드 (1.9.40 → 1.9.
|
|
549
|
+
현재 누적: **70 라운드 (1.9.40 → 1.9.323)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
|
|
550
550
|
|
|
551
551
|
### 성능 가이드 (1.9.140 측정)
|
|
552
552
|
|
|
@@ -584,6 +584,6 @@ leerness release pack --close --auto-main-push
|
|
|
584
584
|
- `.harness/session-handoff.md`: 다음 세션 인수인계 (자동 작성)
|
|
585
585
|
- `.harness/lessons.md` / `decisions.md` / `rules.md`: 영구 메모리 (5 surface)
|
|
586
586
|
|
|
587
|
-
Last synced by Leerness v1.9.
|
|
587
|
+
Last synced by Leerness v1.9.323: 2026-06-04
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.js
CHANGED
|
@@ -15,7 +15,7 @@ const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInG
|
|
|
15
15
|
// 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
|
|
16
16
|
const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST } = require('../lib/catalogs');
|
|
17
17
|
|
|
18
|
-
const VERSION = '1.9.
|
|
18
|
+
const VERSION = '1.9.323';
|
|
19
19
|
|
|
20
20
|
// 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
|
|
21
21
|
// 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
|
|
@@ -3122,6 +3122,7 @@ function _selfTestCases() {
|
|
|
3122
3122
|
{ name: 'count drift 수정: _countDatedBlocks 코드펜스(템플릿) 제외 + 카운트 사이트 단일화 (UR-0053 1.9.320)', run: () => { const f = _countDatedBlocks; const withTpl = '# D\n\n```md\n### 2026-01-01 — Decision 제목\n- Decision:\n```\n\n### 2026-06-04 — 실제\n- Decision: 실제\n'; const c1 = f(withTpl) === 1; const c0 = f('```md\n### 2026-01-01 — x\n```\n') === 0; const c2 = f('### 2026-01-01 — A\n### 2026-02-02 — B\n') === 2; const src = read(__filename); const wired = src.includes('_countDatedBlocks(read(decisionsPath(root)))') && src.includes('_countDatedBlocks(read(lessonsPath(root)))') && src.includes('_countDatedBlocks(dtext)') && !src.includes('read(decisionsPath(root)).' + 'match(/^### '); return typeof f === 'function' && c1 && c0 && c2 && wired; } },
|
|
3123
3123
|
{ name: 'decision/lesson 필드 파싱: 빈 필드가 다음 줄로 안 샘 ([ \\t]* 사용) (UR-0053 1.9.321)', run: () => { const block = '### 2026-06-05 — X\n- Decision: X\n- Reason: r\n- Alternatives: \n- Impact: 보안\n'; const alt = block.match(/- Alternatives:[ \t]*(.+)/); const imp = block.match(/- Impact:[ \t]*(.+)/); const altNoBleed = !alt || !/Impact/.test(alt[1]); const impOk = !!imp && imp[1].trim() === '보안'; const src = read(__filename); const fixedOk = src.includes('- Alternatives:[ \\t]*(.+)') && src.includes('- Lesson:[ \\t]*(.+)') && src.includes('- Impact:[ \\t]*(.+)'); return altNoBleed && impOk && fixedOk; } },
|
|
3124
3124
|
{ name: 'MCP handler 통합: _mcpToCliArgs 단일 함수 + mcpServeCmd 호출 + 인라인 switch 단일화 (UR-0044 1.9.322)', run: () => { const src = read(__filename); const fnDef = /function _mcpToCliArgs\(name, args, targetPath\) \{/.test(src); const called = src.includes('cliArgs = _mcpToCliArgs(name, args, targetPath)'); const switchCount = (src.match(/switch \(name\) \{/g) || []).length; const nullPath = src.includes('if (cliArgs === null) return send('); return fnDef && called && switchCount === 1 && nullPath; } },
|
|
3125
|
+
{ name: 'fresh-init gate 통과: lazy detect 부재신호(handoff/test/progress) done-work 없으면 비차단 (UR-0054 ⑥ 1.9.323)', run: () => { const src = read(__filename); const doneWork = src.includes("const _hasDoneWork = rows.some(r => /^(done|completed|verified)$/i.test(r.status))"); const advisory = src.includes('_ADVISORY_KINDS') && src.includes("'handoff_never_generated'") && src.includes("'no_test_run'"); const blocking = src.includes('const blockingIssues = Math.max(0, issues - advisoryCount)') && src.includes('if (blockingIssues > 0) process.exitCode = 1'); return doneWork && advisory && blocking; } },
|
|
3125
3126
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3126
3127
|
];
|
|
3127
3128
|
}
|
|
@@ -7547,23 +7548,31 @@ function lazyDetect(root, opts = {}) {
|
|
|
7547
7548
|
issues++; _warn(`blocker without nextAction: ${b.id}`,
|
|
7548
7549
|
{ kind: 'blocker_no_next_action', severity: 'warn', taskId: b.id });
|
|
7549
7550
|
}
|
|
7551
|
+
// 1.9.323 (UR-0054 ⑥, 설치리뷰): fresh/무작업 프로젝트 gate 통과 — 작업 흔적(done/completed/verified) 없으면
|
|
7552
|
+
// "부재" 신호(progress empty / handoff 미생성·빈 / 테스트 미실행)는 비차단(어드바이저리). active 프로젝트는 기존대로 차단.
|
|
7553
|
+
// 배경: leerness init 직후 leerness gate 가 빈 트래커·미생성 handoff 때문에 즉시 실패하던 UX 결함.
|
|
7554
|
+
const _hasDoneWork = rows.some(r => /^(done|completed|verified)$/i.test(r.status));
|
|
7555
|
+
const _ADVISORY_KINDS = new Set(['progress_empty', 'handoff_never_generated', 'handoff_empty', 'no_test_run']);
|
|
7556
|
+
const advisoryCount = _hasDoneWork ? 0 : findings.filter(f => _ADVISORY_KINDS.has(f.kind)).length;
|
|
7557
|
+
const blockingIssues = Math.max(0, issues - advisoryCount);
|
|
7550
7558
|
// 1.9.101: JSON 모드 → 구조화 출력만 (process.exitCode는 일관 유지)
|
|
7551
7559
|
if (jsonMode) {
|
|
7552
7560
|
const payload = {
|
|
7553
7561
|
version: VERSION,
|
|
7554
7562
|
root,
|
|
7555
7563
|
issues,
|
|
7556
|
-
|
|
7564
|
+
blockingIssues,
|
|
7565
|
+
healthy: blockingIssues === 0,
|
|
7557
7566
|
todoCount,
|
|
7558
7567
|
newTodoCount: newTodos.length,
|
|
7559
7568
|
findings,
|
|
7560
7569
|
};
|
|
7561
7570
|
process.stdout.write(JSON.stringify(payload, null, 2) + '\n');
|
|
7562
|
-
if (
|
|
7571
|
+
if (blockingIssues > 0) process.exitCode = 1;
|
|
7563
7572
|
return;
|
|
7564
7573
|
}
|
|
7565
|
-
if (
|
|
7566
|
-
else { fail(`lazy detect found ${
|
|
7574
|
+
if (blockingIssues === 0) ok(advisoryCount > 0 ? `lazy detect passed (${advisoryCount} advisory, 0 blocking — 작업 흔적 없는 fresh 프로젝트)` : 'lazy detect passed (no obvious lazy work signals)');
|
|
7575
|
+
else { fail(`lazy detect found ${blockingIssues} blocking issues`); process.exitCode = 1; }
|
|
7567
7576
|
}
|
|
7568
7577
|
|
|
7569
7578
|
function preCheck(root) {
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -3876,5 +3876,23 @@ total++;
|
|
|
3876
3876
|
if (!ok) failed++;
|
|
3877
3877
|
}
|
|
3878
3878
|
|
|
3879
|
+
// 1.9.323 회귀 (UR-0054 ⑥): fresh init → gate(lazy detect) 통과(부재신호 비차단) + active 거짓완료는 차단 유지
|
|
3880
|
+
total++;
|
|
3881
|
+
{
|
|
3882
|
+
let ok = false;
|
|
3883
|
+
try {
|
|
3884
|
+
const fg = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-freshgate-'));
|
|
3885
|
+
cp.spawnSync(process.execPath, [CLI, 'init', fg, '--yes', '--language', 'ko', '--skills', 'recommended'], { encoding: 'utf8', timeout: 30000 });
|
|
3886
|
+
const freshExit = cp.spawnSync(process.execPath, [CLI, 'lazy', 'detect', fg], { encoding: 'utf8', timeout: 20000 }).status; // fresh → 통과(0)
|
|
3887
|
+
// 거짓완료(done + 증거0) 추가 → 다시 lazy detect → 차단(1)
|
|
3888
|
+
cp.spawnSync(process.execPath, [CLI, 'task', 'add', '거짓완료', '--status', 'done', '--evidence', '', '--path', fg, '--no-review', '--force'], { encoding: 'utf8', timeout: 20000 });
|
|
3889
|
+
const activeExit = cp.spawnSync(process.execPath, [CLI, 'lazy', 'detect', fg], { encoding: 'utf8', timeout: 20000 }).status; // 거짓완료 → 차단(1)
|
|
3890
|
+
ok = freshExit === 0 && activeExit === 1;
|
|
3891
|
+
fs.rmSync(fg, { recursive: true, force: true });
|
|
3892
|
+
} catch {}
|
|
3893
|
+
console.log(ok ? '✓ B(1.9.323) fresh-init gate: lazy detect 부재신호 비차단(통과) + 거짓완료 차단 유지 (UR-0054 ⑥)' : '✗ fresh-init gate 실패');
|
|
3894
|
+
if (!ok) failed++;
|
|
3895
|
+
}
|
|
3896
|
+
|
|
3879
3897
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
3880
3898
|
if (failed > 0) process.exit(1);
|