leerness 1.9.415 → 1.9.416
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 +19 -0
- package/README.md +5 -5
- package/bin/harness.js +27 -12
- package/lib/pure-utils.js +17 -1
- package/package.json +1 -1
- package/scripts/e2e.js +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.416 — 2026-06-07 — add류 CLI 인자 일관성: 경로 흡수 차단 + 빈 입력 거부 (9번째 외부평가, UR-0122)
|
|
4
|
+
|
|
5
|
+
**🧩 9번째 외부평가의 최강 UX 발견(3모델 공통: CLI 인자 규칙 불일치) 보강 — `task add`/`requests add`/`decision add` 의 제목 파싱을 단일 출처로 통일.**
|
|
6
|
+
|
|
7
|
+
### 배경
|
|
8
|
+
Sonnet P1 + Codex: `task add "제목" /some/path` 가 경로를 제목에 흡수("제목 /some/path")하던 반면 `decision add` 는 1.9.351(UR-0064)에서 이미 경로형 positional 을 차단. 같은 add 패러다임에서 동작이 갈려 혼란.
|
|
9
|
+
|
|
10
|
+
### 수정
|
|
11
|
+
- **`_parseAddTitle(args, startIdx)` 순수 헬퍼**(pure-utils): positional 을 join 하되 첫 `--flag` 또는 경로형 토큰(`/x`, `C:\x`, `./x`, `../x`)에서 멈춤 — **단일 출처**.
|
|
12
|
+
- `task add` / `requests add` / `decision add` 모두 이 헬퍼 사용 → 경로 흡수 일관 차단.
|
|
13
|
+
- **빈/경로-only 제목 거부**: `task add ""`, `task add /path` 등 → `failJson`(--json 시 `{ok:false,code:"empty_title"}`) + **exit 1**(기존엔 빈 task 생성). decision/requests add 동일.
|
|
14
|
+
|
|
15
|
+
### 검증 (회귀 0)
|
|
16
|
+
- **selftest 161→162 PASS** (_parseAddTitle 4 단위 + task/requests 와이어).
|
|
17
|
+
- **E2E 415→416 PASS** (경로 흡수 차단 + 빈/경로-only exit 1 + --json + requests 경로 break).
|
|
18
|
+
|
|
19
|
+
### 후속 백로그 (다음 라운드)
|
|
20
|
+
team add/show positional path 일관성(UR-0122 잔여) · status/health "healthy" 라벨(UR-0121 잔여) · contract field 범용화(UR-0123) · init 프로파일/명령 계층화(UR-0124).
|
|
21
|
+
|
|
3
22
|
## 1.9.415 — 2026-06-07 — 정직성 수정: handoff 보안 헤드라인 false-OK + scan/encoding/contract --json (9번째 외부평가, UR-0121)
|
|
4
23
|
|
|
5
24
|
**🚨 9번째 외부 멀티모델 리뷰(Codex GPT-5.5 + Claude Sonnet/Opus 4.8, README 미참조 클린룸)에서 발견한 "의미적 false-OK"를 수정 — leerness 정체성(정직/anti-laziness)과 정면 충돌하던 결함.**
|
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.416 하네스를 사용합니다. 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.416는 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.415는 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.416)** · 매 라운드 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.416: 2026-06-07
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.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 } = require('../lib/pure-utils'); // 1.9.318~
|
|
28
|
+
_parseChangelogBetween, _cellSafe, _cellUnescape, _lineSafe, _parseLimit, _parseAddTitle } = require('../lib/pure-utils'); // 1.9.318~416 (UR-0025/0053/0075/0086/0087/0104/0122): 순수 유틸 모듈 분리
|
|
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.416';
|
|
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') 시 호스트 프로세스 오염.
|
|
@@ -3025,6 +3025,18 @@ function _selfTestCases() {
|
|
|
3025
3025
|
{ name: '8번째 버그헌트 (UR-0115): lazy detect --auto-track 단일 RMW 배치(O(T×N)→O(N+T)) (1.9.411)', run: () => { const src = read(__filename); const batched = src.includes("8번째 버그헌트, UR-0115") && /has\('--auto-track'\)[\s\S]{0,500}?_withLock\(progressPath\(root\), \(\) => \{[\s\S]{0,1200}?writeProgressRows/.test(src); const noPerTodoUpsert = !/for \(const t of newTodos\) \{\s*const id = nextId\(root, 'T'\);/.test(src); return batched && noPerTodoUpsert; } },
|
|
3026
3026
|
{ name: '6번째 외부평가 Opus P1 (UR-0100): list-family(decision/feature/plan/runs/team list) positional path 지원 (조용한 cwd 오독 차단) (1.9.412)', run: () => { const src = read(__filename); const L = '_resolveRoot('; const decOk = src.includes("decisionListCmd(absRoot(" + L + "args[2]))"); const planOk = src.includes("planListCmd(absRoot(" + L + "args[2]))"); const featOk = src.includes("featureListCmd(absRoot(" + L + "args[2]))"); const runsOk = src.includes("runsListCmd(absRoot(" + L + "args[2]))"); const teamOk = src.includes(L + "args[1] === 'list' ? args[2] : null)"); return decOk && planOk && featOk && runsOk && teamOk; } },
|
|
3027
3027
|
{ name: '6번째 외부평가 codex P2 (UR-0101): action 명령(task/decision/rule/lesson add) --json 구조화 출력 (1.9.413)', run: () => { const src = read(__filename); const taskJ = src.includes("log(JSON.stringify({ ok: true, id, status: arg('--status', 'requested'), request: text }))"); const decJ = src.includes("log(JSON.stringify({ ok: true, title }))"); const lesJ = src.includes("log(JSON.stringify({ ok: true, text, tag: tag || null }))"); const ruleJ = src.includes("skipped: !!result.skip"); return taskJ && decJ && lesJ && ruleJ; } },
|
|
3028
|
+
{ name: '9th 외부평가 Sonnet/Codex (UR-0122): add류 _parseAddTitle(flag/경로 break) + 빈 입력 거부 와이어 (1.9.416)', run: () => {
|
|
3029
|
+
const m = require('../lib/pure-utils');
|
|
3030
|
+
if (typeof m._parseAddTitle !== 'function' || m._parseAddTitle !== _parseAddTitle) return false;
|
|
3031
|
+
const u1 = m._parseAddTitle(['add', '제목', '/x/y'], 1) === '제목';
|
|
3032
|
+
const u2 = m._parseAddTitle(['add', 'my', 'title', '--note', 'v'], 1) === 'my title';
|
|
3033
|
+
const u3 = m._parseAddTitle(['add', '/only'], 1) === '';
|
|
3034
|
+
const u4 = m._parseAddTitle(['add', './rel'], 1) === '';
|
|
3035
|
+
const src = read(__filename);
|
|
3036
|
+
const taskWired = src.includes('_parseAddTitle(args, 2)') && src.includes("'empty_title'");
|
|
3037
|
+
const reqWired = src.includes('_parseAddTitle(rest, 0)');
|
|
3038
|
+
return u1 && u2 && u3 && u4 && taskWired && reqWired;
|
|
3039
|
+
} },
|
|
3028
3040
|
{ name: '9th 외부평가 Codex P1 (UR-0121): handoff 보안 헤드라인 실제 스캔 기반 + scan/encoding --json + contract --json exit (1.9.415)', run: () => {
|
|
3029
3041
|
const src = read(__filename);
|
|
3030
3042
|
const handoffWired = src.includes('_collectSecretFindings(root)') && src.includes('🚨 ' + '시크릿 ');
|
|
@@ -4513,8 +4525,9 @@ function requestsCmd(root, sub, ...rest) {
|
|
|
4513
4525
|
}
|
|
4514
4526
|
|
|
4515
4527
|
if (sub === 'add') {
|
|
4516
|
-
|
|
4517
|
-
|
|
4528
|
+
// 1.9.416 (UR-0122): flag/경로 break(기존 filter 는 경로형 positional 을 text 에 흡수) + 빈 입력 거부
|
|
4529
|
+
const text = _parseAddTitle(rest, 0);
|
|
4530
|
+
if (!text) { failJson(has('--json'), 'empty_request', 'leerness requests add "<요청>" 필요 (빈/경로-only 거부)'); return process.exit(process.exitCode || 1); }
|
|
4518
4531
|
const entry = _recordUserRequest(root, text);
|
|
4519
4532
|
if (!entry) { console.error('failed to record'); process.exit(1); }
|
|
4520
4533
|
if (has('--json')) { log(JSON.stringify(entry, null, 2)); return; }
|
|
@@ -20996,7 +21009,12 @@ async function main() {
|
|
|
20996
21009
|
if (cmd === 'task') {
|
|
20997
21010
|
const root = absRoot(arg('--path', process.cwd())); const sub = args[1] || 'list';
|
|
20998
21011
|
if (sub==='list') return taskList(root);
|
|
20999
|
-
if (sub==='add')
|
|
21012
|
+
if (sub==='add') {
|
|
21013
|
+
// 1.9.416 (UR-0122): flag/경로 break + 빈 입력 거부 (기존: args.slice(2).join(' ') 가 경로 흡수 + 빈 task 생성)
|
|
21014
|
+
const title = _parseAddTitle(args, 2);
|
|
21015
|
+
if (!title) { failJson(has('--json'), 'empty_title', 'task add "<제목>" 필요 (빈/경로-only 제목 거부)'); return process.exit(process.exitCode || 1); }
|
|
21016
|
+
return taskAdd(root, title);
|
|
21017
|
+
}
|
|
21000
21018
|
if (sub==='update') return taskUpdate(root, args[2]);
|
|
21001
21019
|
if (sub==='drop') return taskDrop(root, args[2]);
|
|
21002
21020
|
if (sub==='fix-evidence') return taskFixEvidence(root);
|
|
@@ -21052,13 +21070,10 @@ async function main() {
|
|
|
21052
21070
|
const root = absRoot(arg('--path', process.cwd())); const sub = args[1] || '';
|
|
21053
21071
|
if (sub === 'add') {
|
|
21054
21072
|
// args[2..] 가 title (단, --flag 또는 경로형 positional 이 시작되기 전까지)
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
titleParts.push(args[i]);
|
|
21060
|
-
}
|
|
21061
|
-
return decisionAdd(root, titleParts.join(' '));
|
|
21073
|
+
// 1.9.351 (UR-0064) → 1.9.416 (UR-0122): 공유 헬퍼 _parseAddTitle 로 단일화(flag/경로 break) + 빈 입력 거부
|
|
21074
|
+
const title = _parseAddTitle(args, 2);
|
|
21075
|
+
if (!title) { failJson(has('--json'), 'empty_title', 'decision add "<제목>" 필요'); return process.exit(process.exitCode || 1); }
|
|
21076
|
+
return decisionAdd(root, title);
|
|
21062
21077
|
}
|
|
21063
21078
|
if (sub === 'list') {
|
|
21064
21079
|
return decisionListCmd(absRoot(_resolveRoot(args[2])), { json: has('--json') }); // 1.9.412 (UR-0100): positional path 지원(add 의 args[2]=title 와 분리)
|
package/lib/pure-utils.js
CHANGED
|
@@ -962,7 +962,9 @@ module.exports = {
|
|
|
962
962
|
// 1.9.402 (7번째 버그헌트 P1-A 잔여, UR-0108): MD projection 라인 안전화(개행→공백)
|
|
963
963
|
_lineSafe,
|
|
964
964
|
// 1.9.407 (8번째 버그헌트, UR-0111): --limit 안전 파싱(NaN/음수/0 → 기본값)
|
|
965
|
-
_parseLimit
|
|
965
|
+
_parseLimit,
|
|
966
|
+
// 1.9.416 (9th 외부평가, UR-0122): add 류 제목 파싱(flag/경로 break) 단일 출처
|
|
967
|
+
_parseAddTitle
|
|
966
968
|
};
|
|
967
969
|
|
|
968
970
|
// 1.9.355 (UR-0075 Phase A): AI 에이전트용 크로스버전 마이그레이션 안전 워크플로 가이드 (순수 텍스트). 임시설치 + --path + 백업 + diff 검증.
|
|
@@ -1208,3 +1210,17 @@ function _cellUnescape(s) { return String(s == null ? '' : s).replace(/\\\|/g, '
|
|
|
1208
1210
|
function _lineSafe(s) { return String(s == null ? '' : s).replace(/\r\n|\r|\n/g, ' '); }
|
|
1209
1211
|
// 1.9.407 (8번째 버그헌트, UR-0111): --limit 안전 파싱 — NaN(예: '--limit abc')/음수/0 은 slice(0,NaN)=[] 로 모든 결과를 조용히 숨김 → 기본값으로 폴백.
|
|
1210
1212
|
function _parseLimit(raw, def) { const n = parseInt(raw, 10); return (Number.isFinite(n) && n > 0) ? n : def; }
|
|
1213
|
+
|
|
1214
|
+
// 1.9.416 (9th 외부평가 Sonnet/Codex, UR-0122): add 류(task/requests/decision) 제목 파싱 단일 출처.
|
|
1215
|
+
// positional 을 join 하되 첫 --flag 또는 경로형 토큰(/x, C:\x, ./x, ../x)에서 멈춤 →
|
|
1216
|
+
// `task add "제목" /some/path` 가 경로를 제목에 흡수하던 오염(decision add 는 이미 차단)을 일관 적용.
|
|
1217
|
+
function _parseAddTitle(args, startIdx = 0) {
|
|
1218
|
+
const parts = [];
|
|
1219
|
+
for (let i = startIdx; i < (args || []).length; i++) {
|
|
1220
|
+
const a = args[i];
|
|
1221
|
+
if (typeof a !== 'string') break;
|
|
1222
|
+
if (a.startsWith('--') || /^([A-Za-z]:[\\/]|\/|\.\.?[\\/])/.test(a)) break;
|
|
1223
|
+
parts.push(a);
|
|
1224
|
+
}
|
|
1225
|
+
return parts.join(' ').trim();
|
|
1226
|
+
}
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -5957,5 +5957,34 @@ total++;
|
|
|
5957
5957
|
if (!ok) failed++;
|
|
5958
5958
|
}
|
|
5959
5959
|
|
|
5960
|
+
// 1.9.416 회귀 (9th 외부평가 Sonnet/Codex, UR-0122): add류 제목 경로흡수 차단 + 빈 입력 거부
|
|
5961
|
+
total++;
|
|
5962
|
+
{
|
|
5963
|
+
let ok = false;
|
|
5964
|
+
try {
|
|
5965
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-addtitle-'));
|
|
5966
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5967
|
+
// (1) task add "제목" <경로> → 경로가 title 에 흡수되지 않음
|
|
5968
|
+
cp.spawnSync(process.execPath, [CLI, 'task', 'add', '인증 구현', d, '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
5969
|
+
const tl = cp.spawnSync(process.execPath, [CLI, 'task', 'list', d, '--path', d], { encoding: 'utf8', timeout: 15000 }).stdout || '';
|
|
5970
|
+
const noPathPollution = /인증 구현/.test(tl) && !new RegExp(d.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).test(tl.split('인증 구현')[1] || '');
|
|
5971
|
+
// (2) task add 빈/경로-only 거부 exit 1
|
|
5972
|
+
const empty = cp.spawnSync(process.execPath, [CLI, 'task', 'add', '', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
5973
|
+
const pathOnly = cp.spawnSync(process.execPath, [CLI, 'task', 'add', d, '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
5974
|
+
const rejectOk = empty.status === 1 && pathOnly.status === 1;
|
|
5975
|
+
// (3) --json 빈 거부 구조화
|
|
5976
|
+
const ej = cp.spawnSync(process.execPath, [CLI, 'task', 'add', '', '--path', d, '--json'], { encoding: 'utf8', timeout: 15000 });
|
|
5977
|
+
let jsonOk = false; try { const j = JSON.parse(ej.stdout); jsonOk = j.ok === false && j.code === 'empty_title'; } catch {}
|
|
5978
|
+
// (4) requests add 경로 break
|
|
5979
|
+
cp.spawnSync(process.execPath, [CLI, 'requests', 'add', '다크모드 지원', d, '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
5980
|
+
const rl = cp.spawnSync(process.execPath, [CLI, 'requests', 'list', '--path', d], { encoding: 'utf8', timeout: 15000 }).stdout || '';
|
|
5981
|
+
const reqClean = /다크모드 지원/.test(rl) && !new RegExp(d.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).test(rl.split('다크모드 지원')[1] || '');
|
|
5982
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5983
|
+
ok = noPathPollution && rejectOk && jsonOk && reqClean;
|
|
5984
|
+
} catch {}
|
|
5985
|
+
console.log(ok ? '✓ B(1.9.416) 9th외부평가: add류 제목 경로흡수 차단 + 빈 입력 거부 exit1 + --json (UR-0122)' : '✗ add류 제목 일관성 실패');
|
|
5986
|
+
if (!ok) failed++;
|
|
5987
|
+
}
|
|
5988
|
+
|
|
5960
5989
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
5961
5990
|
if (failed > 0) process.exit(1);
|