leerness 1.9.426 → 1.9.428
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 +29 -0
- package/README.md +5 -5
- package/bin/leerness.js +59 -8
- package/lib/review-request.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.428 — 2026-06-07 — --json 순수성: check / plan show / review-request (10th 외부평가 UR-0128)
|
|
4
|
+
|
|
5
|
+
**📐 자동화 소비자(CI/MCP)를 위한 --json 일관성 — 텍스트만 내던 3개 경로를 순수 JSON 화.**
|
|
6
|
+
|
|
7
|
+
### 변경
|
|
8
|
+
- **`check --json`**: 텍스트("✓ … present") → `{ root, healthy, issues, checks:[{name,kind,ok}] }`.
|
|
9
|
+
- **`plan show --json`**: raw 마크다운(frontmatter 포함) → `{ exists, milestones:[…], raw }`.
|
|
10
|
+
- **`review-request "" --json`**: 텍스트 usage 에러 → `failJson` 으로 `{ ok:false, error, code:"review_request_empty" }`.
|
|
11
|
+
- 텍스트 모드는 출력 무변경(회귀 0).
|
|
12
|
+
|
|
13
|
+
### 검증
|
|
14
|
+
- **selftest 173→174 PASS** (planShow text=비JSON / --json=JSON 행위검증 + 3핸들러 소스 가드).
|
|
15
|
+
- **E2E 무회귀**.
|
|
16
|
+
|
|
17
|
+
### 잔여 (UR-0128 후속)
|
|
18
|
+
drift --auto-fix --json 비순수(dirty WS, 한국어 로그 선행) + audit --fix --json stale findings 는 후속 라운드.
|
|
19
|
+
|
|
20
|
+
## 1.9.427 — 2026-06-07 — DI 완전성 메타체크: 모듈화 회귀 근본 차단 (UR-0131)
|
|
21
|
+
|
|
22
|
+
**🛡️ 10번째 외부평가의 구조적 발견(selftest가 DI 누락 회귀를 못 잡음) 근본 해결.**
|
|
23
|
+
|
|
24
|
+
### 변경
|
|
25
|
+
- **selftest 신규 케이스**: 6개 DI 모듈(review-request/audit/drift/health/agents/session-close) 각각의 `const {...} = deps` destructure 이름이 **bin wrapper 의 전달 deps 객체에 모두 포함**되는지 소스 분석으로 검증. 누락 시 selftest 실패 → 향후 모듈 추출에서 `STATUSES`류 dep 누락(1.9.423 회귀)을 **자동 적발**.
|
|
26
|
+
- 자기참조 함정 회피: 케이스의 regex 리터럴이 자신을 매치하지 않도록 `return ` 프리픽스로 실제 wrapper 만 타깃.
|
|
27
|
+
|
|
28
|
+
### 검증 (회귀 0)
|
|
29
|
+
- **selftest 172→173 PASS**. 회귀 적발력 확인: health destructure 에서 STATUSES 임시 제거 시 메타체크가 정확히 실패, 복원 시 통과.
|
|
30
|
+
- **E2E 무회귀**.
|
|
31
|
+
|
|
3
32
|
## 1.9.426 — 2026-06-07 — 10번째 외부평가: 모듈화 회귀(health) 수정 + contract/rule 일관성 (UR-0128~0131)
|
|
4
33
|
|
|
5
34
|
**🔍 10번째 외부 멀티모델 리뷰(Codex GPT-5.5 + Claude Sonnet/Opus 4.8, README 미참조 클린룸, 1.9.425)로 6회 모듈화 직후 무결성 독립 검증 — 모듈화 회귀 1건 적발·수정.**
|
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.428 하네스를 사용합니다. 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.428는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **85개 도구**를 노출:
|
|
529
529
|
|
|
530
530
|
```jsonc
|
|
531
531
|
// 카테고리별
|
|
@@ -546,7 +546,7 @@ Leerness v1.9.426는 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.428)** · 매 라운드 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.428: 2026-06-07
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/leerness.js
CHANGED
|
@@ -31,7 +31,7 @@ const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInG
|
|
|
31
31
|
// 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
|
|
32
32
|
const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST, _DEFAULT_PLATFORM_CONSTRAINTS, _DEFAULT_DOMAIN_CATALOG, _LSP_LANG_PATTERNS, OPTIMISM_PATTERNS, BUILT_IN_PERSONAS, STRINGS, BUILTIN_CATALOG, ROADMAP_STATUS_LABEL, ROADMAP_STATUS_COLOR, SECRET_PATTERNS, MERGE_OVERWRITE_FILES, MINIMAL_SKIP_KEYS, REQUIRED_WORKSPACE_FILES, KEYWORD_STOPWORDS, SKILL_CATALOG_PRESETS } = require('../lib/catalogs'); // 1.9.344/368/369 (UR-0025): catalog 분리 (MERGE_OVERWRITE_FILES/MINIMAL_SKIP_KEYS 포함)
|
|
33
33
|
|
|
34
|
-
const VERSION = '1.9.
|
|
34
|
+
const VERSION = '1.9.428';
|
|
35
35
|
|
|
36
36
|
// 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
|
|
37
37
|
// 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
|
|
@@ -3185,6 +3185,53 @@ function _selfTestCases() {
|
|
|
3185
3185
|
try { const j = JSON.parse(out); behavOk = j.estimatedType === 'feature' && Array.isArray(j.recommendedSteps) && j.recommendedSteps.length === 5; } catch {}
|
|
3186
3186
|
return expOk && delegated && movedToLib && behavOk;
|
|
3187
3187
|
} },
|
|
3188
|
+
{ name: '10th 외부평가 회귀가드 (UR-0131): DI 완전성 — 각 lib 모듈 destructure deps ⊆ bin wrapper 전달(STATUSES류 누락 자동 적발) (1.9.427)', run: () => {
|
|
3189
|
+
const src = read(__filename);
|
|
3190
|
+
const dir = path.join(path.dirname(__filename), '..', 'lib');
|
|
3191
|
+
// 'return ' 프리픽스로 실제 wrapper 만 매치(이 케이스의 regex 리터럴 자기참조 회피 — 리터럴엔 return 없음)
|
|
3192
|
+
const mods = [
|
|
3193
|
+
['review-request', /return _reviewRequest\.reviewRequestCmd\([^{]*\{([^}]*)\}/],
|
|
3194
|
+
['audit', /return _audit\.audit\([^{]*\{([^}]*)\}/],
|
|
3195
|
+
['drift', /return _drift\.driftCheckCmd\([^{]*\{([^}]*)\}/],
|
|
3196
|
+
['health', /return _health\.healthCmd\([^{]*\{([^}]*)\}/],
|
|
3197
|
+
['agents', /return _agents\.agentsCmd\([^{]*\{([^}]*)\}/],
|
|
3198
|
+
['session-close', /return _sessionClose\.sessionClose\([^{]*\{([^}]*)\}/],
|
|
3199
|
+
];
|
|
3200
|
+
for (const [mod, re] of mods) {
|
|
3201
|
+
let modSrc; try { modSrc = read(path.join(dir, mod + '.js')); } catch { return false; }
|
|
3202
|
+
const dm = modSrc.match(/const \{([^}]*)\} = deps;/);
|
|
3203
|
+
if (!dm) return false;
|
|
3204
|
+
const need = dm[1].split(',').map(s => s.trim()).filter(Boolean);
|
|
3205
|
+
const wm = src.match(re);
|
|
3206
|
+
if (!wm) return false;
|
|
3207
|
+
const passed = new Set(wm[1].split(',').map(s => s.trim().split(':')[0].trim()).filter(Boolean));
|
|
3208
|
+
for (const n of need) if (!passed.has(n)) return false; // wrapper 가 누락한 dep → 실패(회귀 적발)
|
|
3209
|
+
}
|
|
3210
|
+
return true;
|
|
3211
|
+
} },
|
|
3212
|
+
{ name: '10th 외부평가 UR-0128: check/plan show/review-request --json 순수성 (1.9.428)', run: () => {
|
|
3213
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), '__leerness_json_'));
|
|
3214
|
+
let pass = false;
|
|
3215
|
+
const _w = process.stdout.write; let out = '';
|
|
3216
|
+
const _argv = process.argv.slice(); // 외부 호출(doctor --json/selftest --json)의 argv 격리·복원
|
|
3217
|
+
try {
|
|
3218
|
+
fs.mkdirSync(path.join(tmp, '.harness'), { recursive: true });
|
|
3219
|
+
const cap = fn => { out = ''; process.stdout.write = s => { out += s; return true; }; try { fn(); } finally { process.stdout.write = _w; } return out; };
|
|
3220
|
+
process.argv = _argv.filter(a => a !== '--json'); // 텍스트 모드 강제(외부 --json 제거)
|
|
3221
|
+
const a = cap(() => planShow(tmp)); // 텍스트 → JSON 아니어야
|
|
3222
|
+
process.argv = _argv.filter(a => a !== '--json').concat('--json'); // JSON 모드 강제
|
|
3223
|
+
const b = cap(() => planShow(tmp)); // --json → JSON
|
|
3224
|
+
let bOk = false; try { const j = JSON.parse(b); bOk = typeof j.exists === 'boolean' && Array.isArray(j.milestones); } catch {}
|
|
3225
|
+
const aNotJson = (() => { try { JSON.parse(a); return false; } catch { return true; } })();
|
|
3226
|
+
pass = bOk && aNotJson;
|
|
3227
|
+
} catch (e) { pass = false; } finally { process.argv = _argv; process.stdout.write = _w; try { fs.rmSync(tmp, { recursive: true, force: true }); } catch {} }
|
|
3228
|
+
// 소스 가드: 세 핸들러가 has('--json') 분기를 가짐
|
|
3229
|
+
const src = read(__filename);
|
|
3230
|
+
const guards = src.includes("if (json) { log(JSON.stringify({ root, healthy") && src.includes('plan show --json 구조화');
|
|
3231
|
+
const rrSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'review-request.js'));
|
|
3232
|
+
const rrGuard = rrSrc.includes("failJson(!!(has && has('--json')), 'review_request_empty'");
|
|
3233
|
+
return pass && guards && rrGuard;
|
|
3234
|
+
} },
|
|
3188
3235
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3189
3236
|
];
|
|
3190
3237
|
}
|
|
@@ -6055,7 +6102,7 @@ function upsertProgress(root, row) {
|
|
|
6055
6102
|
});
|
|
6056
6103
|
}
|
|
6057
6104
|
|
|
6058
|
-
function planShow(root) { const p = planPath(root);
|
|
6105
|
+
function planShow(root) { const p = planPath(root); const has_ = exists(p); const content = has_ ? read(p) : ''; if (has('--json')) { const milestones = (content.match(/^### (M-\d{4})\b.*$/gm) || []).map(l => l.replace(/^###\s*/, '').trim()); log(JSON.stringify({ exists: has_, milestones, raw: content }, null, 2)); return; } log(has_ ? content : 'plan.md not found'); } // 1.9.428 (UR-0128): plan show --json 구조화
|
|
6059
6106
|
function planInit(root) { const goal = arg('--goal', ''); if (!exists(planPath(root))) return install(root); append(planPath(root), `\n## User Goal\n- ${goal || '사용자 목적을 작성하세요.'}\n`); ok('plan goal appended'); }
|
|
6060
6107
|
// 1.9.119: plan list — plan.md 의 모든 milestone (M-XXXX) 조회 (CLI + --json + MCP)
|
|
6061
6108
|
function planListCmd(root, opts = {}) {
|
|
@@ -7221,14 +7268,18 @@ function lazyDetect(root, opts = {}) {
|
|
|
7221
7268
|
|
|
7222
7269
|
function preCheck(root) {
|
|
7223
7270
|
root = absRoot(root);
|
|
7271
|
+
const json = has('--json'); // 1.9.428 (10th 외부평가 UR-0128): check --json 순수 JSON
|
|
7272
|
+
const checks = [];
|
|
7224
7273
|
let issues = 0;
|
|
7225
7274
|
const required = ['.harness/plan.md','.harness/progress-tracker.md','.harness/protected-files.md','AGENTS.md'];
|
|
7226
|
-
for (const f of required)
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
const
|
|
7231
|
-
|
|
7275
|
+
for (const f of required) { const present = exists(path.join(root,f)); checks.push({ name: f, kind: 'required', ok: present }); if (!present) { issues++; if (!json) fail(`missing: ${f}`); } }
|
|
7276
|
+
for (const [name, p] of [['session-handoff', handoffPath(root)], ['current-state', currentStatePath(root)], ['plan', planPath(root)]]) { const present = exists(p); checks.push({ name, kind: 'state', ok: present }); if (present && !json) ok(`${name} present`); }
|
|
7277
|
+
const pfPath = path.join(root,'.harness/protected-files.md');
|
|
7278
|
+
const pf = exists(pfPath) ? read(pfPath) : '';
|
|
7279
|
+
const pfOk = pf.includes('AGENTS.md');
|
|
7280
|
+
checks.push({ name: 'protected-files.md AGENTS.md', kind: 'integrity', ok: pfOk });
|
|
7281
|
+
if (!pfOk) { issues++; if (!json) fail('protected-files.md missing AGENTS.md'); }
|
|
7282
|
+
if (json) { log(JSON.stringify({ root, healthy: issues === 0, issues, checks }, null, 2)); if (issues) process.exitCode = 1; return; }
|
|
7232
7283
|
if (issues === 0) ok('pre-action check passed');
|
|
7233
7284
|
else { process.exitCode = 1; }
|
|
7234
7285
|
}
|
package/lib/review-request.js
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
const cp = require('child_process');
|
|
6
6
|
const path = require('path');
|
|
7
|
-
const { absRoot, exists, read, log, fail } = require('./io');
|
|
7
|
+
const { absRoot, exists, read, log, fail, failJson } = require('./io');
|
|
8
8
|
|
|
9
9
|
function reviewRequestCmd(root, request, deps = {}) {
|
|
10
10
|
const { has, harnessPath, _checkRequestConstraints, _recordRun } = deps;
|
|
11
11
|
root = absRoot(root || process.cwd());
|
|
12
12
|
if (!request || !String(request).trim()) {
|
|
13
|
-
|
|
13
|
+
// 1.9.428 (10th 외부평가 UR-0128): --json 오류 경로도 순수 JSON (failJson 이 모드 분기)
|
|
14
|
+
return failJson(!!(has && has('--json')), 'review_request_empty', 'leerness review-request "<request>" — 사용자 요청 텍스트 필요');
|
|
14
15
|
}
|
|
15
16
|
const t0 = Date.now();
|
|
16
17
|
const text = String(request).trim();
|