leerness 1.9.442 → 1.9.443
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 +13 -0
- package/README.md +4 -4
- package/bin/leerness.js +33 -7
- package/lib/pure-utils.js +19 -1
- package/package.json +1 -1
- package/scripts/e2e.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.443 — 2026-06-08 — evidence-first 완료 게이트 completion_claim_allowed (GPT-5.5 전략리뷰 §6.3/6.4, UR-0153)
|
|
4
|
+
|
|
5
|
+
**🔒 leerness 최대 차별점 강화: 증거로부터 "완료 주장 가능 여부"를 파생·노출.**
|
|
6
|
+
|
|
7
|
+
### 변경
|
|
8
|
+
- 순수 `_completionClaimAllowed(record)` (pure-utils): run-record 증거 기반 완료 게이트 — **변경 파일 존재 + 검증 실행(tests/commands) + 미해결 errors 0 + verification_result === 'pass'** 일 때만 `allowed:true`. 미검증/실패/증거부족은 사유(reasons)와 함께 불허.
|
|
9
|
+
- `state show`(text + `--json`), `state verify --json`, `state handoff`(latest.json + .md + --json) 에 `completion_claim_allowed` 노출 → 다음 에이전트/PR 리뷰어가 증거 게이트를 직접 읽음.
|
|
10
|
+
- GPT-5.5 전략리뷰가 evidence-first 를 핵심 차별점으로 명시 — run-record 14필드 스키마(기존)에 완료 가능성 판정을 더해 "완료 주장 ↔ 증거" 연결을 표면화.
|
|
11
|
+
|
|
12
|
+
### 검증 (회귀 0)
|
|
13
|
+
- **selftest 187→188** (순수 6케이스 + state/handoff 와이어), **E2E 신규 B(1.9.443)**: 증거 없음 → no(사유), 증거+verify pass → allowed.
|
|
14
|
+
- 행위 재현: state start→show(no) → record+verify pass → show(--json allowed=true, reasons=[]).
|
|
15
|
+
|
|
3
16
|
## 1.9.442 — 2026-06-08 — task 계열 positional path 지원 (12th 외부평가 Sonnet P1, UR-0141)
|
|
4
17
|
|
|
5
18
|
**🐛 P1 데이터 오염 수정: `task add "제목" ./경로` / `task list /경로` 가 무시되고 cwd 에 저장되던 문제.**
|
package/README.md
CHANGED
|
@@ -168,7 +168,7 @@ MIT
|
|
|
168
168
|
<!-- leerness:project-readme:start -->
|
|
169
169
|
## Leerness Project Harness
|
|
170
170
|
|
|
171
|
-
이 프로젝트는 Leerness v1.9.
|
|
171
|
+
이 프로젝트는 Leerness v1.9.443 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
|
|
172
172
|
|
|
173
173
|
### 정체성 — AI 에이전트 운영 레이어 (UR-0030)
|
|
174
174
|
|
|
@@ -222,7 +222,7 @@ leerness memory restore decision <date|title>
|
|
|
222
222
|
|
|
223
223
|
### MCP server (외부 AI 통합)
|
|
224
224
|
|
|
225
|
-
Leerness v1.9.
|
|
225
|
+
Leerness v1.9.443는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **85개 도구**를 노출:
|
|
226
226
|
|
|
227
227
|
```jsonc
|
|
228
228
|
// 카테고리별
|
|
@@ -243,7 +243,7 @@ Leerness v1.9.442는 stdio JSON-RPC MCP server를 내장합니다 — Claude Cod
|
|
|
243
243
|
`<<autonomous-loop-dynamic>>` 신호만 보내면 AI가:
|
|
244
244
|
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) 다음 라운드 예약.
|
|
245
245
|
|
|
246
|
-
현재 누적: **70 라운드 (1.9.40 → 1.9.
|
|
246
|
+
현재 누적: **70 라운드 (1.9.40 → 1.9.443)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
|
|
247
247
|
|
|
248
248
|
### 성능 가이드 (1.9.140 측정)
|
|
249
249
|
|
|
@@ -281,6 +281,6 @@ leerness release pack --close --auto-main-push
|
|
|
281
281
|
- `.harness/session-handoff.md`: 다음 세션 인수인계 (자동 작성)
|
|
282
282
|
- `.harness/lessons.md` / `decisions.md` / `rules.md`: 영구 메모리 (5 surface)
|
|
283
283
|
|
|
284
|
-
Last synced by Leerness v1.9.
|
|
284
|
+
Last synced by Leerness v1.9.443: 2026-06-08
|
|
285
285
|
<!-- leerness:project-readme:end -->
|
|
286
286
|
|
package/bin/leerness.js
CHANGED
|
@@ -25,13 +25,13 @@ const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _merg
|
|
|
25
25
|
_withBuiltinSource, _esc, _roadmapTokenStyles, _parseSkillMd,
|
|
26
26
|
_migrationGuideText, _parseContractSpec, _gitignoreMatch,
|
|
27
27
|
_featureGraphTemplate, _parseFeatureGraph, _nextFeatureId, _featureBlock, _featureImpactBfs,
|
|
28
|
-
_parseChangelogBetween, _cellSafe, _cellUnescape, _lineSafe, _parseLimit, _parseAddTitle, _parseImplExports, _taskPositionalPath } = require('../lib/pure-utils'); // 1.9.318~
|
|
28
|
+
_parseChangelogBetween, _cellSafe, _cellUnescape, _lineSafe, _parseLimit, _parseAddTitle, _parseImplExports, _taskPositionalPath, _completionClaimAllowed } = require('../lib/pure-utils'); // 1.9.318~443 (UR-0025/0053/0075/0086/0087/0104/0122/0141/0153): 순수 유틸 모듈 분리
|
|
29
29
|
// 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
|
|
30
30
|
const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
|
|
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.443';
|
|
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') 시 호스트 프로세스 오염.
|
|
@@ -3326,6 +3326,27 @@ function _selfTestCases() {
|
|
|
3326
3326
|
const wired = read(__filename).includes("arg('--path', null) || _taskPositionalPath(args, 2) || process.cwd()");
|
|
3327
3327
|
return pure && wired;
|
|
3328
3328
|
} },
|
|
3329
|
+
{ name: 'GPT-5.5 전략리뷰 §6.3 (UR-0153): evidence-first 완료 게이트 _completionClaimAllowed + state/handoff 노출 (1.9.443)', run: () => {
|
|
3330
|
+
const m = require('../lib/pure-utils');
|
|
3331
|
+
if (typeof m._completionClaimAllowed !== 'function' || m._completionClaimAllowed !== _completionClaimAllowed) return false;
|
|
3332
|
+
const f = m._completionClaimAllowed;
|
|
3333
|
+
const ok = f({ files_changed: ['a.js'], tests_run: ['npm test'], errors: [], verification_result: 'pass' });
|
|
3334
|
+
const noFiles = f({ files_changed: [], tests_run: ['t'], verification_result: 'pass' });
|
|
3335
|
+
const noVerifyRun = f({ files_changed: ['a'], tests_run: [], commands_run: [], verification_result: 'pass' });
|
|
3336
|
+
const failed = f({ files_changed: ['a'], tests_run: ['t'], verification_result: 'fail' });
|
|
3337
|
+
const notVerified = f({ files_changed: ['a'], commands_run: ['c'], verification_result: null });
|
|
3338
|
+
const withErr = f({ files_changed: ['a'], tests_run: ['t'], errors: ['boom'], verification_result: 'pass' });
|
|
3339
|
+
const pure = ok.allowed === true && ok.reasons.length === 0
|
|
3340
|
+
&& noFiles.allowed === false && noFiles.reasons.includes('no_files_changed')
|
|
3341
|
+
&& noVerifyRun.allowed === false && noVerifyRun.reasons.includes('no_verification_run')
|
|
3342
|
+
&& failed.allowed === false && failed.reasons.includes('verification_failed')
|
|
3343
|
+
&& notVerified.allowed === false && notVerified.reasons.includes('not_verified')
|
|
3344
|
+
&& withErr.allowed === false && withErr.reasons.includes('unresolved_errors');
|
|
3345
|
+
const src = read(__filename);
|
|
3346
|
+
const wired = src.includes('completion_claim_allowed: rec ? _completionClaimAllowed(rec) : null') // state show json
|
|
3347
|
+
&& src.includes('completion_claim_allowed: _ccaH'); // handoff json + latest.json
|
|
3348
|
+
return pure && wired;
|
|
3349
|
+
} },
|
|
3329
3350
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3330
3351
|
];
|
|
3331
3352
|
}
|
|
@@ -16541,7 +16562,7 @@ function stateCmd(root, sub, ...args) {
|
|
|
16541
16562
|
if (note) rec.decisions = [...(rec.decisions || []), `verify(${result}): ${note}`];
|
|
16542
16563
|
});
|
|
16543
16564
|
if (!rec) return fail(`run 없음: ${curId}`);
|
|
16544
|
-
if (json) { log(JSON.stringify({ verified: curId, result, run: rec }, null, 2)); return; }
|
|
16565
|
+
if (json) { log(JSON.stringify({ verified: curId, result, run: rec, completion_claim_allowed: _completionClaimAllowed(rec) }, null, 2)); return; }
|
|
16545
16566
|
(result === 'pass' ? ok : warn)(`검증 결과: ${curId} → ${result}`);
|
|
16546
16567
|
return;
|
|
16547
16568
|
}
|
|
@@ -16556,19 +16577,22 @@ function stateCmd(root, sub, ...args) {
|
|
|
16556
16577
|
if (!rec) return fail(`run 없음: ${curId}`);
|
|
16557
16578
|
// 다음 에이전트가 읽을 latest handoff (json + md)
|
|
16558
16579
|
const hdir = path.join(_leernessStateDir(root), 'handoff'); mkdirp(hdir);
|
|
16559
|
-
|
|
16580
|
+
// 1.9.443 (UR-0153): handoff evidence 에 completion_claim_allowed 포함 — 다음 에이전트/PR 이 증거 게이트를 직접 읽음.
|
|
16581
|
+
const _ccaH = _completionClaimAllowed(rec);
|
|
16582
|
+
writeUtf8(path.join(hdir, 'latest.json'), JSON.stringify({ ...rec, completion_claim_allowed: _ccaH }, null, 2) + '\n');
|
|
16560
16583
|
writeUtf8(path.join(hdir, 'latest.md'),
|
|
16561
|
-
`# Handoff — ${rec.run_id}\n\n- task: ${rec.task_id || '-'}\n- agent: ${rec.agent_name || '-'} · model: ${rec.model_name || '-'}\n- goal: ${rec.goal || '-'}\n- files_changed: ${rec.files_changed.join(', ') || '-'}\n- tests_run: ${rec.tests_run.join(', ') || '-'}\n- verification: ${rec.verification_result || '-'}\n\n## Summary\n${rec.handoff_summary}\n`);
|
|
16584
|
+
`# Handoff — ${rec.run_id}\n\n- task: ${rec.task_id || '-'}\n- agent: ${rec.agent_name || '-'} · model: ${rec.model_name || '-'}\n- goal: ${rec.goal || '-'}\n- files_changed: ${rec.files_changed.join(', ') || '-'}\n- tests_run: ${rec.tests_run.join(', ') || '-'}\n- verification: ${rec.verification_result || '-'}\n- completion_claim_allowed: ${_ccaH.allowed ? 'yes' : 'no (' + _ccaH.reasons.join(', ') + ')'}\n\n## Summary\n${rec.handoff_summary}\n`);
|
|
16562
16585
|
state.currentRunId = null; // 다음 에이전트가 새 run 시작
|
|
16563
16586
|
_saveLeernessState(root, state);
|
|
16564
|
-
if (json) { log(JSON.stringify({ handoff: rec.run_id, run: rec }, null, 2)); return; }
|
|
16587
|
+
if (json) { log(JSON.stringify({ handoff: rec.run_id, run: rec, completion_claim_allowed: _ccaH }, null, 2)); return; }
|
|
16565
16588
|
ok(`handoff 작성: ${rec.run_id} → .leerness/handoff/latest.{md,json}`);
|
|
16566
16589
|
return;
|
|
16567
16590
|
}
|
|
16568
16591
|
|
|
16569
16592
|
// default: show
|
|
16570
16593
|
const rec = curId ? _loadRun(root, curId) : null;
|
|
16571
|
-
|
|
16594
|
+
// 1.9.443 (UR-0153): evidence-first 완료 게이트 파생 노출.
|
|
16595
|
+
if (json) { log(JSON.stringify({ state, currentRun: rec, completion_claim_allowed: rec ? _completionClaimAllowed(rec) : null }, null, 2)); return; }
|
|
16572
16596
|
log(`# leerness state (1.9.278, UR-0032) — .leerness/ 구조화 상태`);
|
|
16573
16597
|
log(`project: ${state.project} · runs 누적: ${state.runCounter || 0} · 현재 run: ${curId || '(없음)'}`);
|
|
16574
16598
|
if (rec) {
|
|
@@ -16580,6 +16604,8 @@ function stateCmd(root, sub, ...args) {
|
|
|
16580
16604
|
log(` commands_run: ${rec.commands_run.join(', ') || '-'}`);
|
|
16581
16605
|
log(` tests_run: ${rec.tests_run.join(', ') || '-'} · verification: ${rec.verification_result || '-'}`);
|
|
16582
16606
|
if (rec.decisions.length) log(` decisions: ${rec.decisions.length}`);
|
|
16607
|
+
const _cca = _completionClaimAllowed(rec); // 1.9.443 (UR-0153): 증거 기반 완료 주장 가능 여부
|
|
16608
|
+
log(` completion_claim_allowed: ${_cca.allowed ? 'yes ✓' : 'no ✗ (' + _cca.reasons.join(', ') + ')'}`);
|
|
16583
16609
|
} else {
|
|
16584
16610
|
log(` → 시작: leerness state start "<goal>" [--agent claude --model claude-opus-4-7 --task T-0001]`);
|
|
16585
16611
|
}
|
package/lib/pure-utils.js
CHANGED
|
@@ -162,6 +162,22 @@ function _newRunRecord(opts = {}) {
|
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
// 1.9.443 (GPT-5.5 전략리뷰 §6.3/6.4, UR-0153): evidence-first 완료 게이트 — run-record 증거로 "완료 주장 가능" 여부 파생.
|
|
166
|
+
// 허용 조건: 변경 파일 존재 + 검증 실행(tests/commands) + 미해결 errors 0 + verification_result === 'pass'.
|
|
167
|
+
// verification 미실행/실패는 불허(증거 없는 완료 차단). reasons 로 불허 사유 명시. 순수 함수(저장 X, 읽을 때 계산).
|
|
168
|
+
function _completionClaimAllowed(rec) {
|
|
169
|
+
const r = rec || {};
|
|
170
|
+
const A = (x) => (Array.isArray(x) ? x : []);
|
|
171
|
+
const reasons = [];
|
|
172
|
+
if (A(r.files_changed).length === 0) reasons.push('no_files_changed');
|
|
173
|
+
if (A(r.tests_run).length === 0 && A(r.commands_run).length === 0) reasons.push('no_verification_run');
|
|
174
|
+
if (A(r.errors).length > 0) reasons.push('unresolved_errors');
|
|
175
|
+
const vr = String(r.verification_result || '').toLowerCase();
|
|
176
|
+
if (vr === 'fail') reasons.push('verification_failed');
|
|
177
|
+
else if (vr !== 'pass') reasons.push('not_verified');
|
|
178
|
+
return { allowed: reasons.length === 0, reasons };
|
|
179
|
+
}
|
|
180
|
+
|
|
165
181
|
// 1.9.318 (UR-0025): 순수 HTML 파싱 유틸 (api-skill 문서 수집용) — fs/네트워크 의존 0, URL/regex 만 사용.
|
|
166
182
|
function _htmlToText(html) {
|
|
167
183
|
if (!html) return '';
|
|
@@ -1007,7 +1023,9 @@ module.exports = {
|
|
|
1007
1023
|
// 1.9.416 (9th 외부평가, UR-0122): add 류 제목 파싱(flag/경로 break) 단일 출처
|
|
1008
1024
|
_parseAddTitle,
|
|
1009
1025
|
// 1.9.442 (12th 외부평가, UR-0141): task 계열 positional path 안전 추출
|
|
1010
|
-
_taskPositionalPath
|
|
1026
|
+
_taskPositionalPath,
|
|
1027
|
+
// 1.9.443 (GPT-5.5 전략리뷰 §6.3, UR-0153): evidence-first 완료 게이트
|
|
1028
|
+
_completionClaimAllowed
|
|
1011
1029
|
};
|
|
1012
1030
|
|
|
1013
1031
|
// 1.9.355 (UR-0075 Phase A): AI 에이전트용 크로스버전 마이그레이션 안전 워크플로 가이드 (순수 텍스트). 임시설치 + --path + 백업 + diff 검증.
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -6131,5 +6131,27 @@ total++;
|
|
|
6131
6131
|
if (!ok) failed++;
|
|
6132
6132
|
}
|
|
6133
6133
|
|
|
6134
|
+
// 1.9.443 (GPT-5.5 전략리뷰 §6.3, UR-0153): evidence-first 완료 게이트 — state 워크플로에서 completion_claim_allowed 파생.
|
|
6135
|
+
total++;
|
|
6136
|
+
{
|
|
6137
|
+
let ok = false;
|
|
6138
|
+
try {
|
|
6139
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-cca-'));
|
|
6140
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
6141
|
+
cp.spawnSync(process.execPath, [CLI, 'state', 'start', '목표', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
6142
|
+
const before = cp.spawnSync(process.execPath, [CLI, 'state', 'show', '--json', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
6143
|
+
cp.spawnSync(process.execPath, [CLI, 'state', 'record', '--files-changed', 'a.js', '--tests', 'npm test', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
6144
|
+
cp.spawnSync(process.execPath, [CLI, 'state', 'verify', 'pass', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
6145
|
+
const after = cp.spawnSync(process.execPath, [CLI, 'state', 'show', '--json', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
6146
|
+
const bj = JSON.parse(before.stdout);
|
|
6147
|
+
const aj = JSON.parse(after.stdout);
|
|
6148
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
6149
|
+
ok = bj.completion_claim_allowed && bj.completion_claim_allowed.allowed === false
|
|
6150
|
+
&& aj.completion_claim_allowed && aj.completion_claim_allowed.allowed === true;
|
|
6151
|
+
} catch {}
|
|
6152
|
+
console.log(ok ? '✓ B(1.9.443) UR-0153: evidence-first completion_claim_allowed (증거없음=no, 증거+pass=yes)' : '✗ completion_claim_allowed 실패');
|
|
6153
|
+
if (!ok) failed++;
|
|
6154
|
+
}
|
|
6155
|
+
|
|
6134
6156
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
6135
6157
|
if (failed > 0) process.exit(1);
|