leerness 1.9.327 → 1.9.329

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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.329 — 2026-06-05 — UR-0025(증분): roadmap MD 파서 3종 분리
4
+
5
+ **🧩 순수 roadmap MD 파서 3종을 lib/pure-utils 로 이전.** (UR-0025 micro-증분 계속)
6
+
7
+ ### 구현 (UR-0025)
8
+ 1. **`_roadmapMapStatus`**(상태 정규화) + **`_roadmapParseMilestones`**(### M-XXXX 마일스톤 추출) + **`_roadmapParseTokens`**(MD 테이블 토큰 추출) → `lib/pure-utils.js`. (`_roadmapParseCssVars` 는 fs 의존이라 harness 유지.) harness 인라인 제거 → require.
9
+ 2. selftest 76→77 · e2e 273→274.
10
+
11
+ ### 검증
12
+ - **selftest 77/77 PASS** · **E2E 274/274 PASS** (회귀 0).
13
+ - 실측: `_roadmapMapStatus('REQUESTED')`→`planned`/`('done')`→`done` · 마일스톤 progress 40 파싱 · 토큰 `color`→`#fff`.
14
+
15
+ ## 1.9.328 — 2026-06-05 — UR-0025(증분): 문자열 유틸(_truncate/_splitList) 분리
16
+
17
+ **🧩 순수 문자열 유틸 2종을 lib/pure-utils 로 이전.** (UR-0025 micro-증분 계속)
18
+
19
+ ### 구현 (UR-0025)
20
+ 1. **`_truncate`**(말줄임표 절단) + **`_splitList`**(콤마 리스트 분할, trim+filter) → `lib/pure-utils.js`. harness 인라인 제거 → require.
21
+ 2. selftest 75→76 · e2e 272→273.
22
+
23
+ ### 검증
24
+ - **selftest 76/76 PASS** · **E2E 273/273 PASS** (회귀 0).
25
+ - 실측: `_truncate('hello world',8)`→`hello w…`·`_truncate('hi',8)`→`hi` · `_splitList('a, b ,c,')`→`["a","b","c"]`.
26
+
3
27
  ## 1.9.327 — 2026-06-05 — UR-0025(증분): TZ/날짜 포맷 유틸 분리
4
28
 
5
29
  **🧩 순수 TZ/날짜 포맷 함수(`_getLocalTz`/`_formatLocal`)를 lib/pure-utils 로 이전.** (UR-0025 micro-증분 계속)
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
- [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.327-green)]() [![tests](https://img.shields.io/badge/e2e-272%2F272-success)]() [![selftest](https://img.shields.io/badge/selftest-75-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-83-brightgreen)]() [![providers](https://img.shields.io/badge/AI_providers-10-brightgreen)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
6
+ [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.329-green)]() [![tests](https://img.shields.io/badge/e2e-274%2F274-success)]() [![selftest](https://img.shields.io/badge/selftest-77-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-83-brightgreen)]() [![providers](https://img.shields.io/badge/AI_providers-10-brightgreen)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
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.327 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
474
+ 이 프로젝트는 Leerness v1.9.329 하네스를 사용합니다. 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.327는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **83개 도구**를 노출:
528
+ Leerness v1.9.329는 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.327는 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.327)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
549
+ 현재 누적: **70 라운드 (1.9.40 → 1.9.329)** · 매 라운드 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.327: 2026-06-05
587
+ Last synced by Leerness v1.9.329: 2026-06-05
588
588
  <!-- leerness:project-readme:end -->
589
589
 
package/bin/harness.js CHANGED
@@ -12,13 +12,14 @@ const { _isSecretKey, compareVer, parseHarnessVersion, _classifyCJK, _riskLabel,
12
12
  _htmlToText, _extractTitle, _extractLinks,
13
13
  _countDatedBlocks, _extractDecisionBlocks, _classifyIntent,
14
14
  _sanitizeFences, _shellQuoteArg, _detectPwshFromEnv,
15
- _getLocalTz, _formatLocal } = require('../lib/pure-utils'); // 1.9.318~327 (UR-0025): 순수 HTML/메모리/intent/문자열·셸·env/날짜 분리
15
+ _getLocalTz, _formatLocal, _truncate, _splitList,
16
+ _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens } = require('../lib/pure-utils'); // 1.9.318~329 (UR-0025): 순수 유틸 모듈 분리
16
17
  // 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
17
18
  const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
18
19
  // 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
19
20
  const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST } = require('../lib/catalogs');
