leerness 1.9.329 → 1.9.330

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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.330 — 2026-06-05 — UR-0025(증분): project-brief config 분리
4
+
5
+ **🧩 project-brief 필드 config(`_BRIEF_FIELDS`) + 채움 카운트(`_briefFilled`)를 lib/pure-utils 로 이전.** (UR-0025 micro-증분 계속)
6
+
7
+ ### 구현 (UR-0025)
8
+ 1. **`_BRIEF_FIELDS`**(10필드 순수 config) + **`_briefFilled`**(순수 채움 derivation) → `lib/pure-utils.js`. harness 인라인 제거 → require. (brief 텍스트 빌더 `_briefReadmeBlock`/`_briefBlueprint`는 BRIEF_START/VERSION 결합이라 harness 유지 — 후속.)
9
+ 2. selftest 77→78 · e2e 274→275.
10
+
11
+ ### 검증
12
+ - **selftest 78/78 PASS** · **E2E 275/275 PASS** (회귀 0).
13
+ - 실측: `_BRIEF_FIELDS.length`=10·`[0].key`=intro · `_briefFilled({intro,features})`=2 · brief set/show "채움 2/10" 정상.
14
+
15
+ ### 비고 (UR-0025 진행도)
16
+ 순수 함수 micro-추출이 실질 소진 단계 — lib/pure-utils 누적 32종. 남은 UR-0025 는 서브시스템 단위(brief 빌더/skill/wakeup 등, 상수·VERSION 결합 동반)라 multi-touch. 다음 방향은 사용자 확인 필요.
17
+
3
18
  ## 1.9.329 — 2026-06-05 — UR-0025(증분): roadmap MD 파서 3종 분리
4
19
 
5
20
  **🧩 순수 roadmap MD 파서 3종을 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.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)]()
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.330-green)]() [![tests](https://img.shields.io/badge/e2e-275%2F275-success)]() [![selftest](https://img.shields.io/badge/selftest-78-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.329 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
474
+ 이 프로젝트는 Leerness v1.9.330 하네스를 사용합니다. 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.329는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **83개 도구**를 노출:
528
+ Leerness v1.9.330는 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.329는 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.329)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
549
+ 현재 누적: **70 라운드 (1.9.40 → 1.9.330)** · 매 라운드 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.329: 2026-06-05
587
+ Last synced by Leerness v1.9.330: 2026-06-05
588
588
  <!-- leerness:project-readme:end -->
589
589
 
package/bin/harness.js CHANGED
@@ -13,13 +13,14 @@ const { _isSecretKey, compareVer, parseHarnessVersion, _classifyCJK, _riskLabel,
13
13
  _countDatedBlocks, _extractDecisionBlocks, _classifyIntent,
14
14
  _sanitizeFences, _shellQuoteArg, _detectPwshFromEnv,
15
15
  _getLocalTz, _formatLocal, _truncate, _splitList,
16
- _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens } = require('../lib/pure-utils'); // 1.9.318~329 (UR-0025): 순수 유틸 모듈 분리
16
+ _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens,
17
+ _BRIEF_FIELDS, _briefFilled } = require('../lib/pure-utils'); // 1.9.318~330 (UR-0025): 순수 유틸 모듈 분리
17
18
  // 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
18
19
  const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
19
20
  // 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
20
21
  const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST } = require('../lib/catalogs');
21
22
 
22
- const VERSION = '1.9.329';
23
+ const VERSION = '1.9.330';
23
24
 
24
25
  // 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
25
26
  // 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