20
21
 
21
- const VERSION = '1.9.327';
22
+ const VERSION = '1.9.329';
22
23
 
23
24
  // 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
24
25
  // 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
@@ -3069,6 +3070,8 @@ function _selfTestCases() {
3069
3070
  { name: 'lib/pure-utils: _classifyIntent 분리 (precise/broad/default 분류) + 인라인 제거 (UR-0025 1.9.325)', run: () => { const m = require('../lib/pure-utils'); const fnOk = typeof m._classifyIntent === 'function'; const work = m._classifyIntent('정확히 그것만').intent === 'precise' && m._classifyIntent('전체 다양한 기능').intent === 'broad' && m._classifyIntent('로그인 구현').intent === 'default'; const moved = m._classifyIntent === _classifyIntent && !/^function _classifyIntent\(/m.test(read(__filename)); return fnOk && work && moved; } },
3070
3071
  { name: 'lib/pure-utils: 문자열/셸/env 유틸 분리(_sanitizeFences/_shellQuoteArg/_detectPwshFromEnv) (UR-0025 1.9.326)', run: () => { const m = require('../lib/pure-utils'); const fnOk = typeof m._sanitizeFences === 'function' && typeof m._shellQuoteArg === 'function' && typeof m._detectPwshFromEnv === 'function'; const work = m._sanitizeFences('a```b') === "a'''b" && m._detectPwshFromEnv({ POWERSHELL_DISTRIBUTION_CHANNEL: 'X' }).version === '7' && /^['"]/.test(m._shellQuoteArg('a b')); const src = read(__filename); const moved = m._sanitizeFences === _sanitizeFences && !/^function _sanitizeFences\(/m.test(src) && !/^function _shellQuoteArg\(/m.test(src) && !/^function _detectPwshFromEnv\(/m.test(src); return fnOk && work && moved; } },
3071
3072
  { name: 'lib/pure-utils: TZ/날짜 포맷 분리(_getLocalTz/_formatLocal) + 인라인 제거 (UR-0025 1.9.327)', run: () => { const m = require('../lib/pure-utils'); const fnOk = typeof m._getLocalTz === 'function' && typeof m._formatLocal === 'function'; const work = m._formatLocal('2026-06-05T01:13:00.000Z', { tz: 'Asia/Seoul' }) === '2026-06-05 10:13 KST' && m._formatLocal('2026-06-05T01:13:00.000Z', { tz: 'Asia/Seoul', dateOnly: true }) === '2026-06-05' && m._formatLocal('') === '?'; const src = read(__filename); const moved = m._formatLocal === _formatLocal && !/^function _formatLocal\(/m.test(src) && !/^function _getLocalTz\(/m.test(src); return fnOk && work && moved; } },
3073
+ { name: 'lib/pure-utils: 문자열 유틸 분리(_truncate/_splitList) + 인라인 제거 (UR-0025 1.9.328)', run: () => { const m = require('../lib/pure-utils'); const work = m._truncate('hello world', 8) === 'hello w…' && m._truncate('hi', 8) === 'hi' && JSON.stringify(m._splitList('a, b ,c,')) === '["a","b","c"]'; const src = read(__filename); const moved = m._truncate === _truncate && m._splitList === _splitList && !/^function _truncate\(/m.test(src) && !/^function _splitList\(/m.test(src); return work && moved; } },
3074
+ { name: 'lib/pure-utils: roadmap MD 파서 분리(_roadmapMapStatus/Milestones/Tokens) + 인라인 제거 (UR-0025 1.9.329)', run: () => { const m = require('../lib/pure-utils'); const work = m._roadmapMapStatus('REQUESTED') === 'planned' && m._roadmapMapStatus('done') === 'done' && m._roadmapParseMilestones('### M-0001. 로그인\nStatus: in-progress\nProgress: 40%')[0].progress === 40 && m._roadmapParseTokens('| color | #fff |').color === '#fff'; const src = read(__filename); const moved = m._roadmapMapStatus === _roadmapMapStatus && !/^function _roadmapMapStatus\(/m.test(src) && !/^function _roadmapParseMilestones\(/m.test(src) && !/^function _roadmapParseTokens\(/m.test(src); return work && moved; } },
3072
3075
  { name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
3073
3076
  ];
3074
3077
  }
@@ -13555,38 +13558,9 @@ const ROADMAP_STATUS_COLOR = { done: '#16a34a', 'in-progress': '#2563eb', 'on-ho
13555
13558
  const ROADMAP_NODE_W = 220, ROADMAP_NODE_H = 72, ROADMAP_COL_GAP = 70, ROADMAP_ROW_GAP = 14;
13556
13559
 
13557
13560
  function _esc(s) { return String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;'); }
13558
- function _truncate(s, n) { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; }
13561
+ // 1.9.328 (UR-0025): _truncate lib/pure-utils.js 이동 (순수 문자열 절단, require 사용).
13559
13562
 
13560
- function _roadmapMapStatus(s) {
13561
- s = String(s || '').toLowerCase();
13562
- if (s === 'done' || s === 'in-progress' || s === 'on-hold' || s === 'waiting' || s === 'incomplete' || s === 'blocked' || s === 'dropped') return s;
13563
- if (s === 'planned' || s === 'requested') return 'planned';
13564
- return 'planned';
13565
- }
13566
-
13567
- function _roadmapParseMilestones(text) {
13568
- const out = [];
13569
- for (const m of String(text || '').matchAll(/^### (M-\d{4})\.\s*(.+?)$/gm)) {
13570
- const after = text.slice(m.index);
13571
- const sm = after.match(/^Status:\s*(\S+)/m);
13572
- const pm = after.match(/^Progress:\s*(\d+)%/m);
13573
- out.push({ id: m[1], title: m[2].trim(), status: sm ? sm[1] : 'planned', progress: pm ? parseInt(pm[1], 10) : 0 });
13574
- }
13575
- return out;
13576
- }
13577
-
13578
- function _roadmapParseTokens(text) {
13579
- const tokens = {};
13580
- for (const line of String(text || '').split('\n')) {
13581
- const m = line.match(/^\|\s*([\w.\-]+)\s*\|\s*([^|]+?)\s*\|/);
13582
- if (!m) continue;
13583
- const key = m[1].trim(), val = m[2].trim();
13584
- if (!key || !val || key === 'Token' || /^-+$/.test(key) || val === 'Value' || /\(실제 값으로 업데이트\)/.test(val)) continue;
13585
- if (val.length > 80) continue;
13586
- tokens[key] = val;
13587
- }
13588
- return tokens;
13589
- }
13563
+ // 1.9.329 (UR-0025): _roadmapMapStatus / _roadmapParseMilestones / _roadmapParseTokens → lib/pure-utils.js 로 이동 (순수 roadmap MD 파서, require 사용).
13590
13564
 
13591
13565
  function _roadmapParseCssVars(root) {
13592
13566
  const out = {};
@@ -18183,7 +18157,7 @@ function _updateRun(root, id, mutator) {
18183
18157
  return rec;
18184
18158
  });
18185
18159
  }
18186
- function _splitList(v) { return String(v || '').split(',').map(s => s.trim()).filter(Boolean); }
18160
+ // 1.9.328 (UR-0025): _splitList lib/pure-utils.js 이동 (순수 콤마 리스트 분할, require 사용).
18187
18161
 
18188
18162
  // leerness state <show|start|record|verify|handoff>
18189
18163
  // 1.9.292 (UR-0031): get_project_context — 외부 에이전트 온보딩용 단일 집약 컨텍스트.
package/lib/pure-utils.js CHANGED
@@ -284,6 +284,40 @@ function _formatLocal(iso, opts) {
284
284
  } catch { return String(iso); }
285
285
  }
286
286
 
287
+ // 1.9.328 (UR-0025): 순수 문자열 유틸 — 절단(말줄임표) / 콤마 리스트 분할.
288
+ function _truncate(s, n) { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; }
289
+ function _splitList(v) { return String(v || '').split(',').map(s => s.trim()).filter(Boolean); }
290
+
291
+ // 1.9.329 (UR-0025): 순수 roadmap MD 파서 — 상태 정규화 / 마일스톤·토큰 추출 (fs 의존 0).
292
+ function _roadmapMapStatus(s) {
293
+ s = String(s || '').toLowerCase();
294
+ if (s === 'done' || s === 'in-progress' || s === 'on-hold' || s === 'waiting' || s === 'incomplete' || s === 'blocked' || s === 'dropped') return s;
295
+ if (s === 'planned' || s === 'requested') return 'planned';
296
+ return 'planned';
297
+ }
298
+ function _roadmapParseMilestones(text) {
299
+ const out = [];
300
+ for (const m of String(text || '').matchAll(/^### (M-\d{4})\.\s*(.+?)$/gm)) {
301
+ const after = text.slice(m.index);
302
+ const sm = after.match(/^Status:\s*(\S+)/m);
303
+ const pm = after.match(/^Progress:\s*(\d+)%/m);
304
+ out.push({ id: m[1], title: m[2].trim(), status: sm ? sm[1] : 'planned', progress: pm ? parseInt(pm[1], 10) : 0 });
305
+ }
306
+ return out;
307
+ }
308
+ function _roadmapParseTokens(text) {
309
+ const tokens = {};
310
+ for (const line of String(text || '').split('\n')) {
311
+ const m = line.match(/^\|\s*([\w.\-]+)\s*\|\s*([^|]+?)\s*\|/);
312
+ if (!m) continue;
313
+ const key = m[1].trim(), val = m[2].trim();
314
+ if (!key || !val || key === 'Token' || /^-+$/.test(key) || val === 'Value' || /\(실제 값으로 업데이트\)/.test(val)) continue;
315
+ if (val.length > 80) continue;
316
+ tokens[key] = val;
317
+ }
318
+ return tokens;
319
+ }
320
+
287
321
  module.exports = {
288
322
  _isSecretKey, compareVer, parseHarnessVersion,
289
323
  _classifyCJK, _riskLabel, _detectSystemLang, _parseSlashFromHelp,
@@ -298,5 +332,9 @@ module.exports = {
298
332
  // 1.9.326 (UR-0025): 순수 문자열/셸/env 유틸
299
333
  _sanitizeFences, _shellQuoteArg, _detectPwshFromEnv,
300
334
  // 1.9.327 (UR-0025): 순수 TZ/날짜 포맷
301
- _getLocalTz, _formatLocal
335
+ _getLocalTz, _formatLocal,
336
+ // 1.9.328 (UR-0025): 순수 문자열 유틸
337
+ _truncate, _splitList,
338
+ // 1.9.329 (UR-0025): 순수 roadmap MD 파서
339
+ _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens
302
340
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leerness",
3
- "version": "1.9.327",
3
+ "version": "1.9.329",
4
4
  "description": "Leerness: 비파괴 마이그레이션, 자동 버전 감지·업데이트, 계획/진행/핸드오프 자동화, 게으름·시크릿·인코딩 자동 가드, Claude Code 슬래시 통합을 갖춘 한국어 우선 AI 개발 하네스.",
5
5
  "keywords": [
6
6
  "leerness",
package/scripts/e2e.js CHANGED
@@ -3991,5 +3991,44 @@ total++;
3991
3991
  if (!ok) failed++;
3992
3992
  }
3993
3993
 
3994
+ // 1.9.328 회귀 (UR-0025 모듈화): 순수 문자열 유틸 2종(_truncate/_splitList) lib/pure-utils 분리 + harness 인라인 제거
3995
+ total++;
3996
+ {
3997
+ let ok = false;
3998
+ try {
3999
+ const m = require(path.resolve(__dirname, '..', 'lib', 'pure-utils.js'));
4000
+ const work = typeof m._truncate === 'function' && typeof m._splitList === 'function'
4001
+ && m._truncate('hello world', 8) === 'hello w…' && m._truncate('hi', 8) === 'hi'
4002
+ && JSON.stringify(m._splitList('a, b ,c,')) === '["a","b","c"]';
4003
+ const harnessSrc = fs.readFileSync(path.resolve(__dirname, '..', 'bin', 'harness.js'), 'utf8');
4004
+ const _puImp = (harnessSrc.match(/const \{[\s\S]*?\} = require\('\.\.\/lib\/pure-utils'\)/) || [''])[0]; // import 순서 비의존
4005
+ const movedOut = !/function _truncate\(/.test(harnessSrc) && !/function _splitList\(/.test(harnessSrc)
4006
+ && _puImp.includes('_truncate') && _puImp.includes('_splitList');
4007
+ ok = work && movedOut;
4008
+ } catch {}
4009
+ console.log(ok ? '✓ B(1.9.328) lib/pure-utils 문자열 유틸 분리: 모듈 단일출처 + 인라인 제거 (UR-0025)' : '✗ 문자열 유틸 분리 실패');
4010
+ if (!ok) failed++;
4011
+ }
4012
+
4013
+ // 1.9.329 회귀 (UR-0025 모듈화): roadmap MD 파서 3종 lib/pure-utils 분리 + harness 인라인 제거
4014
+ total++;
4015
+ {
4016
+ let ok = false;
4017
+ try {
4018
+ const m = require(path.resolve(__dirname, '..', 'lib', 'pure-utils.js'));
4019
+ const work = typeof m._roadmapMapStatus === 'function' && typeof m._roadmapParseMilestones === 'function' && typeof m._roadmapParseTokens === 'function'
4020
+ && m._roadmapMapStatus('REQUESTED') === 'planned' && m._roadmapMapStatus('done') === 'done'
4021
+ && m._roadmapParseMilestones('### M-0001. 로그인\nStatus: in-progress\nProgress: 40%')[0].progress === 40
4022
+ && m._roadmapParseTokens('| color | #fff |').color === '#fff';
4023
+ const harnessSrc = fs.readFileSync(path.resolve(__dirname, '..', 'bin', 'harness.js'), 'utf8');
4024
+ const _puImp = (harnessSrc.match(/const \{[\s\S]*?\} = require\('\.\.\/lib\/pure-utils'\)/) || [''])[0]; // import 순서 비의존
4025
+ const movedOut = !/function _roadmapMapStatus\(/.test(harnessSrc) && !/function _roadmapParseMilestones\(/.test(harnessSrc) && !/function _roadmapParseTokens\(/.test(harnessSrc)
4026
+ && _puImp.includes('_roadmapMapStatus') && _puImp.includes('_roadmapParseMilestones') && _puImp.includes('_roadmapParseTokens');
4027
+ ok = work && movedOut;
4028
+ } catch {}
4029
+ console.log(ok ? '✓ B(1.9.329) lib/pure-utils roadmap MD 파서 분리: 모듈 단일출처 + 인라인 제거 (UR-0025)' : '✗ roadmap 파서 분리 실패');
4030
+ if (!ok) failed++;
4031
+ }
4032
+
3994
4033
  console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
3995
4034
  if (failed > 0) process.exit(1);