@@ -3072,6 +3073,7 @@ function _selfTestCases() {
3072
3073
  { 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
3074
  { 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
3075
  { 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; } },
3076
+ { name: 'lib/pure-utils: project-brief config 분리(_BRIEF_FIELDS/_briefFilled) + 인라인 제거 (UR-0025 1.9.330)', run: () => { const m = require('../lib/pure-utils'); const cfgOk = Array.isArray(m._BRIEF_FIELDS) && m._BRIEF_FIELDS.length === 10 && m._BRIEF_FIELDS[0].key === 'intro'; const work = m._briefFilled({ intro: 'x', features: ['a'] }) === 2 && m._briefFilled({}) === 0; const src = read(__filename); const moved = m._briefFilled === _briefFilled && m._BRIEF_FIELDS === _BRIEF_FIELDS && !/^const _BRIEF_FIELDS = \[/m.test(src) && !/^function _briefFilled\(/m.test(src); return cfgOk && work && moved; } },
3075
3077
  { name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
3076
3078
  ];
3077
3079
  }
@@ -18216,18 +18218,7 @@ function aboutCmd(opts = {}) {
18216
18218
  // ===== 1.9.307 (UR-0055 사용자명시): 프로젝트 청사진(brief) =====
18217
18219
  // 프로젝트 개요/소개/목적/기능을 .harness/project-brief.md(정본)에 유지 + README 개요 섹션 동기화 + 복사용 blueprint export.
18218
18220
  // "복사하면 신규 프로젝트를 기초부터 재시작할 수 있는" 자기완결 청사진. 기존 project-brief.md 확장(비파괴).
18219
- const _BRIEF_FIELDS = [
18220
- { key: 'intro', h: 'Intro', label: '소개', flag: 'intro', multi: false },
18221
- { key: 'purpose', h: 'Purpose', label: '목적', flag: 'purpose', multi: false },
18222
- { key: 'problem', h: 'Problem', label: '해결 문제', flag: 'problem', multi: false },
18223
- { key: 'features', h: 'Features', label: '핵심 기능', flag: 'features', multi: true },
18224
- { key: 'stack', h: 'Tech Stack', label: '기술 스택', flag: 'stack', multi: true },
18225
- { key: 'architecture', h: 'Architecture', label: '아키텍처', flag: 'architecture', multi: false },
18226
- { key: 'users', h: 'Users', label: '사용자', flag: 'users', multi: true },
18227
- { key: 'success', h: 'Success Criteria', label: '성공 기준', flag: 'success', multi: true },
18228
- { key: 'nonGoals', h: 'Non-Goals', label: '비목표', flag: 'non-goals', multi: true },
18229
- { key: 'currentState', h: 'Current State', label: '현재 상태', flag: 'current-state', multi: false },
18230
- ];
18221
+ // 1.9.330 (UR-0025): _BRIEF_FIELDS (10필드 config) → lib/pure-utils.js 로 이동 (순수 데이터, require 사용).
18231
18222
  function _briefPath(root) { return path.join(absRoot(root), '.harness', 'project-brief.md'); }
18232
18223
  function _loadBrief(root) {
18233
18224
  const brief = { project: detectProjectName(absRoot(root)), directionHistory: [] };
@@ -18259,7 +18250,7 @@ function _saveBrief(root, brief) {
18259
18250
  if (brief.directionHistory && brief.directionHistory.length) body += `\n## Direction History\n` + brief.directionHistory.map(x => `- ${x}`).join('\n') + '\n';
18260
18251
  writeUtf8(_briefPath(root), fm('project-brief', ['프로젝트 목적 확인', '신규 기능 판단', '계획 수립'], ['프로젝트 목적 변경', '사용자/범위 변경'], body));
18261
18252
  }
18262
- function _briefFilled(brief) { return _BRIEF_FIELDS.filter(f => (f.multi ? (brief[f.key] && brief[f.key].length) : brief[f.key])).length; }
18253
+ // 1.9.330 (UR-0025): _briefFilled lib/pure-utils.js 이동 (순수 derivation, require 사용).
18263
18254
  function _briefReadmeBlock(brief) {
18264
18255
  const L = [BRIEF_START, '## 프로젝트 개요', ''];
18265
18256
  if (brief.intro) L.push(brief.intro, '');
package/lib/pure-utils.js CHANGED
@@ -318,6 +318,21 @@ function _roadmapParseTokens(text) {
318
318
  return tokens;
319
319
  }
320
320
 
321
+ // 1.9.330 (UR-0025): project-brief 필드 config(순수 데이터) + 채움 카운트 derivation.
322
+ const _BRIEF_FIELDS = [
323
+ { key: 'intro', h: 'Intro', label: '소개', flag: 'intro', multi: false },
324
+ { key: 'purpose', h: 'Purpose', label: '목적', flag: 'purpose', multi: false },
325
+ { key: 'problem', h: 'Problem', label: '해결 문제', flag: 'problem', multi: false },
326
+ { key: 'features', h: 'Features', label: '핵심 기능', flag: 'features', multi: true },
327
+ { key: 'stack', h: 'Tech Stack', label: '기술 스택', flag: 'stack', multi: true },
328
+ { key: 'architecture', h: 'Architecture', label: '아키텍처', flag: 'architecture', multi: false },
329
+ { key: 'users', h: 'Users', label: '사용자', flag: 'users', multi: true },
330
+ { key: 'success', h: 'Success Criteria', label: '성공 기준', flag: 'success', multi: true },
331
+ { key: 'nonGoals', h: 'Non-Goals', label: '비목표', flag: 'non-goals', multi: true },
332
+ { key: 'currentState', h: 'Current State', label: '현재 상태', flag: 'current-state', multi: false },
333
+ ];
334
+ function _briefFilled(brief) { return _BRIEF_FIELDS.filter(f => (f.multi ? (brief[f.key] && brief[f.key].length) : brief[f.key])).length; }
335
+
321
336
  module.exports = {
322
337
  _isSecretKey, compareVer, parseHarnessVersion,
323
338
  _classifyCJK, _riskLabel, _detectSystemLang, _parseSlashFromHelp,
@@ -336,5 +351,7 @@ module.exports = {
336
351
  // 1.9.328 (UR-0025): 순수 문자열 유틸
337
352
  _truncate, _splitList,
338
353
  // 1.9.329 (UR-0025): 순수 roadmap MD 파서
339
- _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens
354
+ _roadmapMapStatus, _roadmapParseMilestones, _roadmapParseTokens,
355
+ // 1.9.330 (UR-0025): project-brief 필드 config + 채움 카운트
356
+ _BRIEF_FIELDS, _briefFilled
340
357
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leerness",
3
- "version": "1.9.329",
3
+ "version": "1.9.330",
4
4
  "description": "Leerness: 비파괴 마이그레이션, 자동 버전 감지·업데이트, 계획/진행/핸드오프 자동화, 게으름·시크릿·인코딩 자동 가드, Claude Code 슬래시 통합을 갖춘 한국어 우선 AI 개발 하네스.",
5
5
  "keywords": [
6
6
  "leerness",
package/scripts/e2e.js CHANGED
@@ -4030,5 +4030,30 @@ total++;
4030
4030
  if (!ok) failed++;
4031
4031
  }
4032
4032
 
4033
+ // 1.9.330 회귀 (UR-0025 모듈화): project-brief config(_BRIEF_FIELDS) + _briefFilled lib/pure-utils 분리 + brief 명령 회귀
4034
+ total++;
4035
+ {
4036
+ let ok = false;
4037
+ try {
4038
+ const m = require(path.resolve(__dirname, '..', 'lib', 'pure-utils.js'));
4039
+ const cfgOk = Array.isArray(m._BRIEF_FIELDS) && m._BRIEF_FIELDS.length === 10 && m._BRIEF_FIELDS[0].key === 'intro';
4040
+ const work = m._briefFilled({ intro: 'x', features: ['a'] }) === 2 && m._briefFilled({}) === 0;
4041
+ const harnessSrc = fs.readFileSync(path.resolve(__dirname, '..', 'bin', 'harness.js'), 'utf8');
4042
+ const _puImp = (harnessSrc.match(/const \{[\s\S]*?\} = require\('\.\.\/lib\/pure-utils'\)/) || [''])[0]; // import 순서 비의존
4043
+ const movedOut = !/const _BRIEF_FIELDS = \[/.test(harnessSrc) && !/function _briefFilled\(/.test(harnessSrc)
4044
+ && _puImp.includes('_BRIEF_FIELDS') && _puImp.includes('_briefFilled');
4045
+ // 소비 명령 회귀: brief set + show (채움 N/10)
4046
+ const bd = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-brief-'));
4047
+ cp.spawnSync(process.execPath, [CLI, 'init', bd, '--yes', '--language', 'ko', '--skills', 'recommended'], { encoding: 'utf8', timeout: 30000 });
4048
+ cp.spawnSync(process.execPath, [CLI, 'brief', 'set', '--intro', 'X', '--purpose', 'Y', '--path', bd], { encoding: 'utf8', timeout: 20000 });
4049
+ const r = cp.spawnSync(process.execPath, [CLI, 'brief', 'show', '--path', bd], { encoding: 'utf8', timeout: 20000 });
4050
+ const cmdOk = /2\/10/.test(r.stdout || '');
4051
+ ok = cfgOk && work && movedOut && cmdOk;
4052
+ fs.rmSync(bd, { recursive: true, force: true });
4053
+ } catch {}
4054
+ console.log(ok ? '✓ B(1.9.330) lib/pure-utils brief config 분리: _BRIEF_FIELDS/_briefFilled 모듈 단일출처 + brief 명령 (UR-0025)' : '✗ brief config 분리 실패');
4055
+ if (!ok) failed++;
4056
+ }
4057
+
4033
4058
  console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
4034
4059
  if (failed > 0) process.exit(1